use of com.axelor.apps.account.db.FixedAsset in project axelor-open-suite by axelor.
the class TestFixedAssetService method testGenerateAndComputeLinesProrataLinearFixedAssetFifthLine.
@Test
public void testGenerateAndComputeLinesProrataLinearFixedAssetFifthLine() {
FixedAsset fixedAsset = generateAndComputeLineProrataLinearFixedAsset();
assertFixedAssetLineEquals(createFixedAssetLine(LocalDate.of(2024, 12, 31), new BigDecimal("100.00"), new BigDecimal("423.89"), new BigDecimal("76.11")), fixedAsset.getFixedAssetLineList().get(4));
}
use of com.axelor.apps.account.db.FixedAsset in project axelor-open-suite by axelor.
the class TestFixedAssetService method testGenerateAndComputeLinesProrataDegressiveFixedAsset.
@Test
public void testGenerateAndComputeLinesProrataDegressiveFixedAsset() {
FixedAsset fixedAsset = generateAndComputeLinesProrataDegressiveFixedAsset();
Assert.assertTrue(fixedAsset.getFixedAssetLineList() != null && fixedAsset.getFixedAssetLineList().size() == 7);
}
use of com.axelor.apps.account.db.FixedAsset in project axelor-open-suite by axelor.
the class TestFixedAssetService method testGenerateAndComputeLinesUsProrataLinearFixedAssetSecondLine.
@Test
public void testGenerateAndComputeLinesUsProrataLinearFixedAssetSecondLine() {
FixedAsset fixedAsset = generateAndComputeLineUsProrataLinearFixedAsset();
assertFixedAssetLineEquals(createFixedAssetLine(LocalDate.of(2021, 12, 31), new BigDecimal("14662.62"), new BigDecimal("21993.93"), new BigDecimal("80644.42")), fixedAsset.getFixedAssetLineList().get(1));
}
use of com.axelor.apps.account.db.FixedAsset in project axelor-open-suite by axelor.
the class TestFixedAssetService method testGenerateAndComputeLinesProrataLinearFixedAssetNoProrataNeededThirdLine.
@Test
public void testGenerateAndComputeLinesProrataLinearFixedAssetNoProrataNeededThirdLine() {
FixedAsset fixedAsset = generateAndComputeLineProrataLinearFixedAssetNoProrataNeeded();
assertFixedAssetLineEquals(createFixedAssetLine(LocalDate.of(2022, 12, 31), new BigDecimal("100.00"), new BigDecimal("300.00"), new BigDecimal("200.00")), fixedAsset.getFixedAssetLineList().get(2));
}
use of com.axelor.apps.account.db.FixedAsset in project axelor-open-suite by axelor.
the class TestFixedAssetService method generateAndComputeLineProrataLinearFixedAsset.
/*
* ==================================
* == Prorata linear fixed asset ==
* ==================================
*/
protected FixedAsset generateAndComputeLineProrataLinearFixedAsset() {
FixedAsset fixedAsset = createFixedAsset(FixedAssetRepository.COMPUTATION_METHOD_LINEAR, LocalDate.of(2020, 10, 5), LocalDate.of(2020, 12, 31), 5, 12, createFixedAssetCategoryFromIsProrataTemporis(true), new BigDecimal("500.00"));
fixedAssetService.generateAndComputeLines(fixedAsset);
return fixedAsset;
}
Aggregations