]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/acq/invoice/view.tt2
I18N: Make everything in tt2 files translatable.
[Evergreen.git] / Open-ILS / src / templates / acq / invoice / view.tt2
1 [% WRAPPER 'base.tt2' %]
2 [% ctx.page_title = l('Invoicing') %]
3 <div dojoType="dijit.layout.ContentPane" style="height:100%">
4
5     <div dojoType="dijit.layout.ContentPane" layoutAlign="client" class='oils-header-panel'>
6         <div>[% l(' Invoice ') %]</div>
7         <div id="acq-view-invoice-receive" class="hidden">
8             <button id="acq-view-invoice-receive-link">[% l('Receive Items') %]</button>
9         </div>
10     </div>
11
12     <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
13         <style>
14             #acq-invoice-num-summary-table td {
15                 padding-right: 8px;
16                 padding-top: 5px;
17                 padding-bottom: 5px;
18                 border-bottom: 2px solid #888;
19             }
20             #acq-invoice-num-summary-table td[id] {
21                 font-weight:bold;
22             }
23         </style>
24         <table id='acq-invoice-num-summary-table'>
25             <tr><td>[% l("Lineitems: " ) %]</td><td id='acq-invoice-summary-count'>0</td></tr>
26             <tr>
27                 <td>[% l("Expected Cost: " ) %]</td>
28                 <td id='acq-invoice-summary-cost'>0.00</td>
29             </tr>
30         </table>
31         <br/>
32     <div>
33
34     <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
35         <div id='acq-invoice-summary'>
36             <button id='acq-invoice-summary-toggle-off'>[% l('Hide Details') %]</button>
37             <span class="hidden" id="ident-validation-spinner"><img src="[% ctx.media_prefix %]/opac/images/progressbar_green.gif" style="height: 16px; width: 16px" /></span>
38             <div id='acq-view-invoice-div'></div>
39         </div>
40         <div id='acq-invoice-summary-small'>
41             <button id='acq-invoice-summary-toggle-on'>[% l('Show Details') %]</button>
42             <span style='font-weight:bold; font-size:120%' id='acq-invoice-summary-name'></span>
43             <br/>
44             <br/>
45         </div>
46     </div>
47
48     <!--
49     <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
50     -->
51
52         <div dojoType="dijit.layout.TabContainer" style="width: 96%; height: 100%;" doLayout='false'>
53             <div dojoType="dijit.layout.ContentPane" 
54                 class='oils-acq-detail-content-pane' title="[% l('Invoice') %]" selected='true'>
55
56                 <script type='dojo/connect' event='onShow'>
57                     // the table is left at display=none on subsequent tab views
58                     dojo.byId('oils-acq-invoice-table').style.display = 'table'
59                 </script>
60
61                 <table id='oils-acq-invoice-table' class='oils-acq-invoice-table'>
62                     <thead/>
63                     <tbody id='acq-invoice-entry-header' class='hidden'>
64                         <tr>
65                             <td colspan='0'>
66                                 <h3>
67                                     [% l('Bibliographic Items') %]
68                                 </h3>
69                             </td>
70                         </tr>
71                     </tbody>
72                     <!-- acq.invoice_entry -->
73                     <thead id='acq-invoice-entry-thead' class='hidden'>
74                         <tr>
75                             <th colspan='2'>[% l('Title Details') %]</th>
76                             <th class='acq-invoice-center-col'>[% l('#&nbsp;Invoiced&nbsp;/&nbsp;#&nbsp;Paid') %]</th>
77                             <th class='acq-invoice-center-col'>[% l('Billed') %]</th>
78                             <th class='acq-invoice-paid-per-copy-col'>[% l('Per Copy') %]</th>
79                             <th class='acq-invoice-paid-col'>[% l('Paid') %]</th>
80                             <th class='acq-invoice-center-col hide-complete'>[% l('Detach') %]</th>
81                         </tr>
82                     </thead>
83                     <tbody id='acq-invoice-entry-tbody' class='hidden'>
84                         <tr id='acq-invoice-entry-template' class='acq-invoice-row'>
85                             <td colspan='2'>
86                                 <div name='title_details'></div>
87                                 <div name='note'></div>
88                             </td>
89                             <td class='acq-invoice-center-col' nowrap='nowrap'>
90                                 <span name='inv_item_count'></span>&nbsp;/&nbsp;<span name='phys_item_count'></span>
91                             </td>
92                             <td class='acq-invoice-billed-col'><div name='cost_billed'></div></td>
93                             <td><div name='amount_paid_per_copy'>0.00</div></td>
94                             <td class='acq-invoice-paid-col'><div name='amount_paid'></div></td>
95                             <td class='acq-invoice-center-col hide-complete'><a href='javascript:void(0);' name='detach'>[% l('Detach') %]</a></td>
96                         </tr>
97                     </tbody>
98                     <tbody>
99                         <tr>
100                             <td  style='margin-top:15px;' colspan='0'>
101                                 <h3>[% l('Direct Charges, Taxes, Fees, etc.') %]</h3>
102                             </td>
103                         </tr>
104                     </tbody>
105                     <!-- acq.invoice_item -->
106                     <thead>
107                         <tr>
108                             <th>[% l('Charge Type') %]</th>
109                             <th class='acq-invoice-center-col'>[% l('Fund') %]</th>
110                             <th>[% l('Title/Description') %]</th>
111                             <th class='acq-invoice-center-col'>[% l('Billed') %]</th>
112                             <th/>
113                             <th class='acq-invoice-paid-col'>[% l('Paid') %]</th>
114                             <th class='acq-invoice-center-col hide-complete'>[% l('Delete') %]</th>
115                         </tr>
116                     </thead>
117                     <tbody id='acq-invoice-item-tbody'>
118                         <tr id='acq-invoice-item-template' class='acq-invoice-row acq-invoice-item-row'>
119                             <td><div name='inv_item_type'></div></td>
120                             <td class='acq-invoice-center-col'><div name='fund'></div></td>
121                             <td><div name='title'></div></td>
122                             <td class='acq-invoice-center-col acq-invoice-billed-col'><div name='cost_billed'></div></td>
123                             <td/>
124                             <td class='acq-invoice-paid-col'><div name='amount_paid'></div></td>
125                             <td class='acq-invoice-center-col hide-complete'><a href='javascript:void(0);' name='delete'>[% l('Delete') %]</a></td>
126                         </tr>
127                     </tbody>
128                     <tbody class='hide-complete'>
129                         <tr>
130                             <td colspan='0'>
131                                 <a href='javascript:void(0);' id='acq-invoice-new-item'>[% l('Add Charge...') %]</a>
132                             </td>
133                         </tr>
134                     </tbody>
135                     <tbody>
136                         <tr>
137                             <td style='margin-top:15px;' colspan='0'> 
138                                 <h3> </h3>
139                             </td>
140                         </tr>
141                     </tbody>
142                     <thead>
143                         <tr>
144                             <th colspan='3'/>
145                             <th class='acq-invoice-center-col acq-invoice-billed-col'>[% l('Total') %]</th>
146                             <th/>
147                             <th class='acq-invoice-paid-col'>[% l('Total') %]</th>
148                             <th class='acq-invoice-center-col acq-invoice-balance-col'>[% l('Balance') %]</th>
149                         </tr>
150                     </thead>
151                     <tbody>
152                         <tr>
153                             <td colspan='3' style='text-align:right;'>
154                                 <button jsId='invoiceSaveButton' class='hide-complete'
155                                     dojoType='dijit.form.Button' onclick='saveChanges();'>[% l('Save') %]</button>
156                                 <button jsId='invoiceSaveButton' class='hide-complete'
157                                     dojoType='dijit.form.Button' onclick='saveChanges({clear:true});'>[% l('Save &amp; Clear') %]</button>
158                                 <button jsId='invoiceProrateButton' class='hide-complete'
159                                     dojoType='dijit.form.Button' onclick='saveChanges({prorate:true});'>[% l('Prorate') %]</button>
160                                 <button jsId='invoiceCloseButton' class='hide-complete'
161                                     dojoType='dijit.form.Button' onclick='saveChanges({close:true});'>[% l('Close') %]</button>
162                                 <span class='hidden' id='acq-invoice-reopen-button-wrapper'>
163                                     <button jsId='invoiceReopenButton' 
164                                         dojoType='dijit.form.Button' onclick='saveChanges({reopen:true});'>[% l('Reopen') %]</button>
165                                 </span>
166                             </td>
167                             <td class='acq-invoice-center-col'><div id='acq-total-invoiced-box'></div></td>
168                             <td/>
169                             <td class='acq-invoice-paid-col'><div id='acq-total-paid-box'></div></td>
170                             <td class='acq-invoice-center-col'><div id='acq-total-balance-box'></div></td>
171                         </tr>
172                     </tbody>
173                 </table>
174             </div> <!-- tab 1 -->
175
176             <div dojoType="dijit.layout.ContentPane" 
177                 class='oils-acq-detail-content-pane' title="[% l('Search') %]">
178     
179                 <script type='dojo/connect' event='onShow'>
180                     // hide summary info when opening the search tab
181                     dojo.byId('acq-invoice-summary-toggle-off').onclick();
182                     renderUnifiedSearch();
183                 </script>
184
185
186                 <!-- slim, inline unified search UI -->
187                 <div id='oils-acq-invoice-search' _class='hidden'>
188
189                     <div id="acq-unified-form">
190                         <div>
191                             [%# TODO - i18n - fix constructed string %]
192                             <label for="acq-unified-result-type">[% l('Search for') %]</label>
193                             <select id="acq-unified-result-type" disabled='disabled'>
194                                 <option value="lineitem">[% l('line items') %]</option>
195                             </select>
196                             <label for="acq-unified-conjunction">[% l('matching') %]</label>
197                             <select id="acq-unified-conjunction">
198                                 <option value="and">[% l('all') %]</option>
199                                 <option value="or">[% l('any') %]</option>
200                             </select>
201                             <label for="acq-unified-conjunction">
202                                 [% l('of the following terms') %]
203                             </label>
204                             <input type="checkbox" id="acq-unified-build-progressively" />
205                             <label for="acq-unified-build-progressively">
206                                 [% l('(building the results list progressively)') %]
207                             </label>
208                         </div>
209                         <div id="acq-unified-terms">
210                             <table id="acq-unified-terms-table">
211                                 <tbody id="acq-unified-terms-tbody">
212                                     <tr id="acq-unified-terms-row-tmpl"
213                                         class="acq-unified-terms-row">
214                                         <td name="selector"
215                                             class="acq-unified-terms-selector"></td>
216                                         <td name="match"
217                                             class="acq-unified-terms-match">
218                                             <select>
219                                                 <option value="">[% l('is') %]</option>
220                                                 <option value="__not">[% l('is NOT') %]</option>
221                                                 <option value="__fuzzy" disabled="disabled">
222                                                     [% l('contains') %]
223                                                 </option>
224                                                 <option value="__not,__fuzzy"
225                                                     disabled="disabled">
226                                                     [% l('does NOT contain') %]
227                                                 </option>
228                                                 <option value="__lte" disabled="disabled">
229                                                     [% l('is on or BEFORE') %]
230                                                 </option>
231                                                 <option value="__gte" disabled="disabled">
232                                                     [% l('is on or AFTER') %]
233                                                 </option>
234                                                 <option value="__in" disabled="disabled">
235                                                     [% l('matches a term from a file') %]
236                                                 </option>
237                                             </select>
238                                         </td>
239                                         <td name="widget"
240                                             class="acq-unified-terms-widget"></td>
241                                         <td name="remove"
242                                             class="acq-unified-terms-remove"></td>
243                                     </tr>
244                                 </tbody>
245                             </table>
246                         </div>
247                         <div id="acq-unified-add-term">
248                             <button onclick="termManager.addRow()">[% l('Add Search Term') %]</button>
249                         </div>
250                         <table width='100%'><tr>
251                             <td align='left'>
252                                 <button onclick="smartSearchSubmitter()">[% l('Search') %]</button>
253                                 <button onclick='addSelectedToInvoice()'>
254                                     [% l('Add Selected Items to Invoice') %]
255                                 </button>
256                                 <span id='acq-inv-search-prev'>
257                                     <a href='javascript:performSearch(-1, true)'>[% l('Previous') %]</a>
258                                 </span>
259                                 <span>
260                                     <a href='javascript:performSearch(1, true)'>[% l('Next') %]</a>
261                                 </span>
262                             </td>
263                             <td align='right'>
264                                 <input type='checkbox' id='acq-invoice-search-sort-title'/>
265                                 [% l('Sort by title') %]
266                                 <span style='padding-left:8px;'>
267                                 <input type='checkbox' id='acq-invoice-search-limit-invoiceable' checked='checked'/>
268                                 [% l('Limit to Invoiceable Items') %]
269                             </td>
270                         </tr></table>
271                     </div> <!-- end search form -->
272                     <div style='border-bottom:1px solid #888;'>
273                         <input type='checkbox' onclick='selectSearchResults()'>&nbsp;[% l('Select All') %]</input>
274                     </div>
275                     <div id='acq-unified-results-no_results'>
276                         <b>[% l('No Results') %]</b>
277                     </div>
278                     <div id='acq-unified-results-lineitem'>
279                         <style>
280                             #acq-invoice-search-results-tbody  { width: 100%; }
281                             #acq-invoice-search-results-tbody td { 
282                                 padding: 5px; 
283                                 border-bottom: 1px solid #888;
284                             }
285                             .search-resutls-select-td {
286                                 padding-right: 8px; border-right: 2px solid #888;
287                             }
288                             .search-results-content-td {
289                                 padding-left: 8px; border-left: 2px solid #888; 
290                             }
291                             .search-results-already-invoiced {
292                                 background-color: #E99;
293                             }
294                         </style>
295                         <table>
296                             <tbody id='acq-invoice-search-results-tbody'>
297                                 <tr id='acq-invoice-search-results-tr'>
298                                     <td class='search-resutls-select-td'>
299                                         <input type='checkbox' name='search-results-checkbox'/>
300                                     </td>
301                                     <td class='search-results-content-td'>
302                                         <div name='search-results-content-div'>
303                                             <img src='[% ctx.media_prefix %]/opac/images/progressbar_green.gif'/>
304                                         </div>
305                                     </td>
306                                 </tr>
307                             </tbody>
308                         </table>
309                     </div>
310                 </div>
311             </div> <!-- tab 2 -->
312         </div> <!-- end tabcontainer -->
313     <!--</div>--> <!-- end contentpane -->
314 </div>
315 <div dojoType='openils.widget.ProgressDialog' jsId='progressDialog'></div>
316 <div jsId='extraItemsDialog' dojoType="dijit.Dialog" title="[% l('Extra Items') %]">
317     <div dojoType="dijit.layout.ContentPane" style='text-align:center;'>
318         <div id='acq-invoice-extra-copies-message'></div>
319         <br/>
320         [% l('Select a fund for the new items: [_1]', '<div id="acq-invoice-extra-copies-fund"></div>') %]
321         <br/><br/>
322         <br/><br/>
323         <span style='padding-right: 10px;'>
324             <button dojoType='dijit.form.Button' jsId='extraCopiesCancel'>[% l('Cancel') %]</button>
325         </span>
326         <button dojoType='dijit.form.Button' jsId='extraCopiesGo'>[% l('Add New Items') %]</button>
327     </div>
328 </div>
329 <script type="text/javascript">
330     var invoiceId = '[% ctx.page_args.0 %]';
331     window.unifiedSearchExternalMode = true;
332 </script>
333 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/acq/common/base64.js"></script>
334 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/acq/search/unified.js"></script>
335 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/acq/invoice/view.js'> </script>
336 [% END %]