-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviewpenjualan.php
98 lines (98 loc) · 2.99 KB
/
viewpenjualan.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<div class="right_col" role="main">
<div class="page-title">
<div class="title_left">
<?php
if($this->session->flashdata("message"))
{
$message=$this->session->flashdata("message");
echo "<div class='alert alert-success'>";
echo "<a href='#' class='close' data-dismiss='alert' aria-label='close'>×</a>";
echo "<strong>Success! </strong>$message";
echo "</div>";
}
$error=$this->session->flashdata("alert");
//echo validation_errors();
if($error)
{
echo "<div class='alert alert-danger'>";
echo "<a href='#' class='close' data-dismiss='alert' aria-label='close'>×</a>";
echo "<strong>Fail! </strong> $error";
echo "</div>";
}
//echo $this->breadcrumbs->show();
?>
<h3>Info Stok Barang</h3>
</div>
</div>
<div class="row">
<div class='x_panel'>
<div class="x_title">
<h3>List Barang & Jumlah Item</h3>
<?php
echo form_open("cpenjualan/infoDpenjualan");
if(!$this->session->userdata("namagudang"))
{
$this->session->set_userdata("namagudang","");
}
echo form_dropdown("cmbgudang",$isigudang,$this->session->userdata("idgudang"));
echo form_submit("btncari","Cari");
echo form_close();
?>
<ul class="nav navbar-right panel_toolbox">
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
</li>
<li><a class="close-link"><i class="fa fa-close"></i></a>
</li>
</ul>
<div class="clearfix"></div>
</div>
<div class="x_content">
<?php
echo "<table id='datatable' class='table table-striped table-bordered' >";
echo "<tr>";
echo "<td>Nama Barang</td>";
echo "<td>Harga</td>";
echo "<td>Size</td>";
echo "</tr>";
foreach($semuabarang as $row)
{
echo "<tr>";
echo "<td>".$row->NAMA_BARANG."</td>";
echo "<td> Rp ".number_format($row->HARGA_JUAL,0,",",".")."</td>";
echo "<td>".$row->SIZE."</td>";
echo form_open("cpenjualan/buy");
echo form_hidden("txtkode",$row->ID_BARANG);
echo "<td>".form_submit("btnbuy","Buy")."</td>";
$stok = $this->mdpenjualan->getdetaildgudang($row->ID_GUDANG,$row->ID_BARANG);
foreach($stok->result() as $i)
{
echo "<td><input type='number' name='txtqty' value=1 max=".$i->STOK." min=1></td>";
}
echo form_close();
echo "</tr>";
}
echo "</table>";
$this->table->clear();
if($promo)
{
foreach($promo as $row)
{
echo "Nama Promo : ".$row->NAMA_PROMO."<br>";
echo "Besar Diskon : ".$row->DISKON." %<br>";
}
}
echo form_open("cpenjualan/checkout");
echo form_submit("btncheckout","Checkout");
echo form_close();
?>
</div>
</div>
</div>
</div>
</body>
</html>