From: Philip Reetz Date: Wed, 19 Mar 2008 19:01:50 +0000 (+0000) Subject: Markieren von Dialogbuchungen als Eroeffnungs- oder Schlussbilanzbuchungen X-Git-Tag: release-2.6.0beta1~181 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=e2305bab05a1affd9b2ca7ca93d0194da68e796d;p=kivitendo-erp.git Markieren von Dialogbuchungen als Eroeffnungs- oder Schlussbilanzbuchungen --- diff --git a/SL/GL.pm b/SL/GL.pm index 8d6862422..28c503043 100644 --- a/SL/GL.pm +++ b/SL/GL.pm @@ -109,16 +109,19 @@ sub post_transaction { my ($null, $department_id) = split(/--/, $form->{department}); $department_id *= 1; + $form->{ob_transaction} *= 1; + $form->{cb_transaction} *= 1; + $query = qq|UPDATE gl SET reference = ?, description = ?, notes = ?, transdate = ?, department_id = ?, taxincluded = ?, - storno = ?, storno_id = ? + storno = ?, storno_id = ?, ob_transaction = ?, cb_transaction = ? WHERE id = ?|; @values = ($form->{reference}, $form->{description}, $form->{notes}, conv_date($form->{transdate}), $department_id, $form->{taxincluded}, - $form->{storno} ? 't' : 'f', conv_i($form->{storno_id}), + $form->{storno} ? 't' : 'f', conv_i($form->{storno_id}), $form->{ob_transaction} ? 't' : 'f', $form->{cb_transaction} ? 't' : 'f', conv_i($form->{id})); do_query($form, $dbh, $query, @values); @@ -153,11 +156,11 @@ sub post_transaction { if ($amount != 0) { $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, - source, memo, project_id, taxkey) + source, memo, project_id, taxkey, ob_transaction, cb_transaction) VALUES (?, (SELECT id FROM chart WHERE accno = ?), - ?, ?, ?, ?, ?, ?)|; + ?, ?, ?, ?, ?, ?, ?, ?)|; @values = (conv_i($form->{id}), $accno, $amount, conv_date($form->{transdate}), - $form->{"source_$i"}, $form->{"memo_$i"}, $project_id, $taxkey); + $form->{"source_$i"}, $form->{"memo_$i"}, $project_id, $taxkey, $form->{ob_transaction} ? 't' : 'f', $form->{cb_transaction} ? 't' : 'f'); do_query($form, $dbh, $query, @values); } @@ -563,7 +566,8 @@ sub transaction { if ($form->{id}) { $query = qq|SELECT g.reference, g.description, g.notes, g.transdate, g.storno, g.storno_id, - d.description AS department, e.name AS employee, g.taxincluded, g.gldate + d.description AS department, e.name AS employee, g.taxincluded, g.gldate, + g.ob_transaction, g.cb_transaction FROM gl g LEFT JOIN department d ON (d.id = g.department_id) LEFT JOIN employee e ON (e.id = g.employee_id) diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index f7dba9518..c386de58f 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -962,6 +962,9 @@ sub form_header { $show_details_checked = "checked" if $form->{show_details}; + $ob_transaction_checked = "checked" if $form->{ob_transaction}; + $cb_transaction_checked = "checked" if $form->{cb_transaction}; + # $locale->text('Add General Ledger Transaction') # $locale->text('Edit General Ledger Transaction') @@ -1155,7 +1158,17 @@ sub form_header { |; } - print qq| + print qq| + + + + +
+ | . $locale->text('OB Transaction') . qq| + + | . $locale->text('CB Transaction') . qq| +
+ | . $locale->text('Show details') . qq| |; @@ -1260,11 +1273,9 @@ $follow_ups_block . qq|"> |; } else { - if ($transdate > $closedto) { print qq| |; - } } print " diff --git a/locale/de/all b/locale/de/all index 4889ad4c6..584a85dab 100644 --- a/locale/de/all +++ b/locale/de/all @@ -250,6 +250,7 @@ aktualisieren wollen?', 'Business deleted!' => 'Firma gelöscht.', 'Business saved!' => 'Firma gespeichert.', 'CANCELED' => 'Storniert', + 'CB Transaction' => 'SB-Buchung', 'CSV export -- options' => 'CSV-Export -- Optionen', 'Calculate' => 'Berechnen', 'Cancel' => 'Abbrechen', @@ -951,6 +952,7 @@ aktualisieren wollen?', 'Number of new bins' => 'Anzahl neuer Lagerplätze', 'Number pages' => 'Seiten nummerieren', 'Number variables: \'PRECISION=n\' forces numbers to be shown with exactly n decimal places.' => 'Zahlenvariablen: Mit \'PRECISION=n\' erzwingt man, dass Zahlen mit n Nachkommastellen formatiert werden.', + 'OB Transaction' => 'EB-Buchung', 'OBE-Export erfolgreich!' => 'OBE-Export erfolgreich!', 'Obsolete' => 'Ungültig', 'Oct' => 'Okt', diff --git a/locale/de/gl b/locale/de/gl index 89005077b..3245ba01f 100644 --- a/locale/de/gl +++ b/locale/de/gl @@ -28,6 +28,7 @@ $self->{texts} = { 'Buchungsdatum' => 'Buchungsdatum', 'Buchungsnummer' => 'Buchungsnummer', 'CANCELED' => 'Storniert', + 'CB Transaction' => 'SB-Buchung', 'CSV export -- options' => 'CSV-Export -- Optionen', 'Cancel Accounts Receivables Transaction' => 'Debitorenbuchung stornieren', 'Cannot delete transaction!' => 'Buchung kann nicht gelöscht werden!', @@ -144,6 +145,7 @@ $self->{texts} = { 'Notes' => 'Bemerkungen', 'Nov' => 'Nov', 'November' => 'November', + 'OB Transaction' => 'EB-Buchung', 'Oct' => 'Okt', 'October' => 'Oktober', 'Others' => 'Andere', diff --git a/sql/Pg-upgrade2/cb_ob_transaction.sql b/sql/Pg-upgrade2/cb_ob_transaction.sql new file mode 100644 index 000000000..d1f474749 --- /dev/null +++ b/sql/Pg-upgrade2/cb_ob_transaction.sql @@ -0,0 +1,7 @@ +-- @tag: cb_ob_transaction +-- @description: Spalten für Eröffnungs- und Schlussbilanzbuchungen +-- @depends: release_2_4_2 +ALTER TABLE gl ADD COLUMN ob_transaction boolean; +ALTER TABLE gl ADD COLUMN cb_transaction boolean; +ALTER TABLE acc_trans ADD COLUMN ob_transaction boolean; +ALTER TABLE acc_trans ADD COLUMN cb_transaction boolean; \ No newline at end of file