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 -N -r1.23 -r1.24 --- openacs-4/packages/invoices/tcl/offer-procs.tcl 18 May 2006 12:48:46 -0000 1.23 +++ openacs-4/packages/invoices/tcl/offer-procs.tcl 1 Jun 2006 10:49:31 -0000 1.24 @@ -105,36 +105,33 @@ Edit Offer } { - db_transaction { - set status [iv::offer::get_status -offer_id $offer_id] - if {[empty_string_p $status]} { - set status new - } - set old_rev_id [content::item::get_best_revision -item_id $offer_id] - set new_rev_id [content::revision::new \ - -item_id $offer_id \ - -content_type {iv_offer} \ - -title $title \ - -description $description \ - -attributes [list \ - [list comment $comment] \ - [list reservation $reservation] \ - [list offer_nr $offer_nr] \ - [list organization_id $organization_id] \ - [list amount_total $amount_total] \ - [list amount_sum $amount_sum] \ - [list currency $currency] \ - [list finish_date $finish_date] \ - [list date_comment $date_comment] \ - [list payment_days $payment_days] \ - [list show_sum_p $show_sum_p] \ - [list status $status] \ - [list vat_percent $vat_percent] \ - [list vat $vat] \ - [list credit_percent $credit_percent] ] ] - db_dml set_accepted_date {} + set status [iv::offer::get_status -offer_id $offer_id] + if {[empty_string_p $status]} { + set status new } - + set old_rev_id [content::item::get_best_revision -item_id $offer_id] + set new_rev_id [content::revision::new \ + -item_id $offer_id \ + -content_type {iv_offer} \ + -title $title \ + -description $description \ + -attributes [list \ + [list comment $comment] \ + [list reservation $reservation] \ + [list offer_nr $offer_nr] \ + [list organization_id $organization_id] \ + [list amount_total $amount_total] \ + [list amount_sum $amount_sum] \ + [list currency $currency] \ + [list finish_date $finish_date] \ + [list date_comment $date_comment] \ + [list payment_days $payment_days] \ + [list show_sum_p $show_sum_p] \ + [list status $status] \ + [list vat_percent $vat_percent] \ + [list vat $vat] \ + [list credit_percent $credit_percent] ] ] + db_dml set_accepted_date {} return $new_rev_id } Index: openacs-4/packages/invoices/www/offer-ae.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/www/offer-ae.tcl,v diff -u -N -r1.29 -r1.30 --- openacs-4/packages/invoices/www/offer-ae.tcl 24 May 2006 09:40:38 -0000 1.29 +++ openacs-4/packages/invoices/www/offer-ae.tcl 1 Jun 2006 10:49:31 -0000 1.30 @@ -758,6 +758,7 @@ set offer_id [content::revision::item_id -revision_id $new_offer_rev_id] } } -edit_data { + db_transaction { set new_offer_rev_id [iv::offer::edit \ -offer_id $offer_id \