Leistungsdatum: Lieferscheine (nur als Hidden)
authorMoritz Bunkus <m.bunkus@linet.de>
Tue, 10 Nov 2020 11:29:59 +0000 (12:29 +0100)
committerMoritz Bunkus <m.bunkus@linet.de>
Tue, 10 Nov 2020 11:29:59 +0000 (12:29 +0100)
SL/DB/MetaSetup/DeliveryOrder.pm
SL/DO.pm
sql/Pg-upgrade2/tax_point2.sql [new file with mode: 0644]
templates/webpages/do/form_header.html

index d242fcd..780f431 100644 (file)
@@ -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' },
index 034189f..90599a7 100644 (file)
--- 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 (file)
index 0000000..6caf13d
--- /dev/null
@@ -0,0 +1,4 @@
+-- @tag: tax_point2
+-- @description: Feld Leistungsdatum in Lieferscheinen
+-- @depends: tax_point
+ALTER TABLE delivery_orders ADD COLUMN tax_point DATE;
index 1cac15b..9ff8e98 100644 (file)
   <input type="hidden" name="type" id="type" value="[% HTML.escape(type) %]">
   <input type="hidden" name="vc" id="vc" value="[% HTML.escape(vc) %]">
   <input type="hidden" name="lastmtime" id="lastmtime" value="[% HTML.escape(lastmtime) %]">
+  <input type="hidden" name="tax_point" id="tax_point" value="[% HTML.escape(tax_point) %]">
 
   <p>
    <table width="100%">