forked from phpcontrols/inventory-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
outgoing-order.php
executable file
·62 lines (46 loc) · 1.58 KB
/
outgoing-order.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
<?php
use phpGrid\C_DataGrid;
include_once("phpGrid/conf.php");
include_once('inc/head.php');
?>
<h1>My Inventory Manager</h1>
<?php
$_GET['currentPage'] = 'outgoing';
include_once('inc/menu.php');
?>
<button class="add-new-row">Add New Order</button>
<?php
$dgOrd = new C_DataGrid('SELECT id, OrderDate, ProductId, NumberShipped, First, Last FROM orders', 'id', 'orders');
$dgOrd->set_sortname('OrderDate', 'DESC');
$dgOrd->set_col_hidden('id', false);
$dgOrd->set_col_title('OrderDate', 'Order Date');
$dgOrd->set_col_title('ProductId', 'Product');
$dgOrd->set_col_title('NumberShipped', 'Number Shipped');
$dgOrd->set_col_edittype('ProductId', 'autocomplete', "select id, ProductLabel from products");
// $dgOrd->enable_edit('FORM');
$dgOrd->set_pagesize(100);
$dgOrd->set_col_width('OrderDate', '30px');
$dgOrd->set_col_width('NumberShipped', '35px');
$dgOrd->set_col_width('First', '20px');
$dgOrd->set_col_width('Last', '20px');
$dgOrd->set_grid_method('setGroupHeaders', array(
array('useColSpanStyle'=>true),
'groupHeaders'=>array(
array('startColumnName'=>'First',
'numberOfColumns'=>2,
'titleText'=>'Customer Name') )));
$dgOrd->enable_autowidth(true);
$dgOrd->enable_edit('FORM');
$dgOrd->display();
?>
Outgoing orders reduce inventory.
<script>
$(function(){
$(".add-new-row").on("click",function(){
$("#add_orders").click();
});
});
</script>
<?php
include_once('inc/footer.php');
?>