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

This commit is contained in:
bitbucket 2024-07-30 13:10:52 +05:30
commit 8489f1bb95
35 changed files with 558 additions and 1083 deletions

View File

@ -46,8 +46,6 @@ $routes->get('viewsupplier','Supplier::viewsupplier');// load edit supplier page
$routes->post('editsupplier', 'Supplier::updatesupplierdetails'); //save supplier details
$routes->post('addNewsupplier', 'Supplier::savesupplierdetails'); // update supplier details
$routes->post('supplierExist','Supplier::checksupplier');
$routes->post('supplierGSTExist','Supplier::checkGST');
$routes->post('supplierPANExist','Supplier::checkPAN');
$routes->get('exportsupplier','Supplier::exportsupplier'); // export supplier details
$routes->post('deletesupplier','Supplier::deletesupplier');

View File

@ -237,7 +237,7 @@ class Amendmentpurchaseorder extends BaseController
$supplierreference = $this->request->getPost('amendsupplierreference');
$supplieroffno = $this->request->getPost('amendsupplierofferno');
$otherreference = $this->request->getPost('amendotherreference');
$fincap = $this->request->getPost('amendfincap');
$fincap = "";//$this->request->getPost('amendfincap');
$revenuetype = $this->request->getPost('PoTypeOptions');
$insurancestatus = $this->request->getPost('insurancestatus');
if ($insurancestatus == 1) {
@ -590,7 +590,7 @@ class Amendmentpurchaseorder extends BaseController
$SupplierReference = $this->request->getPost('amendsupplierreference');
$SuppliersOfferNo = $this->request->getPost('amendsupplierofferno');
$OtherReferences = $this->request->getPost('amendotherreference');
$Fincap = $this->request->getPost('amendfincap');
$Fincap = "";//$this->request->getPost('amendfincap');
$InsuranceOptions = $this->request->getPost('insuranceStatus');
$InsuranceNumber = $this->request->getPost('InsuranceNumber');
$ServiceTypeOptions = $this->request->getPost('PoTypeOptions');
@ -850,7 +850,7 @@ class Amendmentpurchaseorder extends BaseController
$SupplierReference = $this->request->getPost('amendsupplierreference');
$SuppliersOfferNo = $this->request->getPost('amendsupplierofferno');
$OtherReferences = $this->request->getPost('amendotherreference');
$Fincap = $this->request->getPost('amendfincap');
$Fincap = "";//$this->request->getPost('amendfincap');
$InsuranceOptions = $this->request->getPost('insuranceStatus');
$InsuranceNumber = $this->request->getPost('InsuranceNumber');
$ServiceTypeOptions = $this->request->getPost('PoTypeOptions');
@ -1258,7 +1258,7 @@ class Amendmentpurchaseorder extends BaseController
$SupplierRef = $this->request->getPost('amendsupplierreference');
$SupplierOffer = $this->request->getPost('amendsupplierofferno');
$otherRef = $this->request->getPost('amendotherreference');
$finCap = $this->request->getPost('amendfincap');
$finCap = "";//$this->request->getPost('amendfincap');
$OtherPayment = $this->request->getPost('Otherpayment');

View File

@ -187,7 +187,7 @@ class Emergencypurchaseorder extends BaseController
$SupplierReference = $this->request->getPost('emergsupplierreference');
$SuppliersOfferNo = $this->request->getPost('emergsupplierofferno');
$OtherReferences = $this->request->getPost('emergotherreference');
$Fincap = $this->request->getPost('emergfincap');
$Fincap = "";//$this->request->getPost('emergfincap');
$InsuranceOptions = $this->request->getPost('insuranceStatus');
$InsuranceNumber = $this->request->getPost('InsuranceNumber');
$ServiceTypeOptions = $this->request->getPost('PoTypeOptions');
@ -388,7 +388,7 @@ class Emergencypurchaseorder extends BaseController
$supplierreference = $this->request->getPost('emergsupplierreference');
$supplieroffno = $this->request->getPost('emergsupplierofferno');
$otherreference = $this->request->getPost('emergotherreference');
$fincap = $this->request->getPost('emergfincap');
$fincap = "";//$this->request->getPost('emergfincap');
$revenuetype = $this->request->getPost('PoTypeOptions');
$insurancestatus = $this->request->getPost('insuranceStatus');
if ($insurancestatus == 1) {

View File

@ -439,13 +439,10 @@ class Inwardgateregister extends BaseController
// var_dump($grossWeightDate);
// var_dump($tareWeightDate);
if (is_string($grossWeightDate) && is_string($tareWeightDate)) {
$GrossWeightDate = date('Y-m-d H:i:s', strtotime($grossWeightDate));
$TareWeightDate = date('Y-m-d H:i:s', strtotime($tareWeightDate));
} else {
$GrossWeightDate = null;
$TareWeightDate = null;
}
$GrossWeightDate = !empty($grossWeightDate) && is_string($grossWeightDate) ? date('Y-m-d H:i:s', strtotime($grossWeightDate)) : null;
$TareWeightDate = !empty($tareWeightDate) && is_string($tareWeightDate) ? date('Y-m-d H:i:s', strtotime($tareWeightDate)) : null;
log_message('error', "TareWeightDate" . $TareWeightDate);
if (strlen($QuantityAsPerInvoice) > 0 && $QuantityAsPerInvoice != '0') {
$Remarks = $this->request->getPost('txtRemarks' . $i);
$ItemStatus = '';

View File

@ -1082,7 +1082,7 @@ $mpdf->use_kwt = true;
$supplierreference = $this->request->getPost('addsupplierreference');
$supplieroffno = $this->request->getPost('addsupplierofferno');
$otherreference = $this->request->getPost('addotherreference');
$fincap = $this->request->getPost('addfincap');
$fincap = "";//$this->request->getPost('addfincap');
$revenuetype = $this->request->getPost('PoTypeOptions');
$insurancestatus = $this->request->getPost('insurance');
$InsuranceNumber = ($insurancestatus == 1) ? $this->request->getPost('InsuranceNumber') : '';
@ -1218,7 +1218,7 @@ $mpdf->use_kwt = true;
$supplierreference = $this->request->getPost('editsupplierreference');
$supplieroffno = $this->request->getPost('editsupplierofferno');
$otherreference = $this->request->getPost('editotherreference');
$fincap = $this->request->getPost('editfincap');
$fincap = "";// $this->request->getPost('editfincap');
$revenuetype = $this->request->getPost('PoTypeOptions');
$insurancestatus = $this->request->getPost('insurancestatus');
if ($insurancestatus == 1) {
@ -1852,7 +1852,7 @@ $mpdf->use_kwt = true;
$SupplierRef = $this->request->getPost('addsupplierreference');
$SupplierOffer = $this->request->getPost('addsupplierofferno');
$otherRef = $this->request->getPost('addotherreference');
$finCap = $this->request->getPost('addfincap');
$finCap = "";//$this->request->getPost('addfincap');
$importoption = $this->request->getPost('Importoption');
$Insurance = $this->request->getPost('Insurance');
@ -2042,7 +2042,7 @@ $mpdf->use_kwt = true;
$SupplierRef = $this->request->getPost('editsupplierreference');
$SupplierOffer = $this->request->getPost('editsupplierofferno');
$otherRef = $this->request->getPost('editotherreference');
$finCap = $this->request->getPost('editfincap');
$finCap = "";//$this->request->getPost('editfincap');
@ -2454,7 +2454,7 @@ try{
$SupplierReference = $this->request->getPost('addsupplierreference');
$SuppliersOfferNo = $this->request->getPost('addsupplierofferno');
$OtherReferences = $this->request->getPost('addotherreference');
$Fincap = $this->request->getPost('addfincap');
$Fincap = "";//$this->request->getPost('addfincap');
$InsuranceOptions = $this->request->getPost('insuranceStatus');
$InsuranceNumber = $this->request->getPost('InsuranceNumber');
$ServiceTypeOptions = $this->request->getPost('PoTypeOptions');
@ -2728,7 +2728,7 @@ try{
$SupplierReference = $this->request->getPost('editsupplierreference');
$SuppliersOfferNo = $this->request->getPost('editsupplierofferno');
$OtherReferences = $this->request->getPost('editotherreference');
$Fincap = $this->request->getPost('editfincap');
$Fincap = "";//$this->request->getPost('editfincap');
$InsuranceOptions = $this->request->getPost('insuranceStatus');
$InsuranceNumber = $this->request->getPost('InsuranceNumber');
$ServiceTypeOptions = $this->request->getPost('PoTypeOptions');

View File

@ -206,7 +206,7 @@ class Servicepurchaseorder extends BaseController
$SupplierReference = $this->request->getPost('addsupplierreference');
$SuppliersOfferNo = $this->request->getPost('addsupplierofferno');
$OtherReferences = $this->request->getPost('addotherreference');
$Fincap = $this->request->getPost('addfincap');
$Fincap = "";//$this->request->getPost('addfincap');
$InsuranceOptions = $this->request->getPost('insuranceStatus');
$InsuranceNumber = $this->request->getPost('InsuranceNumber');
$ServiceTypeOptions = $this->request->getPost('PoTypeOptions');
@ -350,7 +350,7 @@ class Servicepurchaseorder extends BaseController
$SupplierReference = $this->request->getPost('editsupplierreference');
$SuppliersOfferNo = $this->request->getPost('editsupplierofferno');
$OtherReferences = $this->request->getPost('editotherreference');
$Fincap = $this->request->getPost('editfincap');
$Fincap = "";//$this->request->getPost('editfincap');
$InsuranceOptions = $this->request->getPost('insuranceStatus');
$InsuranceNumber = $this->request->getPost('InsuranceNumber');
$ServiceTypeOptions = $this->request->getPost('PoTypeOptions');

View File

@ -67,55 +67,6 @@ class Supplier extends BaseController
$this->loadViews("addSupplier", $this->global, $data, NULL);
}
/**
* This function is used to check whether PAN already exist or not
*/
function CheckPAN()
{
$id = $this->request->getPost('id');
$query = $this->supplier_model->checkPAN($id);
$response = ($query !== null && !empty($query)) ? $query[0]['PAN'] : null;
return $this->response->setJSON($response);
}
/* To Check the Pan Number is exists in the database or not */
public function checkPanValidate($PanNo)
{
$query = $this->supplier_model->checkPAN($PanNo);
if (count($query) > 0) {
return 'The Entered PAN Number is already exists in the Database.';
} else {
return true;
}
}
public function checkGST()
{
$id = $this->request->getPost('id');
$query = $this->supplier_model->checkGST($id);
$response = ($query !== null && !empty($query)) ? $query[0]['GSTNO'] : null;
return $this->response->setJSON($response);
}
/* To Check the GST Number is exists in the database or not */
public function checkGstValidate($GstNo)
{
$query = $this->supplier_model->checkGST($GstNo);
if (count($query) > 0) {
// $this->validator->setMessage('checkGstValidate', 'The Entered GST Number is already exists in the Database.');
// echo "<script>alert('The Entered GST Number is already exists in the Database.');</script>";
// return false;
return 'The Entered GST Number already exists in the Database.';
} else {
return true;
}
}
/**
* This function is used to add new Supplier to the system
@ -150,16 +101,7 @@ class Supplier extends BaseController
'rules' => 'valid_email|max_length[128]|required'
]
];
// $rules['panno'] = ($PAN=='') ? ['label' => 'panno','rules' => 'trim|max_length[10]']
// : ['label' => 'panno','rules' => 'trim|max_length[10]|checkPanValidate['.$PAN.']'];
// $rules['GSTNo'] = ($GSTNo=='') ? ['label' => 'GSTNo','rules' => 'trim|max_length[15]']
// : ['label' => 'GSTNo', 'rules' => 'trim|max_length[15]|checkGstValidate[' . $GSTNo . ']'];
$messages = [
'SupplierName' => [
'required' => 'Please enter a supplier name.'
@ -200,7 +142,7 @@ class Supplier extends BaseController
$EmailAddress = $this->request->getPost('emailid');
$PAN = (is_string($PAN)) ? strtoupper($PAN) : null ;
$GSTNo = (is_string($GSTNo)) ? strtoupper($GSTNo) : null ;
$MSMENo = $this->request->getPost('MSME');
$MSME = $this->request->getPost('MSME');
$accno = $this->request->getPost('accno');
$ifsc = $this->request->getPost('ifsc');
$branchname = $this->request->getPost('branchname');
@ -212,7 +154,7 @@ class Supplier extends BaseController
$maintenance = $this->request->getPost('maintanance');
$PaymentId = $this->request->getPost('paymentid');
$supplier = array('SupplierName' => $SupplierName, 'Address' => $Address, 'ContactNumber' => $ContactNumber, 'AlternateContactNumber' => $AlternateContactNumber, 'EmailAddress' => $EmailAddress, 'PAN' => $PAN, 'GSTNo' => $GSTNo, 'PaymentID' => $PaymentId, 'Cert_MSME' => $MSMENo, 'BankAcNumber' => $accno, 'IFSCCode' => $ifsc, 'BranchName' => $branchname, 'BankAddress' => $bankaddress, 'Createdby' => $Createdby, 'IsService' => $service, 'IsMaintanance' => $maintenance, 'IsRawMaterial' => $rawmaterial); //,'PaymentTerms'=>$PaymentTerms,'PaymentDays'=>$Payment,'PayableAT'=>$PayableAT);
$supplier = array('SupplierName' => $SupplierName, 'Address' => $Address, 'ContactNumber' => $ContactNumber, 'AlternateContactNumber' => $AlternateContactNumber, 'EmailAddress' => $EmailAddress, 'PAN' => $PAN, 'GSTNo' => $GSTNo, 'PaymentID' => $PaymentId, 'MSME' => $MSME, 'BankAcNumber' => $accno, 'IFSCCode' => $ifsc, 'BranchName' => $branchname, 'BankAddress' => $bankaddress, 'Createdby' => $Createdby, 'IsService' => $service, 'IsMaintanance' => $maintenance, 'IsRawMaterial' => $rawmaterial); //,'PaymentTerms'=>$PaymentTerms,'PaymentDays'=>$Payment,'PayableAT'=>$PayableAT);
$file1 = $this->request->getFile('Cert_MSME');
$file2 = $this->request->getFile('Cert_GST');

View File

@ -266,6 +266,9 @@ class Inwardgateregister_model extends Model
$builder = $this->db->table('t_igr_details');
$builder->insert($igrD);
$aff_row = $this->db->affectedRows();
log_message('error', 'addigrD Query: ' . $this->db->getLastQuery()->getQuery());
$this->db->transComplete();
$result = $this->db->table('t_igr_details')

View File

@ -413,7 +413,7 @@ mstr.CourierNo,pom.Status,pom.POType') //,bill.BillNo,bill.FilePath,
*/
function getSupplierName($supID = '')
{
$builder = $this->db->table('t_supplierdetailsn')->select('SupplierID, SupplierName,Address,PaymentID')
$builder = $this->db->table('t_supplierdetailsn')->select('SupplierID, SupplierName,Address,PaymentID,MSME')
->where('IsActive', 1);
if ($supID != '') {
$builder->where('SupplierID', $supID);
@ -979,7 +979,7 @@ mstr.CourierNo,pom.Status,pom.POType') //,bill.BillNo,bill.FilePath,
function GetServicePurchaseOrder($PONO = '')
{
$builder = $this->db->table('t_purchaseorder_master POMast')->distinct()
->select('ReqNo,POMast.PONO,POMast.PaymentTerms,POMast.PaymentOtherDescription,ServiceDescription,supp.SupplierID,supp.SupplierName,supp.Address,PODate,Stat.StatusName,DeliveryOption,DeliverySchedule,DeliveryDate,DeliveryAddress,POMast.PaymentTerms,POMast.ExchangeRate,POMast.UpdatedOn,Stat.StatusCode,POMast.ServiceWorkStatus,POMast.*,POMast.TotalOrderValue,POMast.BudgetType,IGR.IGRNO')
->select('ReqNo,POMast.PONO,POMast.PaymentTerms,POMast.PaymentOtherDescription,ServiceDescription,supp.SupplierID,supp.SupplierName,supp.Address,supp.MSME,PODate,Stat.StatusName,DeliveryOption,DeliverySchedule,DeliveryDate,DeliveryAddress,POMast.PaymentTerms,POMast.ExchangeRate,POMast.UpdatedOn,Stat.StatusCode,POMast.ServiceWorkStatus,POMast.*,POMast.TotalOrderValue,POMast.BudgetType,IGR.IGRNO')
->join('t_supplierdetailsn supp', 'supp.SupplierID = POMast.SupplierID')
->join('t_status Stat', 'Stat.StatusCode = POMast.Status')
->join('t_purchaseorder_lineitem LineItem', 'POMast.PONO = LineItem.PONO')
@ -1573,7 +1573,7 @@ QuantityRejected,ROUND(Quantity-ReceivedQuantity)as PendingQty,Per,
$builder = $this->db->table('t_purchaseorder_master mast')->distinct()
->select('mast.PONO,mast.TotalOrderValue,st.StatusCode,st.StatusName,emp.FirstName,mast.CreatedDate,ccm.CostCenterName,ccm.CostCenterCode,mast.POType as RType,mast.Remarks,DepartmentName,mast.ApprovedBy,(select EmpID from tbl_users where userId=mast.ApprovedBy )as EID,rmast.ReqType,mast.Status,mast.CapitalRange,
(select FirstName from t_employee_details where EmpID=EID)as Approver,sup.SupplierName')
(select FirstName from t_employee_details where EmpID=EID)as Approver,sup.SupplierName,sup.MSME')
// ->orderBy('mast.Status',"PO_CREATED");
->join('t_supplierdetailsn sup', 'sup.SupplierID = mast.SupplierID')

View File

@ -57,41 +57,6 @@ class Supplier_model extends Model
return $result;
}
function checkPAN($PAN, $SID = '')
{
$builder = $this->db->table('t_supplierdetailsn')
->select('PAN')->where('PAN', $PAN);
if ($SID != '') {
$builder->where('SupplierID !=', $SID);
}
$query = $builder->get();
if ($query->getNumRows() > 0) {
//echo $result->getNumRows();
return $query->getResultArray();
}
}
public function checkGST($GST, $SID = null)
{
$builder = $this->db->table('t_supplierdetailsn')->select('GSTNO')
->where('GSTNO', $GST);
if ($SID !== null) {
$builder->where('SupplierID !=', $SID);
}
$query = $builder->get();
if ($query->getNumRows() > 0) {
return $query->getResultArray();
} else {
return [];
}
}
function addNewsupplier($supplier)
{

View File

@ -30,7 +30,6 @@ $ModeOfShipment = '';
$SupplierReference = '';
$SuppliersOfferNo = '';
$OtherReferences = '';
$Fincap = '';
$InsuranceOptions = '';
$InsuranceNumber = '';
$ServiceTypeOptions = '';
@ -56,7 +55,7 @@ if (!empty($POMaster)) {
$SupId = $Req->SupplierID;
$SupName = $Req->SupplierName;
$Address = $Req->Address;
$Address = $Req->MSME ? "MSME : ".$Req->MSME."\n".$Req->Address :$Req->Address ;
$pdt = new DateTime($Req->PODate);
$PODate = $pdt->format('d-m-Y');
$DeliverOption = $Req->DeliveryOption;
@ -75,7 +74,6 @@ if (!empty($POMaster)) {
$SupplierReference = $Req->Supplier_Reference;
$SuppliersOfferNo = $Req->Supplier_Offer_No;
$OtherReferences = $Req->Other_Reference;
$Fincap = $Req->Fincap;
$InsuranceOptions = $Req->InsuranceStatus;
$InsuranceNumber = $Req->InsuranceNumber;
$ServiceTypeOptions = $Req->POSubType;
@ -294,8 +292,11 @@ if (!empty($getlogpodtl)) {
$.each(y, function(idx, obj) {
if (obj.SupplierID === id) {
$("#SupAddress").val(obj.Address);
if (obj.MSME) {
$("#SupAddress").val("MSME : " + obj.MSME + "\n" + obj.Address);
} else {
$("#SupAddress").val(obj.Address);
}
PaymentID = obj.PaymentID;
@ -771,10 +772,7 @@ if (!empty($getlogpodtl)) {
if (!empty($Suplist)) {
foreach ($Suplist as $SID) :
$options[$SID->SupplierID] = $SID->SupplierID . ' ' . ' - ' . ' ' . $SID->SupplierName;
$options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName ;
endforeach;
}
@ -935,7 +933,7 @@ if (!empty($getlogpodtl)) {
</div>
</div>
<div class="col-md-4" style="padding:0px;">
<div class="col-md-6" style="padding:0px;">
<div class="col-md-12" style="padding:0px;">
<label>Our Reference(S)</label>
<div class="form-group">
@ -946,16 +944,7 @@ if (!empty($getlogpodtl)) {
?>
</div>
</div>
<div class="col-md-6">
<label>Fincap</label>
<div class="form-group">
<?php
$data = array('name' => 'editfincap', 'value' => set_value('editfincap', $Fincap), 'id' => 'editfincap', 'class' => 'form-control');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
</div>
@ -2338,13 +2327,12 @@ if (!empty($getlogpodtl)) {
<td><?php echo $oldpo->PONO ?></td>
<!--
<?php if ($oldpo->logDate != '-') {
$logdate = date('d-m-Y', strtotime($oldpo->logDate));
} else {
$logdate = '-';
} ?>
<td><?= $logdate; ?></td> -->
<?php // if ($oldpo->logDate != '-') {
// $logdate = date('d-m-Y', strtotime($oldpo->logDate));
// } else {
// $logdate = '-';
// } ?>
-->
<td><?php echo $oldpo->LineItemNos; ?></td>
<td><?php echo $oldpo->entity ?></td>
<?php if ($oldpo->entity == 'PO DateChanged') {

View File

@ -225,20 +225,4 @@
]
});
});
</script>
<script>
$(function() {
$.fn.dataTable.moment('DD-MM-YYYY');
$('#dataTableHistoriek').DataTable({
"paging": true,
"ordering": true,
"searching": true,
"order": [[0, "desc"]],
"columnDefs": [
{ "type": "date", "targets": 1 } // Ensure that the column index is correct (0-based index)
],
"bInfo": true
});
});
</script>
</script>

View File

@ -175,27 +175,6 @@
}
}
function onlyAlphabets(evt) {
var charCode;
if (window.event)
charCode = window.event.keyCode; //for IE
else
charCode = evt.which; //for firefox
if (charCode == 32) //for &lt;space&gt; symbol
return true;
if (charCode > 31 && charCode < 65) //for characters before 'A' in ASCII Table
return false;
if (charCode > 90 && charCode < 97) //for characters between 'Z' and 'a' in ASCII Table
return false;
if (charCode > 122) //for characters beyond 'z' in ASCII Table
return false;
return true;
}
$(document).ready(function() {
//$("#Payment").select2();
@ -261,7 +240,7 @@
<div class="col-md-3">
<span for="SupplierName">Supplier Name</span><span class="badge">*</span>
<input type="text" name="SupplierName" onkeypress="return onlyAlphabets(event);" maxlength="100" id="supplierName" class="form-control" required>
<input type="text" name="SupplierName" maxlength="100" id="supplierName" class="form-control" required>
</div>
<div class="col-md-3">
<span for="ContactNumber">Contact Number</span><span class="badge">*</span>
@ -465,93 +444,12 @@
return false;
}
// if(!validateGST())
// {
// $('#GSTNo').focus();
// return false;
// }
if (!validateEmail()) {
$('#emailid').focus();
return false;
}
}
//Call to ajax existing PAN
$('#panno').change(function() {
var id = $('#panno').val();
if (id != '') {
$.ajax({
data: {id: id},
type: "POST",
url: "<?= base_url() . 'supplierPANExist' ?>",
success: function(data) {
if(data){
var answer = confirm(data + " supplier details already exist in the database. Do you want to change the supplier details?");
if (answer) {
$('#panno').val('');
$('#panno').focus();
return false;
} else {
alert('Please edit the supplier details in the Edit screen and change the supplier status to Active');
window.location = '<?= site_url('supplierlisting') ?>'; // Use site_url() to generate the correct URL for redirection
}
}
},
error: function() {
alert('Error occurred while checking PAN number.');
$('#panno').val('');
$('#panno').focus();
}
});
} else {
alert('Please enter the PAN Number');
$('#panno').focus();
return false;
}
});
$('#GSTNo').change(function() {
var id = $('#GSTNo').val();
if (id != '') {
$.ajax({
type: "POST",
url: "<?= base_url() . 'supplierGSTExist' ?>",
data: { id: id },
success: function(data) {
if (data) {
var answer = confirm(data + " " + " supplier details is already exists in the database.Do you want to change the SUPPLIER details?")
if (answer) {
$('#GSTNo').val('');
$('#GSTNo').focus();
return false;
} else {
alert('Please edit the supplier details in the Edit screen and change the supplier status to Active');
window.location = '<?= site_url('supplierlisting') ?>'; // Use site_url() to generate the correct URL for redirection
}
}
},
error: function() {
alert('Error occurred while checking GST number.');
$('#GSTNo').val(''); // Clear GSTNo field
$('#GSTNo').focus(); // Focus on GSTNo field
}
});
} else {
alert('Please enter the GST Number');
$('#GSTNo').focus();
return false;
}
});
$('#supplierName').change(function() {
var suppliername = $('#supplierName').val();
var supplier = suppliername.replace(/ /g, '');

View File

@ -2120,7 +2120,7 @@ if (!empty($INRSYMBOL)) {
if (!empty($Suplist)) {
foreach ($Suplist as $SID) :
$options[$SID->SupplierID] = $SID->SupplierID . ' ' . ' - ' . ' ' . $SID->SupplierName;
$options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName . (!empty($SID->MSME) ? ' ( MSME - ' . $SID->MSME.' )' : '');
endforeach;
}
@ -2361,7 +2361,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-4" style="padding:0px;">
<div class="col-md-6" style="padding-right:0px;">
<div class="col-md-12" style="padding-right:0px;">
<label>Our Reference(S)</label>
<div class="form-group">
@ -2372,16 +2372,6 @@ if (!empty($INRSYMBOL)) {
?>
</div>
</div>
<div class="col-md-6">
<label>Fincap</label>
<div class="form-group">
<?php
$data = array('name' => 'emergfincap', 'value' => set_value('emergfincap'), 'id' => 'emergfincap', 'class' => 'form-control');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
</div>

View File

@ -19,7 +19,6 @@ $PaymentTerms = '';
$PaymentOtherDescription = '';
$DeliverySchedule = '';
$advance = 0;
$finCap = '';
$modShp = '';
$insNo = '';
$insNo = '';
@ -87,7 +86,6 @@ if (!empty($POItem)) {
$dispatch = $PO->Import_DispatchDetails;
}
$ServiceDescription = $PO->ServiceDescription;
$finCap = $PO->Fincap;
$modShp = $PO->Mode_Of_Shipment;
if ($PO->InsuranceNumber == '') {
$insNo = 'No';

View File

@ -386,11 +386,8 @@ function vaildateBeforeOpenModal()
if(!empty($Suplist))
{
foreach ($Suplist as $SID):
$options[$SID->SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName;
endforeach;
$options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName ;
endforeach;
}
echo form_dropdown('drpSupplier', $options,set_value('drpSupplier'),'id="drpSupplier"' ,'required="true"' ,'class="form-control select2');
@ -610,9 +607,9 @@ function vaildateBeforeOpenModal()
</div>
</div>
<div class="col-md-4" style="padding:0px;">
<div class="col-md-6" style="padding:0px;">
<div class="col-md-12" style="padding:0px;">
<label>Our Reference(S)</label>
<label>Our Reference(S)</label>
<div class="form-group">
<?php
@ -621,16 +618,6 @@ function vaildateBeforeOpenModal()
?>
</div>
</div>
<div class="col-md-6">
<label>Fincap</label>
<div class="form-group">
<?php
$data = array('name' => 'addfincap','value' => set_value('addfincap'),'id'=>'addfincap', 'class' => 'form-control');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
</div>
@ -2748,8 +2735,12 @@ $('#PoTypeOptions').change(function()
if(obj.SupplierID === id)
{
if (obj.MSME) {
$("#SupAddress").val("MSME : " + obj.MSME + "\n" + obj.Address);
} else {
$("#SupAddress").val(obj.Address);
supPaymentTerms=obj.PaymentID;
}
supPaymentTerms=obj.PaymentID;
//$("#PaymentMethod").val(obj.PaymentID);

View File

@ -82,7 +82,6 @@
$SupplierReference='';
$SuppliersOfferNo='';
$OtherReferences='';
$Fincap='';
$InsuranceOptions='';
$InsuranceNumber='';
$ServiceTypeOptions='';
@ -126,7 +125,7 @@ if(!empty($POMaster))
$SupId = $Req->SupplierID;
$SupName = $Req->SupplierName;
$Address = $Req->Address;
$Address = $Req->MSME ? "MSME : ".$Req->MSME."\n".$Req->Address :$Req->Address ;
$pdt = new DateTime($Req->PODate);
$PODate = $pdt->format('d-m-Y');
$DeliverOption = $Req->DeliveryOption;
@ -172,7 +171,6 @@ if(!empty($POMaster))
$SupplierReference=$Req->Supplier_Reference;
$SuppliersOfferNo=$Req->Supplier_Offer_No;
$OtherReferences=$Req->Other_Reference;
$Fincap=$Req->Fincap;
$InsuranceOptions=$Req->InsuranceStatus;
$InsuranceNumber=$Req->InsuranceNumber;
$ServiceTypeOptions=$Req->POSubType;
@ -276,7 +274,6 @@ $('#addmodeofshipment').attr("style", "pointer-events: none;");
$('#amendsupplierreference').attr("style", "pointer-events: none;");
$('#amendsupplierofferno').attr("style", "pointer-events: none;");
$('#amendotherreference').attr("style", "pointer-events: none;");
$('#amendfincap').attr("style", "pointer-events: none;");
$('#PoTypeOptions').attr("style", "pointer-events: none;");
$('#InsuranceNumber').attr("style", "pointer-events: none;");
$('#insuranceStatus').attr("style", "pointer-events: none;");
@ -500,10 +497,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
if(!empty($Suplist))
{
foreach ($Suplist as $SID):
$options2[$SID->SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName;
$options2[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName ;
endforeach;
}
@ -708,9 +702,9 @@ document.getElementById('dispatchinternational').style.display = 'block';
</div>
</div>
<div class="col-md-4" style="padding:0px;">
<div class="col-md-6" style="padding:0px;">
<div class="col-md-12" style="padding:0px;">
<label>Our Reference(S)</label>
<label>Our Reference(S)</label>
<div class="form-group">
<?php
@ -719,16 +713,6 @@ document.getElementById('dispatchinternational').style.display = 'block';
?>
</div>
</div>
<div class="col-md-6">
<label>Fincap</label>
<div class="form-group">
<?php
$data = array('name' => 'amendfincap','value' => set_value('amendfincap',$Fincap),'id'=>'amendfincap', 'class' => 'form-control');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
</div>
@ -2430,7 +2414,11 @@ var myArray = <?php echo json_encode($res_arr_values); ?>;
$.each(y, function(idx, obj) {
if(obj.SupplierID === id)
{
if (obj.MSME) {
$("#SupAddress").val("MSME :" + obj.MSME + "\n" + obj.Address);
} else {
$("#SupAddress").val(obj.Address);
}
supPaymentTerms=obj.PaymentTerms;
supPaymentAT=obj.PayableAT;
subPaymentDate=obj.PaymentDays;

View File

@ -87,7 +87,6 @@
$SupplierReference='';
$SuppliersOfferNo='';
$OtherReferences='';
$Fincap='';
$InsuranceOptions='';
$InsuranceNumber='';
$ServiceTypeOptions='';
@ -123,7 +122,7 @@ if(!empty($POMaster))
$SupId = $Req->SupplierID;
$SupName = $Req->SupplierName;
$Address = $Req->Address;
$Address = $Req->MSME ? "MSME : ".$Req->MSME."\n".$Req->Address :$Req->Address ;
$pdt = new DateTime($Req->PODate);
$PODate = $pdt->format('d-m-Y');
$DeliverOption = $Req->DeliveryOption;
@ -164,7 +163,6 @@ if(!empty($POMaster))
$SupplierReference=$Req->Supplier_Reference;
$SuppliersOfferNo=$Req->Supplier_Offer_No;
$OtherReferences=$Req->Other_Reference;
$Fincap=$Req->Fincap;
$InsuranceOptions=$Req->InsuranceStatus;
$InsuranceNumber=$Req->InsuranceNumber;
$ServiceTypeOptions=$Req->POSubType;
@ -547,10 +545,7 @@ $("#PaymentMethod").select2();
if(!empty($Suplist))
{
foreach ($Suplist as $SID):
$options2[$SID->SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName;
$options2[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName ;
endforeach;
}
@ -754,9 +749,9 @@ $("#PaymentMethod").select2();
</div>
</div>
<div class="col-md-4" style="padding:0px;">
<div class="col-md-6" style="padding-right:0px;">
<div class="col-md-12" style="padding-right:0px;">
<label>Our Reference(S)</label>
<label>Our Reference(S)</label>
<div class="form-group">
<?php
@ -765,16 +760,7 @@ $("#PaymentMethod").select2();
?>
</div>
</div>
<div class="col-md-6">
<label>Fincap</label>
<div class="form-group">
<?php
$data = array('name' => 'editfincap','value' => set_value('editfincap',$Fincap),'id'=>'editfincap', 'class' => 'form-control');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
</div>
@ -4098,8 +4084,11 @@ var PaymentOtherData = '<?php echo $otherPayment; ?>';
$.each(y, function(idx, obj) {
if(obj.SupplierID === id)
{
if (obj.MSME) {
$("#SupAddress").val("MSME : " + obj.MSME + "\n" + obj.Address);
} else {
$("#SupAddress").val(obj.Address);
supPaymentTerms=obj.PaymentID;
} supPaymentTerms=obj.PaymentID;
$("#PaymentMethod").val(obj.PaymentID);
}

View File

@ -123,7 +123,7 @@ if(!empty($POMaster))
{
$SupId = $Req->SupplierID;
$SupName = $Req->SupplierName;
$Address = $Req->Address;
$Address = $Req->MSME ? "MSME : ".$Req->MSME."\n".$Req->Address :$Req->Address ;
$Pdt = new DateTime($Req->PODate);
$PODate = $Pdt->format('d-m-Y');
@ -156,7 +156,6 @@ if(!empty($POMaster))
$SupplierRef=$Req->Supplier_Reference;
$SupOfferno=$Req->Supplier_Offer_No;
$Otherref=$Req->Other_Reference;
$Fincap=$Req->Fincap;
$Otherpay=$Req->PaymentOtherDescription;
@ -389,10 +388,7 @@ if(!empty($RequistionDetails))
if(!empty($Suplist))
{
foreach ($Suplist as $SID):
$options[$SID->SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName;
$options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName ;
endforeach;
}
@ -662,16 +658,6 @@ if(!empty($RequistionDetails))
?>
</div>
</div>
<div class="col-md-6">
<label>Fincap</label>
<div class="form-group">
<?php
$data = array('name' => 'amendfincap','value' => set_value('amendfincap',$Fincap),'id'=>'amendfincap', 'class' => 'form-control');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
</div>
@ -2145,7 +2131,11 @@ $('#drpSupplier').change(function() {
$.each(y, function(idx, obj) {
if(obj.SupplierID === id)
{
$("#SupAddress").val(obj.Address);
if (obj.MSME) {
$("#SupAddress").val("MSME : " + obj.MSME + "\n" + obj.Address);
} else {
$("#SupAddress").val(obj.Address);
}
PaymentID = obj.PaymentID;
//$("#PayableAT").val(obj.PayableAT);
var a=obj.PaymentDays;

View File

@ -61,7 +61,6 @@ foreach ($PaymentTerms as $TER)
$supplierref='';
$suppofferno='';
$otherref='';
$fincap='';
$revenuesubtype='';
$insurencestatus='';
$insurenceno='';
@ -78,7 +77,7 @@ if(!empty($POMaster))
{
$SupId = $Req->SupplierID;
$SupName = $Req->SupplierName;
$Address = $Req->Address;
$Address = $Req->MSME ? "MSME : ".$Req->MSME."\n".$Req->Address :$Req->Address ;
$Pdt = new DateTime($Req->PODate);
$PODate = $Pdt->format('d-m-Y');
@ -100,7 +99,6 @@ if(!empty($POMaster))
$supplierref = $Req->Supplier_Reference;
$suppofferno = $Req->Supplier_Offer_No;
$otherref = $Req->Other_Reference;
$fincap = $Req->Fincap;
$revenuesubtype = $Req->POSubType;
$insurencestatus = $Req->InsuranceStatus;
$insurenceno = $Req->InsuranceNumber;
@ -289,7 +287,32 @@ $(function() {
maxDate : 'now',
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
}); */
$('#drpSupplier').change(function() {
var cd = $("#drpSupplier option:selected").text();
//alert(cd);
$("#changeSup").val(cd);
var id = $('#drpSupplier').val();
$("#SupAddress").val('');
if (id != '0') {
var y = <?php echo json_encode($Suplist, JSON_PRETTY_PRINT) ?>;
$.each(y, function(idx, obj) {
if (obj.SupplierID === id) {
if (obj.MSME) {
$("#SupAddress").val("MSME : " + obj.MSME + "\n" + obj.Address);
} else {
$("#SupAddress").val(obj.Address);
}
}
});
} else {
alert('Please select the SupplierID');
return false;
}
});
$('#EditDiscountType').change(function() {
selValue = $("#EditDiscountType").val();
@ -1031,10 +1054,7 @@ function calculateEditTaxValue()
if(!empty($Suplist))
{
foreach ($Suplist as $SID):
$options[$SID->SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName;
$options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName ;
endforeach;
}
@ -1192,16 +1212,7 @@ function calculateEditTaxValue()
?>
</div>
</div>
<div class="col-md-6">
<label>Fincap</label>
<div class="form-group">
<?php
$data = array('name' => 'amendfincap','value' => set_value('amendfincap',$fincap),'id'=>'amendfincap', 'class' => 'form-control','readonly' => 'readonly');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
</div>

View File

@ -11,7 +11,6 @@ $modeofshipment = '';
$supplierref = '';
$suppofferno = '';
$otherref = '';
$fincap = '';
$revenuesubtype = '';
$insurencestatus = '';
$insurenceno = '';
@ -66,7 +65,7 @@ if (!empty($POMaster)) {
foreach ($POMaster as $Req) {
$SupId = $Req->SupplierID;
$SupName = $Req->SupplierName;
$Address = $Req->Address;
$Address = $Req->MSME ? "MSME : ".$Req->MSME."\n".$Req->Address :$Req->Address ;
$Pdt = new DateTime($Req->PODate);
$PODate = $Pdt->format('d-m-Y');
@ -96,7 +95,6 @@ if (!empty($POMaster)) {
$supplierref = $Req->Supplier_Reference;
$suppofferno = $Req->Supplier_Offer_No;
$otherref = $Req->Other_Reference;
$fincap = $Req->Fincap;
$revenuesubtype = $Req->POSubType;
$insurencestatus = (int)$Req->InsuranceStatus;
$insurenceno = $Req->InsuranceNumber;
@ -343,7 +341,11 @@ if (!empty($getlogpodtl)) {
$.each(y, function(idx, obj) {
if (obj.SupplierID === id) {
$("#SupAddress").val(obj.Address);
if (obj.MSME) {
$("#SupAddress").val("MSME : " + obj.MSME + "\n" + obj.Address);
} else {
$("#SupAddress").val(obj.Address);
}
PaymentID = obj.PaymentID;
@ -1884,9 +1886,7 @@ if (!empty($getlogpodtl)) {
if (!empty($Suplist)) {
foreach ($Suplist as $SID) :
$options[$SID->SupplierID] = $SID->SupplierID . ' ' . ' - ' . ' ' . $SID->SupplierName;
$options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName ;
endforeach;
}
@ -2015,7 +2015,7 @@ if (!empty($getlogpodtl)) {
</div>
</div>
<div class="col-md-4" style="padding:0px;">
<div class="col-md-6" style="padding-right: 0px;">
<div class="col-md-12" style="padding-right: 0px;">
<label>Our Reference(S)</label>
<div class="form-group">
@ -2026,16 +2026,6 @@ if (!empty($getlogpodtl)) {
?>
</div>
</div>
<div class="col-md-6">
<label>Fincap</label>
<div class="form-group">
<?php
$data = array('name' => 'editfincap', 'value' => set_value('editfincap', $fincap), 'id' => 'editfincap', 'class' => 'form-control');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
</div>

View File

@ -33,7 +33,6 @@ $ModeOfShipment = '';
$SupplierReference = '';
$SuppliersOfferNo = '';
$OtherReferences = '';
$Fincap = '';
$InsuranceOptions = '';
$InsuranceNumber = '';
$ServiceTypeOptions = '';
@ -59,7 +58,7 @@ if (!empty($POMaster)) {
$SupId = $Req->SupplierID;
$SupName = $Req->SupplierName;
$Address = $Req->Address;
$Address = $Req->MSME ? "MSME : ".$Req->MSME."\n".$Req->Address :$Req->Address ;
$pdt = new DateTime($Req->PODate);
$PODate = $pdt->format('d-m-Y');
$DeliverOption = $Req->DeliveryOption;
@ -81,7 +80,6 @@ if (!empty($POMaster)) {
$SupplierReference = $Req->Supplier_Reference;
$SuppliersOfferNo = $Req->Supplier_Offer_No;
$OtherReferences = $Req->Other_Reference;
$Fincap = $Req->Fincap;
$InsuranceOptions = $Req->InsuranceStatus;
$InsuranceNumber = $Req->InsuranceNumber;
$ServiceTypeOptions = $Req->POSubType;
@ -180,7 +178,6 @@ foreach ($PaymentTerms as $TER) {
$('#amendsupplierreference').attr("style", "pointer-events: none;");
$('#amendsupplierofferno').attr("style", "pointer-events: none;");
$('#amendotherreference').attr("style", "pointer-events: none;");
$('#amendfincap').attr("style", "pointer-events: none;");
$('#PoTypeOptions').attr("style", "pointer-events: none;");
$('#InsuranceNumber').attr("style", "pointer-events: none;");
@ -254,8 +251,11 @@ foreach ($PaymentTerms as $TER) {
$.each(y, function(idx, obj) {
if (obj.SupplierID === id) {
$("#SupAddress").val(obj.Address);
$("#PaymentTerms").val(obj.PaymentID);
if (obj.MSME) {
$("#SupAddress").val("MSME :" + obj.MSME + "\n" + obj.Address);
} else {
$("#SupAddress").val(obj.Address);
} $("#PaymentTerms").val(obj.PaymentID);
@ -699,10 +699,7 @@ foreach ($PaymentTerms as $TER) {
if (!empty($Suplist)) {
foreach ($Suplist as $SID) :
$options[$SID->SupplierID] = $SID->SupplierID . ' ' . ' - ' . ' ' . $SID->SupplierName;
$options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName ;
endforeach;
}
@ -862,7 +859,7 @@ foreach ($PaymentTerms as $TER) {
</div>
</div>
<div class="col-md-4" style="padding:0px;">
<div class="col-md-6" style="padding:0px;">
<div class="col-md-12" style="padding:0px;">
<label>Our Reference(S)</label>
<div class="form-group">
@ -873,16 +870,6 @@ foreach ($PaymentTerms as $TER) {
?>
</div>
</div>
<div class="col-md-6">
<label>Fincap</label>
<div class="form-group">
<?php
$data = array('name' => 'amendfincap', 'value' => set_value('amendfincap', $Fincap), 'id' => 'amendfincap', 'class' => 'form-control');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
</div>
@ -1325,10 +1312,9 @@ foreach ($PaymentTerms as $TER) {
</div>
</div>
<div class="col-md-12" style="padding: 0px 30px 10px 30px;">
<label>Service Description<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</label> <?php
$data = array('name' => 'EdittxtSpcialInstruction', 'value' => set_value('EdittxtSpcialInstruction', $ServiceMaterialDescription), 'id' => 'EdittxtSpcialInstruction', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
echo form_textarea($data);
?> <input type="hidden" name="beforeEdittxtSpcialInstruction" id="beforeSpcialInstruction" value="<?php echo $ServiceMaterialDescription; ?>">
<label>Service Description </label> <?php $data = array('name' => 'EdittxtSpcialInstruction', 'value' => set_value('EdittxtSpcialInstruction', $ServiceMaterialDescription), 'id' => 'EdittxtSpcialInstruction', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
echo form_textarea($data);
?> <input type="hidden" name="beforeEdittxtSpcialInstruction" id="beforeSpcialInstruction" value="<?php echo $ServiceMaterialDescription; ?>">
</div>
<br />
@ -2136,11 +2122,7 @@ foreach ($PaymentTerms as $TER) {
else if (ExceedBudget($('#txtEditBasicValue').val(), $('#EditAvlBudAmt').val()) == false) {
$('#EditRate').focus();
return false;
} else if ($('#EdittxtSpcialInstruction').val() == '') {
alert('Please Enter the Service Description');
$('#EdittxtSpcialInstruction').focus();
return false;
} else {
} else {
return true;
}

View File

@ -280,7 +280,7 @@ if (!empty($supplier)) {
</div>
<div class="col-md-3">
<span for="SupplierName">Supplier Name</span><span class="badge">*</span>
<input type="text" name="SupplierName" onkeypress="return onlyAlphabets(event);" 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; ?>">
</div>
<div class="col-md-2">
@ -505,80 +505,6 @@ if (!empty($supplier)) {
}
//Call to ajax existing PAN
$('#panno').change(function() {
var id = $('#panno').val();
if (id != '') {
$.ajax({
data: {id: id},
type: "POST",
url: "<?= base_url() . 'supplierPANExist' ?>",
success: function(data) {
if(data){
var answer = confirm(data + " supplier details already exist in the database. Do you want to change the supplier details?");
if (answer)
{
$('#panno').val('');
$('#panno').focus();
return false;
}
else
{
alert('Please edit the supplier details in the Edit screen and change the supplier status to Active');
window.location = 'supplierlisting';
}
}
},
error: function() {
// alert("error");
console.log("an error occur supplierPANExist")
}
});
} else {
alert('Please enter the PAN Number');
$('#panno').focus();
return false;
}
});
$('#GSTNo').change(function() {
var id = $('#GSTNo').val();
if (id != '') {
$.ajax({
type: "POST",
url: "<?= base_url() . 'supplierGSTExist' ?>",
data: { id: id },
success: function(data) {
if (data) {
var answer = confirm(data + " " + " supplier details is already exists in the database.Do you want to change the SUPPLIER details?")
if (answer) {
$('#GSTNo').val('');
$('#GSTNo').focus();
return false;
} else {
alert('Please edit the supplier details in the Edit screen and change the supplier status to Active');
window.location = '<?= site_url('supplierlisting') ?>'; // Use site_url() to generate the correct URL for redirection
}
}
},
error: function() {
alert('Error occurred while checking GST number.');
$('#GSTNo').val(''); // Clear GSTNo field
$('#GSTNo').focus(); // Focus on GSTNo field
}
});
} else {
alert('Please enter the GST Number');
$('#GSTNo').focus();
return false;
}
});
$('#supplierName').change(function() {
var suppliername = $('#supplierName').val();
var supplier = suppliername.replace(/ /g, '');

View File

@ -120,7 +120,6 @@ $Shipmentmode='';
$SupplierRef='';
$SupOfferno='';
$Otherref='';
$Fincap='';
$BudgetType = '';
if(!empty($POMaster))
@ -129,7 +128,7 @@ if(!empty($POMaster))
{
$SupId = $Req->SupplierID;
$SupName = $Req->SupplierName;
$Address = $Req->Address;
$Address = $Req->MSME ? "MSME : ".$Req->MSME."\n".$Req->Address :$Req->Address ;
$Pdt = new DateTime($Req->PODate);
$PODate = $Pdt->format('d-m-Y');
@ -164,7 +163,6 @@ if(!empty($POMaster))
$SupplierRef=$Req->Supplier_Reference;
$SupOfferno=$Req->Supplier_Offer_No;
$Otherref=$Req->Other_Reference;
$Fincap=$Req->Fincap;
$Insurance=$Req->InsuranceStatus;
$InsuranceNumber=$Req->InsuranceNumber;
@ -475,10 +473,7 @@ else
if(!empty($Suplist))
{
foreach ($Suplist as $SID):
$options[$SID->SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName;
$options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName ;
endforeach;
}
@ -696,7 +691,7 @@ else
</div>
</div>
<div class="col-md-4" style="padding:0px;">
<div class="col-md-6" style="padding-right:0px;">
<div class="col-md-12" style="padding-right:0px;">
<label>Our Reference(S)</label>
<div class="form-group">
@ -707,16 +702,6 @@ else
?>
</div>
</div>
<div class="col-md-6">
<label>Fincap</label>
<div class="form-group">
<?php
$data = array('name' => 'editfincap','value' => set_value('editfincap',$Fincap),'id'=>'editfincap', 'class' => 'form-control');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
</div>
@ -3457,7 +3442,11 @@ $('#drpSupplier').change(function() {
$.each(y, function(idx, obj) {
if(obj.SupplierID === id)
{
$("#SupAddress").val(obj.Address);
if (obj.MSME) {
$("#SupAddress").val("MSME : " + obj.MSME + "\n" + obj.Address);
} else {
$("#SupAddress").val(obj.Address);
}
PaymentID = obj.PaymentID;
$("#PayableAT").val(obj.PayableAT);
var a=obj.PaymentDays;

View File

@ -239,7 +239,7 @@ if (!empty($ReqPOType)) {
</center>
</div>
<div align="left">
<div class="col-md-6">
<div class="col-md-12" style="padding: 20px;">
<label>Material Code</label>
<div>
<?php
@ -254,41 +254,44 @@ if (!empty($ReqPOType)) {
?>
</div>
</div>
<div class="col-md-6">
<label>Description</label>
<div class="form-group">
<?php
$data = array('name' => 'Description', 'value' => set_value('Description'), 'id' => 'Description', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-6" id="otherDescription" style="display:none;">
<label>Other Description</label>
<div class="form-group">
<?php
$data = array('name' => 'otherD', 'value' => set_value('otherD'), 'id' => 'otherD', 'class' => 'form-control', 'rows' => '5', 'cols' => '70', 'maxlength' => '500');
echo Form_textarea($data);
?>
</div>
</div>
<div class="col-md-6">
<label>UOM</label>
<div>
<?php
$data = array('name' => 'UOM', 'value' => set_value('UOM'), 'id' => 'UOM', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
<div class="col-md-12" style="padding: 5px;">
<div class="col-md-4">
<label>Description</label>
<div class="form-group">
<?php
$data = array('name' => 'Description', 'value' => set_value('Description'), 'id' => 'Description', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-6">
<label>Quantity</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event)', 'maxlength' => '20' , 'min' => '1');
echo form_input($data);
?>
<div class="col-md-4" id="otherDescription" style="display:none;">
<label>Other Description</label>
<div class="form-group">
<?php
$data = array('name' => 'otherD', 'value' => set_value('otherD'), 'id' => 'otherD', 'class' => 'form-control', 'rows' => '5', 'cols' => '70', 'maxlength' => '500');
echo Form_textarea($data);
?>
</div>
</div>
<div class="col-md-4">
<label>UOM</label>
<div>
<?php
$data = array('name' => 'UOM', 'value' => set_value('UOM'), 'id' => 'UOM', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-4">
<label>Quantity</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event)', 'maxlength' => '20' , 'min' => '1');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
@ -314,7 +317,7 @@ if (!empty($ReqPOType)) {
</div>
<div align="left">
<div class="col-md-6">
<div class="col-md-12" style="padding: 20px;">
<label>Material Code</label>
<div>
<?php
@ -324,55 +327,53 @@ if (!empty($ReqPOType)) {
</div>
</div>
<div class="col-md-6">
<label>Description</label>
<div class="form-group">
<?php
$data = array('name' => 'EditDescription', 'value' => set_value('EditDescription'), 'id' => 'EditDescription', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
<div class="col-md-12" style="padding: 5px;">
<div class="col-md-4">
<label>Description</label>
<div class="form-group">
<?php
$data = array('name' => 'EditDescription', 'value' => set_value('EditDescription'), 'id' => 'EditDescription', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-4" id="EditotherDescription">
<label>Other Description</label>
<div class="form-group">
<?php
// $data = array('name' => 'EditotherD','value' => set_value('EditotherD'),'id'=>'EditotherD', 'class' => 'form-control','readonly'=>'true' );
// echo form_input($data);
$data = array('name' => 'EditotherD', 'value' => set_value('EditotherD'), 'id' => 'EditotherD', 'class' => 'form-control', 'rows' => '5', 'cols' => '70', 'maxlength' => '500');
echo Form_textarea($data);
?>
</div>
</div>
<div class="col-md-4">
<label>UOM</label>
<div>
<?php
$data = array('name' => 'EditUOM', 'value' => set_value('EditUOM'), 'id' => 'EditUOM', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-4">
<label>Quantity</label>
<div class="form-group">
<?php
$data = array('name' => 'EditQuantity', 'value' => set_value('EditQuantity'), 'id' => 'EditQuantity', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event)', 'maxlength' => '20' , 'min' => '1');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-6" id="EditotherDescription">
<label>Other Description</label>
<div class="form-group">
<?php
// $data = array('name' => 'EditotherD','value' => set_value('EditotherD'),'id'=>'EditotherD', 'class' => 'form-control','readonly'=>'true' );
// echo form_input($data);
$data = array('name' => 'EditotherD', 'value' => set_value('EditotherD'), 'id' => 'EditotherD', 'class' => 'form-control', 'rows' => '5', 'cols' => '70', 'maxlength' => '500');
echo Form_textarea($data);
?>
</div>
</div>
<div class="col-md-6">
<label>UOM</label>
<div>
<?php
$data = array('name' => 'EditUOM', 'value' => set_value('EditUOM'), 'id' => 'EditUOM', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-6">
<label>Quantity</label>
<div class="form-group">
<?php
$data = array('name' => 'EditQuantity', 'value' => set_value('EditQuantity'), 'id' => 'EditQuantity', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event)', 'maxlength' => '20' , 'min' => '1');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="modal-footer">

View File

@ -309,10 +309,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
//print_r( $options);
if (!empty($Suplist)) {
foreach ($Suplist as $SID) :
$options[$SID->SupplierID] = $SID->SupplierID . ' ' . ' - ' . ' ' . $SID->SupplierName;
$options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName ;
endforeach;
}
@ -506,7 +503,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
</div>
</div>
<div class="col-md-4" style="padding:0px;">
<div class="col-md-6" style="padding-right:0px;">
<div class="col-md-12" style="padding-right:0px;">
<label>Our Reference(S)</label>
<div class="form-group">
@ -517,16 +514,6 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
?>
</div>
</div>
<div class="col-md-6">
<label>Fincap</label>
<div class="form-group">
<?php
$data = array('name' => 'addfincap', 'value' => set_value('addfincap'), 'id' => 'addfincap', 'class' => 'form-control');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
</div>
@ -2185,8 +2172,12 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
$.each(y, function(idx, obj) {
if (obj.SupplierID === id) {
$("#SupAddress").val(obj.Address);
PaymentID = obj.PaymentID;
if (obj.MSME) {
$("#SupAddress").val("MSME : " + obj.MSME + "\n" + obj.Address);
} else {
$("#SupAddress").val(obj.Address);
}
PaymentID = obj.PaymentID;
//PaymentID = obj.PaymentID;
$('#PaymentTerms').val(obj.PaymentTerms);
}

View File

@ -102,7 +102,6 @@
$supplierPAN=$PO->PAN;
$SupplierContact=$PO->ContactNumber;
$supplierGST=$PO->GSTNO;
$finCap=$PO->Fincap;
$ModeOfShipment=$PO->Mode_Of_Shipment;
$Supplier_Reference=$PO->Supplier_Reference;

View File

@ -25,7 +25,6 @@ $totaltaxamount = 0.00;
$PaymentOtherDescription = '';
$NoOfServices = 0;
$advance = 0;
$finCap = '-';
$modShp = '';
$insNo = '';
$insNo = '';
@ -106,7 +105,6 @@ if (!empty($POItem)) {
}
$advance = $PO->AdvanceAmount;
$finCap = ($PO->Fincap == '') ? '-' : $PO->Fincap;
$modShp = $PO->Mode_Of_Shipment;
if ($PO->InsuranceNumber == '') {
$insNo = 'No';
@ -304,21 +302,6 @@ if (!empty($POItem)) {
</tbody>
</table>
</td>
<td style="width: 70px; border-left: 1px solid black;">
<table style="border: none; width: 100%;">
<thead style="width: 70px;">
<tr style="background-color: #d2d2d2;">
<th style="border: none;">Fin cap </th>
</tr>
</thead>
<tbody style="text-align: center;border: none;">
<tr>
<td style="border: none;text-align: center;"><?php echo $finCap; ?></td>
</tr>
</tbody>
</table>
</td>
</tr>
<?php }
} ?>

View File

@ -75,191 +75,162 @@
</section>
<section class="content" style="margin: 15px;"><br/>
<div style="border:2px solid #333;">
<form action ="<?php echo base_url()?>SaveIGR"
method="post" enctype="multipart/form-data">
<div class="row"><br/><br/>
<div id="content" > </div>
<div class="col-md-12">
<div class="col-md-6">
<div style="display: flex; justify-content: space-between; align-items: center;">
<label>Select Purchase Order No <span style="color:red; font-size: 15px;">*</span></label>
<a id="printLink" data-toggle="tooltip" href="" target="new" style="text-align: right;">
<i class="fa fa-print" data-toggle="tooltip" title="Click here to Print the Purchase Order details"></i>
</a>
</div>
<?php
$options = array("-1"=>'Purchase Order No');
if(!empty($PO_NO)){
//print_r($PO_NO);
foreach ($PO_NO as $SI):
$options[$SI->PONO] = $SI->PONO .'-'. $SI->SupplierName ;
$PONO = $SI->PONO;
endforeach;
}
echo form_dropdown('PONO', $options,set_value('PONO'),'id="PONO"' ,'class="form-control select2"' , 'required="true"');
?>
<span class="help-block"></span>
</div>
<input type="hidden" name="hiddenIsOpenOrder" id="hiddenIsOpenOrder"/>
<div class="col-md-6">
<label>Supplier Name </label>
<div class="form-group">
<?php
$data = array('name' => 'SupplierName','value' => set_value('SupplierName'),'id'=>'Sup', 'class' => 'form-control' ,'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12" style="margin: 10px 0;">
<div class="col-md-4">
<label>Invoice Number <span style="color:red; font-size: 15px;">*</span><!-- Delivery Challan/Inv No --></label>
<?php
$data = array('name' => 'InvoiceNo','value' => set_value('InvoiceNo'),'id'=>'InvoiceNo', 'class' => 'form-control', 'required=>"true"' ); // ,'onkeypress'=>'return isNumberKey(event);' );
echo form_input($data);
?>
</div>
<div class="col-md-4">
<label>Invoice Date <span style="color:red; font-size: 15px;">*</span><!-- Delivery Challan/Inv Date --></label>
<?php
$data = array('name' => 'InvoiceDate','value' => set_value('InvoiceDate'),'id'=>'InvoiceDate', 'class' => 'form-control num', 'required'=>'true' );
echo form_input($data);
?>
</div>
<div class="col-md-4">
<label>Material Received Date <span style="color:red; font-size: 15px;">*</span></label>
<?php
$data = array('name' => 'MaterialRcvdDate','value' => set_value('MaterialRcvdDate'),'id'=>'MaterialRcvdDate', 'class' => 'form-control num', 'required'=>'true' );
echo form_input($data);
?>
</div>
</div>
<div class="col-md-12" style="margin: 10px 0;">
<div class="col-md-4">
<label>Vechicle Number</label>
<?php
$data = array('name' => 'VehicleNo','value' => set_value('VehicleNo'), 'id'=>'VehicleNo', 'class' => 'form-control', 'maxlength' => '20' );
echo form_input($data);
?>
<!-- <span pattern="" required="true"></span> -->
</div>
<div class="col-md-4">
<label>Driver Name</label>
<?php
$data = array('name' => 'DriverName','value' => set_value('DriverName'), 'id'=>'DriverName', 'class' => 'form-control', 'maxlength' => '50' );
echo form_input($data);
?>
</div>
<div class="col-md-4">
<label>Driver Mobile Number</label>
<?php
$data = array('name' => 'DriverMobileNumber','value' => set_value('DriverMobileNumber'), 'id'=>'DriverMobileNumber', 'class' => 'form-control', 'maxlength' => '50' );
echo form_input($data);
?>
</div>
<!-- <div class="col-md-3">
<label>Courier No</label>
<?php
// $data = array('name' => 'CourierNo','value' => set_value('CourierNo'),'id'=>'CourierNo', 'class' => 'form-control','onkeypress'=>'return isNumberKey(event);' );
// echo form_input($data);
?>
</div> -->
</div>
<!-- <div class="col-md-12">
<div class="col-md-offset-4">
<div class="box-header">
<input type="file" accept=".png,.jpg,.pdf" id="myfile" name="myfile" />
<label for="photo">Select File to upload<br/></label>
</div>
</div>
</div> -->
<div style="border:2px solid #333;">
</div>
<div class="col-md-12" style="margin-top: 10px;">
<!-- <input type="button" class="btn btn-primary" id ="addemorebutton" value=" + ADD FILES.."> -->
<!-- <div id="newsdiv"></div>this div for add more section -->
<input type="hidden" name="hidecounters" id="hidecounters" value="0" />
<input type="hidden" name="hideconstants" id="hideconstants" value="0" />
<input type="hidden" name="hideIGRStatus" id="hideIGRStatus" value="0" />
</div>
<div class="row">
<div class="col-md-12">
<table id="Inwardgateregistertable" class="table table-bordered table-hover editabletable IGR_Line" style="background-color:#fff;font-size:12px;">
<thead style="background-color:#ddf">
<tr>
<th>#</th>
<th>Item Code</th>
<th>Material</th>
<th>UOM</th>
<th>Ordered Quantity</th>
<th>Received Quantity</th>
<th>Balance Quantity</th>
<th>Invoice Quantity</th>
<th>Remarks</th>
<th> </th>
</tr>
</thead>
<tbody id ="IGRappend">
</tbody>
</table>
<input type="hidden" name="txtRowCount" id="txtRowCount" />
<!--<input type="text" id="tablevalues" value="sample" name="tablevalues"/>
<div class="col-md-12">-->
<!--<table id="specialtable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;" >-->
<!--<thead style="background-color:#ddf">
<tr>
<th>MaterialCode1</th>
<th>DeliveryChallanDate</th>
<th>DeliveryChallanNo</th>
<th>VehicleNo</th>
<th>CourierNo</th>
<th>Quantity12</th>
<th>File</th>
</tr>
</thead>-->
<!-- <div class="col-md-1 col-md-offset-10">
<button class="btn btn-primary" id='IGRLink' type="submit" name='IGRLink' onclick="filecheck();">Generate IGR</button>
</div> -->
<div class="col-md-4 col-md-offset-8">
<input type="file" name="browseFiles1" id="images1" onchange="Copyfilenames(this.name); "><br>
<button class="btn btn-success" id='IGRDraftLink' type="submit" name='IGRDraftLink' onclick="filecheck(0);">Draft IGR</button>
<button class="btn btn-success" id='IGRLink' type="submit" name='IGRLink' onclick="filecheck(1);">Generate IGR</button>
<form action ="<?php echo base_url()?>SaveIGR"
method="post" enctype="multipart/form-data">
<div class="row"><br/><br/>
<div id="content" > </div>
<div class="col-md-12">
<div class="col-md-6">
<div style="display: flex; justify-content: space-between; align-items: center;">
<label>Select Purchase Order No <span style="color:red; font-size: 15px;">*</span></label>
<a id="printLink" data-toggle="tooltip" href="" target="new" style="text-align: right;">
<i class="fa fa-print" data-toggle="tooltip" title="Click here to Print the Purchase Order details"></i>
</a>
</div>
<?php
$options = array("-1"=>'Purchase Order No');
if(!empty($PO_NO)){
//print_r($PO_NO);
foreach ($PO_NO as $SI):
$options[$SI->PONO] = $SI->PONO .'-'. $SI->SupplierName ;
$PONO = $SI->PONO;
endforeach;
}
echo form_dropdown('PONO', $options,set_value('PONO'),'id="PONO"' ,'class="form-control select2"' , 'required="true"');
?>
<span class="help-block"></span>
</div>
<input type="hidden" name="hiddenIsOpenOrder" id="hiddenIsOpenOrder"/>
<div class="col-md-6">
<label>Supplier Name </label>
<div class="form-group">
<?php
$data = array('name' => 'SupplierName','value' => set_value('SupplierName'),'id'=>'Sup', 'class' => 'form-control' ,'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-12" style="margin: 10px 0;">
<div class="col-md-4">
<label>Invoice Number <span style="color:red; font-size: 15px;">*</span><!-- Delivery Challan/Inv No --></label>
<?php
$data = array('name' => 'InvoiceNo','value' => set_value('InvoiceNo'),'id'=>'InvoiceNo', 'class' => 'form-control', 'required=>"true"' ); // ,'onkeypress'=>'return isNumberKey(event);' );
echo form_input($data);
?>
</div>
<div class="col-md-4">
<label>Invoice Date <span style="color:red; font-size: 15px;">*</span><!-- Delivery Challan/Inv Date --></label>
<?php
$data = array('name' => 'InvoiceDate','value' => set_value('InvoiceDate'),'id'=>'InvoiceDate', 'class' => 'form-control num', 'required'=>'true' );
echo form_input($data);
?>
</div>
<div class="col-md-4">
<label>Material Received Date <span style="color:red; font-size: 15px;">*</span></label>
<?php
$data = array('name' => 'MaterialRcvdDate','value' => set_value('MaterialRcvdDate'),'id'=>'MaterialRcvdDate', 'class' => 'form-control num', 'required'=>'true' );
echo form_input($data);
?>
</div>
</div>
<div class="col-md-12" style="margin: 10px 0;">
<div class="col-md-4">
<label>Vechicle Number</label>
<?php
$data = array('name' => 'VehicleNo','value' => set_value('VehicleNo'), 'id'=>'VehicleNo', 'class' => 'form-control', 'maxlength' => '20' );
echo form_input($data);
?>
<!-- <span pattern="" required="true"></span> -->
</div>
<div class="col-md-4">
<label>Driver Name</label>
<?php
$data = array('name' => 'DriverName','value' => set_value('DriverName'), 'id'=>'DriverName', 'class' => 'form-control', 'maxlength' => '50' );
echo form_input($data);
?>
</div>
<div class="col-md-4">
<label>Driver Mobile Number</label>
<?php
$data = array('name' => 'DriverMobileNumber','value' => set_value('DriverMobileNumber'), 'id'=>'DriverMobileNumber', 'class' => 'form-control', 'maxlength' => '50' );
echo form_input($data);
?>
</div>
<!-- <div class="col-md-3">
<label>Courier No</label>
<?php
// $data = array('name' => 'CourierNo','value' => set_value('CourierNo'),'id'=>'CourierNo', 'class' => 'form-control','onkeypress'=>'return isNumberKey(event);' );
// echo form_input($data);
?>
</div> -->
</div>
<!-- <div class="col-md-12">
<div class="col-md-offset-4">
<div class="box-header">
<input type="file" accept=".png,.jpg,.pdf" id="myfile" name="myfile" />
<label for="photo">Select File to upload<br/></label>
</div>
</div>
</div> -->
</div>
<div class="col-md-12" style="margin-top: 10px;">
<!-- <input type="button" class="btn btn-primary" id ="addemorebutton" value=" + ADD FILES.."> -->
<!-- <div id="newsdiv"></div>this div for add more section -->
<input type="hidden" name="hidecounters" id="hidecounters" value="0" />
<input type="hidden" name="hideconstants" id="hideconstants" value="0" />
<input type="hidden" name="hideIGRStatus" id="hideIGRStatus" value="0" />
</div>
<div class="row">
<div class="col-md-12">
<table id="Inwardgateregistertable" class="table table-bordered table-hover editabletable IGR_Line" style="background-color:#fff;font-size:12px;">
<thead style="background-color:#ddf">
<tr>
<th>#</th>
<th>Item Code</th>
<th>Material</th>
<th>UOM</th>
<th>Ordered Quantity</th>
<th>Received Quantity</th>
<th>Balance Quantity</th>
<th>Invoice Quantity</th>
<th>Remarks</th>
<th> </th>
</tr>
</thead>
<tbody id ="IGRappend">
</tbody>
</table>
<input type="hidden" name="txtRowCount" id="txtRowCount" />
<div class="col-md-4 col-md-offset-8">
<input type="file" name="browseFiles1" id="images1" onchange="Copyfilenames(this.name); "><br>
<button class="btn btn-success" id='IGRDraftLink' type="submit" name='IGRDraftLink' onclick="filecheck(0);">Draft IGR</button>
<button class="btn btn-success" id='IGRLink' type="submit" name='IGRLink' onclick="filecheck(1);">Generate IGR</button>
</div>
</div>
</div>
</form>
<!-- form closed-->
<div class="modal fade" id="generateIGR" role="dialog">
<div class="modal-dialog modal_style">
<!-- Modal content-->
@ -285,89 +256,91 @@
</form><!-- form closed-->
</div><!-- modal content closed-->
</div><!-- modal fade closed-->
<!-- new modal ended-->
<!-- generateIGR modal ended-->
<div class="modal fade" id="WeightCalculator" role="dialog">
<div class="modal-dialog modal_style">
<!-- Modal content-->
<div class="modal-content">
<div class="modal fade" id="WeightCalculator" role="dialog">
<div class="modal-dialog modal_style">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<center><h4>Weight Calculator</h4><div id="WeightTitle"></div></center>
<div class="pull-right hidden-xs">
<b><div id="clock"></div></b>
</div>
</div>
<div class="col-md-12"> <br/>
<!-- <center><label style="font-size:40px;">Default</label> </center> -->
<!-- <div class="container"> -->
<div class="form-group row">
<label for="GrossWeight" class="col-md-2 col-form-label">Gross Weight</label>
<div class="col-md-5">
<?php
$data = array('name' => 'GrossWeight', 'value' => set_value('GrossWeight'), 'id' => 'GrossWeight', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event);', 'maxlength' => '50', 'onchange' => 'WeightDiffer(this);' , 'placeholder' => 'Gross Weight Value (A)');
echo form_input($data);
?>
</div>
<div class="col-md-5">
<?php
$data = array('name' => 'GrossWeightDate', 'value' => set_value('GrossWeightDate'), 'id' => 'GrossWeightDate', 'class' => 'form-control', 'readonly' => true , 'placeholder' => 'Gross Weight Date/Timing');
echo form_input($data);
?>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<center><h4>Weight Calculator</h4><div id="WeightTitle"></div></center>
<div class="pull-right hidden-xs">
<b><div id="clock"></div></b>
</div>
</div>
<div class="col-md-12"> <br/>
<!-- <center><label style="font-size:40px;">Default</label> </center> -->
<!-- <div class="container"> -->
<div class="form-group row">
<label for="GrossWeight" class="col-md-2 col-form-label">Gross Weight</label>
<div class="col-md-5">
<?php
$data = array('name' => 'GrossWeight', 'value' => set_value('GrossWeight'), 'id' => 'GrossWeight', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event);', 'maxlength' => '50', 'onchange' => 'WeightDiffer(this);' , 'placeholder' => 'Gross Weight Value (A)');
echo form_input($data);
?>
</div>
<div class="col-md-5">
<?php
$data = array('name' => 'GrossWeightDate', 'value' => set_value('GrossWeightDate'), 'id' => 'GrossWeightDate', 'class' => 'form-control', 'readonly' => true , 'placeholder' => 'Gross Weight Date/Timing');
echo form_input($data);
?>
</div>
</div>
<div class="form-group row">
<label for="TareWeight" class="col-md-2 col-form-label">Tare Weight</label>
<div class="col-md-5">
<?php
$data = array('name' => 'TareWeight', 'value' => set_value('TareWeight'), 'id' => 'TareWeight', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event);', 'maxlength' => '50', 'onchange' => 'validateTareWeight(this);' ,'placeholder' => 'Enter your username','placeholder' => 'Tare Weight Value (B)');
echo form_input($data);
?>
</div>
<div class="col-md-5">
<?php
$data = array('name' => 'TareWeightDate', 'value' => set_value('TareWeightDate'), 'id' => 'TareWeightDate', 'class' => 'form-control', 'readonly' => true , 'placeholder' => 'Tare Weight Date/Timing',);
echo form_input($data);
?>
</div>
</div>
<div class="form-group row">
<label for="NetWeight" class="col-md-2 col-form-label">Net Weight</label>
<div class="col-md-5">
<input type="hidden" id="CurrentInx" name="CurrentInx" readonly>
<?php
$data = array('name' => 'NetWeight', 'value' => set_value('NetWeight'), 'id' => 'NetWeight', 'class' => 'form-control', 'maxlength' => '50', 'readonly' => true , 'placeholder' => 'Net Weight Value (A-B)');
echo form_input($data);
?>
</div>
</div>
<!-- </div> -->
</div>
<div class="modal-footer">
<center>
<a class="btn btn-primary" onclick="modalSave()">&nbsp;&nbsp;<span class="bold">Save</span>
<a class="btn btn-primary" data-dismiss="modal" value="Close">Close</a>
</center>
</div><!-- footer div closed -->
</div><!-- modal content div closed-->
</div><!-- modal content closed-->
</div><!-- modal fade closed-->
<div class="form-group row">
<label for="TareWeight" class="col-md-2 col-form-label">Tare Weight</label>
<div class="col-md-5">
<?php
$data = array('name' => 'TareWeight', 'value' => set_value('TareWeight'), 'id' => 'TareWeight', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event);', 'maxlength' => '50', 'onchange' => 'validateTareWeight(this);' ,'placeholder' => 'Enter your username','placeholder' => 'Tare Weight Value (B)');
echo form_input($data);
?>
</div>
<div class="col-md-5">
<?php
$data = array('name' => 'TareWeightDate', 'value' => set_value('TareWeightDate'), 'id' => 'TareWeightDate', 'class' => 'form-control', 'readonly' => true , 'placeholder' => 'Tare Weight Date/Timing',);
echo form_input($data);
?>
</div>
</div>
<div class="form-group row">
<label for="NetWeight" class="col-md-2 col-form-label">Net Weight</label>
<div class="col-md-5">
<input type="hidden" id="CurrentInx" name="CurrentInx" readonly>
<?php
$data = array('name' => 'NetWeight', 'value' => set_value('NetWeight'), 'id' => 'NetWeight', 'class' => 'form-control', 'maxlength' => '50', 'readonly' => true , 'placeholder' => 'Net Weight Value (A-B)');
echo form_input($data);
?>
</div>
</div>
<!-- </div> -->
</div>
<div class="modal-footer">
<center>
<a class="btn btn-primary" onclick="modalSave()">&nbsp;&nbsp;<span class="bold">Save</span>
<a class="btn btn-primary" data-dismiss="modal" value="Close">Close</a>
</center>
</div><!-- footer div closed -->
</div><!-- modal content div closed-->
</div><!-- modal content closed-->
</div><!-- modal fade closed-->
</div>
<!-- WeightCalculator modal ended-->
</div>
</section>
</div>
</section>
</div>
@ -758,46 +731,14 @@ function isNumberKey(evt)
function Save(status)
{
// alert("save function worked "+status);
//alert("save function worked ");
// var file = $('#images'+counterConstants).val()
if (validate())
{
var file = $('#images'+counterConstants).val()
// alert($('#Inwardgateregistertable').rows.count);
//alert(" if condition validation part ");
// $('#content').loader('show');
// $.ajax({
// data:$('.IGR').serialize(),
// type:"POST",
// url:"<?php echo base_url() ?>SaveIGR",
// success:function(data) {
// if(data){
// $('#content').loader('hide');
// document.getElementById('finaligr').innerHTML=data;
// $('#generateIGR').modal('show');
// }
// else
// {
// alert("Error");
// }
//var file = $('#images'+counterConstants).val();
// }//success function closed
// });//ajax closed
//var tablevalue = $('#specialtable').tableToJSON(); // Convert the table into a javascript object
//var jsondata = JSON.stringify(tablevalue);
//$('#tablevalues').val(jsondata);
// $("#IGR").attr("method", "post");
// $("#IGR").attr("enctype", "multipart/form-data");
// $("#IGR").attr("action", "SaveIGR");
// $('#IGR').submit();
}//validate if closed
var file = $('#images'+counterConstants).val()
$("#IGR").attr("method", "post");
$("#IGR").attr("enctype", "multipart/form-data");
$("#IGR").attr("action", "SaveIGR");
$('#IGR').submit();
}//validate if closed
}//save function closed
@ -941,36 +882,16 @@ function filecheck(status)
$('#hidecounters').val(1);
$('#hideconstants').val(1);
//alert(counterConstants);
var file1 = $('#images').val();
//alert(myfile);
if(file1=='')
{
alert('File not Found');
//Save();
alert('File not Found');
}
else
{
Save(status);
}
// var sizef = document.getElementById('myfile').files[0].size;
// var myfile = $('#myfile').val();
// if(myfile!='' && sizef < 2100000)
// {
// alert('Your file added successfully');
// Save();
// }
// else
// {
// alert('Sorry Your File is Large To 2MB');
// $('#myfile').val('');
// }
// }
}
}

View File

@ -141,6 +141,7 @@
$SuplierAddress = (!empty($POItem) && !empty($POItem[0]->Address)) ? $POItem[0]->Address : "-";
$DeliveryAddress = (!empty($POItem) && !empty($POItem[0]->DeliveryAddress)) ? $POItem[0]->DeliveryAddress : "-";
$SplserviceDescription = (!empty($POItem) && !empty($POItem[0]->ServiceDescription)) ? $POItem[0]->ServiceDescription : "-";
$SplserviceDescription = ($POType == 'SERVICE') ? $POItem[0]->Description_Of_Service : $SplserviceDescription;
$supRef = (!empty($POItem) && !empty($POItem[0]->Supplier_Reference)) ? $POItem[0]->Supplier_Reference : "-";
$supOfferNo = (!empty($POItem) && !empty($POItem[0]->Supplier_Offer_No)) ? $POItem[0]->Supplier_Offer_No : "-";
$supplierEmail = (!empty($POItem) && !empty($POItem[0]->EmailAddress)) ? $POItem[0]->EmailAddress : "-";
@ -153,7 +154,6 @@
$ourRef = (!empty($POItem) && !empty($POItem[0]->Other_Reference)) ? $POItem[0]->Other_Reference : "-";
$dispatch = (!empty($POItem) && !empty($POItem[0]->Import_DispatchDetails)) ? $POItem[0]->Import_DispatchDetails : "";
$advance = (!empty($POItem) && !empty($POItem[0]->AdvanceAmount)) ? $POItem[0]->AdvanceAmount : "-";
$finCap = (!empty($POItem) && !empty($POItem[0]->Fincap)) ? $POItem[0]->Fincap : "-";
$modShp = (!empty($POItem) && !empty($POItem[0]->Mode_Of_Shipment)) ? $POItem[0]->Mode_Of_Shipment : "-";
$insNo = (!empty($POItem) && !empty($POItem[0]->InsuranceNumber)) ? $POItem[0]->InsuranceNumber : 'No';
$PaymentTerms = (!empty($POItem) && !empty($POItem[0]->PaymentTerms)) ? ($POItem[0]->PaymentTerms == 'Others' ? $POItem[0]->PaymentOtherDescription : $POItem[0]->PaymentTerms) : "";

View File

@ -257,8 +257,11 @@ if (!empty($INRSYMBOL)) {
$.each(y, function(idx, obj) {
if (obj.SupplierID === id) {
$("#SupAddress").val(obj.Address);
if (obj.MSME) {
$("#SupAddress").val("MSME : " + obj.MSME + "\n" + obj.Address);
} else {
$("#SupAddress").val(obj.Address);
}
PaymentID = obj.PaymentID;
@ -1825,11 +1828,7 @@ if (!empty($INRSYMBOL)) {
<section class="content">
<div style="border:2px solid #333">
<div id="content"></div>
<div>
<center><b>
<h2>Revenue Purchase Order</h2>
</b></center>
</div>
<div> <center><b> <h2>Revenue Purchase Order</h2> </b></center> </div>
<div class="col-md-12 text-right" style="padding-bottom:6px; padding-right:29px;">
<a href="<?php echo base_url() ?>CreatePO" class="btn btn-success" id="back" value="Back">Back</a>
</div>
@ -1840,16 +1839,14 @@ if (!empty($INRSYMBOL)) {
<div class="col-md-12" style="padding:0px;">
<label>Requistion No</label>
<?php
$options = array("0" => 'Selected Requisition Numbers');
if (!empty($ReqList)) {
foreach ($ReqList as $SID) :
$options[$SID->ReqNo] = $SID->ReqNo . "-" . $SID->ReqBy;
$ReqType = $SID->ReqType;
endforeach;
}
echo form_multiselect('RequistionNo', $options, set_value('RequistionNo', array()), 'id="RequistionNo"', 'required="true"', 'height="400px"');
$options = array("0" => 'Selected Requisition Numbers');
if (!empty($ReqList)) {
foreach ($ReqList as $SID) :
$options[$SID->ReqNo] = $SID->ReqNo . "-" . $SID->ReqBy;
$ReqType = $SID->ReqType;
endforeach;
}
echo form_multiselect('RequistionNo', $options, set_value('RequistionNo', array()), 'id="RequistionNo"', 'required="true"', 'height="400px"');
?>
</div>
<div class="col-md-12" style="padding:0px;">
@ -1872,10 +1869,7 @@ if (!empty($INRSYMBOL)) {
if (!empty($Suplist)) {
foreach ($Suplist as $SID) :
$options[$SID->SupplierID] = $SID->SupplierID . ' ' . ' - ' . ' ' . $SID->SupplierName;
$options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName ;
endforeach;
}
@ -2010,7 +2004,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-4" style="padding:0px;">
<div class="col-md-6" style="padding-right: 0px;">
<div class="col-md-12" style="padding-right: 0px;">
<label>Our Reference(S)</label>
<div class="form-group">
@ -2021,16 +2015,6 @@ if (!empty($INRSYMBOL)) {
?>
</div>
</div>
<div class="col-md-6">
<label>Fincap</label>
<div class="form-group">
<?php
$data = array('name' => 'addfincap', 'value' => set_value('addfincap'), 'id' => 'addfincap', 'class' => 'form-control');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
</div>

View File

@ -197,7 +197,7 @@ if (!empty($Emp)) {
</center>
</div>
<div align="left">
<div class="col-md-6">
<div class="col-md-12" style="padding: 20px;">
<label>Material Code</label>
<div>
<?php
@ -213,44 +213,46 @@ if (!empty($Emp)) {
?>
</div>
</div>
<div class="col-md-6">
<label>Description</label>
<div class="form-group">
<?php
$data = array('name' => 'Description', 'value' => set_value('Description'), 'id' => 'Description', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
<div class="col-md-12" style="padding: 5px;">
<div class="col-md-4">
<label>Description</label>
<div class="form-group">
<?php
$data = array('name' => 'Description', 'value' => set_value('Description'), 'id' => 'Description', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
?>
</div>
</div>
</div>
<div class="col-md-6" id="otherDescription" style="display:none;">
<label>Other Description</label>
<div class="form-group">
<?php
$data = array('name' => 'otherD', 'value' => set_value('otherD'), 'id' => 'otherD', 'class' => 'form-control', 'rows' => '5', 'cols' => '70', 'maxlength' => '500');
echo Form_textarea($data);
?>
<div class="col-md-4" id="otherDescription" style="display:none;">
<label>Other Description</label>
<div class="form-group">
<?php
$data = array('name' => 'otherD', 'value' => set_value('otherD'), 'id' => 'otherD', 'class' => 'form-control', 'rows' => '5', 'cols' => '70', 'maxlength' => '500');
echo Form_textarea($data);
?>
</div>
</div>
</div>
<div class="col-md-6">
<label>UOM</label>
<div>
<?php
$data = array('name' => 'UOM', 'value' => set_value('UOM'), 'id' => 'UOM', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
<div class="col-md-4">
<label>UOM</label>
<div>
<?php
$data = array('name' => 'UOM', 'value' => set_value('UOM'), 'id' => 'UOM', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-6">
<label>Quantity</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event)', 'min' => '1','maxlength' => '20');
echo form_input($data);
?>
<div class="col-md-4">
<label>Quantity</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event)', 'min' => '1','maxlength' => '20');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
@ -276,57 +278,53 @@ if (!empty($Emp)) {
</div>
<div align="left">
<div class="col-md-6">
<div class="col-md-12" style="padding: 20px;">
<label>Material Code</label>
<div>
<?php
$data = array('name' => 'EditMaterialCode', 'value' => set_value('EditMaterialCode'), 'id' => 'EditMaterialCode', 'class' => 'form-control', 'readonly' => 'true');
$data = array('value' => set_value('EditMaterialCode'), 'id' => 'EditMaterialCode', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-6">
<label>Description</label>
<div class="form-group">
<?php
$data = array('name' => 'EditDescription', 'value' => set_value('EditDescription'), 'id' => 'EditDescription', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
<div class="col-md-12" style="padding: 5px;">
<div class="col-md-4">
<label>Description</label>
<div class="form-group">
<?php
$data = array('name' => 'EditDescription', 'value' => set_value('EditDescription'), 'id' => 'EditDescription', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-6" id="EditotherDescription">
<label>Other Description</label>
<div class="form-group">
<?php
$data = array('name' => 'EditotherD', 'value' => set_value('EditotherD'), 'id' => 'EditotherD', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
<div class="col-md-4" id="EditotherDescription">
<label>Other Description</label>
<div class="form-group">
<?php
$data = array('name' => 'EditotherD', 'value' => set_value('EditotherD'), 'id' => 'EditotherD', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-6">
<label>UOM</label>
<div>
<?php
$data = array('name' => 'EditUOM', 'value' => set_value('EditUOM'), 'id' => 'EditUOM', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
<div class="col-md-4">
<label>UOM</label>
<div>
<?php
$data = array('name' => 'EditUOM', 'value' => set_value('EditUOM'), 'id' => 'EditUOM', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-6">
<label>Quantity</label>
<div class="form-group">
<?php
$data = array('name' => 'EditQuantity', 'value' => set_value('EditQuantity'), 'id' => 'EditQuantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event)','min' => '1', 'maxlength' => '20');
echo form_input($data);
?>
<div class="col-md-4">
<label>Quantity</label>
<div class="form-group">
<?php
$data = array('name' => 'EditQuantity', 'value' => set_value('EditQuantity'), 'id' => 'EditQuantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event)','min' => '1', 'maxlength' => '20');
echo form_input($data);
?>
</div>
</div>
</div>

View File

@ -21,7 +21,6 @@
$advance=0;
$supOfferNo='';
$supRef = '';
$finCap='';
$modeofshipment='';
$InsuranceNumber='';
$companyWebsit='';
@ -88,7 +87,6 @@
$ServiceDescription =$PO->ServiceDescription;
$supOfferNo = $PO->Supplier_Offer_No;
$supRef = $PO->Supplier_Reference;
$finCap = $PO->Fincap;
$modeofshipment = $PO->Mode_Of_Shipment;
$PaymentTerms = $PO->PaymentTerms;

View File

@ -153,8 +153,11 @@ if (!empty($INRSYMBOL)) {
$.each(y, function(idx, obj) {
if (obj.SupplierID === id) {
$("#SupAddress").val(obj.Address);
$("#SupAddress").val(obj.Address);
if (obj.MSME) {
$("#SupAddress").val("MSME : " + obj.MSME + "\n" + obj.Address);
} else {
$("#SupAddress").val(obj.Address);
}
PaymentID = obj.PaymentID;
}
@ -662,10 +665,7 @@ if (!empty($INRSYMBOL)) {
if (!empty($Suplist)) {
foreach ($Suplist as $SID) :
$options[$SID->SupplierID] = $SID->SupplierID . ' ' . ' - ' . ' ' . $SID->SupplierName;
$options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName ;
endforeach;
}
@ -811,7 +811,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-4" style="padding:0px;">
<div class="col-md-6" style="padding:0px;">
<div class="col-md-12" style="padding:0px;">
<label>Our Reference(S)</label>
<div class="form-group">
@ -822,16 +822,7 @@ if (!empty($INRSYMBOL)) {
?>
</div>
</div>
<div class="col-md-6">
<label>Fincap</label>
<div class="form-group">
<?php
$data = array('name' => 'addfincap', 'value' => set_value('addfincap'), 'id' => 'addfincap', 'class' => 'form-control');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
</div>
@ -1256,7 +1247,7 @@ if (!empty($INRSYMBOL)) {
<div class="col-md-12" style="padding: 0px 30px 10px 30px;">
<label>Service Description <span class="badge" style="color:red;text-align:right;background-color: #fff ;">*</span></label>
<label>Service Description </label>
<?php
@ -1544,7 +1535,7 @@ if (!empty($INRSYMBOL)) {
</div>
<div class="col-md-12" style="padding: 0px 30px 10px 30px;">
<label>Service Description<span class="badge" style="color:red;text-align:right;background-color: #fff ;">*</span> </label>
<label>Service Description </label>
<?php
$data = array('name' => 'EdittxtSpcialInstruction', 'value' => set_value('EdittxtSpcialInstruction'), 'id' => 'EdittxtSpcialInstruction', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
echo form_textarea($data); ?>
@ -2256,10 +2247,6 @@ if (!empty($INRSYMBOL)) {
return false;
} else if (ExceedQuantityCheck() == false) {
return false;
} else if ($('#txtSpcialInstruction').val() == '') {
alert('Please Enter the Service Description');
$('#txtSpcialInstruction').focus();
return false;
} else if (ExceedBudget($('#txtBasicValue').val(), $('#AvlBudAmt').val()) == false) {
$('#Rate').focus();
return false;
@ -2297,10 +2284,6 @@ if (!empty($INRSYMBOL)) {
return false;
} else if (EditExceedQuantityCheck() == false) {
return false;
} else if ($('#EdittxtSpcialInstruction').val() == '') {
alert('Please Enter the Service Description');
$('#EdittxtSpcialInstruction').focus();
return false;
} else if (ExceedBudget($('#txtEditBasicValue').val(), $('#EditAvlBudAmt').val()) == false) {
$('#EditRate').focus();
return false;

View File

@ -26,7 +26,6 @@
$PaymentOtherDescription='';
$NoOfServices=0;
$advance=0;
$finCap='';
$modShp='';
$insNo='';
$insNo='';
@ -116,7 +115,6 @@
$advance=$PO->AdvanceAmount;
$finCap=$PO->Fincap;
$modShp=$PO->Mode_Of_Shipment;
$insNo=$PO->InsuranceNumber;