| $form->{title} |
-
+ | .
+
+ ($form->{saved_message} ? qq|
+
+ | $form->{saved_message}
+ |
| : '') .
+
+qq|
|
@@ -1161,71 +1174,71 @@ sub form_header {
. " $form->{previous_gldate}"
. qq| |
-
- | | . $locale->text('Reference') . qq| |
- |
-
-
+ |
+
|;
if ($form->{id}) {
print qq|
-
- | | . $locale->text('Belegnummer') . qq| |
- |
-
-
- |
-
|;
+
+ | | . $locale->text('Belegnummer') . qq| |
+ |
+
+
+ |
+
|;
}
print qq|
- $department|;
+ $department|;
if ($form->{id}) {
print qq|
-
- | | . $locale->text('Description') . qq| |
- $description |
+
+ | | . $locale->text('Description') . qq| |
+ $description |
-
- |
-
-
- |
-
|;
+
+
+
+
+ |
+ |;
} else {
print qq|
-
- | | . $locale->text('Description') . qq| |
- $description |
-
-
- |
-
|;
+
+ | | . $locale->text('Description') . qq| |
+ $description |
+
+
+ |
+
|;
}
print qq|
@@ -1247,13 +1260,13 @@ sub form_header {
-
- | |
+ |
+ | |
. $locale->text('Account') . qq| |
- | . $locale->text('Chart balance') . qq| |
- |
+ | | . $locale->text('Chart balance') . qq| |
+ |
. $locale->text('Debit') . qq| |
- |
+ | |
. $locale->text('Credit') . qq| |
|
. $locale->text('Tax') . qq| |
@@ -1262,14 +1275,14 @@ sub form_header {
if ($form->{show_details}) {
print qq|
- | . $locale->text('Source') . qq| |
- | . $locale->text('Memo') . qq| |
- | . $locale->text('Project Number') . qq| |
+ | . $locale->text('Source') . qq| |
+ | . $locale->text('Memo') . qq| |
+ | . $locale->text('Project Number') . qq| |
|;
}
print qq|
-
+
$jsscript
|;
@@ -1422,8 +1435,8 @@ sub yes {
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
$form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
- $form->{addition} = "DELETED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->{addition} = "DELETED";
+ $form->save_history($form->dbconnect(\%myconfig));
}
# /saving the history
$form->redirect($locale->text('Transaction deleted!'))
@@ -1596,6 +1609,12 @@ sub post {
my $form = $main::form;
my $locale = $main::locale;
+ if ($::myconfig{mandatory_departments} && !$form->{department}) {
+ $form->{saved_message} = $::locale->text('You have to specify a department.');
+ update();
+ exit;
+ }
+
$form->{title} = $locale->text("$form->{title} General Ledger Transaction");
$form->{storno} = 0;
|