Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3ea4e13e

Von Bernd Bleßmann vor 4 Monaten hinzugefügt

  • ID 3ea4e13e1fb77c4eda01edb009eb4c4eeafd4309
  • Vorgänger 21437d97
  • Nachfolger a9ebf4e6

Zwischeninventur: Bericht Zählungen: Status des Abgleichs anzeigen

Unterschiede anzeigen:

SL/Controller/StockCounting.pm
115 115
      if (!$grouped_objects_by->{$object->counting_id}->{$object->part_id}->{$object->bin_id}) {
116 116
        $group_object = SL::DB::StockCountingItem->new(
117 117
          counting => $object->counting, part => $object->part, bin => $object->bin, qty => 0);
118
        $group_object->{reconciliated} = 1;
118 119
        push @grouped_objects, $group_object;
119 120
        $grouped_objects_by->{$object->counting_id}->{$object->part_id}->{$object->bin_id} = $group_object;
120 121

  
......
124 125

  
125 126
      $group_object->id($group_object->id ? ($group_object->id . ',' . $object->id) : $object->id);
126 127
      $group_object->qty($group_object->qty + $object->qty);
128
      $group_object->{reconciliated} &&= !!$object->correction_inventory_id;
127 129
    }
128 130

  
129 131
    $objects = \@grouped_objects;
132

  
133
  } else {
134
    $_->{reconciliated} = !!$_->correction_inventory_id for @$objects;
130 135
  }
131 136

  
132 137
  $self->get_stocked($objects);
......
166 171
  my $report      = SL::ReportGenerator->new(\%::myconfig, $::form);
167 172
  $self->{report} = $report;
168 173

  
169
  my @columns = $::form->{group_counting_items} ? qw(counting part bin qty stocked)
170
              : qw(counting counted_at part bin qty stocked employee);
174
  my @columns = $::form->{group_counting_items} ? qw(counting part bin qty stocked reconciliated)
175
              : qw(counting counted_at part bin qty stocked employee reconciliated);
171 176

  
172 177
  my %column_defs = (
173 178
    counting   => { text => t8('Stock Counting'), sub => sub { $_[0]->counting->name }, },
......
177 182
    bin        => { text => t8('Bin'),            sub => sub { $_[0]->bin->full_description } },
178 183
    employee   => { text => t8('Employee'),       sub => sub { $_[0]->employee ? $_[0]->employee->safe_name : '---'} },
179 184
    stocked    => { text => t8('Stocked Qty'),    sub => sub { _format_total($_[0]->{stocked}) }, align => 'right'},
185
    reconciliated => { text => t8('Reconciliated'), sub => sub { $_[0]->{reconciliated} ? t8('Yes') : t8('No') }, align => 'right'},
180 186
  );
181 187

  
182 188
  # remove columns from defs which are not in @columns

Auch abrufbar als: Unified diff