sub fine_items {
my ($self, $start, $end, $ids_only) = @_;
my @fines;
+ # Check for Envisionware extension:
+ my $envisionware_ext = OpenILS::SIP->get_option_value('msg64_fine_items_envisionware') || '';
eval {
my $xacts = $U->simplereq('open-ils.actor', 'open-ils.actor.user.transactions.history.have_balance', $self->{authtoken}, $self->{user}->id);
foreach my $xact (@{$xacts}) {
push @fines, $xact;
next;
}
- my $line = $xact->balance_owed . " " . $xact->last_billing_type . " ";
+ my $line;
+ if ($envisionware_ext) {
+ $line = $xact->id . ' $' . $xact->balance_owed . " ";
+ if ($xact->last_billing_type =~ /^Lost/) {
+ $line .= '"LOST"';
+ } elsif ($xact->last_billing_type =~ /^Overdue/) {
+ $line .= '"FINE"';
+ } else {
+ $line .= '"FEE"';
+ }
+ $line .= " ";
+ } else {
+ $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;
+ $line .= $mods->title;
+ $line .= ' / ' . $mods->author unless ($envisionware_ext);
} else {
$line .= $xact->last_billing_note;
}