Inventur: Voreinstellungen für Lager, Lagerplatz und Stichtag (DB und Rose)
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Wed, 29 Nov 2017 12:15:50 +0000 (13:15 +0100)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Fri, 5 Jan 2018 12:00:53 +0000 (13:00 +0100)
SL/DB/MetaSetup/Default.pm
sql/Pg-upgrade2/add_stocktaking_preselects_client_config_default.sql [new file with mode: 0644]

index ea81e35..b6a3af5 100644 (file)
@@ -136,6 +136,9 @@ __PACKAGE__->meta->columns(
   signature                                 => { type => 'text' },
   sonumber                                  => { type => 'text' },
   sqnumber                                  => { type => 'text' },
+  stocktaking_bin_id                        => { type => 'integer' },
+  stocktaking_cutoff_date                   => { type => 'date' },
+  stocktaking_warehouse_id                  => { type => 'integer' },
   taxnumber                                 => { type => 'text' },
   templates                                 => { type => 'text' },
   transfer_default                          => { type => 'boolean', default => 'true' },
@@ -199,6 +202,16 @@ __PACKAGE__->meta->foreign_keys(
     key_columns => { requirement_spec_section_order_part_id => 'id' },
   },
 
+  stocktaking_bin => {
+    class       => 'SL::DB::Bin',
+    key_columns => { stocktaking_bin_id => 'id' },
+  },
+
+  stocktaking_warehouse => {
+    class       => 'SL::DB::Warehouse',
+    key_columns => { stocktaking_warehouse_id => 'id' },
+  },
+
   warehouse => {
     class       => 'SL::DB::Warehouse',
     key_columns => { warehouse_id => 'id' },
diff --git a/sql/Pg-upgrade2/add_stocktaking_preselects_client_config_default.sql b/sql/Pg-upgrade2/add_stocktaking_preselects_client_config_default.sql
new file mode 100644 (file)
index 0000000..1ec1e56
--- /dev/null
@@ -0,0 +1,6 @@
+-- @tag: add_stocktaking_preselects_client_config_default
+-- @description: Konfigurations-Optionen für Vorbelegungen zur Inventur
+-- @depends: warehouse
+ALTER TABLE defaults ADD COLUMN stocktaking_warehouse_id INTEGER REFERENCES warehouse(id);
+ALTER TABLE defaults ADD COLUMN stocktaking_bin_id       INTEGER REFERENCES bin(id);
+ALTER TABLE defaults ADD COLUMN stocktaking_cutoff_date  DATE;