trx.view.html
4.75 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
{% extends "starter-template.html" %}
{% block content %}
{% if trx.responses %}
{% set lastResponse = trx.responses|last %}
{% endif %}
<form class="form-horizontal">
<div class="form-group">
<label for="inputReqId" class="col-sm-2 control-label">Request ID</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputReqId" value="{{ trx.requestId }}" readonly>
</div>
</div>
<div class="form-group">
<label for="inputRefnum" class="col-sm-2 control-label">Supplier Refnum</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputRefnum"
{% if lastResponse %}
{% if lastResponse.parsed.ciwaru.refnum %}
value="{{ lastResponse.parsed.ciwaru.refnum }}"
{% elif lastResponse.parsed.TRANSACTIONID %}
value="{{ lastResponse.parsed.TRANSACTIONID }}"
{% endif %}
{% endif %}
readonly>
</div>
</div>
<div class="form-group">
<label for="inputWaktuTrx" class="col-sm-2 control-label">Time</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputWaktuTrx" value="{{ trx.ts }}" readonly>
</div>
</div>
<div class="form-group">
<label for="inputPengisi" class="col-sm-2 control-label">Member ID</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputPengisi" value="{{ trx.member }}" readonly>
{% if session.isAdmin %}
<br>
<a class="btn btn-default" href="/store-users/view/{{ trx.member }}">Lihat data member</a>
{% endif %}
</div>
</div>
<div class="form-group">
<label for="inputNomorTujuan" class="col-sm-2 control-label">Destination</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputNomorTujuan" value="{{ trx.destination }}" readonly>
</div>
</div>
<div class="form-group">
<label for="inputProduct" class="col-sm-2 control-label">Product</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputProduct" value="{{ trx.product }}" readonly>
</div>
</div>
<div class="form-group">
<label for="inputRemoteProduct" class="col-sm-2 control-label">Remote Product</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputRemoteProduct" value="{{ trx.remoteProduct }}" readonly>
</div>
</div>
<div class="form-group">
<label for="inputRC" class="col-sm-2 control-label">Response Code</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputRC"
{% if lastResponse %}
value="{{ trx.rc }}"
{% endif %}
readonly>
</div>
</div>
<div class="form-group">
<label for="inputMessage" class="col-sm-2 control-label">Supplier Message</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputMessage"
{% if lastResponse %}
{% if lastResponse.parsed.ciwaru.msg %}
value="{{ lastResponse.parsed.ciwaru.msg }}"
{% elif lastResponse.parsed.MESSAGE %}
value="{{ lastResponse.parsed.MESSAGE }}"
{% endif %}
{% endif %}
readonly>
</div>
</div>
{% if lastResponse.parsed.ciwaru.sn %}
<div class="form-group">
<label for="inputSN" class="col-sm-2 control-label">SN</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputSN"
{% if lastResponse %}
value="{{ lastResponse.parsed.ciwaru.sn }}"
{% endif %}
readonly>
</div>
</div>
{% endif %}
{% if lastResponse.parsed.ciwaru.balance %}
<div class="form-group">
<label for="inputBalance" class="col-sm-2 control-label">Balance</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputBalance"
{% if lastResponse %}
value="{{ lastResponse.parsed.ciwaru.balance }}"
{% endif %}
readonly>
</div>
</div>
{% endif %}
</form>
<table class="table">
{% if trx.responses %}
{% for response in trx.responses %}
<tr>
<td>
<strong>{{ response.ts }} ({{ response.supplier }}):</strong><br/>
{{ response.raw }}
</td>
</tr>
{% endfor %}
{% endif %}
</table>
{% endblock %}