projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Testfall: Erzeugnis fertigen aufm Mond, aber Einzelteile im Lager Erde
[kivitendo-erp.git]
/
SL
/
DB
/
Buchungsgruppe.pm
diff --git
a/SL/DB/Buchungsgruppe.pm
b/SL/DB/Buchungsgruppe.pm
index
9074fb9
..
cad8bb6
100644
(file)
--- a/
SL/DB/Buchungsgruppe.pm
+++ b/
SL/DB/Buchungsgruppe.pm
@@
-6,16
+6,10
@@
use SL::DB::MetaSetup::Buchungsgruppe;
use SL::DB::Manager::Buchungsgruppe;
use SL::DB::Helper::ActsAsList;
use SL::DB::Manager::Buchungsgruppe;
use SL::DB::Helper::ActsAsList;
-__PACKAGE__->meta->add_relationship(
- inventory_account => {
- type => 'many to one',
- class => 'SL::DB::Chart',
- column_map => { inventory_accno_id => 'id' },
- },
-);
-
__PACKAGE__->meta->initialize;
__PACKAGE__->meta->initialize;
+sub inventory_account { goto &inventory_accno; }
+
sub validate {
my ($self) = @_;
sub validate {
my ($self) = @_;
@@
-24,9
+18,9
@@
sub validate {
if( $self->inventory_accno_id ) {
require SL::DB::Chart;
my $inventory_accno = SL::DB::Manager::Chart->find_by( id => $self->inventory_accno_id );
if( $self->inventory_accno_id ) {
require SL::DB::Chart;
my $inventory_accno = SL::DB::Manager::Chart->find_by( id => $self->inventory_accno_id );
- push(@errors, $::locale->text('B
uchungsgruppe
#1 needs a valid inventory account', $self->description)) unless $inventory_accno;
+ push(@errors, $::locale->text('B
ooking group
#1 needs a valid inventory account', $self->description)) unless $inventory_accno;
} else {
} else {
- push @errors, $::locale->text('The
Buchungsgruppe
needs an inventory account.');
+ push @errors, $::locale->text('The
booking group
needs an inventory account.');
};
return @errors;
};
return @errors;