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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-batchedit.tt (+17 lines)
Lines 49-54 Link Here
49
                                    <th>Nonpublic notes</th>
49
                                    <th>Nonpublic notes</th>
50
                                    <th>Call number</th>
50
                                    <th>Call number</th>
51
                                    <th>Create item when receiving</th>
51
                                    <th>Create item when receiving</th>
52
                                    <th>Late issue notification</th>
52
                                    <th>Expiration date</th>
53
                                    <th>Expiration date</th>
53
                                </tr>
54
                                </tr>
54
                            </thead>
55
                            </thead>
Lines 71-76 Link Here
71
                                                <span>No</span>
72
                                                <span>No</span>
72
                                            [% END %]
73
                                            [% END %]
73
                                        </td>
74
                                        </td>
75
                                        <td>
76
                                            [% IF letters_map.defined(subscription.late_issue_letter_code) %]
77
                                                [% letters_map.item(subscription.late_issue_letter_code) | html %]
78
                                            [% ELSE %]
79
                                                [% subscription.late_issue_letter_code | html %]
80
                                            [% END %]
81
                                        </td>
74
                                        <td>[% subscription.enddate | $KohaDates %]</td>
82
                                        <td>[% subscription.enddate | $KohaDates %]</td>
75
                                    </tr>
83
                                    </tr>
76
                                [% END %]
84
                                [% END %]
Lines 140-145 Link Here
140
                                    </select>
148
                                    </select>
141
149
142
                                </li>
150
                                </li>
151
                                <li>
152
                                    <label for="late_issue_letter_code">Late issue notification: </label>
153
                                    <select id="late_issue_letter_code" name="late_issue_letter_code">
154
                                        <option value="">No change</option>
155
                                        [% FOREACH letter IN letters %]
156
                                            <option value="[% letter.code | html %]">[% letter.name | html %]</option>
157
                                        [% END %]
158
                                    </select>
159
                                </li>
143
                                <li>
160
                                <li>
144
                                    <label for="enddate">Expiration date: </label>
161
                                    <label for="enddate">Expiration date: </label>
145
                                    <input type="text" class="flatpickr" id="enddate" name="enddate" placeholder="No change"/>
162
                                    <input type="text" class="flatpickr" id="enddate" name="enddate" placeholder="No change"/>
(-)a/serials/subscription-batchedit.pl (-1 / +15 lines)
Lines 27-32 use C4::Serials qw( can_edit_subscription ); Link Here
27
use Koha::Subscriptions;
27
use Koha::Subscriptions;
28
use Koha::Acquisition::Booksellers;
28
use Koha::Acquisition::Booksellers;
29
use Koha::AdditionalFields;
29
use Koha::AdditionalFields;
30
use Koha::Database;
30
use Koha::DateUtils qw( dt_from_string );
31
use Koha::DateUtils qw( dt_from_string );
31
32
32
my $cgi = CGI->new;
33
my $cgi = CGI->new;
Lines 59-64 if ($batchedit) { Link Here
59
        notes => scalar $cgi->param('notes'),
60
        notes => scalar $cgi->param('notes'),
60
        internalnotes => scalar $cgi->param('internalnotes'),
61
        internalnotes => scalar $cgi->param('internalnotes'),
61
        serialsadditems => scalar $cgi->param('serialsadditems'),
62
        serialsadditems => scalar $cgi->param('serialsadditems'),
63
        late_issue_letter_code => scalar $cgi->param('late_issue_letter_code'),
62
        enddate => dt_from_string(scalar $cgi->param('enddate')),
64
        enddate => dt_from_string(scalar $cgi->param('enddate')),
63
    );
65
    );
64
66
Lines 96-106 if ($batchedit) { Link Here
96
    exit;
98
    exit;
97
}
99
}
98
100
101
my $schema = Koha::Database->schema;
102
my @letters = $schema->resultset('Letter')->search(
103
    { module => 'serial' },
104
    {
105
        columns => ['code', 'name'],
106
        distinct => 1,
107
        order_by => 'code',
108
    },
109
);
110
my %letters_map = map { $_->code => $_->name } @letters;
111
99
$template->param(
112
$template->param(
100
    subscriptions => \@subscriptions,
113
    subscriptions => \@subscriptions,
101
    booksellers => [ Koha::Acquisition::Booksellers->search->as_list ],
114
    booksellers => [ Koha::Acquisition::Booksellers->search->as_list ],
102
    additional_fields => \@additional_fields,
115
    additional_fields => \@additional_fields,
103
    referrer => scalar $cgi->param('referrer'),
116
    referrer => scalar $cgi->param('referrer'),
117
    letters => \@letters,
118
    letters_map => \%letters_map,
104
);
119
);
105
120
106
output_html_with_http_headers $cgi, $cookie, $template->output;
121
output_html_with_http_headers $cgi, $cookie, $template->output;
107
- 

Return to bug 30096