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 +++- UI/Contact/contact.html | 2 +- UI/payments/payments_detail.html | 148 +++++++++++++++++++++++++++++++++++++++ UI/payments/payments_filter.html | 93 ++++++++++++++++++++++++ scripts/payment.pl | 15 ++++ sql/modules/Business_type.sql | 9 +++ sql/modules/Payment.sql | 36 ++++++++-- 7 files changed, 308 insertions(+), 10 deletions(-) create mode 100644 UI/payments/payments_detail.html create mode 100644 UI/payments/payments_filter.html create mode 100644 sql/modules/Business_type.sql 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) = @_; diff --git a/UI/Contact/contact.html b/UI/Contact/contact.html index bceea462..0504e976 100644 --- a/UI/Contact/contact.html +++ b/UI/Contact/contact.html @@ -546,7 +546,7 @@ problems with multi-word single-quoted constructs in PI tags. -CT --> value=bank_account_id } ?>