diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-11-30 07:31:45 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-11-30 07:31:45 +0000 |
commit | 6935413a1b883aceb9bb6906b653ca77990c5439 (patch) | |
tree | 762e4d7dd49507c3e19ae883715399c75b906617 /LedgerSMB | |
parent | 57662811db634598271d5a750a68f48ae342fa81 (diff) |
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
Diffstat (limited to 'LedgerSMB')
-rw-r--r-- | LedgerSMB/DBObject/Payment.pm | 15 |
1 files changed, 13 insertions, 2 deletions
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) = @_; |