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