diff --git a/app/Controllers/Supplier.php b/app/Controllers/Supplier.php index e89c72b2..823662c9 100755 --- a/app/Controllers/Supplier.php +++ b/app/Controllers/Supplier.php @@ -319,6 +319,8 @@ class Supplier extends BaseController return $this->response->setJSON($query); } + + function deletesupplier() { $Sid = $this->request->getPost('id'); @@ -329,8 +331,10 @@ class Supplier extends BaseController $result = $this->supplier_model->deleteSupplier($Sid, $SupplierInfo); - echo 'Succssfully change the Supplier status to InAcive'; + echo 'Succssfully deleted the Supplier ..!!'; } + + function exportsupplier() { diff --git a/app/Models/Rawmaterialdetails_model.php b/app/Models/Rawmaterialdetails_model.php index 0a0cb488..07f9e8e9 100755 --- a/app/Models/Rawmaterialdetails_model.php +++ b/app/Models/Rawmaterialdetails_model.php @@ -19,7 +19,6 @@ class Rawmaterialdetails_model extends Model $builder = $this->db->table('t_materialmaster') ->select('*') - ->where('IsActive', 1) ->orderBy('CreatedDate','desc'); $query = $builder->get(); $result = $query->getResult(); diff --git a/app/Models/Supplier_model.php b/app/Models/Supplier_model.php index 865e07ea..ff98f926 100755 --- a/app/Models/Supplier_model.php +++ b/app/Models/Supplier_model.php @@ -20,7 +20,7 @@ class Supplier_model extends Model $builder = $this->db->table('t_supplierdetailsn as BaseT') ->select('BaseT.SupplierID, BaseT.SupplierName, BaseT.Address, BaseT.ContactNumber, BaseT.AlternateContactNumber,BaseT.EmailAddress,BaseT.Exiseregistration, BaseT.TIN, BaseT.PAN,,BaseT.GSTNO,BaseT.GSTRange,BaseT.CollectrateAddress,BaseT.UANumber,BaseT.CreatedOn,BaseT.PaymentID,pmt.PaymentTerms,BaseT.CSTDate,BaseT.IsActive') //,BaseT.PaymentTerms,BaseT.PaymentDays,BaseT.PayableAT,pmt.Details'); ->join('t_paymentterms as pmt', 'pmt.PaymentID = BaseT.PaymentID', 'left') - ->orderBy('BaseT.CreatedOn', 'desc'); // Adjust this column as needed + ->orderBy('BaseT.CreatedOn', 'desc'); $query = $builder->get(); @@ -34,6 +34,16 @@ class Supplier_model extends Model */ + function deleteSupplier($Sid, $SupplierInfo){ + + $builder = $this->db->table('t_supplierdetailsn') + ->where('SupplierID',$Sid) + ->update($SupplierInfo); + return $this->db->affectedRows(); + + } + + function getpayment($Configvalue = '') { $ConfigID = 'C009'; @@ -114,7 +124,6 @@ class Supplier_model extends Model ->where('SupplierID', $supplierID) ->update($supplier); return $this->db->affectedRows(); - return TRUE; } diff --git a/app/Views/rawmaterialListing.php b/app/Views/rawmaterialListing.php index 316ccab6..4d688eb9 100755 --- a/app/Views/rawmaterialListing.php +++ b/app/Views/rawmaterialListing.php @@ -75,6 +75,12 @@ +
+ + +
+
@@ -100,7 +106,11 @@ foreach ($userRecords as $record) { $date = date("Y-m-d"); ?> - + " + style="IsActive == 0){echo"display:none";}?>" + > + CreatedDate)) == "30-11--0001") { $cdate = '00-00-0000'; } else { @@ -223,4 +233,25 @@ } }); }); + + + \ No newline at end of file diff --git a/app/Views/supplierListing.php b/app/Views/supplierListing.php index b5eb4010..f100b6dc 100755 --- a/app/Views/supplierListing.php +++ b/app/Views/supplierListing.php @@ -76,6 +76,12 @@ +
+ + +
+
@@ -101,7 +107,12 @@ if (!empty($userRecords)) { foreach ($userRecords as $record) { ?> - + + " + style="IsActive == 0){echo"display:none";}?>" + > + CreatedOn)) == "30-11--0001") { $cdate = '00-00-0000'; } else { @@ -151,25 +162,42 @@ \ No newline at end of file + + + function showArchiveList() { + let isChecked = $("#showArchiveId").prop('checked'); + + // Show or hide the rows based on checkbox status + $(".deactivatedRow").each(function() { + if (isChecked) { + $(this).show(); + } else { + $(this).hide(); + } + }); + } + + $(document).ready(function() { + showArchiveList(); + }); + + +