summaryrefslogtreecommitdiff
path: root/LedgerSMB/DBObject/Payment.pm
diff options
context:
space:
mode:
Diffstat (limited to 'LedgerSMB/DBObject/Payment.pm')
-rw-r--r--LedgerSMB/DBObject/Payment.pm21
1 files changed, 21 insertions, 0 deletions
diff --git a/LedgerSMB/DBObject/Payment.pm b/LedgerSMB/DBObject/Payment.pm
index 02f3aad5..6cc23f2e 100644
--- a/LedgerSMB/DBObject/Payment.pm
+++ b/LedgerSMB/DBObject/Payment.pm
@@ -105,6 +105,16 @@ sub get_open_accounts {
return @{$self->{accounts}};
}
+
+sub get_entity_credit_account{
+ my ($self) = @_;
+ @{$self->{entity_accounts}} =
+ $self->exec_method(funcname => 'payment_get_entity_accounts');
+ return @{$self->{entity_accounts}};
+
+}
+
+
=over
=item $payment->get_all_accounts()
@@ -499,4 +509,15 @@ sub check_job {
($self->{job}) = $self->exec_method(funcname => 'job__status');
}
+=item post_payment
+
+This method uses payment_post to store a payment (not a bulk payment) on the database.
+
+=cut
+
+sub post_payment {
+ my ($self) = @_;
+ $self->exec_method(funcname => 'payment_post');
+ $self->{dbh}->commit();
+}
1;