UNPKG

viam-projectv-scan

Version:

ViaCheck deposit application

17 lines (15 loc) 511 B
export const getPorcentageRejection = checkSelected => { let procentageReturned = '0%'; if (checkSelected !== undefined && checkSelected !== null) { procentageReturned = checkSelected.issuedChecksMaker === 0 ? procentageReturned : `${Math.round( (checkSelected.returnedChecksMaker / checkSelected.issuedChecksMaker) * 100 ).toString()}%`; } return procentageReturned; }; export default getPorcentageRejection;