From: Moritz Bunkus Date: Thu, 12 May 2011 09:27:01 +0000 (+0200) Subject: Merge branch 'master' of lx-office.linet-services.de:lx-office-erp X-Git-Tag: release-2.6.3~25^2~47 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/5fd2cf413e611047a3b8d667378a258a7955941e?hp=dbbf892309056494e9243df8b7599096ef9e42c5 Merge branch 'master' of lx-office.linet-services.de:lx-office-erp --- diff --git a/SL/AM.pm b/SL/AM.pm index c80177293..4f5b9718f 100644 --- a/SL/AM.pm +++ b/SL/AM.pm @@ -199,6 +199,9 @@ sub get_account { sub save_account { $main::lxdebug->enter_sub(); + # TODO: it should be forbidden to change an account to a heading if there + # have been bookings to this account in the past + my ($self, $myconfig, $form) = @_; # connect to database, turn off AutoCommit @@ -242,7 +245,23 @@ sub save_account { my @values; + if ($form->{id}) { + + # if charttype is heading make sure certain values are empty + # specifically, if charttype is changed from an existing account, empty the + # fields unnecessary for headings, so that e.g. heading doesn't appear in + # drop-down menues due to still having a valid "link" entry + + if ( $form->{charttype} eq 'H' ) { + $form->{link} = ''; + $form->{pos_bwa} = ''; + $form->{pos_bilanz} = ''; + $form->{pos_eur} = ''; + $form->{new_chart_id} = ''; + $form->{valid_from} = ''; + }; + $query = qq|UPDATE chart SET accno = ?, description = ?, @@ -272,6 +291,7 @@ sub save_account { $form->{id}, ); + } do_query($form, $dbh, $query, @values); diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index 3217bf00b..1f18c1fc3 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -226,6 +226,12 @@ sub prepare_invoice { foreach my $ref (@{ $form->{invoice_details} }) { $i++; map { $form->{"${_}_$i"} = $ref->{$_} } keys %{$ref}; + # übernommen aus is.pl Fix für Bug 1642. Nebenwirkungen? jb 12.5.2011 + # getestet: Lieferantenauftrag -> Rechnung i.O. + # Lieferantenauftrag -> Lieferschein -> Rechnung i.O. + # Werte: 20% (Lieferantenrabatt), 12,4% individuell und 0,4 individuell s.a. + # Screenshot zu Bug 1642 + $form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{"discount_$i"} * 100); my ($dec) = ($form->{"sellprice_$i"} =~ /\.(\d+)/); $dec = length $dec; diff --git a/doc/changelog b/doc/changelog index 8c6257943..e60ffd164 100644 --- a/doc/changelog +++ b/doc/changelog @@ -22,6 +22,8 @@ Liste gefixter Bugs aus dem Bugtracker: - Bugfix 1613: Status teilweise + - Bugfix 1642: Lieferantenrabatt wird korrekt gespeichert, aber nicht mehr angezeigt + - Bugfix 1626: Beim Festlegen der Standardkonten kann beim Warenbestand eine Überschrift ausgewählt werden. 2011-02-02 - Release 2.6.2