|
@@ -42,7 +42,7 @@ class ShopInBillService extends CrudService {
|
|
const query = { source_id: _.get(afterSale, 'order_detail'), source: '3' };
|
|
const query = { source_id: _.get(afterSale, 'order_detail'), source: '3' };
|
|
const inBill = await this.model.findOne(query);
|
|
const inBill = await this.model.findOne(query);
|
|
// 该订单没有入账,就不需要退
|
|
// 该订单没有入账,就不需要退
|
|
- if (inBill) return;
|
|
|
|
|
|
+ if (!inBill) return;
|
|
const q2 = { source: '-3', source_id: _.get(afterSale, '_id') };
|
|
const q2 = { source: '-3', source_id: _.get(afterSale, '_id') };
|
|
const n2 = await this.model.count(q2);
|
|
const n2 = await this.model.count(q2);
|
|
// 有过售后退钱记录,不需要再生成
|
|
// 有过售后退钱记录,不需要再生成
|