mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Set invoice item type id for tasks
This commit is contained in:
parent
f96c0387a2
commit
baf76a460d
@ -18,6 +18,12 @@ class AddGatewayFeeLocation extends Migration
|
|||||||
$table->boolean('gateway_fee_enabled')->default(0);
|
$table->boolean('gateway_fee_enabled')->default(0);
|
||||||
$table->date('reset_counter_date')->nullable();
|
$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.notes(task.description);
|
||||||
item.qty(task.duration);
|
item.qty(task.duration);
|
||||||
item.task_public_id(task.publicId);
|
item.task_public_id(task.publicId);
|
||||||
|
item.invoice_item_type_id = {{ INVOICE_ITEM_TYPE_TASK }};
|
||||||
}
|
}
|
||||||
model.invoice().invoice_items.push(blank);
|
model.invoice().invoice_items.push(blank);
|
||||||
model.invoice().has_tasks(true);
|
model.invoice().has_tasks(true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user