X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/f4431e33ab04ab24446d60bf2fad06642980fac1..5c25bb6b8235a594f6de2d8a2f78521b534625c0:/SL/IS.pm diff --git a/SL/IS.pm b/SL/IS.pm index a41ec014b..fda5070d3 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -220,7 +220,8 @@ sub invoice_details { push @{ $form->{TEMPLATE_ARRAYS}->{price_factor_name} }, $price_factor->{description}; push @{ $form->{TEMPLATE_ARRAYS}->{partsgroup} }, $form->{"partsgroup_$i"}; push @{ $form->{TEMPLATE_ARRAYS}->{reqdate} }, $form->{"reqdate_$i"}; - push(@{ $form->{TEMPLATE_ARRAYS}->{listprice} }, $form->{"listprice_$i"}); + push @{ $form->{TEMPLATE_ARRAYS}->{listprice} }, $form->format_amount($myconfig, $form->{"listprice_$i"}, 2); + push(@{ $form->{TEMPLATE_ARRAYS}->{listprice_nofmt} }, $form->{"listprice_$i"}); my $sellprice = $form->parse_amount($myconfig, $form->{"sellprice_$i"}); my ($dec) = ($sellprice =~ /\.(\d+)/); @@ -375,7 +376,7 @@ sub invoice_details { CVar->get_non_editable_ic_cvars(form => $form, dbh => $dbh, - row => $i, + row => $i, sub_module => 'invoice', may_converted_from => ['delivery_order_items', 'orderitems', 'invoice']); @@ -761,7 +762,7 @@ sub post_invoice { CVar->get_non_editable_ic_cvars(form => $form, dbh => $dbh, - row => $i, + row => $i, sub_module => 'invoice', may_converted_from => ['delivery_order_items', 'orderitems', 'invoice']); @@ -1274,8 +1275,6 @@ SQL exporttype => DATEV_ET_BUCHUNGEN, format => DATEV_FORMAT_KNE, dbh => $dbh, - from => $transdate, - to => $transdate, trans_id => $form->{id}, ); @@ -1298,7 +1297,7 @@ SQL sub transfer_out { $::lxdebug->enter_sub; - my ($self, $form, $dbh) = @_; + my ($self, $form, $dbh) = @_; my (@errors, @transfers); @@ -1316,7 +1315,6 @@ sub transfer_out { $form->{"id_$i"}, $form->{"qty_$i"}, $form->{"unit_$i"}); - if (!@{ $err } && $wh_id && $bin_id) { push @transfers, { 'parts_id' => $form->{"id_$i"}, @@ -1327,6 +1325,7 @@ sub transfer_out { 'src_bin_id' => $bin_id, 'project_id' => $form->{"project_id_$i"}, 'invoice_id' => $form->{"invoice_id_$i"}, + 'comment' => $::locale->text("Default transfer invoice"), }; } @@ -1352,7 +1351,7 @@ sub _determine_wh_and_bin { # ignore service if they are not configured to be transfered if ($part->is_service && !$conf->get_transfer_default_services) { $::lxdebug->leave_sub(2); - return; + return (\@errors); } # test negative qty @@ -1376,22 +1375,22 @@ sub _determine_wh_and_bin { parts_id => $part->id, bin_id => $bin_id); if ($error == 1) { - push @errors, $::locale->text("Part \"#1\" has chargenumber or best before date set. So it cannot be transfered automaticaly.", + push @errors, $::locale->text('Part "#1" has chargenumber or best before date set. So it cannot be transfered automaticaly.', $part->description); } my $form_unit_obj = SL::DB::Unit->new(name => $unit)->load; my $part_unit_qty = $form_unit_obj->convert_to($qty, $part->unit_obj); my $diff_qty = $max_qty - $part_unit_qty; if (!@errors && $diff_qty < 0) { - push @errors, $::locale->text("For part \"#1\" there are missing #2 #3 in the default warehouse/bin \"#4/#5\"", - $part->description, + push @errors, $::locale->text('For part "#1" there are missing #2 #3 in the default warehouse/bin "#4/#5".', + $part->description, $::form->format_amount(\%::myconfig, -1*$diff_qty), $part->unit_obj->name, SL::DB::Warehouse->new(id => $wh_id)->load->description, SL::DB::Bin->new( id => $bin_id)->load->description); } } else { - push @errors, $::locale->text("For part \"#1\" there is no default warehouse and bin defined.", + push @errors, $::locale->text('For part "#1" there is no default warehouse and bin defined.', $part->description); } @@ -1402,7 +1401,7 @@ sub _determine_wh_and_bin { if ($wh_id && $bin_id) { @errors = (); } else { - push @errors, $::locale->text("For part \"#1\" there is no default warehouse and bin for ignoring onhand defined.", + push @errors, $::locale->text('For part "#1" there is no default warehouse and bin for ignoring onhand defined.', $part->description); } }