+
+ if ($form->{formname} eq "invoice_for_advance_payment") {
+ $form->{label} = $locale->text('Invoice for Advance Payment');
+ }
+
+ if ($form->{formname} eq "final_invoice") {
+ $form->{label} = $locale->text('Final Invoice');
+ }
+
sales_quotation => 'OrderItem',
request_quotation => 'OrderItem',
invoice => 'InvoiceItem',
sales_quotation => 'OrderItem',
request_quotation => 'OrderItem',
invoice => 'InvoiceItem',
credit_note => 'InvoiceItem',
purchase_invoice => 'InvoiceItem',
purchase_delivery_order => 'DeliveryOrderItem',
credit_note => 'InvoiceItem',
purchase_invoice => 'InvoiceItem',
purchase_delivery_order => 'DeliveryOrderItem',
my $html = $::form->parse_html_template("common/_send_email_dialog", {
email_form => $email_form,
show_bcc => $::auth->assert('email_bcc', 'may fail'),
my $html = $::form->parse_html_template("common/_send_email_dialog", {
email_form => $email_form,
show_bcc => $::auth->assert('email_bcc', 'may fail'),
is_customer => $::form->{vc} eq 'customer',
is_invoice_mail => ($record_email && $::form->{type} eq 'invoice'),
ALL_EMPLOYEES => \@employees_with_email,
is_customer => $::form->{vc} eq 'customer',
is_invoice_mail => ($record_email && $::form->{type} eq 'invoice'),
ALL_EMPLOYEES => \@employees_with_email,
+
+ if ($email_form->{additional_to}) {
+ $email_form->{to} = join ', ', grep { $_ } $email_form->{to}, @{$email_form->{additional_to}};
+ delete $email_form->{additional_to};
+ }
+
my %field_names = (to => 'email');
$::form->{ $field_names{$_} // $_ } = $email_form->{$_} for keys %{ $email_form };
my %field_names = (to => 'email');
$::form->{ $field_names{$_} // $_ } = $email_form->{$_} for keys %{ $email_form };
- $attfile = SL::File->get_all(object_id => $id,
- object_type => $::form->{formname},
- file_type => 'document');
+ $attfile = SL::File->get_all(object_id => $id,
+ object_type => $type,
+ file_type => 'document',
+ print_variant => $::form->{formname},);