check customer ledger is null or not before binding
This commit is contained in:
parent
777aff085e
commit
f02504d76d
|
|
@ -331,6 +331,8 @@ public class MobileMasterDataService : IMobileMasterDataService
|
|||
if (!string.IsNullOrWhiteSpace(request.CustomerCode))
|
||||
{
|
||||
var customerLedger = await _httpService.GetCustomerLedgerAsync(request.CustomerCode, companyCode);
|
||||
if(customerLedger != null)
|
||||
{
|
||||
response.Items = response.Items.Select(x =>
|
||||
{
|
||||
x.CreditBalance = customerLedger.CurrentBalance;
|
||||
|
|
@ -339,6 +341,7 @@ public class MobileMasterDataService : IMobileMasterDataService
|
|||
}).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ie)
|
||||
{
|
||||
tc?.HandleError();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user