use timesheet description in invoices (#1079)

This commit is contained in:
Kevin Papst
2019-09-04 10:54:21 +02:00
committed by GitHub
parent 93ab3d5666
commit 49e1a1c410
15 changed files with 51 additions and 95 deletions

View File

@@ -11,6 +11,7 @@ namespace App\Invoice\Calculator;
use App\Entity\Timesheet;
use App\Invoice\CalculatorInterface;
use App\Invoice\InvoiceItem;
/**
* A calculator that sums up the timesheet records by activity.
@@ -26,6 +27,12 @@ class ActivityInvoiceCalculator extends AbstractSumInvoiceCalculator implements
return (string) $timesheet->getActivity()->getId();
}
protected function mergeSumTimesheet(InvoiceItem $invoiceItem, Timesheet $entry)
{
$invoiceItem->setActivity($entry->getActivity());
$invoiceItem->setDescription($entry->getActivity()->getName());
}
/**
* @return string
*/