IO-3255 Review comments.
This commit is contained in:
@@ -23,6 +23,8 @@ const KNOWN_PART_RATE_TYPES = [
|
||||
* @returns {object} The parts tax rates object.
|
||||
*/
|
||||
|
||||
//PF: Major validation would be required on this - EMS files are inconsistent with things like 5% being passed as 5.0 or .05.
|
||||
//PF: Is this data being sent by them now?
|
||||
const extractPartsTaxRates = (profile = {}) => {
|
||||
const rateInfos = Array.isArray(profile.RateInfo) ? profile.RateInfo : [profile.RateInfo || {}];
|
||||
const partsTaxRates = {};
|
||||
@@ -31,7 +33,7 @@ const extractPartsTaxRates = (profile = {}) => {
|
||||
const rateTypeRaw =
|
||||
typeof r?.RateType === "string"
|
||||
? r.RateType
|
||||
: typeof r?.RateType === "object" && r?.RateType._
|
||||
: typeof r?.RateType === "object" && r?.RateType._ //PF: what does _ align to?
|
||||
? r.RateType._
|
||||
: "";
|
||||
const rateType = (rateTypeRaw || "").toUpperCase();
|
||||
|
||||
Reference in New Issue
Block a user