This commit is contained in:
@@ -563,7 +563,7 @@ namespace AyaNovaQBI
|
||||
{
|
||||
await IntegrationLog($"PFC: QB Company name= {QCompanyName}, QB Country version={QCountry}, QBVersion={QVersion}, Companyfile={QCompanyFile}");
|
||||
await PopulateQBListCache();
|
||||
//PFC - PopulateAyaListCache()
|
||||
await PopulateAyaListCache();
|
||||
|
||||
|
||||
//PFC - Validate settings, create if necessary (Util.ValidateSettings()) and save
|
||||
@@ -2448,6 +2448,134 @@ namespace AyaNovaQBI
|
||||
#endregion
|
||||
|
||||
|
||||
#region AyaNova cached lists
|
||||
public async static Task PopulateAyaListCache()
|
||||
{
|
||||
//Get the cached QB data
|
||||
Waiting w = new Waiting();
|
||||
w.Show();
|
||||
w.Ops = "Reading from AyaNova...";
|
||||
|
||||
w.Step = "Clients";
|
||||
//todo: qBI requires id, name and active for matching only
|
||||
await PopulateAyaClientList();
|
||||
|
||||
w.Step = "Vendors";
|
||||
//TODO: QBI requires id, name and active status for vendors only, it used to need vendortype but they don't exist in v8, maybe tags sb fetched?
|
||||
await PopulateAyaVendorList();
|
||||
|
||||
w.Step = "Rates";
|
||||
await PopulateAyaServiceRateList();//todo: requires id, name, rate type (travel or service), charge amount, perhaps break into two??
|
||||
|
||||
w.Step = "Parts";
|
||||
await PopulateAyaPartList();//todo: requires id, name, cost, retail/charge,
|
||||
|
||||
w.Close();
|
||||
}
|
||||
|
||||
#region AyaNova clients
|
||||
|
||||
private static List<NameIdActiveItem> _clientlist = null;
|
||||
/// <summary>
|
||||
/// AyaNova ClientPickList
|
||||
/// </summary>
|
||||
public static List<NameIdActiveItem> AyaClientList
|
||||
{
|
||||
get
|
||||
{
|
||||
return _clientlist;
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task PopulateAyaClientList()
|
||||
{
|
||||
_clientlist = ClientPickList.GetList();
|
||||
}
|
||||
|
||||
#endregion ayanova clients
|
||||
|
||||
#region AyaNova Vendors
|
||||
|
||||
private static List<NameIdActiveItem> _vendorlist = null;
|
||||
/// <summary>
|
||||
/// AyaNova vendor list
|
||||
/// </summary>
|
||||
public static List<NameIdActiveItem> AyaVendorList
|
||||
{
|
||||
get
|
||||
{
|
||||
return _vendorlist;
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task PopulateAyaVendorList()
|
||||
{
|
||||
_vendorlist = VendorPickList.GetList();
|
||||
}
|
||||
|
||||
#endregion ayanova vendors
|
||||
|
||||
#region AyaNova Rates
|
||||
|
||||
private static List<NameIdActiveChargeCostItem> _ServiceRatelist = null;
|
||||
/// <summary>
|
||||
/// AyaNova service rate list
|
||||
/// </summary>
|
||||
public static List<NameIdActiveChargeCostItem> AyaServiceRateList
|
||||
{
|
||||
get
|
||||
{
|
||||
return _ServiceRatelist;
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task PopulateAyaServiceRateList()
|
||||
{
|
||||
_ServiceRatelist = RatePickList.GetListAllActiveRates();
|
||||
}
|
||||
|
||||
|
||||
private static List<NameIdActiveChargeCostItem> _TravelRatelist = null;
|
||||
/// <summary>
|
||||
/// AyaNova Travel rate list
|
||||
/// </summary>
|
||||
public static List<NameIdActiveChargeCostItem> AyaTravelRateList
|
||||
{
|
||||
get
|
||||
{
|
||||
return _TravelRatelist;
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task PopulateAyaTravelRateList()
|
||||
{
|
||||
_TravelRatelist = RatePickList.GetListAllActiveRates();
|
||||
}
|
||||
#endregion ayanova rates
|
||||
|
||||
#region AyaNova Parts
|
||||
|
||||
private static List<NameIdActiveChargeCostItem> _partlist = null;
|
||||
/// <summary>
|
||||
/// AyaNova part list
|
||||
/// </summary>
|
||||
public static List<NameIdActiveChargeCostItem> AyaPartList
|
||||
{
|
||||
get
|
||||
{
|
||||
return _partlist;
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task PopulateAyaPartList()
|
||||
{
|
||||
_partlist = PartPickList.GetAllParts();
|
||||
}
|
||||
|
||||
#endregion ayanova parts
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#endregion qb stuff
|
||||
|
||||
|
||||
Reference in New Issue
Block a user