X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fio.pl;h=adb78ed49992699e6c68c2f871a13c43274898b7;hb=15f549fdb43fba2d99817c659533dfa02638bf27;hp=c0fdcdad0a03dd758fc92b05ab1bb011bb0e4b32;hpb=5b60c0df87a1150394dddfdf5c4b0c130a9e004a;p=kivitendo-erp.git diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index c0fdcdad0..adb78ed49 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -134,7 +134,7 @@ sub display_row { my $colspan = $#column_index + 1; $form->{invsubtotal} = 0; - map { $form->{"${_}_base"} = 0 } (split / /, $form->{taxaccounts}); + map { $form->{"${_}_base"} = 0 } (split(/ /, $form->{taxaccounts})); ######################################## # Eintrag fuer Version 2.2.0 geaendert # @@ -242,6 +242,13 @@ sub display_row { $delvar = 'reqdate'; } + my %projectnumber_labels = (); + my @projectnumber_values = (""); + foreach my $item (@{ $form->{"ALL_PROJECTS"} }) { + push(@projectnumber_values, $item->{"id"}); + $projectnumber_labels{$item->{"id"}} = $item->{"projectnumber"}; + } + for $i (1 .. $numrows) { # undo formatting @@ -486,11 +493,12 @@ sub display_row { $serialnumber |; } - print qq| - $projectnumber  - - -|; + print qq|$projectnumber | . + NTI($cgi->popup_menu('-name' => "project_id_$i", + '-values' => \@projectnumber_values, + '-labels' => \%projectnumber_labels, + '-default' => $form->{"project_id_$i"})); + if ($form->{type} eq 'invoice' or $form->{type} =~ /order/) { my $reqdate_term = ($form->{type} eq 'invoice') @@ -511,7 +519,7 @@ sub display_row { ############## ENDE Neueintrag ################## map { $form->{"${_}_base"} += $linetotal } - (split / /, $form->{"taxaccounts_$i"}); + (split(/ /, $form->{"taxaccounts_$i"})); $form->{invsubtotal} += $linetotal; } @@ -881,6 +889,9 @@ sub display_form { relink_accounts(); + my $new_rowcount = $form->{"rowcount"} * 1 + 1; + $form->{"project_id_${new_rowcount}"} = $form->{"globalproject_id"}; + $form->language_payment(\%myconfig); # if we have a display_form @@ -1117,12 +1128,12 @@ sub invoicetotal { $amount = $sellprice * (1 - $discount / 100) * $qty; map { $form->{"${_}_base"} += $amount } - (split / /, $form->{"taxaccounts_$i"}); + (split (/ /, $form->{"taxaccounts_$i"})); $form->{oldinvtotal} += $amount; } map { $form->{oldinvtotal} += ($form->{"${_}_base"} * $form->{"${_}_rate"}) } - split / /, $form->{taxaccounts} + split(/ /, $form->{taxaccounts}) if !$form->{taxincluded}; $form->{oldtotalpaid} = 0; @@ -1846,6 +1857,7 @@ sub print_form { # $locale->text('Quotation Date missing!') # assign number + $form->{what_done} = $form->{formname}; if (!$form->{"${inv}number"} && !$form->{preview}) { $form->{"${inv}number"} = $form->update_defaults(\%myconfig, $numberfld); if ($form->{media} ne 'email') { @@ -1859,6 +1871,12 @@ sub print_form { $form->{rowcount}--; &{"$display_form"}; + # saving the history + if(!exists $form->{addition}) { + $form->{addition} = "PRINTED"; + $form->save_history($form->dbconnect(\%myconfig)); + } + # /saving the history exit; } } @@ -1892,7 +1910,6 @@ sub print_form { } ($form->{employee}) = split /--/, $form->{employee}; - ($form->{warehouse}, $form->{warehouse_id}) = split /--/, $form->{warehouse}; # create the form variables if ($order) { @@ -2035,6 +2052,24 @@ sub print_form { } $queued = $form->{queued}; +# saving the history + if(!exists $form->{addition}) { + if($form->{media} =~ /printer/) { + $form->{addition} = "PRINTED"; + } + elsif($form->{media} =~ /email/) { + $form->{addition} = "MAILED"; + } + elsif($form->{media} =~ /queue/) { + $form->{addition} = "QUEUED"; + } + elsif($form->{media} =~ /screen/) { + $form->{addition} = "SCREENED"; + } + $form->save_history($form->dbconnect(\%myconfig)); + } + # /saving the history + $form->parse_template(\%myconfig, $userspath); $form->{callback} = ""; @@ -2322,7 +2357,6 @@ sub relink_accounts { $lxdebug->leave_sub(); } - sub set_duedate { $lxdebug->enter_sub();