diff --git a/application/controllers/cashbook.php b/application/controllers/cashbook.php index 2f8bed90..4083ba4b 100755 --- a/application/controllers/cashbook.php +++ b/application/controllers/cashbook.php @@ -22,6 +22,7 @@ class cashbook extends BaseController $this->isLoggedIn(); $this->load->helper(array('form','url')); $this->load->library('upload'); + } @@ -1706,5 +1707,35 @@ $amountInWords = "Rupees " . $result ." Paise ". $points." Only"; return $amountInWords; } + + + + public function addNewSupplierCash() + { + $this->load->model('supplier_model'); + $suppliername = $this->input->post('suppliername'); + $contact = $this->input->post('contact'); + $alternatecont = $this->input->post('alternatecont'); + $email = $this->input->post('email'); + $Address = $this->input->post('Address'); + + $suparray = array('suppliername'=>$suppliername,'Address'=>$Address,'ContactNumber'=>$contact,'AlternateContactNumber'=>$alternatecont,'EmailAddress'=>$email ); + + $result = $this->supplier_model->addNewsupplier($suparray); + if($result > 0) + { + + echo "New Supplier Created successfully!"; + redirect('addnewIncomeExpense','refresh'); + } + + else + { + + echo "Supplier Record Not Created!"; + redirect('addnewIncomeExpense','refresh'); + } + } + } ?> \ No newline at end of file diff --git a/application/models/supplier_model.php b/application/models/supplier_model.php index c657b5db..66e3cde2 100755 --- a/application/models/supplier_model.php +++ b/application/models/supplier_model.php @@ -86,26 +86,37 @@ class supplier_model extends CI_Model return $query->result_array(); } - } + } + + - - function addNewsupplier($supplier) - { +{ - $this->db->insert('T_SupplierDetailsN', $supplier); - $SID = $this->db->affected_rows(); - - // if($SID>0) - // { - // $subQuery = 'select max(SupplierID) as suppid from T_SupplierDetailsN'; - // $query = $this->db->query($subQuery); - // return $query->result(); - // } - return $SID; + $this->db->insert('T_SupplierDetailsN', $supplier); + $SID = $this->db->affected_rows(); + return $SID; - } +} + + + +// function addNewsupplier($supplier) +// { + +// $this->db->insert('T_SupplierDetailsN', $supplier); +// $SID = $this->db->affected_rows(); + +// // if($SID>0) +// // { +// // $subQuery = 'select max(SupplierID) as suppid from T_SupplierDetailsN'; +// // $query = $this->db->query($subQuery); +// // return $query->result(); +// // } +// return $SID; + +// } /** * This function used to get user information by id diff --git a/application/views/addnewIncomeExpense.php b/application/views/addnewIncomeExpense.php index a5d40702..697e8cf6 100755 --- a/application/views/addnewIncomeExpense.php +++ b/application/views/addnewIncomeExpense.php @@ -119,17 +119,43 @@ function loadAccountType(id) /* background-color: darkgrey; */ outline: 1px solid slategrey; } + + .modal +{ + padding-right:25% ! important; +} +.dataTables_paginate +{ + margin-top: -5%; +} +.dataTables_wrapper { + padding-bottom: 0px; +} +.badge + { + color:red; background-color:#fff; + } + + legend{ + color:#00c0ef ! important; + } + + .content { + Padding:0% ! important; +}
Siddharth Industries - Edit Receipt and Payment