</listeners>
<accounts>
+ <!--
+ Fine Item Detail returned by the Patron Information Request is
+ manufacturer-specific. We support the following formats:
+ 3m, Swyer_A, Swyer_B, and EG_Legacy (default)
+ Specify which treatment you want in the av_format attribute.
+ For example: <login id="sc" password="pwd" institution="main" av_format="3m">
+ -->
+
<login id="scclient" password="clientpwd" institution="gapines"/>
+
</accounts>
<!-- Institution tags will hold stuff used to interface to -->
flag instead of always returning not-OK
<option name='patron_calculate_recal_ok' value='true' />
-->
- <!--
- Fine Item Detail returned by the Patron Information Request is
- manufacturer-specific. We support the following formats:
- 3m, Swyer_A, Swyer_B, and EG_Legacy (default)
- Specify which treatment you want in the av_format option.
- <option name='av_format' value='eg_legacy' />
- -->
+<<<<<<< Updated upstream
+=======
+>>>>>>> Stashed changes
</options>
<checkin_override>
sub fine_items {
my ($self, $start, $end, $ids_only) = @_;
my @fines;
- my ($AV_format_orig, $AV_format, $line);
-
eval {
- $AV_format_orig = OpenILS::SIP->get_option_value('av_format') || '';
+<<<<<<< Updated upstream
+=======
+ my $login = OpenILS::SIP->login_account();
+ $AV_format_orig = $login->{av_format} || '';
$AV_format_orig = "eg_legacy" if $AV_format_orig == '';
$AV_format = lc $AV_format_orig; # For case-insensitivity
$AV_format = "eg_legacy";
}
+>>>>>>> Stashed changes
my $xacts = $U->simplereq('open-ils.actor', 'open-ils.actor.user.transactions.history.have_balance', $self->{authtoken}, $self->{user}->id);
-
foreach my $xact (@{$xacts}) {
if ($ids_only) {
- $line = $xact;
-
- #-------------------
- # eg_legacy
- #-------------------
- } elsif ($AV_format eq "eg_legacy") {
- $line = $xact->balance_owed . " " . $xact->last_billing_type . " ";
- if ($xact->xact_type eq 'circulation') {
- my $mods = $U->simplereq('open-ils.circ', 'open-ils.circ.circ_transaction.find_title', $self->{authtoken}, $xact->id);
- $line .= $mods->title . ' / ' . $mods->author;
- } else {
- $line .= $xact->last_billing_note;
- }
-
- #-------------------
- # 3m or swyer_a
- #-------------------
- } elsif ($AV_format eq "3m" or $AV_format eq "swyer_a") {
- $line = $xact->id . ' $' . $xact->balance_owed . ' "FINE" ' . $xact->last_billing_type . ' ';
- if ($xact->xact_type eq 'circulation') {
- my $mods = $U->simplereq('open-ils.circ', 'open-ils.circ.circ_transaction.find_title', $self->{authtoken}, $xact->id);
- $line .= $mods->title . ' / ' . $mods->author;
- } else {
- $line .= $xact->last_billing_note;
- }
-
-
- #-------------------
- # swyer_b
- #-------------------
- } elsif ($AV_format eq "swyer_b") {
- $line = "Charge-Number: " . $xact->id;
- $line .= ", Amount-Due: " . $xact->balance_owed;
- $line .= ", Fine-Type: FINE";
-
- if ($xact->xact_type eq 'circulation') {
- my $mods = $U->simplereq('open-ils.circ', 'open-ils.circ.circ_transaction.find_title', $self->{authtoken}, $xact->id);
- $line .= ", Title: " . $mods->title;
- } else {
- $line .= ", Title: " . $xact->last_billing_note;
- }
-
- }
-
- push @fines, $line;
+ push @fines, $xact;
+ next;
+ }
+ my $line = $xact->balance_owed . " " . $xact->last_billing_type . " ";
+ if ($xact->xact_type eq 'circulation') {
+ my $mods = $U->simplereq('open-ils.circ', 'open-ils.circ.circ_transaction.find_title', $self->{authtoken}, $xact->id);
+ $line .= $mods->title . ' / ' . $mods->author;
+ } else {
+ $line .= $xact->last_billing_note;
+ }
+ push @fines, $line;
}
};
-
my $log_status = $@ ? 'ERROR: ' . $@ : 'OK';
syslog('LOG_DEBUG', 'OILS: Patron->fine_items() ' . $log_status);
return (defined $start and defined $end) ?