From a7481b3c39d8f93b0cd6b3ff5913833b84620177 Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Tue, 19 Jan 2010 14:36:49 +0100 Subject: [PATCH] (bug #4051) separate firstname and surname this patch separate firstname and surname in two columns in csv export. --- circ/overdue.pl | 16 +++++++++------- .../prog/en/modules/circ/overdue.tmpl | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/circ/overdue.pl b/circ/overdue.pl index 2360028e0e..0b2780b026 100755 --- a/circ/overdue.pl +++ b/circ/overdue.pl @@ -114,7 +114,8 @@ $bornamefilter =~s/\*/\%/g; $bornamefilter =~s/\?/\_/g; my $strsth="SELECT date_due, - concat(surname,' ', firstname) as borrower, + surname, + firstname, borrowers.address, borrowers.city, borrowers.zipcode, @@ -143,11 +144,11 @@ $strsth.=" AND biblioitems.itemtype = '" . $itemtypefilter . "' " if $itemtype $strsth.=" AND borrowers.flags = '" . $borflagsfilter . "' " if $borflagsfilter; $strsth.=" AND borrowers.branchcode = '" . $branchfilter . "' " if $branchfilter; $strsth.=" ORDER BY " . ( - ($order eq "borrower" or $order eq "borrower desc") ? "$order, date_due" : - ($order eq "title" or $order eq "title desc") ? "$order, date_due, borrower" : - ($order eq "barcode" or $order eq "barcode desc") ? "items.$order, date_due, borrower" : - ($order eq "date_due desc") ? "date_due DESC, borrower" : - "date_due, borrower" # default sort order + ($order eq "surname" or $order eq "surname desc") ? "$order, date_due" : + ($order eq "title" or $order eq "title desc") ? "$order, date_due, surname" : + ($order eq "barcode" or $order eq "barcode desc") ? "items.$order, date_due, surname" : + ($order eq "date_due desc") ? "date_due DESC, surname" : + "date_due, surname" # default sort order ); $template->param(sql=>$strsth); my $sth=$dbh->prepare($strsth); @@ -159,11 +160,12 @@ while (my $data=$sth->fetchrow_hashref) { push @overduedata, { issuedate => format_date($data->{issuedate}), duedate => format_date($data->{date_due}), + surname => $data->{surname}, + firstname => $data->{firstname}, borrowernumber => $data->{borrowernumber}, barcode => $data->{barcode}, itemnum => $data->{itemnumber}, itemcallnumber => $data->{itemcallnumber}, - name => $data->{borrower}, address => $data->{address}, city => $data->{city}, zipcode => $data->{zipcode}, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tmpl index d0cd5aa090..ae99e90be6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tmpl @@ -39,7 +39,7 @@ - "> + "> [?subject=Overdue: ">email] () -- 2.39.5