[Koha-patches] [PATCH 1/1] Bug 7291: Adds new field aqbooksellers.deliverytime

Jonathan Druart jonathan.druart at biblibre.com
Wed Feb 22 10:32:57 CET 2012


New field deliverytime in aqbooksellers table. It is an estimated
delivery time for orders (in days).
You can set this delay on the supplier modification page.
It is used in the late orders search.

The order estimated date is the aqbasket.closedate +
aqbooksellers.deliverytime

If you set a delay, the query check if closedate <= today - delay

If you set a "delivery time from" and a "delivery time to", the query check if
$delivery_time_from <= aqbooksellers.deliverytime is not NULL and if
closedate + deliverytime >= $delivery_time_to
if there is not a time_to then $delivery_time_to = the current date.
---
 C4/Acquisition.pm                                  |   28 ++++++++-
 C4/Bookseller.pm                                   |   61 +++++++++++++++-----
 acqui/basket.pl                                    |   11 ++++
 acqui/lateorders.pl                                |   21 +++++--
 acqui/supplier.pl                                  |    2 +
 acqui/updatesupplier.pl                            |    1 +
 installer/data/mysql/kohastructure.sql             |    1 +
 installer/data/mysql/updatedatabase.pl             |    7 ++
 .../intranet-tmpl/prog/en/modules/acqui/basket.tt  |    2 +
 .../prog/en/modules/acqui/lateorders.tt            |   41 +++++++++++++-
 .../prog/en/modules/acqui/supplier.tt              |    8 +++
 11 files changed, 157 insertions(+), 26 deletions(-)

diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm
index 0a96a02..c6220c1 100644
--- a/C4/Acquisition.pm
+++ b/C4/Acquisition.pm
@@ -1438,13 +1438,15 @@ sub GetLateOrders {
     my $delay      = shift;
     my $supplierid = shift;
     my $branch     = shift;
+    my $estimateddeliverydatefrom = shift;
+    my $estimateddeliverydateto = shift;
 
     my $dbh = C4::Context->dbh;
 
     #BEWARE, order of parenthesis and LEFT JOIN is important for speed
     my $dbdriver = C4::Context->config("db_scheme") || "mysql";
 
-    my @query_params = ($delay);	# delay is the first argument regardless
+    my @query_params = ();
     my $select = "
     SELECT aqbasket.basketno,
         aqorders.ordernumber,
@@ -1460,6 +1462,7 @@ sub GetLateOrders {
         biblio.author, biblio.title,
         biblioitems.publishercode AS publisher,
         biblioitems.publicationyear,
+        ADDDATE(aqbasket.closedate, INTERVAL aqbooksellers.deliverytime DAY) AS estimateddeliverydate,
     ";
     my $from = "
     FROM
@@ -1473,6 +1476,7 @@ sub GetLateOrders {
             OR datereceived IS NULL
             OR aqorders.quantityreceived < aqorders.quantity
         )
+        AND aqbasket.closedate IS NOT NULL
         AND (aqorders.datecancellationprinted IS NULL OR aqorders.datecancellationprinted='0000-00-00')
     ";
     my $having = "";
@@ -1482,7 +1486,10 @@ sub GetLateOrders {
         (aqorders.quantity - IFNULL(aqorders.quantityreceived,0)) * aqorders.rrp AS subtotal,
         DATEDIFF(CURDATE( ),closedate) AS latesince
         ";
-        $from .= " AND (closedate <= DATE_SUB(CURDATE( ),INTERVAL ? DAY)) ";
+        if ( defined $delay ) {
+            $from .= " AND (closedate <= DATE_SUB(CURDATE( ),INTERVAL ? DAY)) " ;
+            push @query_params, $delay;
+        }
         $having = "
         HAVING quantity          <> 0
             AND unitpricesupplier <> 0
@@ -1495,7 +1502,10 @@ sub GetLateOrders {
                 aqorders.quantity * aqorders.rrp AS subtotal,
                 (CURDATE - closedate)            AS latesince
         ";
-        $from .= " AND (closedate <= (CURDATE -(INTERVAL ? DAY)) ";
+        if ( defined $delay ) {
+            $from .= " AND (closedate <= (CURDATE -(INTERVAL ? DAY)) ";
+            push @query_params, $delay;
+        }
     }
     if (defined $supplierid) {
         $from .= ' AND aqbasket.booksellerid = ? ';
@@ -1505,6 +1515,18 @@ sub GetLateOrders {
         $from .= ' AND borrowers.branchcode LIKE ? ';
         push @query_params, $branch;
     }
+    if ( defined $estimateddeliverydatefrom ) {
+        $from .= '
+            AND aqbooksellers.deliverytime IS NOT NULL
+            AND ADDDATE(aqbasket.closedate, INTERVAL aqbooksellers.deliverytime DAY) >= ?';
+        push @query_params, $estimateddeliverydatefrom;
+    }
+    if ( defined $estimateddeliverydatefrom and defined $estimateddeliverydateto ) {
+        $from .= ' AND ADDDATE(aqbasket.closedate, INTERVAL aqbooksellers.deliverytime DAY) <= ?';
+        push @query_params, $estimateddeliverydateto;
+    } elsif ( defined $estimateddeliverydatefrom ) {
+        $from .= ' AND ADDDATE(aqbasket.closedate, INTERVAL aqbooksellers.deliverytime DAY) <= CURDATE()';
+    }
     if (C4::Context->preference("IndependantBranches")
             && C4::Context->userenv
             && C4::Context->userenv->{flags} != 1 ) {
diff --git a/C4/Bookseller.pm b/C4/Bookseller.pm
index 6a91f99..f4db133 100644
--- a/C4/Bookseller.pm
+++ b/C4/Bookseller.pm
@@ -99,19 +99,48 @@ Searches for suppliers with late orders.
 =cut
 
 sub GetBooksellersWithLateOrders {
-    my $delay = shift;
-    my $dbh   = C4::Context->dbh;
-
-    # TODO delay should be verified
-    my $query_string =
-      "SELECT DISTINCT aqbasket.booksellerid, aqbooksellers.name
-    FROM aqorders LEFT JOIN aqbasket ON aqorders.basketno=aqbasket.basketno
-    LEFT JOIN aqbooksellers ON aqbasket.booksellerid = aqbooksellers.id
-    WHERE (closedate < DATE_SUB(CURDATE( ),INTERVAL $delay DAY)
-    AND (datereceived = '' OR datereceived IS NULL))";
-
-    my $sth = $dbh->prepare($query_string);
-    $sth->execute;
+    my ( $delay, $branch, $estimateddeliverydatefrom, $estimateddeliverydateto ) = @_;    # FIXME: Branch argument unused.
+    my $dbh = C4::Context->dbh;
+
+    # FIXME NOT quite sure that this operation is valid for DBMs different from Mysql, HOPING so
+    # should be tested with other DBMs
+
+    my $strsth;
+    my @query_params = ();
+    my $dbdriver = C4::Context->config("db_scheme") || "mysql";
+    $strsth = "
+        SELECT DISTINCT aqbasket.booksellerid, aqbooksellers.name
+        FROM aqorders LEFT JOIN aqbasket ON aqorders.basketno=aqbasket.basketno
+        LEFT JOIN aqbooksellers ON aqbasket.booksellerid = aqbooksellers.id
+        WHERE 
+            ( datereceived = ''
+            OR datereceived IS NULL
+            OR aqorders.quantityreceived < aqorders.quantity
+            )
+            AND aqorders.rrp <> 0
+            AND aqorders.ecost <> 0
+            AND aqorders.quantity - IFNULL(aqorders.quantityreceived,0) <> 0
+            AND aqbasket.closedate IS NOT NULL
+    ";
+    if ( defined $delay ) {
+        $strsth .= " AND (closedate <= DATE_SUB(CURDATE( ),INTERVAL ? DAY)) ";
+        push @query_params, $delay;
+    }
+    if ( defined $estimateddeliverydatefrom ) {
+        $strsth .= '
+            AND aqbooksellers.deliverytime IS NOT NULL
+            AND ADDDATE(aqbasket.closedate, INTERVAL aqbooksellers.deliverytime DAY) >= ?';
+        push @query_params, $estimateddeliverydatefrom;
+    }
+    if ( defined $estimateddeliverydatefrom and defined $estimateddeliverydateto ) {
+        $strsth .= ' AND ADDDATE(aqbasket.closedate, INTERVAL aqbooksellers.deliverytime DAY) <= ?';
+        push @query_params, $estimateddeliverydateto;
+    } elsif ( defined $estimateddeliverydatefrom ) {
+        $strsth .= ' AND ADDDATE(aqbasket.closedate, INTERVAL aqbooksellers.deliverytime DAY) <= CURDATE()';
+    }
+
+    my $sth = $dbh->prepare($strsth);
+    $sth->execute( @query_params );
     my %supplierlist;
     while ( my ( $id, $name ) = $sth->fetchrow ) {
         $supplierlist{$id} = $name;
@@ -198,7 +227,7 @@ sub ModBookseller {
             contphone=?,contfax=?,contaltphone=?,contemail=?,
             contnotes=?,active=?,listprice=?, invoiceprice=?,
             gstreg=?,listincgst=?,invoiceincgst=?,
-            discount=?,notes=?,gstrate=?
+            discount=?,notes=?,gstrate=?,deliverytime=?
         WHERE id=?';
     my $sth = $dbh->prepare($query);
     $sth->execute(
@@ -215,7 +244,9 @@ sub ModBookseller {
         $data->{'invoiceprice'}, $data->{'gstreg'},
         $data->{'listincgst'},   $data->{'invoiceincgst'},
         $data->{'discount'},     $data->{'notes'},
-        $data->{'gstrate'},      $data->{'id'}
+        $data->{'gstrate'},
+        $data->{deliverytime},
+        $data->{'id'}
     );
     return;
 }
diff --git a/acqui/basket.pl b/acqui/basket.pl
index 7864fee..163c65d 100755
--- a/acqui/basket.pl
+++ b/acqui/basket.pl
@@ -35,6 +35,7 @@ use C4::Biblio;
 use C4::Members qw/GetMember/;  #needed for permissions checking for changing basketgroup of a basket
 use C4::Items;
 use C4::Suggestions;
+use Date::Calc qw/Add_Delta_Days/;
 
 =head1 NAME
 
@@ -214,6 +215,15 @@ if ( $op eq 'delete_confirm' ) {
         }
         unshift( @$basketgroups, \%emptygroup );
     }
+
+    # if the basket is closed, calculate estimated delivery date
+    my $estimateddeliverydate;
+    if( $basket->{closedate} ) {
+        my ($year, $month, $day) = ($basket->{closedate} =~ /(\d+)-(\d+)-(\d+)/);
+        ($year, $month, $day) = Add_Delta_Days($year, $month, $day, $bookseller->{deliverytime});
+        $estimateddeliverydate = "$year-$month-$day";
+    }
+
     # if new basket, pre-fill infos
     $basket->{creationdate} = ""            unless ( $basket->{creationdate} );
     $basket->{authorisedby} = $loggedinuser unless ( $basket->{authorisedby} );
@@ -368,6 +378,7 @@ my $total_est_gste;
         authorisedby         => $basket->{authorisedby},
         authorisedbyname     => $basket->{authorisedbyname},
         closedate            => C4::Dates->new($basket->{closedate},'iso')->output,
+        estimateddeliverydate => C4::Dates->new( $estimateddeliverydate, 'iso' )->output,
         active               => $bookseller->{'active'},
         booksellerid         => $bookseller->{'id'},
         name                 => $bookseller->{'name'},
diff --git a/acqui/lateorders.pl b/acqui/lateorders.pl
index 86b1300..913d121 100755
--- a/acqui/lateorders.pl
+++ b/acqui/lateorders.pl
@@ -66,14 +66,14 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user({
 
 my $booksellerid = $input->param('booksellerid') || undef; # we don't want "" or 0
 my $delay      = $input->param('delay');
+my $estimateddeliverydatefrom = $input->param('estimateddeliverydatefrom');
+my $estimateddeliverydateto   = $input->param('estimateddeliverydateto');
 my $branch     = $input->param('branch');
 my $op         = $input->param('op');
 
 my @errors = ();
-$delay = 30 unless defined $delay;
-unless ($delay =~ /^\d{1,3}$/) {
-	push @errors, {delay_digits => 1, bad_delay => $delay};
-	$delay = 30;	#default value for delay
+if ( defined $delay and not $delay =~ /^\d{1,3}$/ ) {
+    push @errors, {delay_digits => 1, bad_delay => $delay};
 }
 
 if ($op and $op eq "send_alert"){
@@ -92,7 +92,13 @@ if ($op and $op eq "send_alert"){
     }
 }
 
-my %supplierlist = GetBooksellersWithLateOrders($delay);
+my %supplierlist = GetBooksellersWithLateOrders(
+    $delay,
+    $branch,
+    C4::Dates->new($estimateddeliverydatefrom)->output("iso"),
+    C4::Dates->new($estimateddeliverydateto)->output("iso")
+);
+
 my (@sloopy);	# supplier loop
 foreach (keys %supplierlist){
 	push @sloopy, (($booksellerid and $booksellerid eq $_ )            ?
@@ -104,7 +110,7 @@ $template->param(SUPPLIER_LOOP => \@sloopy);
 $template->param(Supplier=>$supplierlist{$booksellerid}) if ($booksellerid);
 $template->param(booksellerid=>$booksellerid) if ($booksellerid);
 
-my @lateorders = GetLateOrders($delay,$booksellerid,$branch);
+my @lateorders = GetLateOrders( $delay, $booksellerid, $branch, $estimateddeliverydatefrom, $estimateddeliverydateto );
 
 my $total;
 foreach (@lateorders){
@@ -122,7 +128,10 @@ $template->param(ERROR_LOOP => \@errors) if (@errors);
 $template->param(
 	lateorders => \@lateorders,
 	delay => $delay,
+    estimateddeliverydatefrom => $estimateddeliverydatefrom,
+    estimateddeliverydateto   => $estimateddeliverydateto,
 	total => $total,
 	intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+    DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
 );
 output_html_with_http_headers $input, $cookie, $template->output;
diff --git a/acqui/supplier.pl b/acqui/supplier.pl
index 8896b3b..f533a80 100755
--- a/acqui/supplier.pl
+++ b/acqui/supplier.pl
@@ -109,6 +109,7 @@ if ( $op eq 'display' ) {
         listincgst    => $supplier->{'listincgst'},
         invoiceincgst => $supplier->{'invoiceincgst'},
         discount      => $supplier->{'discount'},
+        deliverytime  => $supplier->{deliverytime},
         invoiceprice  => $supplier->{'invoiceprice'},
         listprice     => $supplier->{'listprice'},
         GST           => $tax_rate,
@@ -171,6 +172,7 @@ if ( $op eq 'display' ) {
         invoiceincgst => $supplier->{'invoiceincgst'},
         gstrate       => $gstrate,
         discount      => $supplier->{'discount'},
+        deliverytime  => $supplier->{deliverytime},
         loop_currency => $loop_currency,
         GST           => $tax_rate,
         enter         => 1,
diff --git a/acqui/updatesupplier.pl b/acqui/updatesupplier.pl
index 3e79362..81136d7 100755
--- a/acqui/updatesupplier.pl
+++ b/acqui/updatesupplier.pl
@@ -107,6 +107,7 @@ if ($gstrate eq '') {
     $data{'gstrate'} = $input->param('gstrate')/100;
 }
 $data{'discount'}=$input->param('discount');
+$data{deliverytime} = $input->param('deliverytime');
 $data{'active'}=$input->param('status');
 if($data{'name'}) {
 	if ($data{'booksellerid'}){
diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql
index 67149c9d..89cb71d 100644
--- a/installer/data/mysql/kohastructure.sql
+++ b/installer/data/mysql/kohastructure.sql
@@ -2496,6 +2496,7 @@ CREATE TABLE `aqbooksellers` ( -- information about the vendors listed in acquis
   `gstrate` decimal(6,4) default NULL, -- the tax rate the library is charged
   `discount` float(6,4) default NULL, -- discount offered on all items ordered from this vendor
   `fax` varchar(50) default NULL, -- vendor fax number
+  `deliverytime` int(11) default NULL, -- vendor delivery time
   PRIMARY KEY  (`id`),
   KEY `listprice` (`listprice`),
   KEY `invoiceprice` (`invoiceprice`),
diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
index d2d9d97..32b027f 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -4712,6 +4712,13 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
     SetVersion($DBversion);
 }
 
+$DBversion = "3.07.00.XXX";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+    $dbh->do("ALTER TABLE aqbooksellers ADD deliverytime INT DEFAULT NULL");
+    print "Upgrade to $DBversion done (Add deliverytime field in aqbooksellers table)";
+    SetVersion($DBversion);
+}
+
 =head1 FUNCTIONS
 
 =head2 DropAllForeignKeys($table)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt
index 59f647c..b77bd26 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt
@@ -1,3 +1,4 @@
+[% USE KohaDates %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Acquisitions &rsaquo; [% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname|html %] ([% basketno %]) for [% name|html %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
@@ -180,6 +181,7 @@
                 [% IF ( authorisedbyname ) %]<li><span class="label">Managed by:</span>  [% authorisedbyname %]</li>[% END %]
                 [% IF ( creationdate ) %]<li><span class="label">Opened on:</span>  [% creationdate %]</li>[% END %]
                 [% IF ( closedate ) %]<li><span class="label">Closed on:</span> [% closedate %]</li>[% END %]
+                [% IF ( estimateddeliverydate ) %]<li><span class="label">Estimated delivery date:</span> [% estimateddeliverydate | $KohaDates  %]</li>[% END %]
 
                 </ol>
                 </div>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt
index cdb8711..1495215 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt
@@ -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>
@@ -81,6 +84,9 @@ $(document).ready(function() {
                 ([% lateorder.latesince %] days)
             </td>
             <td>
+                [% lateorder.estimateddeliverydate | $KohaDates  %]
+            </td>
+            <td>
                 [% lateorder.supplier %]
             </td>
             <td>
@@ -117,7 +123,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 +146,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=""/>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt
index d4bfe72..e370706 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt
@@ -137,6 +137,10 @@ if (f.company.value == "") {
             <li><label for="discount">Discount</label>
                 <input type="text" size="6" id="discount" name="discount" value="[% discount %]" />%</li>
             <li><label for="gstrate">Tax rate</label><input type="text" name="gstrate" id="gstrate" size="6" value="[% gstrate %]"/>% (leave blank for default tax of [% default_gst_rate %]%)</li>
+            <li>
+                <label for="deliverytime">Delivery time</label>
+                <input type="text" size="2" id="deliverytime" name="deliverytime" value="[% deliverytime %]" /> days
+            </li>
             <li><label for="notes">Notes</label>
                 <textarea cols="40" rows="4" id="notes" name="notes" >[% notes %]</textarea></li></ol>
         </fieldset>
@@ -197,6 +201,10 @@ if (f.company.value == "") {
                 [% discount %] %</p>
             <p><strong>Tax rate: </strong>
                 [% GST %]%[% UNLESS ( default_tax ) %] (default)[% END %]</p>
+            [% IF deliverytime.defined %]
+                <p><strong>Delivery time: </strong>
+                    [% deliverytime %] days</p>
+            [% END %]
             [% IF ( notes ) %]<p><strong>Notes: </strong>
                 [% notes %]</p>[% END %]
         </div>
-- 
1.7.7.3



More information about the Koha-patches mailing list