发票申请参数传递

dev
嵇文龙 3 weeks ago
parent 8eccfdec31
commit 8b9beff236

@ -249,6 +249,9 @@ namespace DS.WMS.Core.Application.Method
FeeType = f.FeeType,
Amount = f.Amount,
Currency = f.Currency,
OriginalAmount = f.Amount,
OriginalCurrency = f.Currency,
TaxRate = f.TaxRate,
RestAmount = f.Amount - f.InvoiceAmount - f.OrderInvoiceAmount + f.OrderInvSettlementAmount,
Remark = f.Remark,
CreateBy = f.CreateBy

@ -137,7 +137,7 @@
/// <summary>
/// 购买方自然人标志
/// </summary>
public string gmfzrrbz { get; set; } = "Y";
public string? gmfzrrbz { get; set; }
/// <summary>
/// 特定要素
/// </summary>

@ -1,5 +1,4 @@
using System.Reflection.Emit;
using DS.Module.Core;
using DS.Module.Core;
using DS.Module.Core.Enums;
using DS.WMS.Core.Application.Entity;
using DS.WMS.Core.Application.Method;
@ -12,7 +11,6 @@ using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json.Linq;
using SqlSugar;
using static AnyDiff.DifferenceLines;
namespace DS.WMS.Core.Invoice.Method
{
@ -158,7 +156,7 @@ namespace DS.WMS.Core.Invoice.Method
{
var result2 = DataResult.Success;
var invoices = await TenantDb.Queryable<Entity.Invoice>()
.Where(x => x.SN == sn)
.Where(x => x.SN == sn && !SqlFunc.IsNullOrEmpty(x.PDFUrl))
.Select(x => new Entity.Invoice
{
SN = x.SN,

@ -186,7 +186,6 @@ namespace DS.WMS.Core.Invoice.Method
return Task.FromResult(DataResult<InvoiceApplicaitonBiz>.Success(new InvoiceApplicaitonBiz([])));
}
#pragma warning disable CS4014
/// <summary>
@ -223,6 +222,7 @@ namespace DS.WMS.Core.Invoice.Method
if (invoice.PushModeValues.Length > 0)
invoice.PushMode = string.Join(",", invoice.PushModeValues.Select(x => (int)x));
string? invRemark = null;
//按申请开票
if (request.Invoice.Mode == InvoiceMode.Applcation && request.Applications?.Count > 0)
{
@ -262,11 +262,11 @@ namespace DS.WMS.Core.Invoice.Method
z.BankName
}).ToListAsync();
invRemark = string.Join(" | ", details.Where(x => !string.IsNullOrEmpty(x.InvoiceRemark)).Select(x => x.InvoiceRemark));
//税率不一致
if (details.GroupBy(x => x.TaxRate).Select(x => x.Key).Count() > 1)
return DataResult<TEntity>.FailedWithDesc(nameof(MultiLanguageConst.InconsistentTaxRates));
invoice.InvoiceRemark = string.Join(" | ", details.Where(x => !string.IsNullOrEmpty(x.InvoiceRemark)).Select(x => x.InvoiceRemark));
invoice.Details ??= new List<ApplicationDetail>(details.Count);
foreach (var item in details)
{
@ -450,7 +450,7 @@ namespace DS.WMS.Core.Invoice.Method
invoice.CustomerAccount = clientBank.Account;
invoice.CustomerBankName = clientBank.BankName;
}
}
}
//补充销方信息
//var org = await Db.Queryable<SysOrg>().Where(x => x.Id == User.OrgId).Select(x => new { x.OrgFullName, x.LicenseCode }).FirstAsync();
@ -470,6 +470,12 @@ namespace DS.WMS.Core.Invoice.Method
invoice.BankName = orgBank.BankName;
invoice.Account = orgBank.BankAccountNo;
}
//生成默认备注
//invoice.InvoiceRemark = $"购买方地址电话:" + Environment.NewLine + invoice.CustomerAddressTel + Environment.NewLine
// + "购买方开户行/账号:" + invoice.CustomerBankName + " " + invoice.CustomerAccount;
if (!string.IsNullOrEmpty(invRemark))
invoice.Note += Environment.NewLine + invRemark;
}
//筛选出新增的费用明细
@ -525,6 +531,7 @@ namespace DS.WMS.Core.Invoice.Method
x.PushMode,
x.CellPhoneNO,
x.Email,
//x.InvoiceRemark,
x.Note
}).ExecuteCommandAsync();

Loading…
Cancel
Save