From fafa0ca265777e2e7469fd2b7b73851565962c2f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Sun, 29 Aug 2021 14:45:43 +0200 Subject: [PATCH] =?utf8?q?all=5Fparts:=20Lagermenge=20des=20Artikels=20und?= =?utf8?q?=20ben=C3=B6tigte=20Menge=20f=C3=BCr=20Erz.=20anzeigen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 | 4 +++- bin/mozilla/ic.pl | 6 ++++-- locale/de/all | 1 + locale/en/all | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/SL/IC.pm b/SL/IC.pm index f36ca0485..da83c33b8 100644 --- 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, diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index 450d12439..f3e7fe5d4 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -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), diff --git a/locale/de/all b/locale/de/all index de43ef379..a7f3d6489 100755 --- a/locale/de/all +++ b/locale/de/all @@ -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', diff --git a/locale/en/all b/locale/en/all index d7dd2a191..43bfd54fe 100644 --- a/locale/en/all +++ b/locale/en/all @@ -351,6 +351,7 @@ $self->{texts} = { 'Assemblies' => '', 'Assembly' => '', 'Assembly (typeabbreviation)' => 'A', + 'Assembly Item Qty' => '', 'Assembly Last Cost' => '', 'Assembly Number missing!' => '', 'Assembly creation transfers services' => '', -- 2.20.1