X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_main.pm;h=3e36c6049a0e1064d042fb28e4439e0b0f9bf326;hp=a9a4cb0efa81bd5b57ac7526e8f2cebdd5d81bb8;hb=6422e165313ee8d67790007581821217240734fb;hpb=cd365522ec4e9f1b553bb1b5096c756c1fdb1d01 diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index a9a4cb0ef..3e36c6049 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -1243,13 +1243,14 @@ sub merge { } tie my %financial_tables, 'Tie::IxHash', - 'cust_bill' => 'invoices', - 'cust_bill_void' => 'voided invoices', - 'cust_statement' => 'statements', - 'cust_credit' => 'credits', - 'cust_pay' => 'payments', - 'cust_pay_void' => 'voided payments', - 'cust_refund' => 'refunds', + 'cust_bill' => 'invoices', + 'cust_bill_void' => 'voided invoices', + 'cust_statement' => 'statements', + 'cust_credit' => 'credits', + 'cust_credit_void' => 'voided credits', + 'cust_pay' => 'payments', + 'cust_pay_void' => 'voided payments', + 'cust_refund' => 'refunds', ; foreach my $table ( keys %financial_tables ) { @@ -3732,6 +3733,19 @@ sub cust_credit_pkgnum { ); } +=item cust_credit_void + +Returns all voided credits (see L) for this customer. + +=cut + +sub cust_credit_void { + my $self = shift; + map { $_ } + sort { $a->_date <=> $b->_date } + qsearch( 'cust_credit_void', { 'custnum' => $self->custnum } ) +} + =item cust_pay Returns all the payments (see L) for this customer.