From: Jan Büren Date: Sun, 29 Aug 2021 12:45:43 +0000 (+0200) Subject: all_parts: Lagermenge des Artikels und benötigte Menge für Erz. anzeigen X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~379 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=fafa0ca265777e2e7469fd2b7b73851565962c2f;p=kivitendo-erp.git all_parts: Lagermenge des Artikels und benötigte Menge für Erz. anzeigen 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. --- 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' => '',