trx.view.html
6.58 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
{% 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>
</div>
</div>
<div class="form-group">
<label for="inputStoreUserName" class="col-sm-2 control-label">Member Name</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputStoreUserName" value="{{ storeuser.FULL_NAME }} ({{ storeuser.USER_NAME }})" readonly>
</div>
</div>
<div class="form-group">
<label for="inputEndingBalance" class="col-sm-2 control-label">Ending Balance</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputEndingBalance" value="{{ st24trx.ENDING_BALANCE_FORMATTED }}" readonly>
</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="inputSellingPrice" class="col-sm-2 control-label">Selling Price</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputSellingPrice" value="{{ st24trx.PRICE_FORMATTED }}" 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="inputST24TransStat" class="col-sm-2 control-label">Status on ST24</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputST24TransStat" value="{{ st24trx.TRANS_STAT }}" 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>
<div class="form-group">
<label for="inputST24Message" class="col-sm-2 control-label">Message on ST24</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputST24Message" value="{{ st24trx.MASALAH }}" readonly>
</div>
</div>
<div class="form-group">
<label for="inputSMSCID" class="col-sm-2 control-label">SMSCID</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputSMSCID" value="{{ st24trx.SMSCID }}" 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>
{% if session.isAdmin %}
<br>
<a class="btn btn-primary" href="/store-users/view/{{ trx.member }}">Lihat data member</a>
<a class="btn btn-primary" href="/trx/resend-report/{{ trx.requestId }}">Resend Report ke ST24</a>
{% endif %}
{% endblock %}