return { map { ( $_ => $self->controller->profile->get($_) ) } qw(apply_buchungsgruppe default_buchungsgruppe article_number_policy
sellprice_places sellprice_adjustment sellprice_adjustment_type
- shoparticle_if_missing parts_type) };
+ shoparticle_if_missing parts_type default_unit) };
}
sub init_all_cvar_configs {
my $object = $entry->{object};
+ $object->unit($self->settings->{default_unit}) unless $object->unit;
+
# Check whether or unit is valid.
if (!$self->units_by->{name}->{ $object->unit }) {
push @{ $entry->{errors} }, $::locale->text('Error: Unit missing or invalid');
{ name => 'sellprice', description => $::locale->text('Sellprice') },
{ name => 'shop', description => $::locale->text('Shopartikel') },
{ name => 'type', description => $::locale->text('Article type (see below)') },
- { name => 'unit', description => $::locale->text('Unit') },
+ { name => 'unit', description => $::locale->text('Unit (if missing or empty default unit will be used)') },
{ name => 've', description => $::locale->text('Verrechnungseinheit') },
{ name => 'weight', description => $::locale->text('Weight') },
);