summaryrefslogtreecommitdiff
path: root/LedgerSMB/DBObject
diff options
context:
space:
mode:
Diffstat (limited to 'LedgerSMB/DBObject')
-rw-r--r--LedgerSMB/DBObject/Company.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/LedgerSMB/DBObject/Company.pm b/LedgerSMB/DBObject/Company.pm
index c2676de2..1e4ca4d5 100644
--- a/LedgerSMB/DBObject/Company.pm
+++ b/LedgerSMB/DBObject/Company.pm
@@ -51,7 +51,9 @@ sub save {
my $self = shift @_;
$self->set_entity_class();
my ($ref) = $self->exec_method(funcname => 'company_save');
- $self->{id} = $ref->{company_save};
+ $self->{entity_id} = (values %$ref)[0];
+ $self->get;
+ $self->get_metadata;
$self->{dbh}->commit;
}