projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
72393: High-priority: Tags history
[freeside.git]
/
FS
/
FS
/
cust_pay_pending.pm
diff --git
a/FS/FS/cust_pay_pending.pm
b/FS/FS/cust_pay_pending.pm
index
3a8322e
..
d108341
100644
(file)
--- a/
FS/FS/cust_pay_pending.pm
+++ b/
FS/FS/cust_pay_pending.pm
@@
-215,7
+215,7
@@
sub check {
my $error =
$self->ut_numbern('paypendingnum')
my $error =
$self->ut_numbern('paypendingnum')
- || $self->ut_foreign_key('custnum', 'cust_main', 'custnum')
+ || $self->ut_foreign_key
n
('custnum', 'cust_main', 'custnum')
|| $self->ut_money('paid')
|| $self->ut_numbern('_date')
|| $self->ut_textn('payunique')
|| $self->ut_money('paid')
|| $self->ut_numbern('_date')
|| $self->ut_textn('payunique')
@@
-235,6
+235,10
@@
sub check {
;
return $error if $error;
;
return $error if $error;
+ if (!$self->custnum and !$self->get('custnum_pending')) {
+ return 'custnum required';
+ }
+
$self->_date(time) unless $self->_date;
# UNIQUE index should catch this too, without race conditions, but this
$self->_date(time) unless $self->_date;
# UNIQUE index should catch this too, without race conditions, but this