Add optional setting to auto-fill a new invoice's item column
This commit is contained in:
parent
528b7862e3
commit
f60aae0930
|
|
@ -35,7 +35,9 @@ InvoiceItemEntity convertTaskToInvoiceItem({
|
|||
}
|
||||
lineBreak += '\n';
|
||||
|
||||
if (project.isOld && includeProjectHeader) {
|
||||
if (company.invoiceTaskProjectHeader &&
|
||||
project.isOld &&
|
||||
includeProjectHeader) {
|
||||
if (state.company.markdownEnabled) {
|
||||
notes += '## ${project.name}\n';
|
||||
} else {
|
||||
|
|
@ -161,6 +163,10 @@ InvoiceItemEntity convertTaskToInvoiceItem({
|
|||
return InvoiceItemEntity().rebuild((b) => b
|
||||
..typeId = InvoiceItemEntity.TYPE_TASK
|
||||
..taskId = task.id
|
||||
..productKey =
|
||||
company.invoiceTaskProject && !company.invoiceTaskProjectHeader
|
||||
? project.name
|
||||
: ''
|
||||
..notes = notes
|
||||
..cost = taskRateSelector(
|
||||
company: company,
|
||||
|
|
|
|||
Loading…
Reference in New Issue