} else { $product_id = NULL; } if ($_POST['to_date']) { $to_date = $_POST['to_date']; $to_date = $accounts->_date('Y-m-d H:i:s', $to_date); } else { $to_date = NULL; } if ($_POST['from_date']) { $from_date = $_POST['from_date']; $from_date = $accounts->_date('Y-m-d H:i:s', $from_date); } else { $from_date = NULL; } $results = $accounts->get_profitloss_report($product_id, $to_date, $from_date); // print_f($results); } ?> <!-- Begin page heading --> <div class="the-box full no-border"> <div class="table-responsive"> <?php if (isset($results)) { // print_f($results); ?> <table class="table table-th-block table-primary"> <thead> <th>Product Name</th>