worked on business settings in master -vadivel J

This commit is contained in:
vadivelJ96 2024-09-09 12:21:03 +05:30
commit 5e55504fe3
22 changed files with 4149 additions and 3740 deletions

View File

@ -16,6 +16,7 @@ $routes->add('loginMe', 'Login::loginMe');
$routes->get('logout', 'User::logout'); $routes->get('logout', 'User::logout');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'loadChangePass', 'User::loadChangePass'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'loadChangePass', 'User::loadChangePass');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'changePassword', 'User::changePassword'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'changePassword', 'User::changePassword');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'userChangePassword', 'User::userChangePassword');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'],'pageNotFound', 'User::pageNotFound'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'],'pageNotFound', 'User::pageNotFound');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'],'checkEmailExists', 'User::checkEmailExists'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'],'checkEmailExists', 'User::checkEmailExists');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'],'forgotPassword', 'Login::forgotPassword'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'],'forgotPassword', 'Login::forgotPassword');

View File

@ -61,6 +61,8 @@ class Configurationctrl extends BaseController
function saveconfig() function saveconfig()
{ {
// echo "<pre>";
// dd($this->request->getPost());
$ConfigName = $this->request->getPost('configurationname'); $ConfigName = $this->request->getPost('configurationname');
$Rowcount = $this->request->getPost('txtRowCount'); $Rowcount = $this->request->getPost('txtRowCount');
$Comments = $this->request->getPost('Comments'); $Comments = $this->request->getPost('Comments');
@ -90,14 +92,15 @@ class Configurationctrl extends BaseController
$data['child'] = $this->configmodel->GetConfigCenterDetails($ConfigID); $data['child'] = $this->configmodel->GetConfigCenterDetails($ConfigID);
$this->global['pageTitle'] = 'Edit Config'; $this->global['pageTitle'] = 'Edit Config';
// echo "<pre>";
// print_r($data);die;
$this->loadViews("editconfig", $this->global, $data, NULL); $this->loadViews("editconfig", $this->global, $data, NULL);
} }
function updateconfig() function updateconfig()
{ {
// dd($this->request->getPost());
$ConfigId = $this->request->getPost('ConfigId'); $ConfigId = $this->request->getPost('ConfigId');
$ConfigName = $this->request->getPost('ConfigName'); $ConfigName = $this->request->getPost('ConfigName');
$Comments = $this->request->getPost('Remarks'); $Comments = $this->request->getPost('Remarks');

View File

@ -46,11 +46,12 @@ class Expense extends BaseController
'transporter_file' => $fileName, 'transporter_file' => $fileName,
'supplier_id' => $this->request->getPost('supplierid'), 'supplier_id' => $this->request->getPost('supplierid'),
'remarks' => $this->request->getPost('remarks'), 'remarks' => $this->request->getPost('remarks'),
'item_description' => $this->request->getPost('item_description'),
'cost' => $this->request->getPost('cost'), 'cost' => $this->request->getPost('cost'),
'gst' => $this->request->getPost('gst'), 'cgst' => $this->request->getPost('cgst'),
'total' => (int)$this->request->getPost('gst') + (int)$this->request->getPost('cost'), 'sgst' => $this->request->getPost('sgst'),
'status' => $status, 'igst' => $this->request->getPost('igst'),
'payment_method' => $paymentMethod 'total' => $this->request->getPost('total'),
]; ];
$insert_id = $this->expense_model->insertExpense($data); $insert_id = $this->expense_model->insertExpense($data);
@ -92,16 +93,16 @@ class Expense extends BaseController
$data = [ $data = [
'supplier_id' => $this->request->getPost('supplierid'), 'supplier_id' => $this->request->getPost('supplierid'),
'remarks' => $this->request->getPost('remarks'), 'remarks' => $this->request->getPost('remarks'),
'item_description' => $this->request->getPost('item_description'),
'cost' => $this->request->getPost('cost'), 'cost' => $this->request->getPost('cost'),
'gst' => $this->request->getPost('gst'), 'cgst' => $this->request->getPost('cgst'),
'total' => (int)$this->request->getPost('gst') + (int)$this->request->getPost('cost'), 'sgst' => $this->request->getPost('sgst'),
'status' => $status, 'igst' => $this->request->getPost('igst'),
'payment_method' => $paymentMethod 'total' => $this->request->getPost('total'),
]; ];
if(!empty($fileName)){ if(!empty($fileName)){
$data['transporter_file'] = $fileName; $data['transporter_file'] = $fileName;
} }
$data['payment_method'] = $this->request->getPost('payment_method');
if ($id) { if ($id) {

View File

@ -349,7 +349,8 @@ class Purchaseorder extends BaseController
// print_r($data); // print_r($data);
// echo '</pre>'; // echo '</pre>';
// die; // die;
$mpdf = new \Mpdf\Mpdf(['mode' => 'utf-8', $mpdf = new \Mpdf\Mpdf([
'mode' => 'utf-8',
'format' => 'A4', 'format' => 'A4',
'default_font' => 'sans-serif', 'default_font' => 'sans-serif',
'margin_header' => 0, 'margin_header' => 0,
@ -357,7 +358,8 @@ class Purchaseorder extends BaseController
'margin_right' => 14, 'margin_right' => 14,
'margin_left' => 5, 'margin_left' => 5,
'margin_footer' => -30, 'margin_footer' => -30,
'orientation' => 'P']); 'orientation' => 'P'
]);
// Set PDF properties // Set PDF properties
$mpdf->SetTitle('Invoice'); $mpdf->SetTitle('Invoice');
$mpdf->SetAuthor($data['CompanyDetails'][0]->CompanyName); $mpdf->SetAuthor($data['CompanyDetails'][0]->CompanyName);
@ -450,8 +452,6 @@ $mpdf->use_kwt = true;
$TotalOrderValue = $POI->TotalOrderValue; $TotalOrderValue = $POI->TotalOrderValue;
$PoStatus = $POI->Status; $PoStatus = $POI->Status;
$Requester = isset($POI->Requestedby) ? $POI->Requestedby : ""; $Requester = isset($POI->Requestedby) ? $POI->Requestedby : "";
} }
} }
@ -468,7 +468,8 @@ $mpdf->use_kwt = true;
$mpdf = new \Mpdf\Mpdf(['mode' => 'utf-8', $mpdf = new \Mpdf\Mpdf([
'mode' => 'utf-8',
'format' => 'A4', 'format' => 'A4',
'default_font' => 'sans-serif', 'default_font' => 'sans-serif',
'margin_header' => 0, 'margin_header' => 0,
@ -476,7 +477,8 @@ $mpdf->use_kwt = true;
'margin_right' => 14, 'margin_right' => 14,
'margin_left' => 5, 'margin_left' => 5,
'margin_footer' => -30, 'margin_footer' => -30,
'orientation' => 'P']); 'orientation' => 'P'
]);
// Set PDF properties // Set PDF properties
$mpdf->SetTitle('Invoice'); $mpdf->SetTitle('Invoice');
$mpdf->SetAuthor($data['CompanyDetails'][0]->CompanyName); $mpdf->SetAuthor($data['CompanyDetails'][0]->CompanyName);
@ -1108,18 +1110,18 @@ $mpdf->use_kwt = true;
if ($file->isValid() && !$file->hasMoved()) { if ($file->isValid() && !$file->hasMoved()) {
$requestfilename = $file->getName(); $requestfilename = $file->getName();
$path = ROOTPATH . 'public/uploads/POfiles/'; $path = ROOTPATH . 'public/uploads/POfiles/';
if(!is_dir($path)) { mkdir($path, 0777, true); } if (!is_dir($path)) {
mkdir($path, 0777, true);
}
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) { if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {
log_message('error', 'File already exists in the database' . $requestfilename); log_message('error', 'File already exists in the database' . $requestfilename);
$requestfilename = ""; $requestfilename = "";
} } else {
else{
$file->move($path, $requestfilename); $file->move($path, $requestfilename);
} }
} else { } else {
$requestfilename = ""; $requestfilename = "";
} }
} }
// Generate PO Number // Generate PO Number
@ -1291,11 +1293,12 @@ $mpdf->use_kwt = true;
$requestfilename = $file->getName(); $requestfilename = $file->getName();
$path = ROOTPATH . 'public/uploads/POfiles/'; $path = ROOTPATH . 'public/uploads/POfiles/';
if(!is_dir($path)) { mkdir($path, 0777, true); } if (!is_dir($path)) {
mkdir($path, 0777, true);
}
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) { if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {
log_message('error', 'File already exists in the database' . $requestfilename); log_message('error', 'File already exists in the database' . $requestfilename);
} } else {
else{
$file->move($path, $requestfilename); $file->move($path, $requestfilename);
$POList['POFile'] = $requestfilename; $POList['POFile'] = $requestfilename;
} }
@ -1438,7 +1441,6 @@ $mpdf->use_kwt = true;
if ($SkipInsert == "False") { if ($SkipInsert == "False") {
if (strlen((string)$POLineItemNo) == 0) { if (strlen((string)$POLineItemNo) == 0) {
} else { } else {
$LineItemNo = $POLineItemNo; $LineItemNo = $POLineItemNo;
@ -1449,7 +1451,6 @@ $mpdf->use_kwt = true;
} }
$isExists = $this->purchaseorder_model->LineItemExistsinRevenueTax($LineItemNo); $isExists = $this->purchaseorder_model->LineItemExistsinRevenueTax($LineItemNo);
if (count($isExists) == 0) { if (count($isExists) == 0) {
} else { } else {
$RevenueTaxList = array('DiscountType' => $DiscountType, 'DiscountValue' => $DiscountValue, 'AfterDiscount' => $AfterDiscount, 'PackagingType' => $PackagingType, 'PackagingValue' => $PackagingValue, 'PackagingCalulatedOn' => $PackagingOption, 'AfterPackagingValue' => $AfterPackagingValue, 'FreightType' => $FreightType, 'FreightValue' => $FreightValue, 'AfterFreightValue' => $AfterFreightValue, 'Insurance' => $InsuranceValue, 'TotalValue' => $TotalOrderValue, 'UpdateBY' => $updatedBy, 'UpdatedOn' => $updateddt, 'CGST' => $Cgst, 'AfterCGST' => $AfterCgst, 'SGST' => $Sgst, 'AfterSGST' => $AfterSgst, 'IGST' => $Igst, 'AfterIGST' => $AfterIgst, 'CreatedBy' => $updatedBy, 'NoOfTrip' => $NOOfTrip); $RevenueTaxList = array('DiscountType' => $DiscountType, 'DiscountValue' => $DiscountValue, 'AfterDiscount' => $AfterDiscount, 'PackagingType' => $PackagingType, 'PackagingValue' => $PackagingValue, 'PackagingCalulatedOn' => $PackagingOption, 'AfterPackagingValue' => $AfterPackagingValue, 'FreightType' => $FreightType, 'FreightValue' => $FreightValue, 'AfterFreightValue' => $AfterFreightValue, 'Insurance' => $InsuranceValue, 'TotalValue' => $TotalOrderValue, 'UpdateBY' => $updatedBy, 'UpdatedOn' => $updateddt, 'CGST' => $Cgst, 'AfterCGST' => $AfterCgst, 'SGST' => $Sgst, 'AfterSGST' => $AfterSgst, 'IGST' => $Igst, 'AfterIGST' => $AfterIgst, 'CreatedBy' => $updatedBy, 'NoOfTrip' => $NOOfTrip);
@ -1914,18 +1915,18 @@ $mpdf->use_kwt = true;
if ($file->isValid() && !$file->hasMoved()) { if ($file->isValid() && !$file->hasMoved()) {
$requestfilename = $file->getName(); $requestfilename = $file->getName();
$path = ROOTPATH . 'public/uploads/POfiles/'; $path = ROOTPATH . 'public/uploads/POfiles/';
if(!is_dir($path)) { mkdir($path, 0777, true); } if (!is_dir($path)) {
mkdir($path, 0777, true);
}
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) { if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {
log_message('error', 'File already exists in the database' . $requestfilename); log_message('error', 'File already exists in the database' . $requestfilename);
$requestfilename = ""; $requestfilename = "";
} } else {
else{
$file->move($path, $requestfilename); $file->move($path, $requestfilename);
} }
} else { } else {
$requestfilename = ""; $requestfilename = "";
} }
} }
$POList = array('PONO' => $newPONO, 'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrder, 'PODate' => $PODate, 'Status' => $POStatus, 'PORange' => $PoRange, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'Import_DispatchDetails' => $Dispatch, 'CreatedDate' => $createddt, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ExchangeRate' => $Exchangerate, 'ExchangeRateCalculatedon' => $ExchangeRateCalculatedon, 'CurrencyType' => $CurrencyType, 'PaymentTerms' => $PaymentTerms, 'POType' => $POType, 'Import_PlaceofOrgin' => $Palaceoforigin, 'PaymentOtherDescription' => $OtherPayment, 'Mode_Of_Shipment' => $Shipmentmode, 'Supplier_Reference' => $SupplierRef, 'Supplier_Offer_No' => $SupplierOffer, 'Other_Reference' => $otherRef, 'Fincap' => $finCap, 'InsuranceStatus' => $Insurance, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $importoption, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType, 'IsOpenOrder' => $IsOpenOrder); $POList = array('PONO' => $newPONO, 'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrder, 'PODate' => $PODate, 'Status' => $POStatus, 'PORange' => $PoRange, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'Import_DispatchDetails' => $Dispatch, 'CreatedDate' => $createddt, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ExchangeRate' => $Exchangerate, 'ExchangeRateCalculatedon' => $ExchangeRateCalculatedon, 'CurrencyType' => $CurrencyType, 'PaymentTerms' => $PaymentTerms, 'POType' => $POType, 'Import_PlaceofOrgin' => $Palaceoforigin, 'PaymentOtherDescription' => $OtherPayment, 'Mode_Of_Shipment' => $Shipmentmode, 'Supplier_Reference' => $SupplierRef, 'Supplier_Offer_No' => $SupplierOffer, 'Other_Reference' => $otherRef, 'Fincap' => $finCap, 'InsuranceStatus' => $Insurance, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $importoption, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType, 'IsOpenOrder' => $IsOpenOrder);
@ -2016,7 +2017,6 @@ $mpdf->use_kwt = true;
} catch (\Exception $e) { } catch (\Exception $e) {
log_message('error', 'Exception occurred: ' . $e->getMessage()); log_message('error', 'Exception occurred: ' . $e->getMessage());
echo 'An error occurred while creating the purchase order. Please try again.'; echo 'An error occurred while creating the purchase order. Please try again.';
} }
} }
@ -2141,11 +2141,12 @@ $mpdf->use_kwt = true;
if ($file && $file->isValid() && !$file->hasMoved()) { if ($file && $file->isValid() && !$file->hasMoved()) {
$requestfilename = $file->getName(); $requestfilename = $file->getName();
$path = ROOTPATH . 'public/uploads/POfiles/'; $path = ROOTPATH . 'public/uploads/POfiles/';
if(!is_dir($path)) { mkdir($path, 0777, true); } if (!is_dir($path)) {
mkdir($path, 0777, true);
}
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) { if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {
log_message('error', 'File already exists in the database' . $requestfilename); log_message('error', 'File already exists in the database' . $requestfilename);
} } else {
else{
$file->move($path, $requestfilename); $file->move($path, $requestfilename);
$POList['POFile'] = $requestfilename; $POList['POFile'] = $requestfilename;
} }
@ -2576,18 +2577,18 @@ try{
if ($file->isValid() && !$file->hasMoved()) { if ($file->isValid() && !$file->hasMoved()) {
$requestfilename = $file->getName(); $requestfilename = $file->getName();
$path = ROOTPATH . 'public/uploads/POfiles/'; $path = ROOTPATH . 'public/uploads/POfiles/';
if(!is_dir($path)) { mkdir($path, 0777, true); } if (!is_dir($path)) {
mkdir($path, 0777, true);
}
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) { if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {
log_message('error', 'File already exists in the database' . $requestfilename); log_message('error', 'File already exists in the database' . $requestfilename);
$requestfilename = ""; $requestfilename = "";
} } else {
else{
$file->move($path, $requestfilename); $file->move($path, $requestfilename);
} }
} else { } else {
$requestfilename = ""; $requestfilename = "";
} }
} }
$POList = array('PONO' => $newPONO, 'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrder, 'PODate' => $PODate, 'Status' => $POStatus, 'PORange' => $PoRange, 'ExchangeRateCalculatedon' => $ExchangeRateOn, 'ExchangeRate' => $ExchangeRate, 'PaymentTerms' => $PaymentMethod, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'CreatedDate' => $createddt, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'CapitalRange' => $CapitalRange, 'POType' => $POType, 'CurrencyType' => $currencytypeID, 'DeliverySchedule' => $DeliverySchedule, 'Import_PlaceofOrgin' => $Palaceoforigin, 'Import_DispatchDetails' => $Dispatch, 'DeliveryDate' => $Deliverydt, 'PaymentOtherDescription' => $OtherPayment, 'Supplier_Reference' => $SupplierReference, 'Mode_Of_Shipment' => $ModeOfShipment, 'Supplier_Offer_No' => $SuppliersOfferNo, 'Other_Reference' => $OtherReferences, 'Fincap' => $Fincap, 'InsuranceStatus' => $InsuranceOptions, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $ServiceTypeOptions, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType, 'IsOpenOrder' => $IsOpenOrder); $POList = array('PONO' => $newPONO, 'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrder, 'PODate' => $PODate, 'Status' => $POStatus, 'PORange' => $PoRange, 'ExchangeRateCalculatedon' => $ExchangeRateOn, 'ExchangeRate' => $ExchangeRate, 'PaymentTerms' => $PaymentMethod, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'CreatedDate' => $createddt, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'CapitalRange' => $CapitalRange, 'POType' => $POType, 'CurrencyType' => $currencytypeID, 'DeliverySchedule' => $DeliverySchedule, 'Import_PlaceofOrgin' => $Palaceoforigin, 'Import_DispatchDetails' => $Dispatch, 'DeliveryDate' => $Deliverydt, 'PaymentOtherDescription' => $OtherPayment, 'Supplier_Reference' => $SupplierReference, 'Mode_Of_Shipment' => $ModeOfShipment, 'Supplier_Offer_No' => $SuppliersOfferNo, 'Other_Reference' => $OtherReferences, 'Fincap' => $Fincap, 'InsuranceStatus' => $InsuranceOptions, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $ServiceTypeOptions, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType, 'IsOpenOrder' => $IsOpenOrder);
@ -2740,7 +2741,6 @@ try{
log_message('error', 'Exception occurred: ' . $e->getMessage()); log_message('error', 'Exception occurred: ' . $e->getMessage());
echo 'An error occurred while creating the purchase order. Please try again.'; echo 'An error occurred while creating the purchase order. Please try again.';
} }
} }
/*Edit Capital po*/ /*Edit Capital po*/
@ -2863,11 +2863,12 @@ try{
if ($file && $file->isValid() && !$file->hasMoved()) { if ($file && $file->isValid() && !$file->hasMoved()) {
$requestfilename = $file->getName(); $requestfilename = $file->getName();
$path = ROOTPATH . 'public/uploads/POfiles/'; $path = ROOTPATH . 'public/uploads/POfiles/';
if(!is_dir($path)) { mkdir($path, 0777, true); } if (!is_dir($path)) {
mkdir($path, 0777, true);
}
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) { if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {
log_message('error', 'File already exists in the database' . $requestfilename); log_message('error', 'File already exists in the database' . $requestfilename);
} } else {
else{
$file->move($path, $requestfilename); $file->move($path, $requestfilename);
$POList['POFile'] = $requestfilename; $POList['POFile'] = $requestfilename;
} }
@ -3073,8 +3074,34 @@ try{
} }
if ($capitalType == '0') { if ($capitalType == '0') {
$ImportTaxList = array( $ImportTaxList = array(
'LineItemNo' => $LineItemNo, 'BasicPriceInMTon' => $BasicPriceinmton, 'ProductPrice' => $Productprice, 'LandingCharge' => $LandingCharge, 'AfterLandingCharge' => $AfterLandingCharge, 'CustomDuty' => $CustomDuty, 'AfterCustomDuty' => $AfterCustomDuty, 'CustomEdCess' => $CustomEd, 'CustomSHCess' => $CustomSH, 'CreatedBy' => $CreateBy, 'CreatedDate' => $createddt, 'Grossdutypayable' => $Grossdutypayable, 'CustomDutyExpensesPerKG' => $CustomDutyExpensesPerKG, 'QuantityKG' => $QuantityKG, 'AfterCustomSHCess' => $AfterCustomSH, 'AfterCustomEdCess' => $AfterCustomEd, 'TotalValue' => $Totalvalueitem, 'FreightType' => $FreightType, 'NoOfTrip' => $NOOfTrip, 'FreightValue' => $FreightValue, 'AfterFreightValue' => $AfterFreightValue, 'AssessableValue' => $AssessableValue, 'SubTotal' => $SubTotal, 'IGST' => $IGST, 'LineItemNo' => $LineItemNo,
'AfterIGST' => $AfterIGST, 'DutyImpact' => $DutyImpact, 'NetValue' => $NetValue, 'ClearingCharge' => $ClearingCharge 'BasicPriceInMTon' => $BasicPriceinmton,
'ProductPrice' => $Productprice,
'LandingCharge' => $LandingCharge,
'AfterLandingCharge' => $AfterLandingCharge,
'CustomDuty' => $CustomDuty,
'AfterCustomDuty' => $AfterCustomDuty,
'CustomEdCess' => $CustomEd,
'CustomSHCess' => $CustomSH,
'CreatedBy' => $CreateBy,
'CreatedDate' => $createddt,
'Grossdutypayable' => $Grossdutypayable,
'CustomDutyExpensesPerKG' => $CustomDutyExpensesPerKG,
'QuantityKG' => $QuantityKG,
'AfterCustomSHCess' => $AfterCustomSH,
'AfterCustomEdCess' => $AfterCustomEd,
'TotalValue' => $Totalvalueitem,
'FreightType' => $FreightType,
'NoOfTrip' => $NOOfTrip,
'FreightValue' => $FreightValue,
'AfterFreightValue' => $AfterFreightValue,
'AssessableValue' => $AssessableValue,
'SubTotal' => $SubTotal,
'IGST' => $IGST,
'AfterIGST' => $AfterIGST,
'DutyImpact' => $DutyImpact,
'NetValue' => $NetValue,
'ClearingCharge' => $ClearingCharge
); );
$ImportList = $this->purchaseorder_model->addImportTax($ImportTaxList); $ImportList = $this->purchaseorder_model->addImportTax($ImportTaxList);
@ -3094,8 +3121,34 @@ try{
} }
if ($capitalType == '0') { if ($capitalType == '0') {
$ImportTaxList = array( $ImportTaxList = array(
'LineItemNo' => $LineItemNo, 'BasicPriceInMTon' => $BasicPriceinmton, 'ProductPrice' => $Productprice, 'LandingCharge' => $LandingCharge, 'AfterLandingCharge' => $AfterLandingCharge, 'CustomDuty' => $CustomDuty, 'AfterCustomDuty' => $AfterCustomDuty, 'CustomEdCess' => $CustomEd, 'CustomSHCess' => $CustomSH, 'CreatedBy' => $CreateBy, 'CreatedDate' => $createddt, 'Grossdutypayable' => $Grossdutypayable, 'CustomDutyExpensesPerKG' => $CustomDutyExpensesPerKG, 'QuantityKG' => $QuantityKG, 'AfterCustomSHCess' => $AfterCustomSH, 'AfterCustomEdCess' => $AfterCustomEd, 'TotalValue' => $Totalvalueitem, 'FreightType' => $FreightType, 'NoOfTrip' => $NOOfTrip, 'FreightValue' => $FreightValue, 'AfterFreightValue' => $AfterFreightValue, 'AssessableValue' => $AssessableValue, 'SubTotal' => $SubTotal, 'IGST' => $IGST, 'LineItemNo' => $LineItemNo,
'AfterIGST' => $AfterIGST, 'DutyImpact' => $DutyImpact, 'NetValue' => $NetValue, 'ClearingCharge' => $ClearingCharge 'BasicPriceInMTon' => $BasicPriceinmton,
'ProductPrice' => $Productprice,
'LandingCharge' => $LandingCharge,
'AfterLandingCharge' => $AfterLandingCharge,
'CustomDuty' => $CustomDuty,
'AfterCustomDuty' => $AfterCustomDuty,
'CustomEdCess' => $CustomEd,
'CustomSHCess' => $CustomSH,
'CreatedBy' => $CreateBy,
'CreatedDate' => $createddt,
'Grossdutypayable' => $Grossdutypayable,
'CustomDutyExpensesPerKG' => $CustomDutyExpensesPerKG,
'QuantityKG' => $QuantityKG,
'AfterCustomSHCess' => $AfterCustomSH,
'AfterCustomEdCess' => $AfterCustomEd,
'TotalValue' => $Totalvalueitem,
'FreightType' => $FreightType,
'NoOfTrip' => $NOOfTrip,
'FreightValue' => $FreightValue,
'AfterFreightValue' => $AfterFreightValue,
'AssessableValue' => $AssessableValue,
'SubTotal' => $SubTotal,
'IGST' => $IGST,
'AfterIGST' => $AfterIGST,
'DutyImpact' => $DutyImpact,
'NetValue' => $NetValue,
'ClearingCharge' => $ClearingCharge
); );
@ -3285,28 +3338,65 @@ try{
$i = 0; $i = 0;
$str = array(); $str = array();
$words = array( $words = array(
'0' => '', '1' => 'one', '2' => 'two', '0' => '',
'3' => 'three', '4' => 'four', '5' => 'five', '6' => 'six', '1' => 'one',
'7' => 'seven', '8' => 'eight', '9' => 'nine', '2' => 'two',
'10' => 'ten', '11' => 'eleven', '12' => 'twelve', '3' => 'three',
'13' => 'thirteen', '14' => 'fourteen', '4' => 'four',
'15' => 'fifteen', '16' => 'sixteen', '17' => 'seventeen', '5' => 'five',
'18' => 'eighteen', '19' => 'nineteen', '20' => 'twenty', '6' => 'six',
'30' => 'thirty', '40' => 'fourty', '50' => 'fifty', '7' => 'seven',
'60' => 'sixty', '70' => 'seventy', '8' => 'eight',
'80' => 'eighty', '90' => 'ninety', '06' => 'Zero Six', '01' => 'Zero One', '02' => 'Zero Two', '03' => 'Zero Three', '04' => 'Zero Four', '05' => 'Zero Five', '07' => 'Zero Seven', '08' => 'Zero Eight', '09' => 'Zero Nine' '9' => 'nine',
'10' => 'ten',
'11' => 'eleven',
'12' => 'twelve',
'13' => 'thirteen',
'14' => 'fourteen',
'15' => 'fifteen',
'16' => 'sixteen',
'17' => 'seventeen',
'18' => 'eighteen',
'19' => 'nineteen',
'20' => 'twenty',
'30' => 'thirty',
'40' => 'fourty',
'50' => 'fifty',
'60' => 'sixty',
'70' => 'seventy',
'80' => 'eighty',
'90' => 'ninety',
'06' => 'Zero Six',
'01' => 'Zero One',
'02' => 'Zero Two',
'03' => 'Zero Three',
'04' => 'Zero Four',
'05' => 'Zero Five',
'07' => 'Zero Seven',
'08' => 'Zero Eight',
'09' => 'Zero Nine'
); );
$words1 = array( $words1 = array(
'2' => 'twenty', '2' => 'twenty',
'3' => 'thirty', '4' => 'fourty', '3' => 'thirty',
'5' => 'fifty', '6' => 'sixty', '7' => 'seventy', '4' => 'fourty',
'8' => 'eighty', '9' => 'ninety' '5' => 'fifty',
'6' => 'sixty',
'7' => 'seventy',
'8' => 'eighty',
'9' => 'ninety'
); );
$words12 = array( $words12 = array(
'11' => 'eleven', '11' => 'eleven',
'12' => 'twelve', '13' => 'thirteen', '14' => 'fourteen', '12' => 'twelve',
'15' => 'fifteen', '16' => 'sixteen', '17' => 'seventeen', '13' => 'thirteen',
'18' => 'eighteen', '19' => 'nineteen', '20' => 'twenty', '14' => 'fourteen',
'15' => 'fifteen',
'16' => 'sixteen',
'17' => 'seventeen',
'18' => 'eighteen',
'19' => 'nineteen',
'20' => 'twenty',
); );
$digits = array('', 'hundred', 'thousand', 'lakh', 'crore'); $digits = array('', 'hundred', 'thousand', 'lakh', 'crore');
while ($i < $digits_1) { while ($i < $digits_1) {
@ -3373,28 +3463,56 @@ try{
$i = 0; $i = 0;
$str = array(); $str = array();
$words = array( $words = array(
'0' => '', '1' => 'one', '2' => 'two', '0' => '',
'3' => 'three', '4' => 'four', '5' => 'five', '6' => 'six', '1' => 'one',
'7' => 'seven', '8' => 'eight', '9' => 'nine', '2' => 'two',
'10' => 'ten', '11' => 'eleven', '12' => 'twelve', '3' => 'three',
'13' => 'thirteen', '14' => 'fourteen', '4' => 'four',
'15' => 'fifteen', '16' => 'sixteen', '17' => 'seventeen', '5' => 'five',
'18' => 'eighteen', '19' => 'nineteen', '20' => 'twenty', '6' => 'six',
'30' => 'thirty', '40' => 'fourty', '50' => 'fifty', '7' => 'seven',
'60' => 'sixty', '70' => 'seventy', '8' => 'eight',
'80' => 'eighty', '90' => 'ninety' '9' => 'nine',
'10' => 'ten',
'11' => 'eleven',
'12' => 'twelve',
'13' => 'thirteen',
'14' => 'fourteen',
'15' => 'fifteen',
'16' => 'sixteen',
'17' => 'seventeen',
'18' => 'eighteen',
'19' => 'nineteen',
'20' => 'twenty',
'30' => 'thirty',
'40' => 'fourty',
'50' => 'fifty',
'60' => 'sixty',
'70' => 'seventy',
'80' => 'eighty',
'90' => 'ninety'
); );
$words1 = array( $words1 = array(
'2' => 'twenty', '2' => 'twenty',
'3' => 'thirty', '4' => 'fourty', '3' => 'thirty',
'5' => 'fifty', '6' => 'sixty', '7' => 'seventy', '4' => 'fourty',
'8' => 'eighty', '9' => 'ninety' '5' => 'fifty',
'6' => 'sixty',
'7' => 'seventy',
'8' => 'eighty',
'9' => 'ninety'
); );
$words12 = array( $words12 = array(
'11' => 'eleven', '11' => 'eleven',
'12' => 'twelve', '13' => 'thirteen', '14' => 'fourteen', '12' => 'twelve',
'15' => 'fifteen', '16' => 'sixteen', '17' => 'seventeen', '13' => 'thirteen',
'18' => 'eighteen', '19' => 'nineteen', '20' => 'twenty', '14' => 'fourteen',
'15' => 'fifteen',
'16' => 'sixteen',
'17' => 'seventeen',
'18' => 'eighteen',
'19' => 'nineteen',
'20' => 'twenty',
); );
$digits = array('', 'hundred', 'thousand', 'lakh', 'crore'); $digits = array('', 'hundred', 'thousand', 'lakh', 'crore');
while ($i < $digits_1) { while ($i < $digits_1) {

View File

@ -244,6 +244,7 @@ class Supplier extends BaseController
$file2 = $this->request->getFile('Cert_GST'); $file2 = $this->request->getFile('Cert_GST');
$file3 = $this->request->getFile('Cert_BANK'); $file3 = $this->request->getFile('Cert_BANK');
$path = ROOTPATH.'public/uploads/images/'; $path = ROOTPATH.'public/uploads/images/';
if($PAN){ $supplier['PAN'] = $PAN;} if($PAN){ $supplier['PAN'] = $PAN;}
if($GSTNo){ $supplier['GSTNO'] = $GSTNo;} if($GSTNo){ $supplier['GSTNO'] = $GSTNo;}
if ($file2 && $file2->isValid() && !$file2->hasMoved()) { if ($file2 && $file2->isValid() && !$file2->hasMoved()) {

View File

@ -901,7 +901,7 @@ class User extends BaseController
$data['userRecords'] = $this->user_model->userListing(); $data['userRecords'] = $this->user_model->userListing();
$this->global['pageTitle'] = 'User Listing'; $this->global['pageTitle'] = 'User Listing';
// dd($data);
$this->loadViews("userListing", $this->global, $data, NULL); $this->loadViews("userListing", $this->global, $data, NULL);
//} //}
} }
@ -1095,10 +1095,10 @@ class User extends BaseController
$data['EmpRole'] = $this->user_model->GetRoleNameByUserID($Uid); $data['EmpRole'] = $this->user_model->GetRoleNameByUserID($Uid);
$data['AccessDept'] = $this->costcenter_model->getaccessDept($Empid); $data['AccessDept'] = $this->costcenter_model->getaccessDept($Empid);
// $data['userInfo'] = $this->user_model->getUserInfo($userId); // $data['userInfo'] = $this->user_model->getUserInfo($Uid);
$data['userId'] = $Uid;
$this->global['pageTitle'] = 'Edit User'; $this->global['pageTitle'] = 'Edit User';
$this->loadViews("editOld", $this->global, $data, NULL); $this->loadViews("editOld", $this->global, $data, NULL);
//} //}
} }
@ -1126,7 +1126,7 @@ class User extends BaseController
// } else { // } else {
$EmpID = $this->request->getPost('EmpList'); $EmpID = $this->request->getPost('EmpList');
$role = $this->request->getPost('role'); $role = $this->request->getPost('role');
$password = $this->request->getPost('password'); // $password = $this->request->getPost('password');
$updatedDate = get_current_date_time(); $updatedDate = get_current_date_time();
@ -1134,7 +1134,8 @@ class User extends BaseController
$userInfo = array(); $userInfo = array();
$userInfo = array('password' => getHashedPassword($password), 'roleId' => $role, 'EmpId' => $EmpID, 'updatedDtm' => $updatedDate); // $userInfo = array('password' => getHashedPassword($password), 'roleId' => $role, 'EmpId' => $EmpID, 'updatedDtm' => $updatedDate);
$userInfo = array('roleId' => $role, 'EmpId' => $EmpID, 'updatedDtm' => $updatedDate);
$result = $this->user_model->editUser($userInfo, $EmpID); $result = $this->user_model->editUser($userInfo, $EmpID);
@ -1168,6 +1169,34 @@ class User extends BaseController
echo 'Succssfully change the user status to InAcive'; echo 'Succssfully change the user status to InAcive';
} }
function userChangePassword()
{
helper('form');
$userId = $this->request->getPost('userId');
$newPassword = $this->request->getPost('password');
$cNewPassword = $this->request->getPost('cpassword');
if ($newPassword == $cNewPassword) {
$usersData = array(
'password' => getHashedPassword($newPassword),
'updatedBy' => $userId,
'updatedDtm' => date('Y-m-d H:i:sa')
);
$result = $this->user_model->changePassword($userId, $usersData);
if ($result > 0) {
$this->session->setFlashdata('success', 'Password updation successful');
} else {
$this->session->setFlashdata('error', 'Password updation failed');
}
return redirect()->route('userListing');
} else {
$this->session->setFlashdata('error', 'New Password and Confirm Password Not Same');
return redirect()->route('userListing');
}
}
/** /**
* This function is used to load the change password screen * This function is used to load the change password screen
*/ */
@ -1193,8 +1222,9 @@ class User extends BaseController
// if ($this->validator->run() == FALSE) { // if ($this->validator->run() == FALSE) {
$oldPassword = $this->request->getPost('oldPassword'); $oldPassword = $this->request->getPost('oldPassword');
$newPassword = $this->request->getPost('newPassword'); $newPassword = $this->request->getPost('newPassword');
$cNewPassword = $this->request->getPost('newPassword'); $cNewPassword = $this->request->getPost('cNewPassword');
if($newPassword === $cNewPassword && $oldPassword != $newPassword) {
if ($newPassword == $cNewPassword) {
$resultPas = $this->user_model->matchOldPassword($this->vendorId, $oldPassword); $resultPas = $this->user_model->matchOldPassword($this->vendorId, $oldPassword);
if (empty($resultPas)) { if (empty($resultPas)) {
$this->session->setFlashdata('nomatch', 'Your old password not correct'); $this->session->setFlashdata('nomatch', 'Your old password not correct');
@ -1205,7 +1235,6 @@ class User extends BaseController
'updatedBy' => $this->vendorId, 'updatedBy' => $this->vendorId,
'updatedDtm' => date('Y-m-d H:i:sa') 'updatedDtm' => date('Y-m-d H:i:sa')
); );
$this->session->setFlashdata('error', 'Password updation failed');
$result = $this->user_model->changePassword($this->vendorId, $usersData); $result = $this->user_model->changePassword($this->vendorId, $usersData);
if ($result > 0) { if ($result > 0) {
$this->session->setFlashdata('success', 'Password updation successful'); $this->session->setFlashdata('success', 'Password updation successful');
@ -1215,6 +1244,9 @@ class User extends BaseController
return redirect()->route('loadChangePass'); return redirect()->route('loadChangePass');
} }
} else {
$this->session->setFlashdata('error', 'New Password and Confirm Password Not Same');
return redirect()->route('loadChangePass');
} }
} }

View File

@ -9,7 +9,7 @@ class Expense_model extends Model
protected $primaryKey = 'id'; // Primary key protected $primaryKey = 'id'; // Primary key
protected $allowedFields = [ protected $allowedFields = [
'transporter_file', 'supplier_id', 'remarks', 'cost', 'gst', 'total', 'status', 'payment_method' 'transporter_file', 'supplier_id', 'remarks', 'item_description', 'cost', 'cgst', 'sgst', 'igst', 'total',
]; ];
// Retrieve all active expenses // Retrieve all active expenses

View File

@ -868,7 +868,7 @@ if (!empty($getlogpodtl)) {
<label>Delivery Date<span class="text-danger">*</span></label> <label>Delivery Date<span class="text-danger">*</span></label>
<div> <div>
<?php <?php
$data = array('type'=>'date','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>

View File

@ -377,10 +377,6 @@
</script> </script>
<div class="content-page"> <div class="content-page">
<div class="content"> <div class="content">
<div class="row">
<div class="col-xl-12">
<div class="card">
<div class="card-body">
<div class="row"> <div class="row">
<div class="col-6"> <div class="col-6">
<div class="page-title-box page-title-box-alt"> <div class="page-title-box page-title-box-alt">
@ -391,6 +387,10 @@
<a class=" btn btn-dark waves-effect waves-light" href="<?php echo base_url() ?>employeeListing"><span class="bold">Back</span></a> <a class=" btn btn-dark waves-effect waves-light" href="<?php echo base_url() ?>employeeListing"><span class="bold">Back</span></a>
</div> </div>
</div> </div>
<div class="row">
<div class="col-xl-12">
<div class="card">
<div class="card-body">
<div id="rootwizard"> <div id="rootwizard">
<ul class="nav nav-pills nav-justified form-wizard-header mb-3"> <ul class="nav nav-pills nav-justified form-wizard-header mb-3">
<li class="nav-item" data-target-form="#accountForm"> <li class="nav-item" data-target-form="#accountForm">
@ -411,7 +411,7 @@
<a href="#third" data-toggle="tab" class="nav-link"> <a href="#third" data-toggle="tab" class="nav-link">
<!-- <a data-toggle="tab" class="nav-link"> --> <!-- <a data-toggle="tab" class="nav-link"> -->
<span class="number">3</span> <span class="number">3</span>
<span class="d-none d-sm-inline">Bank Details & Emp Benefits</span> <span class="d-none d-sm-inline">Bank & Emp Benefits</span>
</a> </a>
</li> </li>
<li class="nav-item" data-target-form="#proofForm"> <li class="nav-item" data-target-form="#proofForm">
@ -450,29 +450,30 @@
</div> </div>
<div class="col-md-10"> <div class="col-md-10">
<div class="row"> <div class="row">
<div class="col-md-2 pad"> <div class="col-md-4 pad">
<span>Full Name</span><span class="badge">*</span> <span>Full Name</span><span class="badge">*</span>
<input type="text" name="FirstName" <input type="text" name="FirstName"
onkeypress="return onlyAlphabets(event);" maxlength="100" onkeypress="return onlyAlphabets(event);" maxlength="100"
id="FirstName" class="form-control" required> id="FirstName" class="form-control" required>
</div> </div>
<div class="col-md-2 pad"><span>Father / Husband Name</span><span <div class="col-md-4 pad"><span>Father / Husband Name</span><span
class="badge">*</span> class="badge">*</span>
<input type="text" name="FatherName" <input type="text" name="FatherName"
onkeypress="return onlyAlphabets(event);" id="FatherName" onkeypress="return onlyAlphabets(event);" id="FatherName"
maxlength="200" class="form-control" required> maxlength="200" class="form-control" required>
</div> </div>
<div class="col-md-2 pad"><span>Contact Number</span><span <div class="col-md-4 pad"><span>Contact Number</span><span
class="badge">*</span> class="badge">*</span>
<input type="text" name="ContactNumber" <input type="text" name="ContactNumber"
onchange="return getMobileValidation();" id="ContactNumber" onchange="return getMobileValidation();" id="ContactNumber"
required pattern="(.){10,10}" maxlength="10" required pattern="(.){10,10}" maxlength="10"
class="form-control" onkeypress="return isNumberKey(event)"> class="form-control" onkeypress="return isNumberKey(event)">
</div> </div>
</div>
<div class="col-md-2 pad"><span>Gender</span><span <div class="row">
<div class="col-md-4 pad"><span>Gender</span><span
class="badge">*</span> class="badge">*</span>
<select id="gender" name="gender" type="text" required <select id="gender" name="gender" type="text" required
class="form-control select2"> class="form-control select2">
@ -489,27 +490,27 @@
?> ?>
</select> </select>
</div> </div>
<div class="col-md-2 pad"><span>Date Of Birth</span><span <div class="col-md-4 pad"><span>Date Of Birth</span><span
class="badge">*</span> class="badge">*</span>
<input id="DateofBirth" required name="DateofBirth" <input id="DateofBirth" required name="DateofBirth"
onkeypress="return false;" maxlength="10" onkeypress="return false;" maxlength="10"
onchange="getAge();" class="form-control " data-provide="datepicker" data-date-format="dd-mm-yyyy"> onchange="getAge();" class="form-control " data-provide="datepicker" data-date-format="dd-mm-yyyy">
</div> </div>
</div> <div class="col-md-4 pad"><span>Age</span>
<div class="row">
<div class="col-md-2 pad"><span>Age</span>
<input type="text" name="age" id="age" class="form-control" <input type="text" name="age" id="age" class="form-control"
readonly> readonly>
</div> </div>
<div class="col-md-2 pad"><span>Personal Email ID</span>
<input type="email" name="emailid" id="emailid" maxlength="100"
class="form-control">
</div> </div>
<div class="col-md-2 pad"> <span>Official Email ID</span> <div class="row">
<div class="col-md-4 pad"><span>Personal Email ID</span><span class="badge">*</span>
<input type="email" name="emailid" id="emailid" maxlength="100"
class="form-control" required>
</div>
<div class="col-md-4 pad"> <span>Official Email ID</span>
<input type="email" name="comemailid" id="mail" maxlength="100" <input type="email" name="comemailid" id="mail" maxlength="100"
class="form-control"> class="form-control">
</div> </div>
<div class="col-md-2 pad"> <div class="col-md-4 pad">
<span>Blood group</span><span class="badge">*</span> <span>Blood group</span><span class="badge">*</span>
<select id="bloodgroup" name="bloodgroup" required <select id="bloodgroup" name="bloodgroup" required
@ -527,8 +528,9 @@
?> ?>
</select> </select>
</div> </div>
</div>
<div class="col-md-2 pad"> <div class="row">
<div class="col-md-4 pad">
<span>Marital Status</span><span class="badge">*</span> <span>Marital Status</span><span class="badge">*</span>
<select id="MartialStatus" name="MartialStatus" type="text" <select id="MartialStatus" name="MartialStatus" type="text"
required placeholder="Marital status" required placeholder="Marital status"
@ -546,17 +548,17 @@
?> ?>
</select> </select>
</div> </div>
</div>
<div class="row">
<div class="col-md-4 pad"> <div class="col-md-4 pad">
<span>Current Address</span><span class="badge">*</span> <span>Current Address</span><span class="badge">*</span>
<input type="text" id="currentaddress" required name="currentaddress" <input type="text" id="currentaddress" required name="currentaddress"
pattern=".{0,500}" maxlength="500" class="form-control"> pattern=".{0,500}" maxlength="500" class="form-control">
</div> </div>
<div class="col-md-2 pad" style="margin-top: 18px;"> <div class="col-md-4 pad" style="margin-top: 18px;">
<input type="checkbox" id="checksame" name="sameaddress" <input type="checkbox" id="checksame" name="sameaddress"
onclick="CheckClick"> Current address same as permanent address onclick="CheckClick"> Current address same as permanent address
</div> </div>
</div>
<div class="row">
<div class="col-md-4 pad"> <div class="col-md-4 pad">
<span>Permanent Address</span><span <span>Permanent Address</span><span
class="badge">*</span> class="badge">*</span>
@ -564,16 +566,15 @@
name="permanentaddress" pattern=".{0,500}" maxlength="500" name="permanentaddress" pattern=".{0,500}" maxlength="500"
class="form-control"> class="form-control">
</div> </div>
</div>
<div class="row"> <div class="col-md-4 pad">
<div class="col-md-3 pad">
<span>Emergency Contact Name</span> <span>Emergency Contact Name</span>
<input type="text" id="emergencycontactname" <input type="text" id="emergencycontactname"
onkeypress="return onlyAlphabets(event);" maxlength="100" onkeypress="return onlyAlphabets(event);" maxlength="100"
name="emergencycontactname" class="form-control"> name="emergencycontactname" class="form-control">
</div> </div>
<div class="col-md-3"> <div class="col-md-4">
<span>Emergency Contact Number</span> <span>Emergency Contact Number</span>
<input type="text" id="emergencycontactnumber" <input type="text" id="emergencycontactnumber"
name="emergencycontactnumber" name="emergencycontactnumber"
@ -594,7 +595,7 @@
</div> </div>
<div class="tab-pane fade" id="second"> <div class="tab-pane fade" id="second">
<form id="profileForm" method="post" action="#" class="form-horizontal"> <form id="profileForm" method="post" action="#" class="form-horizontal" style="height: 250px;">
<div class="row"> <div class="row">
<div class="col-md-1"> <div class="col-md-1">
</div> </div>
@ -679,8 +680,7 @@
onchange=" return getValidReferNumber();" maxlength="10" onchange=" return getValidReferNumber();" maxlength="10"
onkeypress="return isNumberKey(event)" class="form-control"> onkeypress="return isNumberKey(event)" class="form-control">
</div> </div>
</div>
<div class="row" style="margin-bottom: 20px;">
<div class="col-md-3"><span>Work Location</span><span class="badge">*</span> <div class="col-md-3"><span>Work Location</span><span class="badge">*</span>
<select type="text" id="work_location" name="work_location" required <select type="text" id="work_location" name="work_location" required
@ -966,7 +966,7 @@
</div> </div>
<div class="tab-pane fade" id="fivth"> <div class="tab-pane fade" id="fivth">
<form id="fileForm" method="post" action="#" class="form-horizontal" enctype="multipart/form-data"> <form id="fileForm" method="post" action="#" class="form-horizontal" enctype="multipart/form-data" style="height: 250px;">
<div class="row"> <div class="row">
<div class="col-md-1"> <div class="col-md-1">
</div> </div>

View File

@ -166,7 +166,9 @@
$.ajax({ $.ajax({
url: "<?php echo base_url() ?>fetchEmployeeDetails", url: "<?php echo base_url() ?>fetchEmployeeDetails",
type: 'POST', type: 'POST',
data: { EmpID: empID }, data: {
EmpID: empID
},
success: function(data) { success: function(data) {
console.log(data); console.log(data);
@ -199,8 +201,7 @@
$('#addPop').click(function() { $('#addPop').click(function() {
if ($('#distriList option:selected').val() != null) { if ($('#distriList option:selected').val() != null) {
if ($('#distriList option:selected').val() == 0) { if ($('#distriList option:selected').val() == 0) {} else {
} else {
var tempSelect = $('#distriList option:selected').val(); var tempSelect = $('#distriList option:selected').val();
var tempText = $('#distriList option:selected').text(); var tempText = $('#distriList option:selected').text();
var o = new Option(tempText, tempSelect); var o = new Option(tempText, tempSelect);
@ -253,4 +254,3 @@ function Validate() {
return isValid; return isValid;
} }
</script> </script>

View File

@ -3,6 +3,8 @@
background-color: #ddd; background-color: #ddd;
} }
</style> </style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.13.6/underscore-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.21/lodash.min.js"></script>
<div class="content-page"> <div class="content-page">
<div class="content"> <div class="content">
@ -90,6 +92,7 @@
</div> </div>
</div> </div>
<div class="col-md-12 text-right"> <div class="col-md-12 text-right">
<input type="hidden" name="txtRowCount" id="txtRowCount" />
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red;color: white; margin-right: 15px;width: 80px;" value="Reset" /> <input type="reset" id="reset" class="btn btn-reset" style="background-color: red;color: white; margin-right: 15px;width: 80px;" value="Reset" />
<input type="submit" onclick="return Validate();" value="Submit" class="btn btn-success"> <input type="submit" onclick="return Validate();" value="Submit" class="btn btn-success">
</div> </div>
@ -118,8 +121,7 @@
<?php echo session()->getFlashdata('success'); ?> <?php echo session()->getFlashdata('success'); ?>
</div> </div>
<?php } ?> <?php } ?>
</div> </div> <!-- end row -->
t <!-- end row -->
</div> <!-- container --> </div> <!-- container -->
</div> <!-- content --> </div> <!-- content -->
@ -145,7 +147,7 @@
</div> </div>
<div class="col-md-5"> <div class="col-md-5">
<input class="form-control" name="ConfigValue" class="form-control" id="ConfigValue" type="text"> <input class="form-control" name="ConfigValue" class="form-control" required="true" id="ConfigValue" type="text">
</div> </div>
</div> </div>
@ -156,7 +158,7 @@
<!-- Modal Footer --> <!-- Modal Footer -->
<div class="modal-footer"> <div class="modal-footer">
<a class="btn btn-cancel" data-dismiss="modal" value="Cancel">Cancel</a> <a class="btn btn-success" style="background-color: grey;border: none;margin-right:10px" data-dismiss="modal" value="Cancel">Cancel</a>
<a class="btn btn-success font tempClickAdd" ID="tempClickAdd"><i class="fa fa-plus"></i>&nbsp;&nbsp;<span class="bold">Add</span></a> <a class="btn btn-success font tempClickAdd" ID="tempClickAdd"><i class="fa fa-plus"></i>&nbsp;&nbsp;<span class="bold">Add</span></a>
</div> </div>
</div> </div>
@ -194,7 +196,7 @@
</div> </div>
<!-- Modal Footer --> <!-- Modal Footer -->
<div class="modal-footer"> <div class="modal-footer">
<a class="btn btn-cancel" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a> <a class="btn btn-success" style="background-color: grey;border: none;margin-right:10px" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
<a class="btn btn-success font tempClickEdit" ID="tempClickEdit" style="margin-top: -24px;"><i class="fa fa-plus"></i>&nbsp;&nbsp;<span class="bold">Edit</span></a> <a class="btn btn-success font tempClickEdit" ID="tempClickEdit" style="margin-top: -24px;"><i class="fa fa-plus"></i>&nbsp;&nbsp;<span class="bold">Edit</span></a>
</div> </div>
</div> </div>
@ -213,27 +215,29 @@
<td> <td>
<a data-target='#Edit' data-id="<%=index%>" data-userid="<%=index%>" data-toggle="modal" href="#Edit"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <%=ConfigValue%> Budget details"></i>&nbsp;&nbsp;&nbsp;</a> <a class="editConfig" data-target='#Edit' data-id="<%=index%>" data-userid="<%=index%>" data-toggle="modal" href="#Edit"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <%=ConfigValue%> Budget details"></i>&nbsp;&nbsp;&nbsp;</a>
</td> </td>
</tr> </tr>
</script> </script>
<script> <script>
$(document).ready(function() {
var index = '1'; var index = '1';
var numbers = /^[0-9]+$/; var numbers = /^[0-9]+$/;
var userid = ''; var userid = '';
$("#Edit").on("shown.bs.modal", function(e) { $("#Edit").on("shown.bs.modal", function(e) {
userid = $(e.relatedTarget).data('userid'); userid = $(e.relatedTarget).data('userid');
var s = $('#configtable tr:eq(' + userid + ') td:eq(1)').text() var s = $('#configtable tr:eq(' + userid + ') td:eq(1)').text()
$("#EditConfigValue").val(s); $("#EditConfigValue").val(s);
}); });
$('.tempClickAdd').click(function() { $('.tempClickAdd').click(function() {
if ($("#ConfigValue").val() != '-1' && $("#ConfigValue").val() != null && $("#ConfigValue").val() != '') {
if ($("#ConfigValue").val() != '-1') {
$('#ConfigValue').show(); $('#ConfigValue').show();
var temp = index; var temp = index;
@ -249,24 +253,30 @@
var template = jQuery("#tempList").html(); var template = jQuery("#tempList").html();
var html = `
<tr id="${temp}">
<td>${temp}</td>
<td>${ConfigValue}</td>
<td>
<a class="editConfig" data-target='#Edit' data-id="${temp}" data-index="${index}" data-userid="${temp}" data-toggle="modal" href="#Edit">
<i class="ri-pencil-fill"></i>
&nbsp;&nbsp;&nbsp;
</a>
</td>
</tr>`;
$('#tempAppend').append(html);
var theForm = $("#addconfig");
$('#tempAppend').append(_.template(template, {
index: temp,
ConfigValue: ConfigValue
}));
var theForm = $(".addconfig");
addHidden(theForm, "ConfigValue" + temp, ConfigValue); addHidden(theForm, "ConfigValue" + temp, ConfigValue);
$('#txtRowCount').val(temp); $('#txtRowCount').val(temp);
$('#AddConfiguration').modal('hide');
//CountRows(); //CountRows();
} else { } else {
alert('Please enter all the values'); alert('Please enter a value');
} }
@ -277,10 +287,10 @@
var input = document.createElement('input'); var input = document.createElement('input');
input.type = 'hidden'; input.type = 'hidden';
input.name = key; input.name = key;
'name-as-seen-at-the-server'; // 'name-as-seen-at-the-server';
input.value = value; input.value = value;
input.id = key; input.id = key;
theForm.append(input); $(theForm).append(input);
} }
@ -302,6 +312,7 @@
$("#AddConfiguration").modal('hide');
} else { } else {
alert('Please enter all the values'); alert('Please enter all the values');
@ -371,4 +382,5 @@
} }
} }
});
</script> </script>

View File

@ -39,10 +39,8 @@ $bankaddress='';
$bank_isactive = 1; $bank_isactive = 1;
$MSME = ''; $MSME = '';
//print_r($userRecords);die(); //print_r($userRecords);die();
if(!empty($userRecords)) if (!empty($userRecords)) {
{ foreach ($userRecords as $uf) {
foreach ($userRecords as $uf)
{
$CompID = $uf->CompID; $CompID = $uf->CompID;
$CompanyName = $uf->CompanyName; $CompanyName = $uf->CompanyName;
$Address = $uf->Address; $Address = $uf->Address;
@ -81,35 +79,25 @@ if(!empty($userRecords))
$FStartDt = $uf->FiscalYearStartOn; $FStartDt = $uf->FiscalYearStartOn;
if($FStartDt != '' && $FStartDt != '0000-00-00 00:00:00' ) if ($FStartDt != '' && $FStartDt != '0000-00-00 00:00:00') {
{
$FSdate = new DateTime($FStartDt); $FSdate = new DateTime($FStartDt);
$financialstart = $FSdate->format('d-m-Y'); $financialstart = $FSdate->format('d-m-Y');
} } else {
else
{
$financialstart = ""; $financialstart = "";
} }
$FEndDt = $uf->FiscalYearEndsOn; $FEndDt = $uf->FiscalYearEndsOn;
if($FEndDt != '' && $FEndDt != '0000-00-00 00:00:00' ) if ($FEndDt != '' && $FEndDt != '0000-00-00 00:00:00') {
{
$FEdate = new DateTime($FEndDt); $FEdate = new DateTime($FEndDt);
$financialend = $FEdate->format('d-m-Y'); $financialend = $FEdate->format('d-m-Y');
} } else {
else
{
$financialend = ""; $financialend = "";
} }
}
} }
} if (!empty($filenames)) {
foreach ($filenames as $uf) {
if(!empty($filenames))
{
foreach ($filenames as $uf)
{
$filedescription1 = $uf->filedescription; $filedescription1 = $uf->filedescription;
$filename = $uf->filename; $filename = $uf->filename;
$createdDate = $uf->createdDate; $createdDate = $uf->createdDate;
@ -141,8 +129,7 @@ $(document).ready(function(){
<script> <script>
function readURL(input, num) { function readURL(input, num) {
if (num==0) if (num == 0) {
{
if (input.files && input.files[0]) { if (input.files && input.files[0]) {
var reader = new FileReader(); var reader = new FileReader();
@ -179,8 +166,8 @@ function readURL(input,num) {
function isNumberKey(evt) { function isNumberKey(evt) {
var charCode = (evt.which) ? evt.which : evt.keyCode; var charCode = (evt.which) ? evt.which : evt.keyCode;
if (charCode != 46 && charCode != 45 &&charCode != 32 && charCode >= 33 if (charCode != 46 && charCode != 45 && charCode != 32 && charCode >= 33 &&
&& (charCode < 48 || charCode > 57)) (charCode < 48 || charCode > 57))
return false; return false;
return true; return true;
@ -207,58 +194,46 @@ function validateEmail() {
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
var email = $('#EmailAddress').val(); var email = $('#EmailAddress').val();
if(email != "") if (email != "") {
{ if (reg.test(email) == false) {
if (reg.test(email) == false)
{
alert('Please Enter Valid Email Address'); alert('Please Enter Valid Email Address');
return (false); return (false);
} } else {
else
{
return true; return true;
} }
} }
} }
function validatePAN() { function validatePAN() {
//var reg = /(?=.*[A-Z]).{5,}(?=.*[0-9]).{4,}(?=.*[A-Z]).{1,}$/; //var reg = /(?=.*[A-Z]).{5,}(?=.*[0-9]).{4,}(?=.*[A-Z]).{1,}$/;
//var reg = /(?=.*[a-zA-Z]).{5}(?=.*[0-9]).{4}(?=.*[a-zA-Z]).{1}$/; //var reg = /(?=.*[a-zA-Z]).{5}(?=.*[0-9]).{4}(?=.*[a-zA-Z]).{1}$/;
var regpan = /^([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){1}?$/; var regpan = /^([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){1}?$/;
var PAN = $('#PAN').val(); var PAN = $('#PAN').val();
if(PAN != '') if (PAN != '') {
{ if (regpan.test(PAN) == false) {
if (regpan.test(PAN) == false)
{
alert('Please Enter Valid PAN Number'); alert('Please Enter Valid PAN Number');
return (false); return (false);
} } else {
else
{
return true; return true;
} }
} }
} }
function validateGST() { function validateGST() {
var reg = /^([0-9]){2}([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}([0-9]){1}([Zz]){1}([A-Za-z0-9]){1}?$/; var reg = /^([0-9]){2}([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}([0-9]){1}([Zz]){1}([A-Za-z0-9]){1}?$/;
//alert('gst'); //alert('gst');
var GST = $('#GSTNO').val(); var GST = $('#GSTNO').val();
if(GST != '') if (GST != '') {
{ if (reg.test(GST) == false) {
if (reg.test(GST) == false)
{
alert('Please Enter Valid GST Number Format should be 22AAAAA1111S1Z1 or 22AAAAA1111S1ZA '); alert('Please Enter Valid GST Number Format should be 22AAAAA1111S1Z1 or 22AAAAA1111S1ZA ');
return (false); return (false);
} } else {
else
{
return true; return true;
} }
} } else {
else
{
alert('Please Enter GST Number'); alert('Please Enter GST Number');
return (false); return (false);
} }
@ -298,38 +273,31 @@ function getMobileValidation(){
if (telephone) { if (telephone) {
// alert(' telephone number'+contactNumber); // alert(' telephone number'+contactNumber);
return true; return true;
} } else if (mobilephone) {
else if(mobilephone){
// alert('mobile number'+contactNumber); // alert('mobile number'+contactNumber);
return true; return true;
} } else {
else{
alert('Please Enter valid Contact Number ex: 044 12345678 , 0444 1234567,04444 123456 and 9876543210'); //alert('need to change:'+contactNumber); alert('Please Enter valid Contact Number ex: 044 12345678 , 0444 1234567,04444 123456 and 9876543210'); //alert('need to change:'+contactNumber);
return false; return false;
} }
} } else {
else{
alert(' Please enter correct format of contact number'); alert(' Please enter correct format of contact number');
//alert('invalid'+contactNumber); //alert('invalid'+contactNumber);
return false; return false;
} }
} }
function ValidateExno() { function ValidateExno() {
var regexno = /^([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){3}([0-9]){3}?$/; var regexno = /^([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){3}([0-9]){3}?$/;
var ECC = $('#ExiseRegistration1').val(); var ECC = $('#ExiseRegistration1').val();
if(ECC != '') if (ECC != '') {
{ if (regexno.test(ECC) == false) {
if (regexno.test(ECC) == false)
{
alert('Please Enter Valid Excise Control Code Number'); alert('Please Enter Valid Excise Control Code Number');
return (false); return (false);
} } else {
else
{
return true; return true;
} }
} }
@ -353,17 +321,14 @@ function ValidateAlternateContact(){
if (telephone) { if (telephone) {
// alert(' telephone number chennai district successfully inserted'+AlternateContactNumber); // alert(' telephone number chennai district successfully inserted'+AlternateContactNumber);
return true; return true;
} } else if (mobilephone) {
else if(mobilephone){
// alert('mobile number successfully inserted'+AlternateContactNumber); // alert('mobile number successfully inserted'+AlternateContactNumber);
return true; return true;
} } else {
else{
alert('Please Enter valid Contact Number ex: 044 12345678 , 0444 1234567,04444 123456 and 9876543210'); //alert('need to change:'+contactNumber); alert('Please Enter valid Contact Number ex: 044 12345678 , 0444 1234567,04444 123456 and 9876543210'); //alert('need to change:'+contactNumber);
return false; return false;
} }
} } else {
else{
alert('Please enter correct format of contact number'); alert('Please enter correct format of contact number');
//alert('invalid'+AlternateContactNumber); //alert('invalid'+AlternateContactNumber);
@ -378,21 +343,16 @@ function ValidateUA() {
var reguano = /^([a-zA-Z]){5}([0-9]){10}?$/; var reguano = /^([a-zA-Z]){5}([0-9]){10}?$/;
var UA = $('#UANumber').val(); var UA = $('#UANumber').val();
if(UA != '') if (UA != '') {
{ if (reguano.test(UA) == false) {
if (reguano.test(UA) == false)
{
alert('Please Enter Valid UA Number'); alert('Please Enter Valid UA Number');
return (false); return (false);
} } else {
else
{
return true; return true;
} }
} }
} }
</script> </script>
<script> <script>
$(function() { $(function() {
@ -442,21 +402,111 @@ function ValidateUA() {
th { th {
background-color: #ddd; background-color: #ddd;
} }
.form-group
{ .form-group {
padding-bottom: 4%; padding-bottom: 4%;
} }
.pad { .pad {
padding-bottom: 1%; padding-bottom: 1%;
} }
.badge
{ .badge {
color:red; background-color:#fff; color: red;
background-color: #fff;
} }
</style> </style>
<div class="content-page"> <div class="content-page">
<div class="content">
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<?php
helper('form');
$error = session()->getFlashdata('error');
if ($error) {
?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('error'); ?>
</div>
<?php } ?>
<?php
$success = session()->getFlashdata('success');
if ($success) {
?>
<div class="alert alert-info alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('success'); ?>
</div>
<?php } ?>
<div class="row" style="margin-bottom: 10px;">
<div class="col-6">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Business Settings</h4>
</div>
</div>
<div class="col-6 text-right">
<a class="btn btn-dark waves-effect waves-light" href="<?php echo base_url(); ?>supplierlisting"><span class="bold">Back</span></a>
</div>
</div>
<!-- end page title -->
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body" style="padding: 1rem 2rem !important;">
<div class="row">
<div class="col-12">
<form class="form-horizontal" role="form" id="addemployee" action="<?php echo base_url() ?>Updatecompany" method="post" role="form" enctype="multipart/form-data">
<div class="box-body">
<!-- Supplier Information -->
<legend style="margin-left:-10px;color: #4f7c97;;color: #4f7c97;">Business Information</legend>
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="form-row">
<div class=" col-md-3">
<img id="profilepicture" src="<?= base_url() . 'public/uploads/images/avatar.png'; ?>" alt="your image" style="width: 139px;" /><br />
<input type='file' input accept=".JPG,.PNG" onchange="readURL(this,0);" id="photo" value="<?php echo $ProfilePic; ?>" name="photo" />
<label for="photo">Select Company Logo<br /><small>(only .jpg or .png)</small></label>
<input type="hidden" name="Image" id="Image" value="<?php echo $ProfilePic; ?>" class="form-control" readonly>
<input type="hidden" name="ModifyImage" id="ModifyImage" class="form-control" readonly>
</div>
<div class=" col-md-3">
<label class="col-form-label" for="CompanyID">CompanyID<span class="badge">*</span></label>
<input type="text" name="CompanyID" maxlength="100" id="CompanyID" value="<?php echo $CompID; ?>" class="form-control" readonly>
</div>
<div class="col-md-3">
<label class="col-form-label" for="CompanyName">CompanyName</label>
<input type="text" name="CompanyName" onkeypress="return onlyAlphabets(event);" maxlength="100" id="CompanyName" class="form-control" required value="<?php echo $CompanyName; ?>">
</div>
<div class="col-md-3">
<label class="col-form-label" for="ContactNumber">Contact Number<span class="badge">*</span></label>
<input type="text" name="ContactNumber" onchange="getMobileValidation();" id="ContactNumber" maxlength="12" class="form-control" value="<?php echo $ContactNumber; ?>" required onkeypress="return isNumberKey(event)">
</div>
</div>
<div class="form-row">
<div class="col-md-3" style="margin-top:20px">
<label for="AlternateContactNumber">Alternate Contact Number</label><!--<span class="badge">*</span>-->
<input type="text" name="AlternateContactNumber" onchange="ValidateAlternateContact();" id="AlternateContactNumber" maxlength="12" class="form-control" value="<?php echo $AlternateContactNumber; ?>" required>
</div>
<div class="col-md-3" style="margin-top:20px">
<label for="EmailAddress">Email Address</label><!--<span class="badge">*</span>-->
<input type="email" name="EmailAddress" onchange="validateEmail();" id="EmailAddress" class="form-control" value="<?php echo $EmailAddress; ?>">
</div>
<div class="col-md-3" style="margin-top:20px">
<label for="ExciseRegistration">Excise Registration</label><!--<span class="badge">*</span>-->
<input type="text" name="Exiseregistration1" id="ExiseRegistration1" maxlength="15" class="form-control" value="<?php echo $Exiseregistration; ?>" pattern="([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}([A-Za-z]){2}([0-9]){3}" required onchange="ValidateExno();" style="text-transform: uppercase">
</div>
<div class="col-md-3" style="margin-top:20px">
<label for="AlternateContactNumber">Company Website</label><!--<span class="badge">*</span>-->
<input type="text" name="companywebsite" id="companywebsite" maxlength="100" class="form-control" value="<?php echo $companywebsite; ?>" required>
</div>
</div>
<?php
$financialstartFormatted = date('Y-m-d', strtotime($financialstart));
$financialendFormatted = date('Y-m-d', strtotime($financialend));
?>
<div class="content"> <div class="content">
<!-- Start Content--> <!-- Start Content-->
<div class="container-fluid"> <div class="container-fluid">
@ -595,10 +645,8 @@ function ValidateUA() {
<select class="form-control required" id="PaymentTerms" name="PaymentTerms" onchange="payment_hidden();"> <select class="form-control required" id="PaymentTerms" name="PaymentTerms" onchange="payment_hidden();">
<option value="<?php echo $PaymentTerms; ?>"><?php echo $PaymentTerms; ?></option> <option value="<?php echo $PaymentTerms; ?>"><?php echo $PaymentTerms; ?></option>
<?php <?php
if(!empty($payment)) if (!empty($payment)) {
{ foreach ($payment as $rl) {
foreach ($payment as $rl)
{
?> ?>
<option value="<?php echo $rl->PaymentID ?>"><?php echo $rl->PaymentTerms ?></option> <option value="<?php echo $rl->PaymentID ?>"><?php echo $rl->PaymentTerms ?></option>
<?php <?php
@ -606,7 +654,8 @@ function ValidateUA() {
} }
?> ?>
</select> </select>
<input type="hidden" id="paymentid" name="paymentid" value="<?php echo $PaymentId;?>" > </div> <input type="hidden" id="paymentid" name="paymentid" value="<?php echo $PaymentId; ?>">
</div>
</div> </div>
@ -761,12 +810,9 @@ function ValidateUA() {
<tbody> <tbody>
<?php <?php
if(!empty($filenames)) if (!empty($filenames)) {
{
foreach ($filenames as $uf) foreach ($filenames as $uf) {
{
?> ?>
<tr> <tr>
@ -826,59 +872,50 @@ function payment_hidden()
$("#paymentid").val(termid); $("#paymentid").val(termid);
} }
function deletefile(filename) function deletefile(filename) {
{
var answer = confirm(" Do you want to delete the user from the List?") var answer = confirm(" Do you want to delete the user from the List?")
if (answer) if (answer) {
{
$.ajax({ $.ajax({
data:{id:filename}, data: {
id: filename
},
type: "POST", type: "POST",
url: "<?php echo base_url() ?>companycontroller/deletefile", url: "<?php echo base_url() ?>companycontroller/deletefile",
success: function(data) { success: function(data) {
if(data) if (data) {
{ // $('#content').loader('hide');
$('#content').loader('hide');
alert(data); alert(data);
location.reload(); location.reload();
} } else {
else
{
alert("Error"); alert("Error");
} }
}}); }
});
} }
} }
function valid() { function valid() {
if ( $("#CompanyName").val().length < 1) if ($("#CompanyName").val().length < 1) {
{
alert('Please Enter Company Name'); alert('Please Enter Company Name');
$('#CompanyName').focus(); $('#CompanyName').focus();
return false; return false;
} }
if ( $('#ContactNumber').val().length < 1 ) if ($('#ContactNumber').val().length < 1) {
{
alert('Please Enter Contact Number'); alert('Please Enter Contact Number');
return false; return false;
} } else if (!getMobileValidation()) {
else if(!getMobileValidation())
{
return false; return false;
} }
if ( $('#AlternateContactNumber').val().length < 1 ) if ($('#AlternateContactNumber').val().length < 1) {
{
alert('Please Enter Alternate Contact Number'); alert('Please Enter Alternate Contact Number');
return false; return false;
} } else if (!ValidateAlternateContact()) {
else if(!ValidateAlternateContact())
{
return false; return false;
} }
// else if($("#EmailAddress").val().length < 1) // else if($("#EmailAddress").val().length < 1)
@ -891,51 +928,41 @@ if ( $("#CompanyName").val().length < 1)
// { // {
// return false; // return false;
// } // }
if ( $('#ExiseRegistration1').val().length < 1 ) if ($('#ExiseRegistration1').val().length < 1) {
{
alert('Please Enter Excise Registration Number'); alert('Please Enter Excise Registration Number');
$('#ExiseRegistration1').focus(); $('#ExiseRegistration1').focus();
return false; return false;
} } else if (!ValidateExno()) {
else if(!ValidateExno())
{
$('#ExiseRegistration1').focus(); $('#ExiseRegistration1').focus();
return false; return false;
} }
if ( $('#companywebsite').val().length < 1 ) if ($('#companywebsite').val().length < 1) {
{
alert('please Enter Company Website'); alert('please Enter Company Website');
$('#companywebsite').focus(); $('#companywebsite').focus();
return false; return false;
} }
if ( $('#Address').val().length < 1 ) if ($('#Address').val().length < 1) {
{
alert('please Enter Address'); alert('please Enter Address');
$('#Address').focus(); $('#Address').focus();
return false; return false;
} }
if($("#PAN").val().length < 1) if ($("#PAN").val().length < 1) {
{
alert('Please Enter PAN ID'); alert('Please Enter PAN ID');
$("#PAN").focus(); $("#PAN").focus();
return false; return false;
} } else if (!validatePAN()) {
else if(!validatePAN())
{
//alert('validation'); //alert('validation');
$("#PAN").focus(); $("#PAN").focus();
return false; return false;
} }
if(!validateGST()) if (!validateGST()) {
{
$('#GSTNO').focus(); $('#GSTNO').focus();
return false; return false;
} }
if( $('#CollectrateAddress').val().length < 1 ) if ($('#CollectrateAddress').val().length < 1) {
{
alert('please Enter Collectrate Address'); alert('please Enter Collectrate Address');
$('#CollectrateAddress').focus(); $('#CollectrateAddress').focus();
return false; return false;
@ -958,7 +985,6 @@ if ( $('#companywebsite').val().length < 1 )
</script> </script>
<script type="text/javascript"> <script type="text/javascript">
$(function() { $(function() {
$('#datatable').DataTable({ $('#datatable').DataTable({
@ -971,7 +997,6 @@ if ( $('#companywebsite').val().length < 1 )
}); });
}); });
</script> </script>
<script type="text/html" id="addList"> <script type="text/html" id="addList">
@ -1077,6 +1102,4 @@ $('#Add').click(function(){
}); //add click function closed }); //add click function closed
</script> </script>

View File

@ -3,14 +3,10 @@
$Empcnt = ''; $Empcnt = '';
//echo $DEPCode; //echo $DEPCode;
//echo ROLE_MANAGER; //echo ROLE_MANAGER;
if(!empty($EmpCount)) if (!empty($EmpCount)) {
{ foreach ($EmpCount as $Emp) {
foreach ($EmpCount as $Emp)
{
$Empcnt = $Emp->EmpCount; $Empcnt = $Emp->EmpCount;
} }
} }
?> ?>
@ -19,13 +15,14 @@ if(!empty($EmpCount))
<section class="content"> <section class="content">
<!-- Dashboard for Account department--> <!-- Dashboard for Account department-->
<?php <?php
if($DEPCode == FINANCE) if ($DEPCode == FINANCE) {
{
?> ?>
<div class="content-wrapper"> <div class="content-wrapper">
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
<section class="content-header"> <section class="content-header">
<center><h1> Accounts Department Dashboard</h1> </center> <center>
<h1> Accounts Department Dashboard</h1>
</center>
</section> </section>
<!-- Main content --> <!-- Main content -->
<section class="content"> <section class="content">
@ -56,13 +53,15 @@ if(!empty($EmpCount))
<script> <script>
$( function() $(function() {
{
//$( "#datepick" ).datepicker({maxDate: 'Date-1', dateFormat: 'dd-mm-yy' }).val(); //$( "#datepick" ).datepicker({maxDate: 'Date-1', dateFormat: 'dd-mm-yy' }).val();
//$( "#datepic" ).datepicker({maxDate: 'Date-1', dateFormat: 'dd-mm-yy' }).val(); //$( "#datepic" ).datepicker({maxDate: 'Date-1', dateFormat: 'dd-mm-yy' }).val();
// $("#datepic").datepicker({ defaultDate: '-2m'}); // $("#datepic").datepicker({ defaultDate: '-2m'});
$('#datepick').datepicker({maxDate: 'Date-1', dateFormat: 'dd-mm-yy' }).datepicker('setDate',new Date()); $('#datepick').datepicker({
maxDate: 'Date-1',
dateFormat: 'dd-mm-yy'
}).datepicker('setDate', new Date());
}); });
</script> </script>
@ -70,9 +69,7 @@ if(!empty($EmpCount))
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() {
$(document).ready(function()
{
//$("#employee").select2(); //$("#employee").select2();
//$("#employeeAttan").select2(); //$("#employeeAttan").select2();
$("#emp").select2(); $("#emp").select2();
@ -81,7 +78,6 @@ if(!empty($EmpCount))
<script type="text/javascript"> <script type="text/javascript">
function synczohobooks() { function synczohobooks() {
var sync = true var sync = true
@ -91,32 +87,34 @@ function synczohobooks(){
url: "<?php echo base_url() ?>user/zohobooks_api_fetch_all", url: "<?php echo base_url() ?>user/zohobooks_api_fetch_all",
type: "post", type: "post",
data:{sync}, data: {
sync
},
success: function(data) { success: function(data) {
console.log(data); console.log(data);
alert("Sync Completed"); alert("Sync Completed");
},failure:function(data){alert("Failed");}, },
failure: function(data) {
alert("Failed");
},
complete: function() { complete: function() {
$('#loader_wrapper').css("display", "none"); $('#loader_wrapper').css("display", "none");
} }
}); });
} }
</script> </script>
<style> <style>
.small-box .icon .small-box .icon {
{
top: 0px !important; top: 0px !important;
} }
</style> </style>
<?php <?php
if($DEPCode == HR) if ($DEPCode == HR) {
{
?> ?>
<div class="content-wrapper"> <div class="content-wrapper">
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
@ -132,7 +130,9 @@ function synczohobooks(){
<div class="col-lg-3 col-xs-6"> <div class="col-lg-3 col-xs-6">
<!-- small box --> <!-- small box -->
<div class="small-box bg-aqua"> <div class="small-box bg-aqua">
<a href="#" class="small-box-footer"><p> <strong>TOTAL NO OF EMPLOYEES</strong> </p> </a> <a href="#" class="small-box-footer">
<p> <strong>TOTAL NO OF EMPLOYEES</strong> </p>
</a>
<div class="inner"> <div class="inner">
<?php <?php
if (!empty($totemp)) { if (!empty($totemp)) {
@ -158,11 +158,12 @@ function synczohobooks(){
<div class="col-lg-3 col-xs-6"> <div class="col-lg-3 col-xs-6">
<!-- small box --> <!-- small box -->
<div class="small-box bg-red"> <div class="small-box bg-red">
<a target= "_blank" href="<?php echo base_url(); ?>loanreports" class="small-box-footer"> <p> <strong>TOTAL LOAN</strong> </p></a> <a target="_blank" href="<?php echo base_url(); ?>loanreports" class="small-box-footer">
<p> <strong>TOTAL LOAN</strong> </p>
</a>
<div class="inner"> <div class="inner">
<?php if(!empty($totloan)) <?php if (!empty($totloan)) {
{
foreach ($totloan as $req_p) { foreach ($totloan as $req_p) {
?> ?>
@ -181,11 +182,8 @@ function synczohobooks(){
</div> </div>
<a target="_blank" href="<?php echo base_url(); ?>loanreports" class="small-box-footer"> <a target="_blank" href="<?php echo base_url(); ?>loanreports" class="small-box-footer">
LOAN TO BE RECOVERED : <?php if(!empty($totrec)) LOAN TO BE RECOVERED : <?php if (!empty($totrec)) {
{ foreach ($totrec as $ordervalue) {
foreach($totrec as $ordervalue)
{
?> ?>
@ -206,11 +204,15 @@ function synczohobooks(){
<!-- small box --> <!-- small box -->
<div class="small-box bg-yellow"> <div class="small-box bg-yellow">
<a class="small-box-footer"> <p><strong>SALARY COST</strong></p></a> <a class="small-box-footer">
<p><strong>SALARY COST</strong></p>
</a>
<div class="inner" style="padding: 14px;"> <div class="inner" style="padding: 14px;">
<h3 ><div class="fa fa-rupee" id="today_salary" style="font-size:bold"> <b><?php echo $employeeSalary;?></b> <h3>
</div></h3> <div class="fa fa-rupee" id="today_salary" style="font-size:bold"> <b><?php echo $employeeSalary; ?></b>
</div>
</h3>
<input type="text" id="datepick" placeholder="Select Date" style="color:#000;width:30%" /> <input type="text" id="datepick" placeholder="Select Date" style="color:#000;width:30%" />
@ -219,7 +221,8 @@ function synczohobooks(){
<i class="ion ion-calculator"></i> <i class="ion ion-calculator"></i>
</div> </div>
<a class="small-box-footer" style="z-index:0; "> THIS MONTH : <i class="fa fa-rupee"></i> <div id="totalSalary"> <?php echo $totalSalary;?> </div> <a class="small-box-footer" style="z-index:0; "> THIS MONTH : <i class="fa fa-rupee"></i>
<div id="totalSalary"> <?php echo $totalSalary; ?> </div>
</a> </a>
</div> </div>
</div> </div>
@ -227,11 +230,14 @@ function synczohobooks(){
<div class="col-lg-3 col-xs-6"> <div class="col-lg-3 col-xs-6">
<!-- small box --> <!-- small box -->
<div class="small-box bg-green"> <div class="small-box bg-green">
<a href="#" class="small-box-footer"> <p> <strong>TOTAL EMPLOYEES ABSENT</strong> </p></a> <a href="#" class="small-box-footer">
<p> <strong>TOTAL EMPLOYEES ABSENT</strong> </p>
</a>
<h3> <h3>
<div class="inner" id="today_abs"> <div class="inner" id="today_abs">
<h3> <?php echo $today; ?></h3> <h3> <?php echo $today; ?></h3>
</div></h3> </div>
</h3>
<p>ABSENT</p><br> <p>ABSENT</p><br>
<div class="icon"> <div class="icon">
<i class="ion ion-android-calendar"></i> <i class="ion ion-android-calendar"></i>
@ -256,8 +262,7 @@ function synczohobooks(){
<?php <?php
$options = array("0" => 'Select Employee'); $options = array("0" => 'Select Employee');
//print_r( $options); //print_r( $options);
if(!empty($emplist)) if (!empty($emplist)) {
{
foreach ($emplist as $SID): foreach ($emplist as $SID):
$options[$SID->EmpID] = $SID->name . ' ' . ' - ' . ' ' . $SID->EmpID; $options[$SID->EmpID] = $SID->name . ' ' . ' - ' . ' ' . $SID->EmpID;
endforeach; endforeach;
@ -292,18 +297,25 @@ function synczohobooks(){
</div> </div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
google.charts.load('current', {'packages':['gauge']}); google.charts.load('current', {
'packages': ['gauge']
});
google.charts.setOnLoadCallback(drawChart); google.charts.setOnLoadCallback(drawChart);
function drawChart() { function drawChart() {
var data = google.visualization.arrayToDataTable([ var data = google.visualization.arrayToDataTable([
['Label', 'Value'], ['Label', 'Value'],
['Year', 0] ['Year', 0]
]); ]);
var options = { var options = {
width: 600, height: 250, width: 600,
redFrom: 0, redTo: 20, height: 250,
yellowFrom:20, yellowTo: 50, redFrom: 0,
greenFrom:50, greenTo: 100, redTo: 20,
yellowFrom: 20,
yellowTo: 50,
greenFrom: 50,
greenTo: 100,
minorTicks: 5 minorTicks: 5
}; };
var chart = new google.visualization.Gauge(document.getElementById('chart_div')); var chart = new google.visualization.Gauge(document.getElementById('chart_div'));
@ -313,12 +325,13 @@ function synczohobooks(){
var id = $('#emp').val(); var id = $('#emp').val();
$("#yearabs").val(''); $("#yearabs").val('');
if(id != 0) if (id != 0) {
{
$('#content').loader('show'); $('#content').loader('show');
$.ajax({ $.ajax({
data:{id:id}, data: {
id: id
},
dataType: 'json', dataType: 'json',
type: "POST", type: "POST",
url: "<?php echo base_url(); ?>user/attendanceyear", url: "<?php echo base_url(); ?>user/attendanceyear",
@ -340,9 +353,7 @@ function synczohobooks(){
}); });
//$('#content').loader('hide'); //$('#content').loader('hide');
} } else {
else
{
alert('Please select the Employee'); alert('Please select the Employee');
$('#totaldays').text(0); $('#totaldays').text(0);
$('#worked').text(0); $('#worked').text(0);
@ -355,7 +366,6 @@ function synczohobooks(){
}); });
} }
</script> </script>
<!------ Month------> <!------ Month------>
@ -424,7 +434,8 @@ function synczohobooks(){
<div class="inner" id="abs_name"> <div class="inner" id="abs_name">
<!-- <h3> <?php // echo $abs_name;?></h3> <!-- <h3> <?php // echo $abs_name;
?></h3>
--> -->
@ -476,11 +487,12 @@ function synczohobooks(){
} }
?> ?>
<script type="text/javascript"> <script type="text/javascript">
google.charts.load('current', {'packages':['gauge']}); google.charts.load('current', {
'packages': ['gauge']
});
google.charts.setOnLoadCallback(drawChart); google.charts.setOnLoadCallback(drawChart);
function drawChart() function drawChart() {
{
var data = google.visualization.arrayToDataTable([ var data = google.visualization.arrayToDataTable([
['Label', 'Value'], ['Label', 'Value'],
@ -489,10 +501,14 @@ function synczohobooks(){
]); ]);
var options = { var options = {
width: 600, height: 250, width: 600,
redFrom: 0, redTo: 20, height: 250,
yellowFrom:20, yellowTo: 50, redFrom: 0,
greenFrom:50, greenTo: 100, redTo: 20,
yellowFrom: 20,
yellowTo: 50,
greenFrom: 50,
greenTo: 100,
minorTicks: 5 minorTicks: 5
}; };
var chart = new google.visualization.Gauge(document.getElementById('chart_divs')); var chart = new google.visualization.Gauge(document.getElementById('chart_divs'));
@ -508,12 +524,13 @@ $('#emp').change(function() {
//alert(datepick); //alert(datepick);
$("#monthabs").val(''); $("#monthabs").val('');
if(id != 0) if (id != 0) {
{
$('#content').loader('show'); $('#content').loader('show');
$.ajax({ $.ajax({
data:{id:id}, data: {
id: id
},
dataType: 'json', dataType: 'json',
type: "POST", type: "POST",
url: "<?php echo base_url(); ?>user/monthattendance", url: "<?php echo base_url(); ?>user/monthattendance",
@ -539,9 +556,7 @@ $("#monthabs").val('');
}); });
//$('#content').loader('hide'); //$('#content').loader('hide');
} } else {
else
{
//alert('Please select the Employee'); //alert('Please select the Employee');
$("#present").text(0); $("#present").text(0);
$("#total_days").text(0); $("#total_days").text(0);
@ -553,14 +568,8 @@ $("#monthabs").val('');
}); });
} }
</script> </script>
<script> <script>
$('#datepick').change(function() { $('#datepick').change(function() {
//var datepick = $('#emp').val(); //var datepick = $('#emp').val();
//alert(); //alert();
@ -571,7 +580,9 @@ $('#datepick').change(function() {
$.ajax({ $.ajax({
data:{id:id}, data: {
id: id
},
dataType: 'json', dataType: 'json',
type: "POST", type: "POST",
url: "<?php echo base_url(); ?>user/dateFunctionChangeVales", url: "<?php echo base_url(); ?>user/dateFunctionChangeVales",
@ -597,17 +608,12 @@ $('#datepick').change(function() {
}); });
}); });
</script> </script>
<!-- \\\\\\\\\\\\\\\ HR END of the part ////////////////////////--> <!-- \\\\\\\\\\\\\\\ HR END of the part ////////////////////////-->
<!-- Dashboard for admin || $role == ROLE_MANAGER --> <!-- Dashboard for admin || $role == ROLE_MANAGER -->
<?php <?php
if($role == ROLE_ADMIN && $DEPCode != MANAGEMENT && $DEPCode != HR) if ($role == ROLE_ADMIN && $DEPCode != MANAGEMENT && $DEPCode != HR) {
{
?> ?>
<div class="content-page"> <div class="content-page">
<div class="content"> <div class="content">
@ -643,7 +649,8 @@ $('#datepick').change(function() {
<div> <div>
<h5 class="text-muted font-weight-normal mt-0 text-truncate" title="User Registrations">User Registrations</h5> <h5 class="text-muted font-weight-normal mt-0 text-truncate" title="User Registrations">User Registrations</h5>
<h3 class="my-2 py-1"><span data-plugin="counterup"><?php $users = isset($UserCount[0]->users) ? $UserCount[0]->users : 0; ?> <h3 class="my-2 py-1"><span data-plugin="counterup"><?php $users = isset($UserCount[0]->users) ? $UserCount[0]->users : 0; ?>
<h3><?= $users; ?></h3></span></h3> <h3><?= $users; ?></h3>
</span></h3>
<p class="mb-0 text-muted"> <p class="mb-0 text-muted">
<?php $employees = isset($EmpCount[0]->EmpCount) ? $EmpCount[0]->EmpCount : 0; ?> <?php $employees = isset($EmpCount[0]->EmpCount) ? $EmpCount[0]->EmpCount : 0; ?>
<?php echo $employees > 1 ? '<small>' . $employees . ' Employees </small>' : ($employees == 1 ? '<small>' . $employees . ' Employee</small>' : ''); ?></span> <?php echo $employees > 1 ? '<small>' . $employees . ' Employees </small>' : ($employees == 1 ? '<small>' . $employees . ' Employee</small>' : ''); ?></span>
@ -651,9 +658,10 @@ $('#datepick').change(function() {
</div> </div>
<div class="avatar-sm"> <div class="avatar-sm">
<span class="avatar-title bg-soft-primary rounded"> <span class="avatar-title bg-soft-primary rounded">
<i class="fe-arrow-right" style="color:black;"> <a href="<?php echo base_url(); ?>userListing"> <i class="fe-arrow-right" style="color:black;">
<a href="<?php echo base_url(); ?>userListing"></a>
</i> </i>
</a>
</span> </span>
</div> </div>
@ -681,13 +689,14 @@ $('#datepick').change(function() {
<!-- Dashboard for Manager department--> <!-- Dashboard for Manager department-->
<?php <?php
if($role == ROLE_MANAGER && $DEPCode != MANAGEMENT) if ($role == ROLE_MANAGER && $DEPCode != MANAGEMENT) {
{
?> ?>
<div class="content-wrapper"> <div class="content-wrapper">
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
<section class="content-header"> <section class="content-header">
<center><h1> Manager Department Dashboard</h1> </center> <center>
<h1> Manager Department Dashboard</h1>
</center>
</section> </section>
<!-- Main content --> <!-- Main content -->
<section class="content"> <section class="content">
@ -714,8 +723,7 @@ $('#datepick').change(function() {
<?php <?php
} }
if($DEPCode == MANAGEMENT) if ($DEPCode == MANAGEMENT) {
{
?> ?>
<head> <head>
@ -727,14 +735,108 @@ $('#datepick').change(function() {
DataTables Bootstrap 3 integration DataTables Bootstrap 3 integration
©2011-2014 SpryMedia Ltd - datatables.net/license ©2011-2014 SpryMedia Ltd - datatables.net/license
*/ */
(function(l,q){var e=function(b,c){b.extend(!0,c.defaults,{dom:"<'row'<'col-sm-9'l><'col-sm-3'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-9'i><'col-sm-3'p>>",renderer:"bootstrap"});b.extend(c.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm"});c.ext.renderer.pageButton.bootstrap=function(g,e,r,s,i,m){var t=new c.Api(g),u=g.oClasses,j=g.oLanguage.oPaginate,d,f,n=0,p=function(c,e){var k,h,o,a,l=function(a){a.preventDefault(); (function(l, q) {
b(a.currentTarget).hasClass("disabled")||t.page(a.data.action).draw(!1)};k=0;for(h=e.length;k<h;k++)if(a=e[k],b.isArray(a))p(c,a);else{f=d="";switch(a){case "ellipsis":d="&hellip;";f="disabled";break;case "first":d=j.sFirst;f=a+(0<i?"":" disabled");break;case "previous":d=j.sPrevious;f=a+(0<i?"":" disabled");break;case "next":d=j.sNext;f=a+(i<m-1?"":" disabled");break;case "last":d=j.sLast;f=a+(i<m-1?"":" disabled");break;default:d=a+1,f=i===a?"active":""}d&&(o=b("<li>",{"class":u.sPageButton+" "+ var e = function(b, c) {
f,id:0===r&&"string"===typeof a?g.sTableId+"_"+a:null}).append(b("<a>",{href:"#","aria-controls":g.sTableId,"data-dt-idx":n,tabindex:g.iTabIndex}).html(d)).appendTo(c),g.oApi._fnBindAction(o,{action:a},l),n++)}},h;try{h=b(q.activeElement).data("dt-idx")}catch(l){}p(b(e).empty().html('<ul class="pagination"/>').children("ul"),s);h&&b(e).find("[data-dt-idx="+h+"]").focus()};c.TableTools&&(b.extend(!0,c.TableTools.classes,{container:"DTTT btn-group",buttons:{normal:"btn btn-default",disabled:"disabled"}, b.extend(!0, c.defaults, {
collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:"disabled"}},print:{info:"DTTT_print_info"},select:{row:"active"}}),b.extend(!0,c.TableTools.DEFAULTS.oTags,{collection:{container:"ul",button:"li",liner:"a"}}))};"function"===typeof define&&define.amd?define(["jquery","datatables"],e):"object"===typeof exports?e(require("jquery"),require("datatables")):jQuery&&e(jQuery,jQuery.fn.dataTable)})(window,document); dom: "<'row'<'col-sm-9'l><'col-sm-3'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-9'i><'col-sm-3'p>>",
renderer: "bootstrap"
});
b.extend(c.ext.classes, {
sWrapper: "dataTables_wrapper form-inline dt-bootstrap",
sFilterInput: "form-control input-sm",
sLengthSelect: "form-control input-sm"
});
c.ext.renderer.pageButton.bootstrap = function(g, e, r, s, i, m) {
var t = new c.Api(g),
u = g.oClasses,
j = g.oLanguage.oPaginate,
d, f, n = 0,
p = function(c, e) {
var k, h, o, a, l = function(a) {
a.preventDefault();
b(a.currentTarget).hasClass("disabled") || t.page(a.data.action).draw(!1)
};
k = 0;
for (h = e.length; k < h; k++)
if (a = e[k], b.isArray(a)) p(c, a);
else {
f = d = "";
switch (a) {
case "ellipsis":
d = "&hellip;";
f = "disabled";
break;
case "first":
d = j.sFirst;
f = a + (0 < i ? "" : " disabled");
break;
case "previous":
d = j.sPrevious;
f = a + (0 < i ? "" : " disabled");
break;
case "next":
d = j.sNext;
f = a + (i < m - 1 ? "" : " disabled");
break;
case "last":
d = j.sLast;
f = a + (i < m - 1 ? "" : " disabled");
break;
default:
d = a + 1, f = i === a ? "active" : ""
}
d && (o = b("<li>", {
"class": u.sPageButton + " " +
f,
id: 0 === r && "string" === typeof a ? g.sTableId + "_" + a : null
}).append(b("<a>", {
href: "#",
"aria-controls": g.sTableId,
"data-dt-idx": n,
tabindex: g.iTabIndex
}).html(d)).appendTo(c), g.oApi._fnBindAction(o, {
action: a
}, l), n++)
}
},
h;
try {
h = b(q.activeElement).data("dt-idx")
} catch (l) {}
p(b(e).empty().html('<ul class="pagination"/>').children("ul"), s);
h && b(e).find("[data-dt-idx=" + h + "]").focus()
};
c.TableTools && (b.extend(!0, c.TableTools.classes, {
container: "DTTT btn-group",
buttons: {
normal: "btn btn-default",
disabled: "disabled"
},
collection: {
container: "DTTT_dropdown dropdown-menu",
buttons: {
normal: "",
disabled: "disabled"
}
},
print: {
info: "DTTT_print_info"
},
select: {
row: "active"
}
}), b.extend(!0, c.TableTools.DEFAULTS.oTags, {
collection: {
container: "ul",
button: "li",
liner: "a"
}
}))
};
"function" === typeof define && define.amd ? define(["jquery", "datatables"], e) : "object" === typeof exports ? e(require("jquery"), require("datatables")) : jQuery && e(jQuery, jQuery.fn.dataTable)
})(window, document);
</script> </script>
<style> <style>
table { table {
margin: 0 auto; margin: 0 auto;
width: 100%; width: 100%;
@ -745,7 +847,11 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
} }
th, td { white-space: nowrap; } th,
td {
white-space: nowrap;
}
div.dataTables_wrapper { div.dataTables_wrapper {
margin: 0 auto; margin: 0 auto;
@ -761,9 +867,6 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
text-align: right; text-align: right;
left: -20%; left: -20%;
} }
</style> </style>
<div> <div>
<section class="content"> <section class="content">
@ -772,12 +875,12 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<div class="col-md-3 col-sm-6 col-xs-12"> <div class="col-md-3 col-sm-6 col-xs-12">
<a href="<?php echo base_url(); ?>Requisition"> <a href="<?php echo base_url(); ?>Requisition">
<div class="info-box" style="min-height: 105px;"> <div class="info-box" style="min-height: 105px;">
<span class="info-box-icon bg-aqua" style="height: 105px;padding:25px;"><i<i class="fa fa-spinner"></span> <span class="info-box-icon bg-aqua" style="height: 105px;padding:25px;">
<i<i class="fa fa-spinner">
</span>
<?php <?php
if(!empty($details)) if (!empty($details)) {
{ foreach ($details as $req) {
foreach($details as $req)
{
?> ?>
@ -801,8 +904,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<div class="info-box" style="min-height: 105px;"> <div class="info-box" style="min-height: 105px;">
<span class="info-box-icon bg-red" style="height: 105px;padding:25px;"><i class="fa fa-hourglass-end"></i></span> <span class="info-box-icon bg-red" style="height: 105px;padding:25px;"><i class="fa fa-hourglass-end"></i></span>
<?php if(!empty($pending_details)) <?php if (!empty($pending_details)) {
{
foreach ($pending_details as $req_p) { foreach ($pending_details as $req_p) {
?> ?>
@ -829,11 +931,8 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<a href="<?php echo base_url(); ?>TotalOrder"> <a href="<?php echo base_url(); ?>TotalOrder">
<div class="info-box" style="min-height: 105px;"> <div class="info-box" style="min-height: 105px;">
<span class="info-box-icon bg-green" style="height: 105px;padding:25;"><i class="fa fa-industry" style="padding: 5px;"></i></span> <span class="info-box-icon bg-green" style="height: 105px;padding:25;"><i class="fa fa-industry" style="padding: 5px;"></i></span>
<?php if(!empty($totalpurchaseorder)) <?php if (!empty($totalpurchaseorder)) {
{ foreach ($totalpurchaseorder as $po) {
foreach($totalpurchaseorder as $po)
{
?> ?>
<div class="info-box-content"> <div class="info-box-content">
@ -843,11 +942,8 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
} }
} }
?> ?>
<?php if(!empty($totalordervalue)) <?php if (!empty($totalordervalue)) {
{ foreach ($totalordervalue as $ordervalue) {
foreach($totalordervalue as $ordervalue)
{
?> ?>
<span class="info-box-text" style="color:#00a65a;"><strong>TOTAL ORDER VALUE</strong></span> <span class="info-box-text" style="color:#00a65a;"><strong>TOTAL ORDER VALUE</strong></span>
@ -870,8 +966,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<a href="<?php echo base_url(); ?>openOrder"> <a href="<?php echo base_url(); ?>openOrder">
<div class="info-box" style="min-height: 105px;"> <div class="info-box" style="min-height: 105px;">
<span class="info-box-icon bg-yellow" style="height: 105px;padding:25px;"><i class="fa fa-hourglass-1 " style="padding: 5px;"></i></span> <span class="info-box-icon bg-yellow" style="height: 105px;padding:25px;"><i class="fa fa-hourglass-1 " style="padding: 5px;"></i></span>
<?php if(!empty($pendingpo)) <?php if (!empty($pendingpo)) {
{
foreach ($pendingpo as $pendingpolist) { foreach ($pendingpo as $pendingpolist) {
?> ?>
@ -951,11 +1046,8 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<br><br> <br><br>
<div class="progress-group"> <div class="progress-group">
<?php if(!empty($servicebudgt)) <?php if (!empty($servicebudgt)) {
{ foreach ($servicebudgt as $service) {
foreach($servicebudgt as $service)
{
?> ?>
<span class="description-text"><strong style="font-size:16px;">SERVICE &nbsp; :&nbsp;&nbsp;</strong><strong style="color:#00c0ef;font-size:18px;"><i class="fa fa-rupee " style="padding: 5px;"></i><?php echo $service->totalservicebudget; ?></strong></span> <span class="description-text"><strong style="font-size:16px;">SERVICE &nbsp; :&nbsp;&nbsp;</strong><strong style="color:#00c0ef;font-size:18px;"><i class="fa fa-rupee " style="padding: 5px;"></i><?php echo $service->totalservicebudget; ?></strong></span>
@ -970,11 +1062,8 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<br> <br>
<!-- /.progress-group --> <!-- /.progress-group -->
<div class="progress-group"> <div class="progress-group">
<?php if(!empty($revenuebudgt)) <?php if (!empty($revenuebudgt)) {
{ foreach ($revenuebudgt as $revenue) {
foreach($revenuebudgt as $revenue)
{
?> ?>
<span class="description-text"><strong style="font-size:16px;">REVENUE :&nbsp;&nbsp;</strong><strong style="color:#dd4b39;font-size:18px;"><i class="fa fa-rupee " style="padding: 5px;"></i><?php echo $revenue->totalrevenuebudget; ?></strong></span> <span class="description-text"><strong style="font-size:16px;">REVENUE :&nbsp;&nbsp;</strong><strong style="color:#dd4b39;font-size:18px;"><i class="fa fa-rupee " style="padding: 5px;"></i><?php echo $revenue->totalrevenuebudget; ?></strong></span>
@ -989,11 +1078,8 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<br> <br>
<!-- /.progress-group --> <!-- /.progress-group -->
<div class="progress-group"> <div class="progress-group">
<?php if(!empty($importbudgt)) <?php if (!empty($importbudgt)) {
{ foreach ($importbudgt as $import) {
foreach($importbudgt as $import)
{
?> ?>
<span class="description-text"><strong style="font-size:16px;">IMPORT &nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</strong><strong style="color:#00a65a;font-size:18px;"><i class="fa fa-rupee " style="padding: 5px;"></i><?php echo $import->totalimportbudget; ?></strong></span> <span class="description-text"><strong style="font-size:16px;">IMPORT &nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</strong><strong style="color:#00a65a;font-size:18px;"><i class="fa fa-rupee " style="padding: 5px;"></i><?php echo $import->totalimportbudget; ?></strong></span>
@ -1007,11 +1093,8 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<br> <br>
<!-- /.progress-group --> <!-- /.progress-group -->
<div class="progress-group"> <div class="progress-group">
<?php if(!empty($capitalbud)) <?php if (!empty($capitalbud)) {
{ foreach ($capitalbud as $capital) {
foreach($capitalbud as $capital)
{
?> ?>
<span class="description-text"><strong style="font-size:16px;">CAPITAL &nbsp;&nbsp;&nbsp;:&nbsp;&nbsp</strong><strong style="color:#f39c12;font-size:18px;"><i class="fa fa-rupee " style="padding: 5px;"></i><?php echo $capital->totalcapitalbudget; ?></strong></span> <span class="description-text"><strong style="font-size:16px;">CAPITAL &nbsp;&nbsp;&nbsp;:&nbsp;&nbsp</strong><strong style="color:#f39c12;font-size:18px;"><i class="fa fa-rupee " style="padding: 5px;"></i><?php echo $capital->totalcapitalbudget; ?></strong></span>
@ -1045,11 +1128,9 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<div class="col-xs-6 col-md-3 text-center"> <div class="col-xs-6 col-md-3 text-center">
<div class="description-block border-right"> <div class="description-block border-right">
<?php foreach ($servicebudgt as $service) <?php foreach ($servicebudgt as $service)
if(!empty($typebal)) if (!empty($typebal)) {
{
foreach ($typebal as $serviceb) foreach ($typebal as $serviceb)
$sb=$service->totalservicebudget-$serviceb->sr; $sb = $service->totalservicebudget - $serviceb->sr; {
{
?> ?>
<div class="knob-label"><strong style="color:#00c0ef">SERVICE BUDGET</strong></div> <div class="knob-label"><strong style="color:#00c0ef">SERVICE BUDGET</strong></div>
<input type="text" class="knob" data-thickness="0.4" data-readonly="true" value=<?php <input type="text" class="knob" data-thickness="0.4" data-readonly="true" value=<?php
@ -1069,11 +1150,9 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<?php // if(!empty($totalrevenuepo)) <?php // if(!empty($totalrevenuepo))
// { // {
foreach ($revenuebudgt as $revenue) foreach ($revenuebudgt as $revenue)
if(!empty($typebal)) if (!empty($typebal)) {
{
foreach ($typebal as $revenueb) foreach ($typebal as $revenueb)
$rb=$revenue->totalrevenuebudget-$revenueb->rv; $rb = $revenue->totalrevenuebudget - $revenueb->rv; {
{
?> ?>
<div class="knob-label"><strong style="color:#dd4b39">REVENUE BUDGET</strong></div> <div class="knob-label"><strong style="color:#dd4b39">REVENUE BUDGET</strong></div>
@ -1093,8 +1172,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<?php foreach ($importbudgt as $import) <?php foreach ($importbudgt as $import)
if (!empty($typebal)) { if (!empty($typebal)) {
foreach ($typebal as $importb) foreach ($typebal as $importb)
$im=$import->totalimportbudget-$importb->im; $im = $import->totalimportbudget - $importb->im; {
{
?> ?>
<div class="knob-label"><strong style="color:#00a65a">IMPORT BUDGET</strong></div> <div class="knob-label"><strong style="color:#00a65a">IMPORT BUDGET</strong></div>
@ -1112,8 +1190,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<?php foreach ($capitalbud as $capital) <?php foreach ($capitalbud as $capital)
if (!empty($typebal)) { if (!empty($typebal)) {
foreach ($typebal as $capitalb) foreach ($typebal as $capitalb)
$ca=$capital->totalcapitalbudget-$capitalb->ca; $ca = $capital->totalcapitalbudget - $capitalb->ca; {
{
?> ?>
<div class="knob-label"><strong style="color:#f39c12">CAPITAL BUDGET</strong></div> <div class="knob-label"><strong style="color:#f39c12">CAPITAL BUDGET</strong></div>
@ -1185,10 +1262,10 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<script src="<?php echo base_url(); ?>public/assets/plugins/morris/morris.min.js"></script> <script src="<?php echo base_url(); ?>public/assets/plugins/morris/morris.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
$(function() { $(function() {
/* jQueryKnob */ $(".knob").knob({ /* jQueryKnob */
$(".knob").knob({
/*change : function (value) { /*change : function (value) {
@ -1211,29 +1288,41 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
draw: function() { // "tron" case draw: function() { // "tron" case
if (this.$.data('skin') == 'tron') { var a = this.angle(this.cv) // Angle if (this.$.data('skin') == 'tron') {
var a = this.angle(this.cv) // Angle
, sa = this.startAngle // Previous start angle ,
sa = this.startAngle // Previous start angle
, sat = this.startAngle // Start angle ,
sat = this.startAngle // Start angle
, ea // Previous end angle ,
ea // Previous end angle
, eat = sat + a // End angle , eat = sat + a // End angle
, r = true; this.g.lineWidth = this.lineWidth; this.o.cursor ,
r = true;
this.g.lineWidth = this.lineWidth;
this.o.cursor
&& (sat = eat - 0.3) &&
(sat = eat - 0.3)
&& (eat = eat + 0.3); if (this.o.displayPrevious) { &&
(eat = eat + 0.3);
if (this.o.displayPrevious) {
ea = this.startAngle + this.angle(this.value); ea = this.startAngle + this.angle(this.value);
this.o.cursor this.o.cursor
&& (sa = ea - 0.3) &&
(sa = ea - 0.3)
&& (ea = ea + 0.3); &&
(ea = ea + 0.3);
this.g.beginPath(); this.g.beginPath();
@ -1243,13 +1332,15 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
this.g.stroke(); this.g.stroke();
} this.g.beginPath(); }
this.g.beginPath();
this.g.strokeStyle = r ? this.o.fgColor : this.fgColor; this.g.strokeStyle = r ? this.o.fgColor : this.fgColor;
this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, sat, eat, false); this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, sat, eat, false);
this.g.stroke(); this.g.lineWidth = 2; this.g.stroke();
this.g.lineWidth = 2;
this.g.beginPath(); this.g.beginPath();
@ -1257,7 +1348,8 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
this.g.arc(this.xy, this.xy, this.radius - this.lineWidth + 1 + this.lineWidth * 2 / 3, 0, 2 * Math.PI, false); this.g.arc(this.xy, this.xy, this.radius - this.lineWidth + 1 + this.lineWidth * 2 / 3, 0, 2 * Math.PI, false);
this.g.stroke(); return false; this.g.stroke();
return false;
} }
@ -1268,7 +1360,6 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
/* END JQUERY KNOB */ /* END JQUERY KNOB */
}) })
</script> </script>
<!-- Main row --> <!-- Main row -->
@ -1286,7 +1377,6 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<script src="<?php echo base_url(); ?>public/assets/plugins/knob/jquery.knob.js"></script> <script src="<?php echo base_url(); ?>public/assets/plugins/knob/jquery.knob.js"></script>
<script> <script>
/* ChartJS /* ChartJS
* ------- * -------
* Here we will create a few charts using ChartJS * Here we will create a few charts using ChartJS
@ -1437,8 +1527,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
// Get context with jQuery - using jQuery's .get() method. // Get context with jQuery - using jQuery's .get() method.
var pieChartCanvas = $("#pieChart").get(0).getContext("2d"); var pieChartCanvas = $("#pieChart").get(0).getContext("2d");
var pieChart = new Chart(pieChartCanvas); var pieChart = new Chart(pieChartCanvas);
var PieData = [ var PieData = [{
{
value: 700, value: 700,
color: "#f56954", color: "#f56954",
highlight: "#f56954", highlight: "#f56954",
@ -1507,9 +1596,6 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
// //----------------- // //-----------------
// //- END PIE CHART - // //- END PIE CHART -
// //----------------- // //-----------------
</script> </script>

View File

@ -1,5 +1,3 @@
<?php <?php
$EmpId = ''; $EmpId = '';
@ -10,27 +8,21 @@ $EmailId = '';
$Role = ''; $Role = '';
$Designation = ''; $Designation = '';
$RoleName = ''; $RoleName = '';
if(!empty($EmpRole)) if (!empty($EmpRole)) {
{ foreach ($EmpRole as $Er) {
foreach ($EmpRole as $Er)
{
$Role = $Er->roleId; $Role = $Er->roleId;
$RoleName = $Er->role; $RoleName = $Er->role;
} }
} }
if(!empty($EmpList)) if (!empty($EmpList)) {
{ foreach ($EmpList as $Emp) {
foreach ($EmpList as $Emp)
{
$EmpId = $Emp->EmpID; $EmpId = $Emp->EmpID;
$FirstName = $Emp->FirstName; $FirstName = $Emp->FirstName;
$LastName = $Emp->LastName; $LastName = $Emp->LastName;
$ContactNo = $Emp->ContactNumber; $ContactNo = $Emp->ContactNumber;
$EmailId = $Emp->EmailId; $EmailId = $Emp->EmailId;
$Designation = $Emp->Designation; $Designation = $Emp->Designation;
} }
} }
@ -38,9 +30,7 @@ if(!empty($EmpList))
<div class="content-page"> <div class="content-page">
<div class="content"> <div class="content">
<!-- Start Content-->
<div class="container-fluid"> <div class="container-fluid">
<!-- start page title -->
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-6"> <div class="col-6">
<div class="page-title-box page-title-box-alt"> <div class="page-title-box page-title-box-alt">
@ -51,7 +41,8 @@ if(!empty($EmpList))
<a class="btn btn-dark waves-effect waves-light" href="<?php echo base_url(); ?>userListing"><span class="bold">Back</span></a> <a class="btn btn-dark waves-effect waves-light" href="<?php echo base_url(); ?>userListing"><span class="bold">Back</span></a>
</div> </div>
</div> </div>
<!-- end page title -->
<!-- User Details Form -->
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="card"> <div class="card">
@ -77,7 +68,6 @@ if(!empty($EmpList))
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<div class="col-md-3"> <div class="col-md-3">
<label for="MailID">Email address</label> <label for="MailID">Email address</label>
<input type="text" class="form-control required email" value="<?php echo $EmailId ?>" readonly id="MailID" name="MailID" maxlength="128"> <input type="text" class="form-control required email" value="<?php echo $EmailId ?>" readonly id="MailID" name="MailID" maxlength="128">
@ -86,18 +76,23 @@ if(!empty($EmpList))
<label for="ContactNo">Contact Number</label> <label for="ContactNo">Contact Number</label>
<input type="text" class="form-control required digits" value="<?php echo $ContactNo ?>" readonly id="ContactNo" name="ContactNo" minlength="10" maxlength="10"> <input type="text" class="form-control required digits" value="<?php echo $ContactNo ?>" readonly id="ContactNo" name="ContactNo" minlength="10" maxlength="10">
</div> </div>
</div>
<div class="form-row">
<div class="col-md-3"> <div class="col-md-3">
<label for="password">Password</label> <label for="Role">Role</label>
<input type="password" class="form-control" id="password" required name="password" maxlength="10"> <select class="form-control required" id="role" name="role" required>
</div> <option value="0">Select Role</option>
<div class="col-md-3"> <?php
<label for="cpassword">Confirm Password</label> if (!empty($roles)) {
<input type="password" class="form-control equalTo" id="cpassword" name="cpassword" maxlength="10"> foreach ($roles as $rl) {
$selected = ($rl->roleId == $Role) ? 'selected' : '';
?>
<option value="<?php echo $rl->roleId ?>" <?php echo $selected; ?>><?php echo $rl->role ?></option>
<?php
}
}
?>
</select>
</div> </div>
</div> </div>
</div> </div>
<div class="form-group text-right mt-3"> <div class="form-group text-right mt-3">
<input type="hidden" name="txtEmpid" id="txtEmpid" value="<?php echo $EmpId ?>"> <input type="hidden" name="txtEmpid" id="txtEmpid" value="<?php echo $EmpId ?>">
@ -105,6 +100,8 @@ if(!empty($EmpList))
<input type="submit" class="btn btn-success" value="Submit"> <input type="submit" class="btn btn-success" value="Submit">
</div> </div>
</form> </form>
<!-- Flash messages for errors and success -->
<?php <?php
$listErrors = session()->getFlashdata('listErrors'); $listErrors = session()->getFlashdata('listErrors');
if ($listErrors) { if ($listErrors) {
@ -114,6 +111,7 @@ if(!empty($EmpList))
<?php echo session()->getFlashdata('listErrors'); ?> <?php echo session()->getFlashdata('listErrors'); ?>
</div> </div>
<?php } ?> <?php } ?>
<?php <?php
$error = session()->getFlashdata('error'); $error = session()->getFlashdata('error');
if ($error) { if ($error) {
@ -123,6 +121,7 @@ if(!empty($EmpList))
<?php echo session()->getFlashdata('error'); ?> <?php echo session()->getFlashdata('error'); ?>
</div> </div>
<?php } ?> <?php } ?>
<?php <?php
$success = session()->getFlashdata('success'); $success = session()->getFlashdata('success');
if ($success) { if ($success) {
@ -134,26 +133,47 @@ if(!empty($EmpList))
<?php } ?> <?php } ?>
</div> </div>
</div> </div>
</div> <!-- end card -->
</div><!-- end col -->
</div> </div>
<!-- end row --> </div>
</div> <!-- container -->
</div> <!-- content --> <!-- Change Password Form -->
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<form role="form" action="<?php echo base_url() ?>userChangePassword" method="post" id="changePasswordForm">
<input type="hidden" class="form-control" id="userId" name="userId" value="<?= $userId ?>">
<div class="form-row">
<div class="col-md-3">
<label for="password">New Password</label>
<input type="password" class="form-control" id="password" required name="password" maxlength="10">
</div>
<div class="col-md-3">
<label for="cpassword">Confirm New Password</label>
<input type="password" class="form-control equalTo" id="cpassword" name="cpassword" maxlength="10">
</div>
</div>
<div class="form-group text-right mt-3">
<input type="hidden" name="txtEmpid" id="txtEmpid" value="<?php echo $EmpId ?>">
<input type="submit" class="btn btn-primary" value="Change Password">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="<?php echo base_url(); ?>public/assets/js/editUser.js" type="text/javascript"></script> <script src="<?php echo base_url(); ?>public/assets/js/editUser.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
$('#addPop').click(function() { $('#addPop').click(function() {
if ($('#distriList option:selected').val() != null) { if ($('#distriList option:selected').val() != null) {
if($('#distriList option:selected').val()==0 ){ if ($('#distriList option:selected').val() == 0) {} else {
}
else{
var tempSelect = $('#distriList option:selected').val(); var tempSelect = $('#distriList option:selected').val();
var Eid = $('#txtEmpid').val(); var Eid = $('#txtEmpid').val();
var tempText = $('#distriList option:selected').text(); var tempText = $('#distriList option:selected').text();
@ -163,12 +183,9 @@ if(!empty($EmpList))
//salert(orgVal); //salert(orgVal);
var Selectedval = '' var Selectedval = ''
if(orgVal != '') if (orgVal != '') {
{
Selectedval = orgVal + ':' + hidval; Selectedval = orgVal + ':' + hidval;
} } else {
else
{
Selectedval = hidval Selectedval = hidval
} }
@ -186,13 +203,14 @@ if(!empty($EmpList))
$('#content').loader('show'); $('#content').loader('show');
$.ajax({ $.ajax({
data:{Eid:Eid}, data: {
Eid: Eid
},
type: "POST", type: "POST",
url: "<?php echo base_url() ?>user/Adduserdepartment", url: "<?php echo base_url() ?>user/Adduserdepartment",
success: function(data) { success: function(data) {
if(data) if (data) {
{
$('#content').loader('hide'); $('#content').loader('hide');
alert(data); alert(data);
$('#txtRowCount').val(''); $('#txtRowCount').val('');
@ -215,8 +233,7 @@ if(!empty($EmpList))
} }
} } else {
else {
alert("Before add please select any position."); alert("Before add please select any position.");
} }
}); });
@ -228,8 +245,7 @@ if(!empty($EmpList))
if ($('#selectDistriList option:selected').val() != null) { if ($('#selectDistriList option:selected').val() != null) {
if ($('#selectDistriList option:selected').val() == 0) { if ($('#selectDistriList option:selected').val() == 0) {
//alert('cannot removed'); //alert('cannot removed');
} } else {
else{
var tempSelect = $('#selectDistriList option:selected').val(); var tempSelect = $('#selectDistriList option:selected').val();
var Eid = $('#txtEmpid').val(); var Eid = $('#txtEmpid').val();
@ -246,12 +262,13 @@ if(!empty($EmpList))
$('#content').loader('show'); $('#content').loader('show');
$.ajax({ $.ajax({
data:{Eid:Eid}, data: {
Eid: Eid
},
type: "POST", type: "POST",
url: "<?php echo base_url() ?>user/Deleteuserdepartment", url: "<?php echo base_url() ?>user/Deleteuserdepartment",
success: function(data) { success: function(data) {
if(data) if (data) {
{
$('#content').loader('hide'); $('#content').loader('hide');
alert(data); alert(data);
$('#txtRowCount').val(''); $('#txtRowCount').val('');
@ -268,18 +285,8 @@ if(!empty($EmpList))
} }
} } else {
else
{
alert("Before remove please select any position."); alert("Before remove please select any position.");
} }
}); });
</script>> </script>>

View File

@ -1958,7 +1958,7 @@ if (!empty($getlogpodtl)) {
<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">
<?php <?php
$data = array('type' => 'date','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);
?> ?>
@ -1986,7 +1986,7 @@ if (!empty($getlogpodtl)) {
<label>Purchase Order Date</label> <label>Purchase Order Date</label>
<div class="form-group"> <div class="form-group">
<?php <?php
$data = array('type'=>'date','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>

View File

@ -313,6 +313,10 @@ if (!empty($supplier)) {
<!-- Supplier Information --> <!-- Supplier Information -->
<div class="col-md-12" style="margin-bottom: 27px;"> <div class="col-md-12" style="margin-bottom: 27px;">
<div class="form-row" style="margin-bottom:10px;"> <div class="form-row" style="margin-bottom:10px;">
<div class="col-md-2">
<label class="col-form-label" for="SupplierID">Supplier ID<span class="badge">*</span></label>
<input type="text" name="SupplierID" id="SupplierID" class="form-control" readonly value="<?php echo $SupplierID; ?>">
</div>
<div class="col-md-3"> <div class="col-md-3">
<label class="col-form-label" for="SupplierName">Supplier Name<span class="badge">*</span></label> <label class="col-form-label" for="SupplierName">Supplier Name<span class="badge">*</span></label>
<input type="text" name="SupplierName" maxlength="100" id="supplierName" class="form-control" required value="<?php echo $SupplierName; ?>"> <input type="text" name="SupplierName" maxlength="100" id="supplierName" class="form-control" required value="<?php echo $SupplierName; ?>">

View File

@ -171,7 +171,7 @@ if (!empty($master)) {
<!-- Modal Footer --> <!-- Modal Footer -->
<div class="modal-footer"> <div class="modal-footer">
<a class="btn btn-cancel" data-dismiss="modal">Cancel</a> <a class="btn btn-success" style="background-color: grey;border: none;margin-right:10px" data-dismiss="modal">Cancel</a>
<a class="btn btn-success font tempClickAdd" id="tempClickAdd"><i class="fa fa-plus"></i>&nbsp;&nbsp;Add</a> <a class="btn btn-success font tempClickAdd" id="tempClickAdd"><i class="fa fa-plus"></i>&nbsp;&nbsp;Add</a>
</div> </div>
</div> </div>
@ -238,7 +238,7 @@ if (!empty($master)) {
<!-- Modal Footer --> <!-- Modal Footer -->
<div class="modal-footer"> <div class="modal-footer">
<a class="btn btn-cancel" data-dismiss="modal">Cancel</a> <a class="btn btn-success" style="background-color: grey;border: none;margin-right:10px" data-dismiss="modal">Cancel</a>
<a class="btn btn-success font tempClickUpdate" id="tempClickUpdate"><i class="fa fa-pencil"></i>&nbsp;&nbsp;Update</a> <a class="btn btn-success font tempClickUpdate" id="tempClickUpdate"><i class="fa fa-pencil"></i>&nbsp;&nbsp;Update</a>
</div> </div>
</div> </div>
@ -266,6 +266,8 @@ if (!empty($master)) {
</tr> </tr>
</script> </script>
<script> <script>
$(document).ready(function() {
var index = $('#txtRowCount').val(); var index = $('#txtRowCount').val();
var userid = ''; var userid = '';
@ -273,7 +275,7 @@ if (!empty($master)) {
userid = $(e.relatedTarget).data('userid'); userid = $(e.relatedTarget).data('userid');
$('#key').val($('#configtable tr:eq(' + userid + ') td:eq(0)').text()); $('#key').val($('#configtable tr:eq(' + userid + ') td:eq(0)').text());
$('#Config_ID').val($('#ConfigId').val()); $('#Config_ID').val($('#ConfigId').val());
$('#EditConfigValue').val($('#configtable tr:eq(' + userid + ') td:eq(1)').text()); $('#configValue').val($('#configtable tr:eq(' + userid + ') td:eq(1)').text());
$('#ConfigVal' + userid).val($('#configtable tr:eq(' + userid + ') td:eq(1)').text()); $('#ConfigVal' + userid).val($('#configtable tr:eq(' + userid + ') td:eq(1)').text());
}); });
@ -281,12 +283,10 @@ if (!empty($master)) {
$('.tempClickAdd').click(function() { $('.tempClickAdd').click(function() {
var cid = $('#ConfigId').val() var cid = $('#ConfigId').val()
if ($("#AddConfigValue").val() != '-1' && $("#AddConfigValue").val() != null && $("#AddConfigValue").val() != '') {
if ($("#AddConfigValue").val() != '-1') {
$('#AddConfigValue').show(); $('#AddConfigValue').show();
var ConfigValue = $("#AddConfigValue").val(); var ConfigValue = $("#AddConfigValue").val();
$('#AddConfigValue').val(''); $('#AddConfigValue').val('');
@ -297,11 +297,18 @@ if (!empty($master)) {
var template = jQuery("#tempList").html(); var template = jQuery("#tempList").html();
var html = `
$('#tempAppend').append(_.template(template, { <tr id="${temp}">
index: temp, <td>${temp}</td>
ConfigValue: ConfigValue, <td>${ConfigValue}</td>
})); <td>
<a class="editConfig" data-target='#Edit' data-id="${temp}" data-index="${index}" data-userid="${temp}" data-toggle="modal" href="#Edit">
<i class="ri-pencil-fill"></i>
&nbsp;&nbsp;&nbsp;
</a>
</td>
</tr>`;
$('#tempAppend').append(html);
var theForm = $(".editConfig"); var theForm = $(".editConfig");
@ -311,6 +318,8 @@ if (!empty($master)) {
$('#txtRowCount').val(temp); $('#txtRowCount').val(temp);
//CountRows(); //CountRows();
$('#AddConfiguration').modal('hide');
} else { } else {
alert('Please enter all the values'); alert('Please enter all the values');
@ -329,14 +338,14 @@ if (!empty($master)) {
theForm.append(input); theForm.append(input);
} }
$('.tempClickEdit').click(function() { $('.tempClickUpdate').click(function() {
if ($("#EditConfigValue").val() != '') { if ($("#configValue").val() != '') {
var temp = index; var temp = index;
var ConfigValue = $("#EditConfigValue").val(); var ConfigValue = $("#configValue").val();
//alert(userid); //alert(userid);
$('#configtable tr:eq(' + userid + ') td:eq(1)').text(ConfigValue); $('#configtable tr:eq(' + userid + ') td:eq(1)').text(ConfigValue);
@ -345,10 +354,10 @@ if (!empty($master)) {
//$('#hConfigValue'+userid).val(ConfigValue); //$('#hConfigValue'+userid).val(ConfigValue);
$('#Config_ID' + userid).val($('#ConfigId').val()); $('#Config_ID' + userid).val($('#ConfigId').val());
$('#EditConfigValue' + userid).val(ConfigValue); $('#configValue' + userid).val(ConfigValue);
$("#configVal" + userid).val(ConfigValue); $("#configVal" + userid).val(ConfigValue);
$('#Edit').modal('hide');
} else { } else {
alert('Please enter all the values'); alert('Please enter all the values');
@ -373,9 +382,7 @@ if (!empty($master)) {
return true; return true;
} }
</script>
<script>
//var baseurl = "<?php print base_url(); ?>"; //var baseurl = "<?php print base_url(); ?>";
$(".editConfig").submit(function(e) { $(".editConfig").submit(function(e) {
if (validate()) { if (validate()) {
@ -414,4 +421,5 @@ if (!empty($master)) {
} }
} }
});
</script> </script>

View File

@ -183,7 +183,7 @@
], ],
pageLength: 10, // Default rows per page pageLength: 10, // Default rows per page
lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options
responsive: true, // Responsive table // responsive: true, // Responsive table
order: [], // Default ordering (column index 0, descending) order: [], // Default ordering (column index 0, descending)
language: { language: {
paginate: { paginate: {

View File

@ -9,6 +9,11 @@
padding-bottom: 0%; padding-bottom: 0%;
} }
.expandable-td {
cursor: pointer;
}
.Date-filter-form { .Date-filter-form {
display: flex; display: flex;
align-items: center; align-items: center;
@ -86,15 +91,16 @@
<table class="table table-bordered table-hover" id="expense_list_table" style="background-color:#fff;"> <table class="table table-bordered table-hover" id="expense_list_table" style="background-color:#fff;">
<thead> <thead>
<tr> <tr>
<th align="right">Created Date</th> <th align="right" style="width: 10%;">Created Date</th>
<!-- <th align="right">Expense Id</th> --> <!-- <th align="right">Expense Id</th> -->
<th align="right">Supplier Name</th> <th align="right" style="width: 20%;">Supplier Name</th>
<th align="right">Cost</th> <th align="right" style="width: 25%;">Item Description</th>
<th align="right">GST</th> <th align="right" style="width: 7%;">Cost</th>
<th align="right">Total</th> <th align="right" style="width: 5%;">CGST</th>
<th align="right">Payment Method</th> <th align="right" style="width: 5%;">SGST</th>
<th align="right">Status</th> <th align="right" style="width: 5%;">IGST</th>
<th>Action</th> <th align="right" style="width: 7%;">Total</th>
<th align="right" style="width: 8%;">Action</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -118,12 +124,23 @@
?> ?>
<td><?php echo $cdate; ?></td> <td><?php echo $cdate; ?></td>
<!-- <td><?php echo $record['id']; ?></td> --> <!-- <td><?php echo $record['id']; ?></td> -->
<td><?php echo $record['SupplierName']; ?></td> <td class="expandable-td">
<div class="text-container" style="max-height: 20px; overflow: hidden;">
<?php echo $record['SupplierName']; ?>
</div>
</td>
<!-- Item Description with Clickable TD for Expand/Collapse -->
<td class="expandable-td">
<div class="text-container" style="max-height: 20px; overflow: hidden;">
<?php echo $record['item_description']; ?>
</div>
</td>
<td><?php echo $record['cost']; ?></td> <td><?php echo $record['cost']; ?></td>
<td><?php echo $record['gst']; ?></td> <td><?php echo $record['cgst']; ?></td>
<td><?php echo $record['sgst']; ?></td>
<td><?php echo $record['igst']; ?></td>
<td><?php echo $record['total']; ?></td> <td><?php echo $record['total']; ?></td>
<td><?php echo $record['payment_method']; ?></td>
<td><?php echo $record['status']; ?></td>
<td> <td>
<?php if ($fileExists == 1) { ?> <?php if ($fileExists == 1) { ?>
<button title="Download FIle" class="download_button" onclick="downloadFile('<?php echo $record['id']; ?>', '<?php echo $record['transporter_file']; ?>')" style="border: none;background-color: white;color: #02a8b5;"> <button title="Download FIle" class="download_button" onclick="downloadFile('<?php echo $record['id']; ?>', '<?php echo $record['transporter_file']; ?>')" style="border: none;background-color: white;color: #02a8b5;">
@ -166,62 +183,82 @@
<form id="expenseForm" class="form-horizontal" role="form"> <form id="expenseForm" class="form-horizontal" role="form">
<input type="hidden" name="id" id="id"> <input type="hidden" name="id" id="id">
<div class="form-group row"> <div class="form-group row">
<div class="col-md-3">
<label for="supplierid" class="col-form-label">Supplier </label>
</div>
<div class="col-md-5"> <div class="col-md-5">
<select name="supplierid" id="supplierid" class="form-control" required>
</select>
</div>
</div>
<div class="form-group row">
<div class="col-md-3">
<label for="supplierid" class="col-form-label">Item Description </label>
</div>
<div class="col-md-5">
<textarea name="item_description" id="item_description" class="form-control"></textarea>
</div>
</div>
<div class="form-group row">
<div class="col-md-3">
<label for="cost" class="col-form-label">Cost</label>
</div>
<div class="col-md-5">
<input type="number" name="cost" id="cost" class="form-control" required onchange="totalCalculate()">
</div>
</div>
<div class="form-group row">
<div class="col-md-3">
<label for="cost" class="col-form-label">CGST</label>
</div>
<div class="col-md-5">
<input type="number" name="cgst" id="cgst" class="form-control" onchange="totalCalculate()">
</div>
</div>
<div class="form-group row">
<div class="col-md-3">
<label for="cost" class="col-form-label">SGST</label>
</div>
<div class="col-md-5">
<input type="number" name="sgst" id="sgst" class="form-control" onchange="totalCalculate()">
</div>
</div>
<div class="form-group row">
<div class="col-md-3">
<label for="igst" class="col-form-label">IGST</label>
</div>
<div class="col-md-5">
<input type="number" name="igst" id="igst" class="form-control" onchange="totalCalculate()">
</div>
</div>
<div class="form-group row">
<div class="col-md-3">
<label for="cost" class="col-form-label">Total</label>
</div>
<div class="col-md-5">
<input type="number" name="total" id="total" class="form-control">
</div>
</div>
<div class="form-group row">
<div class="col-md-3">
<label for="transporterfile" class="col-form-label">Transporter File</label> <label for="transporterfile" class="col-form-label">Transporter File</label>
</div>
<div class="col-md-5">
<input type="file" name="transporterfile" id="transporterfile" class="form-control"> <input type="file" name="transporterfile" id="transporterfile" class="form-control">
<input type="hidden" name="transporterfile_name" id="transporterfile_name"> <input type="hidden" name="transporterfile_name" id="transporterfile_name">
<small id="fileHelp" class="form-text text-muted"> <small id="fileHelp" class="form-text text-muted">
Current file: <span id="currentFileName"></span> Current file: <span id="currentFileName"></span>
</small> </small>
</div> </div>
<div class="col-md-1">
</div>
<div class="col-md-5">
<label for="supplierid" class="col-form-label">Supplier </label>
<select name="supplierid" id="supplierid" class="form-control" required>
</select>
</div>
</div>
<div class="form-group row">
<div class="col-md-5">
<label for="cost" class="col-form-label">Cost</label>
<input type="number" name="cost" id="cost" class="form-control">
</div>
<div class="col-md-1">
</div>
<div class="col-md-5">
<label for="gst" class="col-form-label">Tax</label>
<input type="number" name="gst" id="gst" class="form-control">
</div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<div class="col-md-5"> <div class="col-md-3">
<label for="status" class="col-form-label">Status</label> <label for="note" class="col-form-label">Notes</label>
<select name="status" id="status_id" class="form-control" required>
<option>Select Status</option>
<option value="Payment Pending">Payment Pending</option>
<option value="Paid">Paid</option>
</select>
</div>
<div class="col-md-1">
</div> </div>
<div class="col-md-5"> <div class="col-md-5">
<label for="payment_method" class="col-form-label">Payment Method</label>
<select name="payment_method" id="payment_method" class="form-control" required>
<option>Select Payment Method</option>
<option value="Cash">Cash</option>
<option value="Online">Online</option>
</select>
</div>
</div>
<div class="form-group row">
<div class="col-md-12">
<label for="remarks" class="col-form-label">Remarks</label>
<!-- <input type="text" name="remarks" id="remarks" class="form-control"> -->
<textarea name="remarks" id="remarks" class="form-control"></textarea> <textarea name="remarks" id="remarks" class="form-control"></textarea>
</div> </div>
</div> </div>
</form> </form>
</div> </div>
@ -286,7 +323,7 @@
var expenseId = $(this).data('id'); var expenseId = $(this).data('id');
var supplier_list = [<?php echo $supplier_list; ?>]; var supplier_list = [<?php echo $supplier_list; ?>];
$('#supplierid').empty(); // Clear the supplier dropdown $('#supplierid').empty(); // Clear the supplier dropdown
$('#supplierid').append('<option>Select Supplier</option>'); $('#supplierid').append('<option value="0">Select Supplier</option>');
supplier_list[0].forEach(function(supplier) { supplier_list[0].forEach(function(supplier) {
$('#supplierid').append('<option value="' + supplier.SupplierID + '">' + supplier.SupplierName + '</option>'); $('#supplierid').append('<option value="' + supplier.SupplierID + '">' + supplier.SupplierName + '</option>');
}); });
@ -305,11 +342,13 @@
$('#currentFileName').text(''); // Clear the file name display $('#currentFileName').text(''); // Clear the file name display
$('#supplierid').val(expense.supplier_id).trigger('change'); $('#supplierid').val(expense.supplier_id).trigger('change');
$('#remarks').val(expense.remarks); $('#remarks').val(expense.remarks);
$('#item_description').val(expense.item_description);
$('#cost').val(expense.cost); $('#cost').val(expense.cost);
$('#gst').val(expense.gst); $('#cgst').val(expense.cgst);
$('#sgst').val(expense.sgst);
$('#igst').val(expense.igst);
$('#total').val(expense.total); $('#total').val(expense.total);
$('#status_id').val(expense.status); $('#status_id').val(expense.status);
$('#payment_method').val(expense.payment_method);
// Clear any existing file link and delete button // Clear any existing file link and delete button
$('#transporterfile').next('.download_button').remove(); $('#transporterfile').next('.download_button').remove();
@ -353,7 +392,7 @@
$('#payment_method').val(''); $('#payment_method').val('');
var supplier_list = [<?php echo $supplier_list; ?>]; var supplier_list = [<?php echo $supplier_list; ?>];
$('#supplierid').empty(); // Clear the supplier dropdown $('#supplierid').empty(); // Clear the supplier dropdown
$('#supplierid').append('<option>Select Supplier</option>'); $('#supplierid').append('<option value="0">Select Supplier</option>');
supplier_list[0].forEach(function(supplier) { supplier_list[0].forEach(function(supplier) {
$('#supplierid').append('<option value="' + supplier.SupplierID + '">' + supplier.SupplierName + '</option>'); $('#supplierid').append('<option value="' + supplier.SupplierID + '">' + supplier.SupplierName + '</option>');
@ -366,8 +405,10 @@
$('#tempClick').on('click', function(e) { $('#tempClick').on('click', function(e) {
e.preventDefault(); e.preventDefault();
if ($('#supplierid').val() != 0) {
// Native HTML5 form validation // Native HTML5 form validation
if ($('#expenseForm')[0].checkValidity()) { if ($('#expenseForm')[0].checkValidity()) {
var formData = new FormData($('#expenseForm')[0]); // Use FormData to handle file upload var formData = new FormData($('#expenseForm')[0]); // Use FormData to handle file upload
console.log(formActionUrl); console.log(formActionUrl);
@ -397,6 +438,9 @@
// If form is invalid, show native validation messages // If form is invalid, show native validation messages
$('#expenseForm')[0].reportValidity(); $('#expenseForm')[0].reportValidity();
} }
} else {
alert("Select Supplier");
}
}); });
@ -411,10 +455,8 @@
[10, 20, 30, 50, -1], [10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"] [10, 20, 30, 50, "All"]
], ],
responsive: true, // responsive: true,
order: [ order: [],
[0, 'desc']
],
language: { language: {
paginate: { paginate: {
next: '<i class="fas fa-angle-right"></i>', next: '<i class="fas fa-angle-right"></i>',
@ -497,12 +539,34 @@
} }
}); });
}); });
</script>
<script>
document.getElementById('transporterfile').addEventListener('change', function() { document.getElementById('transporterfile').addEventListener('change', function() {
var fileName = this.files[0].name; var fileName = this.files[0].name;
document.getElementById('currentFileName').textContent = fileName; document.getElementById('currentFileName').textContent = fileName;
}); });
function totalCalculate() {
var cost = parseFloat($('#cost').val()) || 0;
var cgst = parseFloat($('#cgst').val()) || 0;
var sgst = parseFloat($('#sgst').val()) || 0;
var igst = parseFloat($('#igst').val()) || 0;
var total = cgst + sgst + igst + cost;
// var totalTaxAmount = (cost * totalTaxPercentage) / 100;
// var total = cost + totalTaxAmount;
$('#total').val(total.toFixed(2));
}
$(document).ready(function() {
$('.expandable-td').on('click', function() {
var $textContainer = $(this).find('.text-container');
if ($textContainer.css('max-height') === '20px') {
// Expand the content
$textContainer.css('max-height', 'none');
} else {
// Collapse the content
$textContainer.css('max-height', '20px');
}
});
});
</script> </script>

View File

@ -1,5 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<title><?php echo $pageTitle; ?></title> <title><?php echo $pageTitle; ?></title>
@ -75,11 +76,13 @@
height: 5px; height: 5px;
background-color: #f5f5f5; background-color: #f5f5f5;
} }
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
background-color: #797a7c; background-color: #797a7c;
border-radius: 15px; border-radius: 15px;
height: 5px; height: 5px;
} }
::-webkit-scrollbar-track { ::-webkit-scrollbar-track {
background-color: #f5f5f5; background-color: #f5f5f5;
} }
@ -88,42 +91,53 @@
.select2-selection.select2-selection--single { .select2-selection.select2-selection--single {
height: calc(1.5em + .9rem + 2px); height: calc(1.5em + .9rem + 2px);
} }
.select2-container--default .select2-selection--single .select2-selection__rendered { .select2-container--default .select2-selection--single .select2-selection__rendered {
line-height: 37px; line-height: 37px;
} }
.select2-container--default .select2-selection--single .select2-selection__arrow { .select2-container--default .select2-selection--single .select2-selection__arrow {
top: 7px; top: 7px;
} }
/* Select2 Height End */ /* Select2 Height End */
.navbar-custom { .navbar-custom {
height: 55px; height: 55px;
} }
.logo-box .logo { .logo-box .logo {
line-height: 55px; line-height: 55px;
} }
.navbar-custom .topnav-menu .nav-link { .navbar-custom .topnav-menu .nav-link {
max-height: 55px; max-height: 55px;
line-height: 55px; line-height: 55px;
} }
@media (min-width: 992px) { @media (min-width: 992px) {
.topnav { .topnav {
height: 45px; height: 45px;
margin-top: 55px; margin-top: 55px;
} }
} }
.topnav .navbar-nav .nav-link { .topnav .navbar-nav .nav-link {
line-height: 15px; line-height: 15px;
} }
.navbar-custom { .navbar-custom {
background-color: #4f7c97 !important; background-color: #4f7c97 !important;
} }
/* th{ /* th{
background-color: #ddd !important; background-color: #ddd !important;
} */ } */
.btn.btn-secondary.buttons-html5 , .btn.btn-secondary.buttons-print{ .btn.btn-secondary.buttons-html5,
.btn.btn-secondary.buttons-print {
border: 1px solid grey; border: 1px solid grey;
border-radius: 4px !important; border-radius: 4px !important;
} }
legend { legend {
border-bottom: 2px solid #FFF !important; border-bottom: 2px solid #FFF !important;
margin-left: -2%; margin-left: -2%;
@ -133,8 +147,10 @@
color: red; color: red;
background-color: #fff; background-color: #fff;
} }
.btn-cancel { .btn-cancel {
background-color: grey; /* Red color */ background-color: grey;
/* Red color */
color: white; color: white;
padding: 10px 20px; padding: 10px 20px;
text-align: center; text-align: center;
@ -145,7 +161,8 @@
} }
.btn-cancel:hover { .btn-cancel:hover {
background-color: #02a8b5; /* Darker red on hover */ background-color: #02a8b5;
/* Darker red on hover */
color: white; color: white;
} }
</style> </style>
@ -154,12 +171,14 @@
.date_range { .date_range {
width: auto; width: auto;
} }
.range_search_button { .range_search_button {
background-color: blue; background-color: blue;
color: #fff; color: #fff;
width: 55px; width: 55px;
border-radius: 5px; border-radius: 5px;
} }
.range_reset_button { .range_reset_button {
background-color: red; background-color: red;
color: #fff; color: #fff;
@ -168,9 +187,11 @@
padding: 8px; padding: 8px;
text-align: center; text-align: center;
} }
.content-page { .content-page {
padding: 20px; padding: 20px;
} }
#loader_wrapper { #loader_wrapper {
display: none; display: none;
position: fixed; position: fixed;
@ -182,29 +203,35 @@
z-index: 9999; z-index: 9999;
text-align: center; text-align: center;
} }
#loadingDiv { #loadingDiv {
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
.small-box { .small-box {
border-radius: 5px; border-radius: 5px;
padding: 20px; padding: 20px;
color: #fff; color: #fff;
margin-bottom: 20px; margin-bottom: 20px;
} }
.bg-yellow { .bg-yellow {
background-color: #f39c12; background-color: #f39c12;
} }
.small-box .inner { .small-box .inner {
padding: 10px; padding: 10px;
} }
.small-box .icon { .small-box .icon {
font-size: 60px; font-size: 60px;
line-height: 60px; line-height: 60px;
color: rgba(0, 0, 0, 0.2); color: rgba(0, 0, 0, 0.2);
} }
.small-box-footer { .small-box-footer {
display: block; display: block;
background: rgba(0, 0, 0, 0.1); background: rgba(0, 0, 0, 0.1);
@ -213,6 +240,7 @@
padding: 10px; padding: 10px;
text-decoration: none; text-decoration: none;
} }
.btn-success { .btn-success {
margin: 10px 0; margin: 10px 0;
} }
@ -221,10 +249,14 @@
.dataTables_wrapper .dataTables_paginate .paginate_button { .dataTables_wrapper .dataTables_paginate .paginate_button {
padding: .0em 0em !important; padding: .0em 0em !important;
} }
.dataTables_wrapper .dataTables_paginate .paginate_button:hover { .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
color: black !important; /* Text color */ color: black !important;
border: 1px solid white; /* Light border color */ /* Text color */
background-color: white; /* White background */ border: 1px solid white;
/* Light border color */
background-color: white;
/* White background */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, white), color-stop(100%, #f0f0f0)); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, white), color-stop(100%, #f0f0f0));
background: -webkit-linear-gradient(top, white 0%, #f0f0f0 100%); background: -webkit-linear-gradient(top, white 0%, #f0f0f0 100%);
background: -moz-linear-gradient(top, white 0%, #f0f0f0 100%); background: -moz-linear-gradient(top, white 0%, #f0f0f0 100%);
@ -232,21 +264,26 @@
background: -o-linear-gradient(top, white 0%, #f0f0f0 100%); background: -o-linear-gradient(top, white 0%, #f0f0f0 100%);
background: linear-gradient(to bottom, white 0%, #f0f0f0 100%); background: linear-gradient(to bottom, white 0%, #f0f0f0 100%);
} }
</style> </style>
<style> <style>
/* Style for DataTable buttons */ /* Style for DataTable buttons */
.dt-buttons .btn { .dt-buttons .btn {
background-color: white; /* White background for buttons */ background-color: white;
color: black; /* Black text color */ /* White background for buttons */
border: 1px solid white; /* Light gray border */ color: black;
padding: 5px 10px; /* Padding for buttons */ /* Black text color */
margin-right: 10px; /* Space between buttons */ border: 1px solid white;
/* Light gray border */
padding: 5px 10px;
/* Padding for buttons */
margin-right: 10px;
/* Space between buttons */
} }
/* Space between buttons and length menu */ /* Space between buttons and length menu */
.dataTables_length { .dataTables_length {
margin-left: 20px; /* Adjust this value for spacing */ margin-left: 20px;
/* Adjust this value for spacing */
} }
/* Additional button hover styles */ /* Additional button hover styles */
@ -255,13 +292,13 @@
background-color: #d8eaf1; background-color: #d8eaf1;
border-color: #cfe5ed; border-color: #cfe5ed;
} }
div.dataTables_wrapper div.dataTables_length select { div.dataTables_wrapper div.dataTables_length select {
width: 87px !important; width: 87px !important;
display: inline-block; display: inline-block;
} }
</style> </style>
<style> <style>
.card_font_colorset_green { .card_font_colorset_green {
font-size: 23.7215px; font-size: 23.7215px;
font-weight: 500; font-weight: 500;
@ -270,6 +307,7 @@
z-index: 1; z-index: 1;
color: rgb(86, 166, 75); color: rgb(86, 166, 75);
} }
.card_font_colorset_bule { .card_font_colorset_bule {
font-size: 23.7215px; font-size: 23.7215px;
font-weight: 500; font-weight: 500;
@ -278,6 +316,7 @@
z-index: 1; z-index: 1;
color: rgb(31, 96, 196); color: rgb(31, 96, 196);
} }
.card_font_colorset_red { .card_font_colorset_red {
font-size: 23.7215px; font-size: 23.7215px;
font-weight: 500; font-weight: 500;
@ -286,7 +325,6 @@
z-index: 1; z-index: 1;
color: rgb(173, 3, 23); color: rgb(173, 3, 23);
} }
</style> </style>
</head> </head>
@ -318,8 +356,10 @@
<div class="dropdown-menu dropdown-menu-right profile-dropdown "> <div class="dropdown-menu dropdown-menu-right profile-dropdown ">
<!-- item--> <!-- item-->
<div class="dropdown-header noti-title"> <div class="dropdown-header noti-title">
<h6 class="text-overflow m-0"><?php echo "Welcome ".$name." !"; ?><?php //echo $role; ?></h6> <h6 class="text-overflow m-0"><?php echo "Welcome " . $name . " !"; ?><?php //echo $role;
<!-- <h6 class="text-overflow m-0"><?php echo "Welcome ".$role_text." !"; ?><?php //echo $role; ?></h6> --> ?></h6>
<!-- <h6 class="text-overflow m-0"><?php echo "Welcome " . $role_text . " !"; ?><?php //echo $role;
?></h6> -->
</div> </div>
<!-- item--> <!-- item-->
@ -400,8 +440,7 @@
<li class="nav-item dropdown"> <li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="<?php echo base_url(); ?>sales_dashboard" role="button" <a class="nav-link dropdown-toggle arrow-none" href="<?php echo base_url(); ?>sales_dashboard" role="button"
aria-expanded="false"> aria-expanded="false">
<i class="ri-dashboard-line mr-1"></i> DASHBOARD <i class="ri-dashboard-line mr-1"></i>DASHBOARD</a>
</a>
<!-- <a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-dashboard" role="button" <!-- <a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-dashboard" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-dashboard-line mr-1"></i> DASHBOARD <div class="arrow-down"></div> <i class="ri-dashboard-line mr-1"></i> DASHBOARD <div class="arrow-down"></div>
@ -519,19 +558,29 @@
<i class="ri-list-settings-line align-middle mr-1"></i> Master Details <div class="arrow-down"></div> <i class="ri-list-settings-line align-middle mr-1"></i> Master Details <div class="arrow-down"></div>
</a> </a>
<div class="dropdown-menu" aria-labelledby="topnav-master"> <div class="dropdown-menu" aria-labelledby="topnav-master">
<a href="<?php echo base_url(); ?>supplierlisting" class="dropdown-item">Supplier Details</a> <!-- <a href="<?php echo base_url(); ?>supplierlisting" class="dropdown-item">Supplier Details</a> -->
<a href="<?php echo base_url(); ?>transporterListing" class="dropdown-item">Transporter Details</a> <a href="<?php echo base_url(); ?>transporterListing" class="dropdown-item">Transporter Details</a>
<a href="<?php echo base_url(); ?>costListing" class="dropdown-item">Cost Details</a> <a href="<?php echo base_url(); ?>costListing" class="dropdown-item">Cost Details</a>
<a href="<?php echo base_url(); ?>assetListing" class="dropdown-item">Asset Details</a> <a href="<?php echo base_url(); ?>assetListing" class="dropdown-item">Asset Details</a>
<a href="<?php echo base_url(); ?>companyview" class="dropdown-item">Business Settings</a> <a href="<?php echo base_url(); ?>companyview" class="dropdown-item">Business Settings</a>
<a href="<?php echo base_url(); ?>configlisting" class="dropdown-item">Config Details</a> <a href="<?php echo base_url(); ?>configlisting" class="dropdown-item">Config Details</a>
<a href="<?php echo base_url(); ?>departmentListing" class="dropdown-item">Department Details</a> <a href="<?php echo base_url(); ?>departmentListing" class="dropdown-item">Department Details</a>
<a href="<?php echo base_url(); ?>rawmaterialListing" class="dropdown-item">Material Details</a> <!-- <a href="<?php echo base_url(); ?>rawmaterialListing" class="dropdown-item">Material Details</a> -->
<a href="<?php echo base_url(); ?>userListing" class="dropdown-item">Users</a> <a href="<?php echo base_url(); ?>userListing" class="dropdown-item">Users</a>
</div> </div>
</div> </div>
</div> </div>
</li> </li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="<?php echo base_url(); ?>supplierlisting" role="button" aria-expanded="false">
<i class="fas fa-truck mr-1" style="color: gray;"></i>Supplier
</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="<?php echo base_url(); ?>rawmaterialListing" role="button" aria-expanded="false">
<i class="fas fa-cubes mr-1"></i>Material
</a>
</li>
<li class="nav-item dropdown"> <li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="<?php echo base_url(); ?>reports" role="button" <a class="nav-link dropdown-toggle arrow-none" href="<?php echo base_url(); ?>reports" role="button"

View File

@ -93,7 +93,7 @@
</table> </table>
<p>&nbsp;</p> <p>&nbsp;</p>
<div class="row"> <div class="row">
<div class="col-md-4" id="savebutton"> <div class="col-md-12 text-right" id="savebutton">
<input type="button" id="submit" value="Save" class="btn btn-success"> <input type="button" id="submit" value="Save" class="btn btn-success">
</div> </div>
</div> </div>

View File

@ -178,7 +178,7 @@
url: "<?php echo base_url() ?>deletesupplier", url: "<?php echo base_url() ?>deletesupplier",
success: function(data) { success: function(data) {
if (data) { if (data) {
$('#content').loader('hide'); // $('#content').loader('hide');
alert(data); alert(data);
location.reload(); location.reload();
} }