From: Sven Schöling Date: Fri, 25 May 2007 13:46:51 +0000 (+0000) Subject: storno_id spalte in ap, und die dazugehoerigen aenderungen in AP->post_transaction X-Git-Tag: release-2.4.3^2~252 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=6d706ec6d9f553a9940a3954ae20c302c28dceff;p=kivitendo-erp.git storno_id spalte in ap, und die dazugehoerigen aenderungen in AP->post_transaction --- diff --git a/SL/AP.pm b/SL/AP.pm index 3f1818bdc..a3b7d1e26 100644 --- a/SL/AP.pm +++ b/SL/AP.pm @@ -189,27 +189,18 @@ sub post_transaction { my $datepaid = ($form->{invpaid} != 0) ? $form->{datepaid} : undef; $query = qq|UPDATE ap SET - invnumber = ?, - transdate = ?, - ordnumber = ?, - vendor_id = ?, - taxincluded = ?, - amount = ?, - duedate = ?, - paid = ?, - datepaid = ?, - netamount = ?, - curr = ?, - notes = ?, - department_id = ? - WHERE id = ?|; + invnumber = ?, transdate = ?, ordnumber = ?, vendor_id = ?, taxincluded = ?, + amount = ?, duedate = ?, paid = ?, datepaid = ?, netamount = ?, + curr = ?, notes = ?, department_id = ?, storno = ?, storno_id = ? + WHERE id = ?|; my @values = ($form->{invnumber}, conv_date($form->{transdate}), $form->{ordnumber}, conv_i($form->{vendor_id}), $form->{taxincluded} ? 't' : 'f', $form->{invtotal}, conv_date($form->{duedate}), $form->{invpaid}, conv_date($datepaid), $form->{netamount}, $form->{currency}, $form->{notes}, - conv_i($form->{department_id}), $form->{id}); + conv_i($form->{department_id}), $form->{storno}, + $form->{storno_id}, $form->{id}); do_query($form, $dbh, $query, @values); # update exchangerate diff --git a/sql/Pg-upgrade2/ap_storno.sql b/sql/Pg-upgrade2/ap_storno.sql new file mode 100644 index 000000000..62edbd319 --- /dev/null +++ b/sql/Pg-upgrade2/ap_storno.sql @@ -0,0 +1,5 @@ +-- @tag: ap_storno +-- @description: Spalten für Kreditorenbuchen zum Speichern für welche andere Buchung diese eine Stornobuchung ist +-- @depends: release_2_4_2 +ALTER TABLE ap ADD COLUMN storno_id integer; +ALTER TABLE ap ADD FOREIGN KEY (storno_id) REFERENCES ap (id);