Revision 6416b3bb
Von Martin Helmling martin.helmling@octosoft.eu vor fast 8 Jahren hinzugefügt
SL/IC.pm | ||
---|---|---|
379 | 379 |
push @select_tokens, $_; |
380 | 380 |
} |
381 | 381 |
|
382 |
for ($form->{searchitems}) { |
|
383 |
push @where_tokens, "p.part_type = 'part'" if /part/; |
|
384 |
push @where_tokens, "p.part_type = 'service'" if /service/; |
|
385 |
push @where_tokens, "p.part_type = 'assembly'" if /assembly/; |
|
386 |
push @where_tokens, "p.part_type = 'assortment'" if /assortment/; |
|
382 |
# Oder Bedingungen fuer Ware Dienstleistung Erzeugnis: |
|
383 |
if ($form->{l_part} || $form->{l_assembly} || $form->{l_service} || $form->{l_assortment}) { |
|
384 |
my @or_tokens = (); |
|
385 |
push @or_tokens, "p.part_type = 'service'" if $form->{l_service}; |
|
386 |
push @or_tokens, "p.part_type = 'assembly'" if $form->{l_assembly}; |
|
387 |
push @or_tokens, "p.part_type = 'part'" if $form->{l_part}; |
|
388 |
push @or_tokens, "p.part_type = 'assortment'" if $form->{l_assortment}; |
|
389 |
push @where_tokens, join ' OR ', map { "($_)" } @or_tokens; |
|
387 | 390 |
} |
391 |
else { |
|
392 |
# gar keine Teile |
|
393 |
push @where_tokens, q|'F' = 'T'|; |
|
394 |
} |
|
395 |
|
|
388 | 396 |
if ( $form->{classification_id} > 0 ) { |
389 | 397 |
push @where_tokens, "p.classification_id = ?"; |
390 | 398 |
push @bind_vars, $form->{classification_id}; |
bin/mozilla/ic.pl | ||
---|---|---|
84 | 84 |
$form->{lastsort} = ""; # memory for which table was sort at last time |
85 | 85 |
$form->{ndxs_counter} = 0; # counter for added entries to top100 |
86 | 86 |
|
87 |
my %is_xyz = map { +"is_$_" => ($form->{searchitems} eq $_) } qw(part service assembly assortment); |
|
87 |
# for seach all possibibilities, is_service only used as UNLESS so == 0 |
|
88 |
my %is_xyz = ("is_part" => 1, "is_service" => 0, "is_assembly" =>1 ); |
|
88 | 89 |
|
89 | 90 |
$form->{title} = (ucfirst $form->{searchitems}) . "s"; |
90 | 91 |
$form->{title} =~ s/ys$/ies/; |
91 | 92 |
$form->{title} = $locale->text($form->{title}); |
92 |
$form->{title} = $locale->text('Assemblies') if ($is_xyz{is_assembly}); |
|
93 | 93 |
|
94 | 94 |
$form->{CUSTOM_VARIABLES} = CVar->get_configs('module' => 'IC'); |
95 | 95 |
($form->{CUSTOM_VARIABLES_FILTER_CODE}, |
... | ... | |
412 | 412 |
} |
413 | 413 |
$form->{"l_type_and_classific"} = "Y"; |
414 | 414 |
|
415 |
if ($form->{searchitems} eq 'service') {
|
|
415 |
if ($form->{l_service} && !$form->{l_assembly} && !$form->{l_part}) {
|
|
416 | 416 |
|
417 | 417 |
# remove bin, weight and rop from list |
418 | 418 |
map { $form->{"l_$_"} = "" } qw(bin weight rop); |
... | ... | |
527 | 527 |
{ PART_CLASSIFICATIONS => SL::DB::Manager::PartClassification->get_all_sorted }), |
528 | 528 |
'output_format' => 'HTML', |
529 | 529 |
'title' => $form->{title}, |
530 |
'attachment_basename' => $attachment_basenames{$form->{searchitems}} . strftime('_%Y%m%d', localtime time),
|
|
530 |
'attachment_basename' => 'article_list' . strftime('_%Y%m%d', localtime time),
|
|
531 | 531 |
); |
532 | 532 |
$report->set_options_from_form(); |
533 | 533 |
$locale->set_numberformat_wo_thousands_separator(\%myconfig) if lc($report->{options}->{output_format}) eq 'csv'; |
... | ... | |
650 | 650 |
(!$next_ref->{assemblyitem} && ($same_item ne $next_ref->{ $form->{sort} })))) { |
651 | 651 |
my $row = { map { $_ => { 'class' => 'listsubtotal', } } @columns }; |
652 | 652 |
|
653 |
if (($form->{searchitems} ne 'assembly') || !$form->{bom}) {
|
|
653 |
if ( !$form->{l_assembly} || !$form->{bom}) {
|
|
654 | 654 |
$row->{soldtotal}->{data} = $form->format_amount(\%myconfig, $subtotals{soldtotal}); |
655 | 655 |
} |
656 | 656 |
|
menus/user/00-erp.yaml | ||
---|---|---|
142 | 142 |
action: CustomerVendor/search_contact |
143 | 143 |
db: customer |
144 | 144 |
- parent: master_data_reports |
145 |
id: master_data_reports_parts
|
|
146 |
name: Parts
|
|
145 |
id: master_data_reports_articles
|
|
146 |
name: Articles
|
|
147 | 147 |
icon: part_report |
148 |
order: 400 |
|
149 |
access: part_service_assembly_details |
|
150 |
module: ic.pl |
|
151 |
params: |
|
152 |
action: search |
|
153 |
searchitems: part |
|
154 |
- parent: master_data_reports |
|
155 |
id: master_data_reports_services |
|
156 |
name: Services |
|
157 |
icon: service_report |
|
158 | 148 |
order: 500 |
159 | 149 |
access: part_service_assembly_details |
160 | 150 |
module: ic.pl |
161 | 151 |
params: |
162 | 152 |
action: search |
163 |
searchitems: service |
|
164 |
- parent: master_data_reports |
|
165 |
id: master_data_reports_assemblies |
|
166 |
name: Assemblies |
|
167 |
icon: assembly_report |
|
168 |
order: 600 |
|
169 |
access: part_service_assembly_details |
|
170 |
module: ic.pl |
|
171 |
params: |
|
172 |
action: search |
|
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 |
|
153 |
searchitems: article |
|
184 | 154 |
- parent: master_data_reports |
185 | 155 |
id: master_data_reports_projects |
186 | 156 |
name: Projects |
templates/webpages/ic/search.html | ||
---|---|---|
22 | 22 |
<tr valign="top"> |
23 | 23 |
<td> |
24 | 24 |
<table> |
25 |
<tr> |
|
26 |
<th align="right" nowrap>[% 'Part Type' | $T8 %]</th> |
|
27 |
<td colspan="4" ><table><tr> |
|
28 |
<td> |
|
29 |
<input name="l_part" id="l_part" class="checkbox" type="checkbox" value="Y" checked> |
|
30 |
<label for="l_part">[% 'Part' | $T8 %]</label> |
|
31 |
</td> |
|
32 |
<td> |
|
33 |
<input name="l_service" id="l_service" class="checkbox" type="checkbox" value="Y" checked> |
|
34 |
<label for="l_service">[% 'Service' | $T8 %]</label> |
|
35 |
</td> |
|
36 |
<td> |
|
37 |
<input name="l_assembly" id="l_assembly" class="checkbox" type="checkbox" value="Y" checked> |
|
38 |
<label for="l_assembly">[% 'Assembly' | $T8 %]</label> |
|
39 |
</td> |
|
40 |
<td> |
|
41 |
<input name="l_assortment" id="l_assortment" class="checkbox" type="checkbox" value="Y" checked> |
|
42 |
<label for="l_assortment">[% 'Assortment' | $T8 %]</label> |
|
43 |
</td> |
|
44 |
</tr></table></td> |
|
45 |
</tr> |
|
25 | 46 |
<tr> |
26 | 47 |
<th align="right" nowrap>[% 'Part Number' | $T8 %]</th> |
27 | 48 |
<td><input name="partnumber" size="20"></td> |
Auch abrufbar als: Unified diff
Zusammengefasstes Listen von Ware,Erzeugnis,Dienstleistung und Sortimenten
Die Suchmaske für Ware,Erzeugnis,Dienstleistung und Sortiment gilt nun einheitlich für alle Artikeltypen,
deshalb wird nur noch eine Menueauswahl dazu angeboten