Fixed display of prices
This commit is contained in:
parent
c140b00e12
commit
c0727b2f4f
1 changed files with 3 additions and 3 deletions
|
|
@ -195,7 +195,7 @@ export default async () => {
|
|||
|
||||
yPosition = 82
|
||||
AMOUNTS.forEach((amount) => {
|
||||
doc.text(`${PESO} ${parseInt(amount).toFixed(2)}`, 122, yPosition)
|
||||
doc.text(`${PESO} ${parseInt(amount).toLocaleString('en-US', { minimumFractionDigits: 2 })}`, 122, yPosition)
|
||||
yPosition += 4
|
||||
})
|
||||
|
||||
|
|
@ -206,7 +206,7 @@ export default async () => {
|
|||
|
||||
yPosition = 82
|
||||
AMOUNTS.forEach((amount) => {
|
||||
doc.text(`${PESO} ${parseInt(amount).toFixed(2)}`, 156, yPosition)
|
||||
doc.text(`${PESO} ${parseInt(amount).toLocaleString('en-US', { minimumFractionDigits: 2 })}`, 156, yPosition)
|
||||
yPosition += 4
|
||||
})
|
||||
|
||||
|
|
@ -218,7 +218,7 @@ export default async () => {
|
|||
doc.setFont('arial-bold', 'bold')
|
||||
doc.text('Total :', 146, newYPosition + 4)
|
||||
const totalAmount = AMOUNTS.reduce((sum, amount) => sum + parseFloat(amount), 0)
|
||||
doc.text(`${PESO} ${totalAmount.toFixed(2)}`, 156, newYPosition + 4)
|
||||
doc.text(`${PESO} ${totalAmount.toLocaleString('en-US', { minimumFractionDigits: 2 })}`, 156, newYPosition + 4)
|
||||
|
||||
doc.text('Assessed By :', 16, newYPosition + 12)
|
||||
doc.text('Approved By :', 142, newYPosition + 12)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue