From 4a89a4204d58f6c3f1f2e921b90f9c8927a26020 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 10 Nov 2020 12:29:59 +0100 Subject: [PATCH] Leistungsdatum: Lieferscheine (nur als Hidden) --- SL/DB/MetaSetup/DeliveryOrder.pm | 1 + SL/DO.pm | 6 +++--- sql/Pg-upgrade2/tax_point2.sql | 4 ++++ templates/webpages/do/form_header.html | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 sql/Pg-upgrade2/tax_point2.sql diff --git a/SL/DB/MetaSetup/DeliveryOrder.pm b/SL/DB/MetaSetup/DeliveryOrder.pm index d242fcd3c..780f4318c 100644 --- a/SL/DB/MetaSetup/DeliveryOrder.pm +++ b/SL/DB/MetaSetup/DeliveryOrder.pm @@ -35,6 +35,7 @@ __PACKAGE__->meta->columns( shippingpoint => { type => 'text' }, shipto_id => { type => 'integer' }, shipvia => { type => 'text' }, + tax_point => { type => 'date' }, taxincluded => { type => 'boolean' }, taxzone_id => { type => 'integer', not_null => 1 }, transaction_description => { type => 'text' }, diff --git a/SL/DO.pm b/SL/DO.pm index 034189fc3..90599a7de 100644 --- a/SL/DO.pm +++ b/SL/DO.pm @@ -511,7 +511,7 @@ SQL $query = qq|UPDATE delivery_orders SET donumber = ?, ordnumber = ?, cusordnumber = ?, transdate = ?, vendor_id = ?, - customer_id = ?, reqdate = ?, + customer_id = ?, reqdate = ?, tax_point = ?, shippingpoint = ?, shipvia = ?, notes = ?, intnotes = ?, closed = ?, delivered = ?, department_id = ?, language_id = ?, shipto_id = ?, globalproject_id = ?, employee_id = ?, salesman_id = ?, cp_id = ?, transaction_description = ?, @@ -522,7 +522,7 @@ SQL @values = ($form->{donumber}, $form->{ordnumber}, $form->{cusordnumber}, conv_date($form->{transdate}), conv_i($form->{vendor_id}), conv_i($form->{customer_id}), - conv_date($form->{reqdate}), $form->{shippingpoint}, $form->{shipvia}, + conv_date($form->{reqdate}), conv_date($form->{tax_point}), $form->{shippingpoint}, $form->{shipvia}, $restricter->process($form->{notes}), $form->{intnotes}, $form->{closed} ? 't' : 'f', $form->{delivered} ? "t" : "f", conv_i($form->{department_id}), conv_i($form->{language_id}), conv_i($form->{shipto_id}), @@ -693,7 +693,7 @@ sub retrieve { # so if any of these infos is important (or even different) for any item, # it will be killed out and then has to be fetched from the item scope query further down $query = - qq|SELECT dord.cp_id, dord.donumber, dord.ordnumber, dord.transdate, dord.reqdate, + qq|SELECT dord.cp_id, dord.donumber, dord.ordnumber, dord.transdate, dord.reqdate, dord.tax_point, dord.shippingpoint, dord.shipvia, dord.notes, dord.intnotes, e.name AS employee, dord.employee_id, dord.salesman_id, dord.${vc}_id, cv.name AS ${vc}, diff --git a/sql/Pg-upgrade2/tax_point2.sql b/sql/Pg-upgrade2/tax_point2.sql new file mode 100644 index 000000000..6caf13dff --- /dev/null +++ b/sql/Pg-upgrade2/tax_point2.sql @@ -0,0 +1,4 @@ +-- @tag: tax_point2 +-- @description: Feld Leistungsdatum in Lieferscheinen +-- @depends: tax_point +ALTER TABLE delivery_orders ADD COLUMN tax_point DATE; diff --git a/templates/webpages/do/form_header.html b/templates/webpages/do/form_header.html index 1cac15be3..9ff8e98a1 100644 --- a/templates/webpages/do/form_header.html +++ b/templates/webpages/do/form_header.html @@ -120,6 +120,7 @@ +

-- 2.20.1