show credit balance on invoices, #11564
[freeside.git] / FS / FS / h_svc_www.pm
1 package FS::h_svc_www;
2
3 use strict;
4 use vars qw( @ISA $DEBUG );
5 use Carp qw(carp);
6 use FS::Record qw(qsearchs);
7 use FS::h_Common;
8 use FS::svc_www;
9 use FS::h_domain_record;
10
11 @ISA = qw( FS::h_Common FS::svc_www );
12
13 $DEBUG = 0;
14
15 sub table { 'h_svc_www' };
16
17 =head1 NAME
18
19 FS::h_svc_www - Historical web virtual host objects
20
21 =head1 SYNOPSIS
22
23 =head1 METHODS
24
25 =over 4
26
27 =item domain_record
28
29 =cut
30
31 sub domain_record {
32   my $self = shift;
33
34   carp 'Called FS::h_svc_www->domain_record on svcnum ' . $self->svcnum if $DEBUG;
35
36   my $domain_record = qsearchs(
37     'h_domain_record',
38     { 'recnum' => $self->recnum },
39     FS::h_domain_record->sql_h_searchs(@_),
40   ) || $self->SUPER::domain_record
41     or die "no history domain_record.recnum for svc_www.recnum ". $self->domsvc;
42
43   carp 'Using domain_record in place of missing h_domain_record record.'
44     if ($domain_record->isa('FS::domain_record') and $DEBUG);
45
46   return $domain_record;
47   
48 }
49
50 =back
51
52 =head1 DESCRIPTION
53
54 An FS::h_svc_www object represents a historical web virtual host.
55 FS::h_svc_www inherits from FS::h_Common and FS::svc_www.
56
57 =head1 BUGS
58
59 =head1 SEE ALSO
60
61 L<FS::h_Common>, L<FS::svc_www>, L<FS::Record>, schema.html from the base
62 documentation.
63
64 =cut
65
66 1;
67