From: Thomas Kasulke
Date: Tue, 20 Feb 2007 10:47:47 +0000 (+0000)
Subject: Historie eingefügt
X-Git-Tag: release-2.4.2~63
X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2b89ec9756dc1d3525b6163fe4cf4f38af83f9d8;p=kivitendo-erp.git
Historie eingefügt
---
diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl
index a04cf5e5b..767d0e87d 100644
--- a/bin/mozilla/ct.pl
+++ b/bin/mozilla/ct.pl
@@ -557,6 +557,10 @@ sub list_names {
sub edit {
$lxdebug->enter_sub();
+ # show history button
+ $form->{javascript} = qq||;
+ #/show hhistory button
+
# $locale->text('Edit Customer')
# $locale->text('Edit Vendor')
@@ -1243,6 +1247,17 @@ $update_button
. qq|">\n|;
}
+ # button for saving history
+ if($form->{id} ne "") {
+ print qq|
+ {id}
+ . qq|); name=history id=history value=|
+ . $locale->text('history')
+ . qq|>|;
+ }
+ # /button for saving history
+
print qq|
@@ -1260,6 +1275,13 @@ initializetabcontent("maintab")
sub add_transaction {
$lxdebug->enter_sub();
+# # saving the history
+# if(!exists $form->{addition}) {
+# $form->{addition} = "ADD TRANSACTION";
+# $form->save_history($form->dbconnect(\%myconfig));
+# }
+# # /saving the history
+
$form->isblank("name", $locale->text("Name missing!"));
if ($vertreter && $form->{db} eq "customer") {
$form->isblank("salesman_id", $locale->text("Salesman missing!"));
@@ -1271,7 +1293,6 @@ sub add_transaction {
$form->{callback} =
"$form->{script}?login=$form->{login}&path=$form->{path}&password=$form->{password}&action=add&vc=$form->{db}&$form->{db}_id=$form->{id}&$form->{db}=$name&type=$form->{type}&callback=$form->{callback}";
-
$form->redirect;
$lxdebug->leave_sub();
@@ -1281,8 +1302,13 @@ sub save_and_ap_transaction {
$lxdebug->enter_sub();
$form->{script} = "ap.pl";
+ # saving the history
+ if(!exists $form->{addition}) {
+ $form->{addition} = "SAVED";
+ $form->save_history($form->dbconnect(\%myconfig));
+ }
+ # /saving the history
&add_transaction;
-
$lxdebug->leave_sub();
}
@@ -1290,8 +1316,13 @@ sub save_and_ar_transaction {
$lxdebug->enter_sub();
$form->{script} = "ar.pl";
+ # saving the history
+ if(!exists $form->{addition}) {
+ $form->{addition} = "SAVED";
+ $form->save_history($form->dbconnect(\%myconfig));
+ }
+ # /saving the history
&add_transaction;
-
$lxdebug->leave_sub();
}
@@ -1300,8 +1331,13 @@ sub save_and_invoice {
$form->{script} = ($form->{db} eq 'customer') ? "is.pl" : "ir.pl";
$form->{type} = "invoice";
+ # saving the history
+ if(!exists $form->{addition}) {
+ $form->{addition} = "SAVED";
+ $form->save_history($form->dbconnect(\%myconfig));
+ }
+ # /saving the history
&add_transaction;
-
$lxdebug->leave_sub();
}
@@ -1310,8 +1346,13 @@ sub save_and_rfq {
$form->{script} = "oe.pl";
$form->{type} = "request_quotation";
+ # saving the history
+ if(!exists $form->{addition}) {
+ $form->{addition} = "SAVED";
+ $form->save_history($form->dbconnect(\%myconfig));
+ }
+ # /saving the history
&add_transaction;
-
$lxdebug->leave_sub();
}
@@ -1320,8 +1361,13 @@ sub save_and_quotation {
$form->{script} = "oe.pl";
$form->{type} = "sales_quotation";
+ # saving the history
+ if(!exists $form->{addition}) {
+ $form->{addition} = "SAVED";
+ $form->save_history($form->dbconnect(\%myconfig));
+ }
+ # /saving the history
&add_transaction;
-
$lxdebug->leave_sub();
}
@@ -1331,8 +1377,13 @@ sub save_and_order {
$form->{script} = "oe.pl";
$form->{type} =
($form->{db} eq 'customer') ? "sales_order" : "purchase_order";
+ # saving the history
+ if(!exists $form->{addition}) {
+ $form->{addition} = "SAVED";
+ $form->save_history($form->dbconnect(\%myconfig));
+ }
+ # /saving the history
&add_transaction;
-
$lxdebug->leave_sub();
}
@@ -1353,6 +1404,12 @@ sub save_and_close {
if ($rc == 3) {
$form->error($locale->text('customernumber not unique!'));
}
+ # saving the history
+ if(!exists $form->{addition}) {
+ $form->{addition} = "SAVED";
+ $form->save_history($form->dbconnect(\%myconfig));
+ }
+ # /saving the history
$form->redirect($locale->text($msg));
$lxdebug->leave_sub();
@@ -1381,7 +1438,12 @@ sub save {
$form->error($locale->text('This vendor number is already in use.'));
}
}
-
+ # saving the history
+ if(!exists $form->{addition}) {
+ $form->{addition} = "SAVED";
+ $form->save_history($form->dbconnect(\%myconfig));
+ }
+ # /saving the history
&edit;
exit;
$lxdebug->leave_sub();
@@ -1399,6 +1461,12 @@ sub delete {
$msg = ucfirst $form->{db};
$msg .= " deleted!";
+ # saving the history
+ if(!exists $form->{addition}) {
+ $form->{addition} = "DELETED";
+ $form->save_history($form->dbconnect(\%myconfig));
+ }
+ # /saving the history
$form->redirect($locale->text($msg));
$msg = "Cannot delete $form->{db}";
@@ -1606,7 +1674,6 @@ sub get_contact {
}
-
sub get_shipto {
$lxdebug->enter_sub();
diff --git a/bin/mozilla/dn.pl b/bin/mozilla/dn.pl
index 11e75322d..d81e9b16e 100644
--- a/bin/mozilla/dn.pl
+++ b/bin/mozilla/dn.pl
@@ -552,6 +552,12 @@ sub save {
}
DN->save_config(\%myconfig, \%$form);
+ # saving the history
+ if(!exists $form->{addition} && $form->{id} ne "") {
+ $form->{addition} = "SAVED FOR DUNNING";
+ $form->save_history($form->dbconnect(\%myconfig));
+ }
+ # /saving the history
$form->redirect($locale->text('Dunning Process Config saved!'));
$lxdebug->leave_sub();
@@ -605,7 +611,12 @@ sub save_dunning {
if($form->{DUNNING_PDFS}) {
DN->melt_pdfs(\%myconfig, \%$form,$spool);
}
-
+ # saving the history
+ if(!exists $form->{addition} && $form->{id} ne "") {
+ $form->{addition} = "DUNNING STARTED";
+ $form->save_history($form->dbconnect(\%myconfig));
+ }
+ # /saving the history
$form->redirect($locale->text('Dunning Process started for selected invoices!'));
$lxdebug->leave_sub();
diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl
index f17680865..449120611 100644
--- a/bin/mozilla/gl.pl
+++ b/bin/mozilla/gl.pl
@@ -1457,7 +1457,7 @@ sub form_footer {
print qq||;
- # Löschen und ändern von Buchungen nicht mehr möglich (GoB) nur am selben Tag möglich
+ # Löschen und Ändern von Buchungen nicht mehr möglich (GoB) nur am selben Tag möglich
if (!$form->{locked} && $radieren) {
print qq|
@@ -1526,9 +1526,15 @@ sub delete {
sub yes {
$lxdebug->enter_sub();
-
- $form->redirect($locale->text('Transaction deleted!'))
- if (GL->delete_transaction(\%myconfig, \%$form));
+ if (GL->delete_transaction(\%myconfig, \%$form)){
+ # saving the history
+ if(!exists $form->{addition} && $form->{id} ne "") {
+ $form->{addition} = "DELETED";
+ $form->save_history($form->dbconnect(\%myconfig));
+ }
+ # /saving the history
+ $form->redirect($locale->text('Transaction deleted!'))
+ }
$form->error($locale->text('Cannot delete transaction!'));
$lxdebug->leave_sub();
@@ -1714,6 +1720,13 @@ sub post {
$form->error($err[$errno]);
}
undef($form->{callback});
+ # saving the history
+ if(!exists $form->{addition} && $form->{id} ne "") {
+ $form->{addition} = "SAVED";
+ $form->{what_done} = $locale->text("Buchungsnummer") . " = " . $form->{id};
+ $form->save_history($form->dbconnect(\%myconfig));
+ }
+ # /saving the history
$form->redirect("Buchung gespeichert. Buchungsnummer = " . $form->{id});
$lxdebug->leave_sub();
@@ -1733,6 +1746,12 @@ sub storno {
$form->{id} = 0;
$form->{storno} = 1;
+ # saving the history
+ if(!exists $form->{addition} && $form->{id} ne "") {
+ $form->{addition} = "STORNO";
+ $form->save_history($form->dbconnect(\%myconfig));
+ }
+ # /saving the history
&post;
$lxdebug->leave_sub();
diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl
index 16205a7b1..0a2178533 100644
--- a/bin/mozilla/ic.pl
+++ b/bin/mozilla/ic.pl
@@ -397,7 +397,6 @@ $jsscript
$lxdebug->leave_sub();
} #end search()
-
sub search_update_prices {
$lxdebug->enter_sub();
@@ -2056,7 +2055,9 @@ sub parts_subtotal {
sub edit {
$lxdebug->enter_sub();
-
+ # show history button
+ $form->{javascript} = qq||;
+ #/show hhistory button
IC->get_part(\%myconfig, \%$form);
$form->{"original_partnumber"} = $form->{"partnumber"};
@@ -2408,7 +2409,7 @@ sub form_header {
|
- . $locale->text('Geschäftsvolumen') . qq| |
+ . $locale->text('Geschäftsvolumen') . qq|
{gv}> |
|;
@@ -2714,9 +2715,26 @@ sub form_footer {
}
}
+ if (!$form->{previousform}) {
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+ }
+# button for saving history
+ if($form->{id} ne "") {
+ print qq|
+ {id}
+ . qq|); name=history id=history value=|
+ . $locale->text('history')
+ . qq|>|;
+ }
+# /button for saving history
print qq|
+
-
-
-
-