From: Bernd Bleßmann Date: Mon, 29 Feb 2016 09:53:54 +0000 (+0100) Subject: DeliveryPlan: Entfernt Einstellung, um nur ausgelagerte Lieferscheine zu berücksichtigen. X-Git-Tag: release-3.4.1~372 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=6923fcd42c74560e2d65b6a3c750d7a3f99e512a;p=kivitendo-erp.git DeliveryPlan: Entfernt Einstellung, um nur ausgelagerte Lieferscheine zu berücksichtigen. Diese Option lieferte hier ungenaue Ergebnisse, da dennoch auch Positionen angezeigt wurden, für die überhaupt kein Lieferschein erstellt wurde. --- diff --git a/SL/Controller/DeliveryPlan.pm b/SL/Controller/DeliveryPlan.pm index 332b1a04a..bb4514d7a 100644 --- a/SL/Controller/DeliveryPlan.pm +++ b/SL/Controller/DeliveryPlan.pm @@ -208,9 +208,7 @@ sub delivery_plan_query { my $vc = $self->vc; my $employee_id = SL::DB::Manager::Employee->current->id; my $oe_owner = $_[0]->all_edit_right ? '' : " oe.employee_id = $employee_id AND"; - # check delivered state for delivery_orders (transferred out) if enabled - my $filter_delivered = ($::instance_conf->get_delivery_plan_calculate_transferred_do) ? - "AND (SELECT delivered from delivery_orders where id = doi.delivery_order_id)" : ''; + [ "order.${vc}_id" => { gt => 0 }, 'order.closed' => 0, @@ -239,7 +237,6 @@ sub delivery_plan_query { rl.to_table = 'delivery_orders' AND rl.to_id = doi.delivery_order_id AND oi.parts_id = doi.parts_id - $filter_delivered ) tuples GROUP BY parts_id, trans_id, qty ) partials LEFT JOIN orderitems oi ON partials.parts_id = oi.parts_id AND partials.trans_id = oi.trans_id @@ -292,8 +289,6 @@ sub delivery_plan_query { (oe.quotation = 'f' OR oe.quotation IS NULL) AND NOT oe.closed ) rl LEFT JOIN delivery_order_items doi ON (rl.to_id = doi.delivery_order_id) - WHERE 1 = 1 - $filter_delivered GROUP BY rl.from_id, doi.parts_id ) agg ON (agg.oid = oi.trans_id AND agg.parts_id = oi.parts_id) LEFT JOIN oe ON oe.id = oi.trans_id @@ -316,9 +311,6 @@ sub delivery_plan_query_linked_items { my $vc = $self->vc; my $employee_id = SL::DB::Manager::Employee->current->id; my $oe_owner = $_[0]->all_edit_right ? '' : " oe.employee_id = $employee_id AND"; - # check delivered state for delivery_orders (transferred out) if enabled - my $filter_delivered = ($::instance_conf->get_delivery_plan_calculate_transferred_do) ? - "AND (SELECT delivered from delivery_orders where id = doi.delivery_order_id)" : ''; [ "order.${vc}_id" => { gt => 0 }, @@ -340,7 +332,6 @@ sub delivery_plan_query_linked_items { rl.from_table = 'orderitems'AND rl.to_table = 'delivery_order_items' AND rl.from_id = oi.id - $filter_delivered GROUP BY oi.id ) linked WHERE qty > doi_qty diff --git a/SL/DB/MetaSetup/Default.pm b/SL/DB/MetaSetup/Default.pm index 4be812b38..847112918 100644 --- a/SL/DB/MetaSetup/Default.pm +++ b/SL/DB/MetaSetup/Default.pm @@ -42,7 +42,6 @@ __PACKAGE__->meta->columns( datev_check_on_gl_transaction => { type => 'boolean', default => 'true' }, datev_check_on_purchase_invoice => { type => 'boolean', default => 'true' }, datev_check_on_sales_invoice => { type => 'boolean', default => 'true' }, - delivery_plan_calculate_transferred_do => { type => 'boolean', default => 'false', not_null => 1 }, disabled_price_sources => { type => 'array' }, dunning_ar => { type => 'integer' }, dunning_ar_amount_fee => { type => 'integer' }, diff --git a/locale/de/all b/locale/de/all index d413a1a05..c4ba289f0 100755 --- a/locale/de/all +++ b/locale/de/all @@ -872,7 +872,6 @@ $self->{texts} = { 'Delivery Order(s) for full qty created' => 'Lieferschein(e) mit kompletter Menge erstellt', 'Delivery Orders' => 'Lieferscheine', 'Delivery Plan' => 'Lieferplan', - 'Delivery Plan check for transferred delivery orders' => 'Lieferplan berücksichtig den Status des Lieferscheins (ausgelagert / nicht ausgelagert)', 'Delivery Plan for currently outstanding purchase orders' => 'Lieferplan für nicht vollständig gelieferte Einkaufs-Aufträge', 'Delivery Plan for currently outstanding sales orders' => 'Lieferplan für nicht vollständig gelieferte Verkaufsaufträge', 'Delivery Terms' => 'Lieferbedingungen', @@ -2769,7 +2768,6 @@ $self->{texts} = { 'The dataset #1 has been created.' => 'Die Datenbank #1 wurde angelegt.', 'The dataset #1 has been deleted.' => 'Die Datenbank #1 wurde gelöscht.', 'The deductible amount' => 'Der abziehbare Skontobetrag', - 'The default delivery value report 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' => 'Standardmässig wird beim Lieferwertbericht überprüft, ob es eine vollständige Liefermenge über alle Lieferscheine gibt. Dies ist dann die Statusbedingung für geliefert oder nicht geliefert. Mit dieser Erweiterung wird geprüft ob die Lieferbelege auch wirklich ausgelagert sind oder nicht. Teilausgelagerte Lieferscheine werden allerdings nicht berücksichtigt (Technischer Hintergrund: Keine Überprüfung der Lagertabelle inventory). ', 'The default value depends on the variable type:' => 'Die Bedeutung des Standardwertes hängt vom Variablentypen ab:', 'The delivery order has not been marked as delivered. The warehouse contents have not changed.' => 'Der Lieferschein wurde nicht als geliefert markiert. Der Lagerinhalt wurde nicht verändert.', 'The delivery term has been created.' => 'Die Lieferbedingungen wurden angelegt.', diff --git a/sql/Pg-upgrade2/defaults_drop_delivery_plan_calculate_transferred_do.sql b/sql/Pg-upgrade2/defaults_drop_delivery_plan_calculate_transferred_do.sql new file mode 100644 index 000000000..9097eb8b0 --- /dev/null +++ b/sql/Pg-upgrade2/defaults_drop_delivery_plan_calculate_transferred_do.sql @@ -0,0 +1,6 @@ +-- @tag: defaults_drop_delivery_plan_calculate_transferred_do +-- @description: Entferne Einstellung für Lieferplan, nur ausgelagerte Lieferscheine zu berücksichtigen +-- @depends: defaults_add_delivery_plan_config +-- @encoding: utf-8 + +ALTER TABLE defaults DROP COLUMN delivery_plan_calculate_transferred_do; diff --git a/templates/webpages/client_config/_warehouse.html b/templates/webpages/client_config/_warehouse.html index 89faba5b0..30e8a003e 100644 --- a/templates/webpages/client_config/_warehouse.html +++ b/templates/webpages/client_config/_warehouse.html @@ -97,15 +97,5 @@ [% LxERP.t8('Any stock contents containing a best before date will be impossible to stock out otherwise.') %] -
- - [% LxERP.t8('Delivery Plan check for transferred delivery orders') %] - - [% L.yes_no_tag('defaults.delivery_plan_calculate_transferred_do', SELF.defaults.delivery_plan_calculate_transferred_do) %] - - - [% LxERP.t8('The default delivery value report 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') %] - -