simplify
This commit is contained in:
parent
4cfca8284a
commit
12bdfae1cf
@ -157,9 +157,7 @@ export const applyStandingToVendorManifest = (
|
|||||||
if (offer.Affiliation && offer.ReductionPerPositiveRank && offer.IncreasePerNegativeRank) {
|
if (offer.Affiliation && offer.ReductionPerPositiveRank && offer.IncreasePerNegativeRank) {
|
||||||
const title: number = inventory.Affiliations.find(x => x.Tag == offer.Affiliation)?.Title ?? 0;
|
const title: number = inventory.Affiliations.find(x => x.Tag == offer.Affiliation)?.Title ?? 0;
|
||||||
const factor =
|
const factor =
|
||||||
1 +
|
1 + (title < 0 ? offer.IncreasePerNegativeRank : offer.ReductionPerPositiveRank) * title * -1;
|
||||||
(title < 0 ? offer.IncreasePerNegativeRank * title : offer.ReductionPerPositiveRank * title) *
|
|
||||||
-1;
|
|
||||||
//console.log(offer.Affiliation, title, factor);
|
//console.log(offer.Affiliation, title, factor);
|
||||||
if (factor) {
|
if (factor) {
|
||||||
offer = { ...offer };
|
offer = { ...offer };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user