SL_eob_invoice – when only deleting a line, it asks for adjustment reason for the entire code (or every code for the encounter)
Dr. Berlin wrote:
It’s actually a bug in the system that needs to be reported.
In validate() function, it has the following 2 lines:
let cPay = parseFloat(f[pfx + '[pay]'].value).toFixed(2);
let cAdjust = parseFloat(f[pfx + '[adj]'].value).toFixed(2);
The problem is, in the old system it worked fine, but it must be new behavior for JavaScript, because parseFloat spits out a number, but toFixed(2) actually spits out a string, not a number. So later in the same function, when it says if (cAdjust !=0), it fails, because it’s now comparing a string to a number. This will present multiple problems with the validate function.
The way I fixed it for now was to remove toFixed at the end of each line. This is just validation, so we don’t need to necessarily round it to 2 decimal points at this point (only when it’s saved). There is probably another solution to round the number and keep as number, but that’s what I did.