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,
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
(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
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 },
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
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' },
'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',
'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.',
--- /dev/null
+-- @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;
[% LxERP.t8('Any stock contents containing a best before date will be impossible to stock out otherwise.') %]
</td>
</tr>
- <tr><td colspan="3"><hr /></td></tr>
- <tr>
- <td align="right">[% LxERP.t8('Delivery Plan check for transferred delivery orders') %]</td>
- <td>
- [% L.yes_no_tag('defaults.delivery_plan_calculate_transferred_do', SELF.defaults.delivery_plan_calculate_transferred_do) %]
- </td>
- <td>
- [% 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') %]
- </td>
- </tr>
</table>
</div>