X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Foe.pl;h=1e105aac2e3274fed772e46e6dae5f28616afc27;hb=82ab26a0d201bf24aba85e058e1cb23928a4b44a;hp=3baa8799f09f70fb1a73e4cde5bf0328ce6c168f;hpb=72eaa1a75c2b38a91ae8eeaf98319da9de3eac3a;p=kivitendo-erp.git diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 3baa8799f..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")) { @@ -1427,7 +1436,12 @@ sub search { | . $locale->text('Include in Report') . qq| - $openclosed + + + + $delivered
+ +
@@ -1922,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(); } @@ -1997,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"); @@ -2059,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();