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