From e503a1d422ed53d99d68db3ebbc6d4dfe11dea7f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Wed, 18 Aug 2021 11:20:21 +0200 Subject: [PATCH] Seriennummer in LS auf Pos. 1, falls Pflichtfeld ... aber nur wenn die Positionen im Lieferschein auch das Pflichtfeld Seriennummer enthalten --- bin/mozilla/io.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index a69521b12..e889f2aef 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -172,8 +172,12 @@ sub display_row { ); # serialnr is important for delivery_orders if ($form->{type} eq 'sales_delivery_order') { - splice @row2_sort, 0, 1; - splice @header_sort, 4, 0, "serialnr"; + for my $i (1 .. $form->{rowcount} - 1) { + next unless $form->{"has_sernumber_$i"}; + splice @row2_sort, 0, 1; + splice @header_sort, 4, 0, "serialnr"; + last; + } } my %column_def = ( -- 2.20.1