Lines 36-77
Link Here
|
36 |
<fieldset class="rows"> |
36 |
<fieldset class="rows"> |
37 |
<ol> |
37 |
<ol> |
38 |
<li> |
38 |
<li> |
39 |
<label for="shipmentdate" class="required">Invoice number:</label> |
|
|
40 |
[% IF readonly %] |
39 |
[% IF readonly %] |
|
|
40 |
<label for="shipmentdate">Invoice number:</label> |
41 |
[% invoicenumber | html %] |
41 |
[% invoicenumber | html %] |
42 |
[% ELSE %] |
42 |
[% ELSE %] |
|
|
43 |
<label for="shipmentdate" class="required">Invoice number:</label> |
43 |
<input type="text" id="invoicenumber" name="invoicenumber" value="[% invoicenumber | html %]" class="required" required="required"/> |
44 |
<input type="text" id="invoicenumber" name="invoicenumber" value="[% invoicenumber | html %]" class="required" required="required"/> |
44 |
<span class="required">Required</span> |
45 |
<span class="required">Required</span> |
45 |
[% END %] |
46 |
[% END %] |
46 |
</li> |
47 |
</li> |
47 |
|
48 |
|
48 |
<li><label for="shipmentdate">Shipment date:</label> |
49 |
<li> |
49 |
<input type="text" size="10" id="shipmentdate" name="shipmentdate" value="[% shipmentdate | $KohaDates %]" class="datepicker" /></li> |
50 |
<label for="shipmentdate">Shipment date:</label> |
50 |
|
51 |
[% IF readonly %] |
51 |
<li><label for="billingdate">Billing date:</label> |
52 |
[% shipmentdate | $KohaDates %] |
52 |
<input type="text" size="10" id="billingdate" name="billingdate" value="[% billingdate | $KohaDates %]" class="datepicker" /></li> |
53 |
[% ELSE %] |
53 |
|
54 |
<input type="text" size="10" id="shipmentdate" name="shipmentdate" value="[% shipmentdate | $KohaDates %]" class="datepicker" /> |
54 |
<li><label for="shipmentcost">Shipping cost:</label> |
55 |
[% END %] |
55 |
<input type="text" size="10" id="shipmentcost" name="shipmentcost" value="[% shipmentcost | $Price on_editing => 1 %]" /></li> |
56 |
</li> |
56 |
|
57 |
|
57 |
<li> |
58 |
<li> |
58 |
<label for="shipment_budget_id">Shipping fund: </label> |
59 |
<label for="billingdate">Billing date:</label> |
59 |
<select id="shipment_budget_id" name="shipment_budget_id"> |
60 |
[% IF readonly %] |
60 |
<option value="">No fund</option> |
61 |
[% billingdate | $KohaDates %] |
61 |
[% FOREACH budget IN budgets %] |
62 |
[% ELSE %] |
62 |
[% IF ( budget.selected ) %] |
63 |
<input type="text" size="10" id="billingdate" name="billingdate" value="[% billingdate | $KohaDates %]" class="datepicker" /> |
63 |
<option value="[% budget.b_id | html %]" selected="selected">[% budget.b_txt | html %] [% IF ( !budget.b_active ) %](inactive)[% END %]</option> |
|
|
64 |
[% ELSIF ( budget.b_active ) %] |
65 |
<option value="[% budget.b_id | html %]">[% budget.b_txt | html %]</option> |
66 |
[% ELSE %] |
67 |
<option value="[% budget.b_id | html %]" class="b_inactive">[% budget.b_txt | html %] (inactive)</option> |
68 |
[% END %] |
69 |
[% END %] |
64 |
[% END %] |
70 |
</select> |
65 |
</li> |
71 |
<label for="showallfunds" style="float:none;width:auto;"> Show inactive:</label> |
|
|
72 |
<input type="checkbox" id="showallfunds" /> |
73 |
|
66 |
|
74 |
</li> |
67 |
<li> |
|
|
68 |
<label for="shipmentcost">Shipping cost:</label> |
69 |
[% IF readonly %] |
70 |
[% shipmentcost | $Price %] |
71 |
[% ELSE %] |
72 |
<input type="text" size="10" id="shipmentcost" name="shipmentcost" value="[% shipmentcost | $Price on_editing => 1 %]" /> |
73 |
[% END %] |
74 |
</li> |
75 |
<li> |
76 |
<label for="shipment_budget_id">Shipping fund: </label> |
77 |
[% IF readonly %] |
78 |
[% budget.budget_name | html %] |
79 |
[% ELSE %] |
80 |
<select id="shipment_budget_id" name="shipment_budget_id"> |
81 |
<option value="">No fund</option> |
82 |
[% FOREACH budget IN budgets %] |
83 |
[% IF ( budget.selected ) %] |
84 |
<option value="[% budget.b_id | html %]" selected="selected">[% budget.b_txt | html %] [% IF ( !budget.b_active ) %](inactive)[% END %]</option> |
85 |
[% ELSIF ( budget.b_active ) %] |
86 |
<option value="[% budget.b_id | html %]">[% budget.b_txt | html %]</option> |
87 |
[% ELSE %] |
88 |
<option value="[% budget.b_id | html %]" class="b_inactive">[% budget.b_txt | html %] (inactive)</option> |
89 |
[% END %] |
90 |
[% END %] |
91 |
</select> |
92 |
<label for="showallfunds" style="float:none;width:auto;"> Show inactive:</label> |
93 |
<input type="checkbox" id="showallfunds" /> |
94 |
[% END %] |
95 |
</li> |
75 |
|
96 |
|
76 |
[% IF ( invoiceclosedate ) %] |
97 |
[% IF ( invoiceclosedate ) %] |
77 |
<li><span class="label">Status:</span> |
98 |
<li><span class="label">Status:</span> |
Lines 79-98
Link Here
|
79 |
|
100 |
|
80 |
<li> |
101 |
<li> |
81 |
<label for="reopen">Reopen: </label> |
102 |
<label for="reopen">Reopen: </label> |
82 |
[% IF CAN_user_acquisition_reopen_closed_invoices %] |
103 |
[% IF CAN_user_acquisition_reopen_closed_invoices AND NOT readonly %] |
83 |
<input type="checkbox" name="reopen" id="reopen" /> |
104 |
<input type="checkbox" name="reopen" id="reopen" /> |
84 |
[% ELSE %] |
105 |
[% ELSE %] |
85 |
<input type="checkbox" name="reopen" id="reopen" readonly="readonly" /> |
106 |
<input type="checkbox" name="reopen" id="reopen" readonly="disabled" /> |
86 |
[% END %] |
107 |
[% END %] |
87 |
</li> |
108 |
</li> |
88 |
[% ELSE %] |
109 |
[% ELSE %] |
89 |
<li><span class="label">Status:</span> |
110 |
<li><span class="label">Status:</span> |
90 |
Open</li> |
111 |
Open</li> |
91 |
|
112 |
|
92 |
<li><label for="close">Close: </label> <input type="checkbox" name="close" id="close" /> |
113 |
<li><label for="close">Close: </label> <input type="checkbox" name="close" id="close" /> |
93 |
</li> |
114 |
</li> |
94 |
[% END %] |
115 |
[% END %] |
95 |
</ol> |
116 |
</ol> |
|
|
117 |
[% UNLESS readonly %] |
96 |
<input type="hidden" name="op" value="mod" /> |
118 |
<input type="hidden" name="op" value="mod" /> |
97 |
<input type="hidden" name="invoiceid" value="[% invoiceid | html %]" /> |
119 |
<input type="hidden" name="invoiceid" value="[% invoiceid | html %]" /> |
98 |
<fieldset class="action"> |
120 |
<fieldset class="action"> |
Lines 101-106
Link Here
|
101 |
<a href="invoice.pl?op=delete&invoiceid=[% invoiceid | uri %]" id="delete">Delete</a> |
123 |
<a href="invoice.pl?op=delete&invoiceid=[% invoiceid | uri %]" id="delete">Delete</a> |
102 |
[% END %] |
124 |
[% END %] |
103 |
</fieldset> |
125 |
</fieldset> |
|
|
126 |
[% END %] |
104 |
</fieldset> |
127 |
</fieldset> |
105 |
</form> |
128 |
</form> |
106 |
|
129 |
|
Lines 120-247
Link Here
|
120 |
<th>Note</th> |
143 |
<th>Note</th> |
121 |
<th>Fund</th> |
144 |
<th>Fund</th> |
122 |
<th>Encumber while invoice open</th> |
145 |
<th>Encumber while invoice open</th> |
123 |
<th> </th> |
146 |
[% UNLESS readonly %]<th> </th>[% END %] |
124 |
</tr> |
147 |
</tr> |
125 |
[% total_adj = 0 %] |
148 |
[% total_adj = 0 %] |
126 |
[% FOREACH adjustment IN adjustments %] |
149 |
[% FOREACH adjustment IN adjustments %] |
127 |
[% total_adj = total_adj + adjustment.adjustment %] |
150 |
[% total_adj = total_adj + adjustment.adjustment %] |
128 |
<tr> |
151 |
<tr> |
129 |
<td><input type="hidden" name="adjustment_id" value="[% adjustment.adjustment_id | html %]" />[% adjustment.adjustment_id | html %]</td> |
152 |
<td><input type="hidden" name="adjustment_id" value="[% adjustment.adjustment_id | html %]" />[% adjustment.adjustment_id | html %]</td> |
130 |
<td><input type="text" name="adjustment" id="adjustment_[% adjustment.adjustment_id | html %]" value="[% adjustment.adjustment | $Price on_editing => 1 %]" /></td> |
|
|
131 |
<td> |
153 |
<td> |
132 |
[% reasons = AuthorisedValues.Get("ADJ_REASON") %] |
154 |
[% IF readonly %] |
133 |
[% IF reasons.0 %] |
155 |
[% adjustment.adjustment | $Price %] |
134 |
<select id="reason_[% adjustment.adjustment_id | html %]" name="reason"> |
156 |
[% ELSE %] |
135 |
<option value="">No reason</option> |
157 |
<input type="text" name="adjustment" id="adjustment_[% adjustment.adjustment_id | html %]" value="[% adjustment.adjustment | $Price on_editing => 1 %]" /> |
136 |
[% FOREACH reason IN reasons %] |
158 |
[% END %] |
137 |
[% IF ( adjustment.reason == reason.authorised_value ) %] |
159 |
</td> |
138 |
<option selected="selected" value="[% reason.authorised_value | html %]"> |
160 |
<td> |
139 |
[% ELSE %] |
161 |
[% IF readonly %] |
140 |
<option value="[% reason.authorised_value | html %]"> |
162 |
[% AuthorisedValues.GetByCode('ADJ_REASON', adjustment.reason) | html %] |
|
|
163 |
[% ELSE %] |
164 |
[% reasons = AuthorisedValues.Get("ADJ_REASON") %] |
165 |
[% IF reasons.0 %] |
166 |
<select id="reason_[% adjustment.adjustment_id | html %]" name="reason"> |
167 |
<option value="">No reason</option> |
168 |
[% FOREACH reason IN reasons %] |
169 |
[% IF ( adjustment.reason == reason.authorised_value ) %] |
170 |
<option selected="selected" value="[% reason.authorised_value | html %]"> |
171 |
[% ELSE %] |
172 |
<option value="[% reason.authorised_value | html %]"> |
173 |
[% END %] |
174 |
[% reason.lib | html %] |
175 |
</option> |
141 |
[% END %] |
176 |
[% END %] |
142 |
[% reason.lib | html %] |
177 |
</select> |
143 |
</option> |
178 |
[% ELSE %] |
144 |
[% END %] |
179 |
<p title="Define values in authorised value category ADJ_REASON to enable">None</p> |
145 |
</select> |
180 |
<input type="hidden" name="reason" id="reason_[% adjustment.adjustment_id | html %]" value="" /> |
|
|
181 |
[% END %] |
182 |
[% END %] |
183 |
</td> |
184 |
<td> |
185 |
[% IF readonly %] |
186 |
[% adjustment.note | html %] |
146 |
[% ELSE %] |
187 |
[% ELSE %] |
147 |
<p title="Define values in authorised value category ADJ_REASON to enable">None</p> |
188 |
<input type="text" name="note" id="note_new" value="[% adjustment.note | html %]"/> |
148 |
<input type="hidden" name="reason" id="reason_[% adjustment.adjustment_id | html %]" value="" /> |
189 |
[% END %] |
149 |
[% END %] |
|
|
150 |
</td> |
190 |
</td> |
151 |
<td><input type="text" name="note" id="note_new" value="[% adjustment.note | html %]"/></td> |
|
|
152 |
<td> |
191 |
<td> |
153 |
<select id="budget_id_[% adjustment.adjustment_id | html %]" name="budget_id"> |
192 |
[% IF readonly %] |
|
|
193 |
[% adjustement.fund.budget_name | html %] |
194 |
[% ELSE %] |
195 |
<select id="budget_id_[% adjustment.adjustment_id | html %]" name="budget_id"> |
154 |
<option value="">No fund</option> |
196 |
<option value="">No fund</option> |
155 |
[% FOREACH budget IN budgets %] |
197 |
[% FOREACH budget IN budgets %] |
156 |
[% IF ( budget.b_id == adjustment.budget_id ) %] |
198 |
[% IF ( budget.b_id == adjustment.budget_id ) %] |
157 |
<option selected="selected" value="[% budget.b_id | html %]"> |
199 |
<option selected="selected" value="[% budget.b_id | html %]"> |
158 |
[% ELSE %] |
200 |
[% ELSE %] |
159 |
<option value="[% budget.b_id | html %]"> |
201 |
<option value="[% budget.b_id | html %]"> |
|
|
202 |
[% END %] |
203 |
[% budget.b_txt | html %] |
204 |
</option> |
160 |
[% END %] |
205 |
[% END %] |
161 |
[% budget.b_txt | html %] |
206 |
</select> |
162 |
</option> |
207 |
[% END %] |
163 |
[% END %] |
|
|
164 |
</select> |
165 |
</td> |
208 |
</td> |
166 |
[% IF adjustment.encumber_open %] |
209 |
[% IF adjustment.encumber_open %] |
167 |
<td> |
210 |
<td> |
|
|
211 |
[% IF readonly %] |
212 |
<input type="checkbox" checked="checked" readonly="readonly" /> |
213 |
[% ELSE %] |
168 |
<input type="checkbox" name="encumber_open" id="encumber_[% adjustment.adjustment_id | html %]" value="[% adjustment.adjustment_id | html %]" checked/> |
214 |
<input type="checkbox" name="encumber_open" id="encumber_[% adjustment.adjustment_id | html %]" value="[% adjustment.adjustment_id | html %]" checked/> |
|
|
215 |
[% END %] |
169 |
</td> |
216 |
</td> |
170 |
[% ELSE %] |
217 |
[% ELSE %] |
171 |
<td> |
218 |
<td> |
|
|
219 |
[% IF readonly %] |
220 |
<input type="checkbox" disabled="disabled" /> |
221 |
[% ELSE %] |
172 |
<input type="checkbox" name="encumber_open" id="encumber_[% adjustment.adjustment_id | html %]" value="[% adjustment.adjustment_id | html %]" /> |
222 |
<input type="checkbox" name="encumber_open" id="encumber_[% adjustment.adjustment_id | html %]" value="[% adjustment.adjustment_id | html %]" /> |
|
|
223 |
[% END %] |
224 |
</td> |
225 |
[% END %] |
226 |
[% UNLESS readonly %] |
227 |
<td> |
228 |
<a class="btn btn-default btn-xs delete_adjustment" href="/cgi-bin/koha/acqui/invoice.pl?op=del_adj&adjustment_id=[% adjustment.adjustment_id | html %]&invoiceid=[% invoiceid | html %]"><i class="fa fa-trash"></i> Delete</a> |
173 |
</td> |
229 |
</td> |
174 |
[% END %] |
230 |
[% END %] |
175 |
<td> |
|
|
176 |
<a class="btn btn-default btn-xs delete_adjustment" href="/cgi-bin/koha/acqui/invoice.pl?op=del_adj&adjustment_id=[% adjustment.adjustment_id | html %]&invoiceid=[% invoiceid | html %]"><i class="fa fa-trash"></i> Delete</a> |
177 |
</td> |
178 |
</tr> |
231 |
</tr> |
179 |
[% END %] |
232 |
[% END %] |
180 |
</table> |
233 |
</table> |
181 |
[% END %] |
234 |
[% END %] |
182 |
|
235 |
|
183 |
<p> |
236 |
[% UNLESS readonly %] |
184 |
<a href="#" id="show_invoice_adjustment" class="toggle_invoice_adjustment"><i class="fa fa-plus"></i> Add an adjustment</a> |
237 |
<p> |
185 |
</p> |
238 |
<a href="#" id="show_invoice_adjustment" class="toggle_invoice_adjustment"><i class="fa fa-plus"></i> Add an adjustment</a> |
|
|
239 |
</p> |
186 |
|
240 |
|
187 |
<fieldset id="add_invoice_adjustment" style="display:none"> |
241 |
<fieldset id="add_invoice_adjustment" style="display:none"> |
188 |
<h4>Add an adjustment</h4> |
242 |
<h4>Add an adjustment</h4> |
189 |
<input type="hidden" name="adjustment_id" value="new" /> |
243 |
<input type="hidden" name="adjustment_id" value="new" /> |
190 |
<ol> |
244 |
<ol> |
191 |
<li> |
|
|
192 |
<label for="adjustment_new">Amount: </label> |
193 |
<input type="text" name="adjustment" id="adjustment_new" /> |
194 |
</li> |
195 |
[% reasons = AuthorisedValues.Get("ADJ_REASON") %] |
196 |
[% IF reasons.0 %] |
197 |
<li> |
245 |
<li> |
198 |
<label for="reason_[% adjustment.adjustment_id | html %]">Reason: </label> |
246 |
<label for="adjustment_new">Amount: </label> |
199 |
<select id="reason_[% adjustment.adjustment_id | html %]" name="reason"> |
247 |
<input type="text" name="adjustment" id="adjustment_new" /> |
200 |
<option value="">No reason</option> |
248 |
</li> |
201 |
[% FOREACH reason IN reasons %] |
249 |
[% reasons = AuthorisedValues.Get("ADJ_REASON") %] |
202 |
<option value="[% reason.authorised_value | html %]"> |
250 |
[% IF reasons.0 %] |
203 |
[% reason.lib | html %] |
251 |
<li> |
|
|
252 |
<label for="reason_[% adjustment.adjustment_id | html %]">Reason: </label> |
253 |
<select id="reason_[% adjustment.adjustment_id | html %]" name="reason"> |
254 |
<option value="">No reason</option> |
255 |
[% FOREACH reason IN reasons %] |
256 |
<option value="[% reason.authorised_value | html %]"> |
257 |
[% reason.lib | html %] |
258 |
</option> |
259 |
[% END %] |
260 |
</select> |
261 |
</li> |
262 |
[% ELSE %] |
263 |
<li> |
264 |
<span class="label">Reason: </span> |
265 |
<span>None</span> |
266 |
<div class="hint">Define values in authorised value category ADJ_REASON to enable</div> |
267 |
</li> |
268 |
[% END %] |
269 |
<li> |
270 |
<label for="note_new">Note: </label> |
271 |
<input type="text" name="note" id="note_new" value=""/> |
272 |
</li> |
273 |
<li> |
274 |
<label for="budget_id_new">Fund: </label> |
275 |
<select id="budget_id_new" name="budget_id"> |
276 |
<option selected="selected" value="">No fund</option> |
277 |
[% FOREACH budget IN budgets %] |
278 |
<option value="[% budget.b_id | html %]"> |
279 |
[% budget.b_txt | html %] |
204 |
</option> |
280 |
</option> |
205 |
[% END %] |
281 |
[% END %] |
206 |
</select> |
282 |
</select> |
207 |
</li> |
283 |
</li> |
208 |
[% ELSE %] |
|
|
209 |
<li> |
284 |
<li> |
210 |
<span class="label">Reason: </span> |
285 |
<label for="encumber_new">Encumber while invoice open? </label> |
211 |
<span>None</span> |
286 |
<input type="checkbox" name="encumber_open" id="encumber_new" value="new" /> |
212 |
<div class="hint">Define values in authorised value category ADJ_REASON to enable</div> |
287 |
<input type="hidden" name="delete" value=""> |
213 |
</li> |
288 |
</li> |
214 |
[% END %] |
289 |
<li> |
215 |
<li> |
290 |
<span class="label"> </span> |
216 |
<label for="note_new">Note: </label> |
291 |
<a href="#" id="cancel_invoice_adjustment" class="toggle_invoice_adjustment" style="display:none"><i class="fa fa-remove"></i> Cancel</a> |
217 |
<input type="text" name="note" id="note_new" value=""/> |
292 |
</li> |
218 |
</li> |
293 |
</ol> |
219 |
<li> |
294 |
</fieldset> |
220 |
<label for="budget_id_new">Fund: </label> |
295 |
<fieldset class="action"> |
221 |
<select id="budget_id_new" name="budget_id"> |
296 |
<input type="hidden" name="op" value="mod_adj" /> |
222 |
<option selected="selected" value="">No fund</option> |
297 |
<input type="submit" value="Update adjustments" /> |
223 |
[% FOREACH budget IN budgets %] |
298 |
</fieldset> |
224 |
<option value="[% budget.b_id | html %]"> |
299 |
[% END %] |
225 |
[% budget.b_txt | html %] |
|
|
226 |
</option> |
227 |
[% END %] |
228 |
</select> |
229 |
</li> |
230 |
<li> |
231 |
<label for="encumber_new">Encumber while invoice open? </label> |
232 |
<input type="checkbox" name="encumber_open" id="encumber_new" value="new" /> |
233 |
<input type="hidden" name="delete" value=""> |
234 |
</li> |
235 |
<li> |
236 |
<span class="label"> </span> |
237 |
<a href="#" id="cancel_invoice_adjustment" class="toggle_invoice_adjustment" style="display:none"><i class="fa fa-remove"></i> Cancel</a> |
238 |
</li> |
239 |
</ol> |
240 |
</fieldset> |
241 |
<fieldset class="action"> |
242 |
<input type="hidden" name="op" value="mod_adj" /> |
243 |
<input type="submit" value="Update adjustments" /> |
244 |
</fieldset> |
245 |
</fieldset> |
300 |
</fieldset> |
246 |
</form> |
301 |
</form> |
247 |
<p> |
302 |
<p> |