Revision 5067d7bd
Von Martin Helmling martin.helmling@octosoft.eu vor mehr als 7 Jahren hinzugefügt
SL/IS.pm | ||
---|---|---|
2003 | 2003 |
i.project_id, i.serialnumber, i.pricegroup_id, i.ordnumber, i.donumber, i.transdate, i.cusordnumber, i.subtotal, i.lastcost, |
2004 | 2004 |
i.price_factor_id, i.price_factor, i.marge_price_factor, i.active_price_source, i.active_discount_source, |
2005 | 2005 |
p.partnumber, p.part_type, p.notes AS partnotes, p.formel, p.listprice, |
2006 |
p.classification_id, |
|
2006 | 2007 |
pr.projectnumber, pg.partsgroup, prg.pricegroup |
2007 | 2008 |
|
2008 | 2009 |
FROM invoice i |
... | ... | |
2300 | 2301 |
p.id, p.partnumber, p.description, p.sellprice, |
2301 | 2302 |
p.listprice, p.part_type, p.lastcost, |
2302 | 2303 |
p.ean, p.notes, |
2304 |
p.classification_id, |
|
2303 | 2305 |
|
2304 | 2306 |
c1.accno AS inventory_accno, |
2305 | 2307 |
c1.new_chart_id AS inventory_new_chart, |
... | ... | |
2319 | 2321 |
p.price_factor_id, p.weight, |
2320 | 2322 |
|
2321 | 2323 |
pfac.factor AS price_factor, |
2322 |
|
|
2324 |
pt.used_for_sale AS used_for_sale, |
|
2323 | 2325 |
pg.partsgroup |
2324 | 2326 |
|
2325 | 2327 |
FROM parts p |
... | ... | |
2336 | 2338 |
FROM taxzone_charts tc |
2337 | 2339 |
WHERE tc.buchungsgruppen_id = p.buchungsgruppen_id and tc.taxzone_id = ${taxzone_id}) = c3.id) |
2338 | 2340 |
LEFT JOIN partsgroup pg ON (pg.id = p.partsgroup_id) |
2341 |
LEFT JOIN parts_classifications pt ON (pt.id = p.classification_id) |
|
2339 | 2342 |
LEFT JOIN price_factors pfac ON (pfac.id = p.price_factor_id) |
2340 | 2343 |
WHERE $where|; |
2341 | 2344 |
my $sth = prepare_execute_query($form, $dbh, $query, @values); |
... | ... | |
2353 | 2356 |
LIMIT 1| ] ); |
2354 | 2357 |
map { push @{ $_ }, prepare_query($form, $dbh, $_->[0]) } @translation_queries; |
2355 | 2358 |
|
2359 |
my $has_wrong_pclass = 0; |
|
2356 | 2360 |
while (my $ref = $sth->fetchrow_hashref('NAME_lc')) { |
2357 | 2361 |
|
2358 | 2362 |
if ($mm_by_id{$ref->{id}}) { |
... | ... | |
2364 | 2368 |
push @{ $ref->{matches} ||= [] }, $::locale->text('EAN') . ': ' . $ref->{ean}; |
2365 | 2369 |
} |
2366 | 2370 |
|
2371 |
$ref->{type_and_classific} = $::request->presenter->type_abbreviation($ref->{part_type}). |
|
2372 |
$::request->presenter->classification_abbreviation($ref->{classification_id}); |
|
2373 |
if (! $ref->{used_for_sale} ) { |
|
2374 |
$has_wrong_pclass = 1; |
|
2375 |
next; |
|
2376 |
} |
|
2367 | 2377 |
# In der Buchungsgruppe ist immer ein Bestandskonto verknuepft, auch wenn |
2368 | 2378 |
# es sich um eine Dienstleistung handelt. Bei Dienstleistungen muss das |
2369 | 2379 |
# Buchungskonto also aus dem Ergebnis rausgenommen werden. |
... | ... | |
2447 | 2457 |
$sth->finish; |
2448 | 2458 |
$_->[1]->finish for @translation_queries; |
2449 | 2459 |
|
2460 |
$form->{is_wrong_pclass} = $has_wrong_pclass; |
|
2450 | 2461 |
foreach my $item (@{ $form->{item_list} }) { |
2451 | 2462 |
my $custom_variables = CVar->get_custom_variables(module => 'IC', |
2452 | 2463 |
trans_id => $item->{id}, |
2453 | 2464 |
dbh => $dbh, |
2454 | 2465 |
); |
2455 |
|
|
2466 |
$form->{is_wrong_pclass} = 0; # one correct type |
|
2456 | 2467 |
map { $item->{"ic_cvar_" . $_->{name} } = $_->{value} } @{ $custom_variables }; |
2457 | 2468 |
} |
2458 |
|
|
2459 | 2469 |
$main::lxdebug->leave_sub(); |
2460 | 2470 |
} |
2461 | 2471 |
|
Auch abrufbar als: Unified diff
Artikel-Klassifizierung
Die ursprünglich als "Artikeltyp" bezeichnete Klassifizierung von Artikeln
Sie dient einer weiteren Gliederung um zum Beispiel den Einkauf vom Verkauf zu trennen, etc.
Gekennzeichnet durch eine Beschreibung (z.B. "Einkauf") und ein Kürzel (z.B. "E")
Flexibel änderbar und erweiterbar.
- Neue Datenbanktablle und Rose-Objekte, sowie Controller zum Bearbeiten der Tabelle
- Zwei-Zeichen Abkürzung:
Der Typ des Artikel und die Klassifizierung werden durch zwei Buchstaben dargestellt.
Der erste Buchstabe ist eine Lokalisierung des Typs des Artikel ('P','A','S') ,
deutch 'W', 'E', und 'D' für Ware Erzeugnis oder Dienstleistung, ggf. weitere Typen.
Der zweite Buchstabe ist eine Lokalisierung der Klassifizierungsabkürzung (abbreviation).
Die Abkürzungen sind aus dem Part Presenter abholbar:
- SL::Presenter::Part->type_abbreviation($part_type)
- SL::Presenter::Part->classification_abbreviation($classification_id)
Wenn im ERP-Dokument nach einer Artikelnummer oder Beschreibung gesucht wird,
diese in den Stammdaten vorhanden ist,
aber der Artikeltyp leer oder falsch ist, bzw im Typ for_purchase bzw for_sale nicht gesetzt ist,
wird die Fehlermeldung "Gesuchter Artikel ist nicht für den Einkauf bzw Verkauf" gemeldet
Anpassung des CSV Import,
nun wird alternativ zur 'type'-Spalte die 'pclass'-Spalte mit zwei Buchstaben geparsed und entsprechend
classification_id,assembly sowie inventory_accno_id gesetzt (oder type_id falls neue Implementierung eingebaut).