1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00

Set invoice item type id for tasks

This commit is contained in:
Hillel Coren 2017-03-27 11:52:07 +03:00
parent f96c0387a2
commit baf76a460d
2 changed files with 7 additions and 0 deletions

View File

@ -18,6 +18,12 @@ class AddGatewayFeeLocation extends Migration
$table->boolean('gateway_fee_enabled')->default(0);
$table->date('reset_counter_date')->nullable();
});
// update invoice_item_type_id for task invoice items
DB::statement('update invoice_items
left join invoices on invoices.id = invoice_items.invoice_id
set invoice_item_type_id = 2
where invoices.has_tasks = 1')
}
/**

View File

@ -904,6 +904,7 @@
item.notes(task.description);
item.qty(task.duration);
item.task_public_id(task.publicId);
item.invoice_item_type_id = {{ INVOICE_ITEM_TYPE_TASK }};
}
model.invoice().invoice_items.push(blank);
model.invoice().has_tasks(true);