db is returning a string, rather than a number, wh...
# orm-help
c
db is returning a string, rather than a number, when the value is set to decimal in the schema. . working schema
Copy code
model InvoiceTransaction {
  InvoiceTransactionID      Int       @id @default(autoincrement())
  CostCode                  String?   @db.VarChar(40)
  DisbursementAmount        Decimal?  @db.Decimal(20, 2)
  InvoiceNumber             String    @db.VarChar(30)
  InvoiceDate               DateTime? @db.Date 
  InvoiceAmount             Int
If the InvoiceAmount is changed to Decimal (like the DisbursementAmount) the number is returned as a string.
Copy code
InvoiceTransactionID: 23765
CostCode: null
DisbursementAmount: "1260"
InvoiceAmount: 1260
InvoiceDate: "2020-07-06T00:00:00.000Z"
InvoiceNumber: "JUN.20 "                       "
How do I get the API to return the value as a decimal?