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 @@ +