diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs index bd4faa1b..aa0f5c12 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs @@ -143,7 +143,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ _globalConfigOptions.IsSyncInvoiceQadState = true; var invoiceGrps = _settleAccountDbContext.Set() - .Where(t => invbillNums.Contains(t.InvbillNum)); + .Where(t => invbillNums.Contains(t.InvbillNum) && t.State == SettleBillState.已扣减); foreach (var itm in invoiceGrps) { itm.State = SettleBillState.发票同步中; @@ -990,7 +990,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ .Select(p => new { Erploc = p.Key.ErpLoc, p.Key.PartCode, p.Key.BusinessType, Amt = Math.Round(p.Sum(t => t.Qty * t.Price), 2), Price = p.Key.Price, Qty = p.Sum(t => t.Qty) }).ToList(); var tedSaInvs = new List(); - var taskId = GuidGenerator.Create(); var teaTaskSub = new TEA_TASK_SUB() {