X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fic.pl;h=f3e7fe5d43f4c5d20d9cfdc25df944b5c03697a8;hb=a9d9ca02abd3a0ff1e43f23888142266174bec55;hp=f00ce087378d4117c3b3f7070dfb5b1d9fa0d82b;hpb=d919a7dcc958edf6c7cd2546690347ea9c157f6e;p=kivitendo-erp.git diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index f00ce0873..f3e7fe5d4 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -185,10 +185,11 @@ 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'), }, - 'priceupdate' => { 'text' => $locale->text('Updated'), }, + 'priceupdate' => { 'text' => $locale->text('Price updated'), }, 'quonumber' => { 'text' => $locale->text('Quotation'), }, 'rop' => { 'text' => $locale->text('ROP'), }, 'sellprice' => { 'text' => $locale->text('Sell Price'), }, @@ -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), @@ -435,7 +437,7 @@ sub generate_report { my $callback = build_std_url('action=generate_report', grep { $form->{$_} } @hidden_variables); my @sort_full = qw(partnumber description onhand soldtotal deliverydate insertdate shop); - my @sort_no_revers = qw(partsgroup priceupdate invnumber ordnumber quonumber name image drawing serialnumber); + my @sort_no_revers = qw(partsgroup invnumber ordnumber quonumber name image drawing serialnumber); foreach my $col (@sort_full) { $column_defs{$col}->{link} = join '&', $callback, "sort=$col", map { "$_=" . E($form->{$_}) } qw(revers lastsort); @@ -582,6 +584,9 @@ sub generate_report { $row->{type_and_classific}{data} = SL::Presenter::Part::type_abbreviation($ref->{part_type}). SL::Presenter::Part::classification_abbreviation($ref->{classification_id}); + # last price update + $row->{priceupdate}{data} = SL::DB::Part->new(id => $ref->{id})->load->last_price_update->valid_from->to_kivitendo; + $report->add_data($row); my $next_ref = $form->{parts}[$idx + 1];