<!-- End breadcrumb --> <div class="panel panel-info"> <div class="panel-heading"> <div class="right-content"> <a href="add_assets.php"><button class="btn btn-success btn-perspective btn-lg pull-right">ADD ASSETS</button></a> </div> <h3>Assets</h3> </div> <div class="panel-body"> <!-- BEGIN DATA TABLE --> <div class="the-box"> <div class="table-responsive"> <?php $accounts = new accounts(); $results = $accounts->get_assets(); if ($results) { ?> <table class="table table-striped table-hover" id="datatable-example"> <thead class="the-box dark full"> <tr> <th>Assets Type</th> <th>Assets Amount</th> <th>Assets Payment Mode</th> <th>Action</th> </tr> </thead> <tbody> <?php foreach ($results as $res) { echo '<tr>';
$detail = $_POST['assets_detail']; // Update old record if (isset($ID)) { $results = $accounts->update_assets($type, $amount, $payment_mode, $bank, $due_date, $detail, $ID); } else { // Insert new $results = $accounts->create_assets($type, $amount, $payment_mode, $bank, $due_date, $detail); } if ($results) { echo '<div class="alert alert-success" role="alert"> Add Assets Sucessfully </div>'; } else { echo '<div class="alert alert-danger" role="alert"> Error </div>'; } } if (isset($ID)) { $assets_result = $accounts->get_assets($ID); } ?> <div class="the-box noborder"> <form id="ExampleBootstrapValidationForm" method="post" action="" class="form-horizontal"> <fieldset> <legend>Product Detail:</legend> <div class="form-group"> <label class="col-lg-3 control-label">Assets Type</label> <div class="col-lg-5"> <select data-placeholder="Choose a Assets..." class="form-control chosen-select" tabindex="2" name="assets_type" required> <option></option> <optgroup label="Current Assets"> <?php foreach ($current_assets as $key => $value) {