From aaad08cae3a0d46d012de5b78360101cda836c30 Mon Sep 17 00:00:00 2001 From: jeff Date: Fri, 16 Jun 2006 01:23:41 +0000 Subject: value issues and many bits remain --- FS/FS/cust_bill.pm | 3 ++- FS/FS/pay_batch.pm | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'FS') diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index c2a39afda..8a05fcf31 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -1286,10 +1286,11 @@ sub batch_card { local $FS::UID::AutoCommit = 0; my $dbh = dbh; - my $pay_batch = qsearchs('pay_batch'=> ''); + my $pay_batch = qsearchs('pay_batch', {'status' => 'O'}); unless ($pay_batch) { $pay_batch = new FS::pay_batch; + $pay_batch->setfield('status' => 'O'); my $error = $pay_batch->insert; if ( $error ) { die "error creating new batch: $error\n"; diff --git a/FS/FS/pay_batch.pm b/FS/FS/pay_batch.pm index 192c5df83..41b312c7a 100644 --- a/FS/FS/pay_batch.pm +++ b/FS/FS/pay_batch.pm @@ -98,7 +98,7 @@ sub check { my $error = $self->ut_numbern('batchnum') - || $self->ut_enum('status', [ '', 'I', 'R' ]) + || $self->ut_enum('status', [ 'O', 'I', 'R' ]) ; return $error if $error; -- cgit v1.2.1