use of com.axelor.apps.account.db.FixedAsset in project axelor-open-suite by axelor.
the class TestFixedAssetService method generateAndComputeLineProrataLinearFixedAssetNoProrataNeeded.
/*
* ================================================================================================
* == Linear fixed asset with prorata but acquisition date is equal to first depreciation date ==
* ================================================================================================
*/
protected FixedAsset generateAndComputeLineProrataLinearFixedAssetNoProrataNeeded() {
FixedAsset fixedAsset = createFixedAsset(FixedAssetRepository.COMPUTATION_METHOD_LINEAR, LocalDate.of(2020, 12, 31), LocalDate.of(2020, 12, 31), 5, 12, createFixedAssetCategoryFromIsProrataTemporis(true), new BigDecimal("500.00"));
fixedAssetService.generateAndComputeLines(fixedAsset);
return fixedAsset;
}
use of com.axelor.apps.account.db.FixedAsset in project axelor-open-suite by axelor.
the class TestFixedAssetService method testGenerateAndComputeLinesProrataDegressiveFixedAssetThirdLine.
@Test
public void testGenerateAndComputeLinesProrataDegressiveFixedAssetThirdLine() {
FixedAsset fixedAsset = generateAndComputeLinesProrataDegressiveFixedAsset();
assertFixedAssetLineEquals(createFixedAssetLine(LocalDate.of(2023, 12, 31), new BigDecimal("18788.82"), new BigDecimal("62973.06"), new BigDecimal("39665.29")), fixedAsset.getFixedAssetLineList().get(2));
}
use of com.axelor.apps.account.db.FixedAsset in project axelor-open-suite by axelor.
the class TestFixedAssetService method generateAndComputeLineUsProrataLinearFixedAsset.
/*
* =====================================
* == US prorata linear fixed asset ==
* =====================================
*/
protected FixedAsset generateAndComputeLineUsProrataLinearFixedAsset() {
FixedAsset fixedAsset = createFixedAsset(FixedAssetRepository.COMPUTATION_METHOD_LINEAR, LocalDate.of(2020, 7, 1), LocalDate.of(2020, 12, 31), 7, 12, createFixedAssetCategoryFromIsProrataTemporis(true, true), new BigDecimal("102638.35"));
fixedAssetService.generateAndComputeLines(fixedAsset);
return fixedAsset;
}
use of com.axelor.apps.account.db.FixedAsset in project axelor-open-suite by axelor.
the class TestFixedAssetService method generateAndComputeLineSimpleLinearFixedAsset.
/*
* =================================
* == Simple linear fixed asset ==
* =================================
*/
protected FixedAsset generateAndComputeLineSimpleLinearFixedAsset() {
FixedAsset fixedAsset = createFixedAsset(FixedAssetRepository.COMPUTATION_METHOD_LINEAR, LocalDate.of(2020, 10, 4), LocalDate.of(2020, 12, 31), 5, 12, createFixedAssetCategoryFromIsProrataTemporis(false), new BigDecimal("500.00"));
fixedAssetService.generateAndComputeLines(fixedAsset);
return fixedAsset;
}
use of com.axelor.apps.account.db.FixedAsset in project axelor-open-suite by axelor.
the class TestFixedAssetService method testGenerateAndComputeLinesProrataLinearFixedAssetFourthLine.
@Test
public void testGenerateAndComputeLinesProrataLinearFixedAssetFourthLine() {
FixedAsset fixedAsset = generateAndComputeLineProrataLinearFixedAsset();
assertFixedAssetLineEquals(createFixedAssetLine(LocalDate.of(2023, 12, 31), new BigDecimal("100.00"), new BigDecimal("323.89"), new BigDecimal("176.11")), fixedAsset.getFixedAssetLineList().get(3));
}
Aggregations