593 |
593 |
}
|
594 |
594 |
# /filter stuff
|
595 |
595 |
|
596 |
|
my $allrows = 0;
|
597 |
|
$allrows = 1 if $form->{report_generator_output_format} ne 'HTML' ;
|
|
596 |
my $allrows = !!($form->{report_generator_output_format} ne 'HTML') ;
|
598 |
597 |
|
599 |
598 |
# manual paginating
|
600 |
|
my $pages = {};
|
601 |
|
my $page = $::form->{page} || 1;
|
602 |
|
$pages->{per_page} = $::form->{per_page} || 15;
|
603 |
|
my $first_nr = ($page - 1) * $pages->{per_page};
|
604 |
|
my $last_nr = $first_nr + $pages->{per_page};
|
|
599 |
my $pages = {};
|
|
600 |
my $page = $::form->{page} || 1;
|
|
601 |
$pages->{per_page} = $::form->{per_page} || 15;
|
|
602 |
my $first_nr = ($page - 1) * $pages->{per_page};
|
|
603 |
my $last_nr = $first_nr + $pages->{per_page};
|
605 |
604 |
|
606 |
605 |
# no optimisation if qty op
|
607 |
606 |
if ( !$allrows && $form->{maxrows} && !$filter{qty_op}) {
|
608 |
607 |
$filter{limit} = $pages->{per_page};
|
609 |
608 |
$filter{offset} = ($page - 1) * $pages->{per_page};
|
610 |
|
$first_nr = 0;
|
611 |
|
$last_nr = $pages->{per_page};
|
|
609 |
$first_nr = 0;
|
|
610 |
$last_nr = $pages->{per_page};
|
612 |
611 |
}
|
613 |
612 |
|
614 |
613 |
my @contents = WH->get_warehouse_journal(%filter);
|
... | ... | |
696 |
695 |
$entry->{type_and_classific} = $::request->presenter->type_abbreviation($entry->{part_type}).
|
697 |
696 |
$::request->presenter->classification_abbreviation($entry->{classification_id});
|
698 |
697 |
$entry->{qty} = $form->format_amount(\%myconfig, $entry->{qty});
|
699 |
|
# $entry->{qty} = $form->format_amount_units('amount' => $entry->{qty},
|
700 |
|
# 'part_unit' => $entry->{partunit},
|
701 |
|
# 'conv_units' => 'convertible');
|
702 |
698 |
$entry->{trans_type} = $locale->text($entry->{trans_type});
|
703 |
699 |
|
704 |
700 |
my $row = { };
|
... | ... | |
828 |
824 |
$form->{report_generator_output_format} = 'HTML' if !$form->{report_generator_output_format};
|
829 |
825 |
|
830 |
826 |
# manual paginating
|
831 |
|
my $allrows = 0;
|
832 |
|
$allrows = 1 if $form->{report_generator_output_format} ne 'HTML' ;
|
833 |
|
my $page = $::form->{page} || 1;
|
834 |
|
my $pages = {};
|
835 |
|
$pages->{per_page} = $::form->{per_page} || 20;
|
836 |
|
my $first_nr = ($page - 1) * $pages->{per_page};
|
837 |
|
my $last_nr = $first_nr + $pages->{per_page};
|
|
827 |
my $allrows = !!($form->{report_generator_output_format} ne 'HTML') ;
|
|
828 |
my $page = $::form->{page} || 1;
|
|
829 |
my $pages = {};
|
|
830 |
$pages->{per_page} = $::form->{per_page} || 20;
|
|
831 |
my $first_nr = ($page - 1) * $pages->{per_page};
|
|
832 |
my $last_nr = $first_nr + $pages->{per_page};
|
838 |
833 |
|
839 |
834 |
# no optimisation if qty op
|
840 |
835 |
if ( !$allrows && $form->{maxrows} && !$filter{qty_op}) {
|
841 |
836 |
$filter{limit} = $pages->{per_page};
|
842 |
837 |
$filter{offset} = ($page - 1) * $pages->{per_page};
|
843 |
|
$first_nr = 0;
|
844 |
|
$last_nr = $pages->{per_page};
|
|
838 |
$first_nr = 0;
|
|
839 |
$last_nr = $pages->{per_page};
|
845 |
840 |
}
|
846 |
841 |
|
847 |
842 |
my @contents = WH->get_warehouse_report(%filter);
|
Paginierung schneller machen:
SQL-Injection raus