Index: openacs-4/packages/invoices/tcl/iv-install-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/tcl/iv-install-procs.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/invoices/tcl/iv-install-procs.tcl 26 Oct 2005 12:00:37 -0000 1.5 +++ openacs-4/packages/invoices/tcl/iv-install-procs.tcl 26 Oct 2005 12:33:37 -0000 1.6 @@ -230,11 +230,12 @@ } 0.01d14 0.01d15 { db_transaction { - set organization_ids [db_list { - select g.party_id - from groups g, organizations o + set organization_ids [db_list all_organizations { + select m.member_id + from groups g, organizations o, group_member_map m where g.group_name = 'Customers' - and o.organization_id = g.party_id + and g.group_id = m.group_id + and o.organization_id = m.member_id }] set package_ids [apm_package_id_from_key invoices] Index: openacs-4/packages/invoices/tcl/offer-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/tcl/offer-procs.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/invoices/tcl/offer-procs.tcl 26 Oct 2005 12:00:37 -0000 1.8 +++ openacs-4/packages/invoices/tcl/offer-procs.tcl 26 Oct 2005 12:33:37 -0000 1.9 @@ -410,8 +410,8 @@ -credit_percent 0 \ -package_id $package_id] - iv::offer::set_status -offer_id $offer_id -status credit set offer_id [pm::project::get_project_item_id -project_id $new_offer_rev_id] + iv::offer::set_status -offer_id $offer_id -status credit application_data_link::new -this_object_id $offer_id -target_object_id $project_id } } @@ -430,13 +430,15 @@ set root_folder_id [lindex [application_data_link::get_linked -from_object_id $organization_id -to_object_type content_folder] 0] - db_transaction { - foreach foldername [list iv_offer iv_accepted iv_invoice] { - set new_folder_id [fs::new_folder \ - -name $foldername \ - -pretty_name "#invoices.folder_$foldername#" \ - -parent_id $root_folder_id \ - -no_callback] + if {![empty_string_p $root_folder_id]} { + db_transaction { + foreach foldername [list iv_offer iv_accepted iv_invoice] { + set new_folder_id [fs::new_folder \ + -name "${foldername}_$root_folder_id" \ + -pretty_name "#invoices.folder_$foldername#" \ + -parent_id $root_folder_id \ + -no_callback] + } } } } Index: openacs-4/packages/invoices/tcl/offer-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/tcl/offer-procs.xql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/invoices/tcl/offer-procs.xql 26 Oct 2005 12:00:37 -0000 1.5 +++ openacs-4/packages/invoices/tcl/offer-procs.xql 26 Oct 2005 12:33:37 -0000 1.6 @@ -1,7 +1,7 @@ - + update iv_offers