feat(expenses): add tax tracking and reporting (#737)

This commit is contained in:
Darko Gjorgjijoski
2026-08-02 13:01:01 +02:00
committed by GitHub
parent 3455ceb594
commit 885042f13a
38 changed files with 1466 additions and 78 deletions

View File

@@ -14,3 +14,15 @@ test('tax type has many taxes', function () {
$this->assertCount(4, $taxtype->taxes);
$this->assertTrue($taxtype->taxes()->exists());
});
test('tax type filters by transaction type', function () {
TaxType::factory()->create(['transaction_type' => TaxType::TRANSACTION_TYPE_SALES]);
$purchaseTaxType = TaxType::factory()->create([
'transaction_type' => TaxType::TRANSACTION_TYPE_PURCHASES,
]);
expect(TaxType::whereTransactionType(TaxType::TRANSACTION_TYPE_PURCHASES)->get())
->pluck('id')
->all()
->toBe([$purchaseTaxType->id]);
});