Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 411 lines (356 sloc) 13.975 kb
f8e9fb64 »
2007-03-09 rel_3_0 moved to HEAD (introducing new files)
1 #!/usr/bin/perl
2
3 # Copyright 2000-2002 Katipo Communications
25295275 »
2010-12-16 Bug 5508 : Updating copyright statements
4 # Parts Copyright 2010 Biblibre
f8e9fb64 »
2007-03-09 rel_3_0 moved to HEAD (introducing new files)
5 #
6 # This file is part of Koha.
7 #
8 # Koha is free software; you can redistribute it and/or modify it under the
9 # terms of the GNU General Public License as published by the Free Software
10 # Foundation; either version 2 of the License, or (at your option) any later
11 # version.
12 #
13 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
14 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 #
9302e454 »
2010-03-16 Fix FSF address in directory serials/
17 # You should have received a copy of the GNU General Public License along
18 # with Koha; if not, write to the Free Software Foundation, Inc.,
19 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
f8e9fb64 »
2007-03-09 rel_3_0 moved to HEAD (introducing new files)
20
21 =head1 NAME
22
aa6ce934 »
2010-12-06 Bug 5022 Supplements were not saved correctly
23 serials-edit.pl
f8e9fb64 »
2007-03-09 rel_3_0 moved to HEAD (introducing new files)
24
25 =head1 Parameters
26
27 =over 4
28
29 =item op
30 op can be :
c9f3ede1 »
2009-09-07 Enable warnings in serial scripts
31 * modsubscriptionhistory :to modify the subscription history
f8e9fb64 »
2007-03-09 rel_3_0 moved to HEAD (introducing new files)
32 * serialchangestatus :to modify the status of this subscription
33
34 =item subscriptionid
35
36 =item user
37
38 =item histstartdate
39
40 =item enddate
41
42 =item recievedlist
43
44 =item missinglist
45
46 =item opacnote
47
48 =item librariannote
49
50 =item serialid
51
52 =item serialseq
53
54 =item planneddate
55
56 =item notes
57
58 =item status
59
60 =back
61
62 =cut
63
64 use strict;
c9f3ede1 »
2009-09-07 Enable warnings in serial scripts
65 use warnings;
f8e9fb64 »
2007-03-09 rel_3_0 moved to HEAD (introducing new files)
66 use CGI;
67 use C4::Auth;
a602c6d6 »
2007-12-04 cleanup for serials and members for Dates
68 use C4::Dates qw/format_date format_date_in_iso/;
f8e9fb64 »
2007-03-09 rel_3_0 moved to HEAD (introducing new files)
69 use C4::Biblio;
c6c8e80a »
2008-01-03 start of BIB change -- introduce C4::Items
70 use C4::Items;
f8e9fb64 »
2007-03-09 rel_3_0 moved to HEAD (introducing new files)
71 use C4::Koha;
72 use C4::Output;
73 use C4::Context;
74 use C4::Serials;
fc725ae6 »
2010-05-20 MT3667 : multiple display of same subscription
75 use List::MoreUtils qw/uniq/;
f8e9fb64 »
2007-03-09 rel_3_0 moved to HEAD (introducing new files)
76
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
77 my $query = CGI->new();
78 my $dbh = C4::Context->dbh;
79 my @serialids = $query->param('serialid');
80 my @serialseqs = $query->param('serialseq');
81 my @planneddates = $query->param('planneddate');
82 my @publisheddates = $query->param('publisheddate');
83 my @status = $query->param('status');
84 my @notes = $query->param('notes');
f8e9fb64 »
2007-03-09 rel_3_0 moved to HEAD (introducing new files)
85 my @subscriptionids = $query->param('subscriptionid');
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
86 my $op = $query->param('op');
87 if ( scalar(@subscriptionids) == 1 && index( $subscriptionids[0], q|,| ) > 0 ) {
88 @subscriptionids = split( /,/, $subscriptionids[0] );
f8e9fb64 »
2007-03-09 rel_3_0 moved to HEAD (introducing new files)
89 }
80c8b5c1 »
2008-08-05 bugfix for 2451 : serial recieve & barcode does exist complaint
90 my @errors;
91 my @errseq;
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
92
f8e9fb64 »
2007-03-09 rel_3_0 moved to HEAD (introducing new files)
93 # If user comes from subscription details
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
94 unless (@serialids) {
d22a4d20 »
2011-01-17 Bug 5026 Undefined dates formatted poorly in serials-edit
95 my $serstatus = $query->param('serstatus');
96 if ($serstatus) {
97 foreach my $subscriptionid (@subscriptionids) {
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
98 my @tmpser = GetSerials2( $subscriptionid, $serstatus );
d22a4d20 »
2011-01-17 Bug 5026 Undefined dates formatted poorly in serials-edit
99 push @serialids, map { $_->{serialid} } @tmpser;
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
100 }
f8e9fb64 »
2007-03-09 rel_3_0 moved to HEAD (introducing new files)
101 }
102 }
103
d22a4d20 »
2011-01-17 Bug 5026 Undefined dates formatted poorly in serials-edit
104 unless ( @serialids ) {
105 my $string =
106 'serials-collection.pl?subscriptionid=' . join ',', uniq @subscriptionids;
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
107 $string =~ s/,$//;
108
109 print $query->redirect($string);
b05cb8df »
2007-05-18 Adding redirection to serials-collection.pl if no serials selected fo…
110 }
b3feb54e »
2010-06-16 Cherry-picked onto master, fixing conflicts: MT 1816: Granular permis…
111
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
112 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
113 {
d22a4d20 »
2011-01-17 Bug 5026 Undefined dates formatted poorly in serials-edit
114 template_name => 'serials/serials-edit.tmpl',
115 query => $query,
116 type => 'intranet',
117 authnotrequired => 0,
118 flagsrequired => { serials => 1 },
119 debug => 1,
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
120 }
121 );
f8e9fb64 »
2007-03-09 rel_3_0 moved to HEAD (introducing new files)
122
123 my @serialdatalist;
80c8b5c1 »
2008-08-05 bugfix for 2451 : serial recieve & barcode does exist complaint
124 my %processedserialid;
f0528664 »
2010-05-11 Bug 3928: Modification of date for serials.
125
757e1c91 »
2010-05-11 Bug 3928: Modified date should follow syspref
126 my $today = C4::Dates->new();
d22a4d20 »
2011-01-17 Bug 5026 Undefined dates formatted poorly in serials-edit
127 foreach my $serialid (@serialids) {
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
128
80c8b5c1 »
2008-08-05 bugfix for 2451 : serial recieve & barcode does exist complaint
129 #filtering serialid for duplication
130 #NEW serial should appear only once and are created afterwards
d22a4d20 »
2011-01-17 Bug 5026 Undefined dates formatted poorly in serials-edit
131 if ( $serialid
132 && $serialid =~ /^[0-9]+$/
133 && !$processedserialid{$serialid} )
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
134 {
d22a4d20 »
2011-01-17 Bug 5026 Undefined dates formatted poorly in serials-edit
135 my $serinfo = GetSerialInformation($serialid); #TODO duplicates work done by GetSerials2 above
136 for my $d ( qw( publisheddate planneddate )){
137 if ( $serinfo->{$d} =~m/^00/ ) {
138 $serinfo->{$d} = q{};
aa6ce934 »
2010-12-06 Bug 5022 Supplements were not saved correctly
139 }
140 else {
d22a4d20 »
2011-01-17 Bug 5026 Undefined dates formatted poorly in serials-edit
141 $serinfo->{$d} = format_date( $serinfo->{$d} );
aa6ce934 »
2010-12-06 Bug 5022 Supplements were not saved correctly
142 }
143 }
d22a4d20 »
2011-01-17 Bug 5026 Undefined dates formatted poorly in serials-edit
144 $serinfo->{arriveddate}=$today->output('syspref');
145
146 $serinfo->{'editdisable'} = (
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
147 (
d22a4d20 »
2011-01-17 Bug 5026 Undefined dates formatted poorly in serials-edit
148 HasSubscriptionExpired( $serinfo->{subscriptionid} )
149 && $serinfo->{'status1'}
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
150 )
d22a4d20 »
2011-01-17 Bug 5026 Undefined dates formatted poorly in serials-edit
151 || $serinfo->{'cannotedit'}
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
152 );
d22a4d20 »
2011-01-17 Bug 5026 Undefined dates formatted poorly in serials-edit
153 push @serialdatalist, $serinfo;
154 $processedserialid{$serialid} = 1;
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
155 }
f8e9fb64 »
2007-03-09 rel_3_0 moved to HEAD (introducing new files)
156 }
d22a4d20 »
2011-01-17 Bug 5026 Undefined dates formatted poorly in serials-edit
157 my $biblio = GetBiblioData( $serialdatalist[0]->{'biblionumber'} );
f8e9fb64 »
2007-03-09 rel_3_0 moved to HEAD (introducing new files)
158
159 my @newserialloop;
160 my @subscriptionloop;
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
161
7be6d1f1 »
2008-04-17 IMPROVEMENT : serialsadditems at subscription level (bump 071)
162 # check, for each subscription edited, that we have an empty item line if applicable for the subscription
80c8b5c1 »
2008-08-05 bugfix for 2451 : serial recieve & barcode does exist complaint
163 my %processedsubscriptionid;
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
164 foreach my $subscriptionid (@subscriptionids) {
165
166 #Do not process subscriptionid twice if it was already processed.
d22a4d20 »
2011-01-17 Bug 5026 Undefined dates formatted poorly in serials-edit
167 if ( $subscriptionid && !$processedsubscriptionid{$subscriptionid} )
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
168 {
169 my $cell;
170 if ( $serialdatalist[0]->{'serialsadditems'} ) {
171
172 #Create New empty item
173 $cell =
174 PrepareItemrecordDisplay( $serialdatalist[0]->{'biblionumber'},
175 '', GetSubscription($subscriptionid) );
176 $cell->{serialsadditems} = 1;
177 }
178 $cell->{'subscriptionid'} = $subscriptionid;
d22a4d20 »
2011-01-17 Bug 5026 Undefined dates formatted poorly in serials-edit
179 $cell->{'itemid'} = 'NNEW';
180 $cell->{'serialid'} = 'NEW';
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
181 $cell->{'issuesatonce'} = 1;
aa6ce934 »
2010-12-06 Bug 5022 Supplements were not saved correctly
182 $cell->{arriveddate}=$today->output('syspref');
183
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
184 push @newserialloop, $cell;
185 push @subscriptionloop,
186 {
187 'subscriptionid' => $subscriptionid,
188 'abouttoexpire' => abouttoexpire($subscriptionid),
189 'subscriptionexpired' => HasSubscriptionExpired($subscriptionid),
190 };
191 $processedsubscriptionid{$subscriptionid} = 1;
80c8b5c1 »
2008-08-05 bugfix for 2451 : serial recieve & barcode does exist complaint
192 }
f8e9fb64 »
2007-03-09 rel_3_0 moved to HEAD (introducing new files)
193 }
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
194 $template->param( newserialloop => \@newserialloop );
195 $template->param( subscriptions => \@subscriptionloop );
196
197 if ( $op and $op eq 'serialchangestatus' ) {
f8e9fb64 »
2007-03-09 rel_3_0 moved to HEAD (introducing new files)
198
199 my $newserial;
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
200 for ( my $i = 0 ; $i <= $#serialids ; $i++ ) {
d22a4d20 »
2011-01-17 Bug 5026 Undefined dates formatted poorly in serials-edit
201 my ($plan_date, $pub_date);
202
203 if (defined $planneddates[$i] && $planneddates[$i] ne 'XXX') {
204 $plan_date = format_date_in_iso( $planneddates[$i] );
205 }
206 if (defined $publisheddates[$i] && $publisheddates[$i] ne 'XXX') {
207 $pub_date = format_date_in_iso( $publisheddates[$i] );
208 }
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
209
d22a4d20 »
2011-01-17 Bug 5026 Undefined dates formatted poorly in serials-edit
210 if ( $serialids[$i] && $serialids[$i] eq 'NEW' ) {
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
211 if ( $serialseqs[$i] ) {
212
f8e9fb64 »
2007-03-09 rel_3_0 moved to HEAD (introducing new files)
213 #IF newserial was provided a name Then we have to create a newSerial
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
214 ### FIXME if NewIssue is modified to use subscription biblionumber, then biblionumber would not be useful.
215 $newserial = NewIssue(
216 $serialseqs[$i],
aa6ce934 »
2010-12-06 Bug 5022 Supplements were not saved correctly
217 $subscriptionids[0],
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
218 $serialdatalist[0]->{'biblionumber'},
219 $status[$i],
d22a4d20 »
2011-01-17 Bug 5026 Undefined dates formatted poorly in serials-edit
220 $plan_date,
221 $pub_date,
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
222 $notes[$i]
223 );
224 }
225 }
226 elsif ( $serialids[$i] ) {
227 ModSerialStatus(
228 $serialids[$i],
229 $serialseqs[$i],
d22a4d20 »
2011-01-17 Bug 5026 Undefined dates formatted poorly in serials-edit
230 $plan_date,
231 $pub_date,
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
232 $status[$i],
233 $notes[$i]
234 );
f8e9fb64 »
2007-03-09 rel_3_0 moved to HEAD (introducing new files)
235 }
236 }
7be6d1f1 »
2008-04-17 IMPROVEMENT : serialsadditems at subscription level (bump 071)
237 my @moditems = $query->param('moditem');
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
238 if ( scalar(@moditems) ) {
239 my @tags = $query->param('tag');
240 my @subfields = $query->param('subfield');
241 my @field_values = $query->param('field_value');
242 my @serials = $query->param('serial');
243 my @bibnums = $query->param('bibnum');
244 my @itemid = $query->param('itemid');
245 my @ind_tag = $query->param('ind_tag');
246 my @indicator = $query->param('indicator');
247
248 #Rebuilding ALL the data for items into a hash
249 # parting them on $itemid.
250 my %itemhash;
251 my $countdistinct;
252 my $range = scalar(@itemid);
253 for ( my $i = 0 ; $i < $range ; $i++ ) {
254 unless ( $itemhash{ $itemid[$i] } ) {
255 if ( $serials[$countdistinct]
256 && $serials[$countdistinct] ne "NEW" )
257 {
258 $itemhash{ $itemid[$i] }->{'serial'} =
259 $serials[$countdistinct];
260 }
261 else {
262 $itemhash{ $itemid[$i] }->{'serial'} = $newserial;
263 }
264 $itemhash{ $itemid[$i] }->{'bibnum'} = $bibnums[$countdistinct];
265 $countdistinct++;
f8e9fb64 »
2007-03-09 rel_3_0 moved to HEAD (introducing new files)
266 }
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
267 push @{ $itemhash{ $itemid[$i] }->{'tags'} }, $tags[$i];
268 push @{ $itemhash{ $itemid[$i] }->{'subfields'} }, $subfields[$i];
269 push @{ $itemhash{ $itemid[$i] }->{'field_values'} },
270 $field_values[$i];
271 push @{ $itemhash{ $itemid[$i] }->{'ind_tag'} }, $ind_tag[$i];
272 push @{ $itemhash{ $itemid[$i] }->{'indicator'} }, $indicator[$i];
273 }
274 foreach my $item ( keys %itemhash ) {
275
276 # Verify Itemization is "Valid", i.e. serial status is Arrived or Missing
277 my $index = -1;
278 for ( my $i = 0 ; $i < scalar(@serialids) ; $i++ ) {
279 if (
280 $itemhash{$item}->{serial} eq $serialids[$i]
281 || ( $itemhash{$item}->{serial} == $newserial
282 && $serialids[$i] eq 'NEW' )
283 ) {
284 $index = $i
285 }
c9f3ede1 »
2009-09-07 Enable warnings in serial scripts
286 }
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
287 if ( $index >= 0 && $status[$index] == 2 ) {
288 my $xml = TransformHtmlToXml(
289 $itemhash{$item}->{'tags'},
290 $itemhash{$item}->{'subfields'},
291 $itemhash{$item}->{'field_values'},
292 $itemhash{$item}->{'indicator'},
293 $itemhash{$item}->{'ind_tag'}
294 );
295
296 # warn $xml;
297 my $bib_record = MARC::Record::new_from_xml( $xml, 'UTF-8' );
298 if ( $item =~ /^N/ ) {
299
300 #New Item
301
302 # if autoBarcode is set to 'incremental', calculate barcode...
303 my ( $barcodetagfield, $barcodetagsubfield ) =
304 GetMarcFromKohaField(
305 'items.barcode',
306 GetFrameworkCode(
307 $serialdatalist[0]->{'biblionumber'}
308 )
309 );
d22a4d20 »
2011-01-17 Bug 5026 Undefined dates formatted poorly in serials-edit
310 if ( C4::Context->preference('autoBarcode') eq
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
311 'incremental' )
312 {
313 if ( !$bib_record->field($barcodetagfield)
314 ->subfield($barcodetagsubfield) )
315 {
316 my $sth_barcode = $dbh->prepare(
d22a4d20 »
2011-01-17 Bug 5026 Undefined dates formatted poorly in serials-edit
317 'select max(abs(barcode)) from items');
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
318 $sth_barcode->execute;
319 my ($newbarcode) = $sth_barcode->fetchrow;
320
321 # OK, we have the new barcode, add the entry in MARC record # FIXME -> should be using barcode plugin here.
322 $bib_record->field($barcodetagfield)
323 ->update( $barcodetagsubfield => ++$newbarcode );
324 }
325 }
326
327 # check for item barcode # being unique
328 my $exists;
329 if (
330 $bib_record->subfield(
331 $barcodetagfield, $barcodetagsubfield
332 )
333 )
334 {
335 $exists = GetItemnumberFromBarcode(
336 $bib_record->subfield(
337 $barcodetagfield, $barcodetagsubfield
338 )
339 );
340 }
341
342 # push @errors,"barcode_not_unique" if($exists);
343 # if barcode exists, don't create, but report The problem.
344 if ($exists) {
345 push @errors, 'barcode_not_unique';
346 push @errseq, { serialseq => $serialseqs[$index] };
347 }
348 else {
349 my ( $biblionumber, $bibitemnum, $itemnumber ) =
350 AddItemFromMarc( $bib_record,
351 $itemhash{$item}->{bibnum} );
352 AddItem2Serial( $itemhash{$item}->{serial},
353 $itemnumber );
354 }
355 }
356 else {
357
358 #modify item
359 my ( $oldbiblionumber, $oldbibnum, $itemnumber ) =
360 ModItemFromMarc( $bib_record,
361 $itemhash{$item}->{'bibnum'}, $item );
362 }
f8e9fb64 »
2007-03-09 rel_3_0 moved to HEAD (introducing new files)
363 }
364 }
365 }
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
366
367
368 if ( @errors ) {
369 $template->param( Errors => 1 );
370 if ( @errseq ) {
371 $template->param( barcode_not_unique => 1, errseq => \@errseq );
c9f3ede1 »
2009-09-07 Enable warnings in serial scripts
372 }
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
373 }
374 else {
d22a4d20 »
2011-01-17 Bug 5026 Undefined dates formatted poorly in serials-edit
375 my $redirect = 'serials-collection.pl?';
376 $redirect .= join( '&', map { 'subscriptionid=' . $_ } @subscriptionids );
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
377 print $query->redirect($redirect);
378 }
f8e9fb64 »
2007-03-09 rel_3_0 moved to HEAD (introducing new files)
379 }
ba8a2c7e »
2010-08-11 (MT4068) Display callnumber & location in serials-collection.pl & ser…
380 my $location = GetAuthorisedValues('LOC', $serialdatalist[0]->{'location'});
381 my $locationlib;
382 foreach (@$location) {
383 $locationlib = $_->{'lib'} if $_->{'selected'};
384 }
ad3594fd »
2010-04-08 Bug 4380 Use syspref to resolve which bib display is used
385 my $default_bib_view = get_default_view();
f8e9fb64 »
2007-03-09 rel_3_0 moved to HEAD (introducing new files)
386
387 $template->param(
1ca96457 »
2009-11-09 Displaying serial call-number on receive.
388 serialsadditems => $serialdatalist[0]->{'serialsadditems'},
ba8a2c7e »
2010-08-11 (MT4068) Display callnumber & location in serials-collection.pl & ser…
389 callnumber => $serialdatalist[0]->{'callnumber'},
d22a4d20 »
2011-01-17 Bug 5026 Undefined dates formatted poorly in serials-edit
390 bibliotitle => $biblio->{'title'},
f75cca22 »
2010-04-08 Basic refactoring of serials-edit.pm
391 biblionumber => $serialdatalist[0]->{'biblionumber'},
392 serialslist => \@serialdatalist,
ad3594fd »
2010-04-08 Bug 4380 Use syspref to resolve which bib display is used
393 default_bib_view => $default_bib_view,
ba8a2c7e »
2010-08-11 (MT4068) Display callnumber & location in serials-collection.pl & ser…
394 location => $locationlib,
75c0bef6 »
2008-06-04 Remove bad use of map in void context, exclusively for side effects!
395 );
f8e9fb64 »
2007-03-09 rel_3_0 moved to HEAD (introducing new files)
396 output_html_with_http_headers $query, $cookie, $template->output;
ad3594fd »
2010-04-08 Bug 4380 Use syspref to resolve which bib display is used
397
398 sub get_default_view {
399 my $defaultview = C4::Context->preference('IntranetBiblioDefaultView');
400 my $views = { C4::Search::enabled_staff_search_views };
401 if ($defaultview eq 'isbd' && $views->{can_view_ISBD}) {
402 return 'ISBDdetail';
403 } elsif ($defaultview eq 'marc' && $views->{can_view_MARC}) {
404 return 'MARCdetail';
405 } elsif ($defaultview eq 'labeled_marc' && $views->{can_view_labeledMARC}) {
406 return 'labeledMARCdetail';
407 } else {
408 return 'detail';
409 }
410 }
Something went wrong with that request. Please try again.