X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Foe.pl;h=1e105aac2e3274fed772e46e6dae5f28616afc27;hb=82ab26a0d201bf24aba85e058e1cb23928a4b44a;hp=0d6c3ce5863fcdc3b897ab33f50cef096f94e850;hpb=cfc6a60d53597f6a879b28af37f84b4b5fa4cc6b;p=kivitendo-erp.git diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 0d6c3ce58..1e105aac2 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -110,6 +110,9 @@ sub add { sub edit { $lxdebug->enter_sub(); + # show history button + $form->{javascript} = qq||; + #/show hhistory button $form->{simple_save} = 0; @@ -695,7 +698,9 @@ sub form_header { } $form->{"javascript"} .= qq||; - + # show history button js + $form->{javascript} .= qq||; + #/show history button js $form->header; print qq| @@ -888,7 +893,8 @@ sub form_footer { $tax .= qq| - $form->{"${item}_description"} + $form->{"${item}_description"} | + . $form->{"${item}_rate"} * 100 .qq|% $form->{"${item}_total"} |; @@ -927,7 +933,8 @@ sub form_footer { $tax .= qq| - Enthaltene $form->{"${item}_description"} + Enthaltene $form->{"${item}_description"} | + . $form->{"${item}_rate"} * 100 .qq|% $form->{"${item}_total"} @@ -1045,6 +1052,12 @@ sub form_footer { if (($form->{id})) { print qq| + +
| . $locale->text("Workflow $form->{type}") . qq|
@@ -1328,10 +1341,6 @@ sub search { | if $form->{selectdepartment}; - $openclosed = qq| - -|; - my $delivered; if (($form->{"type"} eq "sales_order") || ($form->{"type"} eq "purchase_order")) { @@ -1375,6 +1384,19 @@ sub search { |; } + $form->get_lists("projects" => { "key" => "ALL_PROJECTS", + "all" => 1 }); + + my %labels = (); + my @values = (""); + foreach my $item (@{ $form->{"ALL_PROJECTS"} }) { + push(@values, $item->{"id"}); + $labels{$item->{"id"}} = $item->{"projectnumber"}; + } + my $projectnumber = + NTI($cgi->popup_menu('-name' => 'project_id', '-values' => \@values, + '-labels' => \%labels)); + $form->header; print qq| @@ -1399,6 +1421,10 @@ sub search { $ordlabel + + | . $locale->text("Project Number") . qq| + $projectnumber + | . $locale->text('From') . qq| $button1 @@ -1410,7 +1436,12 @@ sub search { | . $locale->text('Include in Report') . qq| - $openclosed + + + + $delivered + + |; + $column_header{globalprojectnumber} = + qq||; $column_header{open} = qq||; $column_header{closed} = @@ -1700,6 +1736,7 @@ sub orders { $column_data{employee} = ""; $column_data{shipvia} = ""; + $column_data{globalprojectnumber} = ""; if ($oe->{closed}) { $column_data{closed} = ""; @@ -1899,10 +1936,17 @@ sub save_and_close { relink_accounts(); - $form->redirect( - $form->{label} . " $form->{$ordnumber} " . $locale->text('saved!')) - if (OE->save(\%myconfig, \%$form)); - $form->error($err); + $form->error($err) if (!OE->save(\%myconfig, \%$form)); + + # saving the history + if(!exists $form->{addition}) { + $form->{addition} = "SAVED"; + $form->save_history($form->dbconnect(\%myconfig)); + } + # /saving the history + + $form->redirect($form->{label} . " $form->{$ordnumber} " . + $locale->text('saved!')); $lxdebug->leave_sub(); } @@ -1974,6 +2018,14 @@ sub save { relink_accounts(); OE->save(\%myconfig, \%$form); + + # saving the history + if(!exists $form->{addition}) { + $form->{addition} = "SAVED"; + $form->save_history($form->dbconnect(\%myconfig)); + } + # /saving the history + $form->{simple_save} = 1; if(!$form->{print_and_save}) { set_headings("edit"); @@ -2036,8 +2088,15 @@ sub yes { $msg = $locale->text('Quotation deleted!'); $err = $locale->text('Cannot delete quotation!'); } - - $form->redirect($msg) if (OE->delete(\%myconfig, \%$form, $spool)); + if (OE->delete(\%myconfig, \%$form, $spool)){ + $form->redirect($msg); + # saving the history + if(!exists $form->{addition}) { + $form->{addition} = "DELETED"; + $form->save_history($form->dbconnect(\%myconfig)); + } + # /saving the history + } $form->error($err); $lxdebug->leave_sub();
+ +
@@ -1426,6 +1457,7 @@ sub search { $employee | . $locale->text('Ship via') . qq| $employee
| @@ -1434,6 +1466,8 @@ sub search { . $locale->text('Tax') . qq| | . $locale->text('Total') . qq| | + . $locale->text('Project Number') . qq|
| @@ -1499,8 +1533,8 @@ sub orders { @columns = $form->sort_columns("transdate", "reqdate", "id", "$ordnumber", "name", "netamount", "tax", "amount", - "curr", "employee", "shipvia", "open", - "closed", "delivered"); + "curr", "employee", "shipvia", "globalprojectnumber", + "open", "closed", "delivered"); $form->{l_open} = $form->{l_closed} = "Y" if ($form->{open} && $form->{closed}); @@ -1584,6 +1618,8 @@ sub orders { qq|| . $locale->text('Ship via') . qq|| . $locale->text('Project Number') . qq|| . $locale->text('O') . qq|$oe->{employee} $oe->{shipvia} " . H($oe->{globalprojectnumber}) . "X