Commit ea54dfbb authored by Frank Bergmann's avatar Frank Bergmann

-- implemented rel invoice-item/project-task

parent 68fda5ed
......@@ -42,6 +42,7 @@ ad_page_contract {
item_project_id:integer,array
item_rate:float,array
item_currency:array
item_task_id:integer,array
{include_task:multiple {} }
{ return_url "/intranet-invoices/" }
}
......@@ -201,7 +202,8 @@ foreach nr $item_list {
set rate $item_rate($nr)
set currency $item_currency($nr)
set sort_order $item_sort_order($nr)
ns_log Notice "item($nr, $name, $units, $uom_id, $project_id, $rate, $currency)"
set task_id $item_task_id($nr)
ns_log Notice "item($nr, $name, $units, $uom_id, $project_id, $rate, $currency, $task_id)"
# Insert only if it's not an empty line from the edit screen
if {!("" == [string trim $name] && (0 == $units || "" == $units))} {
......@@ -214,7 +216,7 @@ foreach nr $item_list {
price_per_unit, currency,
sort_order, item_type_id,
item_material_id,
item_status_id, description
item_status_id, description, task_id
) VALUES (
:item_id, :name,
:project_id, :invoice_id,
......@@ -222,7 +224,7 @@ foreach nr $item_list {
:rate, :currency,
:sort_order, :type_id,
:material_id,
null, ''
null, '', :task_id
)"
db_dml insert_invoice_items $insert_invoice_items_sql
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment