Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme

This commit is contained in:
Smart 2024-09-19 15:19:51 +05:30
commit 952ca00e44
13 changed files with 1736 additions and 1683 deletions

View File

@ -127,6 +127,8 @@ class Amendmentpurchaseorder extends BaseController
$data['POSTATUS'] = $this->purchaseorder_model->GetPOStatus($PONO); $data['POSTATUS'] = $this->purchaseorder_model->GetPOStatus($PONO);
$data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetails($PONO); $data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetails($PONO);
// echo "<pre>";
// print_r($data['POItem']);die;
$data['PaymentTerms'] = $this->purchaseorder_model->GetPaymentTerms($PONO); $data['PaymentTerms'] = $this->purchaseorder_model->GetPaymentTerms($PONO);
$this->global['pageTitle'] = 'Edit Revenue Purchase order form'; $this->global['pageTitle'] = 'Edit Revenue Purchase order form';
$this->loadViews("editRevenueAmendPO", $this->global, $data, NULL); $this->loadViews("editRevenueAmendPO", $this->global, $data, NULL);
@ -209,7 +211,6 @@ class Amendmentpurchaseorder extends BaseController
*/ */
function EditRevenuePurchaseOrder() function EditRevenuePurchaseOrder()
{ {
// print_r($this->request->getPost());die;
$NewPO = ''; $NewPO = '';
$MAD = ''; $MAD = '';
$PONO = $this->request->getPost('txtPONO'); $PONO = $this->request->getPost('txtPONO');
@ -313,7 +314,7 @@ class Amendmentpurchaseorder extends BaseController
// print_r($POMaster);die; // print_r($POMaster);die;
$LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $updatedBy, $PONO); $LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $updatedBy, $PONO);
// dd($LastPO);
if(!empty($LastPO)){ if(!empty($LastPO)){
if (count($LastPO) > 0) { if (count($LastPO) > 0) {
$NewPO = $LastPO[0]['PONO']; $NewPO = $LastPO[0]['PONO'];
@ -494,11 +495,10 @@ class Amendmentpurchaseorder extends BaseController
} }
} }
if (($FreightValue - $preFreightValue) != 0) { if (((int)$FreightValue - $preFreightValue) != 0) {
$rowspanvalue++; $rowspanvalue++;
$CAD .= "<tr><td>Current Freight : " . $preFreightValue . "</td><td>Revised Freight : " . $FreightValue . "</td></tr>"; $CAD .= "<tr><td>Current Freight : " . $preFreightValue . "</td><td>Revised Freight : " . $FreightValue . "</td></tr>";
} }
if (($AfterFreightValue - $beforeAfterFreightValue) != 0) { if (($AfterFreightValue - $beforeAfterFreightValue) != 0) {
$rowspanvalue++; $rowspanvalue++;
$CAD .= "<tr><td>Current Freight Value : " . $beforeAfterFreightValue . "</td><td>Revised Freight Value : " . $AfterFreightValue . "</td></tr>"; $CAD .= "<tr><td>Current Freight Value : " . $beforeAfterFreightValue . "</td><td>Revised Freight Value : " . $AfterFreightValue . "</td></tr>";
@ -567,7 +567,6 @@ class Amendmentpurchaseorder extends BaseController
*/ */
function UpdateAmendServicePurchaseOrder() function UpdateAmendServicePurchaseOrder()
{ {
$PONO = $this->request->getPost('txtPONO'); $PONO = $this->request->getPost('txtPONO');
$MAD = ''; $MAD = '';
@ -651,7 +650,7 @@ class Amendmentpurchaseorder extends BaseController
$POMaster = array('PONO' => $AmendmentNewPoNo, 'ParentPO' => $PONO, 'POType' => $POType, 'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => PO_RELEASED, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $scopeofwork, 'CreatedBy' => $updatedBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $updateddt, 'PaymentTerms' => $PaymentTerms, 'PaymentOtherDescription' => $Otherpayment, 'ServiceWorkStatus' => $WorkStatus, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'AmendedDetails' => $MAD, 'Supplier_Reference' => $SupplierReference, 'Mode_Of_Shipment' => $ModeOfShipment, 'Supplier_Offer_No' => $SuppliersOfferNo, 'Other_Reference' => $OtherReferences, 'Fincap' => $Fincap, 'Description_Of_Service' => strip_tags((string)$DescriptionOfPo), 'InsuranceStatus' => $InsuranceOptions, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $ServiceTypeOptions, 'IsQualityChkReqired' => $qtycheckresult); $POMaster = array('PONO' => $AmendmentNewPoNo, 'ParentPO' => $PONO, 'POType' => $POType, 'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => PO_RELEASED, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $scopeofwork, 'CreatedBy' => $updatedBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $updateddt, 'PaymentTerms' => $PaymentTerms, 'PaymentOtherDescription' => $Otherpayment, 'ServiceWorkStatus' => $WorkStatus, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'AmendedDetails' => $MAD, 'Supplier_Reference' => $SupplierReference, 'Mode_Of_Shipment' => $ModeOfShipment, 'Supplier_Offer_No' => $SuppliersOfferNo, 'Other_Reference' => $OtherReferences, 'Fincap' => $Fincap, 'Description_Of_Service' => strip_tags((string)$DescriptionOfPo), 'InsuranceStatus' => $InsuranceOptions, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $ServiceTypeOptions, 'IsQualityChkReqired' => $qtycheckresult);
$file = $this->request->getFile('POFile'); $file = $this->request->getFile('POFile');
$PrePOFile = $this->request->getPost('PrePOFile'); $PrePOFile = $this->request->getPost('PrePOFile');
$requestfilename = $file->getName(); $requestfilename = $file ? $file->getName() : null;
if (!empty($requestfilename)) { if (!empty($requestfilename)) {
if ($file && $file->isValid() && !$file->hasMoved()) { if ($file && $file->isValid() && !$file->hasMoved()) {
$path = ROOTPATH . 'public/uploads/POfiles/'; $path = ROOTPATH . 'public/uploads/POfiles/';
@ -671,7 +670,6 @@ class Amendmentpurchaseorder extends BaseController
} else { } else {
$POMaster['POFile'] = $PrePOFile ? $PrePOFile : null; $POMaster['POFile'] = $PrePOFile ? $PrePOFile : null;
} }
$LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $updatedBy, $PONO); $LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $updatedBy, $PONO);
$NewPO = ''; $NewPO = '';
@ -971,7 +969,7 @@ class Amendmentpurchaseorder extends BaseController
$AmendmentNewPoNo = generate_amendment_po_number($PONO); $AmendmentNewPoNo = generate_amendment_po_number($PONO);
$POMaster = array('PONO' => $AmendmentNewPoNo, 'ParentPO' => $PONO, 'SupplierID' => $SupplierID, 'TotalOrderValue' => $FinalTotalOrder, 'POType' => $POType, 'PODate' => $PODate, 'Status' => PO_RELEASED, 'CapitalRange' => $PoRange, 'ExchangeRate' => $ExchangeRate, 'ExchangeRateCalculatedon' => $ExchangeRateOn, 'PaymentTerms' => $PaymentMethod, 'PaymentOtherDescription' => $Otherpayment, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $createddt, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'CurrencyType' => $currencytypeID, 'AmendedDetails' => $MAD, 'Import_DispatchDetails' => $curdispatch, 'Import_PlaceofOrgin' => $PlaceOforigin, 'Supplier_Reference' => $SupplierReference, 'Mode_Of_Shipment' => $ModeOfShipment, 'Supplier_Offer_No' => $SuppliersOfferNo, 'Other_Reference' => $OtherReferences, 'Fincap' => $Fincap, 'InsuranceStatus' => $InsuranceOptions, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $ServiceTypeOptions, 'IsQualityChkReqired' => $qtycheckresult); $POMaster = array('PONO' => $AmendmentNewPoNo, 'ParentPO' => $PONO, 'SupplierID' => $SupplierID, 'TotalOrderValue' => $FinalTotalOrder, 'POType' => $POType, 'PODate' => $PODate, 'Status' => PO_RELEASED, 'CapitalRange' => $PoRange, 'ExchangeRate' => $ExchangeRate, 'ExchangeRateCalculatedon' => $ExchangeRateOn, 'PaymentTerms' => $PaymentMethod, 'PaymentOtherDescription' => $Otherpayment, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $createddt, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'CurrencyType' => $currencytypeID, 'AmendedDetails' => $MAD, 'Import_DispatchDetails' => $curdispatch, 'Import_PlaceofOrgin' => $PlaceOforigin, 'Supplier_Reference' => $SupplierReference, 'Mode_Of_Shipment' => $ModeOfShipment, 'Supplier_Offer_No' => $SuppliersOfferNo, 'Other_Reference' => $OtherReferences, 'Fincap' => $Fincap, 'InsuranceStatus' => $InsuranceOptions, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $ServiceTypeOptions, 'IsQualityChkReqired' => $qtycheckresult);
$file = $this->request->getFile('POFile'); $file = $this->request->getFile('POFile');
$requestfilename = $file->getName(); $requestfilename = $file ? $file->getName() : null;
$PrePOFile = $this->request->getPost('PrePOFile'); $PrePOFile = $this->request->getPost('PrePOFile');
if (!empty($requestfilename)) { if (!empty($requestfilename)) {
if ($file && $file->isValid() && !$file->hasMoved()) { if ($file && $file->isValid() && !$file->hasMoved()) {
@ -993,7 +991,6 @@ class Amendmentpurchaseorder extends BaseController
$POMaster['POFile'] = $PrePOFile ? $PrePOFile : null; $POMaster['POFile'] = $PrePOFile ? $PrePOFile : null;
} }
$LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $CreateBy, $PONO); $LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $CreateBy, $PONO);
if (count($LastPO) > 0) { if (count($LastPO) > 0) {
@ -1394,6 +1391,7 @@ class Amendmentpurchaseorder extends BaseController
// if (count($LastPO) > 0) { // if (count($LastPO) > 0) {
// $NewPO = $LastPO[0]['PONO']; // $NewPO = $LastPO[0]['PONO'];
// } // }
// print_r($LastPO);die;
foreach ($LastPO as $PO) : foreach ($LastPO as $PO) :
$NewPO = $PO['PONO']; $NewPO = $PO['PONO'];
endforeach; endforeach;
@ -1403,11 +1401,8 @@ class Amendmentpurchaseorder extends BaseController
$LineItemStatus = REQITEM_NEW; $LineItemStatus = REQITEM_NEW;
$igrvalue = $this->purchaseorder_model->selectigrmaster($PONO); $igrvalue = $this->purchaseorder_model->selectigrmaster($PONO);
$po = ''; $po = '';
$igrno = ''; $igrno = '';
// if(count($igrvalue) >0) // if(count($igrvalue) >0)

View File

@ -691,6 +691,9 @@ class Employeedetails extends BaseController
$LastName = $this->request->getPost('LastName'); $LastName = $this->request->getPost('LastName');
$FatherName = $this->request->getPost('FatherName'); $FatherName = $this->request->getPost('FatherName');
$DateofBirth = $this->request->getPost('DateofBirth'); $DateofBirth = $this->request->getPost('DateofBirth');
// dd($DateofBirth);
$ContactNumber = $this->request->getPost('ContactNumber'); $ContactNumber = $this->request->getPost('ContactNumber');
$EmailId = $this->request->getPost('emailid'); $EmailId = $this->request->getPost('emailid');
$comEmailId = $this->request->getPost('comemailid'); $comEmailId = $this->request->getPost('comemailid');
@ -704,6 +707,9 @@ class Employeedetails extends BaseController
$desigination = $this->request->getPost('desigination'); $desigination = $this->request->getPost('desigination');
$departmentCode = $this->request->getPost('departmentname'); $departmentCode = $this->request->getPost('departmentname');
$dateofjoining = $this->request->getPost('dateofjoining'); $dateofjoining = $this->request->getPost('dateofjoining');
// dd($dateofjoining);
//$Previousexperience = $this->request->getPost('Previousexperience'); //$Previousexperience = $this->request->getPost('Previousexperience');
$pre_experience = $this->request->getPost('Previousexperience'); $pre_experience = $this->request->getPost('Previousexperience');
@ -728,9 +734,18 @@ class Employeedetails extends BaseController
$ValidTill = $this->request->getPost('ValidTill'); $ValidTill = $this->request->getPost('ValidTill');
$addinfo = $this->request->getPost('addinfo'); $addinfo = $this->request->getPost('addinfo');
$driverlicense = $this->request->getPost('driverlicense'); $driverlicense = $this->request->getPost('driverlicense');
// dd($driverlicense);
$driverlicense = $driverlicense !== null && is_string($driverlicense) ? strtoupper($driverlicense) : null; $driverlicense = $driverlicense !== null && is_string($driverlicense) ? strtoupper($driverlicense) : null;
$licenseExpiryDate = $this->request->getPost('LicenseExpiryDate'); $licenseExpiryDate = $this->request->getPost('LicenseExpiryDate');
$VoterID = $this->request->getPost('voterID'); $VoterID = $this->request->getPost('voterID');
//dd($VoterID);
$VoterID = $VoterID !== null && is_string($VoterID) ? strtoupper($VoterID) : null; $VoterID = $VoterID !== null && is_string($VoterID) ? strtoupper($VoterID) : null;
$pfno = $this->request->getPost('pfno'); $pfno = $this->request->getPost('pfno');
$pfno = $pfno !== null && is_string($pfno) ? strtoupper($pfno) : null; $pfno = $pfno !== null && is_string($pfno) ? strtoupper($pfno) : null;
@ -752,16 +767,21 @@ class Employeedetails extends BaseController
$UpdatedBY = $this->session->get('userId'); $UpdatedBY = $this->session->get('userId');
//$licenseExpiryDate = get_date_time_format($licenseExpiryDate); //$licenseExpiryDate = get_date_time_format($licenseExpiryDate);
$DOB = get_date_format($DateofBirth);
$DOJ = get_date_format($dateofjoining);
$DOB = get_date_time_format($DateofBirth);
$DOJ = get_date_time_format($dateofjoining);
if ($ValidTill != '') { if ($ValidTill != '') {
$Valid = get_date_format($ValidTill); $Valid = get_date_time_format($ValidTill);
} else { } else {
$Valid = null; $Valid = null;
} }
if ($licenseExpiryDate != '') { if ($licenseExpiryDate != '') {
$License_ExpiryDate = get_date_format($licenseExpiryDate); $License_ExpiryDate = get_date_time_format($licenseExpiryDate);
} else { } else {
$License_ExpiryDate = null; $License_ExpiryDate = null;
} }

View File

@ -822,7 +822,7 @@ mstr.CourierNo,pom.Status,pom.POType') //,bill.BillNo,bill.FilePath,
function addAmendPOMaster($POMaster, $CreatedBy, $ParentPO) function addAmendPOMaster($POMaster, $CreatedBy, $ParentPO)
{ {
// print_r($POMaster); // print_r($POMaster);die;
$this->db->transStart(); $this->db->transStart();
$builder = $this->db->table('t_purchaseorder_master'); $builder = $this->db->table('t_purchaseorder_master');
$builder->insert($POMaster); $builder->insert($POMaster);
@ -1698,16 +1698,17 @@ QuantityRejected,ROUND(Quantity-ReceivedQuantity)as PendingQty,Per,
function GetRequesedByDetails($PONO) function GetRequesedByDetails($PONO)
{ {
$builder = $this->db->table('t_purchaseorder_master mast') $builder = $this->db->table('t_purchaseorder_master mast')
->select('mast.CreatedBy,re.FirstName,Dept.DEPCode,Dept.DepartmentName') ->select('mast.CreatedBy, re.FirstName, Dept.DEPCode, Dept.DepartmentName')
->join('tbl_users tbl', 'mast.CreatedBy=tbl.userid') ->join('tbl_users tbl', 'mast.CreatedBy = tbl.userid', 'left')
->join('t_employee_details re', 're.EmpID=tbl.EmpID') ->join('t_employee_details re', 're.EmpID = tbl.EmpID', 'left')
->join('t_departmentdetails Dept', 're.Departmentcode = Dept.DEPCode') ->join('t_departmentdetails Dept', 're.Departmentcode = Dept.DEPCode', 'left')
->where('mast.PONO', $PONO); ->where('mast.PONO', $PONO);
$result = $builder->get();
$result = $builder->get();
return $result->getResult(); return $result->getResult();
} }
// get domestic capital po list // get domestic capital po list

View File

@ -455,7 +455,8 @@
format: dateFormat, format: dateFormat,
autoclose: true, autoclose: true,
todayHighlight: true, todayHighlight: true,
clearBtn: true clearBtn: true,
orientation: 'bottom'
}).on('changeDate', function(e) { }).on('changeDate', function(e) {
// When a date is selected in #min-date, update the minDate option for #max-date // When a date is selected in #min-date, update the minDate option for #max-date
// to.datepicker('setStartDate', e.date); // to.datepicker('setStartDate', e.date);
@ -467,7 +468,8 @@
// startDate: new Date(), // Start date cannot be in the past // startDate: new Date(), // Start date cannot be in the past
autoclose: true, autoclose: true,
todayHighlight: true, todayHighlight: true,
clearBtn: true clearBtn: true,
orientation: 'bottom'
}).on('changeDate', function(e) { }).on('changeDate', function(e) {
// When a date is selected in #max-date, update the endDate option for #min-date // When a date is selected in #max-date, update the endDate option for #min-date
from.datepicker('setStartDate', e.date); from.datepicker('setStartDate', e.date);

View File

@ -1472,7 +1472,8 @@
}); });
if (!isValid) { if (!isValid) {
console.log('Validation failed. Please fill all required fields.');
alert('Validation failed. Please fill all required fields.');
return; // Stop the submission if validation fails return; // Stop the submission if validation fails
} }

View File

@ -262,7 +262,7 @@
<div class="col-12"> <div class="col-12">
<div class="page-title-box page-title-box-alt"> <div class="page-title-box page-title-box-alt">
<h4><?= "Capital Purchase Order"; ?></h4> <h4><?= "Capital Purchase Order"; ?></h4>
<a href="<?php echo base_url() ?>CreatePO" class="btn btn-success" id="back" value="Back">Back</a> <a href="<?php echo base_url() ?>CreatePO" class="btn btn-secondary" id="back" value="Back">Back</a>
</div> </div>
</div> </div>
</div> </div>

File diff suppressed because it is too large Load Diff

View File

@ -951,7 +951,7 @@ if (!empty($EmpDetails)) {
<div class="row"> <div class="row">
<div class="col-md-3"> <div class="col-md-3">
<label>Voter ID</label> <label>Voter ID</label>
<input type="text" id="VoterID" name="VoterID" maxlength="12" <input type="text" id="VoterID" name="voterID" maxlength="12"
value="<?php echo $VoterID; ?>" class="form-control" value="<?php echo $VoterID; ?>" class="form-control"
placeholder="VoterID" onkeypress="return alpha(event);" placeholder="VoterID" onkeypress="return alpha(event);"
style="text-transform: uppercase"> style="text-transform: uppercase">
@ -962,7 +962,7 @@ if (!empty($EmpDetails)) {
<input type="text" id="Driverlicense" maxlength="16" <input type="text" id="Driverlicense" maxlength="16"
onchange="validateDriverLicense();" onchange="validateDriverLicense();"
pattern="[a-zA-Z]{2}[0-9]{2}\s[0-9]{11}" pattern="[a-zA-Z]{2}[0-9]{2}\s[0-9]{11}"
value="<?php echo $DriverLicense; ?>" name="Driverlicense" value="<?php echo $DriverLicense; ?>" name="driverlicense"
title="EX:TN82 12345678900" class="form-control" title="EX:TN82 12345678900" class="form-control"
placeholder="Driverlicense" placeholder="Driverlicense"
style="text-transform: uppercase" style="text-transform: uppercase"
@ -1024,14 +1024,14 @@ if (!empty($EmpDetails)) {
</div> </div>
<div class="col-md-1" style="margin-top: 25px;"> <div class="col-md-1" style="margin-top: 32px;">
<a href="<?php echo base_url() . 'public/uploads/images/emp_files/' . $value['emp_file']; ?>" <a href="<?php echo base_url() . 'public/uploads/images/emp_files/' . $value['emp_file']; ?>"
download> download>
<i class="fa fa-download" aria-hidden="true" <i class="fa fa-download" aria-hidden="true"
style="font-size: 25px;"></i> style="font-size: 25px;"></i>
</a> </a>
</div> </div>
<div class="col-md-4" align="left" style="margin-top: 23px;"> <div class="col-md-4" align="left" style="margin-top: 32px;">
<button type="button" class="btn btn-danger btn-sm" <button type="button" class="btn btn-danger btn-sm"
id="<?= $value['id']; ?>" id="<?= $value['id']; ?>"
onclick="removeContact(this)">Delete onclick="removeContact(this)">Delete
@ -1770,6 +1770,7 @@ if (!empty($EmpDetails)) {
e.preventDefault(); e.preventDefault();
var isValid = true; var isValid = true;
var combinedFormData = new FormData(); var combinedFormData = new FormData();
var formIds = ['#accountForm', '#profileForm', '#bankForm', '#proofForm', '#fileForm']; // Add all your form IDs here var formIds = ['#accountForm', '#profileForm', '#bankForm', '#proofForm', '#fileForm']; // Add all your form IDs here
formIds.forEach(function(formId) { formIds.forEach(function(formId) {
var $form = $(formId); var $form = $(formId);
@ -1781,6 +1782,8 @@ if (!empty($EmpDetails)) {
} }
// Append the form data to FormData // Append the form data to FormData
$form.serializeArray().forEach(function(field) { $form.serializeArray().forEach(function(field) {
console.log(field.name);
console.log(field.value);
combinedFormData.append(field.name, field.value); combinedFormData.append(field.name, field.value);
}); });
// Handle file inputs separately // Handle file inputs separately
@ -1809,7 +1812,7 @@ if (!empty($EmpDetails)) {
console.log('Form submitted successfully:', response == 'true'); console.log('Form submitted successfully:', response == 'true');
if (response == 'true') { if (response == 'true') {
window.location.href = '<?php echo base_url("employeeListing"); ?>'; // window.location.href = '<?php echo base_url("employeeListing"); ?>';
} else { } else {
alert('Employee details Not Update...'); alert('Employee details Not Update...');
} }

View File

@ -298,7 +298,7 @@ if (!empty($RequistionDetails)) {
<div class="col-12"> <div class="col-12">
<div class="page-title-box page-title-box-alt"> <div class="page-title-box page-title-box-alt">
<h4><?= "Amended Import Purchase Order - $PONO "; ?></h4> <h4><?= "Amended Import Purchase Order - $PONO "; ?></h4>
<a href="<?php echo base_url() ?>amendmentpurchaseorder" class="btn btn-success" id="back" value="Back">Back</a> <a href="<?php echo base_url() ?>amendmentpurchaseorder" class="btn btn-secondary" id="back" value="Back">Back</a>
</div> </div>
</div> </div>
</div> </div>
@ -2931,8 +2931,7 @@ if (!empty($RequistionDetails)) {
$('#Deliverydt').focus(); $('#Deliverydt').focus();
return false; return false;
} else { } else {
// $('#content').loader('show');
$('#content').loader('show');
var formData = new FormData($('.ImportPO')[0]); var formData = new FormData($('.ImportPO')[0]);
$.ajax({ $.ajax({
@ -2944,8 +2943,9 @@ if (!empty($RequistionDetails)) {
type: "POST", type: "POST",
url: "<?php echo base_url() ?>amendmentpurchaseorder/EditAmendImportPO", url: "<?php echo base_url() ?>amendmentpurchaseorder/EditAmendImportPO",
success: function(data) { success: function(data) {
//console.log(data);
if (data) { if (data) {
$('#content').loader('hide'); // $('#content').loader('hide');
alert(data); alert(data);
$('#txtRowCount').val(''); $('#txtRowCount').val('');
$('#txtDeletedRow').val(''); $('#txtDeletedRow').val('');

View File

@ -160,7 +160,7 @@ if (!empty($INRSYMBOL)) {
var InsuranceNumber = '<?php echo $insurenceno; ?>'; var InsuranceNumber = '<?php echo $insurenceno; ?>';
$(document).ready(function() { $(document).ready(function() {
$('#RequistionNo').attr("style", "pointer-events: none;"); // $('#RequistionNo').attr("style", "pointer-events: none;");
$('#drpSupplier').attr("style", "pointer-events: none;"); $('#drpSupplier').attr("style", "pointer-events: none;");
$('#PoTypeOptions').attr("style", "pointer-events: none;"); $('#PoTypeOptions').attr("style", "pointer-events: none;");
$('#insurancestatus').attr("style", "pointer-events: none;"); $('#insurancestatus').attr("style", "pointer-events: none;");
@ -333,7 +333,12 @@ if (!empty($INRSYMBOL)) {
$('#txtEditAfterFreight').val(''); $('#txtEditAfterFreight').val('');
if (selValue == PercentageType) { if (selValue == PercentageType) {
var PackagingCalculation = ''; var PackagingCalculation = '';
$('#freightmodel').modal('show'); // $('#freightmodel').modal('show');
$('#EDITREVENUE').modal('hide');
setTimeout(() => {
$('#freightmodel').modal('show');
}, 1000);
$('#txtEditFreight').removeAttr('readonly', 'true'); $('#txtEditFreight').removeAttr('readonly', 'true');
} else if (selValue == NilType) { } else if (selValue == NilType) {
@ -734,6 +739,10 @@ if (!empty($INRSYMBOL)) {
FreightCalculation = $("input:radio[name='optfreight']:checked").val(); FreightCalculation = $("input:radio[name='optfreight']:checked").val();
// alert("this is value taken as before after radio value"+FreightCalculation); // alert("this is value taken as before after radio value"+FreightCalculation);
$('#freightmodel').modal('hide'); $('#freightmodel').modal('hide');
setTimeout(() => {
$('#EDITREVENUE').modal('show');
}, 1000);
// $('#EDITREVENUE').modal('show');
calculateFreight(); calculateFreight();
} }
@ -910,7 +919,8 @@ if (!empty($INRSYMBOL)) {
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="page-title-box page-title-box-alt"> <div class="page-title-box page-title-box-alt">
<h4><?= "Amendment Revenue Purchase Order - $PONO "; ?></h4> <h4><?= "Amendment Revenue Purchase Order - $PONO "; ?></h4>
<a href="<?php echo base_url() ?>amendmentpurchaseorder" class="btn btn-secondary" id="back" value="Back">Back</a>
</div> </div>
</div> </div>
</div> </div>
@ -1242,7 +1252,7 @@ if (!empty($INRSYMBOL)) {
<input type="hidden" name="<?php echo 'quantity' . $index ?>" id="<?php echo 'quantity' . $index ?>" value="<?php echo $record->Quantity; ?>" /> <input type="hidden" name="<?php echo 'quantity' . $index ?>" id="<?php echo 'quantity' . $index ?>" value="<?php echo $record->Quantity; ?>" />
<input type="hidden" name="<?php echo 'itemRate' . $index ?>" id="<?php echo 'itemRate' . $index ?>" value="<?php echo $record->Rate; ?>" /> <input type="hidden" name="<?php echo 'itemRate' . $index ?>" id="<?php echo 'itemRate' . $index ?>" value="<?php echo $record->Rate; ?>" />
<input type="hidden" name="<?php echo'per' . $index ?>" id="<?php echo 'per' . $index ?>" value="<?php echo $record->Per; ?>" /> <input type="hidden" name="<?php echo 'per' . $index ?>" id="<?php echo 'per' . $index ?>" value="<?php echo $record->Per; ?>" />
<input type="hidden" name="<?php echo 'service_description' . $index ?>" id="<?php echo 'service_description' . $index ?>" value="<?php echo $record->ServiceMaterialDescription; ?>" /> <input type="hidden" name="<?php echo 'service_description' . $index ?>" id="<?php echo 'service_description' . $index ?>" value="<?php echo $record->ServiceMaterialDescription; ?>" />
<input type="hidden" name="<?php echo 'DisType' . $index ?>" id="<?php echo 'DisType' . $index ?>" value="<?php echo $record->DiscountType; ?>" /> <input type="hidden" name="<?php echo 'DisType' . $index ?>" id="<?php echo 'DisType' . $index ?>" value="<?php echo $record->DiscountType; ?>" />
@ -1908,10 +1918,10 @@ if (!empty($INRSYMBOL)) {
<div class="modal-body p-4"> <div class="modal-body p-4">
<form> <form>
<div class="radio"> <div>
<label><input type="radio" name="optfreight" checked="checked" value='0' id="optFreight"> Basic Amount</label> <label><input type="radio" name="optfreight" checked="checked" value='0' id="optFreight"> Basic Amount</label>
</div> </div>
<div class="radio"> <div>
<label><input type="radio" name="optfreight" id="optFreight" value='1'> After Discount Amount</label> <label><input type="radio" name="optfreight" id="optFreight" value='1'> After Discount Amount</label>
</div> </div>
</form> </form>
@ -2011,7 +2021,7 @@ if (!empty($INRSYMBOL)) {
</script> --> </script> -->
<script> <script>
$(document).ready(function() { $(document).ready(function() {
var tempUserId = 0;
var index = '1'; var index = '1';
var userid = ''; var userid = '';
$("#EDITREVENUE").on("shown.bs.modal", function(e) { $("#EDITREVENUE").on("shown.bs.modal", function(e) {
@ -2021,81 +2031,90 @@ if (!empty($INRSYMBOL)) {
AvlBudAmt = '<?php echo number_format($AvlAmount + $totBasicAmt - $totDiscountAmt, 2, '.', '') ?>'; AvlBudAmt = '<?php echo number_format($AvlAmount + $totBasicAmt - $totDiscountAmt, 2, '.', '') ?>';
userid = $(e.relatedTarget).data('userid'); userid = $(e.relatedTarget).data('userid');
$('#isEdit').val(1); $('#isEdit').val(1);
//alert(userid); $('#isEdit').val(1);
var tr = document.getElementById(userid); alert(tempUserId);
var cellval = tr.cells; if (tempUserId == 0) {
var id = $('#Reqnumber' + userid).val(); var tr = document.getElementById(userid);
var cellval = tr.cells;
var id = $('#Reqnumber' + userid).val();
$('#EditReqNo').val($('#Reqnumber' + userid).val()); $('#EditReqNo').val($('#Reqnumber' + userid).val());
$('#EditdeptName').val($('#departmentName' + userid).val()); $('#EditdeptName').val($('#departmentName' + userid).val());
$("#EditCostCenter").val($('#costCode' + userid).val()); $("#EditCostCenter").val($('#costCode' + userid).val());
$('#EditAvlBudAmt').val(AvlBudAmt); $('#EditAvlBudAmt').val(AvlBudAmt);
$('#EditMaterialCode').val($('#materialCode' + userid).val()); $('#EditMaterialCode').val($('#materialCode' + userid).val());
$('#EditItemName').val($('#materialName' + userid).val()); $('#EditItemName').val($('#materialName' + userid).val());
$('#EditUOM').val($('#uom' + userid).val()); $('#EditUOM').val($('#uom' + userid).val());
$('#EditQuantity').val($('#quantity' + userid).val()); $('#EditQuantity').val($('#quantity' + userid).val());
$('#EditAmendPer').val($('#per' + userid).val()); $('#EditAmendPer').val($('#per' + userid).val());
tinyMCE.get('Edit_Service_Description').setContent($('#service_description' + userid).val()); tinyMCE.get('Edit_Service_Description').setContent($('#service_description' + userid).val());
$('#EditRate').val($('#itemRate' + userid).val()); $('#EditRate').val($('#itemRate' + userid).val());
$('#txtEditBasicValue').val(parseFloat(cellval[6].innerHTML).toFixed(2)); $('#txtEditBasicValue').val(parseFloat(cellval[6].innerHTML).toFixed(2));
RequistQuantity = $('#quantity' + userid).val(); RequistQuantity = $('#quantity' + userid).val();
$('#txtEditDiscount').val($('#DisVal' + userid).val()); $('#txtEditDiscount').val($('#DisVal' + userid).val());
$('#txtEditAfterDiscount').val($('#AfterDisVal' + userid).val()); $('#txtEditAfterDiscount').val($('#AfterDisVal' + userid).val());
$('#txtEditVat').val($('#VatVal' + userid).val()); $('#txtEditVat').val($('#VatVal' + userid).val());
$('#txtEditAfterVat').val($('#AfterVatVal' + userid).val()); $('#txtEditAfterVat').val($('#AfterVatVal' + userid).val());
$('#txtEditPackaging').val($('#PackVal' + userid).val()); $('#txtEditPackaging').val($('#PackVal' + userid).val());
$('#txtEditAfterPackaging').val($('#AfterPackVal' + userid).val()); $('#txtEditAfterPackaging').val($('#AfterPackVal' + userid).val());
$('#txtEditGST').val($('#GSTVal' + userid).val()); $('#txtEditGST').val($('#GSTVal' + userid).val());
$('#txtEditAfterGST').val($('#AfterGSTVal' + userid).val()); $('#txtEditAfterGST').val($('#AfterGSTVal' + userid).val());
$('#txtEditOtherTax').val($('#OtherTaxVal' + userid).val()); $('#txtEditOtherTax').val($('#OtherTaxVal' + userid).val());
$('#txtEditAfterOtherTax').val($('#AfterOtherTaxVal' + userid).val()); $('#txtEditAfterOtherTax').val($('#AfterOtherTaxVal' + userid).val());
if ($('#FreightType' + userid).val() == 'PER TRIP') { if ($('#FreightType' + userid).val() == 'PER TRIP') {
$('#EditTripsValue').show(); $('#EditTripsValue').show();
$('#EditNOOfTrips').val($('#Nooftrips' + userid).val()); $('#EditNOOfTrips').val($('#Nooftrips' + userid).val());
} }
$('#txtEditFreight').val($('#FreightVal' + userid).val()); $('#txtEditFreight').val($('#FreightVal' + userid).val());
$('#txtEditAfterFreight').val($('#AfterFreightVal' + userid).val()); $('#txtEditAfterFreight').val($('#AfterFreightVal' + userid).val());
$('#txtEditInsurance').val($('#Insval' + userid).val()); $('#txtEditInsurance').val($('#Insval' + userid).val());
$('#txtEditTotalOrderValue').val($('#TotalOrderValue' + userid).val()); $('#txtEditTotalOrderValue').val($('#TotalOrderValue' + userid).val());
$("#EditMaterialCode").empty(); $("#EditMaterialCode").empty();
var Material = <?php echo json_encode($MaterialList, JSON_PRETTY_PRINT) ?>; var Material = <?php echo json_encode($MaterialList, JSON_PRETTY_PRINT) ?>;
// For Binding Material list center for the selected Requistion Number // For Binding Material list center for the selected Requistion Number
$("#EditMaterialCode").append($('<option></option>').val($('#materialCode' + userid).val()).html($('#materialCode' + userid).val() + "-" + $('#materialName' + userid).val())); $("#EditMaterialCode").append($('<option></option>').val($('#materialCode' + userid).val()).html($('#materialCode' + userid).val() + "-" + $('#materialName' + userid).val()));
var isAdded = "0"; var isAdded = "0";
for (i = 0; i < Material.length; i++) { for (i = 0; i < Material.length; i++) {
$.each(Material[i], function(idx, obj) { $.each(Material[i], function(idx, obj) {
if (obj.ReqNo === id) { if (obj.ReqNo === id) {
$.each(SelectedMaterialList.Mat, function(idx1, el) { $.each(SelectedMaterialList.Mat, function(idx1, el) {
if (id == el.ReqNo) { if (id == el.ReqNo) {
if (el.materialCode == obj.MaterialCode) { if (el.materialCode == obj.MaterialCode) {
isAdded = "1"; isAdded = "1";
return false; return false;
} else { } else {
isAdded = "0"; isAdded = "0";
}
} }
});
if (isAdded == "0") {
$("#EditMaterialCode").append($('<option></option>').val(obj.MaterialCode).html(obj.MaterialCode + "-" + obj.MaterialName));
} }
});
if (isAdded == "0") {
$("#EditMaterialCode").append($('<option></option>').val(obj.MaterialCode).html(obj.MaterialCode + "-" + obj.MaterialName));
} }
} });
}); }
$("#EditDiscountType").val($('#DisType' + userid).val());
$("#drpEditFreight").val($('#FreightType' + userid).val());
$("#EditPackagingType").val($('#PackType' + userid).val())
$("input:radio[name='optPackaging'][value='" + $('#PackOption' + userid).val() + "']").prop('checked', 'checked');
$("input:radio[name='optExcise'][value='" + $('#ExciseOption' + userid).val() + "']").prop('checked', 'checked');
$("input:radio[name='optVat'][value='" + $('#VatOption' + userid).val() + "']").prop('checked', 'checked');
$("input:radio[name='optCST'][value='" + $('#CSTOption' + userid).val() + "']").prop('checked', 'checked');
}
if (userid) {
tempUserId = userid;
} else {
userid = tempUserId;
} }
$("#EditDiscountType").val($('#DisType' + userid).val());
$("#drpEditFreight").val($('#FreightType' + userid).val());
$("#EditPackagingType").val($('#PackType' + userid).val())
$("input:radio[name='optPackaging'][value='" + $('#PackOption' + userid).val() + "']").prop('checked', 'checked');
$("input:radio[name='optExcise'][value='" + $('#ExciseOption' + userid).val() + "']").prop('checked', 'checked');
$("input:radio[name='optVat'][value='" + $('#VatOption' + userid).val() + "']").prop('checked', 'checked');
$("input:radio[name='optCST'][value='" + $('#CSTOption' + userid).val() + "']").prop('checked', 'checked');
}); });
$('#BudgetType').attr("style", "pointer-events: none;"); $('#BudgetType').attr("style", "pointer-events: none;");
@ -2452,6 +2471,7 @@ if (!empty($INRSYMBOL)) {
processData: false, processData: false,
contentType: false, contentType: false,
success: function(data) { success: function(data) {
// console.log(data);
if (data) { if (data) {
// $('.content').loader('hide'); // $('.content').loader('hide');
alert(data); alert(data);

View File

@ -4832,8 +4832,8 @@ if (!empty($getlogpodtl)) {
}); });
function Save(status) { function Save(status) {
console.log("status"); // console.log("status");
console.log(status); // console.log(status);
if (status == '0') { if (status == '0') {
stat = '<?php echo PO_DRAFT; ?>'; stat = '<?php echo PO_DRAFT; ?>';
@ -5103,7 +5103,7 @@ if (!empty($getlogpodtl)) {
} }
}); });
$("#Date").datepicker(); // $("#Date").datepicker();
function splpoupdate() { function splpoupdate() {
var formData = new FormData(); var formData = new FormData();

File diff suppressed because it is too large Load Diff

View File

@ -678,7 +678,7 @@ if (!empty($INRSYMBOL)) {
<div class="col-12"> <div class="col-12">
<div class="page-title-box page-title-box-alt"> <div class="page-title-box page-title-box-alt">
<h4><?= "Service Purchase Order"; ?></h4> <h4><?= "Service Purchase Order"; ?></h4>
<a href="<?php echo base_url() ?>CreatePO" class="btn btn-success" id="back" value="Back">Back</a> <a href="<?php echo base_url() ?>CreatePO" class="btn btn-secondary" id="back" value="Back">Back</a>
</div> </div>
</div> </div>
</div> </div>
@ -1343,7 +1343,7 @@ if (!empty($INRSYMBOL)) {
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<div class="form-row"> <div class="form-row">
<a class="btn btn-secondary waves-effect" data-dismiss="modal" value="Cancel">Cancel</a> <a class="btn btn-secondary waves-effect" data-dismiss="modal" value="Cancel" style="margin-right: 10px;">Cancel</a>
<a class="btn btn-info waves-effect waves-light font AddService" id="AddService"> &nbsp;&nbsp;<span class="bold">Add Service</span></a> <a class="btn btn-info waves-effect waves-light font AddService" id="AddService"> &nbsp;&nbsp;<span class="bold">Add Service</span></a>
</div> </div>
</div><!-- SERVICE modal-footer closed here --> </div><!-- SERVICE modal-footer closed here -->
@ -1897,7 +1897,7 @@ if (!empty($INRSYMBOL)) {
clearServiceModalFields(); clearServiceModalFields();
$('#otherdescription').hide(); $('#otherdescription').hide();
$('#SERVICE').modal('hide');
} }
}); });
@ -2332,7 +2332,12 @@ if (!empty($INRSYMBOL)) {
$('#PoTypeOptions').focus(); $('#PoTypeOptions').focus();
return false; return false;
} else { } else if ($('#Otherpayment').val() == '') {
alert('Please Enter the Payable Terms');
$('#Otherpayment').focus();
return false;
}else {
return true; return true;
} }
} }