X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fis.pl;h=6b94e2c9a9e37cef3012d6d917072c88594a61f2;hb=a25ac4907df1aca0db5fd0017b96e5d0bc5eadf1;hp=6ef3fb24f71b1f37d99b930eabe5ee4cf1fa3e81;hpb=04f4f1cf1d2b805cda8a24f8b0f7a56513bdecb0;p=kivitendo-erp.git diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 6ef3fb24f..6b94e2c9a 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(); @@ -371,6 +369,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 +378,9 @@ sub form_header { $shipto = qq| | . $locale->text('Shipping Address') . qq| - - |; + |; + $form->{selectshipto} = $form->quote($form->{selectshipto}); + $shipto .= qq| |; @@ -582,6 +582,8 @@ sub form_header { $onload = qq|alert('$credittext')|; } + $form->{"javascript"} .= qq||; + $form->header; print qq| @@ -1003,6 +1005,8 @@ if ($form->{type} eq "credit_note") { "; + my @triggers = (); + $form->{paidaccounts}++ if ($form->{"paid_$form->{paidaccounts}"}); for $i (1 .. $form->{paidaccounts}) { @@ -1043,7 +1047,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 +1057,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 +1088,7 @@ if ($form->{type} eq "credit_note") { if ($form->{id}) { print qq| - @@ -1094,6 +1100,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 +1127,7 @@ if ($form->{type} eq "credit_note") { } else { if ($invdate > $closedto) { - print qq|text('Update') . qq|"> @@ -1133,12 +1142,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 +1445,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 +1468,6 @@ sub storno { $form->{storno} = 1; $form->{id} = ""; $form->{invnumber} = "Storno zu " . $form->{invnumber}; - $form->{rowcount}--; &post(); $lxdebug->leave_sub();