|
@@ -8,6 +8,7 @@ import {
|
|
|
CreatePromotionResult,
|
|
CreatePromotionResult,
|
|
|
DeletionResponse,
|
|
DeletionResponse,
|
|
|
DeletionResult,
|
|
DeletionResult,
|
|
|
|
|
+ OrderType,
|
|
|
RemovePromotionsFromChannelInput,
|
|
RemovePromotionsFromChannelInput,
|
|
|
UpdatePromotionInput,
|
|
UpdatePromotionInput,
|
|
|
UpdatePromotionResult,
|
|
UpdatePromotionResult,
|
|
@@ -349,7 +350,8 @@ export class PromotionService {
|
|
|
.where('promotion.id = :promotionId', { promotionId })
|
|
.where('promotion.id = :promotionId', { promotionId })
|
|
|
.andWhere('order.customer = :customerId', { customerId })
|
|
.andWhere('order.customer = :customerId', { customerId })
|
|
|
.andWhere('order.state != :state', { state: 'Cancelled' as OrderState })
|
|
.andWhere('order.state != :state', { state: 'Cancelled' as OrderState })
|
|
|
- .andWhere('order.active = :active', { active: false });
|
|
|
|
|
|
|
+ .andWhere('order.active = :active', { active: false })
|
|
|
|
|
+ .andWhere('order.type != :type', { type: OrderType.Seller });
|
|
|
|
|
|
|
|
return qb.getCount();
|
|
return qb.getCount();
|
|
|
}
|
|
}
|
|
@@ -361,7 +363,8 @@ export class PromotionService {
|
|
|
.leftJoin('order.promotions', 'promotion')
|
|
.leftJoin('order.promotions', 'promotion')
|
|
|
.where('promotion.id = :promotionId', { promotionId })
|
|
.where('promotion.id = :promotionId', { promotionId })
|
|
|
.andWhere('order.state != :state', { state: 'Cancelled' as OrderState })
|
|
.andWhere('order.state != :state', { state: 'Cancelled' as OrderState })
|
|
|
- .andWhere('order.active = :active', { active: false });
|
|
|
|
|
|
|
+ .andWhere('order.active = :active', { active: false })
|
|
|
|
|
+ .andWhere('order.type != :type', { type: OrderType.Seller });
|
|
|
|
|
|
|
|
return qb.getCount();
|
|
return qb.getCount();
|
|
|
}
|
|
}
|