Bug 7291: Adds new field aqbooksellers.deliverytime
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / lateorders.tt
index 33473f6..9305ae5 100644 (file)
@@ -1,7 +1,9 @@
+[% USE KohaDates %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Acquisitions &rsaquo; Late orders</title>
 [% INCLUDE 'doc-head-close.inc' %]
 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
+[% INCLUDE 'calendar.inc' %]
 <script type="text/javascript">
 //<![CDATA[
 $(document).ready(function() {
@@ -60,6 +62,7 @@ $(document).ready(function() {
     <table id="late_orders">
         <tr>
             <th>Order Date</th>
+            <th>Estimated delivery date</th>
             <th>Vendor</th>
             <th>Information</th>
             <th>Total cost</th>
@@ -80,6 +83,11 @@ $(document).ready(function() {
                 [% lateorder.orderdate %]
                 ([% lateorder.latesince %] days)
             </td>
+            <td>
+                [% IF ( lateorder.estimateddeliverydate ) %]
+                    [% lateorder.estimateddeliverydate | $KohaDates  %]
+                [% END %]
+            </td>
             <td>
                 [% lateorder.supplier %]
             </td>
@@ -117,7 +125,7 @@ $(document).ready(function() {
         [% END %]
         <tr> 
             <th>Total</th>
-            <th colspan="2">&nbsp;</th>
+            <th colspan="3">&nbsp;</th>
             <th>[% total %]</th>
             <th>&nbsp;</th>
             <th>&nbsp;</th>
@@ -140,7 +148,38 @@ $(document).ready(function() {
 [% FOREACH ERROR_LOO IN ERROR_LOOP %]
 [% IF ( ERROR_LOO.delay_digits ) %]<p class="error">The number of days ([% ERROR_LOO.bad_delay %]) must be a number between 0 and 999.</p>[% END %]
 [% END %]
-<ol><li><label for="delay">Order date:</label><input size="3" maxlength="3" id="delay" type="text" name="delay" value="[% delay %]" /> days ago</li>
+<ol>
+    <li><label for="delay">Order date:</label><input size="3" maxlength="3" id="delay" type="text" name="delay" value="[% delay %]" /> days ago</li>
+    <li><label for="delay">Estimated Delivery date from: </label>
+        <input type="text" size="10" id="estimateddeliverydatefrom" name="estimateddeliverydatefrom" value="[% estimateddeliverydatefrom %]" />
+        <img src="[% themelang %]/lib/calendar/cal.gif" id="openCalendarFrom" style="cursor: pointer;" alt="Show Calendar" />
+        <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
+    </li>
+    <li><label for="delay">To: </label>
+        <input type="text" size="10" id="estimateddeliverydateto" name="estimateddeliverydateto" value="[% estimateddeliverydateto %]" />
+        <img src="[% themelang %]/lib/calendar/cal.gif" id="openCalendarTo" style="cursor: pointer;" alt="Show Calendar" />
+        <script type="text/javascript">
+            // return true if the date is blocked.
+            function disable_from(date) {var limit = get_Calendar_limit(date,'estimateddeliverydatefrom'); return (limit && limit < date);}
+            function disable_to(date) {var limit = get_Calendar_limit(date,'estimateddeliverydateto'); return (limit && limit < date);}
+            Calendar.setup({
+                inputField : "estimateddeliverydatefrom",
+                ifFormat : "[% DHTMLcalendar_dateformat %]",
+                button : "openCalendarFrom",
+                disableFunc : disable_from,
+                dateStatusFunc : disable_from
+            });
+            Calendar.setup({
+                inputField : "estimateddeliverydateto",
+                ifFormat : "[% DHTMLcalendar_dateformat %]",
+                button : "openCalendarTo",
+                disableFunc : disable_to,
+                dateStatusFunc : disable_to
+             });
+        </script>
+        <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
+    </li>
+
        <li><label for="booksellerid">Vendor:</label>
                <select id="booksellerid" size="1" tabindex="" name="booksellerid">
                        <option value=""/>