Ejemplo n.º 1
0
<?php

require_once 'header.php';
?>
<section>
	<hr/>
	<div class="container">
		<div class="row">
			<div class="tableHeading">
				<p class="nomargin alignCenter">View Supplier</p>
			</div>
			<div class="col-md-12">	
				<?php 
$bank = new bank();
$results = $bank->get_banks();
if ($results) {
    ?>
				<table border="1" cellpadding="0" cellspacing="0" class="table table-hover tableView">
					<tr>
						<th>Bank Name</th>
						<th>Branch</th>
						<th>Account #</th>
						<th>Account Title</th>
						<th>Account Type</th>
						<th>Action</th>
					</tr>
						<?php 
    foreach ($results as $res) {
        echo '<tr>';
        echo '<td>' . $res->bank_name . '</td>';
        echo '<td>' . $res->bank_branch . '</td>';
Ejemplo n.º 2
0
			<li class="active">Add Supplier Bill</li>
		</ol>

		<div class="panel panel-info">
		  <div class="panel-heading">
			<h3><?php 
echo isset($_GET['id']) ? 'Update' : 'Add';
?>
 Supplier Bill</h3>
		  </div>
		  <div class="panel-body">
			<?php 
$suppliers = new supplier();
$all_suppliers = $suppliers->get_suppliers();
$bank = new bank();
$bank_result = $bank->get_banks();
$accounts = new accounts();
$ID = isset($_GET['id']) ? $_GET['id'] : NULL;
if (isset($_POST['add_bill'])) {
    $supplier_id = $_POST['supplier_id'];
    $bill_number = $_POST['bill_number'];
    $due_date = $_POST['due_date'];
    $bill_amount = $_POST['bill_amount'];
    $payment_type = $_POST['payment_type'];
    if ($payment_type == 'cheque') {
        $type = 'credit';
    } else {
        $type = 'debit';
    }
    $bank_detail = $_POST['bank_detail'];
    if ($bank_detail) {
Ejemplo n.º 3
0
if (isset($_POST['add_bank'])) {
    // Update old record
    if (isset($ID)) {
        $results = $bank->update_bank($_POST, $ID);
    } else {
        // Insert new
        $results = $bank->add_bank($_POST);
    }
    if ($results) {
        echo '<div class="alert alert-success" role="alert"> Add Bank Sucessfully </div>';
    } else {
        echo '<div class="alert alert-danger" role="alert"> Error </div>';
    }
}
if (isset($ID)) {
    $bank_result = $bank->get_banks($ID);
}
?>
			<div class="the-box noborder">
				<form id="ExampleBootstrapValidationForm" method="post" action="" class="form-horizontal">
					<fieldset>
						<legend>Bank Detail:</legend>
						
						<div class="form-group">
							<label class="col-lg-3 control-label">Bank Name</label>
							<div class="col-lg-5">
								<input type="text" name="bank_name" value="<?php 
echo isset($ID) ? $bank_result[0]->bank_name : '';
?>
" class="form-control" required>
							</div>