projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT#31594: Unapplied payment issues
[freeside.git]
/
FS
/
FS
/
cust_main
/
Billing.pm
diff --git
a/FS/FS/cust_main/Billing.pm
b/FS/FS/cust_main/Billing.pm
index
6444675
..
908f486
100644
(file)
--- a/
FS/FS/cust_main/Billing.pm
+++ b/
FS/FS/cust_main/Billing.pm
@@
-2363,6
+2363,7
@@
sub due_cust_event {
=item apply_payments_and_credits [ OPTION => VALUE ... ]
Applies unapplied payments and credits.
=item apply_payments_and_credits [ OPTION => VALUE ... ]
Applies unapplied payments and credits.
+Payments with the no_auto_apply flag set will not be applied.
In most cases, this new method should be used in place of sequential
apply_payments and apply_credits methods.
In most cases, this new method should be used in place of sequential
apply_payments and apply_credits methods.
@@
-2505,6
+2506,7
@@
sub apply_credits {
Applies (see L<FS::cust_bill_pay>) unapplied payments (see L<FS::cust_pay>)
to outstanding invoice balances in chronological order.
Applies (see L<FS::cust_bill_pay>) unapplied payments (see L<FS::cust_pay>)
to outstanding invoice balances in chronological order.
+Payments with the no_auto_apply flag set will not be applied.
#and returns the value of any remaining unapplied payments.
#and returns the value of any remaining unapplied payments.
@@
-2534,7
+2536,7
@@
sub apply_payments {
#return 0 unless
#return 0 unless
- my @payments = $self->unapplied_cust_pay;
+ my @payments =
grep { !$_->no_auto_apply }
$self->unapplied_cust_pay;
my @invoices = $self->open_cust_bill;
my @invoices = $self->open_cust_bill;