return undef;
}
+sub fix_copy_price {
+ my $copy = shift;
+ my $p = $copy->price || 0;
+ $p =~ s/\$//og;
+ $copy->price($p);
+}
+
sub update_copy {
my( $editor, $override, $vol, $copy ) = @_;
$copy->editor($editor->requestor->id);
$copy->edit_date('now');
+
+ fix_copy_price($copy);
return $editor->event unless
$editor->update_asset_copy(
$copy, {checkperm=>1, permorg=>$vol->owning_lib});
$copy->clear_id;
$copy->creator($editor->requestor->id);
$copy->create_date('now');
+ fix_copy_price($copy);
$editor->create_asset_copy(
$copy, {checkperm=>1, permorg=>$vol->owning_lib})
my $transid = $pay->[0];
my $amount = $pay->[1];
+ $amount =~ s/\$//og; # just to be safe
+
($trans, $evt) = $apputils->fetch_open_billable_transaction($transid);
return $evt if $evt;
if( !$circ || $circ->stop_fines ) {
$trans->xact_finish("now");
-
- use Data::Dumper;
- warn Dumper($trans);
-
- warn "calling open-ils.storage.direct.money.billable_transaction.update\n";
-
my $s = $session->request(
"open-ils.storage.direct.money.billable_transaction.update", $trans )->gather(1);
$apputils->commit_db_session($session);
-
-
return $transid;
}
or return $e->event;
}
+ my $amt = $billing->amount;
+ $amt =~ s/\$//og;
+ $billing->amount($amt);
+
$e->create_money_billing($billing) or return $e->event;
$e->commit;