New version of depreciations
This commit is contained in:
parent
7f683639c6
commit
5a911436e0
|
|
@ -1,15 +1,17 @@
|
|||
|
||||
<div class="container mt-5">
|
||||
<div class="container mt-5 ">
|
||||
|
||||
<div class="row">
|
||||
<div class="h1 text-center text-lg-start">Kalkulator amortyzacyjny</div>
|
||||
<div class="h1 text-center text-lg-start ">Kalkulator amortyzacyjny</div>
|
||||
</div>
|
||||
|
||||
<div class="row m-1 col-lg-4">
|
||||
<form [formGroup]=assetsDepreciationFormGroup class="frame">
|
||||
<div class="row">
|
||||
<div class="col mx-2 mx-lg-0 mb-2 col-lg-4 frame">
|
||||
<div class="row text-center h5 "><h5>Środek trwały</h5></div>
|
||||
<form [formGroup]=assetsDepreciationFormGroup >
|
||||
<div class="form-group row align-items-center mb-1">
|
||||
<div class="col-5 col-lg-6 text-start">
|
||||
<label class="form-label" for="initialValueAsset" >Wartość początkowa ŚT:</label>
|
||||
<label class="form-label" for="initialValueAsset" >Wartość początkowa:</label>
|
||||
</div>
|
||||
<div class="col col-lg">
|
||||
<input class="form-control" formControlName="initialValueAsset" type="number" id="initialValueAsset" required >
|
||||
|
|
@ -67,38 +69,37 @@
|
|||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<!-- <input class="btn btn-secondary col-auto" name="calculate"
|
||||
[disabled]=assetsDepreciationFormGroup.invalid (click)=calculate() type="button" value="Wylicz "> -->
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-1">
|
||||
<input class="btn btn-secondary col-auto" name="addChangeValue"
|
||||
[disabled]=assetsDepreciationFormGroup.invalid (click)=addChangeValue() type="button" value="Dodaj zmianę wartości ">
|
||||
</div>
|
||||
@if( lifeFormArray.controls.length > 0 ){
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-11 h1 text-center mt-3" >Zmiany wartości</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row m-1">
|
||||
<table class="table table-striped ">
|
||||
|
||||
@if( lifeFormArray.controls.length > 0 ){
|
||||
<div class="col col-lg-6 mb-2 mx-1 frame2">
|
||||
<div class="row">
|
||||
<div class="h2 text-center my-1" >Zmiany wartości</div>
|
||||
</div>
|
||||
<div class="row p-2 ">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Lp</th>
|
||||
<th scope="col">Miesiąc</th>
|
||||
<th scope="col">Zmiana</th>
|
||||
<th class="col-1 text-center" scope="col-auto">Lp</th>
|
||||
<th class="col-2 text-center" scope="col-auto">Miesiąc</th>
|
||||
<th class="col-2 text-center" scope="col">Zmiana</th>
|
||||
<th class="col-1 text-center" scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for( changeGroup of lifeFormArray.controls; track $index ) {
|
||||
<tr [formGroup] = changeGroup >
|
||||
<th scope="row">{{$index+1}}</th>
|
||||
<th class="align-middle text-center col-auto" scope="row">{{$index+1}}</th>
|
||||
<td><input class="form-control" type="month" formControlName="year_month" ></td>
|
||||
<td><input class="form-control" type="number" formControlName="initialValueAsset" placeholder="Wprowadź wartość {{$index}}"></td>
|
||||
<td><button class="btn btn-secondary" type="button" (click)=removeChange($index)>Usuń</button>
|
||||
<td ><button class="btn btn-sm btn-secondary" type="button" (click)=removeChange($index)>Usuń</button>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
|
|
@ -106,16 +107,17 @@
|
|||
</div>
|
||||
</div>
|
||||
}
|
||||
<div>
|
||||
<div class="row m-1">
|
||||
<div class="h1 text-center mt-3" style="--bs-bg-opacity: .2;">Plan amortyzacji</div>
|
||||
<div class="frame2 ">
|
||||
<div class="row">
|
||||
<table class="table table-striped ">
|
||||
|
||||
</div>
|
||||
<div class="row justify-content-center m-1 frame2">
|
||||
<div class="row h2 text-center" style="--bs-bg-opacity: .2;"><h2>Plan amortyzacji</h2></div>
|
||||
<div class="mt-3 col-11 justify-content-center ">
|
||||
<div class="row justify-content-center">
|
||||
<table class="table table-striped table-bordered ">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Lp</th>
|
||||
<th scope="col">Rok</th>
|
||||
<tr class="text-center fw-bold ">
|
||||
<th scope="col" >Lp</th>
|
||||
<th scope="col" >Rok</th>
|
||||
<th scope="col">Miesiąc</th>
|
||||
<th scope="col">Kwota odpisu</th>
|
||||
<th scope="col">Lączny odpis</th>
|
||||
|
|
@ -123,8 +125,8 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
@for (position of amortizations.positions; track $index) {
|
||||
<tr [class]="clazz(position)" >
|
||||
<th scope="row">{{$index+1}}</th>
|
||||
<tr [class]="clazz(position)" class="text-center">
|
||||
<th scope="row" >{{$index+1}}</th>
|
||||
<td>{{ position.when.year }}</td>
|
||||
<td>{{ position.when.month }}</td>
|
||||
<td>{{ position.calculatedDepreciation | number:'1.2-2' }}</td>
|
||||
|
|
@ -140,6 +142,13 @@
|
|||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="text-center fw-bold frame">
|
||||
<th scope="col" >Lp</th>
|
||||
<th scope="col" >Rok</th>
|
||||
<th scope="col">Miesiąc</th>
|
||||
<th scope="col">Kwota odpisu</th>
|
||||
<th scope="col">Lączny odpis</th>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
|
|
|
|||
Loading…
Reference in New Issue