...
This commit is contained in:
@@ -33,7 +33,7 @@ namespace Back.Services
|
||||
public int? Inp { get { return _invoice.inp ?? 1; } }
|
||||
public int? Ins { get { return _invoice.ins ?? 1; } }
|
||||
public string? Tins { get { return string.IsNullOrEmpty(_invoice.tins) ? null : _invoice.tins; } }
|
||||
public int? Tob { get { return level == 10 || _invoice.tob==0 ? null : _invoice.tob == 5 ? 1 : _invoice.tob == 6 ? 4 : _invoice.tob; } }
|
||||
public int? Tob { get { return level == 10 || _invoice.tob == 0 ? null : _invoice.tob == 5 ? 1 : _invoice.tob == 6 ? 4 : _invoice.tob; } }
|
||||
public string? Bid
|
||||
{
|
||||
get
|
||||
@@ -96,14 +96,22 @@ namespace Back.Services
|
||||
public decimal? Nw { get { return level == 10 ? bitem.nw : null; } }
|
||||
public decimal? Fee { get { return level == 4 ? null : bitem.fee; } }
|
||||
public decimal? Cfee { get { return bitem.cfee == 0 || level == 8 || level == 10 ? null : bitem.cfee; } }
|
||||
public string? Cut { get{ return level == 8 || string.IsNullOrEmpty(bitem.cut) ? null : bitem.cut; } }
|
||||
public string? Cut { get { return level == 8 || string.IsNullOrEmpty(bitem.cut) ? null : bitem.cut; } }
|
||||
public decimal? Exr { get { return level == 8 ? null : bitem.exr; } }
|
||||
public decimal? Ssrv { get { return level == 10 ? bitem.ssrv : null; } }
|
||||
public decimal? Sscv { get { return level == 10 ? bitem.sscv : null; } }
|
||||
public decimal? Prdis { get { return level == 10 ? null : bitem.prdis; } }
|
||||
public decimal? Dis { get { return level == 10 ? null : bitem.dis; } }
|
||||
public decimal? Adis { get { return level == 10 ? null : bitem.adis; } }
|
||||
public decimal? Vra { get { return bitem.vra; } }
|
||||
public decimal? Vra
|
||||
{
|
||||
get
|
||||
{
|
||||
return level == 14 ? 0
|
||||
:
|
||||
bitem.vra;
|
||||
}
|
||||
}
|
||||
public decimal? Vam { get { return bitem.vam; } }
|
||||
public string? Odt { get { return string.IsNullOrEmpty(bitem.odt) ? null : bitem.odt; } }
|
||||
public decimal? Odr { get { return bitem.odr; } }
|
||||
|
@@ -33,6 +33,7 @@ namespace Back.Services.Warehouse
|
||||
ForSale = item.ForSale,
|
||||
info = item.info,
|
||||
Type = item.Type,
|
||||
InvoiceID=item.InvoiceID,
|
||||
Deleted = false
|
||||
};
|
||||
var returnmodel = await _ReceiptRepo.AddAsync(model);
|
||||
@@ -88,7 +89,9 @@ namespace Back.Services.Warehouse
|
||||
var models = await _ReceiptRepo.Get(w => w.InvoiceID == InvoiceID && w.cODItem.CompanyID == CompanyID && !w.Deleted).ToListAsync();
|
||||
foreach (var model in models)
|
||||
model.Deleted = true;
|
||||
return await _ReceiptRepo.UpdateRangeAsync(models);
|
||||
if (models.Any())
|
||||
return await _ReceiptRepo.UpdateRangeAsync(models);
|
||||
return true;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -73,8 +73,9 @@ namespace Back.Services.Warehouse
|
||||
var models = await _ReceiptRepo.Get(w => w.InvoiceID == InvoiceID && w.cODItem.CompanyID == CompanyID && !w.Deleted).ToListAsync();
|
||||
foreach (var model in models)
|
||||
model.Deleted = true;
|
||||
if(models.Any())
|
||||
return await _ReceiptRepo.UpdateRangeAsync(models);
|
||||
|
||||
return true;
|
||||
}
|
||||
public async Task<bool> DeleteByCODIDAndInvoiceID(int InvoiceID, int CODID, int CompanyID)
|
||||
{
|
||||
|
Reference in New Issue
Block a user