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 33-38 Link Here
33
		<ol><li><label for="numberlength">Number of num:</label><input type="text" id="numberlength" name="numberlength" value="[% numberlength %]" /></li>
33
		<ol><li><label for="numberlength">Number of num:</label><input type="text" id="numberlength" name="numberlength" value="[% numberlength %]" /></li>
34
		<li><label for="weeklength">Number of weeks: </label><input type="text" id="weeklength" name="weeklength" value="[% weeklength %]" /></li>
34
		<li><label for="weeklength">Number of weeks: </label><input type="text" id="weeklength" name="weeklength" value="[% weeklength %]" /></li>
35
		<li><label for="monthlength">Number of months: </label><input type="text" id="monthlength" name="monthlength" value="[% monthlength %]" /></li></ol></fieldset></li>
35
		<li><label for="monthlength">Number of months: </label><input type="text" id="monthlength" name="monthlength" value="[% monthlength %]" /></li></ol></fieldset></li>
36
<li><label for="branchcode">Library:</label>
37
 <select name="branchcode" id="branchcode" style="width: 20em;">
38
     [% UNLESS ( Independentbranches ) %]
39
        <option value="">None</option>
40
     [% END %]
41
     [% IF CAN_user_serials_superserials %]
42
        [% FOREACH library IN libraries %]
43
             <option value="[% library.branchcode %]"> [% library.branchname %] </option>
44
        [% END %]
45
     [% END %]
46
</select> (select a library)
47
</li>
48
36
		<li><label for="note">Note for the librarian that will manage your renewal request: </label>
49
		<li><label for="note">Note for the librarian that will manage your renewal request: </label>
37
		<textarea name="note" id="note" rows="5" cols="50"></textarea></li></ol></fieldset>
50
		<textarea name="note" id="note" rows="5" cols="50"></textarea></li></ol></fieldset>
38
		<fieldset class="action"><input type="submit" value="Submit" class="button" /></fieldset>
51
		<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 61-66 my $dbh = C4::Context->dbh; Link Here
61
my $mode           = $query->param('mode') || q{};
61
my $mode           = $query->param('mode') || q{};
62
my $op             = $query->param('op') || 'display';
62
my $op             = $query->param('op') || 'display';
63
my $subscriptionid = $query->param('subscriptionid');
63
my $subscriptionid = $query->param('subscriptionid');
64
my $branchcode     = $query->param('branchcode');
64
my $done = 0;    # for after form has been submitted
65
my $done = 0;    # for after form has been submitted
65
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
66
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
66
    {
67
    {
Lines 78-84 if ( $op eq "renew" ) { Link Here
78
        $subscriptionid, $loggedinuser,
79
        $subscriptionid, $loggedinuser,
79
        $startdate, $query->param('numberlength'),
80
        $startdate, $query->param('numberlength'),
80
        $query->param('weeklength'), $query->param('monthlength'),
81
        $query->param('weeklength'), $query->param('monthlength'),
81
        $query->param('note')
82
        $query->param('note'), $branchcode
82
    );
83
    );
83
}
84
}
84
85
Lines 91-101 if ($subscription->{'cannotedit'}){ Link Here
91
my $newstartdate = output_pref( { str => $subscription->{enddate}, dateonly => 1 } )
92
my $newstartdate = output_pref( { str => $subscription->{enddate}, dateonly => 1 } )
92
    or output_pref( { dt => dt_from_string, dateonly => 1 } );
93
    or output_pref( { dt => dt_from_string, dateonly => 1 } );
93
94
95
my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, );
96
94
$template->param(
97
$template->param(
95
    startdate      => $newstartdate,
98
    startdate      => $newstartdate,
96
    numberlength   => $subscription->{numberlength},
99
    numberlength   => $subscription->{numberlength},
97
    weeklength     => $subscription->{weeklength},
100
    weeklength     => $subscription->{weeklength},
98
    monthlength    => $subscription->{monthlength},
101
    monthlength    => $subscription->{monthlength},
102
    libraries      => $libraries,
99
    subscriptionid => $subscriptionid,
103
    subscriptionid => $subscriptionid,
100
    bibliotitle    => $subscription->{bibliotitle},
104
    bibliotitle    => $subscription->{bibliotitle},
101
    $op            => 1,
105
    $op            => 1,
(-)a/suggestion/suggestion.pl (-2 lines)
Lines 28-34 use C4::Budgets; Link Here
28
use C4::Search;
28
use C4::Search;
29
use C4::Members;
29
use C4::Members;
30
use C4::Debug;
30
use C4::Debug;
31
32
use Koha::DateUtils qw( dt_from_string );
31
use Koha::DateUtils qw( dt_from_string );
33
use Koha::AuthorisedValues;
32
use Koha::AuthorisedValues;
34
use Koha::Acquisition::Currencies;
33
use Koha::Acquisition::Currencies;
35
- 

Return to bug 7047