Skip to content

Commit

Permalink
Add update transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
FPT-NMTung committed May 13, 2024
1 parent 0ac82da commit 57d6f44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/transactionPage/UpdateTransaction.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import InputSelectHolder from "../../components/customInput/InputSelectHolder.js
import InputArrowTransaction from "../../components/customInput/InputArrowTransaction.jsx";
import InputText from "../../components/customInput/InputText.jsx";
import InputDatetime from "../../components/customInput/InputDatetime.jsx";
import {getLocalTimeZone, now, parseAbsolute, parseDateTime} from "@internationalized/date";
import {getLocalTimeZone, now, parseAbsolute, parseAbsoluteToLocal, parseDateTime} from "@internationalized/date";
import callApi from "../../apis/GatewayApi.js";
import {formatNumber, formatZoneTimeToString, removeMilliseconds, revertFormatNumber} from "../../common/common.js";
import toast from "react-hot-toast";
Expand Down Expand Up @@ -44,7 +44,7 @@ const UpdateTransaction = (props) => {
setValue('holder', data[0].FK_BUD_HOLDER)
setValue('amount', formatNumber(data[0].C_CASH_IN ? data[0].C_CASH_IN : data[0].C_CASH_OUT))
setValue('note', data[0].C_NOTE)
setValue('date', parseAbsolute(data[0].C_DATE))
setValue('date', parseAbsoluteToLocal(data[0].C_DATE))
setValue('stateArrow', data[0].C_CASH_IN ? 'UP' : 'DOWN')
})
}
Expand Down

0 comments on commit 57d6f44

Please sign in to comment.