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 54-66
my $available_additional_fields = Koha::AdditionalFields->search( { tablename =>
Link Here
|
54 |
my $op = $cgi->param('op') || q{}; |
55 |
my $op = $cgi->param('op') || q{}; |
55 |
if ( $op eq 'cud-batchedit' ) { |
56 |
if ( $op eq 'cud-batchedit' ) { |
56 |
my %params = ( |
57 |
my %params = ( |
57 |
aqbooksellerid => scalar $cgi->param('booksellerid'), |
58 |
aqbooksellerid => scalar $cgi->param('booksellerid'), |
58 |
location => scalar $cgi->param('location'), |
59 |
location => scalar $cgi->param('location'), |
59 |
branchcode => scalar $cgi->param('branchcode'), |
60 |
branchcode => scalar $cgi->param('branchcode'), |
60 |
itemtype => scalar $cgi->param('itemtype'), |
61 |
itemtype => scalar $cgi->param('itemtype'), |
61 |
notes => scalar $cgi->param('notes'), |
62 |
notes => scalar $cgi->param('notes'), |
62 |
internalnotes => scalar $cgi->param('internalnotes'), |
63 |
internalnotes => scalar $cgi->param('internalnotes'), |
63 |
serialsadditems => scalar $cgi->param('serialsadditems'), |
64 |
serialsadditems => scalar $cgi->param('serialsadditems'), |
|
|
65 |
late_issue_letter_code => scalar $cgi->param('late_issue_letter_code'), |
64 |
); |
66 |
); |
65 |
|
67 |
|
66 |
# If we convert a blank string we get todays date, we should only convert enddate if it is not blank |
68 |
# If we convert a blank string we get todays date, we should only convert enddate if it is not blank |
Lines 98-108
if ( $op eq 'cud-batchedit' ) {
Link Here
|
98 |
exit; |
100 |
exit; |
99 |
} |
101 |
} |
100 |
|
102 |
|
|
|
103 |
my $schema = Koha::Database->schema; |
104 |
my @letters = $schema->resultset('Letter')->search( |
105 |
{ module => 'serial' }, |
106 |
{ |
107 |
columns => ['code', 'name'], |
108 |
distinct => 1, |
109 |
order_by => 'code', |
110 |
}, |
111 |
); |
112 |
my %letters_map = map { $_->code => $_->name } @letters; |
113 |
|
101 |
$template->param( |
114 |
$template->param( |
102 |
subscriptions => \@subscriptions, |
115 |
subscriptions => \@subscriptions, |
103 |
booksellers => [ Koha::Acquisition::Booksellers->search->as_list ], |
116 |
booksellers => [ Koha::Acquisition::Booksellers->search->as_list ], |
104 |
available_additional_fields => Koha::AdditionalFields->search( { tablename => 'subscription' } ), |
117 |
available_additional_fields => Koha::AdditionalFields->search( { tablename => 'subscription' } ), |
105 |
referrer => scalar $cgi->param('referrer'), |
118 |
referrer => scalar $cgi->param('referrer'), |
|
|
119 |
letters => \@letters, |
120 |
letters_map => \%letters_map, |
106 |
); |
121 |
); |
107 |
|
122 |
|
108 |
output_html_with_http_headers $cgi, $cookie, $template->output; |
123 |
output_html_with_http_headers $cgi, $cookie, $template->output; |
109 |
- |
|
|