diff --git a/app/Config/Routes.php b/app/Config/Routes.php
index 4a422bd5..1971a74a 100644
--- a/app/Config/Routes.php
+++ b/app/Config/Routes.php
@@ -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');
diff --git a/app/Controllers/Amendmentpurchaseorder.php b/app/Controllers/Amendmentpurchaseorder.php
index 1d152eda..32b602e8 100644
--- a/app/Controllers/Amendmentpurchaseorder.php
+++ b/app/Controllers/Amendmentpurchaseorder.php
@@ -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');
diff --git a/app/Controllers/Emergencypurchaseorder.php b/app/Controllers/Emergencypurchaseorder.php
index 6d70d46d..d76f84e0 100644
--- a/app/Controllers/Emergencypurchaseorder.php
+++ b/app/Controllers/Emergencypurchaseorder.php
@@ -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) {
diff --git a/app/Controllers/Inwardgateregister.php b/app/Controllers/Inwardgateregister.php
index 6ebc72d9..fe55e59a 100755
--- a/app/Controllers/Inwardgateregister.php
+++ b/app/Controllers/Inwardgateregister.php
@@ -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 = '';
diff --git a/app/Controllers/Purchaseorder.php b/app/Controllers/Purchaseorder.php
index 6caa2015..619b9319 100644
--- a/app/Controllers/Purchaseorder.php
+++ b/app/Controllers/Purchaseorder.php
@@ -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');
diff --git a/app/Controllers/Servicepurchaseorder.php b/app/Controllers/Servicepurchaseorder.php
index 6af4c29f..490290e2 100644
--- a/app/Controllers/Servicepurchaseorder.php
+++ b/app/Controllers/Servicepurchaseorder.php
@@ -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');
diff --git a/app/Controllers/Supplier.php b/app/Controllers/Supplier.php
index e37f717a..f5eeffa3 100644
--- a/app/Controllers/Supplier.php
+++ b/app/Controllers/Supplier.php
@@ -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 "";
- // 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');
diff --git a/app/Models/Inwardgateregister_model.php b/app/Models/Inwardgateregister_model.php
index a60d77b6..850309a7 100755
--- a/app/Models/Inwardgateregister_model.php
+++ b/app/Models/Inwardgateregister_model.php
@@ -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')
diff --git a/app/Models/Purchaseorder_model.php b/app/Models/Purchaseorder_model.php
index 78914f1e..f5a6fde4 100644
--- a/app/Models/Purchaseorder_model.php
+++ b/app/Models/Purchaseorder_model.php
@@ -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')
diff --git a/app/Models/Supplier_model.php b/app/Models/Supplier_model.php
index 41fcf03d..45807251 100644
--- a/app/Models/Supplier_model.php
+++ b/app/Models/Supplier_model.php
@@ -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)
{
diff --git a/app/Views/EditservicePurchaseorder.php b/app/Views/EditservicePurchaseorder.php
index 0a5b683f..c53721cd 100644
--- a/app/Views/EditservicePurchaseorder.php
+++ b/app/Views/EditservicePurchaseorder.php
@@ -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)) {
-
+
@@ -946,16 +944,7 @@ if (!empty($getlogpodtl)) {
?>
-
-
-
-
- 'editfincap', 'value' => set_value('editfincap', $Fincap), 'id' => 'editfincap', 'class' => 'form-control');
- echo form_input($data);
- ?>
-
-
+
@@ -2338,13 +2327,12 @@ if (!empty($getlogpodtl)) {
PONO ?> |
+ logDate != '-') {
+ // $logdate = date('d-m-Y', strtotime($oldpo->logDate));
+ // } else {
+ // $logdate = '-';
+ // } ?>
+ -->
LineItemNos; ?> |
entity ?> |
entity == 'PO DateChanged') {
diff --git a/app/Views/POlist.php b/app/Views/POlist.php
index 0cb2ba8f..09c84bd4 100644
--- a/app/Views/POlist.php
+++ b/app/Views/POlist.php
@@ -225,20 +225,4 @@
]
});
});
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/Views/addSupplier.php b/app/Views/addSupplier.php
index 82cf2049..16ece59d 100644
--- a/app/Views/addSupplier.php
+++ b/app/Views/addSupplier.php
@@ -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 <space> 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 @@
Supplier Name*
-
+
Contact Number*
@@ -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, '');
diff --git a/app/Views/alterpurchaseorder.php b/app/Views/alterpurchaseorder.php
index 5795041b..ff6706a2 100644
--- a/app/Views/alterpurchaseorder.php
+++ b/app/Views/alterpurchaseorder.php
@@ -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)) {
-
+
@@ -2372,16 +2372,6 @@ if (!empty($INRSYMBOL)) {
?>
-
-
-
-
- 'emergfincap', 'value' => set_value('emergfincap'), 'id' => 'emergfincap', 'class' => 'form-control');
- echo form_input($data);
- ?>
-
-
diff --git a/app/Views/capitalpopdf.php b/app/Views/capitalpopdf.php
index 7d06cbe5..7142d2e1 100644
--- a/app/Views/capitalpopdf.php
+++ b/app/Views/capitalpopdf.php
@@ -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';
diff --git a/app/Views/capitalpurchaseorder.php b/app/Views/capitalpurchaseorder.php
index cfe646bd..e0686ce9 100644
--- a/app/Views/capitalpurchaseorder.php
+++ b/app/Views/capitalpurchaseorder.php
@@ -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()
-
+
-
+
-
-
-
-
- 'addfincap','value' => set_value('addfincap'),'id'=>'addfincap', 'class' => 'form-control');
- echo form_input($data);
- ?>
-
-
@@ -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);
diff --git a/app/Views/editCapitalAmendPO.php b/app/Views/editCapitalAmendPO.php
index 9738c6aa..801ae4b4 100644
--- a/app/Views/editCapitalAmendPO.php
+++ b/app/Views/editCapitalAmendPO.php
@@ -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';
-
+
-
+
-
-
-
-
- 'amendfincap','value' => set_value('amendfincap',$Fincap),'id'=>'amendfincap', 'class' => 'form-control');
- echo form_input($data);
- ?>
-
-
@@ -2430,7 +2414,11 @@ var myArray = ;
$.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;
diff --git a/app/Views/editCapitalPo.php b/app/Views/editCapitalPo.php
index c9c63dca..40bb3a39 100644
--- a/app/Views/editCapitalPo.php
+++ b/app/Views/editCapitalPo.php
@@ -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();
-
+
-
+
-
-
-
-
- 'editfincap','value' => set_value('editfincap',$Fincap),'id'=>'editfincap', 'class' => 'form-control');
- echo form_input($data);
- ?>
-
-
+
@@ -4098,8 +4084,11 @@ var PaymentOtherData = '';
$.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);
}
diff --git a/app/Views/editImportAmendPO.php b/app/Views/editImportAmendPO.php
index c8e05024..22f459ec 100644
--- a/app/Views/editImportAmendPO.php
+++ b/app/Views/editImportAmendPO.php
@@ -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))
?>
-
-
-
-
- 'amendfincap','value' => set_value('amendfincap',$Fincap),'id'=>'amendfincap', 'class' => 'form-control');
- echo form_input($data);
- ?>
-
-
@@ -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;
diff --git a/app/Views/editRevenueAmendPO.php b/app/Views/editRevenueAmendPO.php
index 29d6d2ac..c834f9de 100644
--- a/app/Views/editRevenueAmendPO.php
+++ b/app/Views/editRevenueAmendPO.php
@@ -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 = ;
+ $.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()
?>
-
-
-
-
- 'amendfincap','value' => set_value('amendfincap',$fincap),'id'=>'amendfincap', 'class' => 'form-control','readonly' => 'readonly');
- echo form_input($data);
- ?>
-
-
+
diff --git a/app/Views/editRevenuepurchaseorder.php b/app/Views/editRevenuepurchaseorder.php
index 61d2a6ae..e082b362 100644
--- a/app/Views/editRevenuepurchaseorder.php
+++ b/app/Views/editRevenuepurchaseorder.php
@@ -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)) {
-
+
@@ -2026,16 +2026,6 @@ if (!empty($getlogpodtl)) {
?>
-
-
-
-
- 'editfincap', 'value' => set_value('editfincap', $fincap), 'id' => 'editfincap', 'class' => 'form-control');
- echo form_input($data);
- ?>
-
-
diff --git a/app/Views/editServiceAmendPO.php b/app/Views/editServiceAmendPO.php
index bee04251..a4a9d8c6 100644
--- a/app/Views/editServiceAmendPO.php
+++ b/app/Views/editServiceAmendPO.php
@@ -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) {
-
+
@@ -873,16 +870,6 @@ foreach ($PaymentTerms as $TER) {
?>
-
-
-
-
- 'amendfincap', 'value' => set_value('amendfincap', $Fincap), 'id' => 'amendfincap', 'class' => 'form-control');
- echo form_input($data);
- ?>
-
-
@@ -1325,10 +1312,9 @@ foreach ($PaymentTerms as $TER) {
- 'EdittxtSpcialInstruction', 'value' => set_value('EdittxtSpcialInstruction', $ServiceMaterialDescription), 'id' => 'EdittxtSpcialInstruction', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
- echo form_textarea($data);
- ?>
+ 'EdittxtSpcialInstruction', 'value' => set_value('EdittxtSpcialInstruction', $ServiceMaterialDescription), 'id' => 'EdittxtSpcialInstruction', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
+ echo form_textarea($data);
+ ?>
@@ -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;
}
diff --git a/app/Views/editSupplier.php b/app/Views/editSupplier.php
index cf6f5ed2..d8cfa5bc 100644
--- a/app/Views/editSupplier.php
+++ b/app/Views/editSupplier.php
@@ -280,7 +280,7 @@ if (!empty($supplier)) {
Supplier Name*
-
+
@@ -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, '');
diff --git a/app/Views/editimportpo.php b/app/Views/editimportpo.php
index e6fada16..21c279cd 100644
--- a/app/Views/editimportpo.php
+++ b/app/Views/editimportpo.php
@@ -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
-
+
@@ -707,16 +702,6 @@ else
?>
-
-
-
-
- 'editfincap','value' => set_value('editfincap',$Fincap),'id'=>'editfincap', 'class' => 'form-control');
- echo form_input($data);
- ?>
-
-
@@ -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;
diff --git a/app/Views/editrequisitionform.php b/app/Views/editrequisitionform.php
index aaec5925..5ca339bc 100644
--- a/app/Views/editrequisitionform.php
+++ b/app/Views/editrequisitionform.php
@@ -239,7 +239,7 @@ if (!empty($ReqPOType)) {
-
+
-
-
-
- 'Description', 'value' => set_value('Description'), 'id' => 'Description', 'class' => 'form-control', 'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
-
- 'otherD', 'value' => set_value('otherD'), 'id' => 'otherD', 'class' => 'form-control', 'rows' => '5', 'cols' => '70', 'maxlength' => '500');
- echo Form_textarea($data);
- ?>
-
-
-
-
-
- 'UOM', 'value' => set_value('UOM'), 'id' => 'UOM', 'class' => 'form-control', 'readonly' => 'true');
- echo form_input($data);
- ?>
+
+
+
+
+ 'Description', 'value' => set_value('Description'), 'id' => 'Description', 'class' => 'form-control', 'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
-
-
@@ -314,7 +317,7 @@ if (!empty($ReqPOType)) {
-
+
-
-
+
@@ -517,16 +514,6 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
?>
-
-
-
-
- 'addfincap', 'value' => set_value('addfincap'), 'id' => 'addfincap', 'class' => 'form-control');
- echo form_input($data);
- ?>
-
-
@@ -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);
}
diff --git a/app/Views/importpopdf.php b/app/Views/importpopdf.php
index ba5e0d12..33e5e6bf 100644
--- a/app/Views/importpopdf.php
+++ b/app/Views/importpopdf.php
@@ -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;
diff --git a/app/Views/includes/pdfheader.php b/app/Views/includes/pdfheader.php
index 276ebbec..b049d09f 100644
--- a/app/Views/includes/pdfheader.php
+++ b/app/Views/includes/pdfheader.php
@@ -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)) {
-
-
-
-
- | Fin cap |
-
-
-
-
- |
-
-
-
- |
-
diff --git a/app/Views/inwardgateregister.php b/app/Views/inwardgateregister.php
index 4398131a..c1068df6 100755
--- a/app/Views/inwardgateregister.php
+++ b/app/Views/inwardgateregister.php
@@ -75,191 +75,162 @@
-
@@ -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:"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('');
- // }
-
- // }
-
-
+ }
}
diff --git a/app/Views/po_pdf.php b/app/Views/po_pdf.php
index 52b91b37..6f967cee 100755
--- a/app/Views/po_pdf.php
+++ b/app/Views/po_pdf.php
@@ -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) : "";
diff --git a/app/Views/purchaseorder.php b/app/Views/purchaseorder.php
index f3180a57..75b4f3aa 100644
--- a/app/Views/purchaseorder.php
+++ b/app/Views/purchaseorder.php
@@ -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)) {
-
-
- Revenue Purchase Order
-
-
+
Revenue Purchase Order
@@ -1840,16 +1839,14 @@ if (!empty($INRSYMBOL)) {
'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"');
?>
@@ -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)) {
-
+
@@ -2021,16 +2015,6 @@ if (!empty($INRSYMBOL)) {
?>
-
-
-
-
- 'addfincap', 'value' => set_value('addfincap'), 'id' => 'addfincap', 'class' => 'form-control');
- echo form_input($data);
- ?>
-
-
diff --git a/app/Views/requisitionform.php b/app/Views/requisitionform.php
index 57a73c52..930f88a3 100644
--- a/app/Views/requisitionform.php
+++ b/app/Views/requisitionform.php
@@ -197,7 +197,7 @@ if (!empty($Emp)) {