Index: openacs-4/packages/invoices/www/mass-invoice.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/www/mass-invoice.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/invoices/www/mass-invoice.tcl 24 Aug 2006 09:56:43 -0000 1.5 +++ openacs-4/packages/invoices/www/mass-invoice.tcl 25 Oct 2006 21:37:45 -0000 1.6 @@ -62,8 +62,11 @@ set due_date [db_string today {}] set title "[_ invoices.iv_invoice_1] [organizations::name -organization_id $customer_id] $due_date" - + db_1row offer_data {} + if {$status eq "billed"} { + ad_return_error "Already billed" "$title exists already" + } set contacts_package_id [lindex [application_link::get_linked -from_package_id $package_id -to_package_key contacts] 0] Index: openacs-4/packages/invoices/www/mass-invoice.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/www/mass-invoice.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/invoices/www/mass-invoice.xql 18 Jun 2006 11:42:26 -0000 1.1 +++ openacs-4/packages/invoices/www/mass-invoice.xql 25 Oct 2006 21:38:25 -0000 1.2 @@ -19,7 +19,8 @@ vat_percent, vat, amount_total, - amount_sum + amount_sum, + status from iv_offers o, cr_items i, acs_data_links r where o.offer_id = i.latest_revision and r.object_id_one = :project_item_id