diff --git a/src/core/config/initialTables/tablePayments.ts b/src/core/config/initialTables/tablePayments.ts index aae997c..39fc004 100644 --- a/src/core/config/initialTables/tablePayments.ts +++ b/src/core/config/initialTables/tablePayments.ts @@ -90,14 +90,14 @@ const tablePayments: ITable = { for (let i in calculationStore.tables[tableName].rows) { const currRow = calculationStore.tables[tableName].rows[parseInt(i)]; - const prevRow = - calculationStore.tables[tableName].rows[parseInt(i) - 1]; + const nextRow = + calculationStore.tables[tableName].rows[parseInt(i) + 1]; if ( parseInt(i) > 0 && parseInt(i) < 4 && currRow && - prevRow && - currRow.paymentRelation?.value < prevRow.paymentRelation?.value + nextRow && + currRow.paymentRelation?.value > nextRow.paymentRelation?.value ) { calculationStore.setTableRow( tableName,