This commit is contained in:
@@ -2427,11 +2427,26 @@ namespace AyaNova.Biz
|
|||||||
if (calculateTotalsOnly == false)
|
if (calculateTotalsOnly == false)
|
||||||
{
|
{
|
||||||
if (o.UserId != null)
|
if (o.UserId != null)
|
||||||
o.UserViz = await ct.User.AsNoTracking().Where(x => x.Id == o.UserId).Select(x => x.Name).FirstOrDefaultAsync();
|
{
|
||||||
|
if (!vc.Has("user", o.UserId))
|
||||||
|
{
|
||||||
|
vc.Add(await ct.User.AsNoTracking().Where(x => x.Id == o.UserId).Select(x => x.Name).FirstOrDefaultAsync(), "user", o.UserId);
|
||||||
|
}
|
||||||
|
o.UserViz = vc.Get("user", o.UserId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
TaxCode Tax = null;
|
TaxCode Tax = null;
|
||||||
if (o.ChargeTaxCodeId != null)
|
if (o.ChargeTaxCodeId != null)
|
||||||
|
{
|
||||||
|
if (!oc.Has("tax", o.ChargeTaxCodeId))
|
||||||
|
{
|
||||||
Tax = await ct.TaxCode.AsNoTracking().FirstOrDefaultAsync(z => z.Id == o.ChargeTaxCodeId);
|
Tax = await ct.TaxCode.AsNoTracking().FirstOrDefaultAsync(z => z.Id == o.ChargeTaxCodeId);
|
||||||
|
oc.Add(Tax, "tax", o.ChargeTaxCodeId);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Tax = (TaxCode)oc.Get("tax", o.ChargeTaxCodeId);
|
||||||
|
}
|
||||||
|
|
||||||
if (Tax != null)
|
if (Tax != null)
|
||||||
o.TaxCodeViz = Tax.Name;
|
o.TaxCodeViz = Tax.Name;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user