X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=sql%2FPg-upgrade2%2Fumstellung_eur.pl;h=0b884007989c557988a9826b8ed92ec7ffee3109;hb=86e54d7f8ddabc1db7e944504b0c5d00e8a0712d;hp=0f7606065f5a7588e99eec783aa1c5fd02b35260;hpb=347f2cff58f8d798bb0fe52495fb09b4e08db036;p=kivitendo-erp.git diff --git a/sql/Pg-upgrade2/umstellung_eur.pl b/sql/Pg-upgrade2/umstellung_eur.pl index 0f7606065..0b8840079 100644 --- a/sql/Pg-upgrade2/umstellung_eur.pl +++ b/sql/Pg-upgrade2/umstellung_eur.pl @@ -20,7 +20,7 @@ sub run { foreach my $column (qw(accounting_method inventory_system profit_determination)) { # this query will fail if columns already exist (new database) - $self->db_query(qq|ALTER TABLE defaults ADD COLUMN ${column} TEXT|, 1); + $self->db_query(qq|ALTER TABLE defaults ADD COLUMN ${column} TEXT|, may_fail => 1); } my $accounting_method; @@ -30,7 +30,7 @@ sub run { # check current configuration and set default variables accordingly, so that # kivitendo behaviour isn't changed by this update - if ($::lx_office_conf{system}->{eur} == 0 ) { + if (!defined $::lx_office_conf{system}->{eur} || $::lx_office_conf{system}->{eur} == 0 ) { $accounting_method = 'accrual'; $inventory_system = 'perpetual'; $profit_determination = 'balance';