mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-08-05 15:42:14 +00:00
feat(expenses): add tax tracking and reporting (#737)
This commit is contained in:
committed by
GitHub
parent
3455ceb594
commit
885042f13a
@@ -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]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user