From 531e1a51239bbdb5e6234f1dcc443f3218f4afd3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Mon, 23 Feb 2015 17:09:07 +0100 Subject: [PATCH] Auslagern in VK-Rechnung: Neue Datenbank-Felder, Rose u. Mandantenkonfiguration --- SL/DB/MetaSetup/Default.pm | 1 + SL/DB/MetaSetup/Inventory.pm | 6 ++++++ sql/Pg-upgrade2/transfer_out_sales_invoice.sql | 7 +++++++ templates/webpages/client_config/_warehouse.html | 15 ++++++++++++++- 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 sql/Pg-upgrade2/transfer_out_sales_invoice.sql diff --git a/SL/DB/MetaSetup/Default.pm b/SL/DB/MetaSetup/Default.pm index accab2995..e566089f5 100644 --- a/SL/DB/MetaSetup/Default.pm +++ b/SL/DB/MetaSetup/Default.pm @@ -61,6 +61,7 @@ __PACKAGE__->meta->columns( ir_show_mark_as_paid => { type => 'boolean', default => 'true' }, is_changeable => { type => 'integer', default => 2, not_null => 1 }, is_show_mark_as_paid => { type => 'boolean', default => 'true' }, + is_transfer_out => { type => 'boolean', default => 'false', not_null => 1 }, itime => { type => 'timestamp', default => 'now()' }, language_id => { type => 'integer' }, max_future_booking_interval => { type => 'integer', default => 360 }, diff --git a/SL/DB/MetaSetup/Inventory.pm b/SL/DB/MetaSetup/Inventory.pm index fce09e7c4..b9df3fb08 100644 --- a/SL/DB/MetaSetup/Inventory.pm +++ b/SL/DB/MetaSetup/Inventory.pm @@ -16,6 +16,7 @@ __PACKAGE__->meta->columns( delivery_order_items_stock_id => { type => 'integer' }, employee_id => { type => 'integer', not_null => 1 }, id => { type => 'serial', not_null => 1 }, + invoice_id => { type => 'integer' }, itime => { type => 'timestamp', default => 'now()' }, mtime => { type => 'timestamp' }, oe_id => { type => 'integer' }, @@ -48,6 +49,11 @@ __PACKAGE__->meta->foreign_keys( key_columns => { employee_id => 'id' }, }, + invoice => { + class => 'SL::DB::InvoiceItem', + key_columns => { invoice_id => 'id' }, + }, + oe => { class => 'SL::DB::DeliveryOrder', key_columns => { oe_id => 'id' }, diff --git a/sql/Pg-upgrade2/transfer_out_sales_invoice.sql b/sql/Pg-upgrade2/transfer_out_sales_invoice.sql new file mode 100644 index 000000000..e3bfe4175 --- /dev/null +++ b/sql/Pg-upgrade2/transfer_out_sales_invoice.sql @@ -0,0 +1,7 @@ +-- @tag: transfer_out_sales_invoice +-- @description: Felder für das Feature "Auslagern beim Buchen von Verkaufsrechnungen". +-- @depends: warehouse_add_delivery_order_items_stock_id +-- @encoding: utf-8 + +ALTER TABLE inventory ADD COLUMN invoice_id INTEGER REFERENCES invoice(id); +ALTER TABLE defaults ADD COLUMN is_transfer_out BOOLEAN NOT NULL DEFAULT FALSE; diff --git a/templates/webpages/client_config/_warehouse.html b/templates/webpages/client_config/_warehouse.html index 9d2e0c30b..18df06d37 100644 --- a/templates/webpages/client_config/_warehouse.html +++ b/templates/webpages/client_config/_warehouse.html @@ -70,6 +70,18 @@ [% LxERP.t8('Default Bin with ignoring onhand') %] [% L.select_tag('defaults.bin_id_ignore_onhand', [], id='bin_id_ignore_onhand', with_empty=1) %] + +
+ + [% LxERP.t8('Transfer out on posting sales invoices?') %] + + [% L.yes_no_tag('defaults.is_transfer_out', SELF.defaults.is_transfer_out) %] + + + [% LxERP.t8('Transfer out all items of a sales invoice when posting it. Items are transfered out acording to the settings above.') %] + + +
@@ -88,7 +100,7 @@
- + [% LxERP.t8('Show Value of Goods for Delivery Plan') %] [% L.yes_no_tag('defaults.delivery_plan_show_value_of_goods', SELF.defaults.delivery_plan_show_value_of_goods) %] @@ -106,5 +118,6 @@ [% LxERP.t8('The default delivery plan only checks if all delivery orders have been created not if the goods are transferred. This feature will check if all the goods are transferred. Caveat: Only the state of the delivery orders are checked not partial transferred delivery orders (in technical terms: the table inventory is not checked') %] + -- 2.20.1