Revision 3786382b
Von Kivitendo Admin vor etwa 8 Jahren hinzugefügt
SL/Controller/TopQuickSearch.pm | ||
---|---|---|
16 | 16 |
'SL::Controller::TopQuickSearch::Part', |
17 | 17 |
'SL::Controller::TopQuickSearch::Service', |
18 | 18 |
'SL::Controller::TopQuickSearch::Assembly', |
19 |
'SL::Controller::TopQuickSearch::Assortment', |
|
19 | 20 |
'SL::Controller::TopQuickSearch::Contact', |
20 | 21 |
'SL::Controller::TopQuickSearch::SalesQuotation', |
21 | 22 |
'SL::Controller::TopQuickSearch::SalesOrder', |
SL/Controller/TopQuickSearch/Article.pm | ||
---|---|---|
64 | 64 |
my ($self, $term) = @_; |
65 | 65 |
|
66 | 66 |
SL::Controller::Base->new->url_for( |
67 |
controller => 'ic.pl',
|
|
68 |
action => 'edit', |
|
67 |
controller => 'controller.pl',
|
|
68 |
action => 'Part/edit',
|
|
69 | 69 |
id => $term, |
70 | 70 |
); |
71 | 71 |
} |
SL/Controller/TopQuickSearch/Assortment.pm | ||
---|---|---|
1 |
package SL::Controller::TopQuickSearch::Assortment; |
|
2 |
|
|
3 |
use strict; |
|
4 |
use parent qw(SL::Controller::TopQuickSearch::Article); |
|
5 |
|
|
6 |
use SL::Locale::String qw(t8); |
|
7 |
|
|
8 |
sub name { 'assortment' } |
|
9 |
|
|
10 |
sub description_config { t8('Assortment') } |
|
11 |
|
|
12 |
sub description_field { t8('Assortment') } |
|
13 |
|
|
14 |
sub part_type { 'assortment' } |
|
15 |
|
|
16 |
1; |
SL/DB/Helper/TransNumberGenerator.pm | ||
---|---|---|
35 | 35 |
part => { number_column => 'partnumber', number_range_column => 'articlenumber', scoping => \&parts_scoping, }, |
36 | 36 |
service => { number_column => 'partnumber', number_range_column => 'servicenumber', scoping => \&parts_scoping, }, |
37 | 37 |
assembly => { number_column => 'partnumber', number_range_column => 'assemblynumber', scoping => \&parts_scoping, }, |
38 |
assortment => { number_column => 'partnumber', number_range_column => 'assortmentnumber', scoping => \&parts_scoping, }, |
|
38 | 39 |
); |
39 | 40 |
|
40 | 41 |
sub get_next_trans_number { |
... | ... | |
97 | 98 |
my $range_table = ($business ? $business : SL::DB::Default->get)->load(for_update => 1); |
98 | 99 |
|
99 | 100 |
my $start_number = $range_table->$number_range_column; |
100 |
$start_number = $range_table->articlenumber if ($number_range_column eq 'assemblynumber') && (length($start_number) < 1);
|
|
101 |
$start_number = $range_table->articlenumber if ($number_range_column =~ /^(assemblynumber|assortmentnumber)$/) && (length($start_number) < 1);
|
|
101 | 102 |
my $sequence = SL::PrefixedNumber->new(number => $start_number // 0); |
102 | 103 |
|
103 | 104 |
if (!$fill_holes_in_range) { |
SL/DB/Manager/Part.pm | ||
---|---|---|
48 | 48 |
push @filter, ($prefix . part_type => 'service'); |
49 | 49 |
} elsif ($type =~ m/^assembly/) { |
50 | 50 |
push @filter, ($prefix . part_type => 'assembly'); |
51 |
} elsif ($type =~ m/^assortment/) { |
|
52 |
push @filter, ($prefix . part_type => 'assortment'); |
|
51 | 53 |
} |
52 | 54 |
} |
53 | 55 |
|
SL/DB/Part.pm | ||
---|---|---|
61 | 61 |
sub is_type { |
62 | 62 |
my $self = shift; |
63 | 63 |
my $type = lc(shift || ''); |
64 |
die 'invalid type' unless $type =~ /^(?:part|service|assembly)$/; |
|
64 |
die 'invalid type' unless $type =~ /^(?:part|service|assembly|assortment)$/;
|
|
65 | 65 |
|
66 | 66 |
return $self->type eq $type ? 1 : 0; |
67 | 67 |
} |
68 | 68 |
|
69 |
sub is_part { $_[0]->part_type eq 'part' } |
|
70 |
sub is_assembly { $_[0]->part_type eq 'assembly' } |
|
71 |
sub is_service { $_[0]->part_type eq 'service' } |
|
69 |
sub is_part { $_[0]->part_type eq 'part' } |
|
70 |
sub is_assembly { $_[0]->part_type eq 'assembly' } |
|
71 |
sub is_service { $_[0]->part_type eq 'service' } |
|
72 |
sub is_assortment { $_[0]->part_type eq 'assortment' } |
|
72 | 73 |
|
73 | 74 |
sub type { |
74 | 75 |
return $_[0]->part_type; |
... | ... | |
99 | 100 |
$class->new(%params, part_type => 'service'); |
100 | 101 |
} |
101 | 102 |
|
103 |
sub new_assortment { |
|
104 |
my ($class, %params) = @_; |
|
105 |
$class->new(%params, part_type => 'assortment'); |
|
106 |
} |
|
107 |
|
|
102 | 108 |
sub orphaned { |
103 | 109 |
my ($self) = @_; |
104 | 110 |
die 'not an accessor' if @_ > 1; |
... | ... | |
107 | 113 |
SL::DB::InvoiceItem |
108 | 114 |
SL::DB::OrderItem |
109 | 115 |
SL::DB::Inventory |
116 |
SL::DB::Assembly |
|
117 |
SL::DB::AssortmentItem |
|
110 | 118 |
); |
111 | 119 |
|
112 | 120 |
for my $class (@relations) { |
... | ... | |
245 | 253 |
|
246 | 254 |
=item Assembly - a collection of both parts and services |
247 | 255 |
|
256 |
=item Assortment - a collection of parts |
|
257 |
|
|
248 | 258 |
=back |
249 | 259 |
|
250 | 260 |
These types are sadly represented by data inside the class and cannot be |
251 | 261 |
migrated into a flag. To work around this, each C<Part> object knows what type |
252 | 262 |
it currently is. Since the type is data driven, there ist no explicit setting |
253 | 263 |
method for it, but you can construct them explicitly with C<new_part>, |
254 |
C<new_service>, and C<new_assembly>. A Buchungsgruppe should be supplied in this
|
|
264 |
C<new_service>, C<new_assembly> and C<new_assortment>. A Buchungsgruppe should be supplied in this
|
|
255 | 265 |
case, but it will use the default Buchungsgruppe if you don't. |
256 | 266 |
|
257 | 267 |
Matching these there are assorted helper methods dealing with types, |
SL/Presenter/Part.pm | ||
---|---|---|
17 | 17 |
croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/; |
18 | 18 |
|
19 | 19 |
my $text = join '', ( |
20 |
$params{no_link} ? '' : '<a href="ic.pl?action=edit&id=' . $self->escape($part->id) . '">',
|
|
20 |
$params{no_link} ? '' : '<a href="controller.pl?action=Part/edit&id=' . $self->escape($part->id) . '">',
|
|
21 | 21 |
$self->escape($part->partnumber), |
22 | 22 |
$params{no_link} ? '' : '</a>', |
23 | 23 |
); |
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"; |
bin/mozilla/ic.pl | ||
---|---|---|
590 | 590 |
$soldtotal = 0 if ($form->{sold}); |
591 | 591 |
} |
592 | 592 |
|
593 |
my $edit_link = build_std_url('action=edit', 'id=' . E($ref->{id}), 'callback');
|
|
593 |
my $edit_link = build_std_url('script=controller.pl', 'action=Part/edit', 'id=' . E($ref->{id}), 'callback');
|
|
594 | 594 |
$row->{partnumber}->{link} = $edit_link; |
595 | 595 |
$row->{description}->{link} = $edit_link; |
596 | 596 |
|
locale/de/all | ||
---|---|---|
147 | 147 |
'Add Accounts Payables Transaction' => 'Kreditorenbuchung erfassen', |
148 | 148 |
'Add Accounts Receivables Transaction' => 'Debitorenbuchung erfassen', |
149 | 149 |
'Add Assembly' => 'Erzeugnis erfassen', |
150 |
'Add Assortment' => 'Sortiment erfassen', |
|
150 | 151 |
'Add Client' => 'Neuer Mandant', |
151 | 152 |
'Add Credit Note' => 'Gutschrift erfassen', |
152 | 153 |
'Add Customer' => 'Kunde erfassen', |
... | ... | |
311 | 312 |
'Assigned invoices' => 'Zugewiesene Rechnungen', |
312 | 313 |
'Assignment of articles to sections' => 'Zuweisung von Artikeln zu Abschnitten', |
313 | 314 |
'Assistant for general ledger corrections' => 'Assistent für die Korrektur von Hauptbucheinträgen', |
315 |
'Assortment' => 'Sortiment', |
|
316 |
'Assortment items' => 'Sortimentsartikel', |
|
317 |
'Assortments' => 'Sortimente', |
|
314 | 318 |
'Assume Tax Consultant Data in Tax Computation?' => 'Beraterdaten in UStVA übernehmen?', |
315 | 319 |
'At least' => 'Mindestens', |
316 | 320 |
'At least one Perl module that kivitendo ERP requires for running is not installed on your system.' => 'Mindestes ein Perl-Modul, das kivitendo ERP zur Ausführung benötigt, ist auf Ihrem System nicht installiert.', |
... | ... | |
1047 | 1051 |
'Edit Accounts Payables Transaction' => 'Kreditorenbuchung bearbeiten', |
1048 | 1052 |
'Edit Accounts Receivables Transaction' => 'Debitorenbuchung bearbeiten', |
1049 | 1053 |
'Edit Assembly' => 'Erzeugnis bearbeiten', |
1054 |
'Edit Assortment' => 'Sortiment bearbeiten', |
|
1050 | 1055 |
'Edit Bins' => 'Lagerplätze bearbeiten', |
1051 | 1056 |
'Edit Client' => 'Mandanten bearbeiten', |
1052 | 1057 |
'Edit Credit Note' => 'Gutschrift bearbeiten', |
... | ... | |
1598 | 1603 |
'Languages and translations' => 'Sprachen und Übersetzungen', |
1599 | 1604 |
'Last Article Number' => 'Letzte Artikelnummer', |
1600 | 1605 |
'Last Assembly Number' => 'Letzte Erzeugnisnummer', |
1606 |
'Last Assortment Number' => 'Letzte Sortimentsnummer', |
|
1601 | 1607 |
'Last Cost' => 'Einkaufspreis', |
1602 | 1608 |
'Last Credit Note Number' => 'Letzte Gutschriftnummer', |
1603 | 1609 |
'Last Customer Number' => 'Letzte Kundennummer', |
... | ... | |
2809 | 2815 |
'The application "#1" was not found on the system.' => 'Die Anwendung "#1" wurde auf dem System nicht gefunden.', |
2810 | 2816 |
'The assembly has been created.' => 'Das Erzeugnis wurde hergestellt.', |
2811 | 2817 |
'The assistant could not find anything wrong with #1. Maybe the problem has been solved in the meantime.' => 'Der Korrekturassistent konnte kein Problem bei #1 feststellen. Eventuell wurde das Problem in der Zwischenzeit bereits behoben.', |
2818 |
'The assortment doesn\'t have any items.' => 'Das Sortiment enthält keine Artikel.', |
|
2812 | 2819 |
'The authentication database is not reachable at the moment. Either it hasn\'t been set up yet or the database server might be down. Please contact your administrator.' => 'Die Authentifizierungs-Datenbank kann momentan nicht erreicht werden. Entweder wurde sie noch nicht eingerichtet, oder der Datenbankserver ist momentan nicht verfügbar. Bitte wenden Sie sich an Ihren Administrator.', |
2813 | 2820 |
'The available options depend on the varibale type:' => 'Die verfügbaren Optionen hängen vom Variablentypen ab:', |
2814 | 2821 |
'The background job could not be destroyed.' => 'Der Hintergrund-Job konnte nicht gelöscht werden.', |
menus/user/00-erp.yaml | ||
---|---|---|
51 | 51 |
icon: part_add |
52 | 52 |
order: 300 |
53 | 53 |
access: part_service_assembly_edit |
54 |
module: ic.pl |
|
55 | 54 |
params: |
56 |
action: add |
|
57 |
part_type: part |
|
55 |
action: Part/add_part |
|
58 | 56 |
- parent: master_data |
59 | 57 |
id: master_data_add_service |
60 | 58 |
name: Add Service |
61 | 59 |
icon: service_add |
62 | 60 |
order: 400 |
63 | 61 |
access: part_service_assembly_edit |
64 |
module: ic.pl |
|
65 | 62 |
params: |
66 |
action: add |
|
67 |
part_type: service |
|
63 |
action: Part/add_service |
|
68 | 64 |
- parent: master_data |
69 | 65 |
id: master_data_add_assembly |
70 | 66 |
name: Add Assembly |
71 | 67 |
icon: assembly_add |
72 | 68 |
order: 500 |
73 | 69 |
access: part_service_assembly_edit |
74 |
module: ic.pl |
|
75 | 70 |
params: |
76 |
action: add |
|
77 |
part_type: assembly |
|
71 |
action: Part/add_assembly |
|
72 |
- parent: master_data |
|
73 |
id: master_data_add_assortment |
|
74 |
name: Add Assortment |
|
75 |
icon: assortment_add |
|
76 |
order: 550 |
|
77 |
access: part_service_assembly_edit |
|
78 |
params: |
|
79 |
action: Part/add_assortment |
|
78 | 80 |
- parent: master_data |
79 | 81 |
id: master_data_add_project |
80 | 82 |
name: Add Project |
... | ... | |
169 | 171 |
params: |
170 | 172 |
action: search |
171 | 173 |
searchitems: assembly |
174 |
- parent: master_data_reports |
|
175 |
id: master_data_reports_assortments |
|
176 |
name: Assortments |
|
177 |
icon: assortment_report |
|
178 |
order: 650 |
|
179 |
access: part_service_assortment_details |
|
180 |
module: ic.pl |
|
181 |
params: |
|
182 |
action: search |
|
183 |
searchitems: assortment |
|
172 | 184 |
- parent: master_data_reports |
173 | 185 |
id: master_data_reports_projects |
174 | 186 |
name: Projects |
Auch abrufbar als: Unified diff
Neuen Artikeltyp Sortiment in kivitendo eingebaut