View | Details | Raw Unified | Return to bug 7047
Collapse All | Expand All

(-)a/C4/Serials.pm (-3 / +5 lines)
Lines 1504-1510 this function renew a subscription with values given on input args. Link Here
1504
=cut
1504
=cut
1505
1505
1506
sub ReNewSubscription {
1506
sub ReNewSubscription {
1507
    my ( $subscriptionid, $user, $startdate, $numberlength, $weeklength, $monthlength, $note ) = @_;
1507
    my ( $subscriptionid, $user, $startdate, $numberlength, $weeklength, $monthlength, $note, $branchcode ) = @_;
1508
    warn $note;
1508
    my $dbh          = C4::Context->dbh;
1509
    my $dbh          = C4::Context->dbh;
1509
    my $subscription = GetSubscription($subscriptionid);
1510
    my $subscription = GetSubscription($subscriptionid);
1510
    my $query        = qq|
1511
    my $query        = qq|
Lines 1524-1531 sub ReNewSubscription { Link Here
1524
                'title'         => $subscription->{bibliotitle},
1525
                'title'         => $subscription->{bibliotitle},
1525
                'author'        => $biblio->{author},
1526
                'author'        => $biblio->{author},
1526
                'publishercode' => $biblio->{publishercode},
1527
                'publishercode' => $biblio->{publishercode},
1527
                'note'          => $biblio->{note},
1528
                'note'          => $note,
1528
                'biblionumber'  => $subscription->{biblionumber}
1529
                'biblionumber'  => $subscription->{biblionumber},
1530
                'branchcode'    => $branchcode,
1529
            }
1531
            }
1530
        );
1532
        );
1531
    }
1533
    }
(-)a/C4/Suggestions.pm (+2 lines)
Lines 443-449 sub NewSuggestion { Link Here
443
        accepteddate
443
        accepteddate
444
        rejectedby
444
        rejectedby
445
        rejecteddate
445
        rejecteddate
446
        note
446
        budgetid
447
        budgetid
448
        branchcode
447
    ) ) {
449
    ) ) {
448
        # Set the fields to NULL if not given.
450
        # Set the fields to NULL if not given.
449
        $suggestion->{$field} ||= undef;
451
        $suggestion->{$field} ||= undef;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt (+13 lines)
Lines 36-41 Link Here
36
		<ol><li><label for="numberlength">Number of num:</label><input type="text" id="numberlength" name="numberlength" value="[% numberlength %]" /></li>
36
		<ol><li><label for="numberlength">Number of num:</label><input type="text" id="numberlength" name="numberlength" value="[% numberlength %]" /></li>
37
		<li><label for="weeklength">Number of weeks: </label><input type="text" id="weeklength" name="weeklength" value="[% weeklength %]" /></li>
37
		<li><label for="weeklength">Number of weeks: </label><input type="text" id="weeklength" name="weeklength" value="[% weeklength %]" /></li>
38
		<li><label for="monthlength">Number of months: </label><input type="text" id="monthlength" name="monthlength" value="[% monthlength %]" /></li></ol></fieldset></li>
38
		<li><label for="monthlength">Number of months: </label><input type="text" id="monthlength" name="monthlength" value="[% monthlength %]" /></li></ol></fieldset></li>
39
<li><label for="branchcode">Library:</label>
40
 <select name="branchcode" id="branchcode" style="width: 20em;">
41
     [% UNLESS ( Independentbranches ) %]
42
        <option value="">None</option>
43
     [% END %]
44
     [% IF CAN_user_serials_superserials %]
45
        [% FOREACH library IN libraries %]
46
             <option value="[% library.branchcode %]"> [% library.branchname %] </option>
47
        [% END %]
48
     [% END %]
49
</select> (select a library)
50
</li>
51
39
		<li><label for="note">Note for the librarian that will manage your renewal request: </label>
52
		<li><label for="note">Note for the librarian that will manage your renewal request: </label>
40
		<textarea name="note" id="note" rows="5" cols="50"></textarea></li></ol></fieldset>
53
		<textarea name="note" id="note" rows="5" cols="50"></textarea></li></ol></fieldset>
41
		<fieldset class="action"><input type="submit" value="Submit" class="button" /></fieldset>
54
		<fieldset class="action"><input type="submit" value="Submit" class="button" /></fieldset>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt (-1 / +5 lines)
Lines 460-465 Link Here
460
                <th class="NoSort">&nbsp;</th>
460
                <th class="NoSort">&nbsp;</th>
461
                <th class="anti-the">Suggestion</th>
461
                <th class="anti-the">Suggestion</th>
462
                <th>Suggested by - on</th>
462
                <th>Suggested by - on</th>
463
                <th>Suggestion note</th>
463
                <th>Managed by - on</th>
464
                <th>Managed by - on</th>
464
                <th>Library</th>
465
                <th>Library</th>
465
                <th>Fund</th>
466
                <th>Fund</th>
Lines 479-491 Link Here
479
                    <br />
480
                    <br />
480
                    [% IF ( suggestions_loo.copyrightdate ) %]&copy; [% suggestions_loo.copyrightdate |html %] [% END %]
481
                    [% IF ( suggestions_loo.copyrightdate ) %]&copy; [% suggestions_loo.copyrightdate |html %] [% END %]
481
                        [% IF ( suggestions_loo.volumedesc ) %]; Volume:<i>[% suggestions_loo.volumedesc |html %]</i> [% END %]
482
                        [% IF ( suggestions_loo.volumedesc ) %]; Volume:<i>[% suggestions_loo.volumedesc |html %]</i> [% END %]
482
                        [% IF ( suggestions_loo.isbn ) %]; ISBN:<i>[% suggestions_loo.isbn |html %]</i> [% END %][% IF ( suggestions_loo.publishercode ) %]; Published by [% suggestions_loo.publishercode |html %] [% END %][% IF ( suggestions_loo.publicationyear ) %] in <i>[% suggestions_loo.publicationyear |html %]</i> [% END %][% IF ( suggestions_loo.place ) %] in <i>[% suggestions_loo.place |html %]</i> [% END %][% IF ( suggestions_loo.collectiontitle ) %]; [% suggestions_loo.collectiontitle |html %] [% END %][% IF ( suggestions_loo.itemtype ) %]; [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', suggestions_loo.itemtype, 0 ) %] [% END %]<br />[% IF ( suggestions_loo.note ) %]<span class="note">[% suggestions_loo.note |html%]</span>[% END %]
483
                        [% IF ( suggestions_loo.isbn ) %]; ISBN:<i>[% suggestions_loo.isbn |html %]</i> [% END %][% IF ( suggestions_loo.publishercode ) %]; Published by [% suggestions_loo.publishercode |html %] [% END %][% IF ( suggestions_loo.publicationyear ) %] in <i>[% suggestions_loo.publicationyear |html %]</i> [% END %][% IF ( suggestions_loo.place ) %] in <i>[% suggestions_loo.place |html %]</i> [% END %][% IF ( suggestions_loo.collectiontitle ) %]; [% suggestions_loo.collectiontitle |html %] [% END %][% IF ( suggestions_loo.itemtype ) %]; [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', suggestions_loo.itemtype, 0 ) %] [% END %]<br />
483
                </td>
484
                </td>
484
                <td>
485
                <td>
485
                    <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestions_loo.suggestedby %]">[% suggestions_loo.surnamesuggestedby %][% IF ( suggestions_loo.firstnamesuggestedby ) %], [% suggestions_loo.firstnamesuggestedby %][% END %] [% IF (suggestions_loo.cardnumbersuggestedby ) %]([% suggestions_loo.cardnumbersuggestedby %])[% END %]</a>
486
                    <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestions_loo.suggestedby %]">[% suggestions_loo.surnamesuggestedby %][% IF ( suggestions_loo.firstnamesuggestedby ) %], [% suggestions_loo.firstnamesuggestedby %][% END %] [% IF (suggestions_loo.cardnumbersuggestedby ) %]([% suggestions_loo.cardnumbersuggestedby %])[% END %]</a>
486
                    [% IF ( suggestions_loo.suggesteddate ) %] - [% suggestions_loo.suggesteddate | $KohaDates %][% END %]
487
                    [% IF ( suggestions_loo.suggesteddate ) %] - [% suggestions_loo.suggesteddate | $KohaDates %][% END %]
487
                </td>
488
                </td>
488
                <td>
489
                <td>
490
                    [% suggestions_loo.note | html %]
491
                </td>
492
                <td>
489
                    <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestions_loo.suggestedby %]">[% suggestions_loo.surnamemanagedby %][% IF ( suggestions_loo.firstnamemanagedby ) %], [% suggestions_loo.firstnamemanagedby %][% END %]</a>
493
                    <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestions_loo.suggestedby %]">[% suggestions_loo.surnamemanagedby %][% IF ( suggestions_loo.firstnamemanagedby ) %], [% suggestions_loo.firstnamemanagedby %][% END %]</a>
490
                    [% IF ( suggestions_loo.manageddate ) %] - [% suggestions_loo.manageddate | $KohaDates %][% END %]
494
                    [% IF ( suggestions_loo.manageddate ) %] - [% suggestions_loo.manageddate | $KohaDates %][% END %]
491
                </td>
495
                </td>
(-)a/serials/subscription-renew.pl (-1 / +5 lines)
Lines 62-67 my $dbh = C4::Context->dbh; Link Here
62
my $mode           = $query->param('mode') || q{};
62
my $mode           = $query->param('mode') || q{};
63
my $op             = $query->param('op') || 'display';
63
my $op             = $query->param('op') || 'display';
64
my $subscriptionid = $query->param('subscriptionid');
64
my $subscriptionid = $query->param('subscriptionid');
65
my $branchcode     = $query->param('branchcode');
65
my $done = 0;    # for after form has been submitted
66
my $done = 0;    # for after form has been submitted
66
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
67
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
67
    {
68
    {
Lines 79-85 if ( $op eq "renew" ) { Link Here
79
        $subscriptionid, $loggedinuser,
80
        $subscriptionid, $loggedinuser,
80
        $startdate, $query->param('numberlength'),
81
        $startdate, $query->param('numberlength'),
81
        $query->param('weeklength'), $query->param('monthlength'),
82
        $query->param('weeklength'), $query->param('monthlength'),
82
        $query->param('note')
83
        $query->param('note'), $branchcode
83
    );
84
    );
84
}
85
}
85
86
Lines 92-102 if ($subscription->{'cannotedit'}){ Link Here
92
my $newstartdate = output_pref( { str => $subscription->{enddate}, dateonly => 1 } )
93
my $newstartdate = output_pref( { str => $subscription->{enddate}, dateonly => 1 } )
93
    or output_pref( { dt => dt_from_string, dateonly => 1 } );
94
    or output_pref( { dt => dt_from_string, dateonly => 1 } );
94
95
96
my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, );
97
95
$template->param(
98
$template->param(
96
    startdate      => $newstartdate,
99
    startdate      => $newstartdate,
97
    numberlength   => $subscription->{numberlength},
100
    numberlength   => $subscription->{numberlength},
98
    weeklength     => $subscription->{weeklength},
101
    weeklength     => $subscription->{weeklength},
99
    monthlength    => $subscription->{monthlength},
102
    monthlength    => $subscription->{monthlength},
103
    libraries      => $libraries,
100
    subscriptionid => $subscriptionid,
104
    subscriptionid => $subscriptionid,
101
    bibliotitle    => $subscription->{bibliotitle},
105
    bibliotitle    => $subscription->{bibliotitle},
102
    $op            => 1,
106
    $op            => 1,
(-)a/suggestion/suggestion.pl (-2 lines)
Lines 29-35 use C4::Budgets; Link Here
29
use C4::Search;
29
use C4::Search;
30
use C4::Members;
30
use C4::Members;
31
use C4::Debug;
31
use C4::Debug;
32
33
use Koha::DateUtils qw( dt_from_string );
32
use Koha::DateUtils qw( dt_from_string );
34
use Koha::AuthorisedValues;
33
use Koha::AuthorisedValues;
35
use Koha::Acquisition::Currencies;
34
use Koha::Acquisition::Currencies;
36
- 

Return to bug 7047