X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_main.pm;h=51bde33fa5fd5203cf22704697b413009e5665d9;hb=51f97ec141f77064ca020634e7eccd85d9ead753;hp=55a31f8858234e2f5d2ae53114e874e7cd7e1540;hpb=39b05a617a55fe0bb072cde02a5c1b5b16301f62;p=freeside.git diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 55a31f885..51bde33fa 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -3406,6 +3406,22 @@ sub charge_postal_fee { $error ? $error : $cust_pkg; } +=item num_cust_attachment_deleted + +Returns the number of deleted attachments for this customer (see +L). + +=cut + +sub num_cust_attachments_deleted { + my $self = shift; + $self->scalar_sql( + " SELECT COUNT(*) FROM cust_attachment ". + " WHERE custnum = ? AND disabled IS NOT NULL AND disabled > 0", + $self->custnum + ); +} + =item cust_bill [ OPTION => VALUE... | EXTRA_QSEARCH_PARAMS_HASHREF ] Returns all the invoices (see L) for this customer. @@ -5340,6 +5356,11 @@ sub _upgrade_data { #class method } +sub queueable_upgrade { + my $class = shift; + FS::cust_main::Billing_Realtime::token_check(@_); +} + =back =head1 BUGS