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.1 -r1.2 --- openacs-4/packages/invoices/www/mass-invoice.tcl 18 Jun 2006 11:42:26 -0000 1.1 +++ openacs-4/packages/invoices/www/mass-invoice.tcl 18 Jun 2006 14:10:15 -0000 1.2 @@ -37,6 +37,8 @@ set language [lang::conn::language] +ad_progress_bar_begin -title [_ invoices.Create_mass_invoices] -message_1 "[_ invoices.Create_mass_invoices2]" + foreach project_item_id $project_id { # We need to make sure the whole process runs through smoothly for invoice @@ -89,7 +91,7 @@ # If an invoice exists with this description - if {[db_string existing_invoice "select 1 from iv_invoicesx where description = :description" -default 0]} { + if {[db_string existing_invoice "select 1 from iv_invoicesx where description = :description and status = 'new' limit 1" -default 0]} { continue } @@ -339,4 +341,6 @@ -subject [_ invoices.mass_invoice_email_subject] \ -body [_ invoices.mass_invoice_email_body] \ -mime_type "text/html" -} \ No newline at end of file +} + +ad_progress_bar_end -url $return_url \ No newline at end of file