<!--branch inventory --> <div id="myModal_branch" class="modal fade" role="dialog"> <div class="modal-dialog modal-lg"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">STOCK</h4> </div> <!-- contents of model here --> <div class="modal-body"> <?php $db = database::getInstance(); $BranchInvObj = new branch_inventory(); $values_branch = $BranchInvObj->show_inventory(); ?> <!-- shows branch inventory stock --> <table class="table table-bordered"> <h4>Branch Inventory</h4> <tr> <th>SN</th> <th>Bike</th> <th>Quantity in numbers</th> </tr> <?php $i = 1; if ($values_branch) { foreach ($values_branch as $value) {
require_once 'includes/functions.php'; require_once 'core/init.php'; if (!isset($_SESSION['username'])) { header("location:index.php"); } elseif ($_SESSION['permission'] == 1) { header("location:index.php"); } include 'templates/content_background.php'; include 'includes/modals.php'; //for the sale table for selling of the bike if (isset($_POST['sell_button'])) { $numbers = $_POST['numbers']; $number_decrement = -1 * $_POST['numbers']; $bike_id = $_POST['bike_id']; $branch_id = $_SESSION['uid']; $BranchInvObj = new branch_inventory($number_decrement, $bike_id, $branch_id); $result_branch_inventory = $BranchInvObj->add_sub_inventory(); //chek if the transaction is valid and perform operation if ($result_branch_inventory) { $SaleObj = new sales($numbers, $bike_id, $branch_id); $IsInsert = $SaleObj->add_sales(); //var_dump($IsInsert); if ($IsInsert) { $_GET['sell_success'] = 1; ?> <script type="text/javascript"> $(document).ready(function() { $(document).scrollTop( $("#sell_id").offset().top ); }); </script>
function __construct($number = null, $brand_id = null, $branch_identifier = null) { parent::__construct($number, $brand_id, $branch_identifier); }