X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fis.pl;h=f44c5809cb008b3fea0c37b6275a18610e7bfce3;hb=26456e6e241a4487e5b52c70e36d275eb073db5b;hp=4a37b7ed9efa4135b502445b2b9cbc9bafd96416;hpb=4d09ad4b5544c933b35c4a58b97871efdceb601c;p=kivitendo-erp.git diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 4a37b7ed9..f44c5809c 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -293,7 +293,6 @@ sub form_header { $form->{salesman_id} = $form->{old_salesman_id} if $form->{old_salesman_id}; $form->{defaultcurrency} = $form->get_default_currency(\%myconfig); - $form->{radier} = ($form->current_date(\%myconfig) eq $form->{gldate}) ? 1 : 0; my $set_duedate_url = "$form->{script}?action=set_duedate"; @@ -312,6 +311,7 @@ sub form_header { "taxzones" => "ALL_TAXZONES", "currencies" => "ALL_CURRENCIES", "customers" => "ALL_CUSTOMERS", + "departments" => "all_departments", "price_factors" => "ALL_PRICE_FACTORS"); $TMPL_VAR{sales_employee_labels} = sub { $_[0]->{name} || $_[0]->{login} }; @@ -656,6 +656,7 @@ sub post { $form->{print_and_post} = 0; } + remove_emptied_rows(); &validate_items; my $closedto = $form->datetonum($form->{closedto}, \%myconfig); @@ -898,6 +899,16 @@ sub credit_note { $form->{creditremaining} -= ($form->{oldinvtotal} - $form->{ordtotal}); + # bei Gutschriften werden Zahlungseingänge aus Rechnung nicht übernommen + for my $i (1 .. $form->{paidaccounts}) { + delete $form->{"paid_$i"}; + delete $form->{"source_$i"}; + delete $form->{"memo_$i"}; + delete $form->{"datepaid_$i"}; + delete $form->{"AR_paid_$i"}; + }; + $form->{paidaccounts} = 1; + &prepare_invoice; @@ -917,10 +928,10 @@ sub yes { if (IS->delete_invoice(\%myconfig, \%$form, $main::spool)) { # saving the history - if(!exists $form->{addition}) { + if(!exists $form->{addition}) { $form->{snumbers} = qq|invnumber_| . $form->{invnumber}; - $form->{addition} = "DELETED"; - $form->save_history($form->dbconnect(\%myconfig)); + $form->{addition} = "DELETED"; + $form->save_history($form->dbconnect(\%myconfig)); } # /saving the history $form->redirect($locale->text('Invoice deleted!'));