Revision 4bbf708c
Von Jan Büren vor mehr als 15 Jahren hinzugefügt
SL/CT.pm | ||
---|---|---|
123 | 123 |
} |
124 | 124 |
|
125 | 125 |
# check if it is orphaned |
126 |
my $arap = ( $form->{db} eq 'customer' ) ? "ar" : "ap"; |
|
126 |
my $arap = ( $form->{db} eq 'customer' ) ? "ar" : "ap"; |
|
127 |
my $num_args = 2; |
|
128 |
my $makemodel = ''; |
|
129 |
if ($form->{db} eq 'vendor') { |
|
130 |
$makemodel = qq| UNION SELECT mm.make FROM makemodel mm WHERE mm.make = ?|; |
|
131 |
$num_args++; |
|
132 |
} |
|
133 |
|
|
127 | 134 |
$query = |
128 | 135 |
qq|SELECT a.id | . |
129 | 136 |
qq|FROM $arap a | . |
... | ... | |
133 | 140 |
qq|SELECT a.id | . |
134 | 141 |
qq|FROM oe a | . |
135 | 142 |
qq|JOIN $cv ct ON (a.${cv}_id = ct.id) | . |
136 |
qq|WHERE ct.id = ?|; |
|
137 |
my ($dummy) = selectrow_query($form, $dbh, $query, $form->{id}, $form->{id}); |
|
143 |
qq|WHERE ct.id = ?| |
|
144 |
. $makemodel; |
|
145 |
my ($dummy) = selectrow_query($form, $dbh, $query, (conv_i($form->{id})) x $num_args); |
|
146 |
|
|
138 | 147 |
$form->{status} = "orphaned" unless ($dummy); |
139 | 148 |
|
140 | 149 |
$dbh->disconnect; |
SL/IC.pm | ||
---|---|---|
491 | 491 |
unless ($form->{item} eq 'service') { |
492 | 492 |
for my $i (1 .. $form->{makemodel_rows}) { |
493 | 493 |
if (($form->{"make_$i"}) || ($form->{"model_$i"})) { |
494 |
map { $form->{"${_}_$i"} =~ s/\'/\'\'/g } qw(make model); |
|
495 | 494 |
|
496 | 495 |
$query = qq|INSERT INTO makemodel (parts_id, make, model) | . |
497 | 496 |
qq|VALUES (?, ?, ?)|; |
498 |
@values = (conv_i($form->{id}), $form->{"make_$i"}, $form->{"model_$i"}); |
|
497 |
@values = (conv_i($form->{id}), conv_i($form->{"make_$i"}), $form->{"model_$i"}); |
|
498 |
|
|
499 | 499 |
do_query($form, $dbh, $query, @values); |
500 | 500 |
} |
501 | 501 |
} |
... | ... | |
1818 | 1818 |
} |
1819 | 1819 |
|
1820 | 1820 |
my $placeholders = join ', ', ('?') x scalar(@part_ids); |
1821 |
my $query = qq|SELECT parts_id, make, model |
|
1822 |
FROM makemodel |
|
1823 |
WHERE parts_id IN ($placeholders)|; |
|
1821 |
my $query = qq|SELECT mm.parts_id, mm.model, v.name AS make |
|
1822 |
FROM makemodel mm |
|
1823 |
LEFT JOIN vendor v ON (mm.make = v.id) |
|
1824 |
WHERE mm.parts_id IN ($placeholders)|; |
|
1825 |
|
|
1824 | 1826 |
my %makemodel = (); |
1825 | 1827 |
|
1826 | 1828 |
my $sth = prepare_execute_query($form, $dbh, $query, @part_ids); |
bin/mozilla/ic.pl | ||
---|---|---|
1464 | 1464 |
map { $form->{$_} =~ s/"/"/g; } qw(unit); |
1465 | 1465 |
|
1466 | 1466 |
$form->get_lists('price_factors' => 'ALL_PRICE_FACTORS', |
1467 |
'partsgroup' => 'all_partsgroup'); |
|
1467 |
'partsgroup' => 'all_partsgroup', |
|
1468 |
'vendors' => 'ALL_VENDORS',); |
|
1469 |
|
|
1468 | 1470 |
|
1469 | 1471 |
IC->retrieve_buchungsgruppen(\%myconfig, $form); |
1470 | 1472 |
@{ $form->{BUCHUNGSGRUPPEN} } = grep { $_->{id} eq $form->{buchungsgruppen_id} || ($form->{id} && $form->{orphaned}) || !$form->{id} } @{ $form->{BUCHUNGSGRUPPEN} }; |
... | ... | |
1478 | 1480 |
$form->{fokus} = "ic.partnumber"; |
1479 | 1481 |
|
1480 | 1482 |
$form->header; |
1481 |
print $form->parse_html_template('ic/form_header', { ALL_PRICE_FACTORS => $form->{ALL_PRICE_FACTORS}, |
|
1482 |
ALL_UNITS => $form->{ALL_UNITS}, |
|
1483 |
BUCHUNGSGRUPPEN => $form->{BUCHUNGSGRUPPEN}, |
|
1484 |
payment_terms => $form->{payment_terms}, |
|
1485 |
all_partsgroup => $form->{all_partsgroup}}); |
|
1483 |
#print $form->parse_html_template('ic/form_header', { ALL_PRICE_FACTORS => $form->{ALL_PRICE_FACTORS}, |
|
1484 |
# ALL_UNITS => $form->{ALL_UNITS}, |
|
1485 |
# BUCHUNGSGRUPPEN => $form->{BUCHUNGSGRUPPEN}, |
|
1486 |
# payment_terms => $form->{payment_terms}, |
|
1487 |
# all_partsgroup => $form->{all_partsgroup}}); |
|
1488 |
print $form->parse_html_template('ic/form_header'); |
|
1486 | 1489 |
$lxdebug->leave_sub(); |
1487 | 1490 |
} |
1488 | 1491 |
|
... | ... | |
1501 | 1504 |
my ($numrows) = @_; |
1502 | 1505 |
|
1503 | 1506 |
my @mm_data = grep { any { $_ ne '' } @$_{qw(make model)} } map +{ make => $form->{"make_$_"}, model => $form->{"model_$_"} }, 1 .. $numrows; |
1507 |
delete @{$form}{grep { m/^make_\d+/ || m/^model_\d+/ } keys %{ $form }}; |
|
1504 | 1508 |
print $form->parse_html_template('ic/makemodel', { MM_DATA => [ @mm_data, {} ], mm_rows => scalar @mm_data + 1 }); |
1505 | 1509 |
|
1506 | 1510 |
$lxdebug->leave_sub(); |
locale/de/all | ||
---|---|---|
916 | 916 |
'MAILED' => 'Gesendet', |
917 | 917 |
'MSG_BROWSER_DOES_NOT_SUPPORT_IFRAMES' => 'Ihr Browser kann leider keine eingebetteten Frames anzeigen. Bitte wählen Sie ein anderes Menü in der Benutzerkonfiguration im Administrationsmenü aus.', |
918 | 918 |
'Main Preferences' => 'Grundeinstellungen', |
919 |
'Make' => 'Hersteller',
|
|
919 |
'Make' => 'Lieferant',
|
|
920 | 920 |
'Manage license keys' => 'Lizenzschlüssel verwalten', |
921 | 921 |
'Mandantennummer' => 'Mandantennummer', |
922 | 922 |
'Mar' => 'M?rz', |
... | ... | |
948 | 948 |
'Mitarbeiter' => 'Mitarbeiter', |
949 | 949 |
'Mobile1' => 'Mobile 1', |
950 | 950 |
'Mobile2' => 'Mobile 2', |
951 |
'Model' => 'Modell',
|
|
951 |
'Model' => 'Lieferanten-Art-Nr.',
|
|
952 | 952 |
'Module home page' => 'Modul-Webseite', |
953 | 953 |
'Module name' => 'Modulname', |
954 | 954 |
'Monat' => 'Monat', |
templates/webpages/ic/makemodel_de.html | ||
---|---|---|
2 | 2 |
[%- USE LxERP %] |
3 | 3 |
<tr> |
4 | 4 |
<td> |
5 |
<table width=100%>
|
|
5 |
<table> |
|
6 | 6 |
<tr> |
7 |
<th class="listheading">Hersteller</th>
|
|
8 |
<th class="listheading">Modell</th>
|
|
7 |
<th class="listheading">Lieferant</th>
|
|
8 |
<th class="listheading">Lieferanten-Art-Nr.</th>
|
|
9 | 9 |
</tr> |
10 | 10 |
[%- FOREACH row = MM_DATA %] |
11 | 11 |
<tr> |
12 |
<td width=50%><input name="make_[% loop.count %]" size=30 value="[% HTML.escape(row.make) %]"></td> |
|
13 |
<td width=50%><input name="model_[% loop.count %]" size=30 value="[% HTML.escape(row.model) %]"></td> |
|
12 |
<td> |
|
13 |
[%- INCLUDE generic/multibox.html |
|
14 |
name = "make_$loop.count", |
|
15 |
default = row.make, |
|
16 |
DATA = ALL_VENDORS, |
|
17 |
show_empty = 1, |
|
18 |
label_key = 'name', |
|
19 |
id_key = 'id', |
|
20 |
-%] |
|
21 |
</td> |
|
22 |
<td><input name="model_[% loop.count %]" size="30" value="[% HTML.escape(row.model) %]"></td> |
|
14 | 23 |
</tr> |
15 | 24 |
[%- END %] |
16 | 25 |
</table> |
17 | 26 |
</td> |
18 | 27 |
</tr> |
19 |
<input type=hidden name=makemodel_rows value=[% mm_rows %]> |
|
28 |
<input type="hidden" name="makemodel_rows" value="[% mm_rows %]"> |
templates/webpages/ic/makemodel_master.html | ||
---|---|---|
2 | 2 |
[%- USE LxERP %] |
3 | 3 |
<tr> |
4 | 4 |
<td> |
5 |
<table width=100%>
|
|
5 |
<table> |
|
6 | 6 |
<tr> |
7 | 7 |
<th class="listheading"><translate>Make</translate></th> |
8 | 8 |
<th class="listheading"><translate>Model</translate></th> |
9 | 9 |
</tr> |
10 | 10 |
[%- FOREACH row = MM_DATA %] |
11 | 11 |
<tr> |
12 |
<td width=50%><input name="make_[% loop.count %]" size=30 value="[% HTML.escape(row.make) %]"></td> |
|
13 |
<td width=50%><input name="model_[% loop.count %]" size=30 value="[% HTML.escape(row.model) %]"></td> |
|
12 |
<td> |
|
13 |
[%- INCLUDE generic/multibox.html |
|
14 |
name = "make_$loop.count", |
|
15 |
default = row.make, |
|
16 |
DATA = ALL_VENDORS, |
|
17 |
show_empty = 1, |
|
18 |
label_key = 'name', |
|
19 |
id_key = 'id', |
|
20 |
-%] |
|
21 |
</td> |
|
22 |
<td><input name="model_[% loop.count %]" size="30" value="[% HTML.escape(row.model) %]"></td> |
|
14 | 23 |
</tr> |
15 | 24 |
[%- END %] |
16 | 25 |
</table> |
17 | 26 |
</td> |
18 | 27 |
</tr> |
19 |
<input type=hidden name=makemodel_rows value=[% mm_rows %]> |
|
28 |
<input type="hidden" name="makemodel_rows" value="[% mm_rows %]"> |
Auch abrufbar als: Unified diff
Backport von Revision 7581 von XPlace. Hintergrund: Hersteller und Modell sind derzeit Freitextfelder, in der Regel möchte man Lieferanten und die entsprechenden Lieferanten-Art.-Nr. abbilden. Am liebsten noch mit Lieferanten-Art-Preis. Dazu vielleicht nach der 2.6 mehr