X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fis.pl;h=65cc0609d4788d7683d6494f260f99f4f0e6cd11;hb=59d350af569acf4d081454c32bf724872aa48307;hp=bfcad9e42cab51a6c9183a743683abcaa26f886e;hpb=52983c089cf1b4f1a4451e57ffa76f846c4791ba;p=kivitendo-erp.git diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index bfcad9e42..65cc0609d 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -37,6 +37,7 @@ use Data::Dumper; use List::Util qw(max); require "bin/mozilla/io.pl"; +require "bin/mozilla/invoice_io.pl"; require "bin/mozilla/arap.pl"; require "bin/mozilla/drafts.pl"; @@ -312,15 +313,16 @@ sub form_header { my @old_project_ids = ($form->{"globalproject_id"}); map { push @old_project_ids, $form->{"project_id_$_"} if $form->{"project_id_$_"}; } 1..$form->{"rowcount"}; - $form->get_lists("contacts" => "ALL_CONTACTS", - "shipto" => "ALL_SHIPTO", - "projects" => { "key" => "ALL_PROJECTS", - "all" => 0, - "old_id" => \@old_project_ids }, - "employees" => "ALL_SALESMEN", - "taxzones" => "ALL_TAXZONES", - "currencies" => "ALL_CURRENCIES", - "customers" => "ALL_CUSTOMERS"); + $form->get_lists("contacts" => "ALL_CONTACTS", + "shipto" => "ALL_SHIPTO", + "projects" => { "key" => "ALL_PROJECTS", + "all" => 0, + "old_id" => \@old_project_ids }, + "employees" => "ALL_SALESMEN", + "taxzones" => "ALL_TAXZONES", + "currencies" => "ALL_CURRENCIES", + "customers" => "ALL_CUSTOMERS", + "price_factors" => "ALL_PRICE_FACTORS"); my %labels; my @values = (undef); @@ -598,7 +600,7 @@ sub form_header { max_dunning_level dunning_amount shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact shiptophone shiptofax shiptoemail shiptodepartment_1 shiptodepartment_2 message email subject cc bcc taxaccounts), - map { $_.'_rate', $_,'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts} ); + map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts} ); print qq|
$form->{saved_message}
| if $form->{saved_message}; @@ -1169,7 +1171,9 @@ sub mark_as_paid { sub update { $lxdebug->enter_sub(); - map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } qw(exchangerate creditlimit creditremaining); + my ($recursive_call) = shift; + + map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } qw(exchangerate creditlimit creditremaining) unless $recursive_call; $form->{print_and_post} = 0 if $form->{second_run}; $taxincluded = "checked" if $form->{taxincluded}; @@ -1226,6 +1230,8 @@ sub update { $form->{payment_id} = $form->{"part_payment_id_$i"} if $form->{"part_payment_id_$i"} ne ""; $form->{"discount_$i"} = 0 if $form->{"not_discountable_$i"}; + $form->{"marge_price_factor_$i"} = $form->{item_list}->[0]->{price_factor}; + ($sellprice || $form->{"sellprice_$i"}) =~ /\.(\d+)/; $decimalplaces = max 2, length $1;