mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-10-09 05:16:18 +00:00
5ad5f787ab
* First steps splitting out the Amortization and Deprecation Excel functions from Financials * Verify which methods allow negative values for arguments * Additional unit tests for SLN() and SYD() * Additional unit tests for DDB() * Additional unit tests for DB() * Verify Amortization cases where salvage is greater than cost * More unit tests for Amortization * Resolve broken test in AMORLINC() and extract amortizationCoefficient calculation * verify amortizationCoefficient calculation * Extract YIELDDISC() and YIELDMAT() to Financial\Securities * Additional validation for Securities Yield functions
59 lines
1.2 KiB
PHP
59 lines
1.2 KiB
PHP
<?php
|
|
|
|
// Cost, Date purchased, End of the 1st period, Salvage, Period, Depreciation, Basis, Result
|
|
|
|
return [
|
|
[
|
|
776,
|
|
2400, '2008-08-19', '2008-12-31', 300, 1, 0.15, 1,
|
|
],
|
|
[
|
|
820,
|
|
2400, '2008-08-19', '2008-12-31', 300, 1, 0.2, 1,
|
|
],
|
|
[
|
|
492,
|
|
2400, '2008-08-19', '2008-12-31', 300, 2, 0.2, 1,
|
|
],
|
|
[
|
|
886,
|
|
2400, '2008-08-19', '2008-12-31', 300, 1, 0.22, 1,
|
|
],
|
|
[
|
|
949,
|
|
2400, '2008-08-19', '2008-12-31', 300, 1, 0.24, 1,
|
|
],
|
|
[
|
|
494,
|
|
2400, '2008-08-19', '2008-12-31', 300, 2, 0.24, 1,
|
|
],
|
|
[
|
|
902,
|
|
2400, '2008-08-19', '2008-12-31', 300, 1, 0.3, 1,
|
|
],
|
|
[
|
|
42,
|
|
150, '2011-01-01', '2011-09-30', 20, 1, 0.2, 4,
|
|
],
|
|
[
|
|
25,
|
|
150, '2011-01-01', '2011-09-30', 20, 2, 0.2, 4,
|
|
],
|
|
[
|
|
16,
|
|
150, '2011-01-01', '2011-09-30', 20, 3, 0.15, 4,
|
|
],
|
|
[
|
|
42,
|
|
150, '2011-01-01', '2011-09-30', 20, 1, 0.4, 4,
|
|
],
|
|
[
|
|
'#VALUE!',
|
|
550, 'notADate', '2020-12-25', 20, 1, 0.2, 4,
|
|
],
|
|
[
|
|
'#VALUE!',
|
|
550, '2011-01-01', 'notADate', 20, 1, 0.2, 4,
|
|
],
|
|
];
|