This commit is contained in:
@@ -339,9 +339,9 @@ namespace AyaNova.Biz
|
||||
//
|
||||
internal async Task<List<WorkOrderAccountingListItem>> GetAccountingListBillable(long workOrderStatusId)
|
||||
{
|
||||
|
||||
|
||||
//if a specific status is requested then it doesn't matter if it's locked or not but if a specific status is not requested then any locked status is acceptable
|
||||
string statusFragment=workOrderStatusId==0?"and aworkorderstatus.locked=true":$"and aworkorder.laststatusid={workOrderStatusId}";
|
||||
string statusFragment = workOrderStatusId == 0 ? "and aworkorderstatus.locked=true" : $"and aworkorder.laststatusid={workOrderStatusId}";
|
||||
|
||||
var ret = new List<WorkOrderAccountingListItem>();
|
||||
using (var command = ct.Database.GetDbConnection().CreateCommand())
|
||||
@@ -364,16 +364,24 @@ namespace AyaNova.Biz
|
||||
{
|
||||
if (await dr.ReadAsync())
|
||||
{
|
||||
// o.LastWorkOrderViz = dr.GetInt64(0);
|
||||
// o.LastServiceDateViz = dr.GetDateTime(1);
|
||||
|
||||
var i = new WorkOrderAccountingListItem();
|
||||
i.Id = dr.GetInt64(0);
|
||||
i.CustomerId = dr.GetInt64(1);
|
||||
i.Serial = dr.GetInt64(2);
|
||||
if (!dr.IsDBNull(3))
|
||||
i.ServiceDate = dr.GetDateTime(3);
|
||||
i.CustomerName=dr.GetString(4);
|
||||
i.ProjectName=dr.GetString(5);
|
||||
i.WorkorderStatusName=dr.GetString(6);
|
||||
i.Color=dr.GetString(7);
|
||||
ret.Add(i);
|
||||
}
|
||||
}
|
||||
|
||||
await ct.Database.CloseConnectionAsync();
|
||||
}
|
||||
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user