fix(lancamentos): manter data de compra original em todas as parcelas

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Felipe Coutinho
2026-01-17 16:56:09 +00:00
parent fc7083d95e
commit 75e8b992f0

View File

@@ -454,10 +454,6 @@ const buildLancamentoRecords = ({
installment += 1 installment += 1
) { ) {
const installmentPeriod = addMonthsToPeriod(period, installment); const installmentPeriod = addMonthsToPeriod(period, installment);
const installmentPurchaseDate = addMonthsToDate(
purchaseDate,
installment
);
const installmentDueDate = dueDate const installmentDueDate = dueDate
? addMonthsToDate(dueDate, installment) ? addMonthsToDate(dueDate, installment)
: null; : null;
@@ -469,7 +465,7 @@ const buildLancamentoRecords = ({
...basePayload, ...basePayload,
amount: centsToDecimalString(amountCents * amountSign), amount: centsToDecimalString(amountCents * amountSign),
pagadorId: share.pagadorId, pagadorId: share.pagadorId,
purchaseDate: installmentPurchaseDate, purchaseDate: purchaseDate,
period: installmentPeriod, period: installmentPeriod,
isSettled: settled, isSettled: settled,
installmentCount: installmentTotal, installmentCount: installmentTotal,