From ecf56eca694d9606ffe56d3cab13a6614efc6aa4 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Tue, 22 Jul 2008 23:27:50 +0000 Subject: Added format option to LedgerSMB::format_amount Added batch information options for check template Added batch default_date field Corrected issues with payment batches not preserving post dates when adding vouchers to existing batch. git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2219 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/DBObject/Payment.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'LedgerSMB/DBObject') diff --git a/LedgerSMB/DBObject/Payment.pm b/LedgerSMB/DBObject/Payment.pm index 50e7829f..11e5ebfd 100644 --- a/LedgerSMB/DBObject/Payment.pm +++ b/LedgerSMB/DBObject/Payment.pm @@ -89,6 +89,10 @@ sub get_metadata { for my $ref(@{$self->{cash_accounts}}){ $ref->{text} = "$ref->{accno}--$ref->{description}"; } + if ($self->{batch_id} && !defined $self->{batch_date}){ + my ($ref) = $self->exec_method(funcname => 'voucher_get_batch'); + $self->{batch_date} = $ref->{default_date}; + } } sub search { -- cgit v1.2.3