From: Philip Reetz Date: Tue, 5 May 2009 12:29:47 +0000 (+0000) Subject: Bug #780 behoben, generell eine Ueberpruefung eingefuehrt, ob bereits Zahlungen exist... X-Git-Tag: release-2.6.0beta2~42 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=acf18ea9c8a5f5f860250a8399135b5ba984af7c;p=kivitendo-erp.git Bug #780 behoben, generell eine Ueberpruefung eingefuehrt, ob bereits Zahlungen existieren. In dem Fall wird Storno grundsaetzlich unterbunden --- diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 342928a17..f44805e2b 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -800,10 +800,10 @@ $follow_ups_block |; } - + print(STDERR "TOTALPAID $total_paid\n"); # ToDO: - insert a global check for stornos, so that a storno is only possible a limited time after saving it print qq| | - if ($form->{id} && !IS->has_storno(\%myconfig, $form, 'ap') && !IS->is_storno(\%myconfig, $form, 'ap', $form->{id})); + if ($form->{id} && !IS->has_storno(\%myconfig, $form, 'ap') && !IS->is_storno(\%myconfig, $form, 'ap', $form->{id}) && (($total_paid == 0) || ($total_paid eq ""))); print qq| diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index 3e6e90698..c0052bd5e 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -843,7 +843,7 @@ $follow_ups_block # ToDO: - insert a global check for stornos, so that a storno is only possible a limited time after saving it print qq| | - if ($form->{id} && !IS->has_storno(\%myconfig, $form, 'ar') && !IS->is_storno(\%myconfig, $form, 'ar')); + if ($form->{id} && !IS->has_storno(\%myconfig, $form, 'ar') && !IS->is_storno(\%myconfig, $form, 'ar') && (($total_paid == 0) || ($total_paid eq ""))); if ($form->{id}) { if ($form->{radier}) { diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index 6c9c8a87e..61c87cffc 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -826,7 +826,7 @@ sub form_footer { |; if ($form->{id}) { - my $show_storno = !$form->{storno} && !IS->has_storno(\%myconfig, $form, "ap"); + my $show_storno = !$form->{storno} && !IS->has_storno(\%myconfig, $form, "ap") && (($totalpaid == 0) || ($totalpaid eq "")); print qq| diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 877b16683..f9fbca6a4 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -1113,7 +1113,7 @@ if ($form->{type} eq "credit_note") { $closedto = $form->datetonum($form->{closedto}, \%myconfig); if ($form->{id}) { - my $show_storno = !$form->{storno} && !IS->has_storno(\%myconfig, $form, "ar"); + my $show_storno = !$form->{storno} && !IS->has_storno(\%myconfig, $form, "ar") && (($totalpaid == 0) || ($totalpaid eq "")); print qq|