fixt#165 shippingdates in inventory nachträglich setzen
authorJan Büren <jan@kivitendo-premium.de>
Wed, 18 May 2016 10:27:38 +0000 (12:27 +0200)
committerJan Büren <jan@kivitendo-premium.de>
Wed, 18 May 2016 10:27:38 +0000 (12:27 +0200)
sql/Pg-upgrade2/inventory_fix_shippingdate_assemblies.sql [new file with mode: 0644]

diff --git a/sql/Pg-upgrade2/inventory_fix_shippingdate_assemblies.sql b/sql/Pg-upgrade2/inventory_fix_shippingdate_assemblies.sql
new file mode 100644 (file)
index 0000000..64fbc75
--- /dev/null
@@ -0,0 +1,6 @@
+-- @tag: inventory_fix_shippingdate_assemblies
+-- @description: Shippingdate für assemblies und assembly_items nachträglich wie itime setzen.
+-- @depends: release_3_4_0 warehouse transfer_type_assembled
+-- @encoding: utf-8
+update inventory set shippingdate = itime where comment ilike 'Verbraucht %' and shippingdate is null;
+update inventory set shippingdate = itime where shippingdate is null and parts_id in (select id from parts where assembly);