|
|
@ -14,6 +14,7 @@ using System; |
|
|
|
using System.Collections; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
using System.Runtime.InteropServices; |
|
|
|
using System.Security.Policy; |
|
|
|
using System.Text; |
|
|
|
using System.Text.Json; |
|
|
@ -1237,6 +1238,24 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
groupList.AddRange(group1); |
|
|
|
} |
|
|
|
|
|
|
|
string site = dtos.FirstOrDefault().Site; |
|
|
|
string clientCode = string.Empty; |
|
|
|
|
|
|
|
switch (clientCode) |
|
|
|
{ |
|
|
|
case "1040": |
|
|
|
clientCode = "C001"; |
|
|
|
break; |
|
|
|
case "1046": |
|
|
|
clientCode = "C171"; |
|
|
|
break; |
|
|
|
default: |
|
|
|
clientCode = "C004"; |
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var invbill = new INVOICE_GRP |
|
|
|
(guid: GuidGenerator.Create(), |
|
|
|
realnvBillNum: string.Empty, |
|
|
@ -1248,16 +1267,18 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
invGroupNum: p_InvGroupNum, |
|
|
|
state: SettleBillState.已开票, |
|
|
|
invoiceBillState: InvoiceBillState.正常, |
|
|
|
tax: 0, |
|
|
|
tax: 0.13m, |
|
|
|
parent: p_parentInvBillNum, |
|
|
|
preTaxDiff: 0, |
|
|
|
taxDiff: 0, |
|
|
|
clientCode: string.Empty, |
|
|
|
realAmt: readAmt |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
); |
|
|
|
invbill.ClientCode = clientCode; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
invbill.Site = dtos.FirstOrDefault().Site; |
|
|
|
invlist.Add(invbill); |
|
|
|
} |
|
|
@ -1479,13 +1500,33 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
invGroupNum: p_InvGroupNum, |
|
|
|
state: SettleBillState.已开票, |
|
|
|
invoiceBillState: InvoiceBillState.正常, |
|
|
|
tax: 0, |
|
|
|
tax: 0.13m, |
|
|
|
parent: string.Empty, |
|
|
|
preTaxDiff: 0, |
|
|
|
taxDiff: 0, |
|
|
|
clientCode: string.Empty, |
|
|
|
realAmt: realAmt |
|
|
|
|
|
|
|
); |
|
|
|
string site = dtos.FirstOrDefault().Site; |
|
|
|
string clientCode = string.Empty; |
|
|
|
|
|
|
|
switch(clientCode) |
|
|
|
{ |
|
|
|
case "1040": |
|
|
|
clientCode = "C001"; |
|
|
|
break; |
|
|
|
case "1046": |
|
|
|
clientCode = "C171"; |
|
|
|
break; |
|
|
|
default: |
|
|
|
clientCode = "C004"; |
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
invbill.ClientCode = clientCode; |
|
|
|
invbill.Site= dtos.FirstOrDefault().Site; |
|
|
|
invbill.CreationTime = DateTime.Now; |
|
|
|
invlist.Add(invbill); |
|
|
@ -1748,7 +1789,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
invGroupNum: p_InvGroupNum, |
|
|
|
state: SettleBillState.已开票, |
|
|
|
invoiceBillState: InvoiceBillState.正常, |
|
|
|
tax: 0, |
|
|
|
tax: 0.13m, |
|
|
|
parent: p_parentInvBillNum, |
|
|
|
preTaxDiff:0, |
|
|
|
taxDiff:0, |
|
|
@ -1965,6 +2006,25 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
notDetialList.AddRange(innotls); |
|
|
|
} |
|
|
|
} |
|
|
|
string site = dtos.FirstOrDefault().Site; |
|
|
|
string clientCode = string.Empty; |
|
|
|
|
|
|
|
switch (clientCode) |
|
|
|
{ |
|
|
|
case "1040": |
|
|
|
clientCode = "C001"; |
|
|
|
break; |
|
|
|
case "1046": |
|
|
|
clientCode = "C171"; |
|
|
|
break; |
|
|
|
default: |
|
|
|
clientCode = "C004"; |
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var invbill = new INVOICE_GRP |
|
|
|
(guid: GuidGenerator.Create(), |
|
|
|
realnvBillNum: string.Empty, |
|
|
@ -1976,7 +2036,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
invGroupNum: p_InvGroupNum, |
|
|
|
state: SettleBillState.已开票, |
|
|
|
invoiceBillState: InvoiceBillState.正常, |
|
|
|
tax: 0, |
|
|
|
tax: 0.13m, |
|
|
|
parent: string.Empty, |
|
|
|
preTaxDiff: 0, |
|
|
|
taxDiff: 0, |
|
|
@ -1984,6 +2044,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
realAmt: realAmt |
|
|
|
); |
|
|
|
invbill.Site = dtos.FirstOrDefault().Site; |
|
|
|
invbill.ClientCode = clientCode; |
|
|
|
invbill.CreationTime = DateTime.Now; |
|
|
|
invlist.Add(invbill); |
|
|
|
} |
|
|
@ -2309,7 +2370,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
invGroupNum: p_InvGroupNum, |
|
|
|
state: SettleBillState.已开票, |
|
|
|
invoiceBillState: InvoiceBillState.正常, |
|
|
|
tax: 0, |
|
|
|
tax: 0.13m, |
|
|
|
parent: string.Empty, |
|
|
|
preTaxDiff: 0, |
|
|
|
taxDiff: 0, |
|
|
@ -2317,6 +2378,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
realAmt: 0 |
|
|
|
); |
|
|
|
invbill.CreationTime = DateTime.Now; |
|
|
|
invbill.ClientCode = "C001"; |
|
|
|
invlist.Add(invbill); |
|
|
|
} |
|
|
|
await _repository.DbContext.BulkInsertAsync(invlist); |
|
|
|