From 6935413a1b883aceb9bb6906b653ca77990c5439 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Fri, 30 Nov 2007 07:31:45 +0000 Subject: Separated out multiple payment interface from new payment interface. Still not working, but almost there git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1926 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/DBObject/Payment.pm | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'LedgerSMB/DBObject') diff --git a/LedgerSMB/DBObject/Payment.pm b/LedgerSMB/DBObject/Payment.pm index 533a9cb8..62bef3bd 100644 --- a/LedgerSMB/DBObject/Payment.pm +++ b/LedgerSMB/DBObject/Payment.pm @@ -51,14 +51,25 @@ calculation. sub __validate__ { my ($self) = shift @_; - #FIRST WE CHECK IF THE MAIN PROPERTY 'account_class' IS SET + # If the account class is not set, we don't know if it is a payment or a + # receipt. --CT if (!$self->{account_class}) { $self->error("account_class must be set") }; - #NOW WE SET THE CURRENT DATE + # We should try to re-engineer this so that we don't have to include SQL in + # this file. --CT ($self->{current_date}) = $self->{dbh}->selectrow_array('select current_date'); } +sub get_metadata { + my ($self) = @_; + $self->list_open_projects(); + @{$self->{departments}} = $self->exec_method(funcname => 'department_list'); + $self->get_open_currencies(); + @{$self->{businesses}} = $self->exec_method( + funcname => 'business_type__list' + ); +} sub get_open_accounts { my ($self) = @_; -- cgit v1.2.3