From 2c447b2fb419b504c90322b8d714360a174f8fa7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Fri, 4 Mar 2011 10:51:57 +0100 Subject: [PATCH] =?utf8?q?Hinweis=20von=20Moritz=20bzgl.=20Rechnungsnummer?= =?utf8?q?=20f=C3=BCr=20Gutschrift:=20>=20so,=20wie=20du=20das=20Feature?= =?utf8?q?=20implementiert=20hast,=20funktioniert=20es=20aber=20nur=20>=20?= =?utf8?q?genau=20in=20dem=20Moment,=20in=20dem=20du=20die=20Gutschrift=20?= =?utf8?q?direkt=20nach=20der=20Umwandlung=20>=20aus=20der=20Rechnung=20he?= =?utf8?q?raus=20ausdruckst.=20Wenn=20du=20sie=20sp=C3=A4ter=20via=20Verka?= =?utf8?q?uf=20->=20>=20Berichte=20aufrufst,=20so=20wird=20das=20Feld=20in?= =?utf8?q?vnumber=5Ffor=5Fcredit=5Fnote=20leer=20>=20sein,=20weil=20du=20e?= =?utf8?q?s=20nicht=20in=20der=20Datenbank=20speicherst.=20Indeed.=20Das?= =?utf8?q?=20hatte=20ich=20in=20meinem=20ersten=20Enthusiasmus=20=C3=BCber?= =?utf8?q?sehen.=20Gleich=20mehr=20...?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/IS.pm | 8 ++++---- sql/Pg-upgrade2/ar_add_invnumber_for_credit_note.sql | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 sql/Pg-upgrade2/ar_add_invnumber_for_credit_note.sql diff --git a/SL/IS.pm b/SL/IS.pm index 3936e92e1..a94035598 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -1009,7 +1009,7 @@ sub post_invoice { cp_id = ?, marge_total = ?, marge_percent = ?, globalproject_id = ?, delivery_customer_id = ?, transaction_description = ?, delivery_vendor_id = ?, - donumber = ? + donumber = ?, invnumber_for_credit_note = ? WHERE id = ?|; @values = ( $form->{"invnumber"}, $form->{"ordnumber"}, $form->{"quonumber"}, $form->{"cusordnumber"}, conv_date($form->{"invdate"}), conv_date($form->{"orddate"}), conv_date($form->{"quodate"}), conv_i($form->{"customer_id"}), @@ -1022,7 +1022,7 @@ sub post_invoice { conv_i($form->{"cp_id"}), 1 * $form->{marge_total} , 1 * $form->{marge_percent}, conv_i($form->{"globalproject_id"}), conv_i($form->{"delivery_customer_id"}), $form->{transaction_description}, conv_i($form->{"delivery_vendor_id"}), - $form->{"donumber"}, #das entsprechende feld lieferscheinnummer aus der html-form 12.02.09 jb + $form->{"donumber"}, $form->{"invnumber_for_credit_note"}, conv_i($form->{"id"})); do_query($form, $dbh, $query, @values); @@ -1452,9 +1452,9 @@ sub retrieve_invoice { a.duedate, a.taxincluded, a.curr AS currency, a.shipto_id, a.cp_id, a.employee_id, a.salesman_id, a.payment_id, a.language_id, a.delivery_customer_id, a.delivery_vendor_id, a.type, - a.transaction_description, + a.transaction_description, a.donumber, a.invnumber_for_credit_note, a.marge_total, a.marge_percent, - e.name AS employee, a.donumber + e.name AS employee FROM ar a LEFT JOIN employee e ON (e.id = a.employee_id) WHERE a.id = ?|; diff --git a/sql/Pg-upgrade2/ar_add_invnumber_for_credit_note.sql b/sql/Pg-upgrade2/ar_add_invnumber_for_credit_note.sql new file mode 100644 index 000000000..0eaeade94 --- /dev/null +++ b/sql/Pg-upgrade2/ar_add_invnumber_for_credit_note.sql @@ -0,0 +1,5 @@ +-- @tag: ar_add_invnumber_for_credit_note +-- @description: Die Rechnungsnummer wird bei Gutschriften bisher nicht uebernommen. Das aendert sich mit diesem Update. Hierfuer muss allerdings die Rechnungstabelle ar um einen entsprechenden Eintrag erweitert werden. (invnumber_for_credit_note in ar) +-- @depends: delivery_orders +alter table ar add column invnumber_for_credit_note text; + -- 2.20.1