diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2008-09-12 22:57:58 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2008-09-12 22:57:58 +0000 |
commit | e6b2f50939b78d5f181070b3aedcd528f5393833 (patch) | |
tree | 6a5095dd448bad8d2ab1ee5969ac17443bb91f96 /LedgerSMB/DBObject | |
parent | aeb8fa97fcadab8e48b014f66650dac8ac4d32c4 (diff) |
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
Diffstat (limited to 'LedgerSMB/DBObject')
-rw-r--r-- | LedgerSMB/DBObject/Company.pm | 6 |
1 files changed, 4 insertions, 2 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; } |