mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Change the result value to the sum value.
This commit is contained in:
parent
3cd5ab27db
commit
91089c6668
@ -55,8 +55,8 @@ async function getUserCreations(id: number): Promise<number[]> {
|
||||
.andWhere({
|
||||
targetDate: Raw((alias) => `${alias} >= :date and ${alias} < :enddate`, { date: "2021-09-01", enddate: "2021-10-01" /* TODO: NOW().format("YYYY-MM") + '-01' - 2 Month */ })
|
||||
})
|
||||
.getOne()
|
||||
console.log('createdAmountBeforeLastMonth', createdAmountBeforeLastMonth)
|
||||
.getRawOne()
|
||||
console.log('createdAmountBeforeLastMonth.sum', createdAmountBeforeLastMonth.sum)
|
||||
|
||||
const createdAmountLastMonth = await getCustomRepository(TransactionCreationRepository)
|
||||
.createQueryBuilder('transaction_creations')
|
||||
@ -65,8 +65,8 @@ async function getUserCreations(id: number): Promise<number[]> {
|
||||
.andWhere({
|
||||
targetDate: Raw((alias) => `${alias} >= :date and ${alias} < :enddate`, { date: "2021-10-01", enddate: "2021-11-01" /* TODO: NOW().format("YYYY-MM") + '-01' - 2 Month */ })
|
||||
})
|
||||
.getOne()
|
||||
console.log('createdAmountLastMonth', createdAmountLastMonth)
|
||||
.getRawOne()
|
||||
console.log('createdAmountLastMonth.sum', createdAmountLastMonth.sum)
|
||||
|
||||
const createdAmountMonth = await getCustomRepository(TransactionCreationRepository)
|
||||
.createQueryBuilder('transaction_creations')
|
||||
@ -75,8 +75,8 @@ async function getUserCreations(id: number): Promise<number[]> {
|
||||
.andWhere({
|
||||
targetDate: Raw((alias) => `${alias} >= :date and ${alias} < :enddate`, { date: "2021-11-01", enddate: "2021-12-01" /* TODO: NOW().format("YYYY-MM") + '-01' - 2 Month */ })
|
||||
})
|
||||
.getOne()
|
||||
console.log('createdAmountMonth', createdAmountMonth)
|
||||
.getRawOne()
|
||||
console.log('createdAmountMonth.sum', createdAmountMonth.sum)
|
||||
|
||||
// const transactionCreationsMonthQuery = await findAllUserTransactionCreations.andWhere({
|
||||
// targetDate: Raw((alias) => `${alias} > :date and ${alias} < :enddate`, { date: "2021-11-01", enddate: "2021-12-01" /* TODO: NOW().format("YYYY-MM") + '-01' - 2 Month */ })
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user