Lines 48-178
Link Here
|
48 |
<input type="hidden" name="authcat" value="[% authcat | html %]" /> |
48 |
<input type="hidden" name="authcat" value="[% authcat | html %]" /> |
49 |
<!-- Budget Lines --> |
49 |
<!-- Budget Lines --> |
50 |
|
50 |
|
51 |
[% IF ( budget_lines ) %] |
51 |
<div class="page-section"> |
52 |
|
52 |
|
53 |
[% INCLUDE 'budgets-active-currency.inc' %] |
53 |
[% IF ( budget_lines ) %] |
54 |
[% IF ( show_actual ) %] |
|
|
55 |
<p><strong>Each cell contain both actual and estimated values.</strong></p> |
56 |
[% ELSE %] |
57 |
<p><strong>Cells contain estimated values only.</strong></p> |
58 |
[% END %] |
59 |
|
60 |
<p id="selections"> |
61 |
<strong>Show/hide columns:</strong> <span class="selected"><input type="checkbox" checked="checked" id="showall"/><label for="showall">Show all columns</label></span> <span><input type="checkbox" id="hideall"/><label for="hideall">Hide all columns</label></span> |
62 |
[% FOREACH authvals_ro IN authvals_row %] |
63 |
<span class="selected"><label><input type="checkbox" checked="checked" id="col[% authvals_ro.colnum | html %]">[% authvals_ro.code | html %]</label></span> |
64 |
[% END %] |
65 |
</p> |
66 |
<table id="plan"> |
67 |
<thead> |
68 |
<tr> |
69 |
<th>Fund name</th> |
70 |
<th>Fund total</th> |
71 |
|
54 |
|
72 |
[% FOREACH authvals_ro IN authvals_row %] |
55 |
[% INCLUDE 'budgets-active-currency.inc' %] |
73 |
[% IF ( authvals_ro.display ) %] |
56 |
[% IF ( show_actual ) %] |
74 |
<th id="col[% authvals_ro.code | html %]" class="[% authvals_ro.colnum | html %]"> |
57 |
<p><strong>Each cell contain both actual and estimated values.</strong></p> |
75 |
[% ELSE %] |
|
|
76 |
<th id="col[% authvals_ro.code | html %]" style="display:none;" class="[% authvals_ro.colnum | html %]"> |
77 |
[% END %] |
78 |
|
79 |
[% authvals_ro.code | html %]</th> |
80 |
[% END %] |
81 |
|
82 |
<th class="remaining">Fund remaining</th> |
83 |
<th class="noExport">Actions</th> |
84 |
</tr> |
85 |
</thead> |
86 |
|
87 |
<tbody> |
88 |
[% FOREACH budget_line IN budget_lines %] |
89 |
<tr id="[% budget_line.budget_id | html %]"> |
90 |
[% IF ( budget_line.budget_lock ) %] |
91 |
<td class="locked" title="Fund locked"> |
92 |
[% ELSE %] |
93 |
<td> |
94 |
[% END %] |
95 |
<a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_id=[% budget_line.budget_id | uri %]&budget_period_id=[% budget_period_id | uri %]">[% budget_line.budget_name | html %]</a></td> |
96 |
<td><span id="[% budget_line.budget_amount | html %]">[% budget_line.budget_amount | $Price %] </span> |
97 |
|
98 |
|
99 |
<!-- NEXT DIV ELEMENT IS USED BY JS FOR CALC-ING AUTO-FILL AND ESTIMATED AMOUNTS --> |
100 |
<div style="display:none;" id="budget_tot_[% budget_line.budget_id | html %]">[% budget_line.budget_amount | html %]</div></td> |
101 |
|
102 |
[% FOREACH line IN budget_line.lines %] |
103 |
[% IF ( line.display ) %] |
104 |
<td class="[% line.colnum | html %]"> |
105 |
[% ELSE %] |
58 |
[% ELSE %] |
106 |
<td style="display:none;" class="[% line.colnum | html %]"> |
59 |
<p><strong>Cells contain estimated values only.</strong></p> |
|
|
60 |
[% END %] |
61 |
|
62 |
<p id="selections"> |
63 |
<strong>Show/hide columns:</strong> <span class="selected"><input type="checkbox" checked="checked" id="showall"/><label for="showall">Show all columns</label></span> <span><input type="checkbox" id="hideall"/><label for="hideall">Hide all columns</label></span> |
64 |
[% FOREACH authvals_ro IN authvals_row %] |
65 |
<span class="selected"><label><input type="checkbox" checked="checked" id="col[% authvals_ro.colnum | html %]">[% authvals_ro.code | html %]</label></span> |
107 |
[% END %] |
66 |
[% END %] |
108 |
<table class="invis"> |
67 |
</p> |
|
|
68 |
<table id="plan"> |
69 |
<thead> |
109 |
<tr> |
70 |
<tr> |
110 |
[% IF show_actual %] |
71 |
<th>Fund name</th> |
111 |
<td >[% line.actual_amount | html %]</td> |
72 |
<th>Fund total</th> |
|
|
73 |
[% FOREACH authvals_ro IN authvals_row %] |
74 |
[% IF ( authvals_ro.display ) %] |
75 |
<th id="col[% authvals_ro.code | html %]" class="[% authvals_ro.colnum | html %]"> |
76 |
[% ELSE %] |
77 |
<th id="col[% authvals_ro.code | html %]" style="display:none;" class="[% authvals_ro.colnum | html %]"> |
78 |
[% END %] |
79 |
[% authvals_ro.code | html %]</th> |
112 |
[% END %] |
80 |
[% END %] |
113 |
<td> |
81 |
<th class="remaining">Fund remaining</th> |
114 |
|
82 |
<th class="noExport">Actions</th> |
115 |
[% IF ( line.budget_lock ) %] |
83 |
</tr> |
116 |
[% line.estimated_amount | html %] |
84 |
</thead> |
117 |
<input type="hidden" style="text-align: right;" name="[% line.cell_name | html %]" value="[% line.estimated_amount | html %]" /> |
85 |
|
118 |
[% ELSE %] |
86 |
<tbody> |
119 |
<input type="text" size="6" name="[% line.cell_name | html %]" value="[% line.estimated_amount | html %]" id="budget_[% line.budget_id | html %][% line.colnum | html %]" class="plan_entry plan_entry_[% line.budget_id | html %]" /> |
87 |
[% FOREACH budget_line IN budget_lines %] |
|
|
88 |
<tr id="[% budget_line.budget_id | html %]"> |
89 |
[% IF ( budget_line.budget_lock ) %] |
90 |
<td class="locked" title="Fund locked"> |
91 |
[% ELSE %] |
92 |
<td> |
93 |
[% END %] |
94 |
<a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_id=[% budget_line.budget_id | uri %]&budget_period_id=[% budget_period_id | uri %]">[% budget_line.budget_name | html %]</a></td> |
95 |
<td><span id="[% budget_line.budget_amount | html %]">[% budget_line.budget_amount | $Price %] </span> |
96 |
<!-- NEXT DIV ELEMENT IS USED BY JS FOR CALC-ING AUTO-FILL AND ESTIMATED AMOUNTS --> |
97 |
<div style="display:none;" id="budget_tot_[% budget_line.budget_id | html %]">[% budget_line.budget_amount | html %]</div></td> |
98 |
|
99 |
[% FOREACH line IN budget_line.lines %] |
100 |
[% IF ( line.display ) %] |
101 |
<td class="[% line.colnum | html %]"> |
102 |
[% ELSE %] |
103 |
<td style="display:none;" class="[% line.colnum | html %]"> |
104 |
[% END %] |
105 |
<table class="invis"> |
106 |
<tr> |
107 |
[% IF show_actual %] |
108 |
<td >[% line.actual_amount | html %]</td> |
109 |
[% END %] |
110 |
<td> |
111 |
|
112 |
[% IF ( line.budget_lock ) %] |
113 |
[% line.estimated_amount | html %] |
114 |
<input type="hidden" style="text-align: right;" name="[% line.cell_name | html %]" value="[% line.estimated_amount | html %]" /> |
115 |
[% ELSE %] |
116 |
<input type="text" size="6" name="[% line.cell_name | html %]" value="[% line.estimated_amount | html %]" id="budget_[% line.budget_id | html %][% line.colnum | html %]" class="plan_entry plan_entry_[% line.budget_id | html %]" /> |
117 |
[% END %] |
118 |
|
119 |
</td></tr> |
120 |
</table> |
121 |
</td> |
122 |
[% END %] |
123 |
|
124 |
<td> |
125 |
<table class="invis"> |
126 |
<tr> |
127 |
[% IF show_actual %] |
128 |
[% IF ( budget_line.act_negative ) %] |
129 |
<td style="color: red;"> |
130 |
[% ELSIF ( budget_line.act_positive ) %] |
131 |
<td style="color: green;"> |
132 |
[% ELSE %] |
133 |
<td> |
134 |
[% END %] |
135 |
[% budget_line.budget_act_remain | html %] |
136 |
</td> |
137 |
[% END %] |
138 |
|
139 |
[% IF ( budget_line.est_negative ) %] |
140 |
<td style="color: red;" id="budget_est_[% budget_line.budget_id | html %]"> |
141 |
[% ELSIF ( budget_line.est_positive ) %] |
142 |
<td style="color: green;" id="budget_est_[% budget_line.budget_id | html %]"> |
143 |
[% ELSE %] |
144 |
<td id="budget_est_[% budget_line.budget_id | html %]"> |
145 |
[% END %] |
146 |
[% budget_line.budget_est_remain | $Price %] |
147 |
</td> |
148 |
</tr> |
149 |
</table> |
150 |
</td> |
151 |
|
152 |
<td class="actions"> |
153 |
[% UNLESS ( budget_line.budget_lock ) %] |
154 |
<input type="button" class="auto_fill_row btn btn-default btn-xs" data-budget-id="[% budget_line.budget_id | html %]" value="Auto-fill row"/> |
155 |
<input type="button" class="clear_fields btn btn-default btn-xs" data-budget-id="[% budget_line.budget_id | html %]" value="Clear"> |
156 |
[% ELSE %] |
157 |
<div style="color:red;">not owned</div> |
158 |
[% END %] |
159 |
</td> |
160 |
</tr> |
120 |
[% END %] |
161 |
[% END %] |
121 |
|
162 |
</tbody> |
122 |
</td></tr> |
|
|
123 |
</table> |
124 |
</td> |
125 |
[% END %] |
126 |
|
127 |
<td> |
128 |
<table class="invis"> |
129 |
<tr> |
130 |
[% IF show_actual %] |
131 |
[% IF ( budget_line.act_negative ) %] |
132 |
<td style="color: red;"> |
133 |
[% ELSIF ( budget_line.act_positive ) %] |
134 |
<td style="color: green;"> |
135 |
[% ELSE %] |
136 |
<td> |
137 |
[% END %] |
138 |
[% budget_line.budget_act_remain | html %] |
139 |
</td> |
140 |
[% END %] |
141 |
|
142 |
[% IF ( budget_line.est_negative ) %] |
143 |
<td style="color: red;" id="budget_est_[% budget_line.budget_id | html %]"> |
144 |
[% ELSIF ( budget_line.est_positive ) %] |
145 |
<td style="color: green;" id="budget_est_[% budget_line.budget_id | html %]"> |
146 |
[% ELSE %] |
147 |
<td id="budget_est_[% budget_line.budget_id | html %]"> |
148 |
[% END %] |
149 |
[% budget_line.budget_est_remain | $Price %] |
150 |
</td> |
151 |
</tr> |
152 |
</table> |
163 |
</table> |
153 |
</td> |
|
|
154 |
|
164 |
|
155 |
<td class="actions"> |
165 |
<input type="hidden" name="budget_period_id" value="[% budget_period_id | html %]" /> |
156 |
[% UNLESS ( budget_line.budget_lock ) %] |
166 |
[% IF ( budget_period_locked ) %] |
157 |
<input type="button" class="auto_fill_row btn btn-default btn-xs" data-budget-id="[% budget_line.budget_id | html %]" value="Auto-fill row"/> |
167 |
<!-- <input STYLE="background: gray;" type="submit" value="Save" disabled="disabled"/> --> |
158 |
<input type="button" class="clear_fields btn btn-default btn-xs" data-budget-id="[% budget_line.budget_id | html %]" value="Clear"> |
168 |
[% ELSE %] |
159 |
[% ELSE %] |
169 |
<input type="hidden" name="op" value="save" /> |
160 |
<div style="color:red;">not owned</div> |
170 |
<fieldset class="action"><input type="submit" class="btn btn-primary" value="Save" /></fieldset> |
161 |
[% END %] |
171 |
[% END %] |
162 |
</td> |
|
|
163 |
</tr> |
164 |
[% END %] |
165 |
</tbody> |
166 |
</table> |
167 |
|
168 |
<input type="hidden" name="budget_period_id" value="[% budget_period_id | html %]" /> |
169 |
[% IF ( budget_period_locked ) %] |
170 |
<!-- <input STYLE="background: gray;" type="submit" value="Save" disabled="disabled"/> --> |
171 |
[% ELSE %] |
172 |
<input type="hidden" name="op" value="save" /> |
173 |
<fieldset class="action"><input type="submit" class="btn btn-primary" value="Save" /></fieldset> |
174 |
[% END %] |
175 |
|
172 |
|
|
|
173 |
</div> <!-- /.page-section --> |
176 |
|
174 |
|
177 |
<div id="hide_div"> |
175 |
<div id="hide_div"> |
178 |
[% FOREACH authvals_ro IN authvals_row %] |
176 |
[% FOREACH authvals_ro IN authvals_row %] |