Revision 16c66f61
Von Jan Büren vor mehr als 15 Jahren hinzugefügt
SL/Common.pm | ||
---|---|---|
51 | 51 |
|
52 | 52 |
my (@filter_values, $filter); |
53 | 53 |
|
54 |
foreach (qw(partnumber description)) { |
|
54 |
foreach (qw(partnumber description ean)) {
|
|
55 | 55 |
next unless $form->{$_}; |
56 | 56 |
|
57 | 57 |
$filter .= qq| AND ($_ ILIKE ?)|; |
... | ... | |
62 | 62 |
$filter .= qq| AND (NOT COALESCE(assembly, FALSE))|; |
63 | 63 |
} |
64 | 64 |
if ($form->{assemblies}) { |
65 |
$filter .= qq| AND assembly=TRUE|; # alles was assembly ist rausgeben erweiterung f?r bin/mozilla/wh.pl -> transfer_assembly_update_part |
|
66 |
# eigentlich m?chte ich diesen filter abbilden: |
|
67 |
# select distinct partnumber from parts inner join assembly on (parts.id = assembly.id) where assembly='t'; |
|
68 |
# und so common ist die anweisung gar nicht. wie w?re es mit auslagern in WH.pm? -> get_all_working_assemblies? jb 21.2.2009 |
|
65 |
$filter .= qq| AND assembly=TRUE|; |
|
69 | 66 |
} |
70 | 67 |
|
71 | 68 |
if ($form->{no_services}) { |
... | ... | |
78 | 75 |
$order_dir = $order_dir ? "ASC" : "DESC"; |
79 | 76 |
|
80 | 77 |
my $query = |
81 |
qq|SELECT id, partnumber, description | . |
|
78 |
qq|SELECT id, partnumber, description, ean | .
|
|
82 | 79 |
qq|FROM parts $filter | . |
83 | 80 |
qq|ORDER BY $order_by $order_dir|; |
84 | 81 |
my $sth = $dbh->prepare($query); |
bin/mozilla/wh.pl | ||
---|---|---|
281 | 281 |
$form->{trans_type} = 'stock'; |
282 | 282 |
$form->{qty} = $form->parse_amount(\%myconfig, $form->{qty}); |
283 | 283 |
|
284 |
if (!$form->{partnumber} && !$form->{description}) { |
|
285 |
delete @{$form}{qw(parts_id partunit)}; |
|
284 |
if (!$form->{partnumber} && !$form->{description} && !$form->{ean}) {
|
|
285 |
delete @{$form}{qw(parts_id partunit ean)};
|
|
286 | 286 |
transfer_warehouse_selection(); |
287 | 287 |
|
288 |
} elsif (($form->{partnumber} && ($form->{partnumber} ne $form->{old_partnumber})) || $form->{description}) { |
|
288 |
} elsif (($form->{partnumber} && ($form->{partnumber} ne $form->{old_partnumber})) || $form->{description} || $form->{ean}) {
|
|
289 | 289 |
|
290 | 290 |
$form->{no_services} = 1; |
291 | 291 |
$form->{no_assemblies} = 0; # assemblies duerfen eingelagert werden (z.B. bei retouren) |
... | ... | |
293 | 293 |
my $parts = Common->retrieve_parts(\%myconfig, $form, 'description', 1); |
294 | 294 |
|
295 | 295 |
if (scalar @{ $parts } == 1) { |
296 |
@{$form}{qw(parts_id partnumber description)} = @{$parts->[0]}{qw(id partnumber description)};
|
|
296 |
@{$form}{qw(parts_id partnumber description ean)} = @{$parts->[0]}{qw(id partnumber description ean)};
|
|
297 | 297 |
transfer_stock_get_partunit(); |
298 | 298 |
transfer_warehouse_selection(); |
299 | 299 |
|
... | ... | |
353 | 353 |
|
354 | 354 |
my $part = shift; |
355 | 355 |
|
356 |
@{$form}{qw(parts_id partnumber description)} = @{$part}{qw(id partnumber description)};
|
|
356 |
@{$form}{qw(parts_id partnumber description ean)} = @{$part}{qw(id partnumber description ean)};
|
|
357 | 357 |
|
358 | 358 |
transfer_stock_get_partunit(); |
359 | 359 |
transfer_warehouse_selection(); |
templates/webpages/generic/select_part_de.html | ||
---|---|---|
20 | 20 |
[% IF has_charge %] |
21 | 21 |
<th class="listheading">Chargennummer</th> |
22 | 22 |
[% END %] |
23 |
[% IF has_ean %] |
|
24 |
<th class="listheading">EAN</th> |
|
25 |
[% END %] |
|
23 | 26 |
</tr> |
24 | 27 |
|
25 | 28 |
[% FOREACH part = PARTS %] |
... | ... | |
46 | 49 |
[% HTML.escape(part.chargenumber) %] |
47 | 50 |
</td> |
48 | 51 |
[% END %] |
52 |
[% IF has_ean %] |
|
53 |
<td> |
|
54 |
<input type="hidden" name="new_ean_[% loop.count %]" value="[% HTML.escape(part.ean) %]"> |
|
55 |
[% HTML.escape(part.ean) %] |
|
56 |
[% END %] |
|
57 |
</td> |
|
49 | 58 |
</tr> |
50 | 59 |
[% END %] |
51 | 60 |
</table> |
templates/webpages/generic/select_part_master.html | ||
---|---|---|
20 | 20 |
[% IF has_charge %] |
21 | 21 |
<th class="listheading"><translate>Charge number</translate></th> |
22 | 22 |
[% END %] |
23 |
[% IF has_ean %] |
|
24 |
<th class="listheading"><translate>EAN</translate></th> |
|
25 |
[% END %] |
|
23 | 26 |
</tr> |
24 | 27 |
|
25 | 28 |
[% FOREACH part = PARTS %] |
... | ... | |
46 | 49 |
[% HTML.escape(part.chargenumber) %] |
47 | 50 |
</td> |
48 | 51 |
[% END %] |
52 |
[% IF has_ean %] |
|
53 |
<td> |
|
54 |
<input type="hidden" name="new_ean_[% loop.count %]" value="[% HTML.escape(part.ean) %]"> |
|
55 |
[% HTML.escape(part.ean) %] |
|
56 |
[% END %] |
|
57 |
</td> |
|
49 | 58 |
</tr> |
50 | 59 |
[% END %] |
51 | 60 |
</table> |
templates/webpages/wh/warehouse_selection_stock_de.html | ||
---|---|---|
104 | 104 |
<th align="right" nowrap>Chargennummer</th> |
105 | 105 |
<td><input name="chargenumber" size="30" value="[% HTML.escape(chargenumber) %]"></td> |
106 | 106 |
</tr> |
107 |
<tr> |
|
108 |
<th align="right" nowrap>EAN</th> |
|
109 |
<td><input name="ean" size="30" value="[% HTML.escape(ean) %]"></td> |
|
110 |
</tr> |
|
107 | 111 |
|
108 | 112 |
<tr> |
109 | 113 |
<th align="right" nowrap>Menge</th> |
templates/webpages/wh/warehouse_selection_stock_master.html | ||
---|---|---|
104 | 104 |
<th align="right" nowrap><translate>Charge number</translate></th> |
105 | 105 |
<td><input name="chargenumber" size="30" value="[% HTML.escape(chargenumber) %]"></td> |
106 | 106 |
</tr> |
107 |
<tr> |
|
108 |
<th align="right" nowrap><translate>EAN</translate></th> |
|
109 |
<td><input name="ean" size="30" value="[% HTML.escape(ean) %]"></td> |
|
110 |
</tr> |
|
107 | 111 |
|
108 | 112 |
<tr> |
109 | 113 |
<th align="right" nowrap><translate>Quantity</translate></th> |
Auch abrufbar als: Unified diff
Bugzilla Eintrag 856 EAN auch fuers Einlagern ... Teil II von III