From: Niclas Zimmermann Date: Fri, 19 Apr 2013 09:21:07 +0000 (+0200) Subject: Nummernkreis Erzeugnis X-Git-Tag: release-3.1.0beta1~487 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=693e58208df2667024aaf4ac92cb8f8e8d820b38;p=kivitendo-erp.git Nummernkreis Erzeugnis Der TransNumberGenerator musste noch für den neuen Nummernkreis Erzeugnisse angepasst werden. --- diff --git a/SL/DB/Helper/TransNumberGenerator.pm b/SL/DB/Helper/TransNumberGenerator.pm index 41dba2cd7..d790b3484 100644 --- a/SL/DB/Helper/TransNumberGenerator.pm +++ b/SL/DB/Helper/TransNumberGenerator.pm @@ -34,7 +34,7 @@ my %specs = ( ar => { number_column => 'invnumber', vendor => { number_column => 'vendornumber', number_range_column => 'vendornumber', }, part => { number_column => 'partnumber', number_range_column => 'articlenumber', scoping => \&parts_scoping }, service => { number_column => 'partnumber', number_range_column => 'servicenumber', scoping => \&parts_scoping }, - assembly => { number_column => 'partnumber', number_range_column => 'articlenumber', scoping => \&parts_scoping }, + assembly => { number_column => 'partnumber', number_range_column => 'assemblynumber', scoping => \&parts_scoping }, ); sub get_next_trans_number { @@ -56,6 +56,7 @@ sub get_next_trans_number { my %numbers_in_use = map { ( $_ => 1 ) } @numbers; my $defaults = SL::DB::Default->get; + $number_range_column = 'articlenumber' if $number_range_column eq 'assemblynumber' and length($defaults->$number_range_column) < 1; my $sequence = SL::PrefixedNumber->new(number => $defaults->$number_range_column); $sequence->set_to_max(@numbers) if !$fill_holes_in_range; diff --git a/SL/DB/MetaSetup/Default.pm b/SL/DB/MetaSetup/Default.pm index 9365eac9d..55d1e5ee5 100644 --- a/SL/DB/MetaSetup/Default.pm +++ b/SL/DB/MetaSetup/Default.pm @@ -36,9 +36,6 @@ __PACKAGE__->meta->setup( mtime => { type => 'timestamp' }, rmanumber => { type => 'text' }, cnnumber => { type => 'text' }, - accounting_method => { type => 'text' }, - inventory_system => { type => 'text' }, - profit_determination => { type => 'text' }, dunning_ar_amount_fee => { type => 'integer' }, dunning_ar_amount_interest => { type => 'integer' }, dunning_ar => { type => 'integer' }, @@ -47,31 +44,34 @@ __PACKAGE__->meta->setup( ar_paid_accno_id => { type => 'integer' }, id => { type => 'serial', not_null => 1 }, language_id => { type => 'integer' }, - payments_changeable => { type => 'integer', default => '0', not_null => 1 }, - show_bestbefore => { type => 'boolean', default => 'false' }, + accounting_method => { type => 'text' }, + inventory_system => { type => 'text' }, + profit_determination => { type => 'text' }, datev_check_on_sales_invoice => { type => 'boolean', default => 'true' }, datev_check_on_purchase_invoice => { type => 'boolean', default => 'true' }, datev_check_on_ar_transaction => { type => 'boolean', default => 'true' }, datev_check_on_ap_transaction => { type => 'boolean', default => 'true' }, datev_check_on_gl_transaction => { type => 'boolean', default => 'true' }, + payments_changeable => { type => 'integer', default => '0', not_null => 1 }, is_changeable => { type => 'integer', default => 2, not_null => 1 }, ir_changeable => { type => 'integer', default => 2, not_null => 1 }, ar_changeable => { type => 'integer', default => 2, not_null => 1 }, ap_changeable => { type => 'integer', default => 2, not_null => 1 }, gl_changeable => { type => 'integer', default => 2, not_null => 1 }, - is_show_mark_as_paid => { type => 'boolean', default => 'true' }, - ir_show_mark_as_paid => { type => 'boolean', default => 'true' }, - ar_show_mark_as_paid => { type => 'boolean', default => 'true' }, - ap_show_mark_as_paid => { type => 'boolean', default => 'true' }, + show_bestbefore => { type => 'boolean', default => 'false' }, sales_order_show_delete => { type => 'boolean', default => 'true' }, purchase_order_show_delete => { type => 'boolean', default => 'true' }, sales_delivery_order_show_delete => { type => 'boolean', default => 'true' }, purchase_delivery_order_show_delete => { type => 'boolean', default => 'true' }, + is_show_mark_as_paid => { type => 'boolean', default => 'true' }, + ir_show_mark_as_paid => { type => 'boolean', default => 'true' }, + ar_show_mark_as_paid => { type => 'boolean', default => 'true' }, + ap_show_mark_as_paid => { type => 'boolean', default => 'true' }, + deviating_fiscal_year => { type => 'boolean' }, + assemblynumber => { type => 'text' }, ], primary_key_columns => [ 'id' ], - - allow_inline_column_values => 1, ); 1;