]> wagnertech.de Git - kivitendo-erp.git/commitdiff
all_parts: Lagermenge des Artikels und benötigte Menge für Erz. anzeigen
authorJan Büren <jan@kivitendo.de>
Sun, 29 Aug 2021 12:45:43 +0000 (14:45 +0200)
committerJan Büren <jan@kivitendo.de>
Sun, 29 Aug 2021 12:45:43 +0000 (14:45 +0200)
Die benötigte Menge für das Erzeugnis wurde einfach in onhand gepackt.
Das verwirrt natürlich wenn man sowohl die Lagermenge als auch die
benötigte Menge fürs Erzeugen in dem Bericht ausgeben möchte.

SL/IC.pm
bin/mozilla/ic.pl
locale/de/all
locale/en/all

index f36ca04855b952fb96481f7002e756c0dc1ea840..da83c33b8ed18fc9ef1593b8f849ef140f4c4982 100644 (file)
--- a/SL/IC.pm
+++ b/SL/IC.pm
@@ -524,6 +524,8 @@ sub all_parts {
 
   # simple search for assemblies by items used in assemblies
   if ($form->{bom} eq '2' && $form->{l_assembly}) {
+    # assembly_qty is the column name
+    $form->{l_assembly_qty} = 1;
     # nuke where clause and bind vars
     $where_clause = ' 1=1 AND p.id in (SELECT id from assembly where parts_id IN ' .
                     ' (select id from parts where 1=1';
@@ -563,7 +565,7 @@ sub all_parts {
   my @assemblies;
   if ($form->{l_assembly} && $form->{bom}) {
     $query =
-      qq|SELECT p.id, p.partnumber, p.description, a.qty AS onhand,
+      qq|SELECT p.id, p.partnumber, p.description, a.qty AS assembly_qty,
            p.unit, p.notes, p.itime::DATE as insertdate,
            p.sellprice, p.listprice, p.lastcost,
            p.rop, p.weight,
index 450d124390c81240567b5e135ebf0bd012f1024a..f3e7fe5d43f4c5d20d9cfdc25df944b5c03697a8 100644 (file)
@@ -185,6 +185,7 @@ sub generate_report {
     'microfiche'         => { 'text' => $locale->text('Microfiche'), },
     'name'               => { 'text' => $locale->text('Name'), },
     'onhand'             => { 'text' => $locale->text('Stocked Qty'), },
+    'assembly_qty'       => { 'text' => $locale->text('Assembly Item Qty'), },
     'ordnumber'          => { 'text' => $locale->text('Order Number'), },
     'partnumber'         => { 'text' => $locale->text('Part Number'), },
     'partsgroup'         => { 'text' => $locale->text('Partsgroup'), },
@@ -268,6 +269,7 @@ sub generate_report {
     obsolete      => $locale->text('Obsolete'),
     orphaned      => $locale->text('Orphaned'),
     onhand        => $locale->text('On Hand'),
+    assembly_qty  => $locale->text('Assembly Item Qty'),
     short         => $locale->text('Short'),
     onorder       => $locale->text('On Order'),
     ordered       => $locale->text('Ordered'),
@@ -389,7 +391,7 @@ sub generate_report {
 
   my @columns = qw(
     partnumber type_and_classific description notes partsgroup warehouse bin
-    make model onhand rop soldtotal unit listprice
+    make model assembly_qty onhand rop soldtotal unit listprice
     linetotallistprice sellprice linetotalsellprice lastcost assembly_lastcost linetotallastcost
     priceupdate weight image drawing microfiche invnumber ordnumber quonumber
     transdate name serialnumber deliverydate ean projectnumber projectdescription
@@ -418,7 +420,7 @@ sub generate_report {
 
   %column_defs = (%column_defs, %column_defs_cvars, %column_defs_pricegroups);
   map { $column_defs{$_}->{visible} ||= $form->{"l_$_"} ? 1 : 0 } @columns;
-  map { $column_defs{$_}->{align}   = 'right' } qw(onhand sellprice listprice lastcost assembly_lastcost linetotalsellprice linetotallastcost linetotallistprice rop weight soldtotal shop), @pricegroup_columns;
+  map { $column_defs{$_}->{align}   = 'right' } qw(assembly_qty onhand sellprice listprice lastcost assembly_lastcost linetotalsellprice linetotallastcost linetotallistprice rop weight soldtotal shop), @pricegroup_columns;
 
   my @hidden_variables = (
     qw(l_subtotal l_linetotal searchitems itemstatus bom l_pricegroups insertdatefrom insertdateto),
index de43ef379a4687b2f7c9a294b98f67f7cf72c217..a7f3d648905ca409fb360449260fcf8159c217d2 100755 (executable)
@@ -351,6 +351,7 @@ $self->{texts} = {
   'Assemblies'                  => 'Erzeugnisse',
   'Assembly'                    => 'Erzeugnis',
   'Assembly (typeabbreviation)' => 'E',
+  'Assembly Item Qty'           => 'Menge für Erzeugnis',
   'Assembly Last Cost'          => 'Erzeugnis-Einkaufspreis',
   'Assembly Number missing!'    => 'Erzeugnisnummer fehlt!',
   'Assembly creation transfers services' => 'Erzeugnis fertigen berücksichtigt Dienstleistungen',
index d7dd2a191f9cce72ef8c17cd73408f491d745822..43bfd54fe1cc63c6f4291adcd68f131110339b9a 100644 (file)
@@ -351,6 +351,7 @@ $self->{texts} = {
   'Assemblies'                  => '',
   'Assembly'                    => '',
   'Assembly (typeabbreviation)' => 'A',
+  'Assembly Item Qty'           => '',
   'Assembly Last Cost'          => '',
   'Assembly Number missing!'    => '',
   'Assembly creation transfers services' => '',