From: Sven Schöling Date: Thu, 24 May 2007 15:45:58 +0000 (+0000) Subject: storno_id spalte in ar eingefuegt, und die post_transaction angepasst um diese auch... X-Git-Tag: release-2.4.3^2~260 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=0ecb31986f567eb0b1e9949978458baba04c0ef9;p=kivitendo-erp.git storno_id spalte in ar eingefuegt, und die post_transaction angepasst um diese auch zu nutzen --- diff --git a/SL/AR.pm b/SL/AR.pm index d837f8daa..be9a2c4e4 100644 --- a/SL/AR.pm +++ b/SL/AR.pm @@ -143,11 +143,11 @@ sub post_transaction { invnumber = ?, ordnumber = ?, transdate = ?, customer_id = ?, taxincluded = ?, amount = ?, duedate = ?, paid = ?, datepaid = ?, netamount = ?, curr = ?, notes = ?, department_id = ?, - employee_id = ? + employee_id = ?, storno = ?, storno_id = ? WHERE id = ?|; my @values = ($form->{invnumber}, $form->{ordnumber}, conv_date($form->{transdate}), conv_i($form->{customer_id}), $form->{taxincluded} ? 't' : 'f', $form->{amount}, conv_date($form->{duedate}), $form->{paid}, conv_date($datepaid), $form->{netamount}, $form->{currency}, $form->{notes}, conv_i($form->{department_id}), - conv_i($form->{employee_id}), conv_i($form->{id})); + conv_i($form->{employee_id}), $form->{storno} ? 't' : 'f', $form->{storno_id}, conv_i($form->{id})); do_query($form, $dbh, $query, @values); # amount for AR account diff --git a/sql/Pg-upgrade2/ar_storno.sql b/sql/Pg-upgrade2/ar_storno.sql new file mode 100644 index 000000000..90a020986 --- /dev/null +++ b/sql/Pg-upgrade2/ar_storno.sql @@ -0,0 +1,5 @@ +-- @tag: ar_storno +-- @description: Spalten für Debitorenbuchen zum Speichern für welche andere Buchung diese eine Stornobuchung ist +-- @depends: release_2_4_2 +ALTER TABLE ar ADD COLUMN storno_id integer; +ALTER TABLE ar ADD FOREIGN KEY (storno_id) REFERENCES ar (id);