From e6b2f50939b78d5f181070b3aedcd528f5393833 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Fri, 12 Sep 2008 22:57:58 +0000 Subject: Added description field to customer/vendor generation. Corrected entity credit account autogenerated number sequences. git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2321 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/DBObject/Company.pm | 6 ++++-- UI/Contact/contact.html | 18 +++++++++++++++--- sql/Pg-database.sql | 1 + sql/modules/Company.sql | 27 ++++++++++++++++++++++----- 4 files changed, 42 insertions(+), 10 deletions(-) diff --git a/LedgerSMB/DBObject/Company.pm b/LedgerSMB/DBObject/Company.pm index b2eed72c..a0cce914 100644 --- a/LedgerSMB/DBObject/Company.pm +++ b/LedgerSMB/DBObject/Company.pm @@ -71,7 +71,8 @@ sub save_credit { my $self = shift @_; $self->set_entity_class(); $self->{threshold} = $self->parse_amount(amount => $self->{threshold}); - $self->exec_method(funcname => 'entity_credit_save'); + my ($ref) = $self->exec_method(funcname => 'entity_credit_save'); + $self->{credit_id} = (values %$ref)[0]; $self->{threshold} = $self->format_amount(amount => $self->{threshold}); $self->{dbh}->commit; } @@ -218,7 +219,8 @@ sub get { for (@{$self->{credit_list}}){ print STDERR "credit_id: $_->{credit_id}\n"; if (($_->{credit_id} eq $self->{credit_id}) - or ($_->{meta_number} eq $self->{meta_number})){ + or ($_->{meta_number} eq $self->{meta_number}) + or ($_->{id} eq $self->{credit_id})){ $self->merge($_); last; } diff --git a/UI/Contact/contact.html b/UI/Contact/contact.html index c061ac52..2ccd5491 100644 --- a/UI/Contact/contact.html +++ b/UI/Contact/contact.html @@ -229,6 +229,7 @@ problems with multi-word single-quoted constructs in PI tags. -CT --> + @@ -242,6 +243,7 @@ problems with multi-word single-quoted constructs in PI tags. -CT --> + @@ -265,14 +267,24 @@ problems with multi-word single-quoted constructs in PI tags. -CT --> name = "account_class" value = account_class } ?> - + + +
- + } # " ?> + +