Revision 65de6f61
Von Kivitendo Admin vor fast 8 Jahren hinzugefügt
SL/TransNumber.pm | ||
---|---|---|
15 | 15 |
scalar => [ qw(type id number save dbh dbh_provided business_id) ], |
16 | 16 |
); |
17 | 17 |
|
18 |
my @SUPPORTED_TYPES = qw(invoice credit_note customer vendor sales_delivery_order purchase_delivery_order sales_order purchase_order sales_quotation request_quotation part service assembly letter); |
|
18 |
my @SUPPORTED_TYPES = qw(invoice credit_note customer vendor sales_delivery_order purchase_delivery_order sales_order purchase_order sales_quotation request_quotation part service assembly assortment letter);
|
|
19 | 19 |
|
20 | 20 |
sub new { |
21 | 21 |
my $class = shift; |
... | ... | |
67 | 67 |
$filters{where} = 'COALESCE(quotation, FALSE)'; |
68 | 68 |
$filters{where} .= $type =~ /^sales/ ? ' AND (customer_id IS NOT NULL)' : ' AND (vendor_id IS NOT NULL)'; |
69 | 69 |
|
70 |
} elsif ($type =~ /part|service|assembly/) {
|
|
70 |
} elsif ($type =~ /^(part|service|assembly|assortment)$/) {
|
|
71 | 71 |
$filters{trans_number} = "partnumber"; |
72 |
$filters{numberfield} = $type eq 'service' ? 'servicenumber' : 'articlenumber'; |
|
73 |
$filters{numberfield} = $type eq 'assembly' ? 'assemblynumber' : $filters{numberfield}; |
|
72 |
my %numberfield_hash = ( service => 'servicenumber', |
|
73 |
assembly => 'assemblynumber', |
|
74 |
assortment => 'assortmentnumber', |
|
75 |
part => 'articlenumber' |
|
76 |
); |
|
77 |
$filters{numberfield} = $numberfield_hash{$type}; |
|
74 | 78 |
$filters{table} = "parts"; |
75 | 79 |
} elsif ($type =~ /letter/) { |
76 | 80 |
$filters{trans_number} = "letternumber"; |
Auch abrufbar als: Unified diff
Neuen Artikeltyp Sortiment in kivitendo eingebaut