projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3f0c721
)
make snarf info available to exports
author
ivan
<ivan>
Tue, 4 Nov 2003 17:30:15 +0000
(17:30 +0000)
committer
ivan
<ivan>
Tue, 4 Nov 2003 17:30:15 +0000
(17:30 +0000)
FS/FS/part_export/shellcommands.pm
patch
|
blob
|
history
FS/FS/svc_acct.pm
patch
|
blob
|
history
diff --git
a/FS/FS/part_export/shellcommands.pm
b/FS/FS/part_export/shellcommands.pm
index
da24e5c
..
f656389
100644
(file)
--- a/
FS/FS/part_export/shellcommands.pm
+++ b/
FS/FS/part_export/shellcommands.pm
@@
-40,6
+40,13
@@
sub _export_command {
{
no strict 'refs';
${$_} = $svc_acct->getfield($_) foreach $svc_acct->fields;
{
no strict 'refs';
${$_} = $svc_acct->getfield($_) foreach $svc_acct->fields;
+
+ my $count = 1;
+ foreach my $acct_snarf ( $svc_acct->acct_snarf ) {
+ ${"snarf_$_$count"} = shell_quote( $acct_snarf->get($_) )
+ foreach qw( machine username _password );
+ $count++;
+ }
}
my $cust_pkg = $svc_acct->cust_svc->cust_pkg;
}
my $cust_pkg = $svc_acct->cust_svc->cust_pkg;
diff --git
a/FS/FS/svc_acct.pm
b/FS/FS/svc_acct.pm
index
4ea7734
..
e4acf74
100644
(file)
--- a/
FS/FS/svc_acct.pm
+++ b/
FS/FS/svc_acct.pm
@@
-16,7
+16,7
@@
use Carp;
use Fcntl qw(:flock);
use FS::UID qw( datasrc );
use FS::Conf;
use Fcntl qw(:flock);
use FS::UID qw( datasrc );
use FS::Conf;
-use FS::Record qw( qsearch qsearchs fields dbh );
+use FS::Record qw( qsearch qsearchs fields dbh
dbdef
);
use FS::svc_Common;
use FS::cust_svc;
use FS::part_svc;
use FS::svc_Common;
use FS::cust_svc;
use FS::part_svc;
@@
-951,6
+951,22
@@
sub email {
$self->username. '@'. $self->domain;
}
$self->username. '@'. $self->domain;
}
+=item acct_snarf
+
+Returns an array of FS::acct_snarf records associated with the account.
+If the acct_snarf table does not exist or there are no associated records,
+an empty list is returned
+
+=cut
+
+sub acct_snarf {
+ my $self = shift;
+ return () unless dbdef->table('acct_snarf');
+ eval "use FS::acct_snarf;";
+ die $@ if $@;
+ qsearch('acct_snarf', { 'svcnum' => $self->svcnum } );
+}
+
=item seconds_since TIMESTAMP
Returns the number of seconds this account has been online since TIMESTAMP,
=item seconds_since TIMESTAMP
Returns the number of seconds this account has been online since TIMESTAMP,