скидки - багфикс
This commit is contained in:
parent
8d7c1b5ca7
commit
8efe2e54b3
@ -541,12 +541,8 @@ const DataGridElement: React.FC<MWProps> = ({ openModal }) => {
|
|||||||
if( discountsActiveArray.length >= 0 && checkboxStates == 1 && selectedPromocode < 0 ) {
|
if( discountsActiveArray.length >= 0 && checkboxStates == 1 && selectedPromocode < 0 ) {
|
||||||
discountsActiveArray.forEach( (activeDiscount) => {
|
discountsActiveArray.forEach( (activeDiscount) => {
|
||||||
discountsArray.forEach( (discount, i) => {
|
discountsArray.forEach( (discount, i) => {
|
||||||
if( item.tariffs ) {
|
if( tariff.time ) { percents = percents + discountTime( tariff.time ); }
|
||||||
item.tariffs.forEach( (t) => {
|
if( tariff.points ) { percents = percents + discountCapacity( tariff.time ); }
|
||||||
if( t.time ) { percents = percents + discountTime( t.time ); }
|
|
||||||
if( t.points ) { percents = percents + discountCapacity( t.time ); }
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -555,12 +551,8 @@ const DataGridElement: React.FC<MWProps> = ({ openModal }) => {
|
|||||||
if( discountsActiveArray.length >= 0 && checkboxStates == 1 && selectedPromocode < 0 ) {
|
if( discountsActiveArray.length >= 0 && checkboxStates == 1 && selectedPromocode < 0 ) {
|
||||||
discountsActiveArray.forEach( (activeDiscount) => {
|
discountsActiveArray.forEach( (activeDiscount) => {
|
||||||
discountsArray.forEach( (discount, i) => {
|
discountsArray.forEach( (discount, i) => {
|
||||||
if( item.tariffs ) {
|
if( tariff.time && tariff.points ) {
|
||||||
item.tariffs.forEach( (t) => {
|
percents = percents + discountProduct( tariff.time, tariff.points );
|
||||||
if( t.time && t.points ) {
|
|
||||||
percents = percents + discountProduct( t.time, t.points );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user