@senior-gestao-empresarial/erpx-components 4.26.0 → 4.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/senior-gestao-empresarial-erpx-components.umd.js +17 -1
- package/bundles/senior-gestao-empresarial-erpx-components.umd.js.map +1 -1
- package/bundles/senior-gestao-empresarial-erpx-components.umd.min.js +1 -1
- package/bundles/senior-gestao-empresarial-erpx-components.umd.min.js.map +1 -1
- package/components/rateio-editor/erp-rateio-editor.component.d.ts +5 -0
- package/esm2015/components/rateio-editor/erp-rateio-editor.component.js +18 -2
- package/esm5/components/rateio-editor/erp-rateio-editor.component.js +18 -2
- package/fesm2015/senior-gestao-empresarial-erpx-components.js +17 -1
- package/fesm2015/senior-gestao-empresarial-erpx-components.js.map +1 -1
- package/fesm5/senior-gestao-empresarial-erpx-components.js +17 -1
- package/fesm5/senior-gestao-empresarial-erpx-components.js.map +1 -1
- package/package.json +1 -1
- package/senior-gestao-empresarial-erpx-components.metadata.json +1 -1
|
@@ -40986,7 +40986,7 @@
|
|
|
40986
40986
|
}
|
|
40987
40987
|
this.selectedConta = contaValue;
|
|
40988
40988
|
this.contaDialogFormGroup = this.fb.group({
|
|
40989
|
-
contaFinanceira: [
|
|
40989
|
+
contaFinanceira: [contaValue, forms.Validators.required],
|
|
40990
40990
|
percentual: [{ value: percentualValue, disabled: false }, [forms.Validators.required, forms.Validators.max(remainingPct)]],
|
|
40991
40991
|
valor: [{ value: valorValue, disabled: false }, [forms.Validators.required, forms.Validators.max(remainingValor)]]
|
|
40992
40992
|
});
|
|
@@ -41022,6 +41022,9 @@
|
|
|
41022
41022
|
}
|
|
41023
41023
|
if (this.editingContaIndex != null) {
|
|
41024
41024
|
var conta = this.contasDataSource[this.editingContaIndex];
|
|
41025
|
+
if (conta.idContaFinanceira !== idContaFinanceira) {
|
|
41026
|
+
this.trocarContaFinanceira(conta, idContaFinanceira, (contaFinanceira === null || contaFinanceira === void 0 ? void 0 : contaFinanceira.label) || '');
|
|
41027
|
+
}
|
|
41025
41028
|
conta.percentual = percentual;
|
|
41026
41029
|
conta.valorRateadoConta = valor;
|
|
41027
41030
|
// Recalcula os valores dos CCs proporcionalmente ao novo valor da conta,
|
|
@@ -41184,6 +41187,19 @@
|
|
|
41184
41187
|
return (conta.rateiosCCusto || []).indexOf(cc);
|
|
41185
41188
|
};
|
|
41186
41189
|
// === PRIVADOS ===
|
|
41190
|
+
/**
|
|
41191
|
+
* Troca a conta financeira mantendo a distribuição de centros de custo.
|
|
41192
|
+
* A conta contábil é descartada, pois pertence à conta substituída.
|
|
41193
|
+
*/
|
|
41194
|
+
ErpRateioEditorComponent.prototype.trocarContaFinanceira = function (conta, idContaFinanceira, labelConta) {
|
|
41195
|
+
this.ccSelection[idContaFinanceira] =
|
|
41196
|
+
this.ccSelection[conta.idContaFinanceira] || [];
|
|
41197
|
+
delete this.ccSelection[conta.idContaFinanceira];
|
|
41198
|
+
conta.idContaFinanceira = idContaFinanceira;
|
|
41199
|
+
conta.contaFinanceira = labelConta;
|
|
41200
|
+
conta.idContaContabil = undefined;
|
|
41201
|
+
conta.contaContabil = undefined;
|
|
41202
|
+
};
|
|
41187
41203
|
/** Inicializa o componente a partir dos inputs (sem chamada à API de carga). */
|
|
41188
41204
|
ErpRateioEditorComponent.prototype.inicializarPorInputs = function () {
|
|
41189
41205
|
var _a, _b, _c;
|