| |
24 |
24 |
} |
| |
25 |
25 |
if {![info exists orderby]} { |
| |
26 |
26 |
set orderby "" |
| |
27 |
27 |
} |
| |
28 |
28 |
if {![info exists page_size]} { |
| |
29 |
29 |
set page_size "25" |
| |
30 |
30 |
} |
| |
31 |
31 |
|
| |
32 |
32 |
if {[empty_string_p $package_id]} { |
| |
33 |
33 |
set package_id [apm_package_id_from_key invoices] |
| |
34 |
34 |
} |
| |
35 |
35 |
|
| |
36 |
36 |
if {[empty_string_p $base_url]} { |
| |
37 |
37 |
set base_url [apm_package_url_from_id [apm_package_id_from_key invoices]] |
| |
38 |
38 |
} |
| |
39 |
39 |
|
| |
40 |
40 |
set p_closed_id [pm::project::default_status_closed] |
| |
41 |
41 |
set t_closed_id [pm::task::default_status_closed] |
| |
42 |
42 |
set date_format [lc_get formbuilder_date_format] |
| |
43 |
43 |
set timestamp_format "$date_format [lc_get formbuilder_time_format]" |
| |
44 |
|
set currency [iv::price_list::get_currency -organization_id $organization_id] |
| |
45 |
44 |
|
| |
46 |
45 |
set contacts_p [apm_package_installed_p contacts] |
| |
47 |
46 |
if { $contacts_p } { |
| |
48 |
47 |
set contacts_url [apm_package_url_from_key contacts] |
| |
49 |
48 |
} |
| |
50 |
49 |
|
| |
51 |
50 |
set actions [list "[_ invoices.iv_invoice_New]" "${base_url}invoice-ae" "[_ invoices.iv_invoice_New2]" ] |
| |
52 |
51 |
set bulk_id_list [list organization_id] |
| |
53 |
52 |
|
| |
54 |
53 |
template::list::create \ |
| |
55 |
54 |
-name projects \ |
| |
56 |
55 |
-key project_id \ |
| |
57 |
56 |
-no_data "[_ invoices.None]" \ |
| |
58 |
57 |
-selected_format $format \ |
| |
59 |
58 |
-pass_properties {currency} \ |
| |
60 |
59 |
-elements { |
| |
61 |
60 |
project_id { |
| |
62 |
61 |
label {[_ invoices.iv_invoice_project_id]} |
| |
63 |
62 |
} |
| |
64 |
63 |
name { |
|
| |
99 |
98 |
} \ |
| |
100 |
99 |
-formats { |
| |
101 |
100 |
normal { |
| |
102 |
101 |
label "[_ invoices.Table]" |
| |
103 |
102 |
layout table |
| |
104 |
103 |
row "checkbox {} $row_list" |
| |
105 |
104 |
} |
| |
106 |
105 |
csv { |
| |
107 |
106 |
label "[_ invoices.CSV]" |
| |
108 |
107 |
output csv |
| |
109 |
108 |
page_size 0 |
| |
110 |
109 |
row $row_list |
| |
111 |
110 |
} |
| |
112 |
111 |
} |
| |
113 |
112 |
|
| |
114 |
113 |
|
| |
115 |
114 |
db_multirow -extend {project_link currency} projects projects_to_bill {} { |
| |
116 |
115 |
set amount_open [format "%.2f" $amount_open] |
| |
117 |
116 |
set dotlrn_club_id [lindex [application_data_link::get_linked -from_object_id $organization_id -to_object_type "dotlrn_club"] 0] |
| |
118 |
117 |
set pm_base_url [apm_package_url_from_id [dotlrn_community::get_package_id_from_package_key -package_key "project-manager" -community_id $dotlrn_club_id]] |
| |
|
118 |
set currency [iv::price_list::get_currency -organization_id $organization_id] |
| |
119 |
119 |
set project_link [export_vars -base "${pm_base_url}one" {{project_item_id $project_id}}] |
| |
120 |
120 |
set currency [iv::price_list::get_currency -organization_id $organization_id] |
| |
121 |
121 |
if { $contacts_p } { |
| |
122 |
122 |
set recipient "<a href=\"[contact::url -party_id $recipient_id]\">[contact::name -party_id $recipient_id]</a>" |
| |
123 |
123 |
} else { |
| |
124 |
124 |
set recipient [person::name -person_id $recipient_id] |
| |
125 |
125 |
} |
| |
126 |
126 |
} |