Set invoice item type id for tasks
This commit is contained in:
parent
f96c0387a2
commit
baf76a460d
2 changed files with 7 additions and 0 deletions
|
|
@ -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')
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue