| Server IP : 61.19.30.66 / Your IP : 216.73.216.80 Web Server : Apache/2.2.22 (Ubuntu) System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64 User : www-data ( 33) PHP Version : 5.3.10-1ubuntu3.48 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /var/www/gpa/rtec/main/ |
Upload File : |
<html>
<head>
<title>
POS
</title>
<?php
require_once('auth.php');
?>
<link href="css/bootstrap.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/DT_bootstrap.css">
<link rel="stylesheet" href="css/font-awesome.min.css">
<style type="text/css">
body {
padding-top: 60px;
padding-bottom: 40px;
}
.sidebar-nav {
padding: 9px 0;
}
</style>
<link href="css/bootstrap-responsive.css" rel="stylesheet">
<link href="../style.css" media="screen" rel="stylesheet" type="text/css" />
<!--sa poip up-->
<script src="jeffartagame.js" type="text/javascript" charset="utf-8"></script>
<script src="js/application.js" type="text/javascript" charset="utf-8"></script>
<link href="src/facebox.css" media="screen" rel="stylesheet" type="text/css" />
<script src="lib/jquery.js" type="text/javascript"></script>
<script src="src/facebox.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="tcal.css" />
<script type="text/javascript" src="tcal.js"></script>
<script language="javascript">
function Clickheretoprint()
{
var disp_setting="toolbar=yes,location=no,directories=yes,menubar=yes,";
disp_setting+="scrollbars=yes,width=700, height=400, left=100, top=25";
var content_vlue = document.getElementById("content").innerHTML;
var docprint=window.open("","",disp_setting);
docprint.document.open();
docprint.document.write('</head><body onLoad="self.print()" style="width: 700px; font-size:11px; font-family:arial; font-weight:normal;">');
docprint.document.write(content_vlue);
docprint.document.close();
docprint.focus();
}
</script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',
closeImage : 'src/closelabel.png'
})
})
</script>
</head>
<?php
function createRandomPassword() {
$chars = "003232303232023232023456789";
srand((double)microtime()*1000000);
$i = 0;
$pass = '' ;
while ($i <= 7) {
$num = rand() % 33;
$tmp = substr($chars, $num, 1);
$pass = $pass . $tmp;
$i++;
}
return $pass;
}
$finalcode='RS-'.createRandomPassword();
?>
<script language="javascript" type="text/javascript">
/* Visit http://www.yaldex.com/ for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin
var timerID = null;
var timerRunning = false;
function stopclock (){
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}
function showtime () {
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds()
var timeValue = "" + ((hours >12) ? hours -12 :hours)
if (timeValue == "0") timeValue = 12;
timeValue += ((minutes < 10) ? ":0" : ":") + minutes
timeValue += ((seconds < 10) ? ":0" : ":") + seconds
timeValue += (hours >= 12) ? " P.M." : " A.M."
document.clock.face.value = timeValue;
timerID = setTimeout("showtime()",1000);
timerRunning = true;
}
function startclock() {
stopclock();
showtime();
}
window.onload=startclock;
// End -->
</SCRIPT>
<body>
<?php include('navfixed.php');?>
<div class="container-fluid">
<div class="row-fluid">
<div class="span2">
<div class="well sidebar-nav">
<ul class="nav nav-list">
<li><a href="index.php"><i class="icon-dashboard icon-2x"></i> Dashboard </a></li>
<li><a href="sales.php?id=cash&invoice=<?php echo $finalcode ?>"><i class="icon-shopping-cart icon-2x"></i> Sales</a> </li>
<li><a href="products.php"><i class="icon-list-alt icon-2x"></i> Products</a> </li>
<li><a href="customer.php"><i class="icon-group icon-2x"></i> Customers</a> </li>
<li><a href="supplier.php"><i class="icon-group icon-2x"></i> Suppliers</a> </li>
<li><a href="salesreport.php?d1=0&d2=0"><i class="icon-bar-chart icon-2x"></i> Sales Report</a> </li>
<li class="active"><a href="sales_inventory.php"><i class="icon-table icon-2x"></i> Product Inventory</a> </li>
<br><br><br><br><br><br>
<li>
<div class="hero-unit-clock">
<form name="clock">
<font color="white">Time: <br></font> <input style="width:150px;" type="submit" class="trans" name="face" value="">
</form>
</div>
</li>
</ul>
</div><!--/.well -->
</div><!--/span-->
<div class="span10">
<div class="contentheader">
<i class="icon-bar-chart"></i> Product Inventory
</div>
<br>
<a href="index.php"><button class="btn btn-default btn-large" style="float: left;"><i class="icon icon-circle-arrow-left icon-large"></i> Back</button></a>
<div style="float:right;">
<button style="float:left;" class="btn btn-success btn-mini"><a href="javascript:Clickheretoprint()"> Print</button></a>
</div>
<br>
<br>
<br>
<input type="text" style="padding:15px;" name="filter" value="" id="filter" placeholder="Search here..." autocomplete="off" />
<div class="content" id="content">
<br><br><br>
<center><strong>Product Inventory</strong></center>
<table class="table table-bordered" id="resultTable" data-responsive="table" style="text-align: left;">
<thead>
<tr>
<th width="12%"> Invoice </th>
<th width="9%"> Date </th>
<th width="14%"> Brand Name </th>
<th width="16%"> Generic Name </th>
<th width="15%"> Category / Description </th>
<th > Price </th>
<th> QTY </th>
<th width="8%"> Total Amount </th>
<th width="8%"> Profit </th>
<th > Action </th>
</tr>
</thead>
<tbody>
<?php
function formatMoney($number, $fractional=false) {
if ($fractional) {
$number = sprintf('%.2f', $number);
}
while (true) {
$replaced = preg_replace('/(-?\d+)(\d\d\d)/', '$1,$2', $number);
if ($replaced != $number) {
$number = $replaced;
} else {
break;
}
}
return $number;
}
include('../connect.php');
$result = $db->prepare("SELECT * FROM sales_order ORDER BY transaction_id DESC");
$result->execute();
for($i=0; $row = $result->fetch(); $i++){
?>
<tr class="record">
<td><?php echo $row['invoice']; ?></td>
<td><?php echo $row['date']; ?></td>
<td><?php echo $row['product_code']; ?></td>
<td><?php echo $row['gen_name']; ?></td>
<td><?php echo $row['name']; ?></td>
<td><?php
$price=$row['price'];
echo formatMoney($price, true);
?></td>
<td><?php echo $row['qty']; ?></td>
<td><?php
$oprice=$row['amount'];
echo formatMoney($oprice, true);
?></td>
<td><?php
$pprice=$row['profit'];
echo formatMoney($pprice, true);
?></td>
<td>
<a href="deletesalesinventory.php?id=<?php echo $row['transaction_id']; ?>&qty=<?php echo $row['qty'];?>"><button class="btn btn-mini btn-danger"><i class="icon icon-trash"></i> Delete </button></a>
</tr>
<?php
}
?>
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th>Total Amount</th>
<th>Total Profit</th>
<th></th>
<tr>
<tr>
<th colspan="7"><strong style="font-size: 20px; color: #222222;">Total:</strong></th>
<th colspan="1"><strong style="font-size: 13px; color: #222222;">
<?php
$resultas = $db->prepare("SELECT sum(amount) from sales_order");
$resultas->bindParam(':a', $sdsd);
$resultas->execute();
for($i=0; $rowas = $resultas->fetch(); $i++){
$fgfg=$rowas['sum(amount)'];
echo formatMoney($fgfg, true);
}
?>
</strong></th>
<th colspan="1"><strong style="font-size: 13px; color: #222222;">
<?php
$resultas = $db->prepare("SELECT sum(profit) from sales_order");
$resultas->bindParam(':b', $sdsd);
$resultas->execute();
for($i=0; $rowas = $resultas->fetch(); $i++){
$fgfg=$rowas['sum(profit)'];
echo formatMoney($fgfg, true);
}
?>
</th>
<th></th>
</tr>
</tbody>
</table>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
<script src="js/jquery.js"></script>
<script type="text/javascript">
$(function() {
$(".delbutton").click(function(){
//Save the link in a variable called element
var element = $(this);
//Find the id of the link that was clicked
var del_id = element.attr("id");
//Built a url to send
var info = 'id=' + del_id;
if(confirm("Sure you want to delete this update? There is NO undo!"))
{
$.ajax({
type: "GET",
url: "deletesalesinventory.php",
data: info,
success: function(){
}
});
$(this).parents(".record").animate({ backgroundColor: "#fbc7c7" }, "fast")
.animate({ opacity: "hide" }, "slow");
}
return false;
});
});
</script>
</body>
<?php include('footer.php');?>
</html>