Repository navigation
Expand file tree
/
Copy pathtest.html
More file actions
112 lines (105 loc) · 2.81 KB
/
Copy pathtest.html
File metadata and controls
112 lines (105 loc) · 2.81 KB
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<!--suppress HtmlUnknownAttribute -->
<head>
<title>test</title>
<meta name="viewport" content="width=device-width, user-scalable=no">
</head>
<body>
<div >
{{> productList}}
</div>
<div >
{{>trxList}}
</div>
</body>
<template name="productList">
<table class="table table-striped table-bordered pretty" id="productList_table">
<caption>
<h1>Inventory</h1>
</caption>
<thead>
<tr>
<th scope="col">product number</th>
<th scope="col">Description</th>
<th scope="col">Last Quantity</th>
<th scope="col">Current Quantity</th>
</tr>
</thead>
<tbody>
{{#each products}}
{{> productRow}}
{{/each}}
</tbody>
</table>
</template>
<template name="trxList">
{{#if selected_item}}
<div class="details">
<div class="prodheader">
<span class="name">{{selected_item.desc}}</span>
<div class="subhead">
Number: {{selected_item.prodID}}
</div>
<div class="subhead">
Remaining qty: {{selected_item.curQty}}
</div>
</div>
</div>
{{else}}
<div class="none">Click a product to see details</div>
{{/if}}
{{> insertTrx}}
<div id="transactions_section">
<table class="table table-striped table-bordered pretty" id="trxList_table">
<caption>
<h2>Inventory Transactions</h2><br/>
</caption>
<thead>
<tr>
<th scope="col">Entered by</th>
<th scope="col">Entered on</th>
<th scope="col">Doc #</th>
<th scope="col">Quantity</th>
<th scope="col">Current #</th>
<th scope="col">Transaction date</th>
</tr>
</thead>
<tbody>
{{#each trx}}
{{> trxRow}}
{{/each}}
</tbody>
</table>
</div>
</template>
<template name="productRow">
<tr class=" {{selected}}">
<td >{{prodID}}</td>
<td >{{desc}}</td>
<td >{{lastQty}}</td>
<td >{{curQty}}</td>
</tr>
</template>
<template name="trxRow">
<tr>
<td >{{enteredBy}}</td>
<td >{{enteredOn.toLocaleString}}</td>
<td >{{docno}}</td>
<td >{{qty}}</td>
<td >{{curqty}}</td>
<td >{{trxDate.toLocaleDateString}}</td>
</tr>
</template>
<template name="insertTrx">
<div id=inputForm class=" form-inline">
<!--{{> quickForm collection="transactions" id="insertTrxForm" type="insert" label-class="col-md-2" buttonContent="Log This" fields="docno, qty, enteredBy, trxDate" doc=defaultDoc}}-->
{{#autoForm collection="transactions" id="insertTrxForm" type="insert"}}
<fieldset>
{{> afQuickField name="docno" autofocus=""}}
{{> afQuickField name="qty"}}
{{> afQuickField name="enteredBy" value=current_name}}
{{> afQuickField name="trxDate" value=current_day}}
<button type="submit" class="btn btn-primary">Log This</button>
</fieldset>
{{/autoForm}}
</div>
</template>