# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1335, USA.
#
#######################################################################
#
$form->{qty} = $form->parse_amount(\%myconfig, $form->{qty});
if ($form->{qty} <= 0) {
- $form->show_generic_error($locale->text('Invalid quantity.'), 'back_button' => 1);
+ $form->show_generic_error($locale->text('Invalid quantity.'));
}
# TODO Es wäre schön, hier schon die maximale Anzahl der zu fertigenden Erzeugnisse zu haben
#else { if ($form->{qty} > $maxcreate) { #s.o.
- # $form->show_generic_error($locale->text('Can not create that quantity with current stock'), 'back_button' => 1);
- # $form->show_generic_error('Maximale Stückzahl' . $maxcreate , 'back_button' => 1);
+ # $form->show_generic_error($locale->text('Can not create that quantity with current stock'));
+ # $form->show_generic_error('Maximale Stückzahl' . $maxcreate);
# }
# }
# Ideen? jb 18.3.09
if ($ret ne "1"){
# Die locale-Funktion kann keine Double-Quotes escapen, deswegen hier erstmal so (ein wahrscheinlich immerwährender Hotfix) s.a. Frage davor jb 25.4.09
- $form->show_generic_error($ret, 'back_button' => 1);
+ $form->show_generic_error($ret);
}
delete @{$form}{qw(parts_id partnumber description qty unit chargenumber bestbefore comment)};
$form->{qty} = $form->parse_amount(\%myconfig, $form->{qty});
if ($form->{qty} <= 0) {
- $form->show_generic_error($locale->text('Invalid quantity.'), 'back_button' => 1);
+ $form->show_generic_error($locale->text('Invalid quantity.'));
}
if (!$form->{warehouse_id} || !$form->{bin_id}) {
'purchase_invoice' => { script => 'ir', title => $locale->text('Purchase Invoice') },
);
- my $allrows = 0;
- $allrows = 1 if $form->{report_generator_output_format} ne 'HTML' ;
+ my $allrows = 0;
+ $allrows = 1 if $form->{report_generator_output_format} ne 'HTML' ;
- # manual paginating
- my $pages = {};
- $pages->{per_page} = $::form->{per_page} || 15;
- my $first_nr = ($page - 1) * $pages->{per_page};
- my $last_nr = $first_nr + $pages->{per_page};
- my $idx = 0;
+ # manual paginating
+ my $pages = {};
+ $pages->{per_page} = $::form->{per_page} || 15;
+ my $first_nr = ($page - 1) * $pages->{per_page};
+ my $last_nr = $first_nr + $pages->{per_page};
+ my $idx = 0;
foreach my $entry (@contents) {
- # type impl $entry->{type_and_classific} = $::request->presenter->type_abbreviation($entry->{type}).
- $entry->{type_and_classific} = $::request->presenter->type_abbreviation($entry->{assembly},$entry->{inventory_accno_id}).
+ $entry->{type_and_classific} = $::request->presenter->type_abbreviation($entry->{part_type}).
$::request->presenter->classification_abbreviation($entry->{classification_id});
$entry->{qty} = $form->format_amount_units('amount' => $entry->{qty},
'part_unit' => $entry->{partunit},
SL::DB::Manager::Bin->find_by(id => $form->{bin_id})->description},
partnumber => sub { push @options, $locale->text('Partnumber') . " : $form->{partnumber}"},
classification_id => sub { push @options, $locale->text('Parts Classification'). " : ".
- SL::DB::Manager::PartsClassification->get_first(where => [ id => $form->{classification_id} ] )->description; },
+ SL::DB::Manager::PartClassification->get_first(where => [ id => $form->{classification_id} ] )->description; },
description => sub { push @options, $locale->text('Description') . " : $form->{description}"},
chargenumber => sub { push @options, $locale->text('Charge Number') . " : $form->{chargenumber}"},
bestbefore => sub { push @options, $locale->text('Best Before') . " : $form->{bestbefore}"},
foreach my $entry (@contents) {
- # type impl $entry->{type_and_classific} = $::request->presenter->type_abbreviation($entry->{type}).
- $entry->{type_and_classific} = $::request->presenter->type_abbreviation($entry->{assembly},$entry->{inventory_accno_id}).
+ $entry->{type_and_classific} = $::request->presenter->type_abbreviation($entry->{part_type}).
$::request->presenter->classification_abbreviation($entry->{classification_id});
map { $subtotals{$_} += $entry->{$_} } @subtotals_columns;
$total_stock_value += $entry->{stock_value} * 1;