timoh
committed
on 20 Apr 06
added bulk action to move relationships to other contact
openacs-4/.../invoices/www/offer-ae.tcl (+1 -0)
562 562     ad_form -extend -name iv_offer_form -form {
563 563         {to_project:text(submit) {label "[_ invoices.back_to_project]"} {value t}}
564 564     }
565 565 }
566 566
567 567 ad_form -extend -name iv_offer_form -new_request {
568 568     if {[exists_and_not_null _project_id]} {
569 569         db_1row get_project_description {}
570 570     } else {
571 571         set comment ""
572 572     }
573 573     set today [db_string today {}]
574 574     set finish_date ""
575 575     set finish_time ""
576 576     if {[exists_and_not_null project_title]} {
577 577         set title "[_ invoices.iv_offer_1] $project_title"
578 578         set offer_nr $project_title
579 579     } else {
580 580         set title "[_ invoices.iv_offer_1] $organization_name $today"
581 581     }
  582     set title [lang::util::localize $title]
582 583     # We do not want a seperate offer_number but use the project title
583 584     # set offer_nr [db_nextval iv_offer_seq]
584 585     set amount_sum "0.00"
585 586     set amount_total "0.00"
586 587     set credit_sum "0.00"
587 588
588 589     # get this from organization_id
589 590     set payment_days "0"
590 591     set vat_percent "0.0"
591 592     set contacts_package_id [lindex [application_link::get_linked -from_package_id $package_id -to_package_key contacts] 0]
592 593     array set org_data [contacts::get_values \
593 594                             -group_name "Customers" \
594 595                             -object_type "organization" \
595 596                             -party_id $organization_id \
596 597                             -contacts_package_id $contacts_package_id]
597 598     if {[info exists org_data(payment_days)]} {
598 599         set payment_days $org_data(payment_days)
599 600     }
600 601     if {[info exists org_data(vat_percent)]} {
601 602         set vat_percent [format "%.1f" $org_data(vat_percent)]