X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fap.pl;h=f5ed94069fa891a6931de30add1e08ae56e2e6ac;hb=710ebb28d9a0f0125dd7e7d1f0662d3127ac1328;hp=f44805e2b95fa6f4d08aba1cbe732b9a8e0325c6;hpb=acf18ea9c8a5f5f860250a8399135b5ba984af7c;p=kivitendo-erp.git diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index f44805e2b..f5ed94069 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -427,7 +427,7 @@ selectvendor } | - + @@ -699,7 +699,7 @@ $jsscript $column_data{"exchangerate_$i"} = qq||; $column_data{"datepaid_$i"} = qq||; + |; $column_data{"source_$i"} = qq||; $column_data{"memo_$i"} = @@ -800,7 +800,6 @@ $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}) && (($total_paid == 0) || ($total_paid eq ""))); @@ -853,10 +852,12 @@ sub update { $form->{invtotal} = 0; + delete @{ $form }{ grep { m/^tax_\d+$/ } keys %{ $form } }; + map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } qw(exchangerate creditlimit creditremaining); - @flds = qw(amount AP_amount projectnumber oldprojectnumber project_id); + @flds = qw(amount AP_amount projectnumber oldprojectnumber project_id taxchart); $count = 0; for $i (1 .. $form->{rowcount}) { $form->{"amount_$i"} = @@ -890,9 +891,16 @@ sub update { $form->{exchangerate} = $form->{forex} if $form->{forex}; $form->{invdate} = $form->{transdate}; - $save_AP = $form->{AP}; + my %saved_variables = map +( $_ => $form->{$_} ), qw(AP AP_amount_1 taxchart_1); + &check_name("vendor"); - $form->{AP} = $save_AP; + + $form->{AP} = $saved_variables{AP}; + if ($saved_variables{AP_amount_1} =~ m/.--./) { + map { $form->{$_} = $saved_variables{$_} } qw(AP_amount_1 taxchart_1); + } else { + delete $form->{taxchart_1}; + } $form->{rowcount} = $count + 1;
| . $locale->text('Vendor') . qq|$vendor $vendor $exchangerate -