You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per your suggestion, I am retrieving voucher first. And then immediately posting same voucher without any modification, via PostVoucherAsync() method. Still Tally is creating new voucher, insteading of updating existing one.
voucher = await tally.GetVoucherAsync<TCM.Voucher>(_invoice.Tally_MasterId.ToString(), new TCM.VoucherRequestOptions()
{
LookupField = TCM.VoucherLookupField.MasterId,
FetchList = TCM.Constants.Voucher.InvoiceViewFetchList.All
});
if (voucher != null)
{
var resultVT = await tally.PostVoucherAsync<TCM.Voucher>(voucher);
if (resultVT.Status == TCM.RespStatus.Sucess)
{
var y = System.Text.RegularExpressions.Regex.Matches(resultVT.Response!, @"[0-9.]+")[0].Value;
_invoice.Tally_MasterId = int.Parse(y ?? "0");
_context.Invoices.Update(_invoice);
await _context.SaveChangesAsync();
}
}
Originally posted by @drparasmehta in #5 (comment)
The text was updated successfully, but these errors were encountered: