[Koha-bugs] [Bug 12732] Sort late orders by basket creation or closing date

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Aug 16 22:23:28 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12732

--- Comment #4 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
Comment on attachment 30794
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30794
Bug 12732 - Sort late orders by basket creation or closing date

Review of attachment 30794:
 --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=12732&attachment=30794)
-----------------------------------------------------------------

Hi Simith,

a couple of things:

0) The database update is missing from the patches.
1) Changes to core routines should be backed up by regression tests.

::: C4/Acquisition.pm
@@ +2123,5 @@
>      my @query_params = ();
>      my $select = "
>      SELECT aqbasket.basketno,
>          aqorders.ordernumber,
> +        DATE(aqbasket.${aqbasketSortField})  AS orderdate,

2) I think the variable shouldn't be in the SQL, but be replaced by a
placeholder.

@@ +2162,4 @@
>          $select .= "
>          aqorders.quantity - COALESCE(aqorders.quantityreceived,0)                 AS quantity,
>          (aqorders.quantity - COALESCE(aqorders.quantityreceived,0)) * aqorders.rrp AS subtotal,
> +        DATEDIFF(CAST(now() AS date),${aqbasketSortField}) AS latesince

Same here...

@@ +2166,3 @@
>          ";
>          if ( defined $delay ) {
> +            $from .= " AND (${aqbasketSortField} <= DATE_SUB(CAST(now() AS date),INTERVAL ? DAY)) " ;

... and here...

@@ +2182,3 @@
>          ";
>          if ( defined $delay ) {
> +            $from .= " AND (${aqbasketSortField} <= (CAST(now() AS date) -(INTERVAL ? DAY)) ";

... and here.

::: koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt
@@ +111,4 @@
>              [% ELSE %]
>                  <th></th>
>              [% END %]
> +            <th class="title-string">Order [% lateOrderSort %] date</th>

3) This is a translation problem. Please avoid "Order [IFELSE construct] date"
in favor of repeating the whole line for each possible setting - This will
allow translators to create better translations.

::: koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref
@@ +62,5 @@
> +              choices:
> +                  creation: Do
> +                  closing: Don't
> +            - Use the creation date of the basket to sort late order.
> +

4) Instead of a boolean, it would be nicer to rephrase a bit and use
creation/closed date - Right now it is not clear at all what will be used
instead of the creation date.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list