$row->{outcorrection}->{data} - $row->{incorrection}->{data};
$row->{averconsumed}->{data} = $row->{consumed}->{data}*30/$days ;
map { $row->{$_}->{data} = $form->format_amount($myconfig,$row->{$_}->{data},2); } $self->getnumcolumns();
- $row->{partnumber}->{link} = 'controller.pl?action=Part/edit&part.id' . $partid;
+ $row->{partnumber}->{link} = 'controller.pl?action=Part/edit&part.id=' . $partid;
}
sub action_stock {
stocktaking_cutoff_date => $::form->{cutoff_date_as_date},
});
1;
- } or do { $transfer_error = $EVAL_ERROR->error; }
+ } or do { $transfer_error = ref($EVAL_ERROR) eq 'SL::X::FormError' ? $EVAL_ERROR->error : $EVAL_ERROR; }
});
return $self->js->flash('error', $transfer_error)->render()
my ($self) = @_;
$self->warehouse($self->warehouses->[0]) if !$self->warehouse || !$self->warehouse->id;
- $self->bin ($self->warehouse->bins->[0]) if !$self->bin || !$self->bin->id;
+ $self->bin ($self->warehouse->bins_sorted_naturally->[0]) if !$self->bin || !$self->bin->id;
# foreach my $warehouse ( $self->warehouses ) {
# $warehouse->{BINS} = [];
# foreach my $bin ( $self->bins ) {
}
sub build_bin_select {
- select_tag('bin_id', [ $_[0]->warehouse->bins ],
+ select_tag('bin_id', $_[0]->warehouse->bins_sorted_naturally,
title_key => 'description',
default => $_[0]->bin->id,
);
from last_inventories
group by trans_id
order by max(itime)
- desc limit 10
+ desc limit 20
)
select unnest(ids)
from grouped_ids
my $callback = $self->stocktaking_models->get_callback;
- my $report = SL::ReportGenerator->new(\%::myconfig, $::form);
- $self->{report} = $report;
+ my $report = SL::ReportGenerator->new(\%::myconfig, $::form);
+ $report->{title} = t8('Stocktaking Journal');
+ $self->{report} = $report;
my @columns = qw(itime employee ean partnumber part qty unit bin chargenumber comment cutoff_date);
my @sortable = qw(itime employee ean partnumber part qty bin chargenumber comment cutoff_date);