X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fio.pl;h=4a094d2c1ad935ee64dcfafc0dbb0df05f90c4a8;hb=a25ac4907df1aca0db5fd0017b96e5d0bc5eadf1;hp=4f36c7818abbd3137aed1b0f048108f6569fb6ed;hpb=f83b4aff417ab78fc4bc242298fe25924f1ee072;p=kivitendo-erp.git diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 4f36c7818..4a094d2c1 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -152,10 +152,17 @@ sub display_row { qq|| . $locale->text('Part Description') . qq||; - $column_data{ship} = + if ($form->{"type"} eq "purchase_order") { + $column_data{ship} = qq|| - . $locale->text('Ship') - . qq||; + . $locale->text('Ship rcvd') + . qq||; + } else { + $column_data{ship} = + qq|| + . $locale->text('Ship') + . qq||; + } $column_data{qty} = qq|| . $locale->text('Qty') @@ -307,10 +314,10 @@ sub display_row { if (($rows = $form->numtextrows($form->{"description_$i"}, 30, 6)) > 1) { $column_data{description} = - qq||; + qq||; } else { $column_data{description} = - qq||; + qq||; } (my $qty_dec) = ($form->{"qty_$i"} =~ /\.(\d+)/); @@ -424,7 +431,7 @@ sub display_row { {"pricegroup_old_$i"}> {"price_old_$i"}> - + format_amount(\%myconfig, $form->{"price_new_$i"}) . qq|> @@ -432,7 +439,7 @@ sub display_row { {"inventory_accno_$i"}> - + {"income_accno_$i"}> {"expense_accno_$i"}> @@ -441,7 +448,7 @@ sub display_row { - + |; @@ -1273,8 +1280,10 @@ sub e_mail { } if ($myconfig{role} eq 'admin') { $bcc = qq| - | . $locale->text('Bcc') . qq| - + + | . $locale->text('Bcc') . qq| + + |; } @@ -1294,44 +1303,105 @@ sub e_mail { $form->{oldmedia} = $form->{media}; $form->{media} = "email"; + my %formname_translations = + ( + "bin_list" => $locale->text('Bin List'), + "credit_note" => $locale->text('Credit Note'), + "invoice" => $locale->text('Invoice'), + "packing_list" => $locale->text('Packing List'), + "pick_list" => $locale->text('Pick List'), + "proforma" => $locale->text('Proforma Invoice'), + "purchase_order" => $locale->text('Purchase Order'), + "request_quotation" => $locale->text('RFQ'), + "sales_order" => $locale->text('Confirmation'), + "sales_quotation" => $locale->text('Quotation'), + "storno_invoice" => $locale->text('Storno Invoice'), + "storno_packing_list" => $locale->text('Storno Packing List'), + ); + + my $attachment_filename = $formname_translations{$form->{"formname"}}; + my $prefix; + + if ($form->{"type"} =~ /invoice/) { + $prefix = "inv"; + } elsif ($form->{"type"} =~ /_quotation$/) { + $prefix = "quo"; + } else { + $prefix = "ord"; + } + + if ($attachment_filename && $form->{"${prefix}number"}) { + $attachment_filename .= "_" . $form->{"${prefix}number"} . + ($form->{"format"} =~ /pdf/i ? ".pdf" : + $form->{"format"} =~ /postscript/i ? ".ps" : + $form->{"format"} =~ /opendocument/i ? ".odt" : + $form->{"format"} =~ /html/i ? ".html" : ""); + $attachment_filename =~ s/ /_/g; + my %umlaute = + ( + "ä" => "ae", "ö" => "oe", "ü" => "ue", + "Ä" => "Ae", "Ö" => "Oe", "Ü" => "Ue", + "ß" => "ss" + ); + map({ $attachment_filename =~ s/$_/$umlaute{$_}/g; } keys(%umlaute)); + } else { + $attachment_filename = ""; + } + + if ($form->{"email"}) { + $form->{"fokus"} = "Form.subject"; + } else { + $form->{"fokus"} = "Form.email"; + } $form->header; print qq| - + -
{script}> + - - - +
$title
+ + @@ -1347,21 +1417,21 @@ sub e_mail { # save all other variables foreach $key (keys %$form) { $form->{$key} =~ s/\"/"/g; - print qq|\n|; + print qq|\n|; } print qq| - +
$title
- - - - - - - - - - - $bcc - +
| . $locale->text('To') . qq|| . $locale->text('Cc') . qq|
| . $locale->text('Subject') . qq|
+ + + + + + + + + $bcc + + + + + + +
| . $locale->text('To') . qq|
| . $locale->text('Cc') . qq|
| . $locale->text('Subject') . qq|
| . $locale->text('Attachment name') . + qq|
- - - - - - - +
| . $locale->text('Message') . qq|
+ + + + + +
| . $locale->text('Message') . qq|


- +
-
@@ -1795,7 +1865,7 @@ sub print_form { $language_saved = $form->{language_id}; $payment_id_saved = $form->{payment_id}; - &{"$form->{vc}_details"}; + &{"$form->{vc}_details"}(); $form->{language_id} = $language_saved; $form->{payment_id} = $payment_id_saved; @@ -2056,8 +2126,12 @@ sub ship_to { shiptocontact shiptophone shiptofax shiptoemail shiptodepartment_1 shiptodepartment_2); + my @addr_vars = + (qw(name department_1 department_2 street zipcode city country + contact email phone fax)); + # get details for name - &{"$form->{vc}_details"}(@shipto_vars); + &{"$form->{vc}_details"}(@addr_vars); $number = ($form->{vc} eq 'customer') @@ -2138,12 +2212,12 @@ sub ship_to { | . $locale->text('Phone') . qq| - $form->{"$form->{vc}phone"} + $form->{phone} | . $locale->text('Fax') . qq| - $form->{"$form->{vc}fax"} + $form->{fax}