improved invoice handling for fixed rates (#1058)

This commit is contained in:
Kevin Papst
2019-08-24 00:02:16 +02:00
committed by GitHub
parent 46e5650882
commit ceeec7b8a6
40 changed files with 581 additions and 131 deletions

View File

@@ -9,8 +9,8 @@
namespace App\Tests\Invoice\Renderer;
use App\Invoice\InvoiceModel;
use App\Invoice\Renderer\CsvRenderer;
use App\Model\InvoiceModel;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\BinaryFileResponse;

View File

@@ -10,9 +10,9 @@
namespace App\Tests\Invoice\Renderer;
use App\Entity\InvoiceDocument;
use App\Invoice\InvoiceModel;
use App\Invoice\Renderer\RendererTrait;
use App\Invoice\RendererInterface;
use App\Model\InvoiceModel;
use Symfony\Component\HttpFoundation\Response;
class DebugRenderer implements RendererInterface

View File

@@ -10,7 +10,7 @@
namespace App\Tests\Invoice\Renderer;
use App\Entity\InvoiceDocument;
use App\Model\InvoiceModel;
use App\Invoice\InvoiceModel;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Response;

View File

@@ -9,8 +9,8 @@
namespace App\Tests\Invoice\Renderer;
use App\Invoice\InvoiceModel;
use App\Invoice\Renderer\OdsRenderer;
use App\Model\InvoiceModel;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\BinaryFileResponse;

View File

@@ -22,9 +22,9 @@ use App\Entity\Timesheet;
use App\Entity\TimesheetMeta;
use App\Entity\User;
use App\Invoice\Calculator\DefaultCalculator;
use App\Invoice\InvoiceModel;
use App\Invoice\NumberGenerator\DateNumberGenerator;
use App\Invoice\Renderer\AbstractRenderer;
use App\Model\InvoiceModel;
use App\Repository\Query\InvoiceQuery;
use App\Twig\DateExtensions;
use App\Twig\Extensions;
@@ -82,10 +82,7 @@ trait RendererTestTrait
return new $classname($translator, $dateExtension, $extensions);
}
/**
* @return InvoiceModel
*/
protected function getInvoiceModel()
protected function getInvoiceModel(): InvoiceModel
{
$customer = new Customer();
$customer->setCurrency('EUR');

View File

@@ -65,6 +65,6 @@ class TwigRendererTest extends KernelTestCase
$this->assertContains('<h2 class="page-header">
<span contenteditable="true">a test invoice template title</span>
</h2>', $content);
$this->assertEquals(5, substr_count($content, 'activity description / project name'));
$this->assertEquals(5, substr_count($content, 'activity description'));
}
}

View File

@@ -9,8 +9,8 @@
namespace App\Tests\Invoice\Renderer;
use App\Invoice\InvoiceModel;
use App\Invoice\Renderer\XlsxRenderer;
use App\Model\InvoiceModel;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\BinaryFileResponse;