]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/web/templates/default/acq/po/view.tt2
cc4bf1e8c8741980905bc39489ff4a7f0697bc4c
[working/Evergreen.git] / Open-ILS / web / templates / default / acq / po / view.tt2
1 [% WRAPPER 'default/base.tt2' %]
2 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/acq/common/base64.js"></script>
3 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/acq/po/view_po.js'></script>
4 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/acq/po/item_table.js"></script>
5 <div dojoType="dijit.layout.ContentPane" style="height:100%">
6     <div>
7         <div id='oils-acq-picklist-header'>
8             <big>
9                 Purchase Order (<span id="acq-po-view-state"></span>) 
10             </big>
11             <span id='acq-po-activated-on' class='hidden'></span>
12             <table class="oils-generic-table acq-po-info">
13                 <tr>
14                     <th>ID</th><td><a id="acq-po-view-id"/></td>
15                     <th>Prepayment Required?</th>
16                     <td><span id="acq-po-view-prepay"/></td>
17                 </tr>
18                 <tr>
19                     <th>Name</th>
20                     <td><a id="acq-po-view-name" href="javascript:void(0);"
21                         onclick="updatePoName()"></a></td>
22                     <th>Activatable?</th>
23                     <td>
24                         <span id="acq-po-activate-checking"></span>
25                         <a class="hidden" id="acq-po-activate-link" href="javascript:void(0);" onclick="activatePo()">Activate Order</a>
26                     </td>
27                 </tr>
28                 <tr>
29                     <th>Provider</th>
30                     <td><span id="acq-po-view-provider"/></td>
31                     <th>Notes</th>
32                     <td>
33                         <a href="javascript:void(0);"
34                             id="acq-po-view-notes"></a>
35                     </td>
36                 </tr>
37                 <tr>
38                     <th>Total Lineitems</th>
39                     <td><span id="acq-po-view-total-li"/></td>
40                     <th>EDI Messages</th>
41                     <td>
42                         <a href="javascript:void(0);"
43                             id="acq-po-view-edi-messages"></a>
44                     </td>
45                 </tr>
46                 <tr>
47                     <th>Total Estimated</th>
48                     <td>$<span id="acq-po-view-total-estimated"/></td>
49                     <th>History</th>
50                     <td>
51                         <a class="hidden" href="javascript:void(0);"
52                             id="acq-po-view-history">View</a>
53                     </td>
54                 </tr>
55                 <tr>
56                     <th>Total Encumbered</th>
57                     <td>$<span id="acq-po-view-total-enc"/></td>
58                     <th>Invoicing</th>
59                     <td id="acq-po-invoice-stuff" class="hidden">
60                         <button dojoType="dijit.form.Button"
61                             id="acq-po-view-invoice-link">
62                             View Invoices
63                             (<span id="acq-po-view-invoice-count"></span>)
64                         </button> &nbsp;
65                         <button dojoType="dijit.form.Button"
66                             id="acq-po-create-invoice-link">
67                             Create Invoice
68                         </button> &nbsp;
69                         <button dojoType="dijit.form.DropDownButton">
70                             <span>Link Invoice</span>
71                             <div dojoType="dijit.TooltipDialog"
72                                 id="acq-po-link-invoice">
73                                 <script type="dojo/connect" event="onOpen">
74                                     if (!invoiceLinkDialogManager) {
75                                         invoiceLinkDialogManager =
76                                             new InvoiceLinkDialogManager(
77                                                 "po", PO
78                                             );
79                                     }
80                                 </script>
81                                 [% INCLUDE "default/acq/common/inv_dialog.tt2"
82                                     which = "po" %]
83                             </div>
84                         </button>
85                     </td>
86                 </tr>
87                 <tr>
88                     <th>Total Spent</th>
89                     <td>$<span id="acq-po-view-total-spent"/></td>
90                     <th id="acq-po-cancel-label"></th>
91                     <td>
92                         <span id="acq-po-view-cancel-reason"></span>
93                         <span id="acq-po-choose-cancel-reason" class="hidden">
94                             <span dojoType="dijit.form.DropDownButton">
95                                 <span>Cancel order</span>
96                                 <span dojoType="dijit.TooltipDialog">
97                                     <label for="acq-po-cancel-reason">
98                                         Reason:
99                                     </label>
100                                     <span id="acq-po-cancel-reason"></span>
101                                     <button jsId="acqPoCancelReasonSubmit"
102                                         dojoType="dijit.form.Button"
103                                         type="submit">Cancel order</button>
104                                 </span>
105                             </span>
106                         </span>
107                     </td>
108                 </tr>
109                 <tr>
110                     <td colspan='3'>
111                         <a class="hidden" id="acq-po-split" href="javascript:void(0);"
112                             onclick="if (confirm(localeStrings.CONFIRM_SPLIT_PO)) splitPo();">
113                             Split Order by Lineitems
114                         </a>
115                     </td>
116                 </tr>
117             </table>
118         </div>
119     </div>
120     <script type="text/javascript">
121         var poId = "[% ctx.page_args.1 %]";
122         var liFocus = "[% ctx.page_args.0 %]";
123         if (liFocus && !poId) {
124             poId = liFocus;
125             liFocus = null;
126         }
127     </script>
128     [% INCLUDE 'default/acq/common/li_table.tt2' %]
129     [% INCLUDE "default/acq/common/notes.tt2" which = "Po" %]
130     <div class='hidden' id='acq-po-no-lineitems'>
131         <button type='dijit.form.Button' onclick='location.href = oilsBasePath + "/acq/picklist/brief_record?po=" + poId'>
132             Add Brief Record
133         </button>
134     </div>
135     [% INCLUDE "default/acq/po/item_table.tt2" %]
136 </div>
137 [% END %]