Revision 9a67e77a
Von Jan Büren vor mehr als 1 Jahr hinzugefügt
bin/mozilla/io.pl | ||
---|---|---|
2195 | 2195 |
my $email = ''; |
2196 | 2196 |
my $email_cc = ''; |
2197 | 2197 |
my $record_email; |
2198 |
|
|
2199 |
my $is_invoice_mail = $::form->{type} =~ m{final_invoice|credit_note|invoice_for_advance_payment|invoice}; |
|
2200 |
|
|
2198 | 2201 |
if ($::form->{cp_id}) { |
2199 | 2202 |
$email = SL::DB::Contact->load_cached($::form->{cp_id})->cp_email; |
2200 | 2203 |
} |
2201 | 2204 |
# write a dispatch table if a third type enters |
2202 | 2205 |
# check record mail for sales_invoice |
2203 |
if ($::form->{type} eq 'invoice' && (!$email || $::instance_conf->get_invoice_mail_settings ne 'cp')) {
|
|
2206 |
if ($is_invoice_mail && (!$email || $::instance_conf->get_invoice_mail_settings ne 'cp')) {
|
|
2204 | 2207 |
# check for invoice_mail if defined (vc.invoice_email) |
2205 | 2208 |
$record_email = SL::DB::Customer->load_cached($::form->{vc_id})->invoice_mail; |
2206 | 2209 |
if ($record_email) { |
... | ... | |
2261 | 2264 |
show_bcc => $::auth->assert('email_bcc', 'may fail'), |
2262 | 2265 |
FILES => \%files, |
2263 | 2266 |
is_customer => $::form->{vc} eq 'customer', |
2264 |
is_invoice_mail => ($record_email && $::form->{type} eq 'invoice'),
|
|
2267 |
is_invoice_mail => ($record_email && $is_invoice_mail),
|
|
2265 | 2268 |
ALL_EMPLOYEES => \@employees_with_email, |
2266 | 2269 |
ALL_PARTNER_EMAIL_ADDRESSES => $all_partner_email_addresses, |
2267 | 2270 |
}); |
Auch abrufbar als: Unified diff
Rechnungsversand per E-Mail, auch bei Anzahlungs- und Schlußrechnung
Vorbelegung erfolgt auch für Gutschrift, Anzahlungs-, Schluß- und
normale Rechnungen.