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