projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
477 report: improve browse-edit UI
[freeside.git]
/
FS
/
FS
/
deploy_zone.pm
diff --git
a/FS/FS/deploy_zone.pm
b/FS/FS/deploy_zone.pm
index
3caeda2
..
227a022
100644
(file)
--- a/
FS/FS/deploy_zone.pm
+++ b/
FS/FS/deploy_zone.pm
@@
-97,6
+97,14
@@
type of service is sold.
'Y' if this service is sold to business or institutional use. Not mutually
exclusive with is_consumer.
'Y' if this service is sold to business or institutional use. Not mutually
exclusive with is_consumer.
+=item active_date
+
+The date this zone became active.
+
+=item expire_date
+
+The date this zone became inactive, if any.
+
=back
=head1 METHODS
=back
=head1 METHODS
@@
-183,9
+191,20
@@
sub check {
|| $self->ut_decimaln('cir_speed_down', 3)
|| $self->ut_flag('is_consumer')
|| $self->ut_flag('is_business')
|| $self->ut_decimaln('cir_speed_down', 3)
|| $self->ut_flag('is_consumer')
|| $self->ut_flag('is_business')
+ || $self->ut_numbern('active_date')
+ || $self->ut_numbern('expire_date')
;
return $error if $error;
;
return $error if $error;
+ foreach(qw(adv_speed_down adv_speed_up cir_speed_down cir_speed_up)) {
+ if (!$self->get($_)) {
+ $self->set($_, 0);
+ }
+ }
+ if (!$self->get('active_date')) {
+ $self->set('active_date', time);
+ }
+
$self->SUPER::check;
}
$self->SUPER::check;
}