diff options
author | ivan <ivan> | 2005-10-07 02:25:41 +0000 |
---|---|---|
committer | ivan <ivan> | 2005-10-07 02:25:41 +0000 |
commit | 7a97ed31c38e975c6548083039ff2ce31c6d8cf3 (patch) | |
tree | a18baccd2db1d7fbe297529c475fd4c39ff88126 /FS | |
parent | e65217c9d44ce759a397f3948c2f19ceb16f8931 (diff) |
add require_taxclasses config flag
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/Conf.pm | 7 | ||||
-rw-r--r-- | FS/FS/part_pkg.pm | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 0bf1afeeb..30aa1e7ab 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -1258,6 +1258,13 @@ httemplate/docs/config.html }, { + 'key' => 'require_taxclasses', + 'section' => 'billing', + 'description' => 'Require a taxclass to be entered for every package', + 'type' => 'checkbox', + }, + + { 'key' => 'welcome_email', 'section' => '', 'description' => 'Template file for welcome email. Welcome emails are sent to the customer email invoice destination(s) each time a svc_acct record is created. See the <a href="http://search.cpan.org/~mjd/Text-Template/lib/Text/Template.pm">Text::Template</a> documentation for details on the template substitution language. The following variables are available<ul><li><code>$username</code> <li><code>$password</code> <li><code>$first</code> <li><code>$last</code> <li><code>$pkg</code></ul>', diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm index db31e456f..73f3bae04 100644 --- a/FS/FS/part_pkg.pm +++ b/FS/FS/part_pkg.pm @@ -441,6 +441,10 @@ sub check { return 'Unknown plan '. $self->plan unless exists($plans{$self->plan}); + my $conf = new FS::Conf; + return 'Taxclass is required' + if ! $self->taxclass && $conf->exists('require_taxclasses'); + ''; } |