| |
28 |
28 |
} |
| |
29 |
29 |
|
| |
30 |
30 |
# standard mail text |
| |
31 |
31 |
db_1row invoice_data {} |
| |
32 |
32 |
|
| |
33 |
33 |
set locale [lang::user::site_wide_locale -user_id $contact_id] |
| |
34 |
34 |
set context [list [list [export_vars -base invoice-list {organization_id}] "[_ invoices.iv_invoice_2]"] $page_title] |
| |
35 |
35 |
|
| |
36 |
36 |
# invoice contact data |
| |
37 |
37 |
contact::employee::get -employee_id $contact_id -array contact |
| |
38 |
38 |
|
| |
39 |
39 |
set invoice_nrs {} |
| |
40 |
40 |
db_foreach invoice_nrs {} { |
| |
41 |
41 |
lappend invoice_nrs $invoice_nr |
| |
42 |
42 |
} |
| |
43 |
43 |
set invoice_nrs [join $invoice_nrs ", "] |
| |
44 |
44 |
|
| |
45 |
45 |
set invoice_text [lang::util::localize "#invoices.iv_invoices_email#" $locale] |
| |
46 |
46 |
set subject [lang::util::localize "#invoices.iv_invoices_email_subject#" $locale] |
| |
47 |
47 |
set return_url [export_vars -base invoice-list {organization_id}] |
| |
|
48 |
set cancel_url [export_vars -base invoice-list {organization_id}] |
| |
48 |
49 |
|
| |
49 |
50 |
if {[empty_string_p [cc_email_from_party $contact_id]]} { |
| |
50 |
51 |
ad_return_error "No Contact" "The contact does not have a valid e-mail address. Please go back and make sure that you provide an e-mail address first." |
| |
51 |
52 |
} |
| |
52 |
53 |
|
| |
53 |
54 |
ad_return_template |