From: Sven Schöling Date: Fri, 1 Oct 2021 17:12:44 +0000 (+0200) Subject: DeliveryOrder: namen für Anhänge und bessere Fehlermeldungen X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~216^2~73 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=94e5f462afe9bc107c99138929278d9517870c61;p=kivitendo-erp.git DeliveryOrder: namen für Anhänge und bessere Fehlermeldungen --- diff --git a/SL/DB/DeliveryOrder/TypeData.pm b/SL/DB/DeliveryOrder/TypeData.pm index c26b7c59b..079e4942b 100644 --- a/SL/DB/DeliveryOrder/TypeData.pm +++ b/SL/DB/DeliveryOrder/TypeData.pm @@ -1,6 +1,7 @@ package SL::DB::DeliveryOrder::TypeData; use strict; +use Carp; use Exporter qw(import); use Scalar::Util qw(weaken); use SL::Locale::String qw(t8); @@ -25,6 +26,7 @@ my %type_data = ( saved => t8('Delivery Order has been saved'), add => t8("Add Sales Delivery Order"), edit => t8("Edit Sales Delivery Order"), + attachment => t8("sales_delivery_order_list"), }, show_menu => { save_and_quotation => 0, @@ -51,6 +53,7 @@ my %type_data = ( saved => t8('Delivery Order has been saved'), add => t8("Add Purchase Delivery Order"), edit => t8("Edit Purchase Delivery Order"), + attachment => t8("purchase_delivery_order_list"), }, show_menu => { save_and_quotation => 0, @@ -77,6 +80,7 @@ my %type_data = ( saved => t8('Delivery Order has been saved'), add => t8("Add Supplier Delivery Order"), edit => t8("Edit Supplier Delivery Order"), + attachment => t8("supplier_delivery_order_list"), }, show_menu => { save_and_quotation => 0, @@ -103,6 +107,7 @@ my %type_data = ( saved => t8('Delivery Order has been saved'), add => t8("Add RMA Delivery Order"), edit => t8("Edit RMA Delivery Order"), + attachment => t8("rma_delivery_order_list"), }, show_menu => { save_and_quotation => 0, @@ -143,9 +148,9 @@ sub is_valid_type { } sub validate_type { - my ($self, $type) = @_; + my ($type) = @_; - return $valid_types{$type} // die "invalid type"; + return $valid_types{$type} // confess "invalid type '$type'"; } sub get { @@ -161,7 +166,7 @@ sub get { sub get3 { my ($type, $topic, $key) = @_; - my $ret = $type_data{$type}{$topic}{$key} // die "unknown property '$key' in topic '$topic'"; + my $ret = $type_data{$type}{$topic}{$key} // die "unknown property '$key' in topic '$topic' for type '$type'"; ref $ret eq 'CODE' ? $ret->() diff --git a/locale/de/all b/locale/de/all index 12dde9868..b279d1688 100755 --- a/locale/de/all +++ b/locale/de/all @@ -4567,6 +4567,7 @@ $self->{texts} = { 'return_material' => 'Materialrückgabe', 'revert deleted' => 'löschen rückgängig', 'rfq_list' => 'anfragenliste', + 'rma_delivery_order_list' => 'lieferscheinliste_rma', 'running' => 'läuft', 'sales tax identification number' => 'USt-IdNr.', 'sales_delivery_order_list' => 'lieferscheinliste_verkauf', @@ -4596,6 +4597,7 @@ $self->{texts} = { 'stocktaking' => 'Inventur', 'succeeded' => 'erfolgreich', 'sum' => 'Summe', + 'supplier_delivery_order_list' => 'lieferscheinliste_beistell', 'tax_chartaccno' => 'Automatikkonto', 'tax_percent' => 'Prozentsatz', 'tax_rate' => 'Prozent',