</div><!-- /.panel-heading --> <div class="the-box no-border full no-margin"> <div class="the-box no-border bg-info no-margin full"> <div id="morris-widget-1" style="height: 250px;"></div> </div><!-- the-box no-border bg-info no-margin full --> </div><!-- /.the-box no-border .full --> </div><!-- /.the-box no-border .full --> </div><!-- /.col-sm-8 --> <div class="col-lg-4"> <!-- BEGIN WEATHER WIDGET 3 --> <div class="the-box bg-primary no-border"> <h4 class="small-title">ADD OPENING BALANCE</h4> <?php $openingbalance = new openingbalance(); if (isset($_POST['add_balance'])) { $results = $openingbalance->insert_open_balance($_POST); if ($results) { echo '<div class="alert alert-success alert-bold-border square fade in alert-dismissable"> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> <strong>Opening Balance Add Sucessfully</strong> </div>'; } else { echo '<div class="alert alert-danger alert-bold-border square fade in alert-dismissable"> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> <strong>ERROR</strong> </div>'; } } ?>
<li><a href="dashboard.php"><i class="fa fa-home"></i></a></li> <li><a href="view_open_balance.php">Opening Balance</a></li> <li class="active">Add Opening Balance</li> </ol> <div class="panel panel-info"> <div class="panel-heading"> <h3><?php echo isset($_GET['id']) ? 'Update' : 'Add'; ?> Opening Balance</h3> </div> <div class="panel-body"> <!-- BEGIN DATA TABLE --> <?php $openingbalance = new openingbalance(); $ID = isset($_GET['id']) ? $_GET['id'] : NULL; if (isset($_POST['add_balance'])) { // Update old record if (isset($ID)) { $results = $openingbalance->update_open_balance($_POST, $ID); if ($results) { echo '<div class="alert alert-success" role="alert"> Update Balance Sucessfully </div>'; } else { echo '<div class="alert alert-danger" role="alert">ERROR</div>'; } } else { // Insert new $result_insert = $openingbalance->insert_open_balance($_POST); if ($result_insert == 'Already Balance') { //print_f($result_insert);
<div class="col-md-4"> <div class="form-group noMarginBottom"> <label for="p_supplier" class="col-sm-12"> </label> <div class="col-sm-12"> <button type="submit" class="btn btn-success btn-perspective pull-right" name="show_report">Show Report</button> </div> </div> </div> </form> <div class="clearfix"></div> </div><!-- Box Close --> <div class="the-box"> <?php $sales = new sales(); $openingbalance = new openingbalance(); if (isset($_POST['show_report'])) { if ($_POST['person_name']) { $person_name = $_POST['person_name']; } else { $person_name = NULL; } if ($_POST['to_date']) { $date = $_POST['to_date']; $date = $sales->_date('Y-m-d H:i:s', $date); } else { $date = NULL; } $balance_date = $sales->_date('Y-m-d', $date); $results = $sales->get_sale_person_report($person_name, $date); $results_balance = $openingbalance->get_opening_date_balance($person_name, $balance_date);
</ol> <!-- End breadcrumb --> <div class="panel panel-info"> <div class="panel-heading"> <div class="right-content"> <a href="add_opening_balance.php" class="btn btn-success btn-perspective btn-lg pull-right"><i class="fa fa-plus"></i>ADD NEW OPENING BALANCE</a> </div> <h3>View Opening Balance</h3> </div> <div class="panel-body"> <!-- BEGIN DATA TABLE --> <div class="the-box"> <div class="table-responsive"> <?php $openingbalance = new openingbalance(); $results = $openingbalance->get_opening_balance(); if ($results) { ?> <table class="table table-striped table-hover" id="datatable-example"> <thead class="the-box dark full"> <tr> <th>User Name</th> <th>Amount</th> <th>Date</th> <th>Action</th> </tr> </thead> <tbody> <?php foreach ($results as $res) {