X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fir.pl;h=6c9c8a87eb67e70ee1470326b3dc6fdbada67df1;hb=ea2e84cc75e2879141eea5e957439936280682bf;hp=022c858406cae22b08af05b92bf93ba459170975;hpb=08ca74a8fe8fc1f9e528b0cc1172062c80283a36;p=kivitendo-erp.git diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index 022c85840..6c9c8a87e 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -71,7 +71,7 @@ sub edit { # show history button $form->{javascript} = qq||; #/show hhistory button - + $form->{title} = $locale->text('Edit Vendor Invoice'); &invoice_links; @@ -116,7 +116,7 @@ sub invoice_links { IR->get_vendor(\%myconfig, \%$form); IR->retrieve_invoice(\%myconfig, \%$form); $form->{cp_id} = $cp_id; - + if ($payment_id) { $form->{payment_id} = $payment_id; } @@ -293,7 +293,7 @@ sub form_header { } my $globalprojectnumber = NTI($cgi->popup_menu('-name' => 'globalproject_id', '-values' => \@values, '-labels' => \%labels, '-default' => $form->{"globalproject_id"})); - + %labels = (); @values = (); my $i = 0; @@ -301,7 +301,7 @@ sub form_header { push(@values, $item); $labels{$item} = $item; } - + $form->{currency} = $form->{defaultcurrency} unless $form->{currency}; my $currencies; if (scalar @values) { @@ -347,7 +347,7 @@ sub form_header { : (NTI($cgi->popup_menu('-name' => 'vendor', '-default' => $form->{oldvendor}, '-onChange' => 'document.getElementById(\'update_button\').click();', '-values' => \@values, '-labels' => \%labels, '-style' => 'width: 250px')))) . qq| - + |; %labels = (); @@ -406,7 +406,7 @@ sub form_header { #write Trigger $jsscript = - Form->write_trigger(\%myconfig, "2", + Form->write_trigger(\%myconfig, "2", "invdate", "BL", "trigger1", "duedate", "BL", "trigger2"); @@ -469,7 +469,7 @@ sub form_header { $employees - + @@ -777,9 +777,9 @@ sub form_footer { qq||; $column_data{"source_$i"} = - qq||; + qq||; $column_data{"memo_$i"} = - qq||; + qq||; map { print qq|$column_data{"${_}_$i"}\n| } @column_index; @@ -869,9 +869,9 @@ sub form_footer { . qq|">|; } # /button for saving history - # mark_as_paid button - if($form->{id} ne "") { - print qq| |; } # /mark_as_paid button @@ -889,7 +889,7 @@ sub mark_as_paid { $auth->assert('vendor_invoice_edit'); - &mark_as_paid_common(\%myconfig,"ap"); + &mark_as_paid_common(\%myconfig,"ap"); $lxdebug->leave_sub(); } @@ -1006,15 +1006,15 @@ sub storno { # Payments must not be recorded for the new storno invoice. $form->{paidaccounts} = 0; map { my $key = $_; delete $form->{$key} if grep { $key =~ /^$_/ } qw(datepaid_ source_ memo_ paid_ exchangerate_ AR_paid_) } keys %{ $form }; - + # saving the history if(!exists $form->{addition} && $form->{id} ne "") { - $form->{snumbers} = qq|invnumber_| . $form->{invnumber}; + $form->{snumbers} = qq|invnumber_| . $form->{invnumber}; $form->{addition} = "CANCELED"; $form->save_history($form->dbconnect(\%myconfig)); } # /saving the history - + $form->{storno_id} = $form->{id}; $form->{storno} = 1; $form->{id} = ""; @@ -1135,7 +1135,7 @@ sub post { ($form->{AP}) = split /--/, $form->{AP}; ($form->{AP_paid}) = split /--/, $form->{AP_paid}; - $form->{storno} = 0; + $form->{storno} ||= 0; $form->{id} = 0 if $form->{postasnew}; @@ -1144,7 +1144,7 @@ sub post { if (IR->post_invoice(\%myconfig, \%$form)){ # saving the history if(!exists $form->{addition} && $form->{id} ne "") { - $form->{snumbers} = qq|invnumber_| . $form->{invnumber}; + $form->{snumbers} = qq|invnumber_| . $form->{invnumber}; $form->{addition} = "POSTED"; #$form->{what_done} = $locale->text("Rechnungsnummer") . qq| | . $form->{invnumber}; $form->save_history($form->dbconnect(\%myconfig)); @@ -1204,11 +1204,11 @@ sub yes { if (IR->delete_invoice(\%myconfig, \%$form)) { # saving the history if(!exists $form->{addition}) { - $form->{snumbers} = qq|invnumber_| . $form->{invnumber}; + $form->{snumbers} = qq|invnumber_| . $form->{invnumber}; $form->{addition} = "DELETED"; $form->save_history($form->dbconnect(\%myconfig)); } - # /saving the history + # /saving the history $form->redirect($locale->text('Invoice deleted!')); } $form->error($locale->text('Cannot delete invoice!'));
| . $locale->text('Invoice Number') . qq|
{"source_$i"}>{"memo_$i"}>