use of com.axelor.apps.account.db.FixedAsset in project axelor-open-suite by axelor.
the class TestFixedAssetService method testGenerateAndComputeLinesSimpleLinearFixedAssetThirdLine.
@Test
public void testGenerateAndComputeLinesSimpleLinearFixedAssetThirdLine() {
FixedAsset fixedAsset = generateAndComputeLineSimpleLinearFixedAsset();
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 testGenerateAndComputeLinesUsProrataLinearFixedAssetSixthLine.
@Test
public void testGenerateAndComputeLinesUsProrataLinearFixedAssetSixthLine() {
FixedAsset fixedAsset = generateAndComputeLineUsProrataLinearFixedAsset();
assertFixedAssetLineEquals(createFixedAssetLine(LocalDate.of(2025, 12, 31), new BigDecimal("14662.62"), new BigDecimal("80644.41"), new BigDecimal("21993.94")), fixedAsset.getFixedAssetLineList().get(5));
}
use of com.axelor.apps.account.db.FixedAsset in project axelor-open-suite by axelor.
the class TestFixedAssetService method testGenerateAndComputeLinesProrataLinearFixedAssetNoProrataNeededFirstLine.
@Test
public void testGenerateAndComputeLinesProrataLinearFixedAssetNoProrataNeededFirstLine() {
FixedAsset fixedAsset = generateAndComputeLineProrataLinearFixedAssetNoProrataNeeded();
assertFixedAssetLineEquals(createFixedAssetLine(LocalDate.of(2020, 12, 31), new BigDecimal("100.00"), new BigDecimal("100.00"), new BigDecimal("400.00")), fixedAsset.getFixedAssetLineList().get(0));
}
use of com.axelor.apps.account.db.FixedAsset in project axelor-open-suite by axelor.
the class TestFixedAssetService method testGenerateAndComputeLinesProrataLinearFixedAsset.
@Test
public void testGenerateAndComputeLinesProrataLinearFixedAsset() {
FixedAsset fixedAsset = generateAndComputeLineProrataLinearFixedAsset();
Assert.assertTrue(fixedAsset.getFixedAssetLineList() != null && fixedAsset.getFixedAssetLineList().size() == 6);
}
use of com.axelor.apps.account.db.FixedAsset in project axelor-open-suite by axelor.
the class TestFixedAssetService method generateAndComputeLinesProrataDegressiveFixedAsset.
/*
* =====================================
* == Prorata degressive fixed asset ==
* =====================================
*/
protected FixedAsset generateAndComputeLinesProrataDegressiveFixedAsset() {
FixedAsset fixedAsset = createFixedAsset(FixedAssetRepository.COMPUTATION_METHOD_DEGRESSIVE, new BigDecimal("2.25"), LocalDate.of(2021, 7, 1), LocalDate.of(2021, 12, 31), 7, 12, createFixedAssetCategoryFromIsProrataTemporis(true, false), new BigDecimal("102638.35"));
fixedAssetService.generateAndComputeLines(fixedAsset);
return fixedAsset;
}
Aggregations