<!-- End breadcrumb --> <div class="panel panel-info"> <div class="panel-heading"> <div class="right-content"> <a href="add_supplier.php"><button class="btn btn-success btn-perspective btn-lg pull-right">ADD NEW SUPPLIER</button></a> </div> <h3>Manage Suppliers</h3> </div> <div class="panel-body"> <!-- BEGIN DATA TABLE --> <div class="the-box"> <div class="table-responsive"> <?php $supplier = new supplier(); $results = $supplier->get_suppliers(); if ($results) { ?> <table class="table table-striped table-hover" id="datatable-example"> <thead class="the-box dark full"> <tr> <th>Supplier Name</th> <th>Email</th> <th>Phone</th> <th>City</th> <th>Action</th> </tr> </thead> <tbody> <?php
<section> <hr/> <div class="container"> <div class="row"> <div class="tableHeading"> <p class="nomargin alignCenter"><?php echo isset($_GET['id']) ? 'Update' : 'Add'; ?> Purchase</p> </div> <?php $suppliers = new supplier(); $all_suppliers = $suppliers->get_suppliers(); $accounts = new accounts(); $ID = isset($_GET['id']) ? $_GET['id'] : NULL; if (isset($_POST['add_purchase'])) { $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) {
<p class="nomargin alignCenter"><?php echo isset($_GET['id']) ? 'Update' : 'Add'; ?> Products</p> </div> <?php $product = new product(); // Add New Product in Supplier if (isset($_GET['supplier_id'])) { $supplier_id = $_GET['supplier_id']; $suppliers = new supplier(); $suppliers_list = $suppliers->get_supplier($supplier_id); } else { $suppliers = new supplier(); $suppliers_list = $suppliers->get_suppliers(); } $ID = isset($_GET['id']) ? $_GET['id'] : NULL; if (isset($_POST['add_product'])) { // Update old record if (isset($ID)) { $results = $product->pro_update($_POST, $ID); } else { // Insert new $results = $product->pro_insert($_POST); } if ($results) { echo '<div class="alert alert-success" role="alert"> Add Product Sucessfully </div>'; } else { echo '<div class="alert alert-danger" role="alert"> Error </div>'; }