Browse Source

更新版本

master
学 赵 1 year ago
parent
commit
2f7be99616
  1. 36
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs
  2. 11
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs
  3. 12
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs
  4. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs

36
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs

@ -38,7 +38,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary>
[Display(Name = "税后金额")]
public decimal TaxAmt { get; set; }
[Display(Name = "发票金额")]
[Display(Name = "税额")]
public decimal RealAmt { get; set; }
/// <summary>
///发票分组号
@ -57,9 +57,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[Display(Name = "发票状态")]
public InvoiceBillState InvoiceState { get; set; }
[Display(Name = "发票税后尾差")]
[Display(Name = "发票尾差")]
public decimal TaxDiff { get; set; }
[Display(Name = "发票金额含尾差")]
public decimal TaxAmtDiff { get; set; }
[Display(Name = "客户代码")]
public string ClientCode { get; set; }
}
@ -77,12 +80,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[Display(Name = "未税金额")]
public decimal Amt { get; set; }
/// <summary>
///未税金额
/// </summary>
[Display(Name = "税率")]
public decimal Tax { get; set; }
[Display(Name = "税额")]
public decimal RealAmt { get; set; }
/// <summary>
///税后金额
@ -90,8 +90,13 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[Display(Name = "税后金额")]
public decimal TaxAmt { get; set; }
[Display(Name = "税额")]
public decimal RealAmt { get; set; }
[Display(Name = "税率")]
public decimal Tax { get; set; }
/// <summary>
///发票分组号
/// </summary>
@ -123,16 +128,25 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary>
[ExporterHeader(DisplayName = "未税金额")]
public decimal Amt { get; set; }
[Display(Name = "税额")]
public decimal RealAmt { get; set; }
/// <summary>
///税额
/// </summary>
[ExporterHeader(DisplayName = "税率")]
public decimal Tax { get; set; }
//[ExporterHeader(DisplayName = "税率")]
//public decimal Tax { get; set; }
/// <summary>
///税后金额
/// </summary>
[ExporterHeader(DisplayName = "税后金额")]
public decimal TaxAmt { get; set; }
[ExporterHeader(DisplayName = "发票尾差")]
public decimal TaxDiff { get; set; }
[ExporterHeader(DisplayName = "发票金额含尾差")]
public decimal TaxAmtDiff { get; set; }
/// <summary>
///业务类别
/// </summary>

11
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs

@ -140,6 +140,11 @@ namespace Win.Sfs.SettleAccount.Bases
var entitys = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount);
var totalCount = await _repository.GetCountByFilterAsync(input.Filters);
var dtos = ObjectMapper.Map<List<INVOICE_GRP>, List<INVOICE_GRP_DTO>>(entitys);
foreach (var itm in dtos)
{
itm.TaxAmtDiff = itm.TaxAmt + itm.TaxDiff;
}
return new PagedResultDto<INVOICE_GRP_DTO>(totalCount, dtos);
}
/// <summary>
@ -305,6 +310,12 @@ namespace Win.Sfs.SettleAccount.Bases
IExporter _excel = new ExcelExporter();
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true);
var dtoDetails = ObjectMapper.Map<List<INVOICE_GRP>, List<INVOICE_GRP_EXP_DTO>>(entities);
foreach (var itm in dtoDetails)
{
itm.TaxAmtDiff = itm.TaxAmt + itm.TaxDiff;
}
var classDisplayName = typeof(INVOICE_GRP_DTO).GetCustomAttribute<DisplayAttribute>()?.Name ?? typeof(INVOICE_GRP_DTO).Name;
string _fileName = $"{classDisplayName}_{Guid.NewGuid().ToString()}.xlsx";
byte[] result = null;

12
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs

@ -142,6 +142,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var entitys = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount);
var totalCount = await _repository.GetCountByFilterAsync(input.Filters);
var dtos = ObjectMapper.Map<List<INVOICE_GRP>, List<INVOICE_GRP_DTO>>(entitys);
foreach (var itm in dtos)
{
itm.TaxAmtDiff = itm.TaxAmt + itm.TaxDiff;
}
return new PagedResultDto<INVOICE_GRP_DTO>(totalCount, dtos);
}
/// <summary>
@ -316,6 +320,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true);
var dtoDetails = ObjectMapper.Map<List<INVOICE_GRP>, List<INVOICE_GRP_EXP_DTO>>(entities);
foreach (var itm in dtoDetails)
{
itm.TaxAmtDiff = itm.TaxAmt + itm.TaxDiff;
}
var classDisplayName = typeof(INVOICE_GRP_DTO).GetCustomAttribute<DisplayAttribute>()?.Name ?? typeof(INVOICE_GRP_DTO).Name;
string _fileName = $"{classDisplayName}_{Guid.NewGuid().ToString()}.xlsx";
byte[] result = null;
@ -655,7 +665,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
// inv.RealAmt = newinv.RealAmt;
inv.TaxDiff =inv.TaxAmt+ newinv.PreTaxDiff;
inv.ClientCode = newinv.ClientCode;
// inv.ClientCode = newinv.ClientCode;
}
foreach (var detail in invdetail)
{

3
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs

@ -1392,8 +1392,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
EndDate = itm.Key.EndDate
}).ToList();
decimal amt = detailDtos.Sum(k => k.Amt);//金额
decimal txtAmt =detailDtos.Sum(k => k.Amt) + Math.Round(detailList.Sum(k => k.Amt) * 0.13m, 2);//税后金额
decimal txtAmt =detailDtos.Sum(k => k.Amt) + Math.Round(detailDtos.Sum(k => k.Amt) * 0.13m, 2);//税后金额
decimal realAmt = Math.Round(detailDtos.Sum(k => k.Amt) * 0.13m, 2);//税额
//decimal amt = detailDtos.Sum(k => k.Amt);
//decimal txtAmt = Math.Round(detailDtos.Sum(k => k.Amt), 2);
var mapList = new List<INVOICE_MAP_GROUP>();

Loading…
Cancel
Save