Revision afb20e7c
Von Niclas Zimmermann vor mehr als 11 Jahren hinzugefügt
SL/TransNumber.pm | ||
---|---|---|
69 | 69 |
} elsif ($type =~ /part|service|assembly/) { |
70 | 70 |
$filters{trans_number} = "partnumber"; |
71 | 71 |
$filters{numberfield} = $type eq 'service' ? 'servicenumber' : 'articlenumber'; |
72 |
$filters{numberfield} = $type eq 'assembly' ? 'assemblynumber' : $filters{numberfield}; |
|
72 | 73 |
$filters{table} = "parts"; |
73 |
$filters{where} = 'COALESCE(inventory_accno_id, 0) ' . ($type eq 'service' ? '=' : '<>') . ' 0';
|
|
74 |
$filters{where} = 'COALESCE(inventory_accno_id, 0) ' . ($type eq 'service' ? '= 0' : '<> 0 OR assembly');
|
|
74 | 75 |
} |
75 | 76 |
|
76 | 77 |
return %filters; |
... | ... | |
129 | 130 |
($business_number) = selectfirst_array_query($form, $self->dbh, qq|SELECT customernumberinit FROM business WHERE id = ?|, $self->business_id) if $self->business_id; |
130 | 131 |
my $number = $business_number; |
131 | 132 |
($number) = selectfirst_array_query($form, $self->dbh, qq|SELECT $filters{numberfield} FROM defaults|) if !$number; |
133 |
if ($filters{numberfield} eq 'assemblynumber' and length($number) < 1) { |
|
134 |
$filters{numberfield} = 'articlenumber'; |
|
135 |
($number) = selectfirst_array_query($form, $self->dbh, qq|SELECT $filters{numberfield} FROM defaults|) if !$number; |
|
136 |
} |
|
132 | 137 |
$number ||= ''; |
133 | 138 |
my $sequence = SL::PrefixedNumber->new(number => $number); |
134 | 139 |
|
Auch abrufbar als: Unified diff
Nummernkreis für Erzeugnisse
Für Erzeugnisse gibt es jetzt einen eigenen Nummernkreis. Lässt
man das Feld frei, wird weiterhin der Nummernkreis von Waren auch
für Erzeugnisse verwendet.