projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT# 83203 - made Tower/Sector, speed_up, speed_down required
[freeside.git]
/
FS
/
FS
/
part_pkg.pm
diff --git
a/FS/FS/part_pkg.pm
b/FS/FS/part_pkg.pm
index
356c0c0
..
f8720a9
100644
(file)
--- a/
FS/FS/part_pkg.pm
+++ b/
FS/FS/part_pkg.pm
@@
-695,12
+695,23
@@
sub replace {
sub validate_number {
my ($option, $valref) = @_;
sub validate_number {
my ($option, $valref) = @_;
+
$$valref = 0 unless $$valref;
return "Invalid $option"
unless ($$valref) = ($$valref =~ /^\s*(\d+)\s*$/);
return '';
}
$$valref = 0 unless $$valref;
return "Invalid $option"
unless ($$valref) = ($$valref =~ /^\s*(\d+)\s*$/);
return '';
}
+sub validate_number_blank {
+ my ($option, $valref) = @_;
+
+ if ($$valref) {
+ return "Invalid $option"
+ unless ($$valref) = ($$valref =~ /^\s*(\d+)\s*$/);
+ }
+ return '';
+}
+
=item check
Checks all fields to make sure this is a valid package definition. If
=item check
Checks all fields to make sure this is a valid package definition. If
@@
-1889,11
+1900,11
@@
Frequency override (for calc_recur)
This option is filled in by the method rather than controlling its operation.
It is an arrayref. Applicable discounts will be added to the arrayref, as
This option is filled in by the method rather than controlling its operation.
It is an arrayref. Applicable discounts will be added to the arrayref, as
-L<FS::cust_bill_pkg_discount
|FS::cust_bill_pkg_discount records>
.
+L<FS::cust_bill_pkg_discount
> records
.
=item real_pkgpart
=item real_pkgpart
-For package add-ons, is the base L<FS::part_pkg
|package definition>
, otherwise
+For package add-ons, is the base L<FS::part_pkg
> package definition
, otherwise
no different than pkgpart.
=item precommit_hooks
no different than pkgpart.
=item precommit_hooks
@@
-1917,7
+1928,7
@@
plan option prorate_defer_bill).
=back
Note: Don't calculate prices when not actually billing the package. For that,
=back
Note: Don't calculate prices when not actually billing the package. For that,
-see the L<
/base_setup|base_setup> and L</base_recur|
base_recur> methods.
+see the L<
FS::cust_pkg/base_setup> and L<FS::cust_pkg/
base_recur> methods.
=cut
=cut