vendornumber = ?,
articlenumber = ?,
servicenumber = ?,
+ assemblynumber = ?,
sdonumber = ?,
pdonumber = ?,
curr = ?,
$form->{sqnumber}, $form->{rfqnumber},
$form->{customernumber}, $form->{vendornumber},
$form->{articlenumber}, $form->{servicenumber},
+ $form->{assemblynumber},
$form->{sdonumber}, $form->{pdonumber},
$currency,
$form->{businessnumber}, $form->{weightunit},
} elsif ($type =~ /part|service|assembly/) {
$filters{trans_number} = "partnumber";
$filters{numberfield} = $type eq 'service' ? 'servicenumber' : 'articlenumber';
+ $filters{numberfield} = $type eq 'assembly' ? 'assemblynumber' : $filters{numberfield};
$filters{table} = "parts";
- $filters{where} = 'COALESCE(inventory_accno_id, 0) ' . ($type eq 'service' ? '=' : '<>') . ' 0';
+ $filters{where} = 'COALESCE(inventory_accno_id, 0) ' . ($type eq 'service' ? '= 0' : '<> 0 OR assembly');
}
return %filters;
($business_number) = selectfirst_array_query($form, $self->dbh, qq|SELECT customernumberinit FROM business WHERE id = ?|, $self->business_id) if $self->business_id;
my $number = $business_number;
($number) = selectfirst_array_query($form, $self->dbh, qq|SELECT $filters{numberfield} FROM defaults|) if !$number;
+ if ($filters{numberfield} eq 'assemblynumber' and length($number) < 1) {
+ $filters{numberfield} = 'articlenumber';
+ ($number) = selectfirst_array_query($form, $self->dbh, qq|SELECT $filters{numberfield} FROM defaults|) if !$number;
+ }
$number ||= '';
my $sequence = SL::PrefixedNumber->new(number => $number);
'Languages and translations' => 'Sprachen und Übersetzungen',
'Last Action' => 'Letzte Aktivität',
'Last Article Number' => 'Letzte Artikelnummer',
+ 'Last Assembly Number' => 'Letzte Erzeugnisnummer',
'Last Cost' => 'Einkaufspreis',
'Last Credit Note Number' => 'Letzte Gutschriftnummer',
'Last Customer Number' => 'Letzte Kundennummer',
<tr>
<th align="right" nowrap>[% 'Last RFQ Number' | $T8 %]</th>
<td><input name="rfqnumber" size="10" value="[% HTML.escape(defaults_rfqnumber) %]"></td>
+ <th align="right" nowrap>[% 'Last Assembly Number' | $T8 %]</th>
+ <td><input name="assemblynumber" size="10" value="[% HTML.escape(defaults_assemblynumber) %]"></td>
</tr>
<tr>
<th align="right" nowrap>[% 'Last Sales Delivery Order Number' | $T8 %]</th>
<td><input name="sdonumber" size="10" value="[% HTML.escape(defaults_sdonumber) %]"></td>
+ </tr>
+
+ <tr>
<th align="right" nowrap>[% 'Last Purchase Delivery Order Number' | $T8 %]</th>
<td><input name="pdonumber" size="10" value="[% HTML.escape(defaults_pdonumber) %]"></td>
</tr>