# CStoreEditor, an arrayref of bill ids or bills, and an optional note.
sub void_bills {
my ($class, $e, $billids, $note) = @_;
- return $e->die_event unless $e->checkauth;
- return $e->die_event unless $e->allowed('VOID_BILLING');
my %users;
my $bills;
sub adjust_bills_to_zero {
my ($class, $e, $billids, $note) = @_;
- # Get with the editor to see if we have permission to void bills.
- return $e->die_event unless $e->checkauth;
- return $e->die_event unless $e->allowed('VOID_BILLING');
-
my %users;
# Let's get all the billing objects and handle them by
sub void_bill {
my( $s, $c, $authtoken, @billids ) = @_;
my $editor = new_editor(authtoken=>$authtoken, xact=>1);
+ return $editor->die_event unless $editor->checkauth;
+ return $editor->die_event unless $editor->allowed('VOID_BILLING');
my $rv = $CC->void_bills($editor, \@billids);
if (ref($rv) eq 'HASH') {
# We got an event.