Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme
This commit is contained in:
commit
dd3a61beb3
@ -43,9 +43,9 @@ $routes->get('user/deleteUser', 'User::deleteUser');
|
|||||||
$routes->get('user/reActivateUser', 'User::reActivateUser');
|
$routes->get('user/reActivateUser', 'User::reActivateUser');
|
||||||
|
|
||||||
// Supplier Routes
|
// Supplier Routes
|
||||||
$routes->get('supplierlisting', 'Supplier::index'); // list supplier
|
$routes->match(["GET","POST"],'supplierlisting', 'Supplier::index'); // list supplier
|
||||||
$routes->add('addsupplier', 'Supplier::addsupplier');//load add supplier page
|
$routes->add('addsupplier', 'Supplier::addsupplier');//load add supplier page
|
||||||
$routes->get('viewsupplier', 'Supplier::viewsupplier');// load edit supplier page
|
$routes->get('viewsupplier', 'Supplier::viewsupplier');
|
||||||
$routes->post('editsupplier', 'Supplier::updatesupplierdetails'); //save supplier details
|
$routes->post('editsupplier', 'Supplier::updatesupplierdetails'); //save supplier details
|
||||||
$routes->post('addNewsupplier', 'Supplier::savesupplierdetails'); // update supplier details
|
$routes->post('addNewsupplier', 'Supplier::savesupplierdetails'); // update supplier details
|
||||||
$routes->post('supplierExist', 'Supplier::checksupplier');
|
$routes->post('supplierExist', 'Supplier::checksupplier');
|
||||||
@ -68,7 +68,7 @@ $routes->post('deleteMaterial', 'Rawmaterialdetails::deleteMaterial');
|
|||||||
$routes->post('reActivateMaterial', 'Rawmaterialdetails::reActivateMaterial');
|
$routes->post('reActivateMaterial', 'Rawmaterialdetails::reActivateMaterial');
|
||||||
|
|
||||||
// Cost Center Routes
|
// Cost Center Routes
|
||||||
$routes->get('costListing', 'CostCenter::index');
|
$routes->match(['GET','POST'],'costListing', 'CostCenter::index');
|
||||||
$routes->post('fetchCostCenterDetails', 'CostCenter::fetchCostCenterDetails');// for Ajax both add and edit....
|
$routes->post('fetchCostCenterDetails', 'CostCenter::fetchCostCenterDetails');// for Ajax both add and edit....
|
||||||
$routes->get('reActivateCostCenter', 'CostCenter::reActivateCostCenter');
|
$routes->get('reActivateCostCenter', 'CostCenter::reActivateCostCenter');
|
||||||
$routes->get('deleteCostCenter', 'CostCenter::deleteCostCenter');
|
$routes->get('deleteCostCenter', 'CostCenter::deleteCostCenter');
|
||||||
@ -98,7 +98,7 @@ $routes->post('getDriver', 'Driver::getDriver');
|
|||||||
$routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'driverPrintPdf', 'Driver::driverPrintPdf');
|
$routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'driverPrintPdf', 'Driver::driverPrintPdf');
|
||||||
|
|
||||||
// Asset Detail Routes
|
// Asset Detail Routes
|
||||||
$routes->get('assetListing', 'Assetdetails::assetListing');
|
$routes->match(['GET','POST'],'assetListing', 'Assetdetails::assetListing');
|
||||||
$routes->get('addasset', 'Assetdetails::addasset');
|
$routes->get('addasset', 'Assetdetails::addasset');
|
||||||
$routes->post('assetdetails/getpodetails', 'Assetdetails::getpodetails');
|
$routes->post('assetdetails/getpodetails', 'Assetdetails::getpodetails');
|
||||||
$routes->post('assetdetails/getline', 'Assetdetails::getline');
|
$routes->post('assetdetails/getline', 'Assetdetails::getline');
|
||||||
@ -153,7 +153,7 @@ $routes->get('configurationctrl/deleteConfig', 'Configurationctrl::deleteConfig'
|
|||||||
$routes->get('configurationctrl/reActivateConfig', 'Configurationctrl::reActivateConfig');
|
$routes->get('configurationctrl/reActivateConfig', 'Configurationctrl::reActivateConfig');
|
||||||
|
|
||||||
// Department Master Routes
|
// Department Master Routes
|
||||||
$routes->get('departmentListing', 'Department::index');
|
$routes->match(["GET","POST"],'departmentListing', 'Department::index');
|
||||||
$routes->get('adddepartment', 'Department::adddepartment');
|
$routes->get('adddepartment', 'Department::adddepartment');
|
||||||
$routes->post('savedepartment', 'Department::savedepartment');
|
$routes->post('savedepartment', 'Department::savedepartment');
|
||||||
$routes->get('editOlddepartment', 'Department::viewdepartment');
|
$routes->get('editOlddepartment', 'Department::viewdepartment');
|
||||||
@ -315,6 +315,9 @@ $routes->get('download-files/(:segment)', 'Inwardgateregister::downloadFilesAsZi
|
|||||||
$routes->post('inwardgateregister/edituploadfile', 'Inwardgateregister::edituploadfile');
|
$routes->post('inwardgateregister/edituploadfile', 'Inwardgateregister::edituploadfile');
|
||||||
$routes->post('getIGRRemarks', 'Inwardgateregister::getIGRRemarks');
|
$routes->post('getIGRRemarks', 'Inwardgateregister::getIGRRemarks');
|
||||||
$routes->post('saveIGRRemarks', 'Inwardgateregister::saveIGRRemarks');
|
$routes->post('saveIGRRemarks', 'Inwardgateregister::saveIGRRemarks');
|
||||||
|
$routes->post('updateGasShortage','Inwardgateregister::updateGasShortage');
|
||||||
|
$routes->post('gasShortageList','Inwardgateregister::gasShortageList');
|
||||||
|
$routes->post('getGasShortageDetail',"Inwardgateregister::getGasShortageDetail");
|
||||||
|
|
||||||
|
|
||||||
// Non IGR / Expense
|
// Non IGR / Expense
|
||||||
@ -442,7 +445,7 @@ $routes->match(['GET', 'POST'], 'sales_report', 'Sales::sales_report');
|
|||||||
$routes->match(['GET', 'POST'],'credit_notes', 'Sales::credit_notes');
|
$routes->match(['GET', 'POST'],'credit_notes', 'Sales::credit_notes');
|
||||||
|
|
||||||
// transporter Routes
|
// transporter Routes
|
||||||
$routes->get('transporterListing', 'Supplier::transporterListing');
|
$routes->match(['GET', 'POST'],'transporterListing', 'Supplier::transporterListing');
|
||||||
$routes->post('fetchTransporterDetails', 'Supplier::fetchTransporterDetails');// for Ajax both add and edit....
|
$routes->post('fetchTransporterDetails', 'Supplier::fetchTransporterDetails');// for Ajax both add and edit....
|
||||||
$routes->get('deleteTransporter', 'Supplier::deleteTransporter');
|
$routes->get('deleteTransporter', 'Supplier::deleteTransporter');
|
||||||
$routes->get('reActivateTransporter', 'Supplier::reActivateTransporter');
|
$routes->get('reActivateTransporter', 'Supplier::reActivateTransporter');
|
||||||
@ -452,6 +455,7 @@ $routes->post('checkTransporter', 'Supplier::checkTransporter');
|
|||||||
|
|
||||||
$routes->post('createFactoryMachineMasterDetails', 'FactoryMachineController::createFactoryMachineMasterDetails');
|
$routes->post('createFactoryMachineMasterDetails', 'FactoryMachineController::createFactoryMachineMasterDetails');
|
||||||
$routes->get('readFactoryMachineMasterDetails', 'FactoryMachineController::readFactoryMachineMasterDetails');
|
$routes->get('readFactoryMachineMasterDetails', 'FactoryMachineController::readFactoryMachineMasterDetails');
|
||||||
|
$routes->post('readFactoryMachineMasterDetails', 'FactoryMachineController::readFactoryMachineMasterDetails');
|
||||||
$routes->get('readFactoryMachineMasterDetailsById', 'FactoryMachineController::readFactoryMachineMasterDetailsById');
|
$routes->get('readFactoryMachineMasterDetailsById', 'FactoryMachineController::readFactoryMachineMasterDetailsById');
|
||||||
$routes->post('updateFactoryMachineMasterDetails', 'FactoryMachineController::updateFactoryMachineMasterDetails');
|
$routes->post('updateFactoryMachineMasterDetails', 'FactoryMachineController::updateFactoryMachineMasterDetails');
|
||||||
$routes->get('deleteFactoryMachineMasterDetails', 'FactoryMachineController::deleteFactoryMachineMasterDetails');
|
$routes->get('deleteFactoryMachineMasterDetails', 'FactoryMachineController::deleteFactoryMachineMasterDetails');
|
||||||
@ -517,5 +521,7 @@ $routes->post('updateTrpSandUseStockDetails', 'StockController::updateTrpSandUse
|
|||||||
//trp production stock details
|
//trp production stock details
|
||||||
$routes->match(['GET', 'POST'], 'trpProductionDetails', 'StockController::trpProductionDetails');
|
$routes->match(['GET', 'POST'], 'trpProductionDetails', 'StockController::trpProductionDetails');
|
||||||
$routes->post('updateTrpProductionDetails', 'StockController::updateTrpProductionDetails');
|
$routes->post('updateTrpProductionDetails', 'StockController::updateTrpProductionDetails');
|
||||||
|
//trp abstract
|
||||||
|
$routes->post('updateAbstractDetails','StockController::updateAbstractDetails');
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -50,9 +50,22 @@ class Assetdetails extends BaseController
|
|||||||
*/
|
*/
|
||||||
function assetListing()
|
function assetListing()
|
||||||
{
|
{
|
||||||
|
$isActiveFilter = 1 ; // default showing active data
|
||||||
|
$showArchive = 0 ; //
|
||||||
|
|
||||||
|
if ($this->request->getMethod() === 'POST') {
|
||||||
|
|
||||||
|
$showArchive = $this->request->getPost('showArchive');
|
||||||
|
//reversing condition that when user wants deleted data to be shown then we are making active filter 0
|
||||||
|
if($showArchive){
|
||||||
|
$isActiveFilter = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$data['showArchive'] = $showArchive;
|
||||||
|
|
||||||
|
|
||||||
$data['userRecords'] = $this->assetdetails_model->assetListing();
|
$data['userRecords'] = $this->assetdetails_model->assetListing($isActiveFilter);
|
||||||
|
|
||||||
$this->global['pageTitle'] = 'Asset List';
|
$this->global['pageTitle'] = 'Asset List';
|
||||||
//print_r($data);die();
|
//print_r($data);die();
|
||||||
|
|||||||
@ -45,7 +45,21 @@ class CostCenter extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$data['userRecords'] = $this->costcenter_model->CostListing();
|
|
||||||
|
$isActiveFilter = 1 ; // default showing active data
|
||||||
|
$showArchive = 0 ; //
|
||||||
|
|
||||||
|
if ($this->request->getMethod() === 'POST') {
|
||||||
|
|
||||||
|
$showArchive = $this->request->getPost('showArchive');
|
||||||
|
//reversing condition that when user wants deleted data to be shown we are making active filter
|
||||||
|
if($showArchive){
|
||||||
|
$isActiveFilter = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$data['showArchive'] = $showArchive;
|
||||||
|
$data['userRecords'] = $this->costcenter_model->CostListing($isActiveFilter);
|
||||||
$this->global['pageTitle'] = 'Cost List';
|
$this->global['pageTitle'] = 'Cost List';
|
||||||
|
|
||||||
$this->loadViews("costListing", $this->global, $data, NULL);
|
$this->loadViews("costListing", $this->global, $data, NULL);
|
||||||
|
|||||||
@ -48,20 +48,25 @@ class Department extends BaseController
|
|||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
|
|
||||||
// if($this->isAdmin() == TRUE)
|
|
||||||
// {
|
$isActiveFilter = 1 ; // default showing active data
|
||||||
// $this->loadThis();
|
$showArchive = 0 ; //
|
||||||
// }
|
|
||||||
// else
|
if ($this->request->getMethod() === 'POST') {
|
||||||
// {
|
|
||||||
|
$showArchive = $this->request->getPost('showArchive');
|
||||||
|
//reversing condition that when user wants deleted data to be shown then we are making active filter 0
|
||||||
|
if($showArchive){
|
||||||
|
$isActiveFilter = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$data['showArchive'] = $showArchive;
|
||||||
|
|
||||||
|
|
||||||
$this->department_model = new department_model();
|
$this->department_model = new department_model();
|
||||||
|
|
||||||
//$searchText = $this->request->getPost('searchText');
|
$data['userRecords'] = $this->department_model->departmentListing($isActiveFilter); //$searchText, $returns["page"], $returns["segment"]);
|
||||||
//$data['searchText'] = $searchText;
|
|
||||||
//$count = $this->department_model->departmentListing($searchText);
|
|
||||||
//$returns = $this->paginationCompress ( "departmentListing/", $count, 20 );
|
|
||||||
|
|
||||||
$data['userRecords'] = $this->department_model->departmentListing(); //$searchText, $returns["page"], $returns["segment"]);
|
|
||||||
|
|
||||||
$this->global['pageTitle'] = 'Department Listing';
|
$this->global['pageTitle'] = 'Department Listing';
|
||||||
|
|
||||||
|
|||||||
@ -125,7 +125,7 @@ class Emergencypurchaseorder extends BaseController
|
|||||||
// print_r($this->request->getPost());die;
|
// print_r($this->request->getPost());die;
|
||||||
$txtRowCount = $this->request->getPost('txtRowCount');
|
$txtRowCount = $this->request->getPost('txtRowCount');
|
||||||
$POdt = $this->request->getPost('PODate');
|
$POdt = $this->request->getPost('PODate');
|
||||||
$PODate = get_date_time_format($POdt);
|
$PODate = get_date_time_dynamical_format('d-m-Y','Y-m-d',"$POdt");
|
||||||
$SupplierID = $this->request->getPost('drpSupplier');
|
$SupplierID = $this->request->getPost('drpSupplier');
|
||||||
$DeliveryAddr = $this->request->getPost('DeliveryAddr');
|
$DeliveryAddr = $this->request->getPost('DeliveryAddr');
|
||||||
$CostCenterName = $this->request->getPost('CostCenterName');
|
$CostCenterName = $this->request->getPost('CostCenterName');
|
||||||
@ -369,7 +369,7 @@ class Emergencypurchaseorder extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
$POdt = $this->request->getPost('PODate');
|
$POdt = $this->request->getPost('PODate');
|
||||||
$PODate = get_date_time_format($POdt);
|
$PODate = get_date_time_dynamical_format('d-m-Y','Y-m-d',"$POdt");
|
||||||
$SupplierID = $this->request->getPost('drpSupplier');
|
$SupplierID = $this->request->getPost('drpSupplier');
|
||||||
$DeliveryAddr = $this->request->getPost('DeliveryAddr');
|
$DeliveryAddr = $this->request->getPost('DeliveryAddr');
|
||||||
$dt = $this->request->getPost('Deliverydt');
|
$dt = $this->request->getPost('Deliverydt');
|
||||||
|
|||||||
@ -26,6 +26,8 @@ class Expense extends BaseController
|
|||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$isActiveFilter = 1 ;
|
||||||
|
|
||||||
if ($this->request->getMethod() === 'GET')
|
if ($this->request->getMethod() === 'GET')
|
||||||
{
|
{
|
||||||
$toDate = date('Y-m-d');
|
$toDate = date('Y-m-d');
|
||||||
@ -38,7 +40,7 @@ class Expense extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
$data['expense_list'] = $this->expense_model->getAllExpense($fromDate,$toDate);
|
$data['expense_list'] = $this->expense_model->getAllExpense($fromDate,$toDate);
|
||||||
$data['supplier_list'] = json_encode($this->supplier_model->supplierlisting());
|
$data['supplier_list'] = json_encode($this->supplier_model->supplierlisting($isActiveFilter));
|
||||||
$this->global['pageTitle'] = 'Non IGR / Expense List';
|
$this->global['pageTitle'] = 'Non IGR / Expense List';
|
||||||
$data['fromDate'] = date('d-m-Y', strtotime($fromDate));
|
$data['fromDate'] = date('d-m-Y', strtotime($fromDate));
|
||||||
$data['toDate'] = date('d-m-Y', strtotime($toDate));
|
$data['toDate'] = date('d-m-Y', strtotime($toDate));
|
||||||
|
|||||||
@ -80,9 +80,25 @@ class FactoryMachineController extends BaseController
|
|||||||
|
|
||||||
public function readFactoryMachineMasterDetails(){
|
public function readFactoryMachineMasterDetails(){
|
||||||
|
|
||||||
|
|
||||||
|
$isActiveFilter = 1 ; // default showing active data
|
||||||
|
$showArchive = 0 ; //
|
||||||
|
|
||||||
|
if ($this->request->getMethod() === 'POST') {
|
||||||
|
|
||||||
|
$showArchive = $this->request->getPost('showArchive');
|
||||||
|
//reversing condition that when user wants deleted data to be shown then we are making active filter 0
|
||||||
|
if($showArchive){
|
||||||
|
$isActiveFilter = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$data['showArchive'] = $showArchive;
|
||||||
|
|
||||||
$this->global['pageTitle'] = 'Factory Machine Master Details';
|
$this->global['pageTitle'] = 'Factory Machine Master Details';
|
||||||
|
|
||||||
$data['masterData'] = $this->factoryMachineMaster_model
|
$data['masterData'] = $this->factoryMachineMaster_model
|
||||||
|
->where('is_active',$isActiveFilter)
|
||||||
->orderBy('created_at','DESC')
|
->orderBy('created_at','DESC')
|
||||||
->findAll();
|
->findAll();
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,7 @@ use CodeIgniter\Validation\Exceptions\ValidationException;
|
|||||||
|
|
||||||
use App\Models\Inwardgateregister_model;
|
use App\Models\Inwardgateregister_model;
|
||||||
use App\Models\IGRRemarks_model;
|
use App\Models\IGRRemarks_model;
|
||||||
|
use App\Models\GasShortageModel;
|
||||||
use App\Helpers\Notification;
|
use App\Helpers\Notification;
|
||||||
use DateTime;
|
use DateTime;
|
||||||
|
|
||||||
@ -25,6 +26,7 @@ class Inwardgateregister extends BaseController
|
|||||||
{
|
{
|
||||||
protected $inwardgateregister_model;
|
protected $inwardgateregister_model;
|
||||||
protected $IGRRemarks_model;
|
protected $IGRRemarks_model;
|
||||||
|
protected $gasShortage_model;
|
||||||
protected $session;
|
protected $session;
|
||||||
protected $logger;
|
protected $logger;
|
||||||
|
|
||||||
@ -37,6 +39,7 @@ class Inwardgateregister extends BaseController
|
|||||||
parent::__construct();
|
parent::__construct();
|
||||||
$this->inwardgateregister_model = new Inwardgateregister_model();
|
$this->inwardgateregister_model = new Inwardgateregister_model();
|
||||||
$this->IGRRemarks_model = new IGRRemarks_model();
|
$this->IGRRemarks_model = new IGRRemarks_model();
|
||||||
|
$this->gasShortage_model = new GasShortageModel();
|
||||||
|
|
||||||
$this->session = session();
|
$this->session = session();
|
||||||
helper('form'); //$this->load->library('form_validation');
|
helper('form'); //$this->load->library('form_validation');
|
||||||
@ -688,6 +691,7 @@ function viewIGRDetails()
|
|||||||
$IGRNO = $this->request->getPost('id');
|
$IGRNO = $this->request->getPost('id');
|
||||||
|
|
||||||
$data['details'] = $this->inwardgateregister_model->viewigr($IGRNO);
|
$data['details'] = $this->inwardgateregister_model->viewigr($IGRNO);
|
||||||
|
|
||||||
$TaxInPercentage = 0;
|
$TaxInPercentage = 0;
|
||||||
for ($i = 0; $i < count($data['details']); $i++) {
|
for ($i = 0; $i < count($data['details']); $i++) {
|
||||||
$details = $data['details'][$i];
|
$details = $data['details'][$i];
|
||||||
@ -1474,4 +1478,62 @@ function updateIGRWeight(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function gasShortageList(){
|
||||||
|
|
||||||
|
$postData = $this->request->getPost();
|
||||||
|
|
||||||
|
$allShortages = $this->gasShortage_model->where('invoiceNo',$postData['invoiceNo'])->findAll();
|
||||||
|
|
||||||
|
return $this->response->setJSON(['status' => 'success', 'data' => $allShortages]);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getGasShortageDetail(){
|
||||||
|
|
||||||
|
$postData = $this->request->getPost();
|
||||||
|
|
||||||
|
$shortage = $this->gasShortage_model->where('id',$postData['id'])->find();
|
||||||
|
|
||||||
|
return $this->response->setJSON(['status' => 'success', 'data' => $shortage]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function updateGasShortage()
|
||||||
|
{
|
||||||
|
$postData = $this->request->getPost();
|
||||||
|
|
||||||
|
// Validate required data
|
||||||
|
if (!$postData) {
|
||||||
|
return $this->response->setJSON(['status' => 'error', 'message' => 'Invalid request. No data received.']);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate required fields for adding
|
||||||
|
if ( !isset($postData['invoiceNo']) ) {
|
||||||
|
return $this->response->setJSON(['status' => 'error', 'message' => 'Missing required fields: invoice No.']);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handle update (edit)
|
||||||
|
if (isset($postData["id"])) {
|
||||||
|
return $this->gasShortage_model->update($postData["id"], $postData)
|
||||||
|
? $this->response->setJSON(['status' => 'success', 'message' => 'Gas shortage details updated successfully.'])
|
||||||
|
: $this->response->setJSON(['status' => 'error', 'message' => 'Failed to update gas shortage details.']);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Insert new shortage (add)
|
||||||
|
return ($insertId = $this->gasShortage_model->insert($postData))
|
||||||
|
? $this->response->setJSON(['status' => 'success', 'message' => 'Gas shortage details added successfully.', 'data' => ['id' => $insertId]])
|
||||||
|
: $this->response->setJSON(['status' => 'error', 'message' => 'Failed to save gas shortage details.']);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -801,10 +801,10 @@ class Payslip extends BaseController
|
|||||||
$loan = $Balance_Amount;
|
$loan = $Balance_Amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
$empSalaryAdd = $final_salary_amount+$shed+$diesel;
|
$empSalaryAdd = $final_salary_amount;
|
||||||
$empSalarySub = $loan;
|
$empSalarySub = $loan;
|
||||||
$salaryInCurrentday = $empSalaryAdd - $empSalarySub;
|
// $salaryInCurrentday = $empSalaryAdd - $empSalarySub;
|
||||||
$load_driver_data[$i]->driver_final_payment = $salaryInCurrentday;
|
// $load_driver_data[$i]->driver_final_payment = $salaryInCurrentday;
|
||||||
|
|
||||||
$load_driver_data[$i]->payroll_id = $monthly_pay_array[$driver_id]->payroll_id;
|
$load_driver_data[$i]->payroll_id = $monthly_pay_array[$driver_id]->payroll_id;
|
||||||
$load_driver_data[$i]->Festival_Bonus = $monthly_pay_array[$driver_id]->Festival_Bonus;
|
$load_driver_data[$i]->Festival_Bonus = $monthly_pay_array[$driver_id]->Festival_Bonus;
|
||||||
@ -871,8 +871,8 @@ class Payslip extends BaseController
|
|||||||
|
|
||||||
$empSalaryAdd = $final_salary_amount;
|
$empSalaryAdd = $final_salary_amount;
|
||||||
$empSalarySub = $loan;
|
$empSalarySub = $loan;
|
||||||
$salaryInCurrentday = $empSalaryAdd - $empSalarySub;
|
// $salaryInCurrentday = $empSalaryAdd - $empSalarySub;
|
||||||
$load_driver_data[$i]->driver_final_payment = $salaryInCurrentday+$shed+$diesel;
|
// $load_driver_data[$i]->driver_final_payment = $salaryInCurrentday+$shed+$diesel;
|
||||||
$load_driver_data[$i]->total_cal_days = $get_last_date_of_the_month;
|
$load_driver_data[$i]->total_cal_days = $get_last_date_of_the_month;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1168,6 +1168,7 @@ class Payslip extends BaseController
|
|||||||
$EmpID = $j['Emp ID'];
|
$EmpID = $j['Emp ID'];
|
||||||
$is_driver = $this->driver_model->getDriverName($EmpID,1);
|
$is_driver = $this->driver_model->getDriverName($EmpID,1);
|
||||||
$DaysWorked = $j['Days Worked'];
|
$DaysWorked = $j['Days Worked'];
|
||||||
|
$NoTrips = isset($j['Number Of Trips']) ? $j['Number Of Trips'] : 0.00 ;
|
||||||
$TotalCalDays = isset($j['Total Days']) ? $j['Total Days'] : 0.00 ;
|
$TotalCalDays = isset($j['Total Days']) ? $j['Total Days'] : 0.00 ;
|
||||||
$ActualSalary = isset($j['Basic Salary']) ? $j['Basic Salary'] : 0.00 ;
|
$ActualSalary = isset($j['Basic Salary']) ? $j['Basic Salary'] : 0.00 ;
|
||||||
$WorkedSalary = isset($j['Worked Salary']) ? $j['Worked Salary'] : 0.00 ;
|
$WorkedSalary = isset($j['Worked Salary']) ? $j['Worked Salary'] : 0.00 ;
|
||||||
@ -1228,12 +1229,14 @@ class Payslip extends BaseController
|
|||||||
$drivermonthlypaydata = array(
|
$drivermonthlypaydata = array(
|
||||||
'month_year'=>$month,
|
'month_year'=>$month,
|
||||||
'driver_id'=>$EmpID,
|
'driver_id'=>$EmpID,
|
||||||
'no_of_loads'=>(strpos($TotalCalDays, "(trip)") !== false) ? explode(" ", $TotalCalDays)[0] : 0,
|
'TotalCalDays' => $TotalCalDays,
|
||||||
|
'no_of_loads'=>(strpos($NoTrips, "(trip)") !== false) ? explode(" ", $NoTrips)[0] : 0,
|
||||||
'monthly_food_amount'=>$Food,
|
'monthly_food_amount'=>$Food,
|
||||||
'total_diesel_amount'=>$Diesel,
|
'total_diesel_amount'=>$Diesel,
|
||||||
'total_shed_amount'=>$Shed,
|
'total_shed_amount'=>$Shed,
|
||||||
'monthly_salary_amount'=>($Basic+$Food),
|
'monthly_salary_amount'=>($Basic+$Food),
|
||||||
'final_payment'=>$Estimate,
|
'final_payment'=>$Estimate,
|
||||||
|
'BASIC'=>$Basic,
|
||||||
'HRA'=>$HRA,
|
'HRA'=>$HRA,
|
||||||
'ESI'=>$ESI,
|
'ESI'=>$ESI,
|
||||||
'PF'=>$PF,
|
'PF'=>$PF,
|
||||||
@ -1419,8 +1422,10 @@ class Payslip extends BaseController
|
|||||||
$currentDayBasic = isset($Data['PayDetails'][0]->monthly_salary_amount) ? $Data['PayDetails'][0]->monthly_salary_amount : 0;
|
$currentDayBasic = isset($Data['PayDetails'][0]->monthly_salary_amount) ? $Data['PayDetails'][0]->monthly_salary_amount : 0;
|
||||||
$PF_Rate = $Data['PayDetails'][0]->PF_Rate;
|
$PF_Rate = $Data['PayDetails'][0]->PF_Rate;
|
||||||
$ESI_Rate = $Data['PayDetails'][0]->ESI_Rate;
|
$ESI_Rate = $Data['PayDetails'][0]->ESI_Rate;
|
||||||
$Data['esi_amount'] = ($Data['PayDetails'][0]->esi_applicable == 1) ? $currentDayBasic * $ESI_Rate / 100 : 0;
|
// $Data['esi_amount'] = ($Data['PayDetails'][0]->esi_applicable == 1) ? $currentDayBasic * $ESI_Rate / 100 : 0;
|
||||||
$Data['pf_amount'] = ($Data['PayDetails'][0]->pf_applicable == 1) ? $currentDayBasic * $PF_Rate / 100 : 0;
|
// $Data['pf_amount'] = ($Data['PayDetails'][0]->pf_applicable == 1) ? $currentDayBasic * $PF_Rate / 100 : 0;
|
||||||
|
$Data['esi_amount'] = ($Data['PayDetails'][0]->esi_applicable == 1) ? $Data['PayDetails'][0]->ESI : 0;
|
||||||
|
$Data['pf_amount'] = ($Data['PayDetails'][0]->pf_applicable == 1) ? $Data['PayDetails'][0]->PF : 0;
|
||||||
$html = view("driverPayslipGeneratePrint", $Data);
|
$html = view("driverPayslipGeneratePrint", $Data);
|
||||||
}else{
|
}else{
|
||||||
//echo "EmpID" . $EmpID;
|
//echo "EmpID" . $EmpID;
|
||||||
|
|||||||
@ -3068,7 +3068,6 @@ class Purchaseorder extends BaseController
|
|||||||
$this->purchaseorder_model->insertlogpo($logpo);
|
$this->purchaseorder_model->insertlogpo($logpo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// print_r($this->request->getPost());die;
|
|
||||||
for ($i = 1; $i <= $RowCount; $i++) {
|
for ($i = 1; $i <= $RowCount; $i++) {
|
||||||
|
|
||||||
$MaterialCode = $this->request->getPost('materialCode' . $i);
|
$MaterialCode = $this->request->getPost('materialCode' . $i);
|
||||||
|
|||||||
@ -66,9 +66,22 @@ class Rawmaterialdetails extends BaseController
|
|||||||
function rawmaterialListing()
|
function rawmaterialListing()
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->rawmaterialdetails_model = new rawmaterialdetails_model();;
|
$isActiveFilter = 1 ; // default showing active data
|
||||||
|
$showArchive = 0 ; //
|
||||||
|
|
||||||
$data['userRecords'] = $this->rawmaterialdetails_model->rawmaterialListing();
|
if ($this->request->getMethod() === 'POST') {
|
||||||
|
|
||||||
|
$showArchive = $this->request->getPost('showArchive');
|
||||||
|
//reversing condition that when user wants deleted data to be shown we are making active filter
|
||||||
|
if($showArchive){
|
||||||
|
$isActiveFilter = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->rawmaterialdetails_model = new rawmaterialdetails_model();
|
||||||
|
|
||||||
|
$data['userRecords'] = $this->rawmaterialdetails_model->rawmaterialListing($isActiveFilter);
|
||||||
|
$data['showArchive'] = $showArchive ;
|
||||||
$data['materialCategoryList']= $this->materialCategories_model->where('is_active',1)->findAll();
|
$data['materialCategoryList']= $this->materialCategories_model->where('is_active',1)->findAll();
|
||||||
$this->global['pageTitle'] = 'RawMaterial Listing';
|
$this->global['pageTitle'] = 'RawMaterial Listing';
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -47,7 +47,22 @@ class Supplier extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$data['userRecords'] = $this->supplier_model->supplierlisting();
|
|
||||||
|
$isActiveFilter = 1 ; // default showing active transporters data
|
||||||
|
$showArchive = 0 ; //
|
||||||
|
|
||||||
|
if ($this->request->getMethod() === 'POST') {
|
||||||
|
|
||||||
|
$showArchive = $this->request->getPost('showArchive');
|
||||||
|
//reversing condition that when user wants deleted data to be shown we are making active filter
|
||||||
|
if($showArchive){
|
||||||
|
$isActiveFilter = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$data['userRecords'] = $this->supplier_model->supplierlisting($isActiveFilter);
|
||||||
|
$data['showArchive'] = $showArchive ;
|
||||||
$this->global['pageTitle'] = 'Supplier Listing';
|
$this->global['pageTitle'] = 'Supplier Listing';
|
||||||
$this->loadViews("supplierListing", $this->global, $data, NULL);
|
$this->loadViews("supplierListing", $this->global, $data, NULL);
|
||||||
}
|
}
|
||||||
@ -473,7 +488,20 @@ class Supplier extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function transporterListing()
|
public function transporterListing()
|
||||||
{
|
{
|
||||||
$data['userRecords'] = $this->supplier_model->transporterListing();
|
$isActiveFilter = 1 ; // default showing active transporters data
|
||||||
|
$showArchive = 0 ; //
|
||||||
|
|
||||||
|
if ($this->request->getMethod() === 'POST') {
|
||||||
|
|
||||||
|
$showArchive = $this->request->getPost('showArchive');
|
||||||
|
//reversing condition that when user wants deleted data to be shown we are making active filter
|
||||||
|
if($showArchive){
|
||||||
|
$isActiveFilter = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$data['userRecords'] = $this->supplier_model->transporterListing($isActiveFilter);
|
||||||
|
$data['showArchive'] = $showArchive ;
|
||||||
$this->global['pageTitle'] = 'Transporter List';
|
$this->global['pageTitle'] = 'Transporter List';
|
||||||
$this->loadViews("transporterListing", $this->global, $data, NULL);
|
$this->loadViews("transporterListing", $this->global, $data, NULL);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -894,14 +894,26 @@ class User extends BaseController
|
|||||||
*/
|
*/
|
||||||
function userListing()
|
function userListing()
|
||||||
{
|
{
|
||||||
// if($this->isAdmin() == TRUE)
|
|
||||||
// {
|
|
||||||
// $this->loadThis();
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
|
|
||||||
$data['userRecords'] = $this->user_model->userListing();
|
$isDeleted = 0 ; // default showing active data
|
||||||
|
$showArchive = 0 ; //
|
||||||
|
|
||||||
|
if ($this->request->getMethod() === 'POST') {
|
||||||
|
|
||||||
|
$showArchive = $this->request->getPost('showArchive');
|
||||||
|
//reversing condition that when user wants deleted data to be shown then we are making active filter 0
|
||||||
|
if($showArchive){
|
||||||
|
$isDeleted = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$data['showArchive'] = $showArchive;
|
||||||
|
|
||||||
|
// dd($data);
|
||||||
|
|
||||||
|
|
||||||
|
$data['userRecords'] = $this->user_model->userListing($isDeleted);
|
||||||
|
|
||||||
|
|
||||||
$this->global['pageTitle'] = 'User Listing';
|
$this->global['pageTitle'] = 'User Listing';
|
||||||
// dd($data);
|
// dd($data);
|
||||||
|
|||||||
@ -14,12 +14,13 @@ class Assetdetails_model extends Model
|
|||||||
* @param number $segment : This is pagination limit
|
* @param number $segment : This is pagination limit
|
||||||
* @return array $result : This is result
|
* @return array $result : This is result
|
||||||
*/
|
*/
|
||||||
function assetListing()
|
function assetListing($isActiveFilter)
|
||||||
{
|
{
|
||||||
$builder = $this->db->table('t_asset_details asd')
|
$builder = $this->db->table('t_asset_details asd')
|
||||||
->select('asd.*,dep.DepartmentName,sup.SupplierName')
|
->select('asd.*,dep.DepartmentName,sup.SupplierName')
|
||||||
->join('t_departmentdetails dep', ' dep.DEPCode = asd.DEPCode', 'left')
|
->join('t_departmentdetails dep', ' dep.DEPCode = asd.DEPCode', 'left')
|
||||||
->join('t_supplierdetailsn sup', 'sup.SupplierID = asd.SupplierCode', 'left')
|
->join('t_supplierdetailsn sup', 'sup.SupplierID = asd.SupplierCode', 'left')
|
||||||
|
->where('asd.IsActive',$isActiveFilter)
|
||||||
->orderBy('asd.CreatedDt', 'desc');
|
->orderBy('asd.CreatedDt', 'desc');
|
||||||
|
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
|
|||||||
@ -6,7 +6,7 @@ use CodeIgniter\Model;
|
|||||||
|
|
||||||
class CoatingMachineDetailsModel extends Model
|
class CoatingMachineDetailsModel extends Model
|
||||||
{
|
{
|
||||||
protected $table = 't_coatingMachineDetails';
|
protected $table = 't_coatingmachinedetails';
|
||||||
protected $primaryKey = 'id';
|
protected $primaryKey = 'id';
|
||||||
protected $useAutoIncrement = true;
|
protected $useAutoIncrement = true;
|
||||||
protected $returnType = 'array';
|
protected $returnType = 'array';
|
||||||
|
|||||||
@ -13,12 +13,13 @@ class Costcenter_model extends Model
|
|||||||
* @param number $segment : This is pagination limit
|
* @param number $segment : This is pagination limit
|
||||||
* @return array $result : This is result
|
* @return array $result : This is result
|
||||||
*/
|
*/
|
||||||
function CostListing()
|
function CostListing($isActiveFilter)
|
||||||
{
|
{
|
||||||
$builder = $this->db->table('t_costcenter_master as Cost')
|
$builder = $this->db->table('t_costcenter_master as Cost')
|
||||||
->select('Cost.id as id, Cost.CostCenterCode as code,Cost.CostCenterName as CostCenterName , Cost.ApprovedBy as ApprovedBy,Emp.FirstName as FirstName,Emp.Designation as Designation ,Cost.CreatedDate,Cost.IsActive,Cost.DeletedBy,Cost.DeletedBy')
|
->select('Cost.id as id, Cost.CostCenterCode as code,Cost.CostCenterName as CostCenterName , Cost.ApprovedBy as ApprovedBy,Emp.FirstName as FirstName,Emp.Designation as Designation ,Cost.CreatedDate,Cost.IsActive,Cost.DeletedBy,Cost.DeletedBy')
|
||||||
|
|
||||||
->join('t_employee_details as Emp', 'Emp.EmpID=Cost.ApprovedBy')
|
->join('t_employee_details as Emp', 'Emp.EmpID=Cost.ApprovedBy')
|
||||||
|
->where('Cost.IsActive',$isActiveFilter)
|
||||||
->orderBy('Cost.CreatedDate', 'desc');
|
->orderBy('Cost.CreatedDate', 'desc');
|
||||||
|
|
||||||
$query =$builder->get();
|
$query =$builder->get();
|
||||||
|
|||||||
@ -49,11 +49,13 @@ class Department_model extends Model
|
|||||||
* @param number $segment : This is pagination limit
|
* @param number $segment : This is pagination limit
|
||||||
* @return array $result : This is result
|
* @return array $result : This is result
|
||||||
*/
|
*/
|
||||||
function departmentListing()
|
function departmentListing($isActiveFilter)
|
||||||
{
|
{
|
||||||
$builder = $this->db->table('t_departmentdetails as BaseT')
|
$builder = $this->db->table('t_departmentdetails as BaseT')
|
||||||
->select('BaseT.CreatedDt,BaseT.DepartmentName, BaseT.DEPCode, BaseT.HeadDept, BaseT.IsActive ,
|
->select('BaseT.CreatedDt,BaseT.DepartmentName, BaseT.DEPCode, BaseT.HeadDept, BaseT.IsActive ,
|
||||||
BaseT.HeadDept')
|
BaseT.HeadDept,HeadDept.DepartmentName as headDepartmentName')
|
||||||
|
->join('t_departmentdetails as HeadDept', 'BaseT.HeadDept = HeadDept.DEPCode' ,'left')
|
||||||
|
->where('BaseT.IsActive',$isActiveFilter)
|
||||||
->orderBy("BaseT.DEPCode", "desc");
|
->orderBy("BaseT.DEPCode", "desc");
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
$result = $query->getResult();
|
$result = $query->getResult();
|
||||||
|
|||||||
@ -6,7 +6,7 @@ use CodeIgniter\Model;
|
|||||||
|
|
||||||
class DrierMachineDetailsModel extends Model
|
class DrierMachineDetailsModel extends Model
|
||||||
{
|
{
|
||||||
protected $table = 't_drierMachineDetails';
|
protected $table = 't_driermachinedetails';
|
||||||
protected $primaryKey = 'id';
|
protected $primaryKey = 'id';
|
||||||
protected $useAutoIncrement = true;
|
protected $useAutoIncrement = true;
|
||||||
protected $returnType = 'array';
|
protected $returnType = 'array';
|
||||||
|
|||||||
@ -285,7 +285,7 @@ class Driver_model extends Model
|
|||||||
$builder = $this->db->table('t_driver_payroll Pay')->select('Pay.*')
|
$builder = $this->db->table('t_driver_payroll Pay')->select('Pay.*')
|
||||||
->select('Emp.EmpID,CONCAT_WS(" ", Emp.FirstName, Emp.LastName) as driver_name,Emp.DateofBirth as Dob,Emp.PANNo as Pan,Emp.BankBranchName as BankName,Emp.BankAccountNo as BankAccountNumber,Emp.IFSCCode as IFSCCode,Emp.DateofJoining as DOJ,Emp.AadharNo,Emp.Designation as Designation,Dep.DepartmentName as DeptName,Emp.esi_applicable,Emp.pf_applicable')
|
->select('Emp.EmpID,CONCAT_WS(" ", Emp.FirstName, Emp.LastName) as driver_name,Emp.DateofBirth as Dob,Emp.PANNo as Pan,Emp.BankBranchName as BankName,Emp.BankAccountNo as BankAccountNumber,Emp.IFSCCode as IFSCCode,Emp.DateofJoining as DOJ,Emp.AadharNo,Emp.Designation as Designation,Dep.DepartmentName as DeptName,Emp.esi_applicable,Emp.pf_applicable')
|
||||||
->select('t_emp_pay_data.PF_Rate,t_emp_pay_data.ESI_Rate')
|
->select('t_emp_pay_data.PF_Rate,t_emp_pay_data.ESI_Rate')
|
||||||
->select('month.Festival_Bonus,month.HRA,month.Loan_Recovered,month.total_diesel_amount,month.total_shed_amount')
|
->select('month.Festival_Bonus,month.BASIC,month.HRA,month.Loan_Recovered,month.total_diesel_amount,month.total_shed_amount')
|
||||||
// ->select('month.monthly_salary_amount,month.monthly_food_amount,month.Festival_Bonus,month.final_payment,month.HRA,month.ESI,month.PF,month.Loan_Recovered,month.total_diesel_amount,month.total_shed_amount')
|
// ->select('month.monthly_salary_amount,month.monthly_food_amount,month.Festival_Bonus,month.final_payment,month.HRA,month.ESI,month.PF,month.Loan_Recovered,month.total_diesel_amount,month.total_shed_amount')
|
||||||
->join('t_employee_details Emp', 'Pay.driver_id = Emp.EmpID')
|
->join('t_employee_details Emp', 'Pay.driver_id = Emp.EmpID')
|
||||||
->join('t_departmentdetails Dep', 'Emp.Departmentcode = Dep.DEPCode')
|
->join('t_departmentdetails Dep', 'Emp.Departmentcode = Dep.DEPCode')
|
||||||
|
|||||||
@ -52,7 +52,7 @@ class Employeedetails_model extends Model
|
|||||||
return $query->getResult();
|
return $query->getResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
function incomingSilicaSandTestedBy($ConfigID){
|
function incomingSilicaSandTestedBy(){
|
||||||
|
|
||||||
|
|
||||||
$builder = $this->db->table('t_employee_details Emp')
|
$builder = $this->db->table('t_employee_details Emp')
|
||||||
@ -67,7 +67,7 @@ class Employeedetails_model extends Model
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function incomingSilicaSandApprovedBy($ConfigID){
|
function incomingSilicaSandApprovedBy(){
|
||||||
|
|
||||||
$builder = $this->db->table('t_employee_details Emp')
|
$builder = $this->db->table('t_employee_details Emp')
|
||||||
->select(' Emp.*')
|
->select(' Emp.*')
|
||||||
|
|||||||
@ -7,7 +7,7 @@ use CodeIgniter\Model;
|
|||||||
class FactoryMachineModel extends Model
|
class FactoryMachineModel extends Model
|
||||||
{
|
{
|
||||||
// The table associated with this model
|
// The table associated with this model
|
||||||
protected $table = 't_factoryMachineMaster';
|
protected $table = 't_factorymachinemaster';
|
||||||
|
|
||||||
// Primary key of the table
|
// Primary key of the table
|
||||||
protected $primaryKey = 'id';
|
protected $primaryKey = 'id';
|
||||||
@ -41,7 +41,7 @@ class FactoryMachineModel extends Model
|
|||||||
|
|
||||||
public function checkMachineName($machineId,$machineName){
|
public function checkMachineName($machineId,$machineName){
|
||||||
|
|
||||||
$builder = $this->db->table('t_factoryMachineMaster');
|
$builder = $this->db->table('t_factorymachinemaster');
|
||||||
|
|
||||||
if(!empty($machineId)){
|
if(!empty($machineId)){
|
||||||
$builder = $builder->where('id !=' , $machineId);
|
$builder = $builder->where('id !=' , $machineId);
|
||||||
@ -62,6 +62,57 @@ class FactoryMachineModel extends Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getAllActiveElectricMachines(){
|
||||||
|
|
||||||
|
$result = $this->db->table('t_factorymachinemaster')
|
||||||
|
->where('is_active', 1)
|
||||||
|
->where('energy_type', 'electric')
|
||||||
|
->orderBy('id', 'asc')
|
||||||
|
->get()
|
||||||
|
->getResultArray();
|
||||||
|
|
||||||
|
return $result ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSelectedElectricMachines($distinctMachineId){
|
||||||
|
|
||||||
|
$result = $this->db->table('t_factorymachinemaster')
|
||||||
|
->whereIn('id', $distinctMachineId)
|
||||||
|
->orderBy('id', 'asc')
|
||||||
|
->get()
|
||||||
|
->getResultArray();
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getAllActiveDieselMachines(){
|
||||||
|
|
||||||
|
$result = $this->db->table('t_factorymachinemaster')
|
||||||
|
->where('is_active', 1)
|
||||||
|
->where('energy_type', 'diesel')
|
||||||
|
->orderBy('id', 'desc')
|
||||||
|
->get()
|
||||||
|
->getResultArray();
|
||||||
|
|
||||||
|
return $result ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSelectedDieselMachines($distinctMachineId){
|
||||||
|
|
||||||
|
$result = $this->db->table('t_factorymachinemaster')
|
||||||
|
->whereIn('id', $distinctMachineId)
|
||||||
|
->orderBy('id', 'asc')
|
||||||
|
->get()
|
||||||
|
->getResultArray();
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@ use CodeIgniter\Model;
|
|||||||
|
|
||||||
class FactoryVehicleDieselDetailsModel extends Model
|
class FactoryVehicleDieselDetailsModel extends Model
|
||||||
{
|
{
|
||||||
protected $table = 't_factoryVehicleDieselDetails';
|
protected $table = 't_factoryvehicledieseldetails';
|
||||||
protected $primaryKey = 'id';
|
protected $primaryKey = 'id';
|
||||||
|
|
||||||
protected $allowedFields = [
|
protected $allowedFields = [
|
||||||
|
|||||||
@ -6,7 +6,7 @@ use CodeIgniter\Model;
|
|||||||
|
|
||||||
class FactoryVehicleDieselStockSummaryModel extends Model
|
class FactoryVehicleDieselStockSummaryModel extends Model
|
||||||
{
|
{
|
||||||
protected $table = 't_factoryVehicleDieselStockSummary';
|
protected $table = 't_factoryvehicledieselstocksummary';
|
||||||
protected $primaryKey = 'id';
|
protected $primaryKey = 'id';
|
||||||
|
|
||||||
protected $allowedFields = [
|
protected $allowedFields = [
|
||||||
|
|||||||
49
app/Models/GasShortageModel.php
Normal file
49
app/Models/GasShortageModel.php
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use CodeIgniter\Model;
|
||||||
|
|
||||||
|
class GasShortageModel extends Model
|
||||||
|
{
|
||||||
|
protected $table = 't_gasShortageDetails';
|
||||||
|
protected $primaryKey = 'id';
|
||||||
|
protected $useAutoIncrement = true;
|
||||||
|
protected $returnType = 'array';
|
||||||
|
protected $useSoftDeletes = false;
|
||||||
|
protected $protectFields = true;
|
||||||
|
protected $allowedFields =
|
||||||
|
['fullCylinderDate','emptyCylinderDate','invoiceNo',
|
||||||
|
'cylinderNo','grossWeight','tareWeight','netWeight','actualWeight','shortage'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected bool $allowEmptyInserts = false;
|
||||||
|
protected bool $updateOnlyChanged = true;
|
||||||
|
|
||||||
|
protected array $casts = [];
|
||||||
|
protected array $castHandlers = [];
|
||||||
|
|
||||||
|
// Dates
|
||||||
|
protected $useTimestamps = false;
|
||||||
|
protected $dateFormat = 'datetime';
|
||||||
|
protected $createdField = 'created_at';
|
||||||
|
protected $updatedField = 'updated_at';
|
||||||
|
protected $deletedField = 'deleted_at';
|
||||||
|
|
||||||
|
// Validation
|
||||||
|
protected $validationRules = [];
|
||||||
|
protected $validationMessages = [];
|
||||||
|
protected $skipValidation = false;
|
||||||
|
protected $cleanValidationRules = true;
|
||||||
|
|
||||||
|
// Callbacks
|
||||||
|
protected $allowCallbacks = true;
|
||||||
|
protected $beforeInsert = [];
|
||||||
|
protected $afterInsert = [];
|
||||||
|
protected $beforeUpdate = [];
|
||||||
|
protected $afterUpdate = [];
|
||||||
|
protected $beforeFind = [];
|
||||||
|
protected $afterFind = [];
|
||||||
|
protected $beforeDelete = [];
|
||||||
|
protected $afterDelete = [];
|
||||||
|
}
|
||||||
@ -6,7 +6,7 @@ use CodeIgniter\Model;
|
|||||||
|
|
||||||
class GasStockModel extends Model
|
class GasStockModel extends Model
|
||||||
{
|
{
|
||||||
protected $table = 't_gasStockDetails';
|
protected $table = 't_gasstockdetails';
|
||||||
protected $primaryKey = 'id';
|
protected $primaryKey = 'id';
|
||||||
protected $useAutoIncrement = true;
|
protected $useAutoIncrement = true;
|
||||||
protected $returnType = 'array';
|
protected $returnType = 'array';
|
||||||
|
|||||||
@ -6,7 +6,7 @@ use CodeIgniter\Model;
|
|||||||
|
|
||||||
class IncomingSilicaSandDetailsModel extends Model
|
class IncomingSilicaSandDetailsModel extends Model
|
||||||
{
|
{
|
||||||
protected $table = 't_incomingSilicaSandDetails';
|
protected $table = 't_incomingsilicasanddetails';
|
||||||
protected $primaryKey = 'id';
|
protected $primaryKey = 'id';
|
||||||
protected $useAutoIncrement = true;
|
protected $useAutoIncrement = true;
|
||||||
protected $returnType = 'array';
|
protected $returnType = 'array';
|
||||||
|
|||||||
@ -554,8 +554,18 @@ class Inwardgateregister_model extends Model
|
|||||||
|
|
||||||
$builder = $this->db->table('t_igr_master igr')
|
$builder = $this->db->table('t_igr_master igr')
|
||||||
->distinct()
|
->distinct()
|
||||||
->select("igr.IGRNO,igr.*,igrd.*,MM.MaterialName,MM.UOM,sup.Address,sup.SupplierName,POM.ServiceDescription,POL.Quantity,POL.Rate,POM.POType,POM.IsOpenOrder,
|
->select("
|
||||||
POM.CapitalRange,POM.CapitalRange,st.CGST as service_cgst,st.SGST as service_sgst,st.IGST as service_igst,it.IGST as import_igst,rt.CGST as revenue_cgst,rt.SGST as revenue_sgst,rt.IGST as revenue_igst")
|
igr.IGRNO,igr.*,igrd.*,
|
||||||
|
MM.MaterialName,MM.UOM,
|
||||||
|
sup.Address,sup.SupplierName,
|
||||||
|
POL.Rate,
|
||||||
|
POM.ServiceDescription,POL.Quantity,POM.POType,POM.IsOpenOrder,
|
||||||
|
POM.CapitalRange,POM.CapitalRange,
|
||||||
|
st.CGST as service_cgst,st.SGST as service_sgst,st.IGST as service_igst,
|
||||||
|
it.IGST as import_igst,
|
||||||
|
rt.CGST as revenue_cgst,rt.SGST as revenue_sgst,rt.IGST as revenue_igst,
|
||||||
|
cd.ConfigValue As MaterialCategory")
|
||||||
|
|
||||||
->join('t_igr_details igrd', 'igrd.IGRNO = igr.IGRNO')
|
->join('t_igr_details igrd', 'igrd.IGRNO = igr.IGRNO')
|
||||||
->join('t_purchaseorder_master POM', 'igr.PONO = POM.PONO')
|
->join('t_purchaseorder_master POM', 'igr.PONO = POM.PONO')
|
||||||
->join('t_purchaseorder_lineitem POL', 'igr.PONO = POL.PONO and POL.MaterialCode=igrd.MaterialCode ')
|
->join('t_purchaseorder_lineitem POL', 'igr.PONO = POL.PONO and POL.MaterialCode=igrd.MaterialCode ')
|
||||||
@ -564,6 +574,7 @@ class Inwardgateregister_model extends Model
|
|||||||
->join('t_service_tax st', 'st.LineItemNo = POL.LineItemNo' , 'left')
|
->join('t_service_tax st', 'st.LineItemNo = POL.LineItemNo' , 'left')
|
||||||
->join('t_revenue_tax rt', 'rt.LineItemNo = POL.LineItemNo' , 'left')
|
->join('t_revenue_tax rt', 'rt.LineItemNo = POL.LineItemNo' , 'left')
|
||||||
->join('t_import_tax it', 'it.LineItemNo = POL.LineItemNo' , 'left')
|
->join('t_import_tax it', 'it.LineItemNo = POL.LineItemNo' , 'left')
|
||||||
|
->join('t_configdetails cd','cd.key = MM.Category','left')
|
||||||
->where('igr.IGRNO', $IGRNO);
|
->where('igr.IGRNO', $IGRNO);
|
||||||
|
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
@ -1191,7 +1202,7 @@ class Inwardgateregister_model extends Model
|
|||||||
igrMast.MaterialRcvdDate as materialRecievedDate,
|
igrMast.MaterialRcvdDate as materialRecievedDate,
|
||||||
igrMast.VehicleNo,
|
igrMast.VehicleNo,
|
||||||
supplierDetails.SupplierName,
|
supplierDetails.SupplierName,
|
||||||
materialMaster.Category as sandType ,
|
cd.ConfigValue as sandType ,
|
||||||
t_igr_details.QuantityAsPerInvoice as Qty,
|
t_igr_details.QuantityAsPerInvoice as Qty,
|
||||||
issd.*')
|
issd.*')
|
||||||
->whereIn('t_igr_details.MaterialCode', $materialCodes)
|
->whereIn('t_igr_details.MaterialCode', $materialCodes)
|
||||||
@ -1205,8 +1216,9 @@ class Inwardgateregister_model extends Model
|
|||||||
|
|
||||||
$builder->groupBy('t_igr_details.IGRNO, t_igr_details.MaterialCode')
|
$builder->groupBy('t_igr_details.IGRNO, t_igr_details.MaterialCode')
|
||||||
->join('t_igr_master igrMast', 'igrMast.IGRNO = t_igr_details.IGRNO')
|
->join('t_igr_master igrMast', 'igrMast.IGRNO = t_igr_details.IGRNO')
|
||||||
->join('t_incomingSilicaSandDetails issd','issd.igrNo_fk = t_igr_details.IGRNO AND issd.materialCode = t_igr_details.MaterialCode','left')
|
->join('t_incomingsilicasanddetails issd','issd.igrNo_fk = t_igr_details.IGRNO AND issd.materialCode = t_igr_details.MaterialCode','left')
|
||||||
->join('t_materialmaster materialMaster', 'materialMaster.MaterialCode = t_igr_details.MaterialCode')
|
->join('t_materialmaster materialMaster', 'materialMaster.MaterialCode = t_igr_details.MaterialCode')
|
||||||
|
->join('t_configdetails cd','cd.key = materialMaster.Category','left')
|
||||||
->join('t_purchaseorder_master poMaster', 'poMaster.PONO = igrMast.PONO', 'left')
|
->join('t_purchaseorder_master poMaster', 'poMaster.PONO = igrMast.PONO', 'left')
|
||||||
->join('t_supplierdetailsn supplierDetails', 'supplierDetails.SupplierID = poMaster.SupplierID', 'left')
|
->join('t_supplierdetailsn supplierDetails', 'supplierDetails.SupplierID = poMaster.SupplierID', 'left')
|
||||||
->orderBy('t_igr_details.CreatedDate', 'asc ');
|
->orderBy('t_igr_details.CreatedDate', 'asc ');
|
||||||
|
|||||||
@ -4,15 +4,15 @@ namespace App\Models;
|
|||||||
|
|
||||||
use CodeIgniter\Model;
|
use CodeIgniter\Model;
|
||||||
|
|
||||||
class TrpAbstractParticulars extends Model
|
class MonthWiseMachinesInStockModel extends Model
|
||||||
{
|
{
|
||||||
protected $table = 't_trp_abstract_particulars';
|
protected $table = 't_monthwisemachinesinstock';
|
||||||
protected $primaryKey = 'id';
|
protected $primaryKey = 'id';
|
||||||
protected $useAutoIncrement = true;
|
protected $useAutoIncrement = true;
|
||||||
protected $returnType = 'array';
|
protected $returnType = 'array';
|
||||||
protected $useSoftDeletes = false;
|
protected $useSoftDeletes = false;
|
||||||
protected $protectFields = true;
|
protected $protectFields = true;
|
||||||
protected $allowedFields = ['particular'];
|
protected $allowedFields = ['date','machine_id','machine_category'];
|
||||||
|
|
||||||
protected bool $allowEmptyInserts = false;
|
protected bool $allowEmptyInserts = false;
|
||||||
protected bool $updateOnlyChanged = true;
|
protected bool $updateOnlyChanged = true;
|
||||||
@ -4,15 +4,15 @@ namespace App\Models;
|
|||||||
|
|
||||||
use CodeIgniter\Model;
|
use CodeIgniter\Model;
|
||||||
|
|
||||||
class TrpAbstract extends Model
|
class MonthWiseMaterialInStockModel extends Model
|
||||||
{
|
{
|
||||||
protected $table = 't_trp_abstract';
|
protected $table = 't_monthwisematerialinstock';
|
||||||
protected $primaryKey = 'id';
|
protected $primaryKey = 'id';
|
||||||
protected $useAutoIncrement = true;
|
protected $useAutoIncrement = true;
|
||||||
protected $returnType = 'array';
|
protected $returnType = 'array';
|
||||||
protected $useSoftDeletes = false;
|
protected $useSoftDeletes = false;
|
||||||
protected $protectFields = true;
|
protected $protectFields = true;
|
||||||
protected $allowedFields = ['abs_opening_stock','abs_physical_stock','abs_remarks','abs_particular_id'];
|
protected $allowedFields = ['date','materialCode','stock_category'];
|
||||||
|
|
||||||
protected bool $allowEmptyInserts = false;
|
protected bool $allowEmptyInserts = false;
|
||||||
protected bool $updateOnlyChanged = true;
|
protected bool $updateOnlyChanged = true;
|
||||||
@ -172,11 +172,27 @@ class Payroll_model extends Model
|
|||||||
function getPayOn()
|
function getPayOn()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// For Employee - old
|
||||||
$builder = $this->db->table('t_monthly_pay_inputs')
|
$builder = $this->db->table('t_monthly_pay_inputs')
|
||||||
->select('DISTINCT(Month_Year)')
|
->select('DISTINCT(Month_Year)')
|
||||||
->orderBy("Month_Year", "desc");
|
->orderBy("Month_Year", "desc");
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
return $query->getResult();
|
$result1 = $query->getResult();
|
||||||
|
|
||||||
|
// For Driver - new
|
||||||
|
$builder = $this->db->table('t_driver_monthly_pay_inputs')
|
||||||
|
->select('DISTINCT(month_year) as Month_Year')
|
||||||
|
->orderBy("month_year", "desc");
|
||||||
|
$query = $builder->get();
|
||||||
|
$result2 = $query->getResult();
|
||||||
|
|
||||||
|
$result = array_merge($result1, $result2);
|
||||||
|
// removed duplicates - refer gpt - gpt solved
|
||||||
|
$unique = array_map("unserialize", array_unique(array_map("serialize", $result)));
|
||||||
|
return $unique;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getBankInfo($bank = "")
|
function getBankInfo($bank = "")
|
||||||
|
|||||||
@ -6,7 +6,7 @@ use CodeIgniter\Model;
|
|||||||
|
|
||||||
class PowerConsumptionDetails extends Model
|
class PowerConsumptionDetails extends Model
|
||||||
{
|
{
|
||||||
protected $table = 't_powerConsumptionDetails';
|
protected $table = 't_powerconsumptiondetails';
|
||||||
protected $primaryKey = 'id';
|
protected $primaryKey = 'id';
|
||||||
|
|
||||||
protected $allowedFields = [
|
protected $allowedFields = [
|
||||||
|
|||||||
@ -14,7 +14,7 @@ class Rawmaterialdetails_model extends Model
|
|||||||
* @param number $segment : This is pagination limit
|
* @param number $segment : This is pagination limit
|
||||||
* @return array $result : This is result
|
* @return array $result : This is result
|
||||||
*/
|
*/
|
||||||
function rawmaterialListing()
|
function rawmaterialListing($isActiveFilter)
|
||||||
{
|
{
|
||||||
|
|
||||||
$builder = $this->db->table('t_materialmaster')
|
$builder = $this->db->table('t_materialmaster')
|
||||||
@ -22,6 +22,7 @@ class Rawmaterialdetails_model extends Model
|
|||||||
->join('tbl_users as user', 'user.UserId = t_materialmaster.createdby', 'left')
|
->join('tbl_users as user', 'user.UserId = t_materialmaster.createdby', 'left')
|
||||||
->join('t_employee_details as emp', 'emp.EmpID = user.EmpID', 'left')
|
->join('t_employee_details as emp', 'emp.EmpID = user.EmpID', 'left')
|
||||||
->join('t_configdetails as cd', 'cd.Key = t_materialmaster.Category', 'left')
|
->join('t_configdetails as cd', 'cd.Key = t_materialmaster.Category', 'left')
|
||||||
|
->where('t_materialmaster.IsActive',$isActiveFilter)
|
||||||
->orderBy('CreatedDate','desc');
|
->orderBy('CreatedDate','desc');
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
$result = $query->getResult();
|
$result = $query->getResult();
|
||||||
@ -146,6 +147,10 @@ class Rawmaterialdetails_model extends Model
|
|||||||
|
|
||||||
$builder = $this->db->table('t_materialmaster')
|
$builder = $this->db->table('t_materialmaster')
|
||||||
->select('MaterialCode')
|
->select('MaterialCode')
|
||||||
|
|
||||||
|
/** Caution changing config key is posing risk to entire stock module * */
|
||||||
|
// 248 is the config detail key for silica sand
|
||||||
|
|
||||||
->where('Category', '248')
|
->where('Category', '248')
|
||||||
->orderBy('CreatedDate', 'desc');
|
->orderBy('CreatedDate', 'desc');
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
@ -158,6 +163,10 @@ class Rawmaterialdetails_model extends Model
|
|||||||
|
|
||||||
$builder = $this->db->table('t_materialmaster')
|
$builder = $this->db->table('t_materialmaster')
|
||||||
->select('MaterialCode')
|
->select('MaterialCode')
|
||||||
|
|
||||||
|
/** Caution changing config key is posing risk to entire stock module * */
|
||||||
|
// 328 is the config detail key for silica sand
|
||||||
|
|
||||||
->where('Category', '328')
|
->where('Category', '328')
|
||||||
->orderBy('CreatedDate', 'desc');
|
->orderBy('CreatedDate', 'desc');
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
|
|||||||
@ -387,9 +387,7 @@ class Requistion_model extends Model
|
|||||||
$this->db->transComplete(); // Complete transaction
|
$this->db->transComplete(); // Complete transaction
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$result = ($result) ? $result : false;
|
if ($affected_rows > 0) {
|
||||||
if ($result && $affected_rows > 0) {
|
|
||||||
|
|
||||||
$subQuery = 'SELECT ReqNo FROM t_requestion_master ORDER BY CreatedDate DESC LIMIT 1';
|
$subQuery = 'SELECT ReqNo FROM t_requestion_master ORDER BY CreatedDate DESC LIMIT 1';
|
||||||
$query = $this->db->query($subQuery);
|
$query = $this->db->query($subQuery);
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@ class Supplier_model extends Model
|
|||||||
* @param number $segment : This is pagination limit
|
* @param number $segment : This is pagination limit
|
||||||
* @return array $result : This is result
|
* @return array $result : This is result
|
||||||
*/
|
*/
|
||||||
function supplierlisting()
|
function supplierlisting($isActiveFilter)
|
||||||
{
|
{
|
||||||
|
|
||||||
$builder = $this->db->table('t_supplierdetailsn as BaseT')
|
$builder = $this->db->table('t_supplierdetailsn as BaseT')
|
||||||
@ -22,6 +22,7 @@ class Supplier_model extends Model
|
|||||||
->join('t_paymentterms as pmt', 'pmt.PaymentID = BaseT.PaymentID', 'left')
|
->join('t_paymentterms as pmt', 'pmt.PaymentID = BaseT.PaymentID', 'left')
|
||||||
->join('tbl_users as user', 'user.UserId = BaseT.createdby', 'left')
|
->join('tbl_users as user', 'user.UserId = BaseT.createdby', 'left')
|
||||||
->join('t_employee_details as emp', 'emp.EmpID = user.EmpID', 'left')
|
->join('t_employee_details as emp', 'emp.EmpID = user.EmpID', 'left')
|
||||||
|
->where('BaseT.IsActive',$isActiveFilter)
|
||||||
->orderBy('BaseT.CreatedOn', 'desc');
|
->orderBy('BaseT.CreatedOn', 'desc');
|
||||||
|
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
@ -224,13 +225,15 @@ class Supplier_model extends Model
|
|||||||
}
|
}
|
||||||
/*SUPPLIER */
|
/*SUPPLIER */
|
||||||
/** for transporter listing */
|
/** for transporter listing */
|
||||||
function transporterListing()
|
function transporterListing($isActiveFilter)
|
||||||
{
|
{
|
||||||
|
|
||||||
$builder = $this->db->table('t_transporter as t')
|
$builder = $this->db->table('t_transporter as t')
|
||||||
->select('t.id,t.name,t_employee_details.FirstName as FirstName,t.created_on,t.isactive')
|
->select('t.id,t.name,t_employee_details.FirstName as FirstName,t.created_on,t.isactive')
|
||||||
->join('tbl_users', 'tbl_users.userId = t.created_by')
|
->join('tbl_users', 'tbl_users.userId = t.created_by')
|
||||||
->join('t_employee_details', 't_employee_details.EmpID=tbl_users.EmpID')
|
->join('t_employee_details', 't_employee_details.EmpID=tbl_users.EmpID')
|
||||||
->orderBy('t.created_on', 'desc');
|
->where('t.isactive',$isActiveFilter);
|
||||||
|
$builder->orderBy('t.created_on', 'desc');
|
||||||
|
|
||||||
$query =$builder->get();
|
$query =$builder->get();
|
||||||
$result = $query->getResult();
|
$result = $query->getResult();
|
||||||
|
|||||||
73
app/Models/TrpAbstractModel.php
Normal file
73
app/Models/TrpAbstractModel.php
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use CodeIgniter\Model;
|
||||||
|
|
||||||
|
class TrpAbstractModel extends Model
|
||||||
|
{
|
||||||
|
protected $table = 't_trp_abstract';
|
||||||
|
protected $primaryKey = 'id';
|
||||||
|
protected $useAutoIncrement = true;
|
||||||
|
protected $returnType = 'array';
|
||||||
|
protected $useSoftDeletes = false;
|
||||||
|
protected $protectFields = true;
|
||||||
|
protected $allowedFields = [
|
||||||
|
'date','particulars','opening_stock','physical_stock','remarks'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected bool $allowEmptyInserts = false;
|
||||||
|
protected bool $updateOnlyChanged = true;
|
||||||
|
|
||||||
|
protected array $casts = [];
|
||||||
|
protected array $castHandlers = [];
|
||||||
|
|
||||||
|
// Dates
|
||||||
|
protected $useTimestamps = false;
|
||||||
|
protected $dateFormat = 'datetime';
|
||||||
|
protected $createdField = 'created_at';
|
||||||
|
protected $updatedField = 'updated_at';
|
||||||
|
protected $deletedField = 'deleted_at';
|
||||||
|
|
||||||
|
// Validation
|
||||||
|
protected $validationRules = [];
|
||||||
|
protected $validationMessages = [];
|
||||||
|
protected $skipValidation = false;
|
||||||
|
protected $cleanValidationRules = true;
|
||||||
|
|
||||||
|
// Callbacks
|
||||||
|
protected $allowCallbacks = true;
|
||||||
|
protected $beforeInsert = [];
|
||||||
|
protected $afterInsert = [];
|
||||||
|
protected $beforeUpdate = [];
|
||||||
|
protected $afterUpdate = [];
|
||||||
|
protected $beforeFind = [];
|
||||||
|
protected $afterFind = [];
|
||||||
|
protected $beforeDelete = [];
|
||||||
|
protected $afterDelete = [];
|
||||||
|
|
||||||
|
public function currentMonthTrpAbstract($startDate,$endDate){
|
||||||
|
|
||||||
|
$currentMonthTrpAbstract = $this->db->table('t_trp_abstract')
|
||||||
|
->where('date',$startDate)
|
||||||
|
->where('date',$endDate)
|
||||||
|
->get()
|
||||||
|
->getResultArray();
|
||||||
|
|
||||||
|
return $currentMonthTrpAbstract;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@ -60,12 +60,14 @@ class TrpProductionModel extends Model
|
|||||||
// Subquery definition
|
// Subquery definition
|
||||||
$subquery = $this->db->table('t_materialmaster')
|
$subquery = $this->db->table('t_materialmaster')
|
||||||
->select('materialCode')
|
->select('materialCode')
|
||||||
->where('Category' ,'waste core') //328 - is for waste core in config master
|
->where('Category' ,'328')
|
||||||
->get()
|
->get()
|
||||||
->getResultArray();
|
->getResultArray();
|
||||||
|
|
||||||
$materialCodes = array_column($subquery, 'materialCode'); // Extracts 'materialCode' values
|
$materialCodes = array_column($subquery, 'materialCode'); // Extracts 'materialCode' values
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// dd($this->db->getLastQuery());
|
// dd($this->db->getLastQuery());
|
||||||
|
|
||||||
// Convert the array of material codes to a comma-separated string
|
// Convert the array of material codes to a comma-separated string
|
||||||
|
|||||||
@ -15,14 +15,16 @@ class User_model extends Model
|
|||||||
* @param number $segment : This is pagination limit
|
* @param number $segment : This is pagination limit
|
||||||
* @return array $result : This is result
|
* @return array $result : This is result
|
||||||
*/
|
*/
|
||||||
function userListing()
|
function userListing($isDeleted)
|
||||||
{
|
{
|
||||||
$builder = $this->db->table('t_employee_details EMP')
|
$builder = $this->db->table('t_employee_details EMP')
|
||||||
->select('user.isDeleted,user.createdDtm,EMP.EmpID,EMP.FirstName,EMP.LastName,EMP.Designation,user.email as EmailId,EMP.ContactNumber,
|
->select('user.isDeleted,user.createdDtm,EMP.EmpID,EMP.FirstName,
|
||||||
|
EMP.LastName,EMP.Designation,user.email as EmailId,EMP.ContactNumber,
|
||||||
DEPT.DEPCode,DEPT.DepartmentName,role.role,user.userId')
|
DEPT.DEPCode,DEPT.DepartmentName,role.role,user.userId')
|
||||||
->join('t_departmentdetails DEPT', 'EMP.Departmentcode = DEPT.DEPCode')
|
->join('t_departmentdetails DEPT', 'EMP.Departmentcode = DEPT.DEPCode','left')
|
||||||
->join('tbl_users user', 'user.EmpID = EMP.EmpID')
|
->join('tbl_users user', 'user.EmpID = EMP.EmpID','left')
|
||||||
->join('tbl_roles role', 'user.roleId = role.roleId')
|
->join('tbl_roles role', 'user.roleId = role.roleId','left')
|
||||||
|
->where('user.isDeleted',$isDeleted)
|
||||||
->orderBy('user.createdDtm', 'desc');
|
->orderBy('user.createdDtm', 'desc');
|
||||||
|
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
|
|||||||
@ -20,7 +20,8 @@
|
|||||||
box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
|
box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
.save-btn, .cancel-btn {
|
.save-btn,
|
||||||
|
.cancel-btn {
|
||||||
border: none;
|
border: none;
|
||||||
background: none;
|
background: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@ -93,7 +94,9 @@
|
|||||||
// Hide the edit container and show the <a> tag
|
// Hide the edit container and show the <a> tag
|
||||||
$editContainer.hide();
|
$editContainer.hide();
|
||||||
$link.show();
|
$link.show();
|
||||||
});});</script>
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
<?php
|
<?php
|
||||||
$insuranceStatus = array(
|
$insuranceStatus = array(
|
||||||
array("name" => "NO", "value" => "0"),
|
array("name" => "NO", "value" => "0"),
|
||||||
@ -148,6 +151,7 @@ if (!empty($MaxPODate)) {
|
|||||||
$MaxPoDate = $date->PODate;
|
$MaxPoDate = $date->PODate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($POMaster)) {
|
if (!empty($POMaster)) {
|
||||||
|
|
||||||
foreach ($POMaster as $Req) {
|
foreach ($POMaster as $Req) {
|
||||||
@ -279,8 +283,6 @@ if (!empty($getlogpodtl)) {
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$('#otherdescription').hide();
|
$('#otherdescription').hide();
|
||||||
var insuranceOpt = '<?php echo $InsuranceOptions; ?>';
|
var insuranceOpt = '<?php echo $InsuranceOptions; ?>';
|
||||||
@ -388,6 +390,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var RequistQuantity = '';
|
var RequistQuantity = '';
|
||||||
var AvilBudAmt = '';
|
var AvilBudAmt = '';
|
||||||
@ -482,8 +485,6 @@ if (!empty($getlogpodtl)) {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('#MaterialCode').change(function() {
|
$('#MaterialCode').change(function() {
|
||||||
var id = $('#MaterialCode').val();
|
var id = $('#MaterialCode').val();
|
||||||
RequistQuantity = '';
|
RequistQuantity = '';
|
||||||
@ -500,6 +501,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
$("#ItemName").val(obj.MaterialName);
|
$("#ItemName").val(obj.MaterialName);
|
||||||
$("#UOM").val(obj.UOM);
|
$("#UOM").val(obj.UOM);
|
||||||
$("#Quantity").val(obj.Quantity);
|
$("#Quantity").val(obj.Quantity);
|
||||||
|
$("#Rate").val(obj.material_rate);
|
||||||
RequistQuantity = obj.Quantity;
|
RequistQuantity = obj.Quantity;
|
||||||
|
|
||||||
var materialn = obj.MaterialName;
|
var materialn = obj.MaterialName;
|
||||||
@ -510,6 +512,10 @@ if (!empty($getlogpodtl)) {
|
|||||||
$('#OtheritemDescription').val(obj.MaterialDescription);
|
$('#OtheritemDescription').val(obj.MaterialDescription);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (obj.material_rate != 0) {
|
||||||
|
Ratechange();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -536,6 +542,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#EditMaterialCode').change(function() {
|
$('#EditMaterialCode').change(function() {
|
||||||
|
|
||||||
var id = $('#EditMaterialCode').val();
|
var id = $('#EditMaterialCode').val();
|
||||||
@ -844,6 +851,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
RequistQuantity = '';
|
RequistQuantity = '';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$("#PaymentTerms").select2();
|
$("#PaymentTerms").select2();
|
||||||
|
|
||||||
@ -859,6 +867,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.num {
|
.num {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
@ -908,6 +917,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- end page title -->
|
<!-- end page title -->
|
||||||
|
|
||||||
<!-- Form row -->
|
<!-- Form row -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@ -1035,7 +1045,6 @@ if (!empty($getlogpodtl)) {
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
@ -1274,10 +1283,9 @@ if (!empty($getlogpodtl)) {
|
|||||||
<td style="text-align:left !important;"><?php echo $index; ?></td>
|
<td style="text-align:left !important;"><?php echo $index; ?></td>
|
||||||
<td style="text-align:center !important;"><?php echo $record->ReqNo ?></td>
|
<td style="text-align:center !important;"><?php echo $record->ReqNo ?></td>
|
||||||
<td style="text-align:left !important;"><?php echo $record->MaterialCode ?></td>
|
<td style="text-align:left !important;"><?php echo $record->MaterialCode ?></td>
|
||||||
<td style="text-align:left !important;">
|
<td style="text-align:left !important;"><?php $shortName = mb_strimwidth($record->MaterialName, 0, 13, "...");
|
||||||
<?php $shortName = mb_strimwidth($record->MaterialName, 0, 13, "...");
|
|
||||||
echo $shortName; ?></td>
|
echo $shortName; ?></td>
|
||||||
<?php if ($PONOStatus === PO_DRAFT || $PONOStatus === PO_CREATED) { ?>
|
<td style="text-align:left !important;"><?php if ($PONOStatus === PO_DRAFT || $PONOStatus === PO_CREATED) { ?>
|
||||||
<a href="#"
|
<a href="#"
|
||||||
class="editable-field"
|
class="editable-field"
|
||||||
data-id="<?php echo $index ?>" data-notes="<?php echo $record->LineitemAuditorNotes; ?>">
|
data-id="<?php echo $index ?>" data-notes="<?php echo $record->LineitemAuditorNotes; ?>">
|
||||||
@ -1288,7 +1296,9 @@ if (!empty($getlogpodtl)) {
|
|||||||
<button class="save-btn">✔</button>
|
<button class="save-btn">✔</button>
|
||||||
<button class="cancel-btn">✖</button>
|
<button class="cancel-btn">✖</button>
|
||||||
</div>
|
</div>
|
||||||
<?php }else{ echo !empty($record->LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-"; } ?>
|
<?php } else {
|
||||||
|
echo !empty($record->LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-";
|
||||||
|
} ?>
|
||||||
</td>
|
</td>
|
||||||
<td style="text-align:left !important;"><?php echo $record->Quantity ?></td>
|
<td style="text-align:left !important;"><?php echo $record->Quantity ?></td>
|
||||||
<td><?php echo $record->UOM ?></td>
|
<td><?php echo $record->UOM ?></td>
|
||||||
@ -1596,8 +1606,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
<?php } else {
|
<?php } else {} ?>
|
||||||
} ?>
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -1699,10 +1708,10 @@ if (!empty($getlogpodtl)) {
|
|||||||
</div> <!-- end card body-->
|
</div> <!-- end card body-->
|
||||||
</div> <!-- end card -->
|
</div> <!-- end card -->
|
||||||
</div><!-- end col-->
|
</div><!-- end col-->
|
||||||
</div>
|
</div><!-- end form row -->
|
||||||
</div> <!-- container -->
|
</div> <!-- end container-fluid -->
|
||||||
</div> <!-- content -->
|
</div> <!-- end content -->
|
||||||
</div>
|
</div><!-- end content-page -->
|
||||||
<!-- Model for servicepo -->
|
<!-- Model for servicepo -->
|
||||||
<div id="SERVICE" class="modal fade" tabindex="-1" role="dialog"
|
<div id="SERVICE" class="modal fade" tabindex="-1" role="dialog"
|
||||||
aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
|
aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
|
||||||
@ -2630,7 +2639,9 @@ if (!empty($getlogpodtl)) {
|
|||||||
<button class="save-btn">✔</button>
|
<button class="save-btn">✔</button>
|
||||||
<button class="cancel-btn">✖</button>
|
<button class="cancel-btn">✖</button>
|
||||||
</div></td>`;
|
</div></td>`;
|
||||||
}else{ rowHtml += `<td>-</td>`; }
|
} else {
|
||||||
|
rowHtml += `<td>-</td>`;
|
||||||
|
}
|
||||||
rowHtml += `<td align="right">${quantity}</td>
|
rowHtml += `<td align="right">${quantity}</td>
|
||||||
<td align="left">${uom}</td>
|
<td align="left">${uom}</td>
|
||||||
<td align="right">${itemRate}</td>
|
<td align="right">${itemRate}</td>
|
||||||
@ -2816,7 +2827,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
|
|
||||||
function populateValueMainFormForEditServiceTax() {
|
function populateValueMainFormForEditServiceTax() {
|
||||||
|
|
||||||
var rows = document.getElementById('ServiceTable').rows.length;
|
var rows = $('#ServiceTable tbody tr').length;
|
||||||
// alert(rows);
|
// alert(rows);
|
||||||
var editrow = parseFloat(rows) - 1;
|
var editrow = parseFloat(rows) - 1;
|
||||||
var TotCgst = 0;
|
var TotCgst = 0;
|
||||||
@ -3168,12 +3179,10 @@ if (!empty($getlogpodtl)) {
|
|||||||
|
|
||||||
|
|
||||||
if (serviceValidate()) {
|
if (serviceValidate()) {
|
||||||
// if (document.getElementById('ServiceTable').rows.length < 2)
|
if (document.getElementById('ServiceTable').rows.length < 2) {
|
||||||
// {
|
alert('Atleast One Line needed');
|
||||||
// alert('Please Select Line item to Create PO');
|
return false;
|
||||||
// $('#Deliverydt').focus();
|
}
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// else if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) {
|
// else if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) {
|
||||||
// alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
// alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||||
// return false;
|
// return false;
|
||||||
@ -3182,15 +3191,15 @@ if (!empty($getlogpodtl)) {
|
|||||||
// alert('Please Enter Payable Terms');
|
// alert('Please Enter Payable Terms');
|
||||||
// $('#Otherpayment').focus();
|
// $('#Otherpayment').focus();
|
||||||
// return false;
|
// return false;
|
||||||
// } else if ($('#editdescofpo').val().trim() == '') {
|
else if ($('#editdescofpo').val().trim() == '') {
|
||||||
// alert('Please Enter Description Of Service');
|
alert('Please Enter Description Of Service');
|
||||||
// $('#editdescofpo').focus();
|
$('#editdescofpo').focus();
|
||||||
// return false;
|
return false;
|
||||||
// } else {
|
} else {
|
||||||
// $('#content').loader('show');
|
// $('#content').loader('show');
|
||||||
var formData = new FormData($('.ServicePO')[0]);
|
var formData = new FormData($('.ServicePO')[0]);
|
||||||
$('#loader').show();
|
$('#loader').show();
|
||||||
disableButtons();
|
// disableButtons();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
// data: $('.ServicePO').serialize(),
|
// data: $('.ServicePO').serialize(),
|
||||||
type: "POST",
|
type: "POST",
|
||||||
@ -3218,10 +3227,10 @@ if (!empty($getlogpodtl)) {
|
|||||||
$('#SpcialInstruction').val('');
|
$('#SpcialInstruction').val('');
|
||||||
$('#txtDeliveryAddress').val('')
|
$('#txtDeliveryAddress').val('')
|
||||||
window.location = "purchaseorderListing";
|
window.location = "purchaseorderListing";
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
} else {
|
} else {
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
alert("Error");
|
alert("Error");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3229,11 +3238,11 @@ if (!empty($getlogpodtl)) {
|
|||||||
error: function(jqXHR, textStatus, errorThrown) {
|
error: function(jqXHR, textStatus, errorThrown) {
|
||||||
console.error("AJAX Error: " + textStatus + ": " + errorThrown);
|
console.error("AJAX Error: " + textStatus + ": " + errorThrown);
|
||||||
alert("Error: " + textStatus);
|
alert("Error: " + textStatus);
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
// }
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3256,9 +3265,6 @@ if (!empty($getlogpodtl)) {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function calculateCgstTax(varBasicValue, Cgst) {
|
function calculateCgstTax(varBasicValue, Cgst) {
|
||||||
|
|
||||||
var basicValue = parseFloat(varBasicValue);
|
var basicValue = parseFloat(varBasicValue);
|
||||||
@ -3339,7 +3345,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
AvlBudAmt = '<?php echo number_format($AvlAmount + $TotalBasicAmount, 2, '.', '') ?>';
|
AvlBudAmt = '<?php echo number_format($AvlAmount + $TotalBasicAmount, 2, '.', '') ?>';
|
||||||
|
|
||||||
//ServiceTable
|
//ServiceTable
|
||||||
var rows = document.getElementById('ServiceTable').rows.length;
|
var rows = $('#ServiceTable tbody tr').length;
|
||||||
|
|
||||||
if (DeletedMaterialCode != undefined && DeletedMaterialCode != '') {
|
if (DeletedMaterialCode != undefined && DeletedMaterialCode != '') {
|
||||||
|
|
||||||
@ -3430,6 +3436,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
id = '';
|
id = '';
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$("#EDITSERVICE").on("shown.bs.modal", function(e) {
|
$("#EDITSERVICE").on("shown.bs.modal", function(e) {
|
||||||
|
|
||||||
@ -3644,6 +3651,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#insuranceStatus").change(function() {
|
$("#insuranceStatus").change(function() {
|
||||||
var InsNo = '<?php echo $InsuranceNumber; ?>';
|
var InsNo = '<?php echo $InsuranceNumber; ?>';
|
||||||
|
|
||||||
@ -3656,11 +3664,6 @@ if (!empty($getlogpodtl)) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function splpoupdate() {
|
function splpoupdate() {
|
||||||
// alert();
|
// alert();
|
||||||
var formData = new FormData();
|
var formData = new FormData();
|
||||||
@ -3713,8 +3716,6 @@ if (!empty($getlogpodtl)) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function filecheck() {
|
function filecheck() {
|
||||||
var sizef = document.getElementById('imag').files[0].size;
|
var sizef = document.getElementById('imag').files[0].size;
|
||||||
var file = $('#imag').val();
|
var file = $('#imag').val();
|
||||||
@ -3765,10 +3766,6 @@ if (!empty($getlogpodtl)) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var counter = 0;
|
var counter = 0;
|
||||||
var counterConstant = 0;
|
var counterConstant = 0;
|
||||||
|
|
||||||
@ -3813,10 +3810,6 @@ if (!empty($getlogpodtl)) {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function addRow() {
|
function addRow() {
|
||||||
//alert();
|
//alert();
|
||||||
|
|
||||||
@ -3856,8 +3849,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
$("#maint_filename" + number).val(name);
|
$("#maint_filename" + number).val(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
|
||||||
<script>
|
|
||||||
$('#IsOpenOrder').change(function() {
|
$('#IsOpenOrder').change(function() {
|
||||||
if (this.checked) {
|
if (this.checked) {
|
||||||
$('#ServiceQuantity').val(0);
|
$('#ServiceQuantity').val(0);
|
||||||
|
|||||||
@ -102,7 +102,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label for="Quantity">Purchase Date<span style="color:red">*</span></label>
|
<label for="Quantity">Purchase Date<span style="color:red">*</span></label>
|
||||||
<input id="DateOfPurchase" name="DateOfPurchase" onkeypress="return false;" maxlength="10" class="form-control" value="<?php echo isset($_POST['DateOfPurchase']) ? $_POST['DateOfPurchase'] : '' ?>">
|
<input id="DateOfPurchase" name="DateOfPurchase" onkeypress="return false;" maxlength="10" class="form-control" value="<?php echo isset($_POST['DateOfPurchase']) ? $_POST['DateOfPurchase'] : '' ?>" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label for="SupplierName">Supplier Name</label>
|
<label for="SupplierName">Supplier Name</label>
|
||||||
@ -355,6 +355,13 @@
|
|||||||
$("#User").focus();
|
$("#User").focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($('#DateOfPurchase').val().length < 1) {
|
||||||
|
alert('Please Enter the purchase date');
|
||||||
|
$("#DateOfPurchase").focus();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if ($('#Location').val().length < 1) {
|
if ($('#Location').val().length < 1) {
|
||||||
alert('Please Enter the Asset Location');
|
alert('Please Enter the Asset Location');
|
||||||
$("#Location").focus();
|
$("#Location").focus();
|
||||||
|
|||||||
@ -244,8 +244,7 @@
|
|||||||
|
|
||||||
$('#ConfigValue').show();
|
$('#ConfigValue').show();
|
||||||
var temp = index;
|
var temp = index;
|
||||||
var ConfigValue = $("#ConfigValue").val();
|
var ConfigValue = $.trim($("#ConfigValue").val());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('#ConfigValue').val('');
|
$('#ConfigValue').val('');
|
||||||
|
|||||||
@ -115,6 +115,12 @@
|
|||||||
let departmentName = $("#DepartmentName").val().trim();
|
let departmentName = $("#DepartmentName").val().trim();
|
||||||
let headDepCode =$("#HeadDept").val()??'';
|
let headDepCode =$("#HeadDept").val()??'';
|
||||||
let depCode =$("#DEPCode").val() ?? '';
|
let depCode =$("#DEPCode").val() ?? '';
|
||||||
|
|
||||||
|
if(departmentName.length<1){
|
||||||
|
alert(`Department Name cannot be empty..!!`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#loader').show();
|
$('#loader').show();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:"POST",
|
type:"POST",
|
||||||
|
|||||||
@ -1838,9 +1838,17 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
function showsubmit() {
|
function showsubmit() {
|
||||||
var isChecked = $('#IsOpenOrder').is(':checked');
|
var isChecked = $('#IsOpenOrder').is(':checked');
|
||||||
// alert("isChecked: " + isChecked);
|
console.log("Step 1 = SS");
|
||||||
var PO = $('#POType').val();
|
var PO = $('#POType').val();
|
||||||
|
|
||||||
|
if (PO == 'SERVICE') {
|
||||||
|
if ($('#emergdescofpo').val().trim() == '') {
|
||||||
|
alert('Please Enter Description Of Service');
|
||||||
|
$('#emergdescofpo').focus();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
if (PO == 'REVENUE') {
|
if (PO == 'REVENUE') {
|
||||||
//alert('normalemergency');
|
//alert('normalemergency');
|
||||||
@ -1876,6 +1884,28 @@ if (!empty($INRSYMBOL)) {
|
|||||||
alert('Please Select the Supplier details');
|
alert('Please Select the Supplier details');
|
||||||
$('#drpSupplier').focus();
|
$('#drpSupplier').focus();
|
||||||
return false;
|
return false;
|
||||||
|
} else if (input == 'REVENUE' && $('#Deliverydate').val() == '' && radioValue == 0) {
|
||||||
|
alert('Please Select the Delivery Date');
|
||||||
|
$('#Deliverydate').focus();
|
||||||
|
return false;
|
||||||
|
} else if (input == 'REVENUE' && $('#Scheduleby').val().trim() == '' && radioValue == 1) {
|
||||||
|
alert('Please Enter the Schedule By');
|
||||||
|
$('#Scheduleby').focus();
|
||||||
|
return false;
|
||||||
|
} else if (input == 'SERVICE' && $('#Deliverydate').val() == '' && radioValue == 0) {
|
||||||
|
alert('Please Select the Delivery Date');
|
||||||
|
$('#Deliverydate').focus();
|
||||||
|
return false;
|
||||||
|
} else if (input == 'SERVICE' && $('#Scheduleby').val().trim() == '' && radioValue == 1) {
|
||||||
|
alert('Please Enter the Schedule By');
|
||||||
|
$('#Scheduleby').focus();
|
||||||
|
return false;
|
||||||
|
} else if ($('#DepartmentName').val() == "0") {
|
||||||
|
alert('Please Select Department Name ')
|
||||||
|
return false;
|
||||||
|
} else if ($('#CostCenterName').val() == "0") {
|
||||||
|
alert('Please Select Cost Center Name ')
|
||||||
|
return false;
|
||||||
} else if ($('#PoTypeOptions').val() == "0") {
|
} else if ($('#PoTypeOptions').val() == "0") {
|
||||||
|
|
||||||
if ($('#purpose').val() == "REVENUE") {
|
if ($('#purpose').val() == "REVENUE") {
|
||||||
@ -1891,40 +1921,19 @@ if (!empty($INRSYMBOL)) {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}else if ($('#Otherpayment').val() == '' && $('#PaymentTerms').val() == 'PT08') {
|
||||||
|
alert('Please Enter Payable Terms Description');
|
||||||
} else if ($('#DepartmentName').val() == "0") {
|
$('#Otherpayment').focus();
|
||||||
alert('Please Select Department Name ')
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}else if($('#insuranceStatus').val() == "1" && $('#InsuranceNumber').val().trim() == ''){
|
||||||
else if ($('#CostCenterName').val() == "0") {
|
alert('Please Enter the Insurance No / Insurance Details');
|
||||||
alert('Please Select Cost Center Name ')
|
$('#InsuranceNumber').focus();
|
||||||
}
|
return false;
|
||||||
|
}else if ($('#BudgetType').val() == "0") {
|
||||||
|
|
||||||
|
|
||||||
else if ($('#BudgetType').val() == "0") {
|
|
||||||
alert('Please Select Budget Type');
|
alert('Please Select Budget Type');
|
||||||
$('#BudgetType').focus();
|
$('#BudgetType').focus();
|
||||||
return false;
|
return false;
|
||||||
|
} else {
|
||||||
} else if (input == 'REVENUE' && $('#Deliverydate').val() == '' && radioValue == 0) {
|
|
||||||
alert('Please Select the Delivery Date');
|
|
||||||
$('#Deliverydate').focus();
|
|
||||||
return false;
|
|
||||||
} else if (input == 'REVENUE' && $('#Scheduleby').val().trim() == '' && radioValue == 1) {
|
|
||||||
alert('Please Enter the Schedule By');
|
|
||||||
$('#Scheduleby').focus();
|
|
||||||
return false;
|
|
||||||
|
|
||||||
}
|
|
||||||
else if ($('#Otherpayment').length > 0 && $('#Otherpayment').is(':visible') && $('#Otherpayment').val() == '') {
|
|
||||||
|
|
||||||
alert('Please Enter the Description of payable terms');
|
|
||||||
$('#Otherpayment').focus();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$("#" + input).modal('show');
|
$("#" + input).modal('show');
|
||||||
$('#isEdit').val(0);
|
$('#isEdit').val(0);
|
||||||
if (StateTaxCheck == "0") {
|
if (StateTaxCheck == "0") {
|
||||||
@ -2634,21 +2643,21 @@ if (!empty($INRSYMBOL)) {
|
|||||||
<label>Purchase Order Date</label>
|
<label>Purchase Order Date</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
|
// $poDt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||||
$poDt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
// $formattedDate = $poDt->format('d-m-Y');
|
||||||
$formattedDate = $poDt->format('Y-m-d');
|
// $data = array(
|
||||||
$data = array(
|
// 'type' => 'text',
|
||||||
'type' => 'date',
|
// 'name' => 'PODate',
|
||||||
'name' => 'PODate',
|
// 'value' => set_value('PODate', $formattedDate),
|
||||||
'value' => set_value('PODate', $formattedDate),
|
// 'min' => $formattedDate,
|
||||||
'min' => $formattedDate,
|
// 'id' => 'PODate',
|
||||||
'id' => 'PODate',
|
// 'class' => 'form-control num',
|
||||||
'class' => 'form-control',
|
// 'required' => 'true',
|
||||||
'required' => 'true',
|
// 'onkeypress' => 'return false;'
|
||||||
'onkeypress' => 'return false;'
|
// );
|
||||||
);
|
// echo form_input($data);
|
||||||
echo form_input($data);
|
|
||||||
?>
|
?>
|
||||||
|
<input class="form-control num" data-provide="datepicker" data-date-format="dd-mm-yyyy" data-date-autoclose="true" id="PODate" name="PODate" data-date-start-date="<?= date('d-m-Y'); ?>" required autocomplete="off" value="<?= date('d-m-Y'); ?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
@ -6334,6 +6343,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
$("#PaymentMethod").trigger('change');
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
@ -6405,6 +6415,18 @@ if (!empty($INRSYMBOL)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//If others is the payment terms to display mandatory field
|
||||||
|
$("#PaymentMethod").change(function () {
|
||||||
|
|
||||||
|
if ($('#PaymentMethod').val().trim() == 'PT08') {
|
||||||
|
$('#otheroptiondiv').show();
|
||||||
|
} else {
|
||||||
|
$('#otheroptiondiv').hide();
|
||||||
|
$('#Otherpayment').val('');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
/*get cost center name using department*/
|
/*get cost center name using department*/
|
||||||
var CostArray = '';
|
var CostArray = '';
|
||||||
$('#DepartmentName').change(function () {
|
$('#DepartmentName').change(function () {
|
||||||
@ -7239,27 +7261,27 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
|
|
||||||
// Perform form validation
|
// Perform form validation
|
||||||
if (serviceValidate()) {
|
if (validate()) {
|
||||||
// if (document.getElementById('serviceTax').rows.length < 2) {
|
if (document.getElementById('serviceTax').rows.length < 2) {
|
||||||
// alert('Please Select Line item to Create PO');
|
alert('Please Select Line item to Create PO');
|
||||||
// $('#Deliverydt').focus();
|
$('#Deliverydt').focus();
|
||||||
// return false;
|
return false;
|
||||||
// } else if ($('#Otherpayment').val() == '' && $('#PaymentMethod').val() == 'PT08') {
|
} else if ($('#Otherpayment').val() == '' && $('#PaymentMethod').val() == 'PT08') {
|
||||||
// alert('Please Enter Other Payable Terms Description');
|
alert('Please Enter Other Payable Terms Description');
|
||||||
// $('#Otherpayment').focus();
|
$('#Otherpayment').focus();
|
||||||
// return false;
|
return false;
|
||||||
// } else if ($('#emergdescofpo').val().trim() == '') {
|
} else if ($('#emergdescofpo').val().trim() == '') {
|
||||||
// alert('Please Enter Description Of Service');
|
alert('Please Enter Description Of Service');
|
||||||
// $('#emergdescofpo').focus();
|
$('#emergdescofpo').focus();
|
||||||
// return false;
|
return false;
|
||||||
// } else if ($('#PoTypeOptions').val() == "0") {
|
} else if ($('#PoTypeOptions').val() == "0") {
|
||||||
// alert('Please Select POType');
|
alert('Please Select POType');
|
||||||
// $('#PoTypeOptions').focus();
|
$('#PoTypeOptions').focus();
|
||||||
// return false;
|
return false;
|
||||||
// } else {
|
} else {
|
||||||
// Submit the form using AJAX
|
// Submit the form using AJAX
|
||||||
$('#loader').show();
|
$('#loader').show();
|
||||||
disableButtons();
|
// disableButtons();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "<?php echo base_url() ?>emergencypurchaseorder/addNewServicePurchaseOrder",
|
url: "<?php echo base_url() ?>emergencypurchaseorder/addNewServicePurchaseOrder",
|
||||||
type: "POST",
|
type: "POST",
|
||||||
@ -7278,16 +7300,16 @@ if (!empty($INRSYMBOL)) {
|
|||||||
$('#SpcialInstruction').val('');
|
$('#SpcialInstruction').val('');
|
||||||
$('#txtDeliveryAddress').val('');
|
$('#txtDeliveryAddress').val('');
|
||||||
window.location = "purchaseorderListing";
|
window.location = "purchaseorderListing";
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
},
|
},
|
||||||
error: function (xhr, status, error) {
|
error: function (xhr, status, error) {
|
||||||
// Handle errors
|
// Handle errors
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
alert("Error: " + error);
|
alert("Error: " + error);
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7353,23 +7375,23 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
|
|
||||||
// Perform form validation
|
// Perform form validation
|
||||||
if (revenueValidate()) {
|
if (validate()) {
|
||||||
// if (document.getElementById('serviceTax').rows.length < 2) {
|
if (document.getElementById('serviceTax').rows.length < 2) {
|
||||||
// alert('Please Select Line item to Create PO');
|
alert('Please Select Line item to Create PO');
|
||||||
// $('#Deliverydt').focus();
|
$('#Deliverydt').focus();
|
||||||
// return false;
|
return false;
|
||||||
// } else if ($('#insuranceStatus').val() == 'YES' && $('#InsuranceNumber').val() == '') {
|
} else if ($('#insuranceStatus').val() == 'YES' && $('#InsuranceNumber').val() == '') {
|
||||||
// alert('Please Enter Insurance Number..!');
|
alert('Please Enter Insurance Number..!');
|
||||||
|
|
||||||
// return false;
|
return false;
|
||||||
// } else if ($('#PaymentMethod').val() == 'PT08' && $('#Otherpayment').val() == '') {
|
} else if ($('#PaymentMethod').val() == 'PT08' && $('#Otherpayment').val() == '') {
|
||||||
// alert('Please Enter Other Payment Description..!');
|
alert('Please Enter Other Payment Description..!');
|
||||||
|
|
||||||
// return false;
|
return false;
|
||||||
// } else {
|
} else {
|
||||||
// Submit the form using AJAX
|
// Submit the form using AJAX
|
||||||
$('#loader').show();
|
$('#loader').show();
|
||||||
disableButtons();
|
// disableButtons();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "<?php echo base_url() ?>emergencypurchaseorder/addNewRevenuePurchaseOrder",
|
url: "<?php echo base_url() ?>emergencypurchaseorder/addNewRevenuePurchaseOrder",
|
||||||
type: "POST",
|
type: "POST",
|
||||||
@ -7384,15 +7406,15 @@ if (!empty($INRSYMBOL)) {
|
|||||||
$('#SpcialInstruction').val('');
|
$('#SpcialInstruction').val('');
|
||||||
$('#txtDeliveryAddress').val('');
|
$('#txtDeliveryAddress').val('');
|
||||||
window.location = "purchaseorderListing";
|
window.location = "purchaseorderListing";
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
},
|
},
|
||||||
error: function (xhr, status, error) {
|
error: function (xhr, status, error) {
|
||||||
// Handle errors
|
// Handle errors
|
||||||
alert("Error: " + error);
|
alert("Error: " + error);
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8017,17 +8039,6 @@ if (!empty($INRSYMBOL)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//If others is the payment terms to display mandatory field
|
|
||||||
$("#PaymentMethod").change(function () {
|
|
||||||
|
|
||||||
if ($('#PaymentMethod').val().trim() == 'PT08') {
|
|
||||||
$('#otheroptiondiv').show();
|
|
||||||
} else {
|
|
||||||
$('#otheroptiondiv').hide();
|
|
||||||
$('#Otherpayment').val('');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// set default null value
|
// set default null value
|
||||||
function clearTotalItemValues() {
|
function clearTotalItemValues() {
|
||||||
|
|
||||||
|
|||||||
@ -79,22 +79,30 @@
|
|||||||
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button"
|
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button"
|
||||||
id="resetButton" title="Reset"></i>
|
id="resetButton" title="Reset"></i>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="error" id="error"></div>
|
||||||
|
</form>
|
||||||
|
|
||||||
<div style="margin-left:auto">
|
<div style="margin-left:auto">
|
||||||
<div class="form-check" style="margin-right: 25px;">
|
<div class="form-check" style="margin-right: 25px;">
|
||||||
|
<form id="archiveFormId" action="<?php echo base_url()?>/assetListing" method="post">
|
||||||
<input class="form-check-input" type="checkbox" id="showArchiveId"
|
<input class="form-check-input" type="checkbox" id="showArchiveId"
|
||||||
name="showArchive" value="1" onchange="showArchiveList()"
|
name="showArchive" value="1" <?php echo $showArchive ? "checked" : " " ?>
|
||||||
style="width: 18px; height: 18px;">
|
style="width: 18px; height: 18px;">
|
||||||
<label class="form-check-label" for="showArchiveId"
|
<label class="form-check-label" for="showArchiveId"
|
||||||
style="font-size: 1rem; margin-left: 8px;">
|
style="font-size: 1rem; margin-left: 8px;">
|
||||||
Show Archive
|
Show Archive
|
||||||
</label>
|
</label>
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="error" id="error"></div>
|
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="card-body" style="overflow-x:scroll;">
|
<div class="card-body" style="overflow-x:scroll;">
|
||||||
|
|
||||||
<table class="table dt-responsive nowrap w-100" id="asset_list_table">
|
<table class="table dt-responsive nowrap w-100" id="asset_list_table">
|
||||||
@ -121,12 +129,7 @@
|
|||||||
if (!empty($userRecords)) {
|
if (!empty($userRecords)) {
|
||||||
foreach ($userRecords as $record) {
|
foreach ($userRecords as $record) {
|
||||||
?>
|
?>
|
||||||
<tr class="<?php if ($record->IsActive == 0) {
|
<tr>
|
||||||
echo "deactivatedRow";
|
|
||||||
} ?>"
|
|
||||||
style="<?php if ($record->IsActive == 0) {
|
|
||||||
echo "display:none";
|
|
||||||
} ?>">
|
|
||||||
|
|
||||||
<?php if (date('d-m-Y', strtotime($record->CreatedDt)) == "30-11--0001") {
|
<?php if (date('d-m-Y', strtotime($record->CreatedDt)) == "30-11--0001") {
|
||||||
$cdate = '00-00-0000';
|
$cdate = '00-00-0000';
|
||||||
@ -150,7 +153,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<?php if ($record->IsActive == 0) { ?>
|
<?php if ($record->IsActive == 0) { ?>
|
||||||
|
|
||||||
<a onclick="confirmReActivatingAsset()"
|
<a onclick="confirmReActivatingAsset(event)"
|
||||||
href="<?php echo base_url() . 'assetdetails/reActivateAsset/?AssetID=' . $record->AssetCode ?>"
|
href="<?php echo base_url() . 'assetdetails/reActivateAsset/?AssetID=' . $record->AssetCode ?>"
|
||||||
data-toggle="tooltip"
|
data-toggle="tooltip"
|
||||||
title="<?php echo $record->AssetCode; ?> - Click here to Re-Activate Asset Details">
|
title="<?php echo $record->AssetCode; ?> - Click here to Re-Activate Asset Details">
|
||||||
@ -288,29 +291,6 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function showArchiveList() {
|
|
||||||
let isChecked = $("#showArchiveId").prop('checked');
|
|
||||||
|
|
||||||
// Show or hide the rows based on checkbox status
|
|
||||||
$(".deactivatedRow").each(function () {
|
|
||||||
if (isChecked) {
|
|
||||||
$(this).show();
|
|
||||||
} else {
|
|
||||||
$(this).hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
let table = $('#asset_list_table').DataTable();
|
|
||||||
|
|
||||||
showArchiveList();
|
|
||||||
|
|
||||||
table.on('draw', function () {
|
|
||||||
showArchiveList();
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
function confirmReActivatingAsset(event) {
|
function confirmReActivatingAsset(event) {
|
||||||
let result = confirm("Do You Want to Re-Activate Asset details ?");
|
let result = confirm("Do You Want to Re-Activate Asset details ?");
|
||||||
@ -318,10 +298,21 @@
|
|||||||
if (result) { return; } else { event.preventDefault(); }
|
if (result) { return; } else { event.preventDefault(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
function confirmDeleteAsset() {
|
function confirmDeleteAsset(event) {
|
||||||
let result = confirm("Do You Want to Delete Asset details ?");
|
let result = confirm("Do You Want to Delete Asset details ?");
|
||||||
|
|
||||||
if (result) { return; } else { event.preventDefault(); }
|
if (result) { return; } else { event.preventDefault(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).on("change", "#showArchiveId", function () {
|
||||||
|
console.log("Checkbox changed, submitting form...");
|
||||||
|
$("#archiveFormId").submit();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
@ -123,6 +123,18 @@
|
|||||||
$('#editpackagingcalmodel').on('hidden.bs.modal', function() {
|
$('#editpackagingcalmodel').on('hidden.bs.modal', function() {
|
||||||
$('#editpackagingcalmodel').css('z-index', ''); // Reset to default
|
$('#editpackagingcalmodel').css('z-index', ''); // Reset to default
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//If others is the payment terms to display mandatory field
|
||||||
|
$("#PaymentMethod").change(function() {
|
||||||
|
if ($('#PaymentMethod').val().trim() == 'PT08') {
|
||||||
|
$('#otheroptiondiv').show();
|
||||||
|
$('#Otherpayment').prop('required', true);
|
||||||
|
} else {
|
||||||
|
$('#otheroptiondiv').hide();
|
||||||
|
$('#Otherpayment').prop('required', false);
|
||||||
|
$('#Otherpayment').val('');
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
@ -703,7 +715,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="payablefrom">Payable Terms </label>
|
<label for="payablefrom">Payable Terms<span class="text-danger">*</span> </label>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$options1 = array("0" => 'Select Payment method');
|
$options1 = array("0" => 'Select Payment method');
|
||||||
@ -722,7 +734,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-3" id="otheroptiondiv" style="display:none;">
|
<div class="form-group col-md-3" id="otheroptiondiv" style="display:none;">
|
||||||
<label>Description of Payable Terms</label>
|
<label>Description of Payable Terms<span class="text-danger">*</span></label>
|
||||||
<div>
|
<div>
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'Otherpayment', 'Otherpayment' => set_value('Otherpayment'), 'id' => 'Otherpayment', 'class' => 'form-control', 'required' => 'true');
|
$data = array('name' => 'Otherpayment', 'Otherpayment' => set_value('Otherpayment'), 'id' => 'Otherpayment', 'class' => 'form-control', 'required' => 'true');
|
||||||
@ -783,7 +795,8 @@ if (!empty($INRSYMBOL)) {
|
|||||||
<br>
|
<br>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<table id="serviceTax" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
<div class="table-responsive" style="padding-bottom: 30px;">
|
||||||
|
<table id="serviceTax" class="table nowrap table-bordered table-hover mb-0" style="font-size:12px;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="white-space: nowrap !important;">SNo</th>
|
<th style="white-space: nowrap !important;">SNo</th>
|
||||||
@ -806,6 +819,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-row" id="DOMdiv">
|
<div class="form-row" id="DOMdiv">
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
@ -2545,6 +2559,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
$("#PaymentMethod").trigger('change');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@ -2737,6 +2752,11 @@ if (!empty($INRSYMBOL)) {
|
|||||||
RequistQuantity = obj.Quantity;
|
RequistQuantity = obj.Quantity;
|
||||||
$('#RateIn').html('Rate(in' + " " + DisplayCurrencySymbol + '/' + CPUOMDisplay + ')');
|
$('#RateIn').html('Rate(in' + " " + DisplayCurrencySymbol + '/' + CPUOMDisplay + ')');
|
||||||
$('#EditRateIn').html('Rate(in' + " " + DisplayCurrencySymbol + '/Ton)');
|
$('#EditRateIn').html('Rate(in' + " " + DisplayCurrencySymbol + '/Ton)');
|
||||||
|
if(obj.material_rate != 0){
|
||||||
|
Ratechange();
|
||||||
|
calculateFreight(3);
|
||||||
|
calculateFreightlocaddper();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -4068,7 +4088,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
*/
|
*/
|
||||||
function populateValueMainFormForDeleteServiceTax(deletedRow) {
|
function populateValueMainFormForDeleteServiceTax(deletedRow) {
|
||||||
|
|
||||||
var rows = document.getElementById('serviceTax').rows.length;
|
var rows = $('#serviceTax tbody tr').length;
|
||||||
|
|
||||||
var TotalOrderValueSummary = 0;
|
var TotalOrderValueSummary = 0;
|
||||||
|
|
||||||
@ -4554,7 +4574,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
formData.append('ExchangeRateOn', ExchangeRateOn);
|
formData.append('ExchangeRateOn', ExchangeRateOn);
|
||||||
formData.append('PaymentMethod', PaymentMethod);
|
formData.append('PaymentMethod', PaymentMethod);
|
||||||
$('#loader').show();
|
$('#loader').show();
|
||||||
disableButtons();
|
// disableButtons();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data: formData,
|
data: formData,
|
||||||
processData: false,
|
processData: false,
|
||||||
@ -4576,18 +4596,20 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
clearAfterAddLineItemAdd();
|
clearAfterAddLineItemAdd();
|
||||||
window.location = "purchaseorderListing";
|
window.location = "purchaseorderListing";
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
} else {
|
} else {
|
||||||
|
$('#loader').hide();
|
||||||
// $('#content').loader('hide');
|
// $('#content').loader('hide');
|
||||||
alert("Error");
|
alert("Error");
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
error: function(jqXHR, textStatus, errorThrown) {
|
error: function(jqXHR, textStatus, errorThrown) {
|
||||||
|
$('#loader').hide();
|
||||||
console.error("AJAX Error: " + textStatus + ": " + errorThrown);
|
console.error("AJAX Error: " + textStatus + ": " + errorThrown);
|
||||||
alert("Error: " + textStatus);
|
alert("Error: " + textStatus);
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -5395,15 +5417,6 @@ if (!empty($INRSYMBOL)) {
|
|||||||
return TAXval; // $('#AfterServiceTax').val(TAXval);
|
return TAXval; // $('#AfterServiceTax').val(TAXval);
|
||||||
|
|
||||||
}
|
}
|
||||||
//If others is the payment terms to display mandatory field
|
|
||||||
$("#PaymentMethod").change(function() {
|
|
||||||
if ($('#PaymentMethod').val().trim() == 'PT08') {
|
|
||||||
$('#otheroptiondiv').show();
|
|
||||||
} else {
|
|
||||||
$('#otheroptiondiv').hide();
|
|
||||||
$('#Otherpayment').val('');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
function clearTotalItemValues() {
|
function clearTotalItemValues() {
|
||||||
$('#txtTotCgst').val('');
|
$('#txtTotCgst').val('');
|
||||||
@ -5434,11 +5447,11 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
|
|
||||||
function Reset() {
|
function Reset() {
|
||||||
disableButtons();
|
// disableButtons();
|
||||||
location.reload();
|
location.reload();
|
||||||
setTimeout(function() {
|
// setTimeout(function() {
|
||||||
enableButtons();
|
// enableButtons();
|
||||||
}, 2000);
|
// }, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#insuranceTxtDiv').hide();
|
$('#insuranceTxtDiv').hide();
|
||||||
|
|||||||
@ -78,21 +78,26 @@
|
|||||||
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button"
|
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button"
|
||||||
id="resetButton" title="Reset"></i>
|
id="resetButton" title="Reset"></i>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="error" id="error"></div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
<div style="margin-left:auto">
|
<div style="margin-left:auto">
|
||||||
<div class="form-check" style="margin-right: 25px;">
|
<div class="form-check" style="margin-right: 25px;">
|
||||||
|
<form id="archiveFormId" action="<?php echo base_url()?>/costListing" method="post">
|
||||||
<input class="form-check-input" type="checkbox" id="showArchiveId"
|
<input class="form-check-input" type="checkbox" id="showArchiveId"
|
||||||
name="showArchive" value="1" onchange="showArchiveList()"
|
name="showArchive" value="1" <?php echo $showArchive ? "checked" : " " ?>
|
||||||
style="width: 18px; height: 18px;">
|
style="width: 18px; height: 18px;">
|
||||||
<label class="form-check-label" for="showArchiveId"
|
<label class="form-check-label" for="showArchiveId"
|
||||||
style="font-size: 1rem; margin-left: 8px;">
|
style="font-size: 1rem; margin-left: 8px;">
|
||||||
Show Archive
|
Show Archive
|
||||||
</label>
|
</label>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="error" id="error"></div>
|
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="card-body" style="overflow-x:scroll;">
|
<div class="card-body" style="overflow-x:scroll;">
|
||||||
|
|
||||||
<table id="cost_listing" class="table dt-responsive nowrap w-100">
|
<table id="cost_listing" class="table dt-responsive nowrap w-100">
|
||||||
@ -114,11 +119,7 @@
|
|||||||
$date = $createdat->format('d-m-Y');
|
$date = $createdat->format('d-m-Y');
|
||||||
$time = $createdat->format('h:i A');
|
$time = $createdat->format('h:i A');
|
||||||
?>
|
?>
|
||||||
<tr class="<?php if ($record->IsActive == 0) {
|
<tr>
|
||||||
echo "deactivatedRow";
|
|
||||||
} ?>" style="<?php if ($record->IsActive == 0) {
|
|
||||||
echo "display:none";
|
|
||||||
} ?>">
|
|
||||||
<td><?php echo $date; ?></td>
|
<td><?php echo $date; ?></td>
|
||||||
<td><?php echo $record->code ?></td>
|
<td><?php echo $record->code ?></td>
|
||||||
<td><?php echo $record->CostCenterName ?></td>
|
<td><?php echo $record->CostCenterName ?></td>
|
||||||
@ -406,29 +407,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
function showArchiveList() {
|
|
||||||
let isChecked = $("#showArchiveId").prop('checked');
|
|
||||||
|
|
||||||
// Show or hide the rows based on checkbox status
|
|
||||||
$(".deactivatedRow").each(function () {
|
|
||||||
if (isChecked) {
|
|
||||||
$(this).show();
|
|
||||||
} else {
|
|
||||||
$(this).hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
let table = $('#cost_listing').DataTable();
|
|
||||||
|
|
||||||
showArchiveList();
|
|
||||||
|
|
||||||
table.on('draw', function () {
|
|
||||||
showArchiveList();
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
@ -441,3 +419,11 @@ $(document).on('keydown', function(event) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).on("change", "#showArchiveId", function () {
|
||||||
|
console.log("Checkbox changed, submitting form...");
|
||||||
|
$("#archiveFormId").submit();
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
@ -107,20 +107,23 @@
|
|||||||
title="Reset"></i>
|
title="Reset"></i>
|
||||||
|
|
||||||
|
|
||||||
<div style="margin-left:auto">
|
|
||||||
<div class="form-check" style="margin-right: 25px;">
|
|
||||||
<input class="form-check-input" type="checkbox" id="showArchiveId" name="showArchive" value="1"
|
|
||||||
onchange="showArchiveList()" style="width: 18px; height: 18px;">
|
|
||||||
<label class="form-check-label" for="showArchiveId" style="font-size: 1rem; margin-left: 8px;">
|
|
||||||
Show Archive
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="error" id="error"></div>
|
<div class="error" id="error"></div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<div style="margin-left:auto">
|
||||||
|
<div class="form-check" style="margin-right: 25px;">
|
||||||
|
<form id="archiveFormId" action="<?php echo base_url()?>/departmentListing" method="post">
|
||||||
|
<input class="form-check-input" type="checkbox" id="showArchiveId"
|
||||||
|
name="showArchive" value="1" <?php echo $showArchive ? "checked" : " " ?>
|
||||||
|
style="width: 18px; height: 18px;">
|
||||||
|
<label class="form-check-label" for="showArchiveId"
|
||||||
|
style="font-size: 1rem; margin-left: 8px;">
|
||||||
|
Show Archive
|
||||||
|
</label>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="card-body" style="overflow-x:scroll;">
|
<div class="card-body" style="overflow-x:scroll;">
|
||||||
<table id="department_list_table" class="table dt-responsive nowrap w-100">
|
<table id="department_list_table" class="table dt-responsive nowrap w-100">
|
||||||
<thead>
|
<thead>
|
||||||
@ -139,13 +142,7 @@
|
|||||||
if (!empty($userRecords)) {
|
if (!empty($userRecords)) {
|
||||||
foreach ($userRecords as $record) {
|
foreach ($userRecords as $record) {
|
||||||
?>
|
?>
|
||||||
<tr
|
<tr>
|
||||||
class="<?php if ($record->IsActive == 0) {
|
|
||||||
echo "deactivatedRow";
|
|
||||||
} ?>"
|
|
||||||
style="<?php if ($record->IsActive == 0) {
|
|
||||||
echo "display:none";
|
|
||||||
} ?>">
|
|
||||||
<!-- <td title=" - Click here to view department details"> </td> -->
|
<!-- <td title=" - Click here to view department details"> </td> -->
|
||||||
<?php if (date('d-m-Y', strtotime($record->CreatedDt)) == "30-11--0001") {
|
<?php if (date('d-m-Y', strtotime($record->CreatedDt)) == "30-11--0001") {
|
||||||
$cdate = '00-00-0000';
|
$cdate = '00-00-0000';
|
||||||
@ -155,7 +152,7 @@
|
|||||||
<td><?php echo $cdate; ?> </td>
|
<td><?php echo $cdate; ?> </td>
|
||||||
<td><?php echo $record->DEPCode; ?></td>
|
<td><?php echo $record->DEPCode; ?></td>
|
||||||
<td><?php echo $record->DepartmentName ?></td>
|
<td><?php echo $record->DepartmentName ?></td>
|
||||||
<td><?php echo $record->HeadDept ?></td>
|
<td><?php echo empty($record->headDepartmentName)?$record->DepartmentName:$record->headDepartmentName ?></td>
|
||||||
<td><?php if ($record->IsActive == 1) {echo"Active";}else{echo "InActive";}?></td>
|
<td><?php if ($record->IsActive == 1) {echo"Active";}else{echo "InActive";}?></td>
|
||||||
<td>
|
<td>
|
||||||
<?php if ($record->IsActive == 0) { ?>
|
<?php if ($record->IsActive == 0) { ?>
|
||||||
@ -340,3 +337,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).on("change", "#showArchiveId", function () {
|
||||||
|
console.log("Checkbox changed, submitting form...");
|
||||||
|
$("#archiveFormId").submit();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
@ -63,6 +63,20 @@
|
|||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ; white-space: nowrap;">Loan Balance </td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ; white-space: nowrap;">Loan Balance </td>
|
||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ; white-space: nowrap;" ><?php echo ': Rs '.$PayDetails[0]->BalanceAdvance ?></td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ; white-space: nowrap;" ><?php echo ': Rs '.$PayDetails[0]->BalanceAdvance ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ; white-space: nowrap;"> </td>
|
||||||
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ; white-space: nowrap;"><?php echo ' ' ?></td>
|
||||||
|
<td><?= ' ' ?></td>
|
||||||
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ; white-space: nowrap;">Diesel </td>
|
||||||
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ; white-space: nowrap;" ><?php echo ': Rs '.$PayDetails[0]->diesel_amount; ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ; white-space: nowrap;"> </td>
|
||||||
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ; white-space: nowrap;"><?php echo ' '; ?></td>
|
||||||
|
<td><?= ' ' ?></td>
|
||||||
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ; white-space: nowrap;">Shed Duty Amount </td>
|
||||||
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ; white-space: nowrap;" ><?php echo ': Rs '.$PayDetails[0]->shed_amount; ?></td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
@ -71,39 +85,27 @@
|
|||||||
<table style="border-collapse: collapse;border-top:#fff;" cellpadding="0" cellspacing="0" border="1" width="100%" >
|
<table style="border-collapse: collapse;border-top:#fff;" cellpadding="0" cellspacing="0" border="1" width="100%" >
|
||||||
<tr><th>Earnings</th><th>Amount <span style="font-family: DejaVu Sans; sans-serif;">₹</span></th><th>Deductions</th><th>Amount <span style="font-family: DejaVu Sans; sans-serif;">₹</span></th></tr>
|
<tr><th>Earnings</th><th>Amount <span style="font-family: DejaVu Sans; sans-serif;">₹</span></th><th>Deductions</th><th>Amount <span style="font-family: DejaVu Sans; sans-serif;">₹</span></th></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="25%;"> Basic</td>
|
<td width="25%;"> BASIC</td>
|
||||||
<td width="20%;" style="text-align: right;" ><?php echo $PayDetails[0]->monthly_salary_amount; ?> </td>
|
<td width="20%;" style="text-align: right;" ><?php echo $PayDetails[0]->BASIC; ?> </td>
|
||||||
<td width="25%;"> PF</td>
|
<td width="25%;"> PF</td>
|
||||||
<td width="30%;" style="text-align: right;" ><?php echo $pf_amount; ?> </td>
|
<td width="30%;" style="text-align: right;" ><?php echo $pf_amount; ?> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="25%;"> Diesel</td>
|
<td width="25%;"> HRA</td>
|
||||||
<td width="20%;" style="text-align: right;" ><?php echo $PayDetails[0]->diesel_amount; ?> </td>
|
<td width="20%;" style="text-align: right;" ><?php echo $PayDetails[0]->HRA; ?> </td>
|
||||||
<td> ESI</td>
|
<td> ESI</td>
|
||||||
<td style="text-align: right;"> <?php echo $esi_amount ?> </td>
|
<td style="text-align: right;"> <?php echo $esi_amount ?> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="25%;"> Shed Duty Amount</td>
|
<td width="25%;"> Bonus</td>
|
||||||
<td width="20%;" style="text-align: right;" ><?php echo $PayDetails[0]->shed_amount; ?> </td>
|
<td width="20%;" style="text-align: right;" ><?php echo $PayDetails[0]->Festival_Bonus; ?> </td>
|
||||||
<td> Salary Advance</td>
|
<td> Salary Advance</td>
|
||||||
<td style="text-align: right;"> <?php echo $PayDetails[0]->Advance ?> </td>
|
<td style="text-align: right;"> <?php echo $PayDetails[0]->Advance ?> </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td width="25%;"> Bonus</td>
|
|
||||||
<td width="20%;" style="text-align: right;" ><?php echo $PayDetails[0]->Festival_Bonus; ?> </td>
|
|
||||||
|
|
||||||
<td width="25%;"> </td>
|
|
||||||
<td width="30%;" style="text-align: right;" > </td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<tr><th nowrap> Total Earning (Rounded)</th>
|
<tr><th nowrap> Total Earning (Rounded)</th>
|
||||||
<td style="text-align: right;">
|
<td style="text-align: right;">
|
||||||
<?php
|
<?php
|
||||||
$totEarning = $PayDetails[0]->monthly_salary_amount + $PayDetails[0]->Festival_Bonus + $PayDetails[0]->diesel_amount + $PayDetails[0]->shed_amount;
|
$totEarning = $PayDetails[0]->BASIC + $PayDetails[0]->Festival_Bonus + $PayDetails[0]->HRA ;
|
||||||
echo number_format(round($totEarning),2)
|
echo number_format(round($totEarning),2)
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@ -796,9 +796,8 @@ if (!empty($POItem) && $CapitalRange == '1') {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="table-responsive">
|
<div class="table-responsive" style="padding-bottom: 30px;">
|
||||||
<table id="serviceTax" class="table table-bordered table-hover mb-0"
|
<table id="serviceTax" class="table nowrap table-bordered table-hover mb-0" style="font-size:12px;">
|
||||||
style="font-size:12px;">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="white-space: nowrap !important; text-align:left !important">SNo</th>
|
<th style="white-space: nowrap !important; text-align:left !important">SNo</th>
|
||||||
@ -3497,7 +3496,7 @@ Calculate Landing charge
|
|||||||
|
|
||||||
|
|
||||||
$('#loader').show();
|
$('#loader').show();
|
||||||
disableButtons();
|
// disableButtons();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
// data:$('.CapitalPO').serialize()+"&ExchangeRateOn="+ExchangeRateOn+"&PaymentMethod="+PaymentMethod+"&PayableAT="+PayableAT+"&PaymentDate="+PaymentDate,
|
// data:$('.CapitalPO').serialize()+"&ExchangeRateOn="+ExchangeRateOn+"&PaymentMethod="+PaymentMethod+"&PayableAT="+PayableAT+"&PaymentDate="+PaymentDate,
|
||||||
type: "POST",
|
type: "POST",
|
||||||
@ -3516,11 +3515,11 @@ Calculate Landing charge
|
|||||||
$('#SpcialInstruction').val('');
|
$('#SpcialInstruction').val('');
|
||||||
$('#txtDeliveryAddress').val('');
|
$('#txtDeliveryAddress').val('');
|
||||||
window.location = status == 1 ? "amendmentpurchaseorder" : "purchaseorderListing";
|
window.location = status == 1 ? "amendmentpurchaseorder" : "purchaseorderListing";
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
} else {
|
} else {
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
alert("Error");
|
alert("Error");
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -4056,7 +4055,7 @@ Calculate Landing charge
|
|||||||
*/
|
*/
|
||||||
function populateValueMainFormForEditCapitalTax() {
|
function populateValueMainFormForEditCapitalTax() {
|
||||||
|
|
||||||
var rows = document.getElementById('serviceTax').rows.length;
|
var rows = $('#serviceTax tbody tr').length;
|
||||||
var TotalOrderValueSummary = 0;
|
var TotalOrderValueSummary = 0;
|
||||||
var basicfordometic = 0;
|
var basicfordometic = 0;
|
||||||
var qty = 0;
|
var qty = 0;
|
||||||
|
|||||||
@ -883,8 +883,9 @@ if (!empty($getlogpodtl)) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<table id="serviceTax" class="table table-bordered table-hover"
|
<div class="form-row">
|
||||||
style="background-color:#fff;font-size:12px;">
|
<div class="table-responsive" style="padding-bottom: 30px;">
|
||||||
|
<table id="serviceTax" class="table nowrap table-bordered table-hover mb-0" style="font-size:12px;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>SNo</th>
|
<th>SNo</th>
|
||||||
@ -1289,6 +1290,8 @@ if (!empty($getlogpodtl)) {
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -3932,6 +3935,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
$("#CPUOM").val('');
|
$("#CPUOM").val('');
|
||||||
$("#CPQuantity").val('');
|
$("#CPQuantity").val('');
|
||||||
$("#CPTotalAmount").val('');
|
$("#CPTotalAmount").val('');
|
||||||
|
$("#CPRate").val('');
|
||||||
RequistQuantity = '';
|
RequistQuantity = '';
|
||||||
clearTaxField();
|
clearTaxField();
|
||||||
if (id != '0') {
|
if (id != '0') {
|
||||||
@ -3943,12 +3947,16 @@ if (!empty($getlogpodtl)) {
|
|||||||
$("#CapitalItemName").val(obj.MaterialName);
|
$("#CapitalItemName").val(obj.MaterialName);
|
||||||
$("#CPUOM").val(obj.UOM);
|
$("#CPUOM").val(obj.UOM);
|
||||||
$("#CPQuantity").val(obj.Quantity);
|
$("#CPQuantity").val(obj.Quantity);
|
||||||
|
$("#CPRate").val(obj.material_rate);
|
||||||
RequistQuantity = obj.Quantity;
|
RequistQuantity = obj.Quantity;
|
||||||
|
|
||||||
var CPUOMDisplay = obj.UOM;
|
var CPUOMDisplay = obj.UOM;
|
||||||
|
|
||||||
$('#RateIn').html('Rate(in' + " " + DisplayCurrencySymbol + '/' + CPUOMDisplay + ')');
|
$('#RateIn').html('Rate(in' + " " + DisplayCurrencySymbol + '/' + CPUOMDisplay + ')');
|
||||||
$('#EditRateIn').html('Rate(in' + " " + DisplayCurrencySymbol + '/' + CPUOMDisplay + ')');
|
$('#EditRateIn').html('Rate(in' + " " + DisplayCurrencySymbol + '/' + CPUOMDisplay + ')');
|
||||||
|
if(obj.material_rate != 0){
|
||||||
|
Ratechange();calculateFreight(3);calculateFreightlocaddper();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -4776,12 +4784,12 @@ if (!empty($getlogpodtl)) {
|
|||||||
// ReceivedQuantity: 0,
|
// ReceivedQuantity: 0,
|
||||||
// PendingQuantity: quantity
|
// PendingQuantity: quantity
|
||||||
// }));
|
// }));
|
||||||
PONOStatus = <?php echo $PONOStatus; ?>
|
var PONOStatus = "<?php echo $PONOStatus; ?>";
|
||||||
var shorten = materialName.length > 13 ? materialName.slice(0, 13) + "..." : materialName;
|
var shorten = materialName.length > 13 ? materialName.slice(0, 13) + "..." : materialName;
|
||||||
var rowHtml = `
|
var rowHtml = `
|
||||||
<tr id="${temp}">
|
<tr id="${temp}">
|
||||||
<td align="left">${temp}</td>
|
<td align="left">${temp}</td>
|
||||||
<td align="left">${Reqnumber}</td>
|
<td align="center">${Reqnumber}</td>
|
||||||
<td align="left">${materialCode}</td>
|
<td align="left">${materialCode}</td>
|
||||||
<td align="left">${shorten}</td>`;
|
<td align="left">${shorten}</td>`;
|
||||||
if (PONOStatus === "PO_DRAFT" || PONOStatus === "PO_CREATED") {
|
if (PONOStatus === "PO_DRAFT" || PONOStatus === "PO_CREATED") {
|
||||||
@ -5377,7 +5385,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
*/
|
*/
|
||||||
function populateValueMainFormForDeleteServiceTax(deletedRow) {
|
function populateValueMainFormForDeleteServiceTax(deletedRow) {
|
||||||
|
|
||||||
var rows = document.getElementById('serviceTax').rows.length;
|
var rows = $('#serviceTax tbody tr').length;
|
||||||
|
|
||||||
var capital = <?php echo json_encode($CapitalRange, JSON_PRETTY_PRINT) ?>;
|
var capital = <?php echo json_encode($CapitalRange, JSON_PRETTY_PRINT) ?>;
|
||||||
var TotalOrderValueSummary = 0;
|
var TotalOrderValueSummary = 0;
|
||||||
@ -6009,7 +6017,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
//alert('else');
|
//alert('else');
|
||||||
|
|
||||||
$('#loader').show();
|
$('#loader').show();
|
||||||
disableButtons();
|
// disableButtons();
|
||||||
//alert('ss');
|
//alert('ss');
|
||||||
var formData = new FormData($('.CapitalPO')[0]);
|
var formData = new FormData($('.CapitalPO')[0]);
|
||||||
formData.append('ExchangeRateOn', ExchangeRateOn);
|
formData.append('ExchangeRateOn', ExchangeRateOn);
|
||||||
@ -6060,11 +6068,11 @@ if (!empty($getlogpodtl)) {
|
|||||||
|
|
||||||
clearAfterAddLineItemAdd();
|
clearAfterAddLineItemAdd();
|
||||||
window.location = "purchaseorderListing";
|
window.location = "purchaseorderListing";
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// <!-- setTimeout(function() { enableButtons(); }, 2000); -->
|
||||||
} else {
|
} else {
|
||||||
// $('#content').loader('hide');
|
// $('#content').loader('hide');
|
||||||
alert("Error");
|
alert("Error");
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -6764,7 +6772,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
*/
|
*/
|
||||||
function populateValueMainFormForEditCapitalTax() {
|
function populateValueMainFormForEditCapitalTax() {
|
||||||
|
|
||||||
var rows = document.getElementById('serviceTax').rows.length;
|
var rows = $('#serviceTax tbody tr').length;
|
||||||
var capital = <?php echo json_encode($CapitalRange, JSON_PRETTY_PRINT) ?>;
|
var capital = <?php echo json_encode($CapitalRange, JSON_PRETTY_PRINT) ?>;
|
||||||
var TotalOrderValueSummary = 0;
|
var TotalOrderValueSummary = 0;
|
||||||
|
|
||||||
@ -6914,7 +6922,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
|
|
||||||
function populateValueMainFormForViewCapitalTax() {
|
function populateValueMainFormForViewCapitalTax() {
|
||||||
|
|
||||||
var rows = document.getElementById('serviceTax').rows.length;
|
var rows = $('#serviceTax tbody tr').length;
|
||||||
var capital = <?php echo json_encode($CapitalRange, JSON_PRETTY_PRINT) ?>;
|
var capital = <?php echo json_encode($CapitalRange, JSON_PRETTY_PRINT) ?>;
|
||||||
|
|
||||||
var TotalOrderValueSummary = 0;
|
var TotalOrderValueSummary = 0;
|
||||||
@ -8105,7 +8113,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
|
|
||||||
|
|
||||||
function populateValueMainFormForupdateCapitalTax() {
|
function populateValueMainFormForupdateCapitalTax() {
|
||||||
var rows = document.getElementById('serviceTax').rows.length;
|
var rows = $('#serviceTax tbody tr').length;
|
||||||
var TotalFreight = 0;
|
var TotalFreight = 0;
|
||||||
var i = 0;
|
var i = 0;
|
||||||
do {
|
do {
|
||||||
|
|||||||
@ -1198,8 +1198,8 @@ if (!empty($RequistionDetails)) {
|
|||||||
|
|
||||||
<br />
|
<br />
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="table-responsive">
|
<div class="table-responsive" style="padding-bottom: 30px;">
|
||||||
<table id="ImportTax" class="table table-bordered table-hover mb-0" style="font-size:12px;">
|
<table id="ImportTax" class="table nowrap table-bordered table-hover mb-0" style="font-size:12px;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
@ -2786,7 +2786,7 @@ if (!empty($RequistionDetails)) {
|
|||||||
|
|
||||||
|
|
||||||
function populateValueMainFormForEditImportTax() {
|
function populateValueMainFormForEditImportTax() {
|
||||||
var rows = document.getElementById('ImportTax').rows.length;
|
var rows = $('#ImportTax tbody tr').length;
|
||||||
var TotalLanding = 0;
|
var TotalLanding = 0;
|
||||||
var TotalCustom = 0;
|
var TotalCustom = 0;
|
||||||
var TotalCustomED = 0;
|
var TotalCustomED = 0;
|
||||||
@ -2933,7 +2933,7 @@ if (!empty($RequistionDetails)) {
|
|||||||
// return false;
|
// return false;
|
||||||
// } else {
|
// } else {
|
||||||
$('#loader').show();
|
$('#loader').show();
|
||||||
disableButtons();
|
// disableButtons();
|
||||||
var formData = new FormData($('.ImportPO')[0]);
|
var formData = new FormData($('.ImportPO')[0]);
|
||||||
|
|
||||||
if (status == 0) { // for draft
|
if (status == 0) { // for draft
|
||||||
@ -2964,23 +2964,23 @@ if (!empty($RequistionDetails)) {
|
|||||||
//$('#txtDeliveryAddress').val('');
|
//$('#txtDeliveryAddress').val('');
|
||||||
|
|
||||||
window.location = status == 1 ? "amendmentpurchaseorder" : "purchaseorderListing";
|
window.location = status == 1 ? "amendmentpurchaseorder" : "purchaseorderListing";
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
alert("Error");
|
alert("Error");
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
error : function (){
|
error : function (){
|
||||||
console.error(error);
|
console.error(error);
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
|
|
||||||
},
|
},
|
||||||
complete : function (){
|
complete : function (){
|
||||||
console.log("ajax call is completed ");
|
console.log("ajax call is completed ");
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -16,9 +16,6 @@
|
|||||||
autoclose: true
|
autoclose: true
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@ -308,7 +305,8 @@ if (!empty($emppay)) {
|
|||||||
<tr>
|
<tr>
|
||||||
<td><?php echo number_format($history->Due_Amount, 2); ?></td>
|
<td><?php echo number_format($history->Due_Amount, 2); ?></td>
|
||||||
<td><?php echo number_format($history->Balance_Amount, 2); ?></td>
|
<td><?php echo number_format($history->Balance_Amount, 2); ?></td>
|
||||||
<td><?php $entryDate = new DateTime($history->Entry_Date); echo $entryDate->format('F j, Y, g:i A'); ?></td>
|
<td><?php $entryDate = new DateTime($history->Entry_Date);
|
||||||
|
echo $entryDate->format('F j, Y, g:i A'); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
@ -383,10 +381,6 @@ if (!empty($emppay)) {
|
|||||||
</div> <!-- content -->
|
</div> <!-- content -->
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// function duecalculation() {
|
// function duecalculation() {
|
||||||
// var totaldue = 0;
|
// var totaldue = 0;
|
||||||
// var loan = document.getElementById('Loan_Amount').value;
|
// var loan = document.getElementById('Loan_Amount').value;
|
||||||
|
|||||||
@ -1219,8 +1219,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
<br>
|
<br>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="table-responsive" style="padding-bottom: 30px;">
|
<div class="table-responsive" style="padding-bottom: 30px;">
|
||||||
<table id="ServiceTable" class="table table-bordered table-hover mb-0"
|
<table id="ServiceTable" class="table table-bordered table-hover" style="font-size:12px;">
|
||||||
style="font-size:12px;">
|
|
||||||
<thead>
|
<thead>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
@ -1555,7 +1554,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-12" align="right"><br />
|
<div class="form-group col-md-12"><br />
|
||||||
<div>
|
<div>
|
||||||
<input type="file" name="POFile" id="POFile">
|
<input type="file" name="POFile" id="POFile">
|
||||||
<?php if ($PrePOFile) { ?>
|
<?php if ($PrePOFile) { ?>
|
||||||
@ -2271,6 +2270,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
$('#BudgetType').attr("style", "pointer-events: none;");
|
$('#BudgetType').attr("style", "pointer-events: none;");
|
||||||
|
|
||||||
$('#EditRevenue').click(function () {
|
$('#EditRevenue').click(function () {
|
||||||
|
console.log("####");
|
||||||
tinyMCE.triggerSave();
|
tinyMCE.triggerSave();
|
||||||
if (validateEditRevenueTax() && validateEditExceedLimit()) {
|
if (validateEditRevenueTax() && validateEditExceedLimit()) {
|
||||||
var CostCode = $("#EditCostCenter").val();
|
var CostCode = $("#EditCostCenter").val();
|
||||||
@ -2408,7 +2408,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function populateValueMainFormForEditRevenueTax() {
|
function populateValueMainFormForEditRevenueTax() {
|
||||||
var rows = document.getElementById('revenueTax').rows.length;
|
var rows = $('#revenueTax tbody tr').length;
|
||||||
var totBasicAmt = 0;
|
var totBasicAmt = 0;
|
||||||
var totDiscountAmt = 0;
|
var totDiscountAmt = 0;
|
||||||
var totPackagingAmt = 0;
|
var totPackagingAmt = 0;
|
||||||
@ -2484,7 +2484,8 @@ if (!empty($INRSYMBOL)) {
|
|||||||
<script>
|
<script>
|
||||||
function validateBudgetExceedLimit() {
|
function validateBudgetExceedLimit() {
|
||||||
//alert('inside validateBudgetExceedLimit function');
|
//alert('inside validateBudgetExceedLimit function');
|
||||||
var rows = document.getElementById('revenueTax').rows.length;
|
// var rows = document.getElementById('revenueTax').rows.length;
|
||||||
|
var rows = $('#revenueTax tbody tr').length;
|
||||||
var ReqType = '<?php echo REVENUE ?>';
|
var ReqType = '<?php echo REVENUE ?>';
|
||||||
for (i = 1; i < rows; i++) {
|
for (i = 1; i < rows; i++) {
|
||||||
var costcode = $('#costCode' + i).val();
|
var costcode = $('#costCode' + i).val();
|
||||||
@ -2575,7 +2576,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
$('#loader').show();
|
$('#loader').show();
|
||||||
disableButtons();
|
// disableButtons();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
// data:$('.CreatePO').serialize(),
|
// data:$('.CreatePO').serialize(),
|
||||||
type: "POST",
|
type: "POST",
|
||||||
@ -2594,21 +2595,21 @@ if (!empty($INRSYMBOL)) {
|
|||||||
$('#txtDeliveryAddress').val('')
|
$('#txtDeliveryAddress').val('')
|
||||||
|
|
||||||
window.location = (status == 1) ? "amendmentpurchaseorder" : "purchaseorderListing";
|
window.location = (status == 1) ? "amendmentpurchaseorder" : "purchaseorderListing";
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
} else {
|
} else {
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
error : function(error){
|
error : function(error){
|
||||||
console.error("error occured" + error);
|
console.error("error occured" + error);
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
},
|
},
|
||||||
complete : function (){
|
complete : function (){
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
console.log("ajax call is completed ..!!")
|
console.log("ajax call is completed ..!!")
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@ -541,6 +541,10 @@ if (!empty($getlogpodtl)) {
|
|||||||
$("#ItemName").val(obj.MaterialName);
|
$("#ItemName").val(obj.MaterialName);
|
||||||
$("#UOM").val(obj.UOM);
|
$("#UOM").val(obj.UOM);
|
||||||
$("#Quantity").val(obj.Quantity);
|
$("#Quantity").val(obj.Quantity);
|
||||||
|
$("#Rate").val(obj.material_rate);
|
||||||
|
if(obj.material_rate != 0){
|
||||||
|
change();
|
||||||
|
}
|
||||||
RequistQuantity = obj.Quantity;
|
RequistQuantity = obj.Quantity;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -2132,9 +2136,10 @@ if (!empty($getlogpodtl)) {
|
|||||||
<div class="form-group col-md-3" id="Deliverydtdiv">
|
<div class="form-group col-md-3" id="Deliverydtdiv">
|
||||||
<label>Delivery Date<span class="text-danger">*</span></label>
|
<label>Delivery Date<span class="text-danger">*</span></label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
<input class="form-control num" data-provide="datepicker" data-date-format="dd-mm-yyyy" data-date-autoclose="true" id="Deliverydt" name="Deliverydt" data-date-start-date="<?= date('d-m-Y'); ?>" required autocomplete="off" value="<?= $Deliverydt; ?>">
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'Deliverydt', 'value' => set_value('Deliverydt', $Deliverydt), 'id' => 'Deliverydt', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;');
|
// $data = array('name' => 'Deliverydt', 'value' => set_value('Deliverydt', $Deliverydt), 'id' => 'Deliverydt', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;');
|
||||||
echo form_input($data);
|
// echo form_input($data);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -2161,9 +2166,10 @@ if (!empty($getlogpodtl)) {
|
|||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label>Purchase Order Date</label>
|
<label>Purchase Order Date</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
<input class="form-control num" data-provide="datepicker" data-date-format="dd-mm-yyyy" data-date-autoclose="true" id="PODate" name="PODate" data-date-start-date="<?= date('d-m-Y'); ?>" required autocomplete="off" value="<?= $PODate; ?>">
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'PODate', 'value' => set_value('PODate', $PODate), 'id' => 'PODate', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;');
|
// $data = array('name' => 'PODate', 'value' => set_value('PODate', $PODate), 'id' => 'PODate', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;');
|
||||||
echo form_input($data);
|
// echo form_input($data);
|
||||||
?> <input type="hidden" name="b4podate" id="b4podate" value="<?php echo $PODate; ?>">
|
?> <input type="hidden" name="b4podate" id="b4podate" value="<?php echo $PODate; ?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -2327,8 +2333,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
<br>
|
<br>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="table-responsive" style="padding-bottom: 30px;">
|
<div class="table-responsive" style="padding-bottom: 30px;">
|
||||||
<table id="revenueTax" class="table table-bordered table-hover"
|
<table id="revenueTax" class="table nowrap table-bordered table-hover mb-0" style="font-size:12px;">
|
||||||
style="font-size:12px;">
|
|
||||||
<thead>
|
<thead>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
@ -4791,7 +4796,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
|
|
||||||
function populateValueMainFormForEditRevenueTax() {
|
function populateValueMainFormForEditRevenueTax() {
|
||||||
|
|
||||||
var rows = document.getElementById('revenueTax').rows.length;
|
var rows = $('#revenueTax tbody tr').length;
|
||||||
//alert(rows);
|
//alert(rows);
|
||||||
var editrow = parseFloat(rows) - 1;
|
var editrow = parseFloat(rows) - 1;
|
||||||
//alert(editrow);
|
//alert(editrow);
|
||||||
@ -4978,7 +4983,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function validateBudgetExceedLimit() {
|
function validateBudgetExceedLimit() {
|
||||||
var rows = document.getElementById('revenueTax').rows.length;
|
var rows = $('#revenueTax tbody tr').length;
|
||||||
var ReqType = '<?php echo REVENUE ?>';
|
var ReqType = '<?php echo REVENUE ?>';
|
||||||
|
|
||||||
for (i = 1; i < rows; i++) {
|
for (i = 1; i < rows; i++) {
|
||||||
@ -5403,7 +5408,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
// } else {
|
// } else {
|
||||||
var formData = new FormData($('.CreatePO')[0]);
|
var formData = new FormData($('.CreatePO')[0]);
|
||||||
$('#loader').show();
|
$('#loader').show();
|
||||||
disableButtons();
|
// disableButtons();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "<?php echo base_url() ?>purchaseorder/EditRevenuePurchaseOrder",
|
url: "<?php echo base_url() ?>purchaseorder/EditRevenuePurchaseOrder",
|
||||||
@ -5421,11 +5426,11 @@ if (!empty($getlogpodtl)) {
|
|||||||
$('#SpcialInstruction').val('');
|
$('#SpcialInstruction').val('');
|
||||||
$('#txtDeliveryAddress').val('')
|
$('#txtDeliveryAddress').val('')
|
||||||
window.location = "purchaseorderListing";
|
window.location = "purchaseorderListing";
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
alert("Something went wrong");
|
alert("Something went wrong");
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -5434,7 +5439,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
console.error("AJAX Error: ", textStatus, errorThrown);
|
console.error("AJAX Error: ", textStatus, errorThrown);
|
||||||
alert("An error occurred: " + textStatus + " - " + errorThrown);
|
alert("An error occurred: " + textStatus + " - " + errorThrown);
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -293,7 +293,7 @@ foreach ($PaymentTerms as $TER) {
|
|||||||
var Material = <?php echo json_encode($MaterialList, JSON_PRETTY_PRINT) ?>;
|
var Material = <?php echo json_encode($MaterialList, JSON_PRETTY_PRINT) ?>;
|
||||||
var AvlBudAmt = '<?php echo $AvlAmount ?>';
|
var AvlBudAmt = '<?php echo $AvlAmount ?>';
|
||||||
//ServiceTable
|
//ServiceTable
|
||||||
var rows = document.getElementById('ServiceTable').rows.length;
|
var rows = $('#ServiceTable tbody tr').length;
|
||||||
|
|
||||||
if (DeletedMaterialCode != undefined && DeletedMaterialCode != '') {
|
if (DeletedMaterialCode != undefined && DeletedMaterialCode != '') {
|
||||||
|
|
||||||
@ -1012,7 +1012,9 @@ foreach ($PaymentTerms as $TER) {
|
|||||||
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<table id="ServiceTable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
<div class="form-row">
|
||||||
|
<div class="table-responsive" style="padding-bottom: 30px;">
|
||||||
|
<table id="ServiceTable" class="table nowrap table-bordered table-hover mb-0" style="font-size:12px;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>SNo</th>
|
<th>SNo</th>
|
||||||
@ -1172,6 +1174,8 @@ foreach ($PaymentTerms as $TER) {
|
|||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
@ -1872,7 +1876,7 @@ foreach ($PaymentTerms as $TER) {
|
|||||||
|
|
||||||
function populateValueMainFormForEditServiceTax() {
|
function populateValueMainFormForEditServiceTax() {
|
||||||
|
|
||||||
var rows = document.getElementById('ServiceTable').rows.length;
|
var rows = $('#ServiceTable tbody tr').length;
|
||||||
|
|
||||||
var TotCgst = 0;
|
var TotCgst = 0;
|
||||||
var TotSgst = 0;
|
var TotSgst = 0;
|
||||||
@ -2236,19 +2240,19 @@ foreach ($PaymentTerms as $TER) {
|
|||||||
$('#txtDeliveryAddress').val('')
|
$('#txtDeliveryAddress').val('')
|
||||||
|
|
||||||
window.location = status == 1 ? "amendmentpurchaseorder" : "purchaseorderListing";
|
window.location = status == 1 ? "amendmentpurchaseorder" : "purchaseorderListing";
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
} else {
|
} else {
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
console.error("Error");
|
console.error("Error");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error : function (error){
|
error : function (error){
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
console.log("error occurred" , error);
|
console.log("error occurred" , error);
|
||||||
},
|
},
|
||||||
complete : function (){
|
complete : function (){
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
console.log("Ajax call is completed ..!!");
|
console.log("Ajax call is completed ..!!");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -176,7 +176,7 @@ if (!empty($assetList)) {
|
|||||||
<div class="form-row" style="margin-top:20px">
|
<div class="form-row" style="margin-top:20px">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label class="col-form-label" for="PDate">Purchase Date<span class="badge">*</span></label>
|
<label class="col-form-label" for="PDate">Purchase Date<span class="badge">*</span></label>
|
||||||
<input type="text" class="form-control" id="PDate" name="PDate" value="<?php echo $PDate; ?>">
|
<input type="text" class="form-control" id="PDate" name="PDate" value="<?php echo $PDate; ?>" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label class="col-form-label" for="Vendor">Vendor<span class="badge">*</span></label>
|
<label class="col-form-label" for="Vendor">Vendor<span class="badge">*</span></label>
|
||||||
|
|||||||
@ -664,7 +664,8 @@ if (!empty($master)) {
|
|||||||
<script>
|
<script>
|
||||||
$('#AddConfigValue, #configValue').change(function() {
|
$('#AddConfigValue, #configValue').change(function() {
|
||||||
|
|
||||||
let configValue = $(this).val();
|
let configValue = $(this).val().trim();
|
||||||
|
console.log(configValue,configValue.length);
|
||||||
let configTable = customTableToJson();
|
let configTable = customTableToJson();
|
||||||
let configValueExisting = configTable.filter(element => element['Configuration Value'] == configValue);
|
let configValueExisting = configTable.filter(element => element['Configuration Value'] == configValue);
|
||||||
|
|
||||||
|
|||||||
@ -186,6 +186,12 @@ $("#deptBtnId").on('click',function(){
|
|||||||
let depCode =$("#DEPCode").val();
|
let depCode =$("#DEPCode").val();
|
||||||
let headDepCode = $("#HeadDept").val();
|
let headDepCode = $("#HeadDept").val();
|
||||||
|
|
||||||
|
|
||||||
|
if(departmentName.length<1){
|
||||||
|
alert(`Department Name cannot be empty..!!`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#loader').show();
|
$('#loader').show();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:"POST",
|
type:"POST",
|
||||||
|
|||||||
@ -20,7 +20,8 @@
|
|||||||
box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
|
box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
.save-btn, .cancel-btn {
|
.save-btn,
|
||||||
|
.cancel-btn {
|
||||||
border: none;
|
border: none;
|
||||||
background: none;
|
background: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@ -93,7 +94,9 @@
|
|||||||
// Hide the edit container and show the <a> tag
|
// Hide the edit container and show the <a> tag
|
||||||
$editContainer.hide();
|
$editContainer.hide();
|
||||||
$link.show();
|
$link.show();
|
||||||
});});</script>
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
<?php
|
<?php
|
||||||
$AvlAmount = 0;
|
$AvlAmount = 0;
|
||||||
$ReqType = '';
|
$ReqType = '';
|
||||||
@ -456,9 +459,10 @@ if (!empty($getlogpodtl)) {
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<!-- Start Content-->
|
<!-- Start Content-->
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<!-- start page title -->
|
<!-- start first row -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
<!-- start page title -->
|
||||||
<div class="page-title-box page-title-box-alt">
|
<div class="page-title-box page-title-box-alt">
|
||||||
<?php if ($parentPO == '') { ?>
|
<?php if ($parentPO == '') { ?>
|
||||||
<h4><?= "Edit Import Purchase Order - $PONO "; ?></h4>
|
<h4><?= "Edit Import Purchase Order - $PONO "; ?></h4>
|
||||||
@ -466,26 +470,20 @@ if (!empty($getlogpodtl)) {
|
|||||||
<h4><?= "Amended Import Purchase Order - $PONO "; ?></h4>
|
<h4><?= "Amended Import Purchase Order - $PONO "; ?></h4>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<a href="<?php echo base_url() ?>purchaseorderListing" class="btn btn-secondary" id="back" value="Back">Back</a>
|
<a href="<?php echo base_url() ?>purchaseorderListing" class="btn btn-secondary" id="back" value="Back">Back</a>
|
||||||
</div>
|
</div><!-- end page title -->
|
||||||
</div>
|
</div><!-- end col-->
|
||||||
</div>
|
</div><!-- end first row -->
|
||||||
<!-- end page title -->
|
|
||||||
<!-- Form row -->
|
<!-- second row -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body p-4">
|
<div class="card-body p-4">
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$attributes = array('class' => 'form-label-left ImportPO ', 'name' => 'ImportPO', 'id' => 'ImportPO', 'enctype' => 'multipart/form-data');
|
$attributes = array('class' => 'form-label-left ImportPO ', 'name' => 'ImportPO', 'id' => 'ImportPO', 'enctype' => 'multipart/form-data');
|
||||||
|
|
||||||
echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?>
|
echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label>Requistion No</label>
|
<label>Requistion No</label>
|
||||||
@ -550,7 +548,6 @@ if (!empty($getlogpodtl)) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label>Currency Type<span class="text-danger">*</span></label>
|
<label>Currency Type<span class="text-danger">*</span></label>
|
||||||
@ -615,7 +612,6 @@ if (!empty($getlogpodtl)) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
Check Today's Foreign Exchange value <a href="http://www.xe.com/" target="_blank"><u>(Click here)</u></a>
|
Check Today's Foreign Exchange value <a href="http://www.xe.com/" target="_blank"><u>(Click here)</u></a>
|
||||||
@ -809,6 +805,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-row" align="right">
|
<div class="form-row" align="right">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
|
|
||||||
@ -825,7 +822,10 @@ if (!empty($getlogpodtl)) {
|
|||||||
</div>
|
</div>
|
||||||
<br><br><br><br>
|
<br><br><br><br>
|
||||||
<div class="box-body" style="margin-top: -3%;">
|
<div class="box-body" style="margin-top: -3%;">
|
||||||
<table id="ImportTax" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
<div class="form-row">
|
||||||
|
<div class="table-responsive" style="padding-bottom: 30px;">
|
||||||
|
<table id="ImportTax" class="table nowrap table-bordered table-hover mb-0" style="font-size:12px;">
|
||||||
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="white-space: nowrap !important; text-align:left !important">SNo</th>
|
<th style="white-space: nowrap !important; text-align:left !important">SNo</th>
|
||||||
@ -839,8 +839,8 @@ if (!empty($getlogpodtl)) {
|
|||||||
<th style="white-space: nowrap !important; text-align:right !important">Basic Amount<?php echo "($INR)" ?></th>
|
<th style="white-space: nowrap !important; text-align:right !important">Basic Amount<?php echo "($INR)" ?></th>
|
||||||
<!-- <th>Received Qty</th>
|
<!-- <th>Received Qty</th>
|
||||||
<th>Rejected Qty</th>
|
<th>Rejected Qty</th>
|
||||||
<th>Pending Qty</th> -->
|
<th>Pending Qty</th>
|
||||||
<!-- <th>Tax Amount</th>
|
<th>Tax Amount</th>
|
||||||
<th>Total Order Amount</th> -->
|
<th>Total Order Amount</th> -->
|
||||||
<th>Action</th>
|
<th>Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -873,27 +873,24 @@ if (!empty($getlogpodtl)) {
|
|||||||
<button class="save-btn">✔</button>
|
<button class="save-btn">✔</button>
|
||||||
<button class="cancel-btn">✖</button>
|
<button class="cancel-btn">✖</button>
|
||||||
</div>
|
</div>
|
||||||
<?php }else{ echo !empty($record->LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-"; } ?>
|
<?php } else {
|
||||||
|
echo !empty($record->LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-";
|
||||||
|
} ?>
|
||||||
</td>
|
</td>
|
||||||
<td align="right"><?php echo $record->Quantity ?></td>
|
<td align="right"><?php echo $record->Quantity ?></td>
|
||||||
<td align="left"><?php echo $record->UOM ?></td>
|
<td align="left"><?php echo $record->UOM ?></td>
|
||||||
<td align="right"><?php echo $record->Rate ?></td>
|
<td align="right"><?php echo $record->Rate ?></td>
|
||||||
<td align="right"><?php echo $record->BasicValue ?></td>
|
<td align="right"><?php echo $record->BasicValue ?></td>
|
||||||
<!-- <td><?php echo $record->ReceivedQuantity ?></td> -->
|
<!-- <td><?php echo $record->ReceivedQuantity ?></td>
|
||||||
<!-- <td><?php echo $record->QuantityRejected ?></td> -->
|
<td><?php echo $record->QuantityRejected ?></td>
|
||||||
<!-- <td><?php echo $record->PendingQty ?></td> -->
|
<td><?php echo $record->PendingQty ?></td>
|
||||||
<!-- <td><?php echo $record->Taxamount ?></td>
|
<td><?php echo $record->Taxamount ?></td>
|
||||||
|
|
||||||
|
|
||||||
<td><?php echo $record->TotalOrderValue ?></td> -->
|
<td><?php echo $record->TotalOrderValue ?></td> -->
|
||||||
|
|
||||||
<input type="hidden" name="<?php echo 'Reqnumber' . $index ?>" id="<?php echo 'Reqnumber' . $index ?>" value="<?php echo $record->ReqNo; ?>" />
|
<input type="hidden" name="<?php echo 'Reqnumber' . $index ?>" id="<?php echo 'Reqnumber' . $index ?>" value="<?php echo $record->ReqNo; ?>" />
|
||||||
<input type="hidden" name="<?php echo 'departmentName' . $index ?>" id="<?php echo 'departmentName' . $index ?>" value="<?php echo $record->DepartmentName; ?>" />
|
<input type="hidden" name="<?php echo 'departmentName' . $index ?>" id="<?php echo 'departmentName' . $index ?>" value="<?php echo $record->DepartmentName; ?>" />
|
||||||
|
|
||||||
<!--<input type="hidden" name="<?php //echo 'AvlBudAmt'.$index
|
<!--<input type="hidden" name="<?php //echo 'AvlBudAmt'.$index ?>" id="<?php //echo 'AvlBudAmt'.$index ?>" value="<?php //echo $record->AvlBudAmt ; ?>" /> -->
|
||||||
?>" id="<?php //echo 'AvlBudAmt'.$index
|
|
||||||
?>" value="<?php //echo $record->AvlBudAmt ;
|
|
||||||
?>" /> -->
|
|
||||||
<input type="hidden" name="<?php echo 'AvlBudAmt' . $index ?>" id="<?php echo 'AvlBudAmt' . $index ?>" value="<?php echo "$AvlAmount"; ?>" />
|
<input type="hidden" name="<?php echo 'AvlBudAmt' . $index ?>" id="<?php echo 'AvlBudAmt' . $index ?>" value="<?php echo "$AvlAmount"; ?>" />
|
||||||
|
|
||||||
<input type="hidden" name="<?php echo 'LineItemNo' . $index ?>" id="<?php echo 'LineItemNo' . $index ?>" value="<?php echo $record->LineItemNo; ?>" />
|
<input type="hidden" name="<?php echo 'LineItemNo' . $index ?>" id="<?php echo 'LineItemNo' . $index ?>" value="<?php echo $record->LineItemNo; ?>" />
|
||||||
@ -933,9 +930,8 @@ if (!empty($getlogpodtl)) {
|
|||||||
<input type="hidden" name="<?php echo 'CustomSHCess' . $index ?>" id="<?php echo 'CustomSHCess' . $index ?>" value="<?php echo $record->CustomSHCess; ?>" />
|
<input type="hidden" name="<?php echo 'CustomSHCess' . $index ?>" id="<?php echo 'CustomSHCess' . $index ?>" value="<?php echo $record->CustomSHCess; ?>" />
|
||||||
<input type="hidden" name="<?php echo 'AfterCustomSHCess' . $index ?>" id="<?php echo 'AfterCustomSHCess' . $index ?>" value="<?php echo $record->AfterCustomSHCess; ?>" />
|
<input type="hidden" name="<?php echo 'AfterCustomSHCess' . $index ?>" id="<?php echo 'AfterCustomSHCess' . $index ?>" value="<?php echo $record->AfterCustomSHCess; ?>" />
|
||||||
|
|
||||||
<!-- <input type="hidden" name="<?php echo 'Grossdutypayable' . $index ?>" id="<?php echo 'Grossdutypayable' . $index ?>" value="<?php echo $record->Grossdutypayable; ?>" /> -->
|
<!-- <input type="hidden" name="<?php // echo 'Grossdutypayable' . $index ?>" id="<?php // echo 'Grossdutypayable' . $index ?>" value="<?php // echo $record->Grossdutypayable; ?>" /> -->
|
||||||
<!-- <input type="hidden" name="<?php echo 'QuantityKG' . $index ?>" id="<?php echo 'QuantityKG' . $index ?>" value="<?php echo $record->QuantityKG; ?>" />
|
<!-- <input type="hidden" name="<?php // echo 'QuantityKG' . $index ?>" id="<?php // echo 'QuantityKG' . $index ?>" value="<?php // echo $record->QuantityKG; ?>" />-->
|
||||||
-->
|
|
||||||
|
|
||||||
|
|
||||||
<input type="hidden" name="<?php echo 'BasicPriceInMTon' . $index ?>" id="<?php echo 'BasicPriceInMTonG' . $index ?>" value="<?php echo $record->BasicPriceInMTon; ?>" />
|
<input type="hidden" name="<?php echo 'BasicPriceInMTon' . $index ?>" id="<?php echo 'BasicPriceInMTonG' . $index ?>" value="<?php echo $record->BasicPriceInMTon; ?>" />
|
||||||
@ -945,8 +941,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <input type="hidden" name="<?php echo 'Grossdutypayable' . $index ?>" id="<?php echo 'Grossdutypayable' . $index ?>" value="<?php echo $record->Grossdutypayable; ?>" />
|
<!-- <input type="hidden" name="<?php // echo 'Grossdutypayable' . $index ?>" id="<?php // echo 'Grossdutypayable' . $index ?>" value="<?php // echo $record->Grossdutypayable; ?>" />-->
|
||||||
-->
|
|
||||||
|
|
||||||
<input type="hidden" name="<?php echo 'BasicINRValue' . $index ?>" id="<?php echo 'BasicINRValue' . $index ?>" value="<?php echo $record->BasicINRValue; ?>" />
|
<input type="hidden" name="<?php echo 'BasicINRValue' . $index ?>" id="<?php echo 'BasicINRValue' . $index ?>" value="<?php echo $record->BasicINRValue; ?>" />
|
||||||
|
|
||||||
@ -954,10 +949,10 @@ if (!empty($getlogpodtl)) {
|
|||||||
<input type="hidden" name="<?php echo 'ExchangeRate' . $index ?>" id="<?php echo 'ExchangeRate' . $index ?>" value="<?php echo $record->ExchangeRate; ?>" />
|
<input type="hidden" name="<?php echo 'ExchangeRate' . $index ?>" id="<?php echo 'ExchangeRate' . $index ?>" value="<?php echo $record->ExchangeRate; ?>" />
|
||||||
|
|
||||||
|
|
||||||
<!-- <input type="hidden" name="<?php echo 'AfterCustomEDcess' . $index ?>" id="<?php echo 'AfterCustomEDcess' . $index ?>" value="<?php echo $record->AfterCustomEdCess; ?>" /> -->
|
<!-- <input type="hidden" name="<?php // echo 'AfterCustomEDcess' . $index ?>" id="<?php // echo 'AfterCustomEDcess' . $index ?>" value="<?php // echo $record->AfterCustomEdCess; ?>" /> -->
|
||||||
|
|
||||||
|
|
||||||
<!-- <input type="hidden" name="<?php echo 'CustomEDcess' . $index ?>" id="<?php echo 'CustomEDcess' . $index ?>" value="<?php echo $record->CustomEdCess; ?>" /> -->
|
<!-- <input type="hidden" name="<?php // echo 'CustomEDcess' . $index ?>" id="<?php // echo 'CustomEDcess' . $index ?>" value="<?php // echo $record->CustomEdCess; ?>" /> -->
|
||||||
|
|
||||||
|
|
||||||
<input type="hidden" name="<?php echo 'FreightType' . $index ?>" id="<?php echo 'FreightType' . $index ?>" value="<?php echo $record->FreightType; ?>" />
|
<input type="hidden" name="<?php echo 'FreightType' . $index ?>" id="<?php echo 'FreightType' . $index ?>" value="<?php echo $record->FreightType; ?>" />
|
||||||
@ -972,7 +967,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
|
|
||||||
<input type="hidden" name="<?php echo 'Addinstruction' . $index ?>" id="<?php echo 'Addinstruction' . $index ?>" value="<?php echo $record->ServiceMaterialDescription; ?>" />
|
<input type="hidden" name="<?php echo 'Addinstruction' . $index ?>" id="<?php echo 'Addinstruction' . $index ?>" value="<?php echo $record->ServiceMaterialDescription; ?>" />
|
||||||
|
|
||||||
<!-- <input type="hidden" name="<?php echo 'AfterFreightValue' . $index ?>" id="<?php echo 'AfterFreightValue' . $index ?>" value="<?php echo $record->AfterFreightValue; ?>" /> -->
|
<!-- <input type="hidden" name="<?php // echo 'AfterFreightValue' . $index ?>" id="<?php // echo 'AfterFreightValue' . $index ?>" value="<?php // echo $record->AfterFreightValue; ?>" /> -->
|
||||||
|
|
||||||
|
|
||||||
<input type="hidden" name="<?php echo 'AssessableValue' . $index ?>" id="<?php echo 'AssessableValue' . $index ?>" value="<?php echo $record->AssessableValue; ?>" />
|
<input type="hidden" name="<?php echo 'AssessableValue' . $index ?>" id="<?php echo 'AssessableValue' . $index ?>" value="<?php echo $record->AssessableValue; ?>" />
|
||||||
@ -1079,11 +1074,10 @@ if (!empty($getlogpodtl)) {
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
|
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
@ -1265,7 +1259,6 @@ if (!empty($getlogpodtl)) {
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
@ -1279,9 +1272,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div> <!-- ends box-body -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="form-row px-4">
|
<div class="form-row px-4">
|
||||||
<label>Select Purchase Order File</label>
|
<label>Select Purchase Order File</label>
|
||||||
@ -1387,10 +1378,10 @@ if (!empty($getlogpodtl)) {
|
|||||||
</div> <!-- end card body-->
|
</div> <!-- end card body-->
|
||||||
</div> <!-- end card -->
|
</div> <!-- end card -->
|
||||||
</div><!-- end col-->
|
</div><!-- end col-->
|
||||||
</div>
|
</div><!-- end second row -->
|
||||||
</div> <!-- container -->
|
</div> <!-- end container fluid -->
|
||||||
</div> <!-- content -->
|
</div> <!-- end Content -->
|
||||||
</div>
|
</div> <!-- end content-page -->
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<div id="importpomodel" class="modal fade" tabindex="-1" role="dialog"
|
<div id="importpomodel" class="modal fade" tabindex="-1" role="dialog"
|
||||||
@ -1541,7 +1532,8 @@ if (!empty($getlogpodtl)) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<!-- <P id=labelRate> --> <label id=labelRate><?php echo "Rate in"; ?> <span class="text-danger">*</span></label><!-- </P> -->
|
<!-- <P id=labelRate> -->
|
||||||
|
<label id=labelRate><?php echo "Rate in"; ?> <span class="text-danger">*</span></label><!-- </P> -->
|
||||||
<div>
|
<div>
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'Rate', 'value' => set_value('Rate'), 'id' => 'Rate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Ratechange(),validateExceedLimit(),calculateFreight(0)');
|
$data = array('name' => 'Rate', 'value' => set_value('Rate'), 'id' => 'Rate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Ratechange(),validateExceedLimit(),calculateFreight(0)');
|
||||||
@ -3371,6 +3363,12 @@ if (!empty($getlogpodtl)) {
|
|||||||
$("#ItemName").val(obj.MaterialName);
|
$("#ItemName").val(obj.MaterialName);
|
||||||
$("#UOM").val(obj.UOM);
|
$("#UOM").val(obj.UOM);
|
||||||
$("#Quantity").val(obj.Quantity).trigger('change');
|
$("#Quantity").val(obj.Quantity).trigger('change');
|
||||||
|
$("#Rate").val(obj.material_rate);
|
||||||
|
if (obj.material_rate != 0) {
|
||||||
|
Ratechange();
|
||||||
|
validateExceedLimit();
|
||||||
|
calculateFreight(0);
|
||||||
|
}
|
||||||
RequistQuantity = obj.Quantity;
|
RequistQuantity = obj.Quantity;
|
||||||
reqq = RequistQuantity;
|
reqq = RequistQuantity;
|
||||||
//RequistQuantity=parseFloat($('#Quantity').val());
|
//RequistQuantity=parseFloat($('#Quantity').val());
|
||||||
@ -4284,7 +4282,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
var rowHtml = `
|
var rowHtml = `
|
||||||
<tr id="${temp}">
|
<tr id="${temp}">
|
||||||
<td align="left">${temp}</td>
|
<td align="left">${temp}</td>
|
||||||
<td align="left">${Reqnumber}</td>
|
<td align="center">${Reqnumber}</td>
|
||||||
<td align="left">${materialCode}</td>
|
<td align="left">${materialCode}</td>
|
||||||
<td align="left">${shorten}</td>`;
|
<td align="left">${shorten}</td>`;
|
||||||
if (PONOStatus === "PO_DRAFT" || PONOStatus === "PO_CREATED") {
|
if (PONOStatus === "PO_DRAFT" || PONOStatus === "PO_CREATED") {
|
||||||
@ -4296,7 +4294,9 @@ if (!empty($getlogpodtl)) {
|
|||||||
<button class="save-btn">✔</button>
|
<button class="save-btn">✔</button>
|
||||||
<button class="cancel-btn">✖</button>
|
<button class="cancel-btn">✖</button>
|
||||||
</div></td>`;
|
</div></td>`;
|
||||||
}else{ rowHtml += `<td>-</td>`; }
|
} else {
|
||||||
|
rowHtml += `<td>-</td>`;
|
||||||
|
}
|
||||||
rowHtml += `<td align="left">${quantity}</td>
|
rowHtml += `<td align="left">${quantity}</td>
|
||||||
<td align="left">${uom}</td>
|
<td align="left">${uom}</td>
|
||||||
<td align="left">${itemRate}</td>
|
<td align="left">${itemRate}</td>
|
||||||
@ -4622,7 +4622,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
//$('#txtToatlOrder').val(parseFloat(TotalOrderValue)).toFixed(2);
|
//$('#txtToatlOrder').val(parseFloat(TotalOrderValue)).toFixed(2);
|
||||||
//var Aft=$('#AfterLandingCharge').val();
|
//var Aft=$('#AfterLandingCharge').val();
|
||||||
//console.log(Aft);
|
//console.log(Aft);
|
||||||
var rows = document.getElementById('ImportTax').rows.length;
|
var rows = $('#ImportTax tbody tr').length;
|
||||||
var i = 0;
|
var i = 0;
|
||||||
do {
|
do {
|
||||||
i += 1;
|
i += 1;
|
||||||
@ -5047,7 +5047,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function populateValueMainFormForEditImportTax() {
|
function populateValueMainFormForEditImportTax() {
|
||||||
var rows = document.getElementById('ImportTax').rows.length;
|
var rows = $('#ImportTax tbody tr').length;
|
||||||
var TotalLanding = 0;
|
var TotalLanding = 0;
|
||||||
|
|
||||||
var TotalCustom = 0;
|
var TotalCustom = 0;
|
||||||
@ -5215,7 +5215,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
|
|
||||||
|
|
||||||
function populateValueMainFormForupdateImportTax() {
|
function populateValueMainFormForupdateImportTax() {
|
||||||
var rows = document.getElementById('ImportTax').rows.length;
|
var rows = $('#ImportTax tbody tr').length;
|
||||||
var TotalFreight = 0;
|
var TotalFreight = 0;
|
||||||
var i = 0;
|
var i = 0;
|
||||||
do {
|
do {
|
||||||
@ -5504,7 +5504,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
formData.append('txtDeletedRow', txtDeletedRow);
|
formData.append('txtDeletedRow', txtDeletedRow);
|
||||||
formData.append('textStatus', stat);
|
formData.append('textStatus', stat);
|
||||||
$('#loader').show();
|
$('#loader').show();
|
||||||
disableButtons();
|
// disableButtons();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
// data:$('.ImportPO').serialize()+"&txtRowCount="+Row+"&txtDeletedRow="+txtDeletedRow+"&textStatus="+stat,
|
// data:$('.ImportPO').serialize()+"&txtRowCount="+Row+"&txtDeletedRow="+txtDeletedRow+"&textStatus="+stat,
|
||||||
data: formData,
|
data: formData,
|
||||||
@ -5525,11 +5525,11 @@ if (!empty($getlogpodtl)) {
|
|||||||
//$('#SpcialInstruction').val('');
|
//$('#SpcialInstruction').val('');
|
||||||
//$('#txtDeliveryAddress').val('');
|
//$('#txtDeliveryAddress').val('');
|
||||||
window.location = "purchaseorderListing";
|
window.location = "purchaseorderListing";
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
alert("Error");
|
alert("Error");
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -315,6 +315,7 @@
|
|||||||
<select name="status" id="non_igr_status" class="form-control">
|
<select name="status" id="non_igr_status" class="form-control">
|
||||||
<option value="Draft">Draft</option>
|
<option value="Draft">Draft</option>
|
||||||
<option value="Completed">Completed</option>
|
<option value="Completed">Completed</option>
|
||||||
|
<option value="Canceled">Canceled</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -113,16 +113,18 @@
|
|||||||
<br>
|
<br>
|
||||||
<div style="margin-left:auto">
|
<div style="margin-left:auto">
|
||||||
<div class="form-check" style="margin-right: 25px;">
|
<div class="form-check" style="margin-right: 25px;">
|
||||||
|
<form id="archiveFormId" action="<?php echo base_url()?>/readFactoryMachineMasterDetails" method="post">
|
||||||
<input class="form-check-input" type="checkbox" id="showArchiveId"
|
<input class="form-check-input" type="checkbox" id="showArchiveId"
|
||||||
name="showArchive" value="1" onchange="showArchiveList()"
|
name="showArchive" value="1" <?php echo $showArchive ? "checked" : " " ?>
|
||||||
style="width: 18px; height: 18px;">
|
style="width: 18px; height: 18px;">
|
||||||
<label class="form-check-label" for="showArchiveId"
|
<label class="form-check-label" for="showArchiveId"
|
||||||
style="font-size: 1rem; margin-left: 8px;">
|
style="font-size: 1rem; margin-left: 8px;">
|
||||||
Show Archive
|
Show Archive
|
||||||
</label>
|
</label>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card-body" style="overflow-x:scroll;">
|
<div class="card-body" style="overflow-x:scroll;">
|
||||||
|
|
||||||
@ -147,11 +149,7 @@
|
|||||||
foreach ($masterData as $record) {
|
foreach ($masterData as $record) {
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<tr class="<?php if ($record['is_active'] == 0) {
|
<tr>
|
||||||
echo "deactivatedRow";
|
|
||||||
} ?>" style="<?php if ($record['is_active'] == 0) {
|
|
||||||
echo "display:none";
|
|
||||||
} ?>">
|
|
||||||
|
|
||||||
<td><?php echo $record['machine_name']; ?></td>
|
<td><?php echo $record['machine_name']; ?></td>
|
||||||
<td><?php echo $record['machine_type'] ?></td>
|
<td><?php echo $record['machine_type'] ?></td>
|
||||||
@ -260,30 +258,11 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
function showArchiveList() {
|
</script>
|
||||||
let isChecked = $("#showArchiveId").prop('checked');
|
|
||||||
|
<script>
|
||||||
// Show or hide the rows based on checkbox status
|
$(document).on("change", "#showArchiveId", function () {
|
||||||
$(".deactivatedRow").each(function () {
|
console.log("Checkbox changed, submitting form...");
|
||||||
if (isChecked) {
|
$("#archiveFormId").submit();
|
||||||
$(this).show();
|
});
|
||||||
} else {
|
|
||||||
$(this).hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
let table = $('#datatable').DataTable();
|
|
||||||
|
|
||||||
showArchiveList();
|
|
||||||
|
|
||||||
table.on('draw', function () {
|
|
||||||
showArchiveList();
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -370,7 +370,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
|
|||||||
$("#PODate").datepicker({
|
$("#PODate").datepicker({
|
||||||
minDate: d,
|
minDate: d,
|
||||||
maxDate: 'now',
|
maxDate: 'now',
|
||||||
dateFormat: 'dd-mm-yy',
|
format: 'dd-mm-yy',
|
||||||
changeMonth: true,
|
changeMonth: true,
|
||||||
changeYear: true,
|
changeYear: true,
|
||||||
yearRange: '-100:+0'
|
yearRange: '-100:+0'
|
||||||
@ -380,7 +380,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
|
|||||||
$("#Exchangerateon").datepicker({
|
$("#Exchangerateon").datepicker({
|
||||||
minDate: m,
|
minDate: m,
|
||||||
//maxDate : 'now',
|
//maxDate : 'now',
|
||||||
dateFormat: 'dd-mm-yy',
|
format: 'dd-mm-yy',
|
||||||
changeMonth: true,
|
changeMonth: true,
|
||||||
changeYear: true,
|
changeYear: true,
|
||||||
yearRange: '-100:+0'
|
yearRange: '-100:+0'
|
||||||
@ -820,9 +820,10 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div class="form-row table-responsive" style="padding-bottom: 30px;">
|
<div class="form-row">
|
||||||
<table id="ImportTax" class="table table-bordered table-hover mb-0"
|
<div class="table-responsive" style="padding-bottom: 30px;">
|
||||||
style="font-size:12px;">
|
<table id="ImportTax" class="table nowrap table-bordered table-hover mb-0" style="font-size:12px;">
|
||||||
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="white-space: nowrap !important;">SNo</th>
|
<th style="white-space: nowrap !important;">SNo</th>
|
||||||
@ -848,6 +849,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label>Total Landing Charge <?php echo "($INR)" ?></label>
|
<label>Total Landing Charge <?php echo "($INR)" ?></label>
|
||||||
@ -2272,6 +2274,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
$("#PaymentTerms").trigger('change');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@ -2391,10 +2394,16 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
|
|||||||
$("#ItemName").val(obj.MaterialName);
|
$("#ItemName").val(obj.MaterialName);
|
||||||
$("#UOM").val(obj.UOM);
|
$("#UOM").val(obj.UOM);
|
||||||
$("#Quantity").val(obj.Quantity);
|
$("#Quantity").val(obj.Quantity);
|
||||||
|
$("#Rate").val(obj.material_rate);
|
||||||
RequistQuantity = obj.Quantity;
|
RequistQuantity = obj.Quantity;
|
||||||
unit = obj.UOM;
|
unit = obj.UOM;
|
||||||
// document.getElementById("labelPurchaseRate").innerHTML ='purchase rate [Basic]/'+unit;
|
// document.getElementById("labelPurchaseRate").innerHTML ='purchase rate [Basic]/'+unit;
|
||||||
// document.getElementById("labelEditPurchaseRate").innerHTML ='purchase rate [Basic]/'+unit;
|
// document.getElementById("labelEditPurchaseRate").innerHTML ='purchase rate [Basic]/'+unit;
|
||||||
|
if(obj.material_rate != 0){
|
||||||
|
Ratechange();
|
||||||
|
validateExceedLimit();
|
||||||
|
calculateFreight(0);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -3921,7 +3930,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function populateValueMainFormForEditImportTax() {
|
function populateValueMainFormForEditImportTax() {
|
||||||
var rows = document.getElementById('ImportTax').rows.length;
|
var rows = $('#ImportTax tbody tr').length;
|
||||||
var TotalLanding = 0;
|
var TotalLanding = 0;
|
||||||
var TotalHighseas = 0;
|
var TotalHighseas = 0;
|
||||||
var TotalCustom = 0;
|
var TotalCustom = 0;
|
||||||
@ -4195,8 +4204,8 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
|
|||||||
formData.append('txtRowCount', txtRowCount);
|
formData.append('txtRowCount', txtRowCount);
|
||||||
formData.append('txtDeletedRow', txtDeletedRow);
|
formData.append('txtDeletedRow', txtDeletedRow);
|
||||||
formData.append('textStatus', stat);
|
formData.append('textStatus', stat);
|
||||||
disableButtons();
|
// disableButtons();
|
||||||
|
$('#loader').show();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
// data:$('.ImportPO').serialize()+"&txtRowCount="+txtRowCount+"&txtDeletedRow="+txtDeletedRow+"&textStatus="+stat,
|
// data:$('.ImportPO').serialize()+"&txtRowCount="+txtRowCount+"&txtDeletedRow="+txtDeletedRow+"&textStatus="+stat,
|
||||||
//data:$('.CreatealterPO').serialize()+"&TextRowCount="+TextRowCount+"&TextDeQletedRowCount="+TextDeletedRowCount+"&TextTotalOrderValueSummaryService="+TextTotalOrderValueSummaryService+"&TextSpcialInstruction="+TextSpcialInstruction+"&TextExchangerate"+ExcLandingCharge="+hangerate+"Status="+TextStatus,
|
//data:$('.CreatealterPO').serialize()+"&TextRowCount="+TextRowCount+"&TextDeQletedRowCount="+TextDeletedRowCount+"&TextTotalOrderValueSummaryService="+TextTotalOrderValueSummaryService+"&TextSpcialInstruction="+TextSpcialInstruction+"&TextExchangerate"+ExcLandingCharge="+hangerate+"Status="+TextStatus,
|
||||||
@ -4206,6 +4215,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
|
|||||||
processData: false,
|
processData: false,
|
||||||
contentType: false,
|
contentType: false,
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
$('#loader').hide();
|
||||||
if (data) {
|
if (data) {
|
||||||
// $('#content').loader('hide');
|
// $('#content').loader('hide');
|
||||||
alert(data);
|
alert(data);
|
||||||
@ -4214,18 +4224,19 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
|
|||||||
//$('#SpcialInstruction').val('');
|
//$('#SpcialInstruction').val('');
|
||||||
//$('#txtDeliveryAddress').val('');
|
//$('#txtDeliveryAddress').val('');
|
||||||
window.location = "purchaseorderListing";
|
window.location = "purchaseorderListing";
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
$('#loader').hide();
|
||||||
alert("Error");
|
alert("Error");
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
error: function(jqXHR, textStatus, errorThrown) {
|
error: function(jqXHR, textStatus, errorThrown) {
|
||||||
console.error("AJAX Error: " + textStatus + ": " + errorThrown);
|
console.error("AJAX Error: " + textStatus + ": " + errorThrown);
|
||||||
alert("Error: " + textStatus);
|
alert("Error: " + textStatus);
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -4333,11 +4344,11 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
|
|||||||
|
|
||||||
});
|
});
|
||||||
function Reset() {
|
function Reset() {
|
||||||
disableButtons();
|
// disableButtons();
|
||||||
location.reload();
|
location.reload();
|
||||||
setTimeout(function() {
|
// setTimeout(function() {
|
||||||
enableButtons();
|
// enableButtons();
|
||||||
}, 2000);
|
// }, 2000);
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -371,17 +371,17 @@
|
|||||||
|
|
||||||
<td style="max-width:80px;text-align:right;"><?php echo number_format($workedSalary, 2, '.', ''); ?></td>
|
<td style="max-width:80px;text-align:right;"><?php echo number_format($workedSalary, 2, '.', ''); ?></td>
|
||||||
|
|
||||||
<td style="max-width:80px;text-align:right;">
|
<td id="bassalary<?php echo $index ?>" style="max-width:80px;text-align:right;">
|
||||||
<?php $basicWorked = $workedSalary * 70 / 100;
|
<?php $basicWorked = $workedSalary * 70 / 100;
|
||||||
echo number_format($basicWorked, 2, '.', ''); ?>
|
echo number_format($basicWorked, 2, '.', ''); ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td style="max-width:80px;text-align:right;">
|
<td id="hrasalary<?php echo $index ?>" style="max-width:80px;text-align:right;">
|
||||||
<?php $hraWorked = $workedSalary * 30 / 100;
|
<?php $hraWorked = $workedSalary * 30 / 100;
|
||||||
echo number_format($hraWorked, 2, '.', ''); ?>
|
echo number_format($hraWorked, 2, '.', ''); ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td style="max-width:80px;text-align:right;">
|
<td id="grosalary<?php echo $index ?>" style="max-width:80px;text-align:right;">
|
||||||
<?php echo number_format($basicWorked + $hraWorked, 2, '.', ''); ?>
|
<?php echo number_format($basicWorked + $hraWorked, 2, '.', ''); ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
@ -583,17 +583,17 @@
|
|||||||
<?php echo number_format($sum_of_amount, 2, '.', ''); ?>
|
<?php echo number_format($sum_of_amount, 2, '.', ''); ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td style="max-width:80px;text-align:right;">
|
<td id="bassalary<?php echo $inx ?>" style="max-width:80px;text-align:right;">
|
||||||
<?php
|
<?php
|
||||||
echo number_format($basic_worked, 2, '.', ''); ?>
|
echo number_format($basic_worked, 2, '.', ''); ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td style="max-width:80px;text-align:right;">
|
<td id="hrasalary<?php echo $inx ?>" style="max-width:80px;text-align:right;">
|
||||||
<?php
|
<?php
|
||||||
echo number_format($hra_worked, 2, '.', ''); ?>
|
echo number_format($hra_worked, 2, '.', ''); ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td style="max-width:80px;text-align:right;">
|
<td id="grosalary<?php echo $inx ?>" style="max-width:80px;text-align:right;">
|
||||||
<?php echo number_format($basic_worked + $hra_worked, 2, '.', ''); ?>
|
<?php echo number_format($basic_worked + $hra_worked, 2, '.', ''); ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
@ -653,11 +653,11 @@
|
|||||||
<?php if (!empty($record->payroll_id)) { ?> title="Payslip Calculated"
|
<?php if (!empty($record->payroll_id)) { ?> title="Payslip Calculated"
|
||||||
style="text-align:right;color:blue;" <?php }else{ ?>style="text-align:right;" <?php } ?>>
|
style="text-align:right;color:blue;" <?php }else{ ?>style="text-align:right;" <?php } ?>>
|
||||||
<?php if (!empty($record->driver_final_payment)) {
|
<?php if (!empty($record->driver_final_payment)) {
|
||||||
echo $record->driver_final_payment;
|
echo ($basic_worked + $hra_worked + $record->Festival_Bonus)-($record->Monthly_Due+$record->esi_amount+$record->pf_amount);
|
||||||
$estTotal[] = $record->driver_final_payment;
|
$estTotal[] = ($basic_worked + $hra_worked + $record->Festival_Bonus)-($record->Monthly_Due+$record->esi_amount+$record->pf_amount);
|
||||||
} else {
|
} else {
|
||||||
echo $empSalary[$i];
|
echo ($basic_worked + $hra_worked + $record->Festival_Bonus)-($record->Monthly_Due+$record->esi_amount+$record->pf_amount);
|
||||||
$estTotal[] = $empSalary[$i];
|
$estTotal[] = ($basic_worked + $hra_worked + $record->Festival_Bonus)-($record->Monthly_Due+$record->esi_amount+$record->pf_amount);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@ -898,8 +898,7 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
if (data) {
|
if (data) {
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
// alert(data);
|
alert(data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1145,10 +1144,16 @@ $(document).ready(function () {
|
|||||||
// console.log(sno);return true;
|
// console.log(sno);return true;
|
||||||
|
|
||||||
var driverEarn = parseFloat(document.getElementById('ttlsalary' + sno).textContent);
|
var driverEarn = parseFloat(document.getElementById('ttlsalary' + sno).textContent);
|
||||||
|
var grosssalary = parseFloat(document.getElementById('grosalary' + sno).textContent);
|
||||||
|
var basicsalary = parseFloat(document.getElementById('bassalary' + sno).textContent);
|
||||||
|
var hrasalary = parseFloat(document.getElementById('hrasalary' + sno).textContent);
|
||||||
|
|
||||||
var Festivals = parseFloat(document.getElementById('Festival' + sno).textContent);
|
var Festivals = parseFloat(document.getElementById('Festival' + sno).textContent);
|
||||||
totalfestival[sno] = Festivals;
|
totalfestival[sno] = Festivals;
|
||||||
|
|
||||||
|
var ESI = parseFloat(document.getElementById('esiAmt' + sno).textContent);
|
||||||
|
var PF = parseFloat(document.getElementById('pfAmt' + sno).textContent);
|
||||||
|
|
||||||
var element = document.getElementById('loanatm' + sno);
|
var element = document.getElementById('loanatm' + sno);
|
||||||
|
|
||||||
var loanamt = parseFloat(element.value);
|
var loanamt = parseFloat(element.value);
|
||||||
@ -1172,6 +1177,7 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
var current_loan_amt = 0;
|
var current_loan_amt = 0;
|
||||||
var autoLoan = parseFloat(monthDue);
|
var autoLoan = parseFloat(monthDue);
|
||||||
|
console.log(autoLoan,"autoLoan");
|
||||||
var Balance_Amount = loanamt - paidamt;
|
var Balance_Amount = loanamt - paidamt;
|
||||||
|
|
||||||
if (autoLoan > Balance_Amount) {
|
if (autoLoan > Balance_Amount) {
|
||||||
@ -1182,28 +1188,28 @@ $(document).ready(function () {
|
|||||||
current_loan_amt = autoLoan;
|
current_loan_amt = autoLoan;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isNaN(driverEarn)) { driverEarn = 0; }
|
if (isNaN(basicsalary)) { basicsalary = 0; }
|
||||||
|
if (isNaN(hrasalary)) { hrasalary = 0; }
|
||||||
|
|
||||||
|
|
||||||
|
var driverSalaryAdd = basicsalary + hrasalary + Festivals;
|
||||||
|
console.log('bas + hra + bon ',driverSalaryAdd);
|
||||||
|
|
||||||
|
var driverSalarySub = current_loan_amt+ESI + PF ;
|
||||||
|
console.log("L + E + P ",current_loan_amt);
|
||||||
|
|
||||||
var driverSalaryAdd = driverEarn + Festivals;
|
|
||||||
|
|
||||||
var driverSalarySub = current_loan_amt;
|
|
||||||
console.log(current_loan_amt);
|
|
||||||
|
|
||||||
|
|
||||||
var driverMonthSalary = driverSalaryAdd - driverSalarySub
|
var driverMonthSalary = driverSalaryAdd - driverSalarySub
|
||||||
var driverSalary = Math.round(driverMonthSalary);
|
var driverSalary = Math.round(driverMonthSalary);
|
||||||
|
console.log("Sal ",driverSalary);
|
||||||
|
|
||||||
|
|
||||||
var cals = (driverSalary).toFixed(0);
|
var cals = (driverSalary).toFixed(0);
|
||||||
|
|
||||||
document.getElementById("empsal" + sno).innerHTML = cals;
|
document.getElementById("empsal" + sno).innerHTML = cals;
|
||||||
|
|
||||||
// copied from calculategrandtotal() because we need those two only thats why
|
// copied from calculategrandtotal() because we need those two only thats why
|
||||||
var AutoLoanDueIndex = 21;
|
var AutoLoanDueIndex = 22;
|
||||||
var AutoLoanDue = 0;
|
var AutoLoanDue = 0;
|
||||||
$('#monthlylistings tbody tr').each(function() {
|
$('#monthlylistings tbody tr').each(function() {
|
||||||
var value = $(this).find('td').eq(AutoLoanDueIndex).text();
|
var value = $(this).find('td').eq(AutoLoanDueIndex).text();
|
||||||
@ -1211,7 +1217,7 @@ $(document).ready(function () {
|
|||||||
});
|
});
|
||||||
$('#monthloan').text(AutoLoanDue);
|
$('#monthloan').text(AutoLoanDue);
|
||||||
|
|
||||||
var FestivalBonusIndex = 23;
|
var FestivalBonusIndex = 24;
|
||||||
var FestivalBonus = 0;
|
var FestivalBonus = 0;
|
||||||
$('#monthlylistings tbody tr').each(function() {
|
$('#monthlylistings tbody tr').each(function() {
|
||||||
var value = $(this).find('td').eq(FestivalBonusIndex).text();
|
var value = $(this).find('td').eq(FestivalBonusIndex).text();
|
||||||
@ -1219,7 +1225,7 @@ $(document).ready(function () {
|
|||||||
});
|
});
|
||||||
$('#fest').text(FestivalBonus);
|
$('#fest').text(FestivalBonus);
|
||||||
|
|
||||||
var EstimateIndex = 24;
|
var EstimateIndex = 25;
|
||||||
var Estimate = 0;
|
var Estimate = 0;
|
||||||
$('#monthlylistings tbody tr').each(function() {
|
$('#monthlylistings tbody tr').each(function() {
|
||||||
var value = $(this).find('td').eq(EstimateIndex).text();
|
var value = $(this).find('td').eq(EstimateIndex).text();
|
||||||
@ -1231,7 +1237,7 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
function calculategrandtotal()
|
function calculategrandtotal()
|
||||||
{
|
{
|
||||||
var AutoLoanDueIndex = 21;
|
var AutoLoanDueIndex = 22;
|
||||||
var AutoLoanDue = 0;
|
var AutoLoanDue = 0;
|
||||||
$('#monthlylistings tbody tr').each(function() {
|
$('#monthlylistings tbody tr').each(function() {
|
||||||
var value = $(this).find('td').eq(AutoLoanDueIndex).text();
|
var value = $(this).find('td').eq(AutoLoanDueIndex).text();
|
||||||
@ -1239,7 +1245,7 @@ $(document).ready(function () {
|
|||||||
});
|
});
|
||||||
$('#monthloan').text(AutoLoanDue);
|
$('#monthloan').text(AutoLoanDue);
|
||||||
|
|
||||||
var TDSDeductionsIndex = 22;
|
var TDSDeductionsIndex = 23;
|
||||||
var TDSDeductions = 0;
|
var TDSDeductions = 0;
|
||||||
$('#monthlylistings tbody tr').each(function() {
|
$('#monthlylistings tbody tr').each(function() {
|
||||||
var value = $(this).find('td').eq(TDSDeductionsIndex).text();
|
var value = $(this).find('td').eq(TDSDeductionsIndex).text();
|
||||||
@ -1247,7 +1253,7 @@ $(document).ready(function () {
|
|||||||
});
|
});
|
||||||
$('#other').text(TDSDeductions);
|
$('#other').text(TDSDeductions);
|
||||||
|
|
||||||
var FestivalBonusIndex = 23;
|
var FestivalBonusIndex = 24;
|
||||||
var FestivalBonus = 0;
|
var FestivalBonus = 0;
|
||||||
$('#monthlylistings tbody tr').each(function() {
|
$('#monthlylistings tbody tr').each(function() {
|
||||||
var value = $(this).find('td').eq(FestivalBonusIndex).text();
|
var value = $(this).find('td').eq(FestivalBonusIndex).text();
|
||||||
@ -1255,7 +1261,7 @@ $(document).ready(function () {
|
|||||||
});
|
});
|
||||||
$('#fest').text(FestivalBonus);
|
$('#fest').text(FestivalBonus);
|
||||||
|
|
||||||
var EstimateIndex = 24;
|
var EstimateIndex = 25;
|
||||||
var Estimate = 0;
|
var Estimate = 0;
|
||||||
$('#monthlylistings tbody tr').each(function() {
|
$('#monthlylistings tbody tr').each(function() {
|
||||||
var value = $(this).find('td').eq(EstimateIndex).text();
|
var value = $(this).find('td').eq(EstimateIndex).text();
|
||||||
|
|||||||
@ -291,9 +291,9 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
$("#PaymentTerms").trigger('change');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$('#drpSupplier').change(function() {
|
$('#drpSupplier').change(function() {
|
||||||
|
|
||||||
var id = $('#drpSupplier').val();
|
var id = $('#drpSupplier').val();
|
||||||
@ -434,6 +434,9 @@ if (!empty($INRSYMBOL)) {
|
|||||||
$("#Quantity").val(obj.Quantity);
|
$("#Quantity").val(obj.Quantity);
|
||||||
$("#Rate").val(obj.material_rate);
|
$("#Rate").val(obj.material_rate);
|
||||||
RequistQuantity = obj.Quantity;
|
RequistQuantity = obj.Quantity;
|
||||||
|
if(obj.material_rate != 0){
|
||||||
|
change();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -2029,8 +2032,8 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
<!-- <div>
|
<!-- <div>
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'PODate', 'value' => set_value('PODate', $CurrentDate), 'id' => 'PODate', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;');
|
// $data = array('name' => 'PODate', 'value' => set_value('PODate', $CurrentDate), 'id' => 'PODate', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;');
|
||||||
echo form_input($data);
|
// echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div> -->
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
@ -2103,7 +2106,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="payablefrom">Payable Terms</label>
|
<label for="payablefrom">Payable Terms<span class="text-danger">*</span></label>
|
||||||
<?php
|
<?php
|
||||||
if (!empty($Payment)) {
|
if (!empty($Payment)) {
|
||||||
$options6 = array("0" => 'Select Payment Terms ');
|
$options6 = array("0" => 'Select Payment Terms ');
|
||||||
@ -3683,7 +3686,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
function populateValueMainFormForEditRevenueTax() {
|
function populateValueMainFormForEditRevenueTax() {
|
||||||
|
|
||||||
var rows = document.getElementById('revenueTax').rows.length;
|
var rows = $('#revenueTax tbody tr').length;
|
||||||
//alert(rows);
|
//alert(rows);
|
||||||
var totBasicAmt = 0;
|
var totBasicAmt = 0;
|
||||||
var totDiscountAmt = 0;
|
var totDiscountAmt = 0;
|
||||||
@ -3946,7 +3949,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
// else {
|
// else {
|
||||||
|
|
||||||
var formData = new FormData($('.CreatePO')[0]);
|
var formData = new FormData($('.CreatePO')[0]);
|
||||||
disableButtons();
|
$('#loader').show();
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
@ -3955,6 +3958,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
processData: false,
|
processData: false,
|
||||||
contentType: false,
|
contentType: false,
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
$('#loader').hide();
|
||||||
if (data) {
|
if (data) {
|
||||||
|
|
||||||
alert(data);
|
alert(data);
|
||||||
@ -3963,19 +3967,20 @@ if (!empty($INRSYMBOL)) {
|
|||||||
//$('#SpcialInstruction').val('');
|
//$('#SpcialInstruction').val('');
|
||||||
//$('#txtDeliveryAddress').val('');
|
//$('#txtDeliveryAddress').val('');
|
||||||
window.location = "purchaseorderListing";
|
window.location = "purchaseorderListing";
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
alert("Error");
|
alert("Error");
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
error: function(jqXHR, textStatus, errorThrown) {
|
error: function(jqXHR, textStatus, errorThrown) {
|
||||||
|
$('#loader').hide();
|
||||||
console.error("AJAX Error: " + textStatus + ": " + errorThrown);
|
console.error("AJAX Error: " + textStatus + ": " + errorThrown);
|
||||||
alert("Error: " + textStatus);
|
alert("Error: " + textStatus);
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -4219,11 +4224,11 @@ if (!empty($INRSYMBOL)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Reset() {
|
function Reset() {
|
||||||
disableButtons();
|
// disableButtons();
|
||||||
location.reload();
|
location.reload();
|
||||||
setTimeout(function() {
|
// setTimeout(function() {
|
||||||
enableButtons();
|
// enableButtons();
|
||||||
}, 2000);
|
// }, 2000);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -97,19 +97,27 @@
|
|||||||
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton"
|
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton"
|
||||||
title="Reset"></i>
|
title="Reset"></i>
|
||||||
|
|
||||||
<div style="margin-left:auto">
|
|
||||||
<div class="form-check" style="margin-right: 25px;">
|
|
||||||
<input class="form-check-input" type="checkbox" id="showArchiveId" name="showArchive" value="1"
|
|
||||||
onchange="showArchiveList()" style="width: 18px; height: 18px;">
|
|
||||||
<label class="form-check-label" for="showArchiveId" style="font-size: 1rem; margin-left: 8px;">
|
|
||||||
Show Archive
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="error" id="error"></div>
|
<div class="error" id="error"></div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div style="margin-left:auto">
|
||||||
|
<div class="form-check" style="margin-right: 25px;">
|
||||||
|
<form id="archiveFormId" action="<?php echo base_url()?>/rawmaterialListing" method="post">
|
||||||
|
<input class="form-check-input" type="checkbox" id="showArchiveId"
|
||||||
|
name="showArchive" value="1" <?php echo $showArchive ? "checked" : " " ?>
|
||||||
|
style="width: 18px; height: 18px;">
|
||||||
|
<label class="form-check-label" for="showArchiveId"
|
||||||
|
style="font-size: 1rem; margin-left: 8px;">
|
||||||
|
Show Archive
|
||||||
|
</label>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="card-body" style="overflow-x:scroll;">
|
<div class="card-body" style="overflow-x:scroll;">
|
||||||
<table id="raw_material_list_table" class="table dt-responsive nowrap w-100">
|
<table id="raw_material_list_table" class="table dt-responsive nowrap w-100">
|
||||||
<thead>
|
<thead>
|
||||||
@ -134,12 +142,7 @@
|
|||||||
foreach ($userRecords as $record) {
|
foreach ($userRecords as $record) {
|
||||||
$date = date("Y-m-d");
|
$date = date("Y-m-d");
|
||||||
?>
|
?>
|
||||||
<tr class="<?php if ($record->IsActive == 0) {
|
<tr>
|
||||||
echo "deactivatedRow";
|
|
||||||
} ?>"
|
|
||||||
style="<?php if ($record->IsActive == 0) {
|
|
||||||
echo "display:none";
|
|
||||||
} ?>">
|
|
||||||
|
|
||||||
<?php if (date('d-m-Y', strtotime($record->CreatedDate)) == "30-11--0001") {
|
<?php if (date('d-m-Y', strtotime($record->CreatedDate)) == "30-11--0001") {
|
||||||
$cdate = '00-00-0000';
|
$cdate = '00-00-0000';
|
||||||
@ -501,32 +504,6 @@ $(document).ready(function () {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function showArchiveList() {
|
|
||||||
let isChecked = $("#showArchiveId").prop('checked');
|
|
||||||
|
|
||||||
console.log($(".deactivatedRow").length);
|
|
||||||
|
|
||||||
// Show or hide the rows based on checkbox status
|
|
||||||
$(".deactivatedRow").each(function () {
|
|
||||||
if (isChecked) {
|
|
||||||
$(this).show();
|
|
||||||
} else {
|
|
||||||
$(this).hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
let table = $('#raw_material_list_table').DataTable();
|
|
||||||
|
|
||||||
showArchiveList();
|
|
||||||
|
|
||||||
table.on('draw', function () {
|
|
||||||
showArchiveList();
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
function deleteMaterial(mid) {
|
function deleteMaterial(mid) {
|
||||||
|
|
||||||
@ -596,3 +573,10 @@ $(document).ready(function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).on("change", "#showArchiveId", function () {
|
||||||
|
console.log("Checkbox changed, submitting form...");
|
||||||
|
$("#archiveFormId").submit();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@ -208,6 +208,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
$("#PaymentTerms").trigger('change');
|
||||||
});
|
});
|
||||||
|
|
||||||
document.getElementById("Date").checked = true;
|
document.getElementById("Date").checked = true;
|
||||||
@ -369,6 +370,10 @@ if (!empty($INRSYMBOL)) {
|
|||||||
$('#otherdescription').show();
|
$('#otherdescription').show();
|
||||||
$('#OtheritemDescription').val(obj.MaterialDescription);
|
$('#OtheritemDescription').val(obj.MaterialDescription);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(obj.material_rate != 0){
|
||||||
|
Ratechange();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -1047,7 +1052,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div><!-- 6. form-row div closed here -->
|
</div><!-- 6. form-row div closed here -->
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="table-responsive" style="padding-bottom: 30px;">
|
<div class="table-responsive" style="padding-bottom: 30px;">
|
||||||
<table id="serviceTax" class="table table-bordered table-hover mb-0" style="font-size:12px;">
|
<table id="ServiceTable" class="table nowrap table-bordered table-hover mb-0" style="font-size:12px;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="white-space: nowrap !important;">SNo</th>
|
<th style="white-space: nowrap !important;">SNo</th>
|
||||||
@ -1066,7 +1071,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody id='ServiceAppend'>
|
<tbody id='ServiceAppend'>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table><!-- serviceTax table closed here -->
|
</table><!-- ServiceTable table closed here -->
|
||||||
</div>
|
</div>
|
||||||
</div><!-- 7. form-row div closed here -->
|
</div><!-- 7. form-row div closed here -->
|
||||||
|
|
||||||
@ -2096,7 +2101,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
function populateValueMainFormForEditServiceTax() {
|
function populateValueMainFormForEditServiceTax() {
|
||||||
|
|
||||||
var rows = document.getElementById('serviceTax').rows.length;
|
var rows = $('#ServiceTable tbody tr').length;
|
||||||
|
|
||||||
var TotCgst = 0;
|
var TotCgst = 0;
|
||||||
var TotSgst = 0;
|
var TotSgst = 0;
|
||||||
@ -2380,10 +2385,10 @@ if (!empty($INRSYMBOL)) {
|
|||||||
var AvlBudAmt = '<?php echo $AvlAmount ?>';
|
var AvlBudAmt = '<?php echo $AvlAmount ?>';
|
||||||
var txtTotalOrderValueSummary = $('#txtTotBasicAmount').val();
|
var txtTotalOrderValueSummary = $('#txtTotBasicAmount').val();
|
||||||
if (serviceValidate()) {
|
if (serviceValidate()) {
|
||||||
// if (document.getElementById('serviceTax').rows.length < 2) {
|
if (document.getElementById('ServiceTable').rows.length < 1) {
|
||||||
// alert('Please Select Line item to Create PO');
|
alert('Atleast One Line needed');
|
||||||
// return false;
|
return false;
|
||||||
// }
|
}
|
||||||
// else if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) {
|
// else if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) {
|
||||||
// alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
// alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||||
// return false;
|
// return false;
|
||||||
@ -2392,17 +2397,17 @@ if (!empty($INRSYMBOL)) {
|
|||||||
// alert('Please Enter Other Payable Terms Description');
|
// alert('Please Enter Other Payable Terms Description');
|
||||||
// $('#Otherpayment').focus();
|
// $('#Otherpayment').focus();
|
||||||
// return false;
|
// return false;
|
||||||
// } else if ($('#descofpo').val().trim() == '') {
|
} else if ($('#descofpo').val().trim() == '') {
|
||||||
// alert('Please Enter Description Of Service');
|
alert('Please Enter Description Of Service');
|
||||||
// $('#descofpo').focus();
|
$('#descofpo').focus();
|
||||||
// return false;
|
return false;
|
||||||
// } else if ($('#PoTypeOptions').val() == "0") {
|
// } else if ($('#PoTypeOptions').val() == "0") {
|
||||||
// alert('Please Select POType');
|
// alert('Please Select POType');
|
||||||
// $('#PoTypeOptions').focus();
|
// $('#PoTypeOptions').focus();
|
||||||
// return false;
|
// return false;
|
||||||
// } else {
|
} else {
|
||||||
var formData = new FormData($('.ServicePO')[0]);
|
var formData = new FormData($('.ServicePO')[0]);
|
||||||
disableButtons();
|
$('#loader').show();
|
||||||
console.log("inside add service purchase order view page");
|
console.log("inside add service purchase order view page");
|
||||||
|
|
||||||
console.log(formData);
|
console.log(formData);
|
||||||
@ -2415,6 +2420,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
processData: false,
|
processData: false,
|
||||||
contentType: false,
|
contentType: false,
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
$('#loader').hide();
|
||||||
if (data) {
|
if (data) {
|
||||||
alert(data);
|
alert(data);
|
||||||
$('#txtRowCount').val('');
|
$('#txtRowCount').val('');
|
||||||
@ -2422,17 +2428,18 @@ if (!empty($INRSYMBOL)) {
|
|||||||
$('#SpcialInstruction').val('');
|
$('#SpcialInstruction').val('');
|
||||||
$('#txtDeliveryAddress').val('');
|
$('#txtDeliveryAddress').val('');
|
||||||
window.location = "purchaseorderListing";
|
window.location = "purchaseorderListing";
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
} else {
|
} else {
|
||||||
|
$('#loader').hide();
|
||||||
alert("Error");
|
alert("Error");
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
error: function(jqXHR, textStatus, errorThrown) {
|
error: function(jqXHR, textStatus, errorThrown) {
|
||||||
console.error("AJAX Error: " + textStatus + ": " + errorThrown);
|
console.error("AJAX Error: " + textStatus + ": " + errorThrown);
|
||||||
alert("Error: " + textStatus);
|
alert("Error: " + textStatus);
|
||||||
setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -2584,11 +2591,11 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
|
|
||||||
function Reset() {
|
function Reset() {
|
||||||
disableButtons();
|
// disableButtons();
|
||||||
location.reload();
|
location.reload();
|
||||||
setTimeout(function() {
|
// setTimeout(function() {
|
||||||
enableButtons();
|
// enableButtons();
|
||||||
}, 2000);
|
// }, 2000);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -296,7 +296,7 @@
|
|||||||
|
|
||||||
<input type="text"
|
<input type="text"
|
||||||
value="<?= $month; ?>" name="month"
|
value="<?= $month; ?>" name="month"
|
||||||
class="form-control monthpicker" id="monthpicker">
|
class="form-control monthpicker" id="monthpicker" readonly>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -666,7 +666,7 @@
|
|||||||
|
|
||||||
<!-- grade -->
|
<!-- grade -->
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="gradeId">grade</label>
|
<label for="gradeId">Grade</label>
|
||||||
<span class="badge mandatory">*</span>
|
<span class="badge mandatory">*</span>
|
||||||
<input type="text" class="form-control" id="gradeId" name="grade" value=""
|
<input type="text" class="form-control" id="gradeId" name="grade" value=""
|
||||||
required>
|
required>
|
||||||
@ -728,15 +728,13 @@
|
|||||||
<div class="form-row" id="batchCardRowId">
|
<div class="form-row" id="batchCardRowId">
|
||||||
|
|
||||||
<!-- batch card file upload -->
|
<!-- batch card file upload -->
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-4">
|
||||||
|
|
||||||
<label for="">Upload Batch Card</label>
|
<label for="">Upload Batch Card</label>
|
||||||
|
|
||||||
<div>
|
<br>
|
||||||
<input type="file" class="batchfile" name="batchCard[]">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<button type="button" class="btn btn-success btn-sm mt-2" id="batchCardAddBtnId">Add More</button>
|
<button type="button" class="btn btn-success btn-sm mt-2" id="batchCardAddBtnId">Add File</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -888,7 +886,7 @@
|
|||||||
|
|
||||||
<!-- grade -->
|
<!-- grade -->
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="editGradeId">grade</label>
|
<label for="editGradeId">Grade</label>
|
||||||
<span class="badge mandatory">*</span>
|
<span class="badge mandatory">*</span>
|
||||||
<input type="text" class="form-control" id="editGradeId" name="grade" value=""
|
<input type="text" class="form-control" id="editGradeId" name="grade" value=""
|
||||||
required>
|
required>
|
||||||
@ -950,15 +948,12 @@
|
|||||||
<div class="form-row" id="editBatchCardRowId">
|
<div class="form-row" id="editBatchCardRowId">
|
||||||
|
|
||||||
<!-- batch card file upload -->
|
<!-- batch card file upload -->
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-4">
|
||||||
|
|
||||||
<label for="editBatchCardId">Upload Batch Card</label>
|
<label for="editBatchCardId">Upload Batch Card</label>
|
||||||
|
<br>
|
||||||
|
|
||||||
<div>
|
<button type="button" class="btn btn-success btn-sm mt-2" id="editBatchCardAddBtnId">Add File</button>
|
||||||
<input type="file" class="editBatchFile " name="batchCard[]">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<button type="button" class="btn btn-success btn-sm mt-2" id="editBatchCardAddBtnId">Add More</button>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -1284,7 +1279,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let string = `<div class="form-group col-md-3 batch-container">
|
let string = `<div class="form-group col-md-4 batch-container">
|
||||||
<label for="">Change Batch Card</label>
|
<label for="">Change Batch Card</label>
|
||||||
<input type="file" class="editBatchFile additionalBatchFile" name="batchCard[]" >
|
<input type="file" class="editBatchFile additionalBatchFile" name="batchCard[]" >
|
||||||
<p>( Previously Uploaded File ${element.client_given_name} )</p>
|
<p>( Previously Uploaded File ${element.client_given_name} )</p>
|
||||||
@ -1680,7 +1675,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let string = `<div class="form-group col-md-3 batch-container">
|
let string = `<div class="form-group col-md-4 batch-container">
|
||||||
<label for="">Upload Batch Card</label>
|
<label for="">Upload Batch Card</label>
|
||||||
<input type="file" class="batchfile" name="batchCard[]" >
|
<input type="file" class="batchfile" name="batchCard[]" >
|
||||||
<button type="button" class="btn btn-danger btn-sm mt-2 removeBatch">Remove</button>
|
<button type="button" class="btn btn-danger btn-sm mt-2 removeBatch">Remove</button>
|
||||||
@ -1705,7 +1700,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let string = `<div class="form-group col-md-3 batch-container">
|
let string = `<div class="form-group col-md-4 batch-container">
|
||||||
<label for="">Upload Batch Card</label>
|
<label for="">Upload Batch Card</label>
|
||||||
<input type="file" class="editBatchFile" name="batchCard[]" >
|
<input type="file" class="editBatchFile" name="batchCard[]" >
|
||||||
<button type="button" class="btn btn-danger btn-sm mt-2 removeBatch">Remove</button>
|
<button type="button" class="btn btn-danger btn-sm mt-2 removeBatch">Remove</button>
|
||||||
|
|||||||
@ -13,6 +13,14 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.grab {
|
||||||
|
cursor: grab; /* Default open-hand cursor */
|
||||||
|
}
|
||||||
|
|
||||||
|
.grab:active {
|
||||||
|
cursor: grabbing; /* Closed-hand cursor when dragging */
|
||||||
|
}
|
||||||
|
|
||||||
.fht-table td {
|
.fht-table td {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
@ -297,12 +305,26 @@
|
|||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
<input type="text" name="month" id="month" value="<?php echo "$month" ?>"
|
<input type="text" name="month" id="month" value="<?php echo "$month" ?>"
|
||||||
class="form-control mt-2" data-provide="datepicker"
|
class="form-control mt-2" data-provide="datepicker"
|
||||||
data-date-format="M-yyyy" data-date-min-view-mode="1">
|
data-date-format="M-yyyy" data-date-min-view-mode="1" readonly>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-2">
|
<div class="form-group col-md-3">
|
||||||
<button type="submit" class="btn btn-success"> Change Month </button>
|
<button type="submit" class="btn btn-success"> Change Month </button>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
//check it is current month , then only show the custom option
|
||||||
|
if($month == date('M-Y') ){
|
||||||
|
?>
|
||||||
|
<button type="button" class="btn" style="background-color:maroon;color:white" data-target="#customizeModalId"
|
||||||
|
data-toggle="modal">
|
||||||
|
Customize
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1"></div>
|
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<div class="dropdown float-right">
|
<div class="dropdown float-right">
|
||||||
<a href="#" class="dropdown-toggle arrow-none" data-toggle="dropdown"
|
<a href="#" class="dropdown-toggle arrow-none" data-toggle="dropdown"
|
||||||
@ -318,6 +340,91 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<form action="<?= base_url('bagStockDetails'); ?>" method="post">
|
||||||
|
|
||||||
|
<!-- modal placed here for submission of form -->
|
||||||
|
<!---------------------------------------
|
||||||
|
this modal is used to customize table header
|
||||||
|
1)list table header order
|
||||||
|
2)choose which material/machines you want
|
||||||
|
------------------------------------------------------------>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div class="modal fade" id="customizeModalId" tabindex="-1" role="dialog" aria-labelledby="customizeModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-md">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title" id="customizeModalLabel">Customize</h4>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row">
|
||||||
|
<!-- Dropdown to add back removed items -->
|
||||||
|
<div class="col">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="customizeHeader"> Add For This Month </label>
|
||||||
|
<select id="customizeHeader" class="form-control" onchange="addBackToList()">
|
||||||
|
<option value="">Select</option>
|
||||||
|
<?php
|
||||||
|
foreach($activeBagMaterials as $index => $activeBagMaterial){ ?>
|
||||||
|
|
||||||
|
<option value="<?=$activeBagMaterial['MaterialCode']?>">
|
||||||
|
<?=$activeBagMaterial['MaterialCode']?> - <?=$activeBagMaterial['MaterialName']?>
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<h5>List of Selected Items</h5>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="selectedItemsContainer">
|
||||||
|
<ul id="sortableList">
|
||||||
|
<?php foreach ($bagMaterials as $bagMaterial): ?>
|
||||||
|
|
||||||
|
<div class="sortable-item" draggable="true" id="<?=$bagMaterial['MaterialCode']?>_container">
|
||||||
|
<input type = "checkbox"
|
||||||
|
id = "<?=$bagMaterial['MaterialCode']?>_checkboxId"
|
||||||
|
name = "customisedMaterialCodes[]"
|
||||||
|
value = "<?= $bagMaterial['MaterialCode'] ?>"
|
||||||
|
onclick = "removeSelectedMaterial(this)"
|
||||||
|
checked>
|
||||||
|
<label class="grab" for="<?= $bagMaterial['MaterialCode'] ?>_checkboxId">
|
||||||
|
<?= $bagMaterial['MaterialCode'] ?> - <?= $bagMaterial['MaterialName']; ?>
|
||||||
|
</label>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-primary float-right"> Apply </button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- hidden fields -->
|
||||||
|
<input type="hidden" name="month" id="month" value="<?php echo "$month" ?>"
|
||||||
|
class="form-control mt-2" data-provide="datepicker"
|
||||||
|
data-date-format="M-yyyy" data-date-min-view-mode="1">
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
@ -327,7 +434,7 @@
|
|||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<th class="celda_encabezado_general" colspan="1">material </th>
|
<th class="celda_encabezado_general" colspan="1">Material </th>
|
||||||
|
|
||||||
<?php foreach($bagMaterials as $bagMaterial){ ?>
|
<?php foreach($bagMaterials as $bagMaterial){ ?>
|
||||||
<!-- this will loop till materials present -->
|
<!-- this will loop till materials present -->
|
||||||
@ -1081,3 +1188,88 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
|
const list = document.getElementById("sortableList");
|
||||||
|
|
||||||
|
let draggedItem = null;
|
||||||
|
|
||||||
|
function attachDragEvents(item) {
|
||||||
|
item.setAttribute("draggable", "true");
|
||||||
|
|
||||||
|
item.addEventListener("dragstart", (event) => {
|
||||||
|
draggedItem = event.target;
|
||||||
|
event.target.classList.add("dragging");
|
||||||
|
});
|
||||||
|
|
||||||
|
item.addEventListener("dragend", (event) => {
|
||||||
|
event.target.classList.remove("dragging");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
list.addEventListener("dragover", (event) => {
|
||||||
|
event.preventDefault(); // Allow dropping
|
||||||
|
const dragging = document.querySelector(".dragging");
|
||||||
|
const closestItem = getClosestItem(list, event.clientY);
|
||||||
|
|
||||||
|
if (closestItem) {
|
||||||
|
list.insertBefore(dragging, closestItem);
|
||||||
|
} else {
|
||||||
|
list.appendChild(dragging);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function getClosestItem(container, y) {
|
||||||
|
const items = [...container.querySelectorAll(".sortable-item:not(.dragging)")];
|
||||||
|
|
||||||
|
return items.reduce((closest, child) => {
|
||||||
|
const box = child.getBoundingClientRect();
|
||||||
|
const offset = y - box.top - box.height / 2;
|
||||||
|
|
||||||
|
return offset < 0 && offset > closest.offset
|
||||||
|
? { offset, element: child }
|
||||||
|
: closest;
|
||||||
|
}, { offset: Number.NEGATIVE_INFINITY }).element;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Attach drag events to existing items
|
||||||
|
document.querySelectorAll(".sortable-item").forEach(attachDragEvents);
|
||||||
|
|
||||||
|
window.removeSelectedMaterial = function (checkbox) {
|
||||||
|
let container = checkbox.closest(".sortable-item");
|
||||||
|
let materialCode = checkbox.value;
|
||||||
|
let materialName = container.querySelector("label").innerText;
|
||||||
|
|
||||||
|
container.remove();
|
||||||
|
};
|
||||||
|
|
||||||
|
window.addBackToList = function () {
|
||||||
|
let dropdown = document.getElementById("customizeHeader");
|
||||||
|
let selectedOption = dropdown.options[dropdown.selectedIndex];
|
||||||
|
|
||||||
|
if (selectedOption.value !== "") {
|
||||||
|
let materialCode = selectedOption.value;
|
||||||
|
let materialName = selectedOption.text;
|
||||||
|
|
||||||
|
let container = document.createElement("div");
|
||||||
|
container.classList.add("sortable-item");
|
||||||
|
container.id = materialCode + "_container";
|
||||||
|
container.innerHTML = `
|
||||||
|
<input type="checkbox" id="${materialCode}_checkboxId"
|
||||||
|
name="customisedMaterialCodes[]" value="${materialCode}"
|
||||||
|
onclick="removeSelectedMaterial(this)" checked>
|
||||||
|
<label class="grab" for="${materialCode}_checkboxId"> ${materialName} </label>
|
||||||
|
<br>
|
||||||
|
`;
|
||||||
|
|
||||||
|
attachDragEvents(container);
|
||||||
|
|
||||||
|
document.getElementById("sortableList").appendChild(container);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
@ -3,6 +3,15 @@
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.grab {
|
||||||
|
cursor: grab; /* Default open-hand cursor */
|
||||||
|
}
|
||||||
|
|
||||||
|
.grab:active {
|
||||||
|
cursor: grabbing; /* Closed-hand cursor when dragging */
|
||||||
|
}
|
||||||
|
|
||||||
.fht-table,
|
.fht-table,
|
||||||
.fht-table thead,
|
.fht-table thead,
|
||||||
.fht-table tfoot,
|
.fht-table tfoot,
|
||||||
@ -291,12 +300,27 @@ foreach ($period as $day) {
|
|||||||
<input type="text" name="month" id="month" value="<?php echo "$month" ?>"
|
<input type="text" name="month" id="month" value="<?php echo "$month" ?>"
|
||||||
class="form-control mt-2" data-provide="datepicker"
|
class="form-control mt-2" data-provide="datepicker"
|
||||||
style="z-index:30;"
|
style="z-index:30;"
|
||||||
data-date-format="M-yyyy" data-date-min-view-mode="1">
|
data-date-format="M-yyyy" data-date-min-view-mode="1" readonly>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-2">
|
<div class="form-group col-md-3">
|
||||||
<button type="submit" class="btn btn-success"> Change Month </button>
|
<button type="submit" class="btn btn-success"> Change Month </button>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
//check it is current month , then only show the custom option
|
||||||
|
if($month == date('M-Y') ){
|
||||||
|
?>
|
||||||
|
<button type="button" class="btn" style="background-color:maroon;color:white" data-target="#customizeModalId"
|
||||||
|
data-toggle="modal">
|
||||||
|
Customize
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1"></div>
|
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<div class="dropdown float-right">
|
<div class="dropdown float-right">
|
||||||
<a href="#" class="dropdown-toggle arrow-none" data-toggle="dropdown"
|
<a href="#" class="dropdown-toggle arrow-none" data-toggle="dropdown"
|
||||||
@ -312,6 +336,91 @@ foreach ($period as $day) {
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<form action="<?= base_url('dieselMachineDetails'); ?>" method="post">
|
||||||
|
|
||||||
|
<!-- modal placed here for submission of form -->
|
||||||
|
<!---------------------------------------
|
||||||
|
this modal is used to customize table header
|
||||||
|
1)list table header order
|
||||||
|
2)choose which material/machines you want
|
||||||
|
------------------------------------------------------------>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div class="modal fade" id="customizeModalId" tabindex="-1" role="dialog" aria-labelledby="customizeModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-md">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title" id="customizeModalLabel">Customize</h4>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row">
|
||||||
|
<!-- Dropdown to add back removed items -->
|
||||||
|
<div class="col">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="customizeHeader"> Add For This Month </label>
|
||||||
|
<select id="customizeHeader" class="form-control" onchange="addBackToList()">
|
||||||
|
<option value="">Select</option>
|
||||||
|
<?php
|
||||||
|
foreach($activeDieselMachines as $index => $activeDieselMachine){ ?>
|
||||||
|
|
||||||
|
<option value="<?=$activeDieselMachine['id']?>">
|
||||||
|
<?=$activeDieselMachine['id']?> - <?=$activeDieselMachine['machine_name']?>
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<h5>List of Selected Items</h5>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="selectedItemsContainer">
|
||||||
|
<ul id="sortableList">
|
||||||
|
<?php foreach ($dieselMachines as $dieselMachine): ?>
|
||||||
|
|
||||||
|
<div class="sortable-item" draggable="true" id="<?= $dieselMachine['id'] ?>_container">
|
||||||
|
<input type = "checkbox"
|
||||||
|
id = "<?= $dieselMachine['id'] ?>_checkboxId"
|
||||||
|
name = "customisedMachineCodes[]"
|
||||||
|
value = "<?= $dieselMachine['id'] ?>"
|
||||||
|
onclick = "removeSelectedMaterial(this)"
|
||||||
|
checked>
|
||||||
|
<label class="grab" for="<?= $dieselMachine['id'] ?>_checkboxId">
|
||||||
|
<?= $dieselMachine['id'] ?> - <?= $dieselMachine['machine_name']; ?>
|
||||||
|
</label>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-primary float-right"> Apply </button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- hidden fields -->
|
||||||
|
<input type="hidden" name="month" id="month" value="<?php echo "$month" ?>"
|
||||||
|
class="form-control mt-2" data-provide="datepicker"
|
||||||
|
data-date-format="M-yyyy" data-date-min-view-mode="1">
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
@ -364,14 +473,12 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
<tbody style="background-color: #fff;">
|
<tbody style="background-color: #fff;">
|
||||||
|
|
||||||
<?php if (!empty($groupedDieselMachineStockDetails)) {
|
<?php if (!empty($totalDiesel)) {
|
||||||
|
|
||||||
$summary = [];
|
$summary = [];
|
||||||
|
|
||||||
foreach ($groupedDieselMachineStockDetails as $groupedDieselMachineStockDetailsIndex => $dieselStockDetails) {
|
foreach ($groupedDieselMachineStockDetails as $groupedDieselMachineStockDetailsIndex => $dieselStockDetails) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<tr
|
<tr
|
||||||
|
|
||||||
@ -1402,3 +1509,88 @@ foreach ($period as $day) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
|
|
||||||
|
const list = document.getElementById("sortableList");
|
||||||
|
|
||||||
|
let draggedItem = null;
|
||||||
|
|
||||||
|
function attachDragEvents(item) {
|
||||||
|
item.setAttribute("draggable", "true");
|
||||||
|
|
||||||
|
item.addEventListener("dragstart", (event) => {
|
||||||
|
draggedItem = event.target;
|
||||||
|
event.target.classList.add("dragging");
|
||||||
|
});
|
||||||
|
|
||||||
|
item.addEventListener("dragend", (event) => {
|
||||||
|
event.target.classList.remove("dragging");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
list.addEventListener("dragover", (event) => {
|
||||||
|
event.preventDefault(); // Allow dropping
|
||||||
|
const dragging = document.querySelector(".dragging");
|
||||||
|
const closestItem = getClosestItem(list, event.clientY);
|
||||||
|
|
||||||
|
if (closestItem) {
|
||||||
|
list.insertBefore(dragging, closestItem);
|
||||||
|
} else {
|
||||||
|
list.appendChild(dragging);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function getClosestItem(container, y) {
|
||||||
|
const items = [...container.querySelectorAll(".sortable-item:not(.dragging)")];
|
||||||
|
|
||||||
|
return items.reduce((closest, child) => {
|
||||||
|
const box = child.getBoundingClientRect();
|
||||||
|
const offset = y - box.top - box.height / 2;
|
||||||
|
|
||||||
|
return offset < 0 && offset > closest.offset
|
||||||
|
? { offset, element: child }
|
||||||
|
: closest;
|
||||||
|
}, { offset: Number.NEGATIVE_INFINITY }).element;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Attach drag events to existing items
|
||||||
|
document.querySelectorAll(".sortable-item").forEach(attachDragEvents);
|
||||||
|
|
||||||
|
window.removeSelectedMaterial = function (checkbox) {
|
||||||
|
let container = checkbox.closest(".sortable-item");
|
||||||
|
let materialCode = checkbox.value;
|
||||||
|
let materialName = container.querySelector("label").innerText;
|
||||||
|
|
||||||
|
container.remove();
|
||||||
|
};
|
||||||
|
|
||||||
|
window.addBackToList = function () {
|
||||||
|
let dropdown = document.getElementById("customizeHeader");
|
||||||
|
let selectedOption = dropdown.options[dropdown.selectedIndex];
|
||||||
|
|
||||||
|
if (selectedOption.value !== "") {
|
||||||
|
let materialCode = selectedOption.value;
|
||||||
|
let materialName = selectedOption.text;
|
||||||
|
|
||||||
|
let container = document.createElement("div");
|
||||||
|
container.classList.add("sortable-item");
|
||||||
|
container.id = materialCode + "_container";
|
||||||
|
container.innerHTML = `
|
||||||
|
<input type="checkbox" id="${materialCode}_checkboxId"
|
||||||
|
name="customisedMachineCodes[]" value="${materialCode}"
|
||||||
|
onclick="removeSelectedMaterial(this)" checked>
|
||||||
|
<label class="grab" for="${materialCode}_checkboxId"> ${materialName} </label>
|
||||||
|
<br>
|
||||||
|
`;
|
||||||
|
|
||||||
|
attachDragEvents(container);
|
||||||
|
|
||||||
|
document.getElementById("sortableList").appendChild(container);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
@ -294,7 +294,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
|||||||
|
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
<?php $today = date('M-Y'); ?>
|
<?php $today = date('M-Y'); ?>
|
||||||
<input type="text" name="month" id="month" value="<?php echo $datefordropdown; ?>" class="form-control" data-provide="datepicker" data-date-format="M-yyyy" data-date-min-view-mode="1">
|
<input type="text" name="month" id="month" value="<?php echo $datefordropdown; ?>" class="form-control" data-provide="datepicker" data-date-format="M-yyyy" data-date-min-view-mode="1" readonly>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
@ -343,7 +343,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
|||||||
<th class="celda_encabezado_general" >Moisture Loss Qty (Metric Ton)</th>
|
<th class="celda_encabezado_general" >Moisture Loss Qty (Metric Ton)</th>
|
||||||
<th class="celda_encabezado_general" >Dust Qty (Metric Ton)</th>
|
<th class="celda_encabezado_general" >Dust Qty (Metric Ton)</th>
|
||||||
|
|
||||||
<th class="celda_encabezado_general" >Customer Name</th>
|
<th class="celda_encabezado_general" align="left" >Customer Name</th>
|
||||||
<th class="celda_encabezado_general" style="display:none;">id</th>
|
<th class="celda_encabezado_general" style="display:none;">id</th>
|
||||||
<th class="celda_encabezado_general" > Action</th>
|
<th class="celda_encabezado_general" > Action</th>
|
||||||
|
|
||||||
@ -452,7 +452,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- td:eq(13) customer_name -->
|
<!-- td:eq(13) customer_name -->
|
||||||
<td class="celda_normal" >
|
<td class="celda_normal" style="text-align: left !important;">
|
||||||
<?php echo $a['customer_name']; ?>
|
<?php echo $a['customer_name']; ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
@ -682,7 +682,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
|||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label class="form" for="additionalEntryDrierOnTimeId">Drier On Time</label>
|
<label class="form" for="additionalEntryDrierOnTimeId">Drier On Time</label>
|
||||||
|
|
||||||
<select onchange="calculateMachineRunningHrs()"
|
<select onchange="calculateMachineRunningHrs()" required
|
||||||
class="timeDropdown" style="width: 100px;"
|
class="timeDropdown" style="width: 100px;"
|
||||||
id="additionalEntryDrierOnTimeId" name="drier_on_time">
|
id="additionalEntryDrierOnTimeId" name="drier_on_time">
|
||||||
<option value="">Select</option>
|
<option value="">Select</option>
|
||||||
@ -694,7 +694,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
|||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label class="form" for="additionalEntryDrierOffTimeId">Drier Off Time</label>
|
<label class="form" for="additionalEntryDrierOffTimeId">Drier Off Time</label>
|
||||||
|
|
||||||
<select onchange="calculateMachineRunningHrs()"
|
<select onchange="calculateMachineRunningHrs()" required
|
||||||
class="timeDropdown " style="width: 100px;"
|
class="timeDropdown " style="width: 100px;"
|
||||||
id="additionalEntryDrierOffTimeId" name="drier_off_time">
|
id="additionalEntryDrierOffTimeId" name="drier_off_time">
|
||||||
<option value="">Select</option>
|
<option value="">Select</option>
|
||||||
@ -717,7 +717,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
|||||||
<!-- supplier name -->
|
<!-- supplier name -->
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label class="form" for="additionalEntrySupplierNameId">Supplier Name</label>
|
<label class="form" for="additionalEntrySupplierNameId">Supplier Name</label>
|
||||||
<select class="timeDropdown supplier_name" style="width: 300px;"
|
<select class="timeDropdown supplier_name" style="width: 300px;" required
|
||||||
id="additionalEntrySupplierNameId" name="supplier_name">
|
id="additionalEntrySupplierNameId" name="supplier_name">
|
||||||
<option value="">Select</option>
|
<option value="">Select</option>
|
||||||
<?php foreach ($supplierData as $key => $value) { ?>
|
<?php foreach ($supplierData as $key => $value) { ?>
|
||||||
@ -730,13 +730,13 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
|||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label class="form" for="additionalEntryInputSandQtyId">Input sand Quantity (Metric Ton)</label>
|
<label class="form" for="additionalEntryInputSandQtyId">Input sand Quantity (Metric Ton)</label>
|
||||||
<input onchange="additionalEntryGasPerTon(); additionalEntryMoistureLossQty(); additionalEntryQtyPerHrs(); "
|
<input onchange="additionalEntryGasPerTon(); additionalEntryMoistureLossQty(); additionalEntryQtyPerHrs(); "
|
||||||
type="text" class="form-control" id="additionalEntryInputSandQtyId" name="input_sand_qty" value="">
|
type="text" class="form-control" id="additionalEntryInputSandQtyId" name="input_sand_qty" value="" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- input sand moisture -->
|
<!-- input sand moisture -->
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label class="form" for="additionalEntryInputSandMoistureId">Input Sand Moisture (%)</label>
|
<label class="form" for="additionalEntryInputSandMoistureId">Input Sand Moisture (%)</label>
|
||||||
<input type="text" class="form-control" id="additionalEntryInputSandMoistureId" name="input_sand_moisture" value="">
|
<input type="text" class="form-control" id="additionalEntryInputSandMoistureId" name="input_sand_moisture" value="" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@ -745,7 +745,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
|||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label class="form" for="additionalEntrySandDriedQtyId">Sand Dried Qty (Metric Ton)</label>
|
<label class="form" for="additionalEntrySandDriedQtyId">Sand Dried Qty (Metric Ton)</label>
|
||||||
<input onchange="additionalEntryGasPerTon(); additionalEntryMoistureLossQty(); additionalEntryQtyPerHrs(); "
|
<input onchange="additionalEntryGasPerTon(); additionalEntryMoistureLossQty(); additionalEntryQtyPerHrs(); "
|
||||||
type="text" class="form-control" id="additionalEntrySandDriedQtyId" name="sand_dried_qty" value="">
|
type="text" class="form-control" id="additionalEntrySandDriedQtyId" name="sand_dried_qty" value="" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@ -758,13 +758,13 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
|||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label class="form" for="additionalEntryTotalGasConsumptionId">Total Gas Consumption</label>
|
<label class="form" for="additionalEntryTotalGasConsumptionId">Total Gas Consumption</label>
|
||||||
<input onchange="additionalEntryGasPerTon(); additionalEntryMoistureLossQty(); additionalEntryQtyPerHrs(); "
|
<input onchange="additionalEntryGasPerTon(); additionalEntryMoistureLossQty(); additionalEntryQtyPerHrs(); "
|
||||||
type="text" class="form-control" id="additionalEntryTotalGasConsumptionId" name="total_gas_consumption" value="">
|
type="text" class="form-control" id="additionalEntryTotalGasConsumptionId" name="total_gas_consumption" value="" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- gas per ton -->
|
<!-- gas per ton -->
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label class="form" for="additionalEntryGasPerTonId">Gas per Ton</label>
|
<label class="form" for="additionalEntryGasPerTonId">Gas per Ton</label>
|
||||||
<input type="text" class="form-control" id="additionalEntryGasPerTonId" name="gas_per_ton" value=""
|
<input type="text" class="form-control" id="additionalEntryGasPerTonId" name="gas_per_ton" value="" required
|
||||||
readonly>
|
readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -772,7 +772,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
|||||||
<!-- qty per hours -->
|
<!-- qty per hours -->
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label class="form" for="additionalEntryQtyPerHoursId">Qty per Hours</label>
|
<label class="form" for="additionalEntryQtyPerHoursId">Qty per Hours</label>
|
||||||
<input type="text" class="form-control" id="additionalEntryQtyPerHoursId" name="qty_per_hours" value=""
|
<input type="text" class="form-control" id="additionalEntryQtyPerHoursId" name="qty_per_hours" value="" required
|
||||||
readonly>
|
readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -780,7 +780,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
|||||||
<!-- moisture loss qty -->
|
<!-- moisture loss qty -->
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label class="form" for="additionalEntryMoistureLossQtyId">Moisture Loss Qty (Metric Ton)</label>
|
<label class="form" for="additionalEntryMoistureLossQtyId">Moisture Loss Qty (Metric Ton)</label>
|
||||||
<input type="text" class="form-control" id="additionalEntryMoistureLossQtyId" name="moisture_loss_qty" value=""
|
<input type="text" class="form-control" id="additionalEntryMoistureLossQtyId" name="moisture_loss_qty" value="" required
|
||||||
readonly>
|
readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -792,14 +792,14 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
|||||||
<!-- dust qty -->
|
<!-- dust qty -->
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label class="form" for="additionalEntryDustQtyId">Dust Qty (Metric Ton)</label>
|
<label class="form" for="additionalEntryDustQtyId">Dust Qty (Metric Ton)</label>
|
||||||
<input type="text" class="form-control" id="additionalEntryDustQtyId" name="dust_qty" value="">
|
<input type="text" class="form-control" id="additionalEntryDustQtyId" name="dust_qty" value="" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- customer name -->
|
<!-- customer name -->
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label class="form" for="additionalEntryCustomerNameId">Customer Name</label>
|
<label class="form" for="additionalEntryCustomerNameId">Customer Name</label>
|
||||||
<input type="text" class="form-control" id="additionalEntryCustomerNameId" name="customer_name" value="">
|
<input type="text" class="form-control" id="additionalEntryCustomerNameId" name="customer_name" value="" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -172,8 +172,10 @@
|
|||||||
.fht-table thead {
|
.fht-table thead {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 20; /* Ensure the entire header stays above table rows */
|
z-index: 20;
|
||||||
background-color: #50bbd9; /* Header background color */
|
/* Ensure the entire header stays above table rows */
|
||||||
|
background-color: #50bbd9;
|
||||||
|
/* Header background color */
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-menu {
|
.dropdown-menu {
|
||||||
@ -186,8 +188,10 @@
|
|||||||
.fht-table thead th {
|
.fht-table thead th {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 11; /* Higher than table rows but lower than first column */
|
z-index: 11;
|
||||||
background-color: #50bbd9; /* Green background */
|
/* Higher than table rows but lower than first column */
|
||||||
|
background-color: #50bbd9;
|
||||||
|
/* Green background */
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #ddd;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
@ -199,7 +203,8 @@
|
|||||||
position: sticky;
|
position: sticky;
|
||||||
left: 0;
|
left: 0;
|
||||||
background-color: #50bbd9;
|
background-color: #50bbd9;
|
||||||
z-index: 15; /* Ensures it stays above other cells */
|
z-index: 15;
|
||||||
|
/* Ensures it stays above other cells */
|
||||||
border-right: 2px solid #ddd;
|
border-right: 2px solid #ddd;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
@ -208,22 +213,24 @@
|
|||||||
.table-responsive {
|
.table-responsive {
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
max-height: 500px; /* Adjust as needed */
|
max-height: 500px;
|
||||||
|
/* Adjust as needed */
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
td {
|
td {
|
||||||
min-width: 100px;
|
min-width: 150px;
|
||||||
max-width: 100px;
|
max-width: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
min-width: 150px;
|
||||||
|
max-width: 150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
<div class="content-page">
|
<div class="content-page">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<!-- Start Content-->
|
<!-- Start Content-->
|
||||||
@ -262,9 +269,10 @@
|
|||||||
|
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
<input type="text" name="month" id="month" value="<?php echo "$month" ?>"
|
<input type="text" name="month" id="month" value="<?php echo "$month" ?>"
|
||||||
class="form-control mt-2" data-provide="datepicker"
|
class="form-control datepicker mt-2 " data-provide="datepicker"
|
||||||
data-date-format="M-yyyy" data-date-min-view-mode="1">
|
data-date-format="M-yyyy" data-date-min-view-mode="1" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-2">
|
<div class="form-group col-md-2">
|
||||||
<button type="submit" class="btn btn-success"> Change Month </button>
|
<button type="submit" class="btn btn-success"> Change Month </button>
|
||||||
</div>
|
</div>
|
||||||
@ -285,6 +293,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table style="width: 700px;" id="dustAndRoughStockDetailsTableId" class="fht-table table-striped">
|
<table style="width: 700px;" id="dustAndRoughStockDetailsTableId" class="fht-table table-striped">
|
||||||
|
|
||||||
@ -347,11 +357,6 @@
|
|||||||
><?= $dustAndRoughStockDetail['total'] ?? ' ' ?></td>
|
><?= $dustAndRoughStockDetail['total'] ?? ' ' ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<div class="table-responsive" style="width: 700px;">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
//before closing inner loop
|
//before closing inner loop
|
||||||
@ -369,31 +374,17 @@
|
|||||||
|
|
||||||
} ?>
|
} ?>
|
||||||
|
|
||||||
<table id="dustAndRoughStockDetailsTableSummaryId" class="fht-table table-striped">
|
|
||||||
|
|
||||||
<thead >
|
|
||||||
<th class="celda_encabezado_total" style="width: 100px;">Total </th>
|
|
||||||
<th class="celda_encabezado_total" style="width: 230px;">Final Rough </th>
|
|
||||||
<th class="celda_encabezado_total" style="width: 240px;">Dust </th>
|
|
||||||
<th class="celda_encabezado_total" style="width: 130px;">Total </th>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
|
<tfoot>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td style="background-color:rgb(189, 9, 6); color:#ffff;"> Total </td>
|
||||||
<td style="background-color:rgb(189, 9, 6); color:#ffff;">
|
|
||||||
<b> Total </b>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td class="celda_normal "><?=$summary['finalRough']?></td>
|
<td class="celda_normal "><?=$summary['finalRough']?></td>
|
||||||
<td class="celda_normal "><?=$summary['dust']?></td>
|
<td class="celda_normal "><?=$summary['dust']?></td>
|
||||||
<td class="celda_normal "><?=$summary['total']?></td>
|
<td class="celda_normal "><?=$summary['total']?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php }else{
|
<?php }else{
|
||||||
|
|
||||||
@ -509,6 +500,7 @@
|
|||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
console.log(data);
|
console.log(data);
|
||||||
alert(data);
|
alert(data);
|
||||||
|
window.location.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
@ -262,7 +262,7 @@
|
|||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<input type="text" name="month" id="month" value="<?php echo "$month" ?>"
|
<input type="text" name="month" id="month" value="<?php echo "$month" ?>"
|
||||||
class="form-control mt-2" data-provide="datepicker"
|
class="form-control mt-2" data-provide="datepicker"
|
||||||
data-date-format="M-yyyy" data-date-min-view-mode="1">
|
data-date-format="M-yyyy" data-date-min-view-mode="1" readonly>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<button type="submit" class="btn btn-success"> Change Month </button>
|
<button type="submit" class="btn btn-success"> Change Month </button>
|
||||||
@ -478,14 +478,14 @@
|
|||||||
// Sum values for the material
|
// Sum values for the material
|
||||||
|
|
||||||
$summary["opening"] = 0 ;
|
$summary["opening"] = 0 ;
|
||||||
$summary["purchaseBharath"] = is_numeric($gasStockDetail['purchaseBharath']) ? $gasStockDetail['purchaseBharath'] : 0 ;
|
$summary["purchaseBharath"] += is_numeric($gasStockDetail['purchaseBharath']) ? $gasStockDetail['purchaseBharath'] : 0 ;
|
||||||
$summary["purchaseIndian"] += is_numeric($gasStockDetail['purchaseIndian']) ? $gasStockDetail['purchaseIndian'] : 0 ;
|
$summary["purchaseIndian"] += is_numeric($gasStockDetail['purchaseIndian']) ? $gasStockDetail['purchaseIndian'] : 0 ;
|
||||||
$summary["total"] += is_numeric($gasStockDetail['total']) ? $gasStockDetail['total'] : 0 ;
|
$summary["total"] += is_numeric($gasStockDetail['total']) ? $gasStockDetail['total'] : 0 ;
|
||||||
$summary["consumption"] += is_numeric($gasStockDetail['consumption']) ? $gasStockDetail['consumption'] : 0 ;
|
$summary["consumption"] += is_numeric($gasStockDetail['consumption']) ? $gasStockDetail['consumption'] : 0 ;
|
||||||
$summary["balanceStock"] += is_numeric($gasStockDetail['balanceStock']) ? $gasStockDetail['balanceStock'] : 0 ;
|
$summary["balanceStock"] += is_numeric($gasStockDetail['balanceStock']) ? $gasStockDetail['balanceStock'] : 0 ;
|
||||||
|
|
||||||
$summary["drierMachineGasConsumption"] = is_numeric( $gasStockDetail['drierMachineGasConsumption']) ? $gasStockDetail['drierMachineGasConsumption'] : 0 ;
|
$summary["drierMachineGasConsumption"] += is_numeric( $gasStockDetail['drierMachineGasConsumption']) ? $gasStockDetail['drierMachineGasConsumption'] : 0 ;
|
||||||
$summary["sandDried"] = is_numeric( $gasStockDetail['sandDried']) ? $gasStockDetail['sandDried'] : 0 ;
|
$summary["sandDried"] += is_numeric( $gasStockDetail['sandDried']) ? $gasStockDetail['sandDried'] : 0 ;
|
||||||
$summary["coatingMachineGasconsumption"] += is_numeric($gasStockDetail['coatingMachineGasconsumption']) ? $gasStockDetail['coatingMachineGasconsumption'] : 0 ;
|
$summary["coatingMachineGasconsumption"] += is_numeric($gasStockDetail['coatingMachineGasconsumption']) ? $gasStockDetail['coatingMachineGasconsumption'] : 0 ;
|
||||||
$summary["coatedSand"] += is_numeric($gasStockDetail['coatedSand']) ? $gasStockDetail['coatedSand'] : 0 ;
|
$summary["coatedSand"] += is_numeric($gasStockDetail['coatedSand']) ? $gasStockDetail['coatedSand'] : 0 ;
|
||||||
$summary["trp_panel_gas_consumption"] += is_numeric($gasStockDetail['trp_panel_gas_consumption']) ? $gasStockDetail['trp_panel_gas_consumption'] : 0 ;
|
$summary["trp_panel_gas_consumption"] += is_numeric($gasStockDetail['trp_panel_gas_consumption']) ? $gasStockDetail['trp_panel_gas_consumption'] : 0 ;
|
||||||
|
|||||||
@ -4,6 +4,10 @@
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.side-table tbody td{
|
||||||
|
padding:3px !important ;
|
||||||
|
}
|
||||||
|
|
||||||
.fht-table,
|
.fht-table,
|
||||||
.fht-table thead,
|
.fht-table thead,
|
||||||
.fht-table tfoot,
|
.fht-table tfoot,
|
||||||
@ -292,7 +296,7 @@
|
|||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
<?php $today = date('M-Y'); ?>
|
<?php $today = date('M-Y'); ?>
|
||||||
|
|
||||||
<input type="text" name="month" id="month" value="<?php echo "$month" ?>" class="form-control mt-2" data-provide="datepicker" data-date-format="M-yyyy" data-date-min-view-mode="1">
|
<input type="text" name="month" id="month" value="<?php echo "$month" ?>" class="form-control mt-2" data-provide="datepicker" data-date-format="M-yyyy" data-date-min-view-mode="1" readonly>
|
||||||
<input type="hidden" name="remark" id="remark" value="<?php echo $remark ?>">
|
<input type="hidden" name="remark" id="remark" value="<?php echo $remark ?>">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
@ -704,7 +708,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<td class="celda_normal" > -</td>
|
<td class="celda_normal" > -</td>
|
||||||
<td class="celda_normal" style="background-color:rgb(189, 9, 6); color:#fff ;"> <h5 style="color:#fff;"> total </h5> </td>
|
<td class="celda_normal" style="background-color:rgb(189, 9, 6); color:#fff ;"> <h5 style="color:#fff;"> Total </h5> </td>
|
||||||
|
|
||||||
|
|
||||||
<td class="celda_normal" > -</td>
|
<td class="celda_normal" > -</td>
|
||||||
@ -1018,7 +1022,7 @@
|
|||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<table class="side-table " border="1" width="100%">
|
<table class="side-table" id="resultTableId" border="1" width="100%">
|
||||||
<tbody >
|
<tbody >
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: left !important; width:25%;"><b>Accepted</b></td>
|
<td style="text-align: left !important; width:25%;"><b>Accepted</b></td>
|
||||||
@ -1800,4 +1804,30 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function () {
|
||||||
|
$("resultTableId td ,#basicDetailsTableId td, #meshTableId td, #incomingSilicaSandDetailsTable td").on("paste", function (e) {
|
||||||
|
console.log("Inside paste event");
|
||||||
|
|
||||||
|
let clipboardData = e.originalEvent.clipboardData || window.clipboardData;
|
||||||
|
let pastedText = clipboardData.getData("text/plain"); // Get plain text
|
||||||
|
let pastedHtml = clipboardData.getData("text/html"); // Get HTML (Excel pastes as <table>)
|
||||||
|
|
||||||
|
console.log("Plain Text:", pastedText);
|
||||||
|
console.log("HTML Data:", pastedHtml);
|
||||||
|
|
||||||
|
// Excel typically pastes tab-separated values or HTML tables
|
||||||
|
if (pastedText.includes("\t") || (pastedHtml && pastedHtml.includes("<table"))) {
|
||||||
|
console.log("Preventing Excel paste!");
|
||||||
|
e.preventDefault(); // Block Excel paste
|
||||||
|
alert("Pasting from Excel is disabled. Please enter data manually.");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -17,6 +17,14 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.grab {
|
||||||
|
cursor: grab; /* Default open-hand cursor */
|
||||||
|
}
|
||||||
|
|
||||||
|
.grab:active {
|
||||||
|
cursor: grabbing; /* Closed-hand cursor when dragging */
|
||||||
|
}
|
||||||
|
|
||||||
/* .fht-table td[contenteditable="true"] {
|
/* .fht-table td[contenteditable="true"] {
|
||||||
background-color: lightyellow;
|
background-color: lightyellow;
|
||||||
color:rgb(13, 7, 7);
|
color:rgb(13, 7, 7);
|
||||||
@ -295,12 +303,26 @@ foreach ($period as $day) {
|
|||||||
<input type="text" name="month" id="month" value="<?php echo "$month" ?>"
|
<input type="text" name="month" id="month" value="<?php echo "$month" ?>"
|
||||||
class="form-control mt-2" data-provide="datepicker"
|
class="form-control mt-2" data-provide="datepicker"
|
||||||
style="z-index:30;"
|
style="z-index:30;"
|
||||||
data-date-format="M-yyyy" data-date-min-view-mode="1">
|
data-date-format="M-yyyy" data-date-min-view-mode="1" readonly>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-2">
|
<div class="form-group col-md-3">
|
||||||
<button type="submit" class="btn btn-success"> Change Month </button>
|
<button type="submit" class="btn btn-success"> Change Month </button>
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
//check it is current month , then only show the custom option
|
||||||
|
if($month == date('M-Y') ){
|
||||||
|
?>
|
||||||
|
<button type="button" class="btn" style="background-color:maroon;color:white" data-target="#customizeModalId"
|
||||||
|
data-toggle="modal">
|
||||||
|
Customize
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1"></div>
|
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<div class="dropdown float-right">
|
<div class="dropdown float-right">
|
||||||
<a href="#" class="dropdown-toggle arrow-none" data-toggle="dropdown"
|
<a href="#" class="dropdown-toggle arrow-none" data-toggle="dropdown"
|
||||||
@ -316,6 +338,91 @@ foreach ($period as $day) {
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<form action="<?= base_url('powerConsumptionDetails'); ?>" method="post">
|
||||||
|
|
||||||
|
<!-- modal placed here for submission of form -->
|
||||||
|
<!---------------------------------------
|
||||||
|
this modal is used to customize table header
|
||||||
|
1)list table header order
|
||||||
|
2)choose which material/machines you want
|
||||||
|
------------------------------------------------------------>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div class="modal fade" id="customizeModalId" tabindex="-1" role="dialog" aria-labelledby="customizeModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-md">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title" id="customizeModalLabel">Customize</h4>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row">
|
||||||
|
<!-- Dropdown to add back removed items -->
|
||||||
|
<div class="col">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="customizeHeader"> Add For This Month </label>
|
||||||
|
<select id="customizeHeader" class="form-control" onchange="addBackToList()">
|
||||||
|
<option value="">Select</option>
|
||||||
|
<?php
|
||||||
|
foreach($activeElectricMachines as $index => $activeElectricMachine){ ?>
|
||||||
|
|
||||||
|
<option value="<?=$activeElectricMachine['id']?>">
|
||||||
|
<?=$activeElectricMachine['id']?> - <?=$activeElectricMachine['machine_name']?>
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<h5>List of Selected Items</h5>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="selectedItemsContainer">
|
||||||
|
<ul id="sortableList">
|
||||||
|
<?php foreach ($electricMachines as $electricMachine): ?>
|
||||||
|
|
||||||
|
<div class="sortable-item" draggable="true" id="<?= $electricMachine['id'] ?>_container">
|
||||||
|
<input type = "checkbox"
|
||||||
|
id = "<?= $electricMachine['id'] ?>_checkboxId"
|
||||||
|
name = "customisedMachineCodes[]"
|
||||||
|
value = "<?= $electricMachine['id'] ?>"
|
||||||
|
onclick = "removeSelectedMaterial(this)"
|
||||||
|
checked>
|
||||||
|
<label class="grab" for="<?= $electricMachine['id'] ?>_checkboxId">
|
||||||
|
<?= $electricMachine['id'] ?> - <?= $electricMachine['machine_name']; ?>
|
||||||
|
</label>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-primary float-right"> Apply </button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- hidden fields -->
|
||||||
|
<input type="hidden" name="month" id="month" value="<?php echo "$month" ?>"
|
||||||
|
class="form-control mt-2" data-provide="datepicker"
|
||||||
|
data-date-format="M-yyyy" data-date-min-view-mode="1">
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
@ -372,7 +479,7 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
<tbody style="background-color: #fff;">
|
<tbody style="background-color: #fff;">
|
||||||
|
|
||||||
<?php if (!empty($groupedPowerConsumptionStockDetails)) {
|
<?php if (!empty($totalPower)){
|
||||||
|
|
||||||
$summary = [];
|
$summary = [];
|
||||||
|
|
||||||
@ -1335,3 +1442,87 @@ foreach ($period as $day) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
|
|
||||||
|
const list = document.getElementById("sortableList");
|
||||||
|
|
||||||
|
let draggedItem = null;
|
||||||
|
|
||||||
|
function attachDragEvents(item) {
|
||||||
|
item.setAttribute("draggable", "true");
|
||||||
|
|
||||||
|
item.addEventListener("dragstart", (event) => {
|
||||||
|
draggedItem = event.target;
|
||||||
|
event.target.classList.add("dragging");
|
||||||
|
});
|
||||||
|
|
||||||
|
item.addEventListener("dragend", (event) => {
|
||||||
|
event.target.classList.remove("dragging");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
list.addEventListener("dragover", (event) => {
|
||||||
|
event.preventDefault(); // Allow dropping
|
||||||
|
const dragging = document.querySelector(".dragging");
|
||||||
|
const closestItem = getClosestItem(list, event.clientY);
|
||||||
|
|
||||||
|
if (closestItem) {
|
||||||
|
list.insertBefore(dragging, closestItem);
|
||||||
|
} else {
|
||||||
|
list.appendChild(dragging);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function getClosestItem(container, y) {
|
||||||
|
const items = [...container.querySelectorAll(".sortable-item:not(.dragging)")];
|
||||||
|
|
||||||
|
return items.reduce((closest, child) => {
|
||||||
|
const box = child.getBoundingClientRect();
|
||||||
|
const offset = y - box.top - box.height / 2;
|
||||||
|
|
||||||
|
return offset < 0 && offset > closest.offset
|
||||||
|
? { offset, element: child }
|
||||||
|
: closest;
|
||||||
|
}, { offset: Number.NEGATIVE_INFINITY }).element;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Attach drag events to existing items
|
||||||
|
document.querySelectorAll(".sortable-item").forEach(attachDragEvents);
|
||||||
|
|
||||||
|
window.removeSelectedMaterial = function (checkbox) {
|
||||||
|
let container = checkbox.closest(".sortable-item");
|
||||||
|
let materialCode = checkbox.value;
|
||||||
|
let materialName = container.querySelector("label").innerText;
|
||||||
|
|
||||||
|
container.remove();
|
||||||
|
};
|
||||||
|
|
||||||
|
window.addBackToList = function () {
|
||||||
|
let dropdown = document.getElementById("customizeHeader");
|
||||||
|
let selectedOption = dropdown.options[dropdown.selectedIndex];
|
||||||
|
|
||||||
|
if (selectedOption.value !== "") {
|
||||||
|
let materialCode = selectedOption.value;
|
||||||
|
let materialName = selectedOption.text;
|
||||||
|
|
||||||
|
let container = document.createElement("div");
|
||||||
|
container.classList.add("sortable-item");
|
||||||
|
container.id = materialCode + "_container";
|
||||||
|
container.innerHTML = `
|
||||||
|
<input type="checkbox" id="${materialCode}_checkboxId"
|
||||||
|
name="customisedMachineCodes[]" value="${materialCode}"
|
||||||
|
onclick="removeSelectedMaterial(this)" checked>
|
||||||
|
<label class="grab" for="${materialCode}_checkboxId"> ${materialName} </label>
|
||||||
|
<br>
|
||||||
|
`;
|
||||||
|
|
||||||
|
attachDragEvents(container);
|
||||||
|
|
||||||
|
document.getElementById("sortableList").appendChild(container);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
@ -302,15 +302,23 @@ foreach ($period as $day) {
|
|||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
<input type="text" name="month" id="month" value="<?php echo "$month" ?>"
|
<input type="text" name="month" id="month" value="<?php echo "$month" ?>"
|
||||||
class="form-control mt-2" data-provide="datepicker"
|
class="form-control mt-2" data-provide="datepicker"
|
||||||
data-date-format="M-yyyy" data-date-min-view-mode="1">
|
data-date-format="M-yyyy" data-date-min-view-mode="1" readonly>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<button type="submit" class="btn btn-success"> Change Month </button>
|
<button type="submit" class="btn btn-success"> Change Month </button>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
//check it is current month , then only show the custom option
|
||||||
|
if($month == date('M-Y') ){
|
||||||
|
?>
|
||||||
<button type="button" class="btn" style="background-color:maroon;color:white" data-target="#customizeModalId"
|
<button type="button" class="btn" style="background-color:maroon;color:white" data-target="#customizeModalId"
|
||||||
data-toggle="modal">
|
data-toggle="modal">
|
||||||
Customize
|
Customize
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<div class="dropdown float-right">
|
<div class="dropdown float-right">
|
||||||
@ -325,6 +333,95 @@ foreach ($period as $day) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
<form action="<?= base_url('resinStockDetails'); ?>" method="post">
|
||||||
|
|
||||||
|
<!-- modal placed here for submission of form -->
|
||||||
|
<!---------------------------------------
|
||||||
|
this modal is used to customize table header
|
||||||
|
1)list table header order
|
||||||
|
2)choose which material/machines you want
|
||||||
|
------------------------------------------------------------>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div class="modal fade" id="customizeModalId" tabindex="-1" role="dialog" aria-labelledby="customizeModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-md">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title" id="customizeModalLabel">Customize</h4>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row">
|
||||||
|
<!-- Dropdown to add back removed items -->
|
||||||
|
<div class="col">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="customizeHeader"> Add For This Month </label>
|
||||||
|
<select id="customizeHeader" class="form-control" onchange="addBackToList()">
|
||||||
|
<option value="">Select</option>
|
||||||
|
<?php
|
||||||
|
foreach($activeResinMaterials as $index => $activeResinMaterial){ ?>
|
||||||
|
|
||||||
|
<option value="<?=$activeResinMaterial['MaterialCode']?>">
|
||||||
|
<?=$activeResinMaterial['MaterialCode']?> - <?=$activeResinMaterial['MaterialName']?>
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<h5>List of Selected Items</h5>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="selectedItemsContainer">
|
||||||
|
<ul id="sortableList">
|
||||||
|
<?php foreach ($resinMaterials as $resinMaterial): ?>
|
||||||
|
|
||||||
|
<div class="sortable-item" draggable="true" id="<?= $resinMaterial['MaterialCode'] ?>_container">
|
||||||
|
<input type = "checkbox"
|
||||||
|
id = "<?= $resinMaterial['MaterialCode'] ?>_checkboxId"
|
||||||
|
name = "customisedMaterialCodes[]"
|
||||||
|
value = "<?= $resinMaterial['MaterialCode'] ?>"
|
||||||
|
onclick = "removeSelectedMaterial(this)"
|
||||||
|
checked>
|
||||||
|
<label class="grab" for="<?= $resinMaterial['MaterialCode'] ?>_checkboxId">
|
||||||
|
<?= $resinMaterial['MaterialCode'] ?> - <?= $resinMaterial['MaterialName']; ?>
|
||||||
|
</label>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-primary float-right"> Apply </button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- hidden fields -->
|
||||||
|
<input type="hidden" name="month" id="month" value="<?php echo "$month" ?>"
|
||||||
|
class="form-control mt-2" data-provide="datepicker"
|
||||||
|
data-date-format="M-yyyy" data-date-min-view-mode="1">
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
||||||
@ -336,7 +433,7 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<th class="celda_encabezado_general" colspan="1">material </th>
|
<th class="celda_encabezado_general" colspan="1">Material </th>
|
||||||
|
|
||||||
<?php foreach ($resinMaterials as $resinMaterial) { ?>
|
<?php foreach ($resinMaterials as $resinMaterial) { ?>
|
||||||
<!-- this will loop till materials present -->
|
<!-- this will loop till materials present -->
|
||||||
@ -656,71 +753,7 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!---------------------------------------
|
|
||||||
this modal is used to customize table header
|
|
||||||
1)list table header order
|
|
||||||
2)choose which material/machines you want
|
|
||||||
------------------------------------------------------------>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<div class="modal fade" id="customizeModalId" tabindex="-1" role="dialog" aria-labelledby="customizeModalLabel" aria-hidden="true">
|
|
||||||
<div class="modal-dialog modal-md">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h4 class="modal-title" id="customizeModalLabel">Customize</h4>
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<div class="row">
|
|
||||||
<!-- Dropdown to add back removed items -->
|
|
||||||
<div class="col">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="customizeHeader"> Add For This Month </label>
|
|
||||||
<select id="customizeHeader" class="form-control" onchange="addBackToList()">
|
|
||||||
<option value="">Select</option>
|
|
||||||
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col">
|
|
||||||
<h5>List of Selected Items</h5>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="selectedItemsContainer">
|
|
||||||
<ul id="sortableList">
|
|
||||||
<?php foreach ($resinMaterials as $resinMaterial): ?>
|
|
||||||
|
|
||||||
<div class="sortable-item" draggable="true" id="<?= $resinMaterial['MaterialCode'] ?>_container">
|
|
||||||
<input type="checkbox"
|
|
||||||
id="<?= $resinMaterial['MaterialCode'] ?>_checkboxId"
|
|
||||||
name="materialCodes[]"
|
|
||||||
value="<?= $resinMaterial['MaterialCode'] ?>"
|
|
||||||
onclick="removeSelectedMaterial(this)"
|
|
||||||
checked>
|
|
||||||
<label class="grab" for="<?= $resinMaterial['MaterialCode'] ?>_checkboxId">
|
|
||||||
<?= $resinMaterial['MaterialName']; ?>
|
|
||||||
</label>
|
|
||||||
<br>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<button type="button" class="btn btn-primary float-right"> Apply </button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1140,12 +1173,6 @@ foreach ($period as $day) {
|
|||||||
let materialCode = checkbox.value;
|
let materialCode = checkbox.value;
|
||||||
let materialName = container.querySelector("label").innerText;
|
let materialName = container.querySelector("label").innerText;
|
||||||
|
|
||||||
let dropdown = document.getElementById("customizeHeader");
|
|
||||||
let newOption = document.createElement("option");
|
|
||||||
newOption.value = materialCode;
|
|
||||||
newOption.text = materialName;
|
|
||||||
dropdown.appendChild(newOption);
|
|
||||||
|
|
||||||
container.remove();
|
container.remove();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1162,7 +1189,7 @@ foreach ($period as $day) {
|
|||||||
container.id = materialCode + "_container";
|
container.id = materialCode + "_container";
|
||||||
container.innerHTML = `
|
container.innerHTML = `
|
||||||
<input type="checkbox" id="${materialCode}_checkboxId"
|
<input type="checkbox" id="${materialCode}_checkboxId"
|
||||||
name="materialCodes[]" value="${materialCode}"
|
name="customisedMaterialCodes[]" value="${materialCode}"
|
||||||
onclick="removeSelectedMaterial(this)" checked>
|
onclick="removeSelectedMaterial(this)" checked>
|
||||||
<label class="grab" for="${materialCode}_checkboxId"> ${materialName} </label>
|
<label class="grab" for="${materialCode}_checkboxId"> ${materialName} </label>
|
||||||
<br>
|
<br>
|
||||||
@ -1171,7 +1198,6 @@ foreach ($period as $day) {
|
|||||||
attachDragEvents(container);
|
attachDragEvents(container);
|
||||||
|
|
||||||
document.getElementById("sortableList").appendChild(container);
|
document.getElementById("sortableList").appendChild(container);
|
||||||
dropdown.removeChild(selectedOption);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@ -321,7 +321,7 @@ $timeOtions[] = "12:00 AM";
|
|||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
<input type="text" name="month" id="month" value="<?php echo "$month" ?>"
|
<input type="text" name="month" id="month" value="<?php echo "$month" ?>"
|
||||||
class="form-control mt-2" data-provide="datepicker"
|
class="form-control mt-2" data-provide="datepicker"
|
||||||
data-date-format="M-yyyy" data-date-min-view-mode="1">
|
data-date-format="M-yyyy" data-date-min-view-mode="1" readonly>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-2">
|
<div class="form-group col-md-2">
|
||||||
<button type="submit" class="btn btn-success"> Change Month </button>
|
<button type="submit" class="btn btn-success"> Change Month </button>
|
||||||
@ -494,6 +494,9 @@ $timeOtions[] = "12:00 AM";
|
|||||||
|
|
||||||
<?php if (!empty($trpProductionDetails)) {
|
<?php if (!empty($trpProductionDetails)) {
|
||||||
|
|
||||||
|
$totalWcsReceived = 0 ;
|
||||||
|
$totalCrsReceived = 0 ;
|
||||||
|
|
||||||
// dd(array_keys($trpProductionDetails[0]));
|
// dd(array_keys($trpProductionDetails[0]));
|
||||||
// dd($trpProductionDetails);
|
// dd($trpProductionDetails);
|
||||||
|
|
||||||
@ -963,8 +966,11 @@ $timeOtions[] = "12:00 AM";
|
|||||||
$summary['panelGasConsumption'] += is_numeric($trpProductionDetail['panelGasConsumption']) ? $trpProductionDetail['panelGasConsumption'] : 0;
|
$summary['panelGasConsumption'] += is_numeric($trpProductionDetail['panelGasConsumption']) ? $trpProductionDetail['panelGasConsumption'] : 0;
|
||||||
$summary['panelGasPerTon'] += is_numeric($trpProductionDetail['panelGasPerTon']) ? $trpProductionDetail['panelGasPerTon'] : 0;
|
$summary['panelGasPerTon'] += is_numeric($trpProductionDetail['panelGasPerTon']) ? $trpProductionDetail['panelGasPerTon'] : 0;
|
||||||
|
|
||||||
|
//total of all incoming waste core sand
|
||||||
|
|
||||||
foreach($wcsSupplierList as $supplier){
|
foreach($wcsSupplierList as $supplier){
|
||||||
$summary[$supplier] += is_numeric($trpProductionDetail[$supplier]) ? $trpProductionDetail[$supplier] : 0;
|
$summary[$supplier] += is_numeric($trpProductionDetail[$supplier]) ? $trpProductionDetail[$supplier] : 0;
|
||||||
|
$totalWcsReceived += is_numeric($trpProductionDetail[$supplier]) ? $trpProductionDetail[$supplier] : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$summary['edRunningHours'] += is_numeric($trpProductionDetail['edRunningHours']) ? $trpProductionDetail['edRunningHours'] : 0;
|
$summary['edRunningHours'] += is_numeric($trpProductionDetail['edRunningHours']) ? $trpProductionDetail['edRunningHours'] : 0;
|
||||||
@ -974,8 +980,11 @@ $timeOtions[] = "12:00 AM";
|
|||||||
$summary['trpProductionPerHour'] += is_numeric($trpProductionDetail['trpProductionPerHour']) ? $trpProductionDetail['trpProductionPerHour'] : 0;
|
$summary['trpProductionPerHour'] += is_numeric($trpProductionDetail['trpProductionPerHour']) ? $trpProductionDetail['trpProductionPerHour'] : 0;
|
||||||
$summary['coating'] += is_numeric($trpProductionDetail['coating']) ? $trpProductionDetail['coating'] : 0;
|
$summary['coating'] += is_numeric($trpProductionDetail['coating']) ? $trpProductionDetail['coating'] : 0;
|
||||||
|
|
||||||
|
// total of all core reclaimed sand
|
||||||
foreach($crsClientList as $client){
|
foreach($crsClientList as $client){
|
||||||
$summary[$client] += is_numeric($trpProductionDetail[$client]) ? $trpProductionDetail[$client] : 0;
|
$summary[$client] += is_numeric($trpProductionDetail[$client]) ? $trpProductionDetail[$client] : 0;
|
||||||
|
$totalCrsReceived += is_numeric($trpProductionDetail[$client]) ? $trpProductionDetail[$client] : 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$summary['waterReceipt'] += is_numeric($trpProductionDetail['waterReceipt']) ? $trpProductionDetail['waterReceipt'] : 0;
|
$summary['waterReceipt'] += is_numeric($trpProductionDetail['waterReceipt']) ? $trpProductionDetail['waterReceipt'] : 0;
|
||||||
@ -1444,12 +1453,6 @@ $timeOtions[] = "12:00 AM";
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|
||||||
|
|
||||||
<?php $abstractDetails = [
|
|
||||||
|
|
||||||
] ?>
|
|
||||||
|
|
||||||
|
|
||||||
<h4 style="text-align:center">Abstract for the month <?=$month?></h4>
|
<h4 style="text-align:center">Abstract for the month <?=$month?></h4>
|
||||||
|
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
@ -1457,7 +1460,7 @@ $timeOtions[] = "12:00 AM";
|
|||||||
<table id="abstractTableId" class="fht-table table-striped">
|
<table id="abstractTableId" class="fht-table table-striped">
|
||||||
<thead class="celda_encabezado_general" style="padding: 10px ;">
|
<thead class="celda_encabezado_general" style="padding: 10px ;">
|
||||||
<tr>
|
<tr>
|
||||||
<th class="celda_encabezado_general">Particulars</th>
|
<th class="celda_encabezado_general" style="width: 200px;">Particulars</th>
|
||||||
<th class="celda_encabezado_general">Running Hours</th>
|
<th class="celda_encabezado_general">Running Hours</th>
|
||||||
<th class="celda_encabezado_general">Per Hour</th>
|
<th class="celda_encabezado_general">Per Hour</th>
|
||||||
<th class="celda_encabezado_general">Opening Stock</th>
|
<th class="celda_encabezado_general">Opening Stock</th>
|
||||||
@ -1466,30 +1469,336 @@ $timeOtions[] = "12:00 AM";
|
|||||||
<th class="celda_encabezado_general">Consumption</th>
|
<th class="celda_encabezado_general">Consumption</th>
|
||||||
<th class="celda_encabezado_general">Closing Stock</th>
|
<th class="celda_encabezado_general">Closing Stock</th>
|
||||||
<th class="celda_encabezado_general">Physical Stock</th>
|
<th class="celda_encabezado_general">Physical Stock</th>
|
||||||
<th class="celda_encabezado_general">Remarks</th>
|
<th class="celda_encabezado_general" style="width: 200px;">Remarks</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(!empty($trpAbstract)){
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$abstractForCurrentMonth=[
|
||||||
|
[
|
||||||
|
'absDate' => $trpAbstract["Incoming Raw Sand Details"]['date'] ,
|
||||||
|
'absParticulars' => "Incoming Raw Sand Details",
|
||||||
|
'absRunningHrs' => "",
|
||||||
|
'absPerHour' => "",
|
||||||
|
'absOpeningStock'=> (int)$trpAbstract["Incoming Raw Sand Details"]['opening_stock'],
|
||||||
|
'absReceipt' => $totalWcsReceived,
|
||||||
|
'absTotal' => (int)$trpAbstract["Incoming Raw Sand Details"]['opening_stock'] + $totalWcsReceived,
|
||||||
|
'absConsumption' => $summary['edProduction'],
|
||||||
|
'absClosingStock' => ((int)$trpAbstract["Incoming Raw Sand Details"]['opening_stock'] + $totalWcsReceived) - $summary['edProduction'],
|
||||||
|
'absPhysicalStock' => (int)$trpAbstract["Incoming Raw Sand Details"]['physical_stock'],
|
||||||
|
'absRemarks' => $trpAbstract["Incoming Raw Sand Details"]['remarks'],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'absDate' => $trpAbstract["ED Details"]['date'] ,
|
||||||
|
'absParticulars' => "ED Details",
|
||||||
|
'absRunningHrs' => $summary['edRunningHours'],
|
||||||
|
'absPerHour' => number_format( $summary['edProduction'] / ($summary['edRunningHours'] == 0 ? 1 : $summary['edRunningHours']) ,2),
|
||||||
|
'absOpeningStock'=> (int)$trpAbstract["ED Details"]['opening_stock'],
|
||||||
|
'absReceipt' => $summary['edProduction'],
|
||||||
|
'absTotal' => (int)$trpAbstract["ED Details"]['opening_stock'] + $summary['edProduction'],
|
||||||
|
'absConsumption' => $summary['edUsage'] + ($summary['coolerBags'] * 1250 ) + ($summary['cycloneWaste'] * 1250 ) + ( $summary['edWaste'] * 1250 ),
|
||||||
|
'absClosingStock' => (int)$trpAbstract["ED Details"]['opening_stock'] + $summary['edProduction'] - ($summary['edUsage'] + ($summary['coolerBags'] * 1250 ) + ($summary['cycloneWaste'] * 1250 ) + ( $summary['edWaste'] * 1250 ) ),
|
||||||
|
'absPhysicalStock' =>(int)$trpAbstract["ED Details"]['physical_stock'],
|
||||||
|
'absRemarks' => $trpAbstract["ED Details"]['remarks'],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'absDate' => $trpAbstract["TRP Total Sand"]['date'] ,
|
||||||
|
'absParticulars' => "TRP Total Sand",
|
||||||
|
'absRunningHrs' => $summary['sandFeedingHours'],
|
||||||
|
'absPerHour' => $summary['trpProductionPerHour'],
|
||||||
|
'absOpeningStock'=> (int)$trpAbstract["TRP Total Sand"]['opening_stock'],
|
||||||
|
'absReceipt' =>$summary['trpProduction'],
|
||||||
|
'absTotal' =>(int)$trpAbstract["TRP Total Sand"]['opening_stock'] + $summary['trpProduction'],
|
||||||
|
'absConsumption' =>$totalCrsReceived,
|
||||||
|
'absClosingStock' =>(int)$trpAbstract["TRP Total Sand"]['opening_stock'] + $summary['trpProduction'] - $totalCrsReceived,
|
||||||
|
'absPhysicalStock' =>(int)$trpAbstract["TRP Total Sand"]['physical_stock'],
|
||||||
|
'absRemarks' => $trpAbstract["TRP Total Sand"]['remarks'],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'absDate' => $trpAbstract["Trp Physical Gas Consumption"]['date'] ,
|
||||||
|
'absParticulars' => "Trp Physical Gas Consumption",
|
||||||
|
'absRunningHrs' => "",
|
||||||
|
'absPerHour' => number_format(($summary['trpPlusDrierGasConsumption']) / ( ( $summary['trpProduction'] == 0 ? 1000 : $summary['trpProduction'] )/1000), 2, '.', ''),
|
||||||
|
'absOpeningStock'=>(int)$trpAbstract["Trp Physical Gas Consumption"]['opening_stock'],
|
||||||
|
'absReceipt' => $summary['gasReceiptBg'] + $summary['gasReceiptPg'],
|
||||||
|
'absTotal' => (int)$trpAbstract["Trp Physical Gas Consumption"]['opening_stock'] + $summary['gasReceiptBg'] + $summary['gasReceiptPg'],
|
||||||
|
'absConsumption' => $summary['physicalGasConsumption'],
|
||||||
|
'absClosingStock' => (int)$trpAbstract["Trp Physical Gas Consumption"]['opening_stock'] + $summary['gasReceiptBg'] + $summary['gasReceiptPg'] - $summary['physicalGasConsumption'],
|
||||||
|
'absPhysicalStock' =>(int)$trpAbstract["Trp Physical Gas Consumption"]['physical_stock'],
|
||||||
|
'absRemarks' => $trpAbstract["Trp Physical Gas Consumption"]['remarks'],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'absDate' => $trpAbstract["Trp Panel Gas Consumption"]['date'] ,
|
||||||
|
'absParticulars' => "Trp Panel Gas Consumption",
|
||||||
|
'absRunningHrs' => "",
|
||||||
|
'absPerHour' => number_format(($summary['panelGasConsumption']) / ( ( $summary['trpProduction'] == 0 ? 1000 : $summary['trpProduction'] )/1000) ,2),
|
||||||
|
'absOpeningStock'=>(int)$trpAbstract["Trp Panel Gas Consumption"]['opening_stock'],
|
||||||
|
'absReceipt' => $summary['gasReceiptBg'] + $summary['gasReceiptPg'],
|
||||||
|
'absTotal' => (int)$trpAbstract["Trp Panel Gas Consumption"]['opening_stock'] + $summary['gasReceiptBg'] + $summary['gasReceiptPg'],
|
||||||
|
'absConsumption' => $summary['panelGasConsumption'],
|
||||||
|
'absClosingStock' => (int)$trpAbstract["Trp Panel Gas Consumption"]['opening_stock'] + $summary['gasReceiptBg'] + $summary['gasReceiptPg'] - $summary['panelGasConsumption'],
|
||||||
|
'absPhysicalStock' =>(int)$trpAbstract["Trp Panel Gas Consumption"]['physical_stock'],
|
||||||
|
'absRemarks' => $trpAbstract["Trp Panel Gas Consumption"]['remarks'],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'absDate' => $trpAbstract["Water Consumption"]['date'] ,
|
||||||
|
'absParticulars' => "Water Consumption",
|
||||||
|
'absRunningHrs' => "",
|
||||||
|
'absPerHour' => "",
|
||||||
|
'absOpeningStock'=>(int)$trpAbstract["Water Consumption"]['opening_stock'],
|
||||||
|
'absReceipt' =>$summary['waterReceipt'],
|
||||||
|
'absTotal' =>(int)$trpAbstract["Water Consumption"]['opening_stock'] + $summary['waterReceipt'],
|
||||||
|
'absConsumption' => $summary['waterConsumption'],
|
||||||
|
'absClosingStock' =>(int)$trpAbstract["Water Consumption"]['opening_stock'] + $summary['waterReceipt'] - $summary['waterConsumption'],
|
||||||
|
'absPhysicalStock' =>(int)$trpAbstract["Water Consumption"]['physical_stock'],
|
||||||
|
'absRemarks' => $trpAbstract["Water Consumption"]['remarks'],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'absDate' => $trpAbstract["Power Consumption"]['date'] ,
|
||||||
|
'absParticulars' => "Power Consumption",
|
||||||
|
'absRunningHrs' =>$summary['ebReadingPerUnitTon'],
|
||||||
|
'absPerHour' => "",
|
||||||
|
'absOpeningStock'=>(int)$trpAbstract["Power Consumption"]['opening_stock'],
|
||||||
|
'absReceipt' =>'',
|
||||||
|
'absTotal' =>'',
|
||||||
|
'absConsumption' => $summary['ebReading'],
|
||||||
|
'absClosingStock' =>'',
|
||||||
|
'absPhysicalStock' =>(int)$trpAbstract["Power Consumption"]['physical_stock'],
|
||||||
|
'absRemarks' => $trpAbstract["Power Consumption"]['remarks'],
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php foreach($abstractForCurrentMonth as $abstract)
|
||||||
|
{
|
||||||
|
|
||||||
|
$absDate = DateTime::createFromFormat('M-Y', $month)->format('Y-m');
|
||||||
|
$absDate = "$absDate-01";
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="celda_normal"> dummy</td>
|
|
||||||
<td class="celda_normal"> dummy</td>
|
<!-- particulars -->
|
||||||
<td class="celda_normal"> dummy</td>
|
<td class="celda_normal absParticulars"><?=$abstract['absParticulars'] ?> </td>
|
||||||
<td class="celda_normal"> dummy</td>
|
|
||||||
<td class="celda_normal"> dummy</td>
|
<!-- running hours no need -->
|
||||||
<td class="celda_normal"> dummy</td>
|
<td class="celda_normal absRunningHrs"><?=$abstract['absRunningHrs']?></td>
|
||||||
<td class="celda_normal"> dummy</td>
|
|
||||||
<td class="celda_normal"> dummy</td>
|
<!-- per hour no need -->
|
||||||
<td class="celda_normal"> dummy</td>
|
<td class="celda_normal absPerHour"><?=$abstract['absPerHour']?></td>
|
||||||
<td class="celda_normal"> dummy</td>
|
|
||||||
|
<!-- opening stock be -->
|
||||||
|
<td class="celda_normal absOpeningStock"
|
||||||
|
oninput="absOpeningStockChange(this)"
|
||||||
|
contenteditable="true"><?=$abstract['absOpeningStock']?></td>
|
||||||
|
|
||||||
|
<!-- receipt total of all incoming waste core sand-->
|
||||||
|
<td class="celda_normal absReceipt"><?=$abstract['absReceipt']?> </td>
|
||||||
|
|
||||||
|
<!-- Total fe -->
|
||||||
|
<td class="celda_normal absTotal"><?=$abstract['absTotal']?></td>
|
||||||
|
|
||||||
|
<!-- consumption fe-->
|
||||||
|
<td class="celda_normal absConsumption"><?=$abstract['absConsumption']?></td>
|
||||||
|
|
||||||
|
<!-- closing stock fe -->
|
||||||
|
<td class="celda_normal absClosingStock"><?=$abstract['absClosingStock']?> </td>
|
||||||
|
|
||||||
|
<!-- physical stock be -->
|
||||||
|
<td class="celda_normal absPhysicalStock"
|
||||||
|
contenteditable="true"> <?=$abstract['absPhysicalStock']?> </td>
|
||||||
|
|
||||||
|
<!-- remarks be -->
|
||||||
|
<td class="celda_normal absRemarks"
|
||||||
|
contenteditable="true"> <?=$abstract['absRemarks']?> </td>
|
||||||
|
|
||||||
|
<!-- absDate -->
|
||||||
|
<td class="absDate" style="display:none"> <?= $absDate; ?> </td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php }else{
|
||||||
|
|
||||||
|
$abstractForCurrentMonth=[
|
||||||
|
[
|
||||||
|
|
||||||
|
'absParticulars' => "Incoming Raw Sand Details",
|
||||||
|
'absRunningHrs' => "",
|
||||||
|
'absPerHour' => "",
|
||||||
|
'absOpeningStock'=>'',
|
||||||
|
'absReceipt' => $totalWcsReceived,
|
||||||
|
'absTotal' => $totalWcsReceived,
|
||||||
|
'absConsumption' => $summary['edProduction'],
|
||||||
|
'absClosingStock' =>( $totalWcsReceived ) - $summary['edProduction'],
|
||||||
|
'absPhysicalStock' =>'',
|
||||||
|
'absRemarks' =>'',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
|
||||||
|
'absParticulars' => "ED Details",
|
||||||
|
'absRunningHrs' => $summary['edRunningHours'],
|
||||||
|
'absPerHour' => number_format( $summary['edProduction'] / ($summary['edRunningHours'] == 0 ? 1 : $summary['edRunningHours']) ,2),
|
||||||
|
'absOpeningStock'=>'',
|
||||||
|
'absReceipt' => $summary['edProduction'],
|
||||||
|
'absTotal' => $summary['edProduction'],
|
||||||
|
'absConsumption' => $summary['edUsage'] + ($summary['coolerBags'] * 1250 ) + ($summary['cycloneWaste'] * 1250 ) + ( $summary['edWaste'] * 1250 ),
|
||||||
|
'absClosingStock' => $summary['edProduction'] - $summary['edUsage'] + ($summary['coolerBags'] * 1250 ) + ($summary['cycloneWaste'] * 1250 ) + ( $summary['edWaste'] * 1250 ),
|
||||||
|
'absPhysicalStock' =>'',
|
||||||
|
'absRemarks' =>'',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
|
||||||
|
'absParticulars' => "TRP Total Sand",
|
||||||
|
'absRunningHrs' => $summary['sandFeedingHours'],
|
||||||
|
'absPerHour' => $summary['trpProductionPerHour'],
|
||||||
|
'absOpeningStock'=>'',
|
||||||
|
'absReceipt' =>$summary['trpProduction'],
|
||||||
|
'absTotal' =>$summary['trpProduction'],
|
||||||
|
'absConsumption' =>$totalCrsReceived,
|
||||||
|
'absClosingStock' =>$summary['trpProduction'] - $totalCrsReceived,
|
||||||
|
'absPhysicalStock' =>'',
|
||||||
|
'absRemarks' =>'',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
|
||||||
|
'absParticulars' => "Trp Physical Gas Consumption",
|
||||||
|
'absRunningHrs' => "",
|
||||||
|
'absPerHour' => number_format(($summary['trpPlusDrierGasConsumption']) / ( ( $summary['trpProduction'] == 0 ? 1000 : $summary['trpProduction'] )/1000), 2, '.', ''),
|
||||||
|
'absOpeningStock'=>'',
|
||||||
|
'absReceipt' => $summary['gasReceiptBg'] + $summary['gasReceiptPg'],
|
||||||
|
'absTotal' => $summary['gasReceiptBg'] + $summary['gasReceiptPg'],
|
||||||
|
'absConsumption' => $summary['physicalGasConsumption'],
|
||||||
|
'absClosingStock' =>($summary['gasReceiptBg'] + $summary['gasReceiptPg']) - $summary['physicalGasConsumption'],
|
||||||
|
'absPhysicalStock' =>'',
|
||||||
|
'absRemarks' =>'',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
|
||||||
|
'absParticulars' => "Trp Panel Gas Consumption",
|
||||||
|
'absRunningHrs' => "",
|
||||||
|
'absPerHour' => number_format(($summary['panelGasConsumption']) / ( ( $summary['trpProduction'] == 0 ? 1000 : $summary['trpProduction'] )/1000) ,2),
|
||||||
|
'absOpeningStock'=>'',
|
||||||
|
'absReceipt' => $summary['gasReceiptBg'] + $summary['gasReceiptPg'],
|
||||||
|
'absTotal' => $summary['gasReceiptBg'] + $summary['gasReceiptPg'],
|
||||||
|
'absConsumption' => $summary['panelGasConsumption'],
|
||||||
|
'absClosingStock' =>($summary['gasReceiptBg'] + $summary['gasReceiptPg']) - $summary['panelGasConsumption'],
|
||||||
|
'absPhysicalStock' =>'',
|
||||||
|
'absRemarks' =>'',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
|
||||||
|
'absParticulars' => "Water Consumption",
|
||||||
|
'absRunningHrs' => "",
|
||||||
|
'absPerHour' => "",
|
||||||
|
'absOpeningStock'=>'',
|
||||||
|
'absReceipt' =>$summary['waterReceipt'],
|
||||||
|
'absTotal' =>$summary['waterReceipt'],
|
||||||
|
'absConsumption' =>$summary['waterReceipt'] - $summary['waterConsumption'],
|
||||||
|
'absClosingStock' =>'',
|
||||||
|
'absPhysicalStock' =>'',
|
||||||
|
'absRemarks' =>'',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
|
||||||
|
'absParticulars' => "Power Consumption",
|
||||||
|
'absRunningHrs' =>$summary['ebReadingPerUnitTon'],
|
||||||
|
'absPerHour' => "",
|
||||||
|
'absOpeningStock'=>'',
|
||||||
|
'absReceipt' =>'',
|
||||||
|
'absTotal' =>'',
|
||||||
|
'absConsumption' => $summary['ebReading'],
|
||||||
|
'absClosingStock' =>'',
|
||||||
|
'absPhysicalStock' =>'',
|
||||||
|
'absRemarks' =>'',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
<?php foreach($abstractForCurrentMonth as $abstract)
|
||||||
|
{
|
||||||
|
|
||||||
|
$absDate = DateTime::createFromFormat('M-Y', $month)->format('Y-m');
|
||||||
|
$absDate = "$absDate-01";
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<!-- particulars -->
|
||||||
|
<td class="celda_normal absParticulars"><?=$abstract['absParticulars']?></td>
|
||||||
|
|
||||||
|
<!-- running hours no need -->
|
||||||
|
<td class="celda_normal absRunningHrs"><?=$abstract['absRunningHrs']?></td>
|
||||||
|
|
||||||
|
<!-- per hour no need -->
|
||||||
|
<td class="celda_normal absPerHour"><?=$abstract['absPerHour']?></td>
|
||||||
|
|
||||||
|
<!-- opening stock be -->
|
||||||
|
<td class="celda_normal absOpeningStock"
|
||||||
|
oninput="absOpeningStockChange(this)"
|
||||||
|
contenteditable="true"><?=$abstract['absOpeningStock']?></td>
|
||||||
|
|
||||||
|
<!-- receipt total of all incoming waste core sand-->
|
||||||
|
<td class="celda_normal absReceipt"><?=$abstract['absReceipt']?> </td>
|
||||||
|
|
||||||
|
<!-- Total fe -->
|
||||||
|
<td class="celda_normal absTotal"><?=$abstract['absTotal']?></td>
|
||||||
|
|
||||||
|
<!-- consumption fe-->
|
||||||
|
<td class="celda_normal absConsumption"><?=$abstract['absConsumption']?></td>
|
||||||
|
|
||||||
|
<!-- closing stock fe -->
|
||||||
|
<td class="celda_normal absClosingStock"><?=$abstract['absClosingStock']?> </td>
|
||||||
|
|
||||||
|
<!-- physical stock be -->
|
||||||
|
<td class="celda_normal absPhysicalStock"
|
||||||
|
contenteditable="true"> <?=$abstract['absPhysicalStock']?> </td>
|
||||||
|
|
||||||
|
<!-- remarks be -->
|
||||||
|
<td class="celda_normal absRemarks"
|
||||||
|
contenteditable="true"> <?=$abstract['absRemarks']?> </td>
|
||||||
|
|
||||||
|
<!-- absDate -->
|
||||||
|
<td class="absDate" style="display:none"> <?= $absDate; ?> </td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php }
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12 text-center">
|
||||||
|
<input type="button" class="btn btn-success px-4" id="abstractSaveId" value="save">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -1552,7 +1861,7 @@ $timeOtions[] = "12:00 AM";
|
|||||||
|
|
||||||
//table to json function
|
//table to json function
|
||||||
|
|
||||||
var updateTrpProductionDetails = tableToJson();
|
var updateTrpProductionDetails = tableToJsonTrp();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1594,7 +1903,7 @@ $timeOtions[] = "12:00 AM";
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function tableToJson() {
|
function tableToJsonTrp() {
|
||||||
const table = $('#trpProductionStockDetailsTableId');
|
const table = $('#trpProductionStockDetailsTableId');
|
||||||
const rows = [];
|
const rows = [];
|
||||||
|
|
||||||
@ -1946,142 +2255,175 @@ $timeOtions[] = "12:00 AM";
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function absOpeningStockChange(element) {
|
||||||
|
let row = $(element).closest('tr'); // Get the current row
|
||||||
|
|
||||||
|
let openingStockTd = row.find('td.absOpeningStock').text().trim()??'';
|
||||||
|
let receiptTd = row.find('td.absReceipt').text().trim()??'';
|
||||||
|
let consumptionTd = row.find('td.absConsumption').text().trim()??'';
|
||||||
|
|
||||||
|
// Convert to numbers for calculations
|
||||||
|
let openingStock = validateInput(openingStockTd) || 0;
|
||||||
|
let receipt = validateInput(receiptTd) || 0;
|
||||||
|
let consumption = validateInput(consumptionTd) || 0;
|
||||||
|
|
||||||
|
// Calculate values
|
||||||
|
let totalStock = parseFloat(openingStock) + parseFloat(receipt);
|
||||||
|
let closingStock = parseFloat(totalStock) - parseFloat(consumption);
|
||||||
|
|
||||||
|
// Update the table cells
|
||||||
|
row.find('td.absTotal').text(parseFloat(totalStock).toFixed(2));
|
||||||
|
row.find('td.absClosingStock').text(parseFloat(closingStock).toFixed(2));
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
$('#abstractSaveId').click(function() {
|
||||||
|
|
||||||
|
//table to json function
|
||||||
|
|
||||||
|
var updateAbstractDetails = tableToJsonAbstract();
|
||||||
|
|
||||||
|
|
||||||
|
alert('Updation may take a while, And we appreciate your patience..!!');
|
||||||
|
|
||||||
|
$('#loader').show();
|
||||||
|
$.ajax({
|
||||||
|
data: {
|
||||||
|
updateAbstractDetails
|
||||||
|
},
|
||||||
|
type: "POST",
|
||||||
|
url: "<?php echo base_url();?>updateAbstractDetails",
|
||||||
|
|
||||||
|
success: function(data) {
|
||||||
|
if (data) {
|
||||||
|
$('#loader').hide();
|
||||||
|
console.log(data);
|
||||||
|
alert(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
|
||||||
|
alert("An error occurred while processing the request. Please try again.");
|
||||||
|
console.error("Error Code:", xhr.status);
|
||||||
|
console.error("Error Message:", error);
|
||||||
|
console.error("Response Text:", xhr.responseText);
|
||||||
|
},
|
||||||
|
complete: function() {
|
||||||
|
$('#loader').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// !caution!
|
function tableToJsonAbstract (){
|
||||||
// !caution!
|
|
||||||
// !caution!
|
|
||||||
// !caution!
|
|
||||||
// !caution!
|
|
||||||
// !caution!
|
|
||||||
// dont delete this commented code , this is used for refernce in getting td values
|
|
||||||
|
|
||||||
// let openingTime = tr.find('td:eq(1)').text().trim();
|
const table = $("#abstractTableId");
|
||||||
// let closingTime = tr.find('td:eq(2)').text().trim();
|
const rows = [];
|
||||||
// let totalHours = tr.find('td:eq(3)').text().trim();
|
|
||||||
// let coldStart = tr.find('td:eq(4)').text().trim();
|
//this table to json is customized for bagstock not for all
|
||||||
// let breakdownHours = tr.find('td:eq(5)').text().trim();
|
|
||||||
// let burnerFiringHours = tr.find('td:eq(6)').text().trim();
|
table.find('tbody tr').each(function() {
|
||||||
// let sandFeedingHours = tr.find('td:eq(7)').text().trim();
|
|
||||||
// let gasReceiptBg = tr.find('td:eq(8)').text().trim();
|
|
||||||
// let gasReceiptPg = tr.find('td:eq(9)').text().trim();
|
|
||||||
// let physicalGasConsumption = tr.find('td:eq(10)').text().trim();
|
|
||||||
// let drierGasConsumption = tr.find('td:eq(11)').text().trim();
|
|
||||||
// let coatingGasConsumption = tr.find('td:eq(12)').text().trim();
|
|
||||||
// let trpPlusDrierGasConsumption = tr.find('td:eq(13)').text().trim();
|
|
||||||
// let trpPhysicalGasPerTon = tr.find('td:eq(14)').text().trim();
|
|
||||||
// let panelGasConsumption = tr.find('td:eq(15)').text().trim();
|
|
||||||
// let panelGasPerTon = tr.find('td:eq(16)').text().trim();
|
|
||||||
// let isolAls = tr.find('td:eq(17)').text().trim();
|
|
||||||
// let isolAle = tr.find('td:eq(18)').text().trim();
|
|
||||||
// let isolMe = tr.find('td:eq(19)').text().trim();
|
|
||||||
// let isolSi = tr.find('td:eq(20)').text().trim();
|
|
||||||
// let isolCaparo = tr.find('td:eq(21)').text().trim();
|
|
||||||
// let isolNemak = tr.find('td:eq(22)').text().trim();
|
|
||||||
// let isolDr = tr.find('td:eq(23)').text().trim();
|
|
||||||
// let edRunningHours = tr.find('td:eq(24)').text().trim();
|
|
||||||
// let edProduction = tr.find('td:eq(25)').text().trim();
|
|
||||||
// let edUsage = tr.find('td:eq(26)').text().trim();
|
|
||||||
// let trpProduction = tr.find('td:eq(27)').text().trim();
|
|
||||||
// let trpProductionPerHour = tr.find('td:eq(28)').text().trim();
|
|
||||||
// let coating = tr.find('td:eq(29)').text().trim();
|
|
||||||
// let usageHindhuja = tr.find('td:eq(30)').text().trim();
|
|
||||||
// let usageNemak = tr.find('td:eq(31)').text().trim();
|
|
||||||
// let usageMe = tr.find('td:eq(32)').text().trim();
|
|
||||||
// let usageBi = tr.find('td:eq(33)').text().trim();
|
|
||||||
// let usageKarmen = tr.find('td:eq(34)').text().trim();
|
|
||||||
// let waterReceipt = tr.find('td:eq(35)').text().trim();
|
|
||||||
// let waterConsumption = tr.find('td:eq(36)').text().trim();
|
|
||||||
// let ebReading = tr.find('td:eq(37)').text().trim();
|
|
||||||
// let ebReadingPerUnitTon = tr.find('td:eq(38)').text().trim();
|
|
||||||
// let workingPersonEngineers = tr.find('td:eq(39)').text().trim();
|
|
||||||
// let workingPersonSupervisiors = tr.find('td:eq(40)').text().trim();
|
|
||||||
// let workingPersonOperators = tr.find('td:eq(41)').text().trim();
|
|
||||||
// let rollerDrivers = tr.find('td:eq(42)').text().trim();
|
|
||||||
// let natureOfMaintenance = tr.find('td:eq(43)').text().trim();
|
|
||||||
// let location = tr.find('td:eq(44)').text().trim();
|
|
||||||
// let description = tr.find('td:eq(45)').text().trim();
|
|
||||||
// let msSeperation = tr.find('td:eq(46)').text().trim();
|
|
||||||
// let edWaste = tr.find('td:eq(47)').text().trim();
|
|
||||||
// let coolerBags = tr.find('td:eq(48)').text().trim();
|
|
||||||
// let edPlus20Waste = tr.find('td:eq(49)').text().trim();
|
|
||||||
// let cycloneWaste = tr.find('td:eq(50)').text().trim();
|
|
||||||
|
|
||||||
|
|
||||||
// !caution!
|
const rowData = {
|
||||||
// !caution!
|
|
||||||
// !caution!
|
|
||||||
// !caution!
|
|
||||||
// !caution!
|
|
||||||
// !caution!
|
|
||||||
|
|
||||||
// dont delete this commented code , this is used for refernce in getting td values
|
particulars :$(this).find(`td.absParticulars`).text().trim(),
|
||||||
|
opening_stock :$(this).find(`td.absOpeningStock`).text() ,
|
||||||
|
physical_stock :$(this).find(`td.absPhysicalStock`).text() ,
|
||||||
|
remarks :$(this).find(`td.absRemarks`).text(),
|
||||||
|
date :$(this).find(`td.absDate`).text()
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
rows.push(rowData);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
return JSON.stringify(rows, null, 2);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -172,8 +172,10 @@
|
|||||||
.fht-table thead {
|
.fht-table thead {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 20; /* Ensure the entire header stays above table rows */
|
z-index: 20;
|
||||||
background-color: #50bbd9; /* Header background color */
|
/* Ensure the entire header stays above table rows */
|
||||||
|
background-color: #50bbd9;
|
||||||
|
/* Header background color */
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-menu {
|
.dropdown-menu {
|
||||||
@ -186,14 +188,13 @@
|
|||||||
.fht-table thead th {
|
.fht-table thead th {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 11; /* Higher than table rows but lower than first column */
|
z-index: 11;
|
||||||
background-color: #50bbd9; /* Green background */
|
/* Higher than table rows but lower than first column */
|
||||||
|
background-color: #50bbd9;
|
||||||
|
/* Green background */
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #ddd;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
white-space: normal; /* Allows text to wrap */
|
|
||||||
word-wrap: break-word; /* Breaks long words if needed */
|
|
||||||
text-align: center; /* Centers text for better alignment */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sticky First Column */
|
/* Sticky First Column */
|
||||||
@ -202,7 +203,8 @@
|
|||||||
position: sticky;
|
position: sticky;
|
||||||
left: 0;
|
left: 0;
|
||||||
background-color: #50bbd9;
|
background-color: #50bbd9;
|
||||||
z-index: 15; /* Ensures it stays above other cells */
|
z-index: 15;
|
||||||
|
/* Ensures it stays above other cells */
|
||||||
border-right: 2px solid #ddd;
|
border-right: 2px solid #ddd;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
@ -211,21 +213,15 @@
|
|||||||
.table-responsive {
|
.table-responsive {
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
max-height: 500px; /* Adjust as needed */
|
max-height: 500px;
|
||||||
|
/* Adjust as needed */
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
td {
|
td {
|
||||||
min-width: 100px;
|
min-width: 150px;
|
||||||
max-width: 100px;
|
max-width: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
@ -269,7 +265,7 @@
|
|||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
<input type="text" name="month" id="month" value="<?php echo "$month" ?>"
|
<input type="text" name="month" id="month" value="<?php echo "$month" ?>"
|
||||||
class="form-control mt-2" data-provide="datepicker"
|
class="form-control mt-2" data-provide="datepicker"
|
||||||
data-date-format="M-yyyy" data-date-min-view-mode="1">
|
data-date-format="M-yyyy" data-date-min-view-mode="1" readonly>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-2">
|
<div class="form-group col-md-2">
|
||||||
<button type="submit" class="btn btn-success"> Change Month </button>
|
<button type="submit" class="btn btn-success"> Change Month </button>
|
||||||
@ -382,7 +378,7 @@
|
|||||||
|
|
||||||
} ?>
|
} ?>
|
||||||
|
|
||||||
<div class="table-responsive" style="width: 700px;">
|
<div class="table-responsive" >
|
||||||
|
|
||||||
<table id="trpSandUseStockDetailsTableSummaryId" class="fht-table table-striped">
|
<table id="trpSandUseStockDetailsTableSummaryId" class="fht-table table-striped">
|
||||||
|
|
||||||
@ -544,6 +540,7 @@
|
|||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
console.log(data);
|
console.log(data);
|
||||||
alert(data);
|
alert(data);
|
||||||
|
window.location.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
@ -84,22 +84,26 @@
|
|||||||
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button"
|
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button"
|
||||||
id="resetButton" title="Reset"></i>
|
id="resetButton" title="Reset"></i>
|
||||||
|
|
||||||
|
<div class="error" id="error"></div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
<div style="margin-left:auto">
|
<div style="margin-left:auto">
|
||||||
<div class="form-check" style="margin-right: 25px;">
|
<div class="form-check" style="margin-right: 25px;">
|
||||||
|
<form id="archiveFormId" action="<?php echo base_url()?>/supplierlisting" method="post">
|
||||||
<input class="form-check-input" type="checkbox" id="showArchiveId"
|
<input class="form-check-input" type="checkbox" id="showArchiveId"
|
||||||
name="showArchive" value="1" onchange="showArchiveList()"
|
name="showArchive" value="1" <?php echo $showArchive ? "checked" : " " ?>
|
||||||
style="width: 18px; height: 18px;">
|
style="width: 18px; height: 18px;">
|
||||||
<label class="form-check-label" for="showArchiveId"
|
<label class="form-check-label" for="showArchiveId"
|
||||||
style="font-size: 1rem; margin-left: 8px;">
|
style="font-size: 1rem; margin-left: 8px;">
|
||||||
Show Archive
|
Show Archive
|
||||||
</label>
|
</label>
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="error" id="error"></div>
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="card-body" style="overflow-x:scroll;">
|
<div class="card-body" style="overflow-x:scroll;">
|
||||||
<table class="table dt-responsive nowrap w-100" id="datatable">
|
<table class="table dt-responsive nowrap w-100" id="datatable">
|
||||||
<thead>
|
<thead>
|
||||||
@ -124,12 +128,7 @@
|
|||||||
foreach ($userRecords as $record) {
|
foreach ($userRecords as $record) {
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr class="<?php if ($record->IsActive == 0) {
|
<tr >
|
||||||
echo "deactivatedRow";
|
|
||||||
} ?>"
|
|
||||||
style="<?php if ($record->IsActive == 0) {
|
|
||||||
echo "display:none";
|
|
||||||
} ?>">
|
|
||||||
|
|
||||||
<?php if (date('d-m-Y', strtotime($record->CreatedOn)) == "30-11--0001") {
|
<?php if (date('d-m-Y', strtotime($record->CreatedOn)) == "30-11--0001") {
|
||||||
$cdate = '00-00-0000';
|
$cdate = '00-00-0000';
|
||||||
@ -493,28 +492,14 @@ function formatNumberToIndianCurrency(number) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
function showArchiveList() {
|
</script>
|
||||||
let isChecked = $("#showArchiveId").prop('checked');
|
|
||||||
|
|
||||||
// Show or hide the rows based on checkbox status
|
|
||||||
$(".deactivatedRow").each(function () {
|
|
||||||
if (isChecked) {
|
|
||||||
$(this).show();
|
|
||||||
} else {
|
|
||||||
$(this).hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
<script>
|
||||||
let table = $('#datatable').DataTable();
|
$(document).on("change", "#showArchiveId", function () {
|
||||||
|
console.log("Checkbox changed, submitting form...");
|
||||||
showArchiveList();
|
$("#archiveFormId").submit();
|
||||||
|
|
||||||
table.on('draw', function () {
|
|
||||||
showArchiveList();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -121,21 +121,27 @@
|
|||||||
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button"
|
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button"
|
||||||
id="resetButton" title="Reset"></i>
|
id="resetButton" title="Reset"></i>
|
||||||
|
|
||||||
|
<div class="error" id="error"></div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
<div style="margin-left:auto">
|
<div style="margin-left:auto">
|
||||||
<div class="form-check" style="margin-right: 25px;">
|
<div class="form-check" style="margin-right: 25px;">
|
||||||
|
<form id="archiveFormId" action="<?php echo base_url()?>/transporterListing" method="post">
|
||||||
<input class="form-check-input" type="checkbox" id="showArchiveId"
|
<input class="form-check-input" type="checkbox" id="showArchiveId"
|
||||||
name="showArchive" value="1" onchange="showArchiveList()"
|
name="showArchive" value="1" <?php echo $showArchive ? "checked" : " " ?>
|
||||||
style="width: 18px; height: 18px;">
|
style="width: 18px; height: 18px;">
|
||||||
<label class="form-check-label" for="showArchiveId"
|
<label class="form-check-label" for="showArchiveId"
|
||||||
style="font-size: 1rem; margin-left: 8px;">
|
style="font-size: 1rem; margin-left: 8px;">
|
||||||
Show Archive
|
Show Archive
|
||||||
</label>
|
</label>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="error" id="error"></div>
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="card-body" style="overflow-x:scroll;">
|
<div class="card-body" style="overflow-x:scroll;">
|
||||||
|
|
||||||
<table id="transporter_list" class="table dt-responsive nowrap w-100">
|
<table id="transporter_list" class="table dt-responsive nowrap w-100">
|
||||||
@ -156,11 +162,8 @@
|
|||||||
$date = $createdat->format('d-m-Y');
|
$date = $createdat->format('d-m-Y');
|
||||||
$time = $createdat->format('h:i A');
|
$time = $createdat->format('h:i A');
|
||||||
?>
|
?>
|
||||||
<tr class="<?php if ($record->isactive == 0) {
|
<tr>
|
||||||
echo "deactivatedRow";
|
|
||||||
} ?>" style="<?php if ($record->isactive == 0) {
|
|
||||||
echo "display:none";
|
|
||||||
} ?>">
|
|
||||||
<td><?php echo $date; ?></td>
|
<td><?php echo $date; ?></td>
|
||||||
<td><?php echo $record->name ?></td>
|
<td><?php echo $record->name ?></td>
|
||||||
<td><?php echo $record->FirstName ?></td>
|
<td><?php echo $record->FirstName ?></td>
|
||||||
@ -423,30 +426,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function showArchiveList() {
|
|
||||||
let isChecked = $("#showArchiveId").prop('checked');
|
|
||||||
|
|
||||||
// Show or hide the rows based on checkbox status
|
|
||||||
$(".deactivatedRow").each(function () {
|
|
||||||
if (isChecked) {
|
|
||||||
$(this).show();
|
|
||||||
} else {
|
|
||||||
$(this).hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
let table = $('#transporter_list').DataTable();
|
|
||||||
|
|
||||||
showArchiveList();
|
|
||||||
|
|
||||||
table.on('draw', function () {
|
|
||||||
showArchiveList();
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
@ -458,4 +437,13 @@ $(document).on('keydown', function(event) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).on("change", "#showArchiveId", function () {
|
||||||
|
console.log("Checkbox changed, submitting form...");
|
||||||
|
$("#archiveFormId").submit();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -88,22 +88,26 @@
|
|||||||
<button type="submit" class="range_search_button"><i class="fe-search" aria-hidden="true" class="icon-button" title="Search"></i></button>
|
<button type="submit" class="range_search_button"><i class="fe-search" aria-hidden="true" class="icon-button" title="Search"></i></button>
|
||||||
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
|
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="error" id="error"></div>
|
||||||
|
</form>
|
||||||
|
|
||||||
<div style="margin-left:auto">
|
<div style="margin-left:auto">
|
||||||
<div class="form-check" style="margin-right: 25px;">
|
<div class="form-check" style="margin-right: 25px;">
|
||||||
|
<form id="archiveFormId" action="<?php echo base_url()?>userListing" method="post">
|
||||||
<input class="form-check-input" type="checkbox" id="showArchiveId"
|
<input class="form-check-input" type="checkbox" id="showArchiveId"
|
||||||
name="showArchive" value="1" onchange="showArchiveList()"
|
name="showArchive" value="1" <?php echo $showArchive ? "checked" : " " ?>
|
||||||
style="width: 18px; height: 18px;">
|
style="width: 18px; height: 18px;">
|
||||||
<label class="form-check-label" for="showArchiveId"
|
<label class="form-check-label" for="showArchiveId"
|
||||||
style="font-size: 1rem; margin-left: 8px;">
|
style="font-size: 1rem; margin-left: 8px;">
|
||||||
Show Archive
|
Show Archive
|
||||||
</label>
|
</label>
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="error" id="error"></div>
|
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="card-body" style="overflow-x:scroll;">
|
<div class="card-body" style="overflow-x:scroll;">
|
||||||
<table id="user_list_table" class="table dt-responsive nowrap w-100">
|
<table id="user_list_table" class="table dt-responsive nowrap w-100">
|
||||||
|
|
||||||
@ -128,12 +132,7 @@
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr class="<?php if ($record->isDeleted == 1) {
|
<tr>
|
||||||
echo "deactivatedRow";
|
|
||||||
} ?>"
|
|
||||||
style="<?php if ($record->isDeleted == 1) {
|
|
||||||
echo "display:none";
|
|
||||||
} ?>">
|
|
||||||
|
|
||||||
<?php if (date('d-m-Y', strtotime($record->createdDtm)) == "30-11--0001") {
|
<?php if (date('d-m-Y', strtotime($record->createdDtm)) == "30-11--0001") {
|
||||||
$cdate = '00-00-0000';
|
$cdate = '00-00-0000';
|
||||||
@ -295,29 +294,11 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
function showArchiveList() {
|
|
||||||
let isChecked = $("#showArchiveId").prop('checked');
|
<script>
|
||||||
|
$(document).on("change", "#showArchiveId", function () {
|
||||||
// Show or hide the rows based on checkbox status
|
console.log("Checkbox changed, submitting form...");
|
||||||
$(".deactivatedRow").each(function () {
|
$("#archiveFormId").submit();
|
||||||
if (isChecked) {
|
});
|
||||||
$(this).show();
|
|
||||||
} else {
|
|
||||||
$(this).hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
let table = $('#user_list_table').DataTable();
|
|
||||||
|
|
||||||
showArchiveList();
|
|
||||||
|
|
||||||
table.on('draw', function () {
|
|
||||||
showArchiveList();
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -9,6 +9,13 @@
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#Inwardgateregistertable1 thead tr th{
|
||||||
|
|
||||||
|
width: 150px;
|
||||||
|
word-wrap: break-word;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
th {
|
th {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
@ -232,7 +239,8 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
if(!empty($IGR))
|
if(!empty($IGR))
|
||||||
{ $index = 0;
|
{
|
||||||
|
$index = 0;
|
||||||
foreach($IGR as $record)
|
foreach($IGR as $record)
|
||||||
{ $index = $index +1;
|
{ $index = $index +1;
|
||||||
$createddate = new DateTime($record->CreatedDate);
|
$createddate = new DateTime($record->CreatedDate);
|
||||||
@ -242,8 +250,17 @@
|
|||||||
<tr id="<?php echo $index ?>" >
|
<tr id="<?php echo $index ?>" >
|
||||||
<td align="center"><?php echo $date; ?></td>
|
<td align="center"><?php echo $date; ?></td>
|
||||||
<td align="center"><?php echo $time; ?></td>
|
<td align="center"><?php echo $time; ?></td>
|
||||||
<td style="cursor:pointer; color:#0bb2b5" ><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 ?>">
|
<td style="cursor:pointer; color:#0bb2b5" >
|
||||||
<?php echo $record->IGRNO ?></a>
|
|
||||||
|
<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 ?>">
|
||||||
|
<?php echo $record->IGRNO ?>
|
||||||
|
</a>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td style="cursor:pointer; color:#0bb2b5" ><a data-toggle="modal" data-target="#CostCentershow" data-id="<?php echo $index;?>" data-igno="<?php echo $record->IGRNO;?>" data-pono="<?php echo $record->PONO ?>" target="_blank">
|
<td style="cursor:pointer; color:#0bb2b5" ><a data-toggle="modal" data-target="#CostCentershow" data-id="<?php echo $index;?>" data-igno="<?php echo $record->IGRNO;?>" data-pono="<?php echo $record->PONO ?>" target="_blank">
|
||||||
<?php echo $record->PONO ?></a>
|
<?php echo $record->PONO ?></a>
|
||||||
@ -344,7 +361,7 @@
|
|||||||
|
|
||||||
<!-- modal2 - Edit Igr modal -->
|
<!-- modal2 - Edit Igr modal -->
|
||||||
<div id="Igrshow" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
<div id="Igrshow" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog modal-full-width">
|
<div class="modal-dialog modal-xl">
|
||||||
|
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@ -479,7 +496,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th style="width: 50px;">#</th>
|
<th style="width: 50px;">#</th>
|
||||||
<th style="width: 100px;">Item Code</th>
|
<th style="width: 100px;">Item Code</th>
|
||||||
<th style="width: 150px; word-wrap: break-word; word-break: break-all; white-space: normal;">Item Description</th>
|
<th style="width: 150px;">Item Description</th>
|
||||||
<th style="width: 50px;">UOM</th>
|
<th style="width: 50px;">UOM</th>
|
||||||
<th style="width: 100px;">Ordered Qty</th>
|
<th style="width: 100px;">Ordered Qty</th>
|
||||||
<th style="width: 100px;">Received Qty</th>
|
<th style="width: 100px;">Received Qty</th>
|
||||||
@ -489,7 +506,9 @@
|
|||||||
<th style="width: 50px;">Taxable Amt</th>
|
<th style="width: 50px;">Taxable Amt</th>
|
||||||
<th style="width: 50px;">Total Amt</th>
|
<th style="width: 50px;">Total Amt</th>
|
||||||
<th style="width: 150px;">Remarks</th>
|
<th style="width: 150px;">Remarks</th>
|
||||||
<th style="width: 50px;"></th>
|
<th style="width: 25px;">Calculate Net Weight</th>
|
||||||
|
<th style="width: 25px; display:none" id="gasShortageHeader">Add Gas Shortage</th>
|
||||||
|
<th style="width: 25px; display:none" id="gasShortageListHeader">Gas Shortage list</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="tbleIGRAppend">
|
<tbody id="tbleIGRAppend">
|
||||||
@ -636,6 +655,259 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- /.modal fade closed (Weight Calculator)-->
|
<!-- /.modal fade closed (Weight Calculator)-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- gas shortage list gasShortageList-->
|
||||||
|
|
||||||
|
<!-- Modal -->
|
||||||
|
<div id="gasShortageList" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="gasShortageListLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-xl " role="document">
|
||||||
|
<div class="modal-content" style="border: 1px solid #ddd; margin-top: 73px; box-shadow: 0 0 40px rgb(0 0 0 / 43%);">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="gasShortageListLabel" align="center">List of Gas Shortages</h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body" >
|
||||||
|
|
||||||
|
<table id="gasShortageTable" class="table table-bordered table-hover">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Full Cylinder Date</th>
|
||||||
|
<th>Empty Cylinder Date</th>
|
||||||
|
<th>Invoice No</th>
|
||||||
|
<th>Cylinder No</th>
|
||||||
|
<th>Gross Weight</th>
|
||||||
|
<th>Tare Weight</th>
|
||||||
|
<th>Net Weight</th>
|
||||||
|
<th>Actual Weight</th>
|
||||||
|
<th>Shortage</th>
|
||||||
|
<th style="display:none">ID</th>
|
||||||
|
<th>Action</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- end of gas shortage list -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- gas Shortage Calculator modal gasShortageCalculator -->
|
||||||
|
<div id="gasShortageCalculator" data-form="add" class="modal fade" tabindex="-1" role="dialog"
|
||||||
|
aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
|
||||||
|
<div class="modal-dialog modal-large">
|
||||||
|
<div class="modal-content" style="border: 1px solid #ddd; margin-top: 73px; box-shadow: 0 0 40px rgb(0 0 0 / 43%);">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title">Add Gas Shortage </h4>
|
||||||
|
<button type="button" class="close" data-dismiss="modal"
|
||||||
|
aria-hidden="true">×</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-body p-4">
|
||||||
|
|
||||||
|
|
||||||
|
<form action="#">
|
||||||
|
|
||||||
|
<!-- first row full cylinder date and empty cylinder date -->
|
||||||
|
<div class="form-group row">
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label for="fullCylinderDateId"> Full Cylinder Date</label>
|
||||||
|
<input type="date" class="form-control" id="fullCylinderDateId" name="fullCylinderDate" value="" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label for="emptyCylinderDateId"> Empty Cylinder Date</label>
|
||||||
|
<input type="date" class="form-control" id="emptyCylinderDateId" name="emptyCylinderDate" value="" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- second row cylinder no and Invoice No-->
|
||||||
|
<div class="form-group row">
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label for="invoiceNoId"> Invoice No / Bill No</label>
|
||||||
|
<input type="text" class="form-control" id="invoiceNoId" name="invoiceNo" value="" readonly>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label for="cylinderNoId"> Cylinder No </label>
|
||||||
|
<input type="text" class="form-control" id="cylinderNoId" name="cylinderNo" value="" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- third row gross weight and tare weight -->
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label for="grossWeightId"> Gross Weight </label>
|
||||||
|
<input type="text" class="form-control" id="grossWeightId" name="grossWeight" value="" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label for="tareWeightId"> Tare Weight </label>
|
||||||
|
<input type="text" class="form-control" id="tareWeightId" name="tareWeight" value="" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- fourth row NetWeight and actual weight -->
|
||||||
|
<div class="form-group row">
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label for="actualWeightId"> Actual Weight </label>
|
||||||
|
<input type="text" class="form-control" id="actualWeightId" name="actualWeight" value="" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label for="netWeightId"> Net Weight (Gross-Tare)</label>
|
||||||
|
<input type="text" class="form-control" id="netWeightId" name="netWeight" value="" readonly>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- fifth row Gas Shortage -->
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label for="shortageId"> Gas Shortage(Actual-Net)</label>
|
||||||
|
<input type="text" class="form-control" id="shortageId" name="shortage" value="" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary waves-effect"
|
||||||
|
data-dismiss="modal" value="Cancel">Cancel</button>
|
||||||
|
<button type="submit"
|
||||||
|
class="btn btn-info waves-effect waves-light" >Save</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- end gas shortage calculator modal -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Edit gas Shortage Calculator modal editgasShortageCalculator -->
|
||||||
|
<div id="editGasShortageCalculator" data-form="edit" class="modal fade" tabindex="-1" role="dialog"
|
||||||
|
aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
|
||||||
|
<div class="modal-dialog modal-large">
|
||||||
|
<div class="modal-content" style="border: 1px solid #ddd; margin-top: 73px; box-shadow: 0 0 40px rgb(0 0 0 / 43%);">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title">Update Gas Shortage </h4>
|
||||||
|
<button type="button" class="close" data-dismiss="modal"
|
||||||
|
aria-hidden="true">×</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<form action="#">
|
||||||
|
<div class="modal-body p-4">
|
||||||
|
<!-- first row full cylinder date and empty cylinder date -->
|
||||||
|
<div class="form-group row">
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label for="editFullCylinderDateId"> Full Cylinder Date</label>
|
||||||
|
<input type="date" class="form-control" id="editFullCylinderDateId" name="fullCylinderDate" value="" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label for="editEmptyCylinderDateId"> Empty Cylinder Date</label>
|
||||||
|
<input type="date" class="form-control" id="editEmptyCylinderDateId" name="emptyCylinderDate" value="" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- second row cylinder no and Invoice No-->
|
||||||
|
<div class="form-group row">
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label for="editInvoiceNoId"> Invoice No / Bill No</label>
|
||||||
|
<input type="text" class="form-control" id="editInvoiceNoId" name="invoiceNo" value="" readonly>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label for="editCylinderNoId"> Cylinder No </label>
|
||||||
|
<input type="text" class="form-control" id="editCylinderNoId" name="cylinderNo" value="" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- third row gross weight and tare weight -->
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label for="editGrossWeightId"> Gross Weight </label>
|
||||||
|
<input type="text" class="form-control" id="editGrossWeightId" name="grossWeight" value="" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label for="editTareWeightId"> Tare Weight </label>
|
||||||
|
<input type="text" class="form-control" id="editTareWeightId" name="tareWeight" value="" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- fourth row NetWeight and actual weight -->
|
||||||
|
<div class="form-group row">
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label for="editActualWeightId"> Actual Weight </label>
|
||||||
|
<input type="text" class="form-control" id="editActualWeightId" name="actualWeight" value="" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label for="editNetWeightId"> Net Weight (Gross-Tare)</label>
|
||||||
|
<input type="text" class="form-control" id="editNetWeightId" name="netWeight" value="" readonly>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- fifth row Gas Shortage -->
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label for="editShortageId"> Gas Shortage(Actual-Net)</label>
|
||||||
|
<input type="text" class="form-control" id="editShortageId" name="shortage" value="" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- hidden fields -->
|
||||||
|
<input type="hidden" id="editId" name="id" value="" >
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary waves-effect"
|
||||||
|
data-dismiss="modal" value="Cancel">Cancel</button>
|
||||||
|
<button type="submit"
|
||||||
|
class="btn btn-info waves-effect waves-light" >Save</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- end gas shortage calculator modal -->
|
||||||
|
|
||||||
|
|
||||||
<!-- modal4 - IGR history modal -->
|
<!-- modal4 - IGR history modal -->
|
||||||
<div id="Historyshow" class="modal fade" tabindex="-1" role="dialog"
|
<div id="Historyshow" class="modal fade" tabindex="-1" role="dialog"
|
||||||
aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
|
aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
|
||||||
@ -797,12 +1069,13 @@
|
|||||||
$('#right-modal').modal('show');
|
$('#right-modal').modal('show');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//recent work of adding gas shortage done here..!!
|
||||||
|
|
||||||
$("#Igrshow").on("shown.bs.modal", function(e) {
|
$("#Igrshow").on("shown.bs.modal", function(e) {
|
||||||
|
|
||||||
$('#loader').show();
|
$('#loader').show();
|
||||||
|
|
||||||
console.log("hello");
|
|
||||||
|
|
||||||
var inx = $(e.relatedTarget).data('id');
|
var inx = $(e.relatedTarget).data('id');
|
||||||
var igr = $(e.relatedTarget).data('userid');
|
var igr = $(e.relatedTarget).data('userid');
|
||||||
var igrstatus = $(e.relatedTarget).data('igrstatus');
|
var igrstatus = $(e.relatedTarget).data('igrstatus');
|
||||||
@ -821,7 +1094,10 @@
|
|||||||
modal.find('#MasterFileLabel').hide();
|
modal.find('#MasterFileLabel').hide();
|
||||||
|
|
||||||
var userRole = "<?php echo (int)$userRole; ?>";
|
var userRole = "<?php echo (int)$userRole; ?>";
|
||||||
|
|
||||||
|
//based on user role some fields are just read only
|
||||||
if (userRole != 1) {
|
if (userRole != 1) {
|
||||||
|
//based on status == ST074
|
||||||
if (igrstatus == "ST074") {
|
if (igrstatus == "ST074") {
|
||||||
buttonContainer.find("#draftIGR, #generateIGR").css("display", "inline-block");
|
buttonContainer.find("#draftIGR, #generateIGR").css("display", "inline-block");
|
||||||
$(".a_tag_for_mrir").css("display", "block");
|
$(".a_tag_for_mrir").css("display", "block");
|
||||||
@ -900,6 +1176,9 @@
|
|||||||
$.each(parsedData['details'], function(i, item) {
|
$.each(parsedData['details'], function(i, item) {
|
||||||
if (igr == item.IGRNO) {
|
if (igr == item.IGRNO) {
|
||||||
console.log(item,"**");
|
console.log(item,"**");
|
||||||
|
|
||||||
|
//setting values in the igr modal.. particularly input fields
|
||||||
|
|
||||||
$('#IgrshowTitle').text(" ( " + item.IGRNO + " ) ");
|
$('#IgrshowTitle').text(" ( " + item.IGRNO + " ) ");
|
||||||
$("#IGRNO1").val(item.IGRNO);
|
$("#IGRNO1").val(item.IGRNO);
|
||||||
$("#PONO1").val(item.PONO);
|
$("#PONO1").val(item.PONO);
|
||||||
@ -960,8 +1239,10 @@
|
|||||||
|
|
||||||
i = i + 1;
|
i = i + 1;
|
||||||
// userrole is system admin also know as admin (if)
|
// userrole is system admin also know as admin (if)
|
||||||
|
//if role is system admin,
|
||||||
if (userRole == 1) {
|
if (userRole == 1) {
|
||||||
$("#pendingQuantityHeader").css("display", "table-cell");
|
$("#pendingQuantityHeader").css("display", "table-cell");
|
||||||
|
|
||||||
trIGRHTML += '<tr>' +
|
trIGRHTML += '<tr>' +
|
||||||
'<td style="width: 50px;" >' + i + '</td>' +
|
'<td style="width: 50px;" >' + i + '</td>' +
|
||||||
'<td style="width: 100px;" name="MaterialName" onchange="test(' + i + ')">' + item.MaterialCode + '</td>' +
|
'<td style="width: 100px;" name="MaterialName" onchange="test(' + i + ')">' + item.MaterialCode + '</td>' +
|
||||||
@ -975,9 +1256,10 @@
|
|||||||
'<td style="width: 50px;" id="amount' + i + '">' + amount + '</td>' +
|
'<td style="width: 50px;" id="amount' + i + '">' + amount + '</td>' +
|
||||||
'<td style="width: 50px;" id="grand_total_amount' + i + '">' + grand_total_amount + '</td>' +
|
'<td style="width: 50px;" id="grand_total_amount' + i + '">' + grand_total_amount + '</td>' +
|
||||||
'<td style="width: 100px;"><input type="text" id="Remark' + i + '" name="Remark' + i + '" class="form" onchange="SetRemarks(' + i + ')" style="width: 75px;" value="'+item.Remarks+'"> </td>' +
|
'<td style="width: 100px;"><input type="text" id="Remark' + i + '" name="Remark' + i + '" class="form" onchange="SetRemarks(' + i + ')" style="width: 75px;" value="'+item.Remarks+'"> </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>' +
|
'<td style="width: 25px;"><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 + '">' +
|
'<input type="hidden" id="IGRNO' + i + '" name="IGRNO' + i + '" value="' + item.IGRNO + '">' +
|
||||||
'<input type="hidden" id="MaterialCode' + i + '" name="MaterialCode' + i + '" value="' + item.MaterialCode + '">' +
|
'<input type="hidden" id="MaterialCode' + i + '" name="MaterialCode' + i + '" value="' + item.MaterialCode + '">' +
|
||||||
|
'<input type="hidden" id="MaterialCategory' + i + '" name="MaterialCategory' + i + '" value="' + item.MaterialCategory + '">' +
|
||||||
'<input type="hidden" id="txtQuantityAsPerInvoice' + i + '" name="txtQuantityAsPerInvoice' + i + '" value="' + item.QuantityAsPerInvoice + '">' +
|
'<input type="hidden" id="txtQuantityAsPerInvoice' + i + '" name="txtQuantityAsPerInvoice' + i + '" value="' + item.QuantityAsPerInvoice + '">' +
|
||||||
'<input type="hidden" id="txtOrderedQuantity' + i + '" name="txtOrderedQuantity' + i + '" value="' + item.Quantity + '">' +
|
'<input type="hidden" id="txtOrderedQuantity' + i + '" name="txtOrderedQuantity' + i + '" value="' + item.Quantity + '">' +
|
||||||
'<input type="hidden" id="txtGrossWeight' + i + '" name="txtGrossWeight' + i + '" value="' + item.GrossWeight + '">' +
|
'<input type="hidden" id="txtGrossWeight' + i + '" name="txtGrossWeight' + i + '" value="' + item.GrossWeight + '">' +
|
||||||
@ -988,8 +1270,22 @@
|
|||||||
'<input type="hidden" id="txtRemarks' + i + '" name="txtRemarks' + i + '"value="' + item.Remarks + '">' +
|
'<input type="hidden" id="txtRemarks' + i + '" name="txtRemarks' + i + '"value="' + item.Remarks + '">' +
|
||||||
'<input type="hidden" id="txtIGRLineItem' + i + '" name="txtIGRLineItem' + i + '"value="' + item.IGRItemNo + '">' +
|
'<input type="hidden" id="txtIGRLineItem' + i + '" name="txtIGRLineItem' + i + '"value="' + item.IGRItemNo + '">' +
|
||||||
'<input type="file" id="txtWeightFile' + i + '" name="txtWeightFile' + i + '"value="' + item.WeightFile + '" style="display:none;">' +
|
'<input type="file" id="txtWeightFile' + i + '" name="txtWeightFile' + i + '"value="' + item.WeightFile + '" style="display:none;">' +
|
||||||
'<input type="hidden" id="txtWeightFileName' + i + '" name="txtWeightFileName' + i + '"value="' + item.WeightFile + '">' +
|
'<input type="hidden" id="txtWeightFileName' + i + '" name="txtWeightFileName' + i + '"value="' + item.WeightFile + '">' ;
|
||||||
'</tr>';
|
|
||||||
|
|
||||||
|
let regex = /gas/i;
|
||||||
|
|
||||||
|
if(regex.test(item.MaterialCategory) ){
|
||||||
|
$('#gasShortageHeader').show();
|
||||||
|
$('#gasShortageListHeader').show();
|
||||||
|
trIGRHTML += '<td style="width: 25px;"><a target="_blank" data-toggle="modal" data-target="#gasShortageCalculator" title="gas Shortage Calculator" data-index="' + i + '" data-material="' + item.MaterialName + '" data-igrstatus = "' + igrstatus + '"><i class="fa fa-solid fa-gas-pump" style="text-align: center;"></i></a> </td>' ;
|
||||||
|
trIGRHTML += '<td style="width: 25px;"><a target="_blank" data-toggle="modal" data-target="#gasShortageList" title="gas Shortage List" ><i class="fa fa-solid fa-list" style="text-align: center;"></i></a> </td>' ;
|
||||||
|
|
||||||
|
trIGRHTML +='</tr>';
|
||||||
|
}else{
|
||||||
|
trIGRHTML +='</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if ((item.Quantity - item.QuantityAsPerInvoice) == 0.00) {
|
if ((item.Quantity - item.QuantityAsPerInvoice) == 0.00) {
|
||||||
$('#QuantityAsPerInvoice' + i).attr('readonly', 'true');
|
$('#QuantityAsPerInvoice' + i).attr('readonly', 'true');
|
||||||
@ -1015,7 +1311,7 @@
|
|||||||
'<td style="width: 50px;" id="amount' + i + '">' + amount + '</td>' +
|
'<td style="width: 50px;" id="amount' + i + '">' + amount + '</td>' +
|
||||||
'<td style="width: 50px;" id="grand_total_amount' + i + '">' + grand_total_amount + '</td>' +
|
'<td style="width: 50px;" id="grand_total_amount' + i + '">' + grand_total_amount + '</td>' +
|
||||||
'<td style="width: 100px;"><input type="text" id="Remark' + i + '" name="Remark' + i + '" class="form" onchange="SetRemarks(' + i + ')" style="width: 75px;" value="'+item.Remarks+'"> </td>' +
|
'<td style="width: 100px;"><input type="text" id="Remark' + i + '" name="Remark' + i + '" class="form" onchange="SetRemarks(' + i + ')" style="width: 75px;" value="'+item.Remarks+'"> </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>' +
|
'<td style="width: 25px;"><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 + '">' +
|
'<input type="hidden" id="IGRNO' + i + '" name="IGRNO' + i + '" value="' + item.IGRNO + '">' +
|
||||||
'<input type="hidden" id="MaterialCode' + i + '" name="MaterialCode' + i + '" value="' + item.MaterialCode + '">' +
|
'<input type="hidden" id="MaterialCode' + i + '" name="MaterialCode' + i + '" value="' + item.MaterialCode + '">' +
|
||||||
'<input type="hidden" id="txtQuantityAsPerInvoice' + i + '" name="txtQuantityAsPerInvoice' + i + '" value="' + item.QuantityAsPerInvoice + '">' +
|
'<input type="hidden" id="txtQuantityAsPerInvoice' + i + '" name="txtQuantityAsPerInvoice' + i + '" value="' + item.QuantityAsPerInvoice + '">' +
|
||||||
@ -1028,8 +1324,18 @@
|
|||||||
'<input type="hidden" id="txtRemarks' + i + '" name="txtRemarks' + i + '"value="' + item.Remarks + '">' +
|
'<input type="hidden" id="txtRemarks' + i + '" name="txtRemarks' + i + '"value="' + item.Remarks + '">' +
|
||||||
'<input type="hidden" id="txtIGRLineItem' + i + '" name="txtIGRLineItem' + i + '"value="' + item.IGRItemNo + '">' +
|
'<input type="hidden" id="txtIGRLineItem' + i + '" name="txtIGRLineItem' + i + '"value="' + item.IGRItemNo + '">' +
|
||||||
'<input type="file" id="txtWeightFile' + i + '" name="txtWeightFile' + i + '"value="' + item.WeightFile + '" style="display:none;">' +
|
'<input type="file" id="txtWeightFile' + i + '" name="txtWeightFile' + i + '"value="' + item.WeightFile + '" style="display:none;">' +
|
||||||
'<input type="hidden" id="txtWeightFileName' + i + '" name="txtWeightFileName' + i + '"value="' + item.WeightFile + '">' +
|
'<input type="hidden" id="txtWeightFileName' + i + '" name="txtWeightFileName' + i + '"value="' + item.WeightFile + '">' ;
|
||||||
'</tr>';
|
|
||||||
|
if(item.MaterialCategory == "gas"){
|
||||||
|
$('#gasShortageHeader').show();
|
||||||
|
$('#gasShortageListHeader').show();
|
||||||
|
trIGRHTML += '<td style="width: 25px;"><a target="_blank" data-toggle="modal" data-target="#gasShortageCalculator" title="gas Shortage Calculator" data-index="' + i + '" data-material="' + item.MaterialName + '" data-igrstatus = "' + igrstatus + '"><i class="fa fa-solid fa-gas-pump" style="text-align: center;"></i></a> </td>' ;
|
||||||
|
trIGRHTML += '<td style="width: 25px;"><a target="_blank" data-toggle="modal" data-target="#gasShortageList" title="gas Shortage List" ><i class="fa fa-solid fa-list" style="text-align: center;"></i></a> </td>' ;
|
||||||
|
|
||||||
|
trIGRHTML +='</tr>';
|
||||||
|
}else{
|
||||||
|
trIGRHTML +='</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
if ((item.Quantity - item.QuantityAsPerInvoice) == 0.00) {
|
if ((item.Quantity - item.QuantityAsPerInvoice) == 0.00) {
|
||||||
$('#QuantityAsPerInvoice' + i).attr('readonly', 'true');
|
$('#QuantityAsPerInvoice' + i).attr('readonly', 'true');
|
||||||
@ -1049,7 +1355,7 @@
|
|||||||
'<td style="width: 50px;" id="tax_percentage' + i + '">' + tax_percentage + '</td>' +
|
'<td style="width: 50px;" id="tax_percentage' + i + '">' + tax_percentage + '</td>' +
|
||||||
'<td style="width: 50px;" id="amount' + i + '">' + amount + '</td>' +
|
'<td style="width: 50px;" id="amount' + i + '">' + amount + '</td>' +
|
||||||
'<td style="width: 50px;" id="grand_total_amount' + i + '">' + grand_total_amount + '</td>' +
|
'<td style="width: 50px;" id="grand_total_amount' + i + '">' + grand_total_amount + '</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>' +
|
'<td style="width: 25px;"><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 + '">' +
|
'<input type="hidden" id="IGRNO' + i + '" name="IGRNO' + i + '" value="' + item.IGRNO + '">' +
|
||||||
'<input type="hidden" id="MaterialCode' + i + '" name="MaterialCode' + i + '" value="' + item.MaterialCode + '">' +
|
'<input type="hidden" id="MaterialCode' + i + '" name="MaterialCode' + i + '" value="' + item.MaterialCode + '">' +
|
||||||
'<input type="hidden" id="txtQuantityAsPerInvoice' + i + '" name="txtQuantityAsPerInvoice' + i + '" value="' + item.QuantityAsPerInvoice + '">' +
|
'<input type="hidden" id="txtQuantityAsPerInvoice' + i + '" name="txtQuantityAsPerInvoice' + i + '" value="' + item.QuantityAsPerInvoice + '">' +
|
||||||
@ -1062,8 +1368,18 @@
|
|||||||
'<input type="hidden" id="txtRemarks' + i + '" name="txtRemarks' + i + '"value="' + item.Remarks + '">' +
|
'<input type="hidden" id="txtRemarks' + i + '" name="txtRemarks' + i + '"value="' + item.Remarks + '">' +
|
||||||
'<input type="hidden" id="txtIGRLineItem' + i + '" name="txtIGRLineItem' + i + '"value="' + item.IGRItemNo + '">' +
|
'<input type="hidden" id="txtIGRLineItem' + i + '" name="txtIGRLineItem' + i + '"value="' + item.IGRItemNo + '">' +
|
||||||
'<input type="file" id="txtWeightFile' + i + '" name="txtWeightFile' + i + '"value="' + item.WeightFile + '">' +
|
'<input type="file" id="txtWeightFile' + i + '" name="txtWeightFile' + i + '"value="' + item.WeightFile + '">' +
|
||||||
'<input type="hidden" id="txtWeightFileName' + i + '" name="txtWeightFileName' + i + '"value="' + item.WeightFile + '">' +
|
'<input type="hidden" id="txtWeightFileName' + i + '" name="txtWeightFileName' + i + '"value="' + item.WeightFile + '">';
|
||||||
'</tr>';
|
|
||||||
|
if(item.MaterialCategory == "gas"){
|
||||||
|
$('#gasShortageHeader').show();
|
||||||
|
$('#gasShortageListHeader').show();
|
||||||
|
trIGRHTML += '<td style="width: 25px;"><a target="_blank" data-toggle="modal" data-target="#gasShortageCalculator" title="gas Shortage Calculator" data-index="' + i + '" data-material="' + item.MaterialName + '" data-igrstatus = "' + igrstatus + '"><i class="fa fa-solid fa-gas-pump" style="text-align: center;"></i></a> </td>' ;
|
||||||
|
trIGRHTML += '<td style="width: 25px;"><a target="_blank" data-toggle="modal" data-target="#gasShortageList" title="gas Shortage List" ><i class="fa fa-solid fa-list" style="text-align: center;"></i></a> </td>' ;
|
||||||
|
|
||||||
|
trIGRHTML +='</tr>';
|
||||||
|
}else{
|
||||||
|
trIGRHTML +='</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1103,12 +1419,18 @@
|
|||||||
<script>
|
<script>
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$('#Igrshow').on("hide.bs.modal", function(e){
|
$('#Igrshow').on("hide.bs.modal", function(e){
|
||||||
|
$('#gasShortageHeader').hide();
|
||||||
|
$('#gasShortageListHeader').hide();
|
||||||
$('#existingContainer').empty();
|
$('#existingContainer').empty();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$('#update').click(function() {
|
$('#update').click(function() {
|
||||||
// $('#content').loader('show');
|
// $('#content').loader('show');
|
||||||
@ -2058,3 +2380,425 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 28/02/2025 -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- add gas shortage calculator -->
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$('#grossWeightId, #tareWeightId,#actualWeightId').change(function() {
|
||||||
|
|
||||||
|
console.log("fine here ");
|
||||||
|
|
||||||
|
let grossWeightVal = $('#grossWeightId').val().trim();
|
||||||
|
let tareWeightVal = $('#tareWeightId').val().trim();
|
||||||
|
|
||||||
|
// Ensure both fields have values before calculation
|
||||||
|
if (grossWeightVal === '' || tareWeightVal === '') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let grossWeight = validateNumber(grossWeightVal);
|
||||||
|
let tareWeight = validateNumber(tareWeightVal);
|
||||||
|
|
||||||
|
let netWeight = grossWeight - tareWeight;
|
||||||
|
$('#netWeightId').val(netWeight);
|
||||||
|
|
||||||
|
let actualWeightVal = $('#actualWeightId').val().trim();
|
||||||
|
|
||||||
|
// Ensure both fields have values before calculation
|
||||||
|
if (actualWeightVal === '' || netWeight === '') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let actualWeight = validateNumber(actualWeightVal);
|
||||||
|
|
||||||
|
let shortage = actualWeight - netWeight;
|
||||||
|
$('#shortageId').val(shortage);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function validateNumber(givenValue) {
|
||||||
|
givenValue = givenValue.trim();
|
||||||
|
|
||||||
|
if (/^\d+$/.test(givenValue)) {
|
||||||
|
return parseInt(givenValue, 10); // Convert string to number
|
||||||
|
} else {
|
||||||
|
alert('Please Enter a Valid Number..!!');
|
||||||
|
return 0; // Invalid number
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- while opening add gas shortage modal -->
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
$('#gasShortageCalculator').on("shown.bs.modal", function(e){
|
||||||
|
|
||||||
|
//invoice needed to store it in the shortage table ,
|
||||||
|
// coz based on this we can limit the addition of shortage must not exceed than given qty
|
||||||
|
let invoiceNo = $('#Invoice_No').val();
|
||||||
|
|
||||||
|
|
||||||
|
let materialReceivedDate = $('#MaterialRcvdDate').val().split("-");
|
||||||
|
|
||||||
|
//converting it to y-m-d format;
|
||||||
|
console.log(`${materialReceivedDate[2]}-${materialReceivedDate[1]}-${materialReceivedDate[0]}`);
|
||||||
|
|
||||||
|
$('#invoiceNoId').val(invoiceNo);
|
||||||
|
$('#fullCylinderDateId').val(`${materialReceivedDate[2]}-${materialReceivedDate[1]}-${materialReceivedDate[0]}`);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- while closing add gas shortage modal -->
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
$('#gasShortageCalculator').on("hide.bs.modal", function(e){
|
||||||
|
|
||||||
|
$('#invoiceNoId').val(' ');
|
||||||
|
$('#fullCylinderDateId').val(" ");
|
||||||
|
$('#emptyCylinderDateId').val(" ");
|
||||||
|
$('#cylinderNoId').val(" ");
|
||||||
|
$('#grossWeightId').val(" ");
|
||||||
|
$('#tareWeightId').val(" ");
|
||||||
|
$('#actualWeightId').val(" ");
|
||||||
|
$('#netWeightId').val(" ");
|
||||||
|
$('#shortageId').val(" ");
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- end of add gas shortage calculator -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- edit gasShortageCalculator -->
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$('#editGrossWeightId,#editTareWeightId,#editActualWeightId').change(function() {
|
||||||
|
let grossWeightVal = $('#editGrossWeightId').val().trim();
|
||||||
|
let tareWeightVal = $('#editTareWeightId').val().trim();
|
||||||
|
|
||||||
|
// Ensure both fields have values before calculation
|
||||||
|
if (grossWeightVal === '' || tareWeightVal === '') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let grossWeight = validateNumber(grossWeightVal);
|
||||||
|
let tareWeight = validateNumber(tareWeightVal);
|
||||||
|
|
||||||
|
let netWeight = grossWeight - tareWeight;
|
||||||
|
$('#editNetWeightId').val(netWeight);
|
||||||
|
|
||||||
|
let actualWeightVal = $('#editActualWeightId').val().trim();
|
||||||
|
|
||||||
|
// Ensure both fields have values before calculation
|
||||||
|
if (actualWeightVal === '' || netWeight === '') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let actualWeight = validateNumber(actualWeightVal);
|
||||||
|
|
||||||
|
let shortage = actualWeight - netWeight;
|
||||||
|
$('#editShortageId').val(shortage);
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- while opening edit gas shortage modal -->
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
$('#editGasShortageCalculator').on("shown.bs.modal", function(e){
|
||||||
|
|
||||||
|
|
||||||
|
//invoice needed to store it in the shortage table ,
|
||||||
|
// coz based on this we can limit the addition of shortage must not exceed than given qty
|
||||||
|
let invoiceNo = $('#Invoice_No').val();
|
||||||
|
|
||||||
|
|
||||||
|
let materialReceivedDate = $('#MaterialRcvdDate').val().split("-");
|
||||||
|
|
||||||
|
//converting it to y-m-d format;
|
||||||
|
console.log(`${materialReceivedDate[2]}-${materialReceivedDate[1]}-${materialReceivedDate[0]}`);
|
||||||
|
|
||||||
|
$('#editInvoiceNoId').val(invoiceNo);
|
||||||
|
$('#editFullCylinderDateId').val(`${materialReceivedDate[2]}-${materialReceivedDate[1]}-${materialReceivedDate[0]}`);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- while closing edit gas shortage modal -->
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
$('#editGasShortageCalculator').on("hide.bs.modal", function(e){
|
||||||
|
$('#editInvoiceNoId').val(' ');
|
||||||
|
$('#editFullCylinderDateId').val(" ");
|
||||||
|
$('#editEmptyCylinderDateId').val(" ");
|
||||||
|
$('#editCylinderNoId').val(" ");
|
||||||
|
$('#editGrossWeightId').val(" ");
|
||||||
|
$('#editTareWeightId').val(" ");
|
||||||
|
$('#editActualWeightId').val(" ");
|
||||||
|
$('#editNetWeightId').val(" ");
|
||||||
|
$('#editShortageId').val(" ");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- end of edit gasShortageCalculator -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- while opening gasShortageList -->
|
||||||
|
<script>
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
|
||||||
|
$('#gasShortageList').on("shown.bs.modal",function(e){
|
||||||
|
|
||||||
|
let invoiceNo = $('#Invoice_No').val();
|
||||||
|
|
||||||
|
console.log("invoice no", invoiceNo);
|
||||||
|
|
||||||
|
$('#loader').show();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?php echo base_url()?>/gasShortageList", // 🔹 Change this to your actual backend endpoint
|
||||||
|
data: {invoiceNo},
|
||||||
|
dataType: "json",
|
||||||
|
success: function (response) {
|
||||||
|
if (response.status === "success") {
|
||||||
|
|
||||||
|
console.log(response.data);
|
||||||
|
|
||||||
|
let data = response.data ;
|
||||||
|
console.log("gas shortage list");
|
||||||
|
console.log(data);
|
||||||
|
let tableData = '';
|
||||||
|
|
||||||
|
data.forEach((val) => {
|
||||||
|
tableData += `
|
||||||
|
<tr>
|
||||||
|
<td>${val.fullCylinderDate}</td>
|
||||||
|
<td>${val.emptyCylinderDate}</td>
|
||||||
|
<td>${val.invoiceNo}</td>
|
||||||
|
<td>${val.cylinderNo}</td>
|
||||||
|
<td>${val.grossWeight}</td>
|
||||||
|
<td>${val.tareWeight}</td>
|
||||||
|
<td>${val.netWeight}</td>
|
||||||
|
<td>${val.actualWeight}</td>
|
||||||
|
<td>${val.shortage}</td>
|
||||||
|
<td style="display:none">${val.id}</td>
|
||||||
|
<td style="width: 25px;">
|
||||||
|
<i class="fa fa-solid fa-edit btnEditGasShortageCalculator"
|
||||||
|
style="text-align: center;"
|
||||||
|
data-toggle="modal"
|
||||||
|
data-target="#editGasShortageCalculator"
|
||||||
|
data-id="${val.id}"
|
||||||
|
title="Edit Gas Shortage List">
|
||||||
|
</i>
|
||||||
|
</td>
|
||||||
|
</tr>`;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Assuming you have a table with ID "gasShortageTable"
|
||||||
|
$("#gasShortageTable tbody").html(tableData);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
alert("Error: " + response.message);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (xhr, status, error) {
|
||||||
|
console.log(xhr.responseText);
|
||||||
|
alert("Something went wrong! Please try again.");
|
||||||
|
},
|
||||||
|
complete:function(){
|
||||||
|
console.log("ajax call is completed..!!");
|
||||||
|
$('#loader').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- while closing gasShortageList -->
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
|
||||||
|
$('#gasShortageList').on("hide.bs.modal",function(){
|
||||||
|
$("#gasShortageTable tbody").html(" ");
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ajax call for gas Shortage -->
|
||||||
|
<script>
|
||||||
|
|
||||||
|
$("#gasShortageCalculator, #editGasShortageCalculator").submit(function (event) {
|
||||||
|
|
||||||
|
event.preventDefault(); // Prevent form reload
|
||||||
|
|
||||||
|
let formData;
|
||||||
|
|
||||||
|
let method = $(this).closest(".modal").data("form");
|
||||||
|
|
||||||
|
// Prepare form data
|
||||||
|
let addFormData = {
|
||||||
|
fullCylinderDate: $('#fullCylinderDateId').val(),
|
||||||
|
emptyCylinderDate: $('#emptyCylinderDateId').val(),
|
||||||
|
invoiceNo: $('#invoiceNoId').val(),
|
||||||
|
cylinderNo: $('#cylinderNoId').val(),
|
||||||
|
grossWeight: $('#grossWeightId').val(),
|
||||||
|
tareWeight: $('#tareWeightId').val(),
|
||||||
|
actualWeight: $('#actualWeightId').val(),
|
||||||
|
netWeight: $('#netWeightId').val(),
|
||||||
|
shortage: $('#shortageId').val()
|
||||||
|
};
|
||||||
|
|
||||||
|
let editFormData = {
|
||||||
|
fullCylinderDate: $('#editFullCylinderDateId').val(),
|
||||||
|
emptyCylinderDate: $('#editEmptyCylinderDateId').val(),
|
||||||
|
invoiceNo: $('#editInvoiceNoId').val(),
|
||||||
|
cylinderNo: $('#editCylinderNoId').val(),
|
||||||
|
grossWeight: $('#editGrossWeightId').val(),
|
||||||
|
tareWeight: $('#editTareWeightId').val(),
|
||||||
|
actualWeight: $('#editActualWeightId').val(),
|
||||||
|
netWeight: $('#editNetWeightId').val(),
|
||||||
|
shortage: $('#editShortageId').val(),
|
||||||
|
id : $('#editId').val()
|
||||||
|
};
|
||||||
|
|
||||||
|
if(method == "add"){ formData = addFormData ;}
|
||||||
|
if(method == "edit"){ formData = editFormData ;}
|
||||||
|
|
||||||
|
|
||||||
|
$('#loader').show();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?php echo base_url()?>/updateGasShortage", // 🔹 Change this to your actual backend endpoint
|
||||||
|
data: formData,
|
||||||
|
dataType: "json",
|
||||||
|
success: function (response) {
|
||||||
|
if (response.status === "success") {
|
||||||
|
alert("Gas Shortage Data Saved Successfully!");
|
||||||
|
$('#gasShortageCalculator').modal('hide'); // Close modal
|
||||||
|
$('#editGasShortageCalculator').modal('hide');
|
||||||
|
} else {
|
||||||
|
alert("Error: " + response.message);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (xhr, status, error) {
|
||||||
|
console.log(xhr.responseText);
|
||||||
|
alert("Something went wrong! Please try again.");
|
||||||
|
},
|
||||||
|
complete:function(){
|
||||||
|
console.log("ajax call is completed..!!");
|
||||||
|
$('#loader').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).on("click", ".btnEditGasShortageCalculator", function () {
|
||||||
|
console.log("Edit modal opening place");
|
||||||
|
|
||||||
|
let id = $(this).data("id");
|
||||||
|
console.log("Editing ID:", id);
|
||||||
|
|
||||||
|
// Smooth transition: First hide, then show after 300ms
|
||||||
|
$("#gasShortageList").modal("hide");
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
$("#editGasShortageCalculator").modal("show");
|
||||||
|
}, 300);
|
||||||
|
|
||||||
|
$('#loader').show();
|
||||||
|
// AJAX request to fetch data
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?php echo base_url()?>/getGasShortageDetail",
|
||||||
|
data: { id: id },
|
||||||
|
dataType: "json",
|
||||||
|
success: function (response) {
|
||||||
|
if (response.status === "success") {
|
||||||
|
let data = response.data;
|
||||||
|
|
||||||
|
console.log(data);
|
||||||
|
|
||||||
|
if(data.length > 0){
|
||||||
|
|
||||||
|
data = data[0];
|
||||||
|
|
||||||
|
console.log(data);
|
||||||
|
|
||||||
|
// Populate the modal fields
|
||||||
|
$("#editFullCylinderDateId").val(data.fullCylinderDate);
|
||||||
|
$("#editEmptyCylinderDateId").val(data.emptyCylinderDate);
|
||||||
|
$("#editInvoiceNoId").val(data.invoiceNo);
|
||||||
|
$("#editCylinderNoId").val(data.cylinderNo);
|
||||||
|
$("#editGrossWeightId").val(data.grossWeight);
|
||||||
|
$("#editTareWeightId").val(data.tareWeight);
|
||||||
|
$("#editNetWeightId").val(data.netWeight);
|
||||||
|
$("#editActualWeightId").val(data.actualWeight);
|
||||||
|
$("#editShortageId").val(data.shortage);
|
||||||
|
$("#editId").val(data.id); // Hidden field for ID
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
alert("Error: " + response.message);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (xhr, status, error) {
|
||||||
|
console.log(xhr.responseText);
|
||||||
|
alert("Something went wrong! Please try again.");
|
||||||
|
},
|
||||||
|
complete:function(){
|
||||||
|
console.log("ajax call is completed..!!");
|
||||||
|
$('#loader').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,6 @@
|
|||||||
"kint-php/kint": "^5.0.4",
|
"kint-php/kint": "^5.0.4",
|
||||||
"mikey179/vfsstream": "^1.6",
|
"mikey179/vfsstream": "^1.6",
|
||||||
"nexusphp/cs-config": "^3.6",
|
"nexusphp/cs-config": "^3.6",
|
||||||
"phpunit/phpunit": "^10.5.16",
|
|
||||||
"predis/predis": "^1.1 || ^2.0"
|
"predis/predis": "^1.1 || ^2.0"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
|
|||||||
@ -145,14 +145,16 @@ function serviceValidate(){
|
|||||||
alert('Please Select Budget Type');
|
alert('Please Select Budget Type');
|
||||||
$('#BudgetType').focus();
|
$('#BudgetType').focus();
|
||||||
return false;
|
return false;
|
||||||
}else if ($('#serviceTax tbody tr').length < 1) {
|
}
|
||||||
alert('Atleast One Line needed');
|
// else if ($('#ServiceTable tbody tr').length < 1) {
|
||||||
return false;
|
// alert('Atleast One Line needed');
|
||||||
} else if ($('#descofpo').val().trim() == '') {
|
// return false;
|
||||||
alert('Please Enter Description Of Service');
|
// } else if ($('#descofpo').val().trim() == '') {
|
||||||
$('#descofpo').focus();
|
// alert('Please Enter Description Of Service');
|
||||||
return false;
|
// $('#descofpo').focus();
|
||||||
}else {
|
// return false;
|
||||||
|
// }
|
||||||
|
else {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user