Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 5067d7bd

Von Martin Helmling martin.helmling@octosoft.eu vor mehr als 7 Jahren hinzugefügt

  • ID 5067d7bd31514962af9730b33323b831d87164f8
  • Vorgänger 351de256
  • Nachfolger 815c3639

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).

Unterschiede anzeigen:

SL/WH.pm
368 368
    push @filter_vars, like($filter{description});
369 369
  }
370 370

  
371
  if ($filter{classification_id}) {
372
    push @filter_ary, "p.classification_id = ?";
373
    push @filter_vars, $filter{classification_id};
374
  }
375

  
371 376
  if ($filter{chargenumber}) {
372 377
    push @filter_ary, "i1.chargenumber ILIKE ?";
373 378
    push @filter_vars, like($filter{chargenumber});
......
426 431
     "qty"                  => "ABS(SUM(i1.qty))",
427 432
     "partnumber"           => "p.partnumber",
428 433
     "partdescription"      => "p.description",
434
     "classification_id"    => "p.classification_id",
435
     "assembly"             => "p.assembly",
436
     "inventory_accno_id"   => "p.inventory_accno_id",
429 437
     "bindescription"       => "b.description",
430 438
     "chargenumber"         => "i1.chargenumber",
431 439
     "bestbefore"           => "i1.bestbefore",
......
457 465
     "warehouse_from"       => "'$filter{na}'",
458 466
     };
459 467

  
468
  $form->{l_classification_id}  = 'Y';
469
  $form->{l_assembly}           = 'Y';
470
  $form->{l_inventory_accno_id} = 'Y';
460 471
  $form->{l_invoice_id} = $form->{l_oe_id} if $form->{l_oe_id};
461 472

  
462 473
  # build the select clauses.
......
614 625
#  - warehouse_id - will return matches with this warehouse_id only
615 626
#  - partnumber   - will return only matches where the given string is a substring of the partnumber
616 627
#  - partsid      - will return matches with this parts_id only
628
#  - classification_id - will return matches with this parts with this classification only
617 629
#  - description  - will return only matches where the given string is a substring of the description
618 630
#  - chargenumber - will return only matches where the given string is a substring of the chargenumber
619 631
#  - bestbefore   - will return only matches with this bestbefore date
......
665 677
    push @filter_vars, like($filter{partnumber});
666 678
  }
667 679

  
680
  if ($filter{classification_id}) {
681
    push @filter_ary, "p.classification_id = ?";
682
    push @filter_vars, $filter{classification_id};
683
  }
684

  
668 685
  if ($filter{description}) {
669 686
    push @filter_ary,  "p.description ILIKE ?";
670 687
    push @filter_vars, like($filter{description});
......
737 754
     "warehouseid"          => "i.warehouse_id",
738 755
     "partnumber"           => "p.partnumber",
739 756
     "partdescription"      => "p.description",
757
     "classification_id"    => "p.classification_id",
758
     "assembly"             => "p.assembly",
759
     "inventory_accno_id"   => "p.inventory_accno_id",
740 760
     "bindescription"       => "b.description",
741 761
     "binid"                => "b.id",
742 762
     "chargenumber"         => "i.chargenumber",
......
747 767
     "partunit"             => "p.unit",
748 768
     "stock_value"          => "p.lastcost / COALESCE(pfac.factor, 1)",
749 769
  );
770
  $form->{l_classification_id}  = 'Y';
771
  $form->{l_assembly}           = 'Y';
772
  $form->{l_inventory_accno_id} = 'Y';
750 773
  my $select_clause = join ', ', map { +/^l_/; "$select_tokens{$'} AS $'" }
751 774
        ( grep( { !/qty/ and /^l_/ and $form->{$_} eq 'Y' } keys %$form),
752 775
          qw(l_parts_id l_qty l_partunit) );

Auch abrufbar als: Unified diff