]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/acq/invoice/view.tt2
a54621abf5aa200abfb5f55d48bbf502fa2da783
[working/Evergreen.git] / Open-ILS / src / templates / acq / invoice / view.tt2
1 [% WRAPPER 'base.tt2' %]
2 [% ctx.page_title = '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> Invoice </div>
7         <div id="acq-view-invoice-receive" class="hidden">
8             <button id="acq-view-invoice-receive-link">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="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'>Title Details</th>
76                             <th class='acq-invoice-center-col'>#&nbsp;Invoiced&nbsp;/&nbsp;#&nbsp;Paid</th>
77                             <th class='acq-invoice-center-col'>Billed</th>
78                             <th class='acq-invoice-paid-per-copy-col'>Per Copy</th>
79                             <th class='acq-invoice-paid-col'>Paid</th>
80                             <th class='acq-invoice-center-col hide-complete'>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'>Detach</a></td>
96                         </tr>
97                     </tbody>
98                     <tbody>
99                         <tr>
100                             <td  style='margin-top:15px;' colspan='0'>
101                                 <h3>Direct Charges, Taxes, Fees, etc.</h3>
102                             </td>
103                         </tr>
104                     </tbody>
105                     <!-- acq.invoice_item -->
106                     <thead>
107                         <tr>
108                             <th>Charge Type</th>
109                             <th class='acq-invoice-center-col'>Fund</th>
110                             <th>Title/Description</th>
111                             <th class='acq-invoice-center-col'>Billed</th>
112                             <th/>
113                             <th class='acq-invoice-paid-col'>Paid</th>
114                             <th class='acq-invoice-center-col hide-complete'>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'>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'>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'>Total</th>
146                             <th/>
147                             <th class='acq-invoice-paid-col'>Total</th>
148                             <th class='acq-invoice-center-col acq-invoice-balance-col'>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="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                             <label for="acq-unified-result-type">[% l('Search for') %]</label>
192                             <select id="acq-unified-result-type" disabled='disabled'>
193                                 <option value="lineitem">line items</option>
194                             </select>
195                             <label for="acq-unified-conjunction">matching</label>
196                             <select id="acq-unified-conjunction">
197                                 <option value="and">all</option>
198                                 <option value="or">any</option>
199                             </select>
200                             <label for="acq-unified-conjunction">
201                                 of the following terms:
202                             </label>
203                         </div>
204                         <div id="acq-unified-terms">
205                             <table id="acq-unified-terms-table">
206                                 <tbody id="acq-unified-terms-tbody">
207                                     <tr id="acq-unified-terms-row-tmpl"
208                                         class="acq-unified-terms-row">
209                                         <td name="selector"
210                                             class="acq-unified-terms-selector"></td>
211                                         <td name="match"
212                                             class="acq-unified-terms-match">
213                                             <select>
214                                                 <option value="">is</option>
215                                                 <option value="__not">is NOT</option>
216                                                 <option value="__fuzzy" disabled="disabled">
217                                                     contains
218                                                 </option>
219                                                 <option value="__not,__fuzzy"
220                                                     disabled="disabled">
221                                                     does NOT contain
222                                                 </option>
223                                                 <option value="__lte" disabled="disabled">
224                                                     is on or BEFORE
225                                                 </option>
226                                                 <option value="__gte" disabled="disabled">
227                                                     is on or AFTER
228                                                 </option>
229                                                 <option value="__in" disabled="disabled">
230                                                     matches a term from a file
231                                                 </option>
232                                             </select>
233                                         </td>
234                                         <td name="widget"
235                                             class="acq-unified-terms-widget"></td>
236                                         <td name="remove"
237                                             class="acq-unified-terms-remove"></td>
238                                     </tr>
239                                 </tbody>
240                             </table>
241                         </div>
242                         <div id="acq-unified-add-term">
243                             <button onclick="termManager.addRow()">Add Search Term</button>
244                         </div>
245                         <table width='100%'><tr>
246                             <td align='left'>
247                                 <button onclick="performSearch(0)">[% l('Search') %]</button>
248                                 <button onclick='addSelectedToInvoice()'>
249                                     [% l('Add Selected Items to Invoice') %]
250                                 </button>
251                                 <span id='acq-inv-search-prev'>
252                                     <a href='javascript:performSearch(-1)'>[% l('Previous') %]</a>
253                                 </span>
254                                 <span>
255                                     <a href='javascript:performSearch(1)'>[% l('Next') %]</a>
256                                 </span>
257                             </td>
258                             <td align='right'>
259                                 <input type='checkbox' id='acq-invoice-search-sort-title'/>
260                                 [% l('Sort by title') %]
261                                 <span style='padding-left:8px;'>
262                                 <input type='checkbox' id='acq-invoice-search-limit-invoiceable' checked='checked'/>
263                                 [% l('Limit to Invoiceable Items') %]
264                             </td>
265                         </tr></table>
266                     </div> <!-- end search form -->
267                     <div style='border-bottom:1px solid #888;'>
268                         <input type='checkbox' onclick='selectSearchResults()'>&nbsp;[% l('Select All') %]</input>
269                     </div>
270                     <div id='acq-unified-results-no_results'>
271                         <b>[% l('No Results') %]</b>
272                     </div>
273                     <div id='acq-unified-results-lineitem'>
274                         <style>
275                             #acq-invoice-search-results-tbody  { width: 100%; }
276                             #acq-invoice-search-results-tbody td { 
277                                 padding: 5px; 
278                                 border-bottom: 1px solid #888;
279                             }
280                             .search-resutls-select-td {
281                                 padding-right: 8px; border-right: 2px solid #888;
282                             }
283                             .search-results-content-td {
284                                 padding-left: 8px; border-left: 2px solid #888; 
285                             }
286                             .search-results-already-invoiced {
287                                 background-color: #E99;
288                             }
289                         </style>
290                         <table>
291                             <tbody id='acq-invoice-search-results-tbody'>
292                                 <tr id='acq-invoice-search-results-tr'>
293                                     <td class='search-resutls-select-td'>
294                                         <input type='checkbox' name='search-results-checkbox'/>
295                                     </td>
296                                     <td class='search-results-content-td'>
297                                         <div name='search-results-content-div'>
298                                             <img src='[% ctx.media_prefix %]/opac/images/progressbar_green.gif'/>
299                                         </div>
300                                     </td>
301                                 </tr>
302                             </tbody>
303                         </table>
304                     </div>
305                 </div>
306             </div> <!-- tab 2 -->
307         </div> <!-- end tabcontainer -->
308     <!--</div>--> <!-- end contentpane -->
309 </div>
310 <div dojoType='openils.widget.ProgressDialog' jsId='progressDialog'></div>
311 <div jsId='extraItemsDialog' dojoType="dijit.Dialog" title="Extra Items">
312     <div dojoType="dijit.layout.ContentPane" style='text-align:center;'>
313         <div id='acq-invoice-extra-copies-message'></div>
314         <br/>
315         Select a fund for the new items: <div id='acq-invoice-extra-copies-fund'></div>
316         <br/><br/>
317         <br/><br/>
318         <span style='padding-right: 10px;'>
319             <button dojoType='dijit.form.Button' jsId='extraCopiesCancel'>Cancel</button>
320         </span>
321         <button dojoType='dijit.form.Button' jsId='extraCopiesGo'>Add New Items</button>
322     </div>
323 </div>
324 <script type="text/javascript">
325     var invoiceId = '[% ctx.page_args.0 %]';
326     window.unifiedSearchExternalMode = true;
327 </script>
328 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/acq/common/base64.js"></script>
329 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/acq/search/unified.js"></script>
330 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/acq/invoice/view.js'> </script>
331 [% END %]