X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fpe.pl;h=18c90c30afe3947f3fef4f03d7f91420283d9781;hb=036fe04d0f9d0ccfc7ef563530d3c118986ef0ca;hp=d95a7ee1dabb402a21252f4afa0211528eb13825;hpb=59f8f1fad78635c084328f8bf726f107cbb5bba2;p=kivitendo-erp.git
diff --git a/bin/mozilla/pe.pl b/bin/mozilla/pe.pl
index d95a7ee1d..18c90c30a 100644
--- a/bin/mozilla/pe.pl
+++ b/bin/mozilla/pe.pl
@@ -58,7 +58,9 @@ sub add {
sub edit {
$lxdebug->enter_sub();
-
+ # show history button
+ $form->{javascript} = qq||;
+ #/show hhistory button
$form->{title} = "Edit";
if ($form->{type} eq 'project') {
@@ -425,6 +427,14 @@ sub form_project_footer {
. $locale->text('Delete') . qq|">|;
}
+# button for saving history
+print qq|
+ {id}
+ . qq|); name=history id=history value=|
+ . $locale->text('history')
+ . qq|>|;
+# /button for saving history
print qq|
@@ -455,6 +465,12 @@ sub save {
PE->save_pricegroup(\%myconfig, \%$form);
$form->redirect($locale->text('Pricegroup saved!'));
}
+ # saving the history
+ if(!exists $form->{addition} && $form->{id} ne "") {
+ $form->{addition} = "SAVED";
+ $form->save_history($form->dbconnect(\%myconfig));
+ }
+ # /saving the history
$lxdebug->leave_sub();
}
@@ -473,7 +489,12 @@ sub delete {
if ($form->{type} eq 'pricegroup') {
$form->redirect($locale->text('Pricegroup deleted!'));
}
-
+ # saving the history
+ if(!exists $form->{addition}) {
+ $form->{addition} = "DELETED";
+ $form->save_history($form->dbconnect(\%myconfig));
+ }
+ # /saving the history
$lxdebug->leave_sub();
}
@@ -653,6 +674,14 @@ sub form_partsgroup_footer {
. $locale->text('Delete') . qq|">|;
}
+# button for saving history
+print qq|
+ {id}
+ . qq|); name=history id=history value=|
+ . $locale->text('history')
+ . qq|>|;
+# /button for saving history
print qq|
@@ -847,6 +876,14 @@ sub form_pricegroup_footer {
. $locale->text('Delete') . qq|">|;
}
+# button for saving history
+print qq|
+ {id}
+ . qq|); name=history id=history value=|
+ . $locale->text('history')
+ . qq|>|;
+# /button for saving history
print qq|