X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fis.pl;h=0334843f9ddd7cbcbf26b0642b4705dff1bc88c9;hb=864b73ffb0964215f287a393ea37ec2eef6eb8eb;hp=6ef3fb24f71b1f37d99b930eabe5ee4cf1fa3e81;hpb=04f4f1cf1d2b805cda8a24f8b0f7a56513bdecb0;p=kivitendo-erp.git diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 6ef3fb24f..0334843f9 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -69,8 +69,6 @@ sub add { } &invoice_links; &prepare_invoice; - $form->{format} = "pdf"; - &display_form; $lxdebug->leave_sub(); @@ -246,11 +244,9 @@ sub prepare_invoice { if ($form->{type} eq "credit_note") { $form->{type} = "credit_note"; $form->{formname} = "credit_note"; - $form->{media} = "screen"; } else { $form->{type} = "invoice"; $form->{formname} = "invoice"; - $form->{media} = "screen"; } if ($form->{id}) { @@ -371,6 +367,7 @@ sub form_header { } } else { + $form->{selectshipto} = $form->unquote($form->{selectshipto}); $form->{selectshipto} =~ s/ selected//g; if ($form->{shipto_id} ne "") { $form->{selectshipto} =~ s/value=$form->{shipto_id}/value=$form->{shipto_id} selected/; @@ -379,8 +376,9 @@ sub form_header { $shipto = qq| | . $locale->text('Shipping Address') . qq| - - |; + |; + $form->{selectshipto} = $form->quote($form->{selectshipto}); + $shipto .= qq| |; @@ -582,6 +580,8 @@ sub form_header { $onload = qq|alert('$credittext')|; } + $form->{"javascript"} .= qq||; + $form->header; print qq| @@ -912,7 +912,7 @@ sub form_footer { $notes $intnotes - $payment @@ -1003,6 +1003,8 @@ if ($form->{type} eq "credit_note") { "; + my @triggers = (); + $form->{paidaccounts}++ if ($form->{"paid_$form->{paidaccounts}"}); for $i (1 .. $form->{paidaccounts}) { @@ -1043,7 +1045,8 @@ if ($form->{type} eq "credit_note") { $column_data{"AR_paid_$i"} = qq||; $column_data{"datepaid_$i"} = - qq|{"datepaid_$i"}>|; + qq|{"datepaid_$i"}> + |; $column_data{"source_$i"} = qq||; $column_data{"memo_$i"} = @@ -1052,6 +1055,7 @@ if ($form->{type} eq "credit_note") { map { print qq|$column_data{"${_}_$i"}\n| } @column_index; print " \n"; + push(@triggers, "datepaid_$i", "BL", "trigger_datepaid_$i"); } print qq| @@ -1082,7 +1086,7 @@ if ($form->{type} eq "credit_note") { if ($form->{id}) { print qq| - @@ -1094,6 +1098,9 @@ if ($form->{type} eq "credit_note") { . $locale->text('Storno') . qq|">| unless ($form->{storno}); print qq| +|; + print qq| |; if ($form->{id} && !($form->{type} eq "credit_note")) { print qq| @@ -1118,7 +1125,7 @@ if ($form->{type} eq "credit_note") { } else { if ($invdate > $closedto) { - print qq|text('Update') . qq|"> @@ -1133,12 +1140,8 @@ if ($form->{type} eq "credit_note") { } } - if ($form->{menubar}) { - require "$form->{path}/menu.pl"; - &menubar; - } - - print qq| + print $form->write_trigger(\%myconfig, scalar(@triggers) / 3, @triggers) . + qq| {rowcount}> @@ -1440,6 +1443,18 @@ sub print_and_post { } +sub use_as_template { + $lxdebug->enter_sub(); + + map { delete $form->{$_} } qw(printed emailed queued invnumber invdate deliverydate id datepaid_1 source_1 memo_1 paid_1 exchangerate_1 AP_paid_1 storno); + $form->{paidaccounts} = 1; + $form->{rowcount}--; + $form->{invdate} = $form->current_date(\%myconfig); + &display_form; + + $lxdebug->leave_sub(); +} + sub storno { $lxdebug->enter_sub(); @@ -1451,7 +1466,6 @@ sub storno { $form->{storno} = 1; $form->{id} = ""; $form->{invnumber} = "Storno zu " . $form->{invnumber}; - $form->{rowcount}--; &post(); $lxdebug->leave_sub();