Lines 160-167
sub after_circ_action {
Link Here
|
160 |
|
160 |
|
161 |
my $action = $params->{action}; |
161 |
my $action = $params->{action}; |
162 |
my $checkout = $params->{payload}->{checkout}; |
162 |
my $checkout = $params->{payload}->{checkout}; |
163 |
|
163 |
my $payload = $params->{payload}; |
164 |
Koha::Exceptions::Exception->throw("after_circ_action called with action: $action, ref: " . ref($checkout)); |
164 |
|
|
|
165 |
my $renewal_library_id = $payload->{renewal_library_id}; |
166 |
my $charge = $payload->{charge}; |
167 |
my $item_id = $payload->{item_id}; |
168 |
my $item_type = $payload->{item_type}; |
169 |
my $shelving_location = $payload->{shelving_location}; |
170 |
my $patron_id = $payload->{patron_id}; |
171 |
my $collection_code = $payload->{collection_code}; |
172 |
my $date_due = $payload->{date_due}; |
173 |
my $date_returned = $payload->{date_returned}; |
174 |
|
175 |
if ( $action eq 'renewal' ) { |
176 |
Koha::Exceptions::Exception->throw("after_circ_action called with action: $action, ref: " . ref($checkout)); |
177 |
} |
178 |
elsif ( $action eq 'checkout') { |
179 |
Koha::Exceptions::Exception->throw("after_circ_action called with action: $action, ref: " . ref($date_due)); |
180 |
} |
181 |
elsif ( $action eq 'checkin' ) { |
182 |
Koha::Exceptions::Exception->throw("after_circ_action called with action: $action, ref: " . ref($date_returned)); |
183 |
} |
165 |
} |
184 |
} |
166 |
|
185 |
|
167 |
sub api_routes { |
186 |
sub api_routes { |
168 |
- |
|
|