From 234fe462dae4d778756fce1c62a0b65399e9a216 Mon Sep 17 00:00:00 2001 From: Chika Date: Tue, 6 Oct 2020 20:20:51 +0300 Subject: [PATCH] fix 100000004 case --- src/core/config/initialTables/tablePayments.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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,