This commit is contained in:
mmrbnjd
2025-01-20 14:10:15 +03:30
parent 25c72b2eb5
commit a296f31d74
8 changed files with 409 additions and 64 deletions

View File

@@ -122,6 +122,17 @@ namespace Back.Services.Warehouse
{
return await _ReceiptRepo.Get(w => w.InvoiceID == InvoiceID && w.CODID==CODID && !w.Deleted).AnyAsync();
}
public async Task<bool> ChangeRemittance(int InvoiceID, int CODID,int newnvoceID)
{
var item= await _ReceiptRepo.Get(w => w.InvoiceID == InvoiceID && w.CODID == CODID && !w.Deleted).FirstOrDefaultAsync();
if (item!=null)
{
item.InvoiceID = newnvoceID;
item.info = $"حواله خودکار از صورتحساب {newnvoceID}";
return await _ReceiptRepo.UpdateAsync(item);
}
return false;
}
public async Task DeleteByInvoiceIDandCODID(int InvoiceID, int CODID)
{
var model = await _ReceiptRepo.Get(w => w.InvoiceID == InvoiceID && w.CODID == CODID && !w.Deleted).FirstOrDefaultAsync();