This commit is contained in:
12
AyaNovaQBI/PartInventory.cs
Normal file
12
AyaNovaQBI/PartInventory.cs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace AyaNovaQBI
|
||||||
|
{
|
||||||
|
internal class PartInventory
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
12
AyaNovaQBI/PartStockLevel.cs
Normal file
12
AyaNovaQBI/PartStockLevel.cs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace AyaNovaQBI
|
||||||
|
{
|
||||||
|
internal class PartStockLevel
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -46,6 +46,7 @@ namespace AyaNovaQBI
|
|||||||
internal static QBIIntegrationData QDat { get; set; } = null;
|
internal static QBIIntegrationData QDat { get; set; } = null;
|
||||||
internal static bool LOG_AVAILABLE { get; set; } = false;
|
internal static bool LOG_AVAILABLE { get; set; } = false;
|
||||||
|
|
||||||
|
internal static bool USE_INVENTORY { get; set; } = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -561,6 +562,35 @@ namespace AyaNovaQBI
|
|||||||
return false;
|
return false;
|
||||||
LOG_AVAILABLE = true;
|
LOG_AVAILABLE = true;
|
||||||
|
|
||||||
|
//PFC - get global setttings for use inventory and others await window.$gz.api.get("global-biz-setting/client");
|
||||||
|
r = await GetAsync("global-biz-setting/client");
|
||||||
|
USE_INVENTORY=r.ObjectResponse["data"]["UseInventory"].Value<bool>();
|
||||||
|
//return object for future reference
|
||||||
|
//var ret = new
|
||||||
|
//{
|
||||||
|
// //Actual global settings:
|
||||||
|
// FilterCaseSensitive = AyaNova.Util.ServerGlobalBizSettings.Cache.FilterCaseSensitive,
|
||||||
|
// UseInventory = AyaNova.Util.ServerGlobalBizSettings.Cache.UseInventory,
|
||||||
|
// DefaultTaxPartSaleId = AyaNova.Util.ServerGlobalBizSettings.Cache.TaxPartSaleId,
|
||||||
|
// DefaultTaxPartPurchaseId = AyaNova.Util.ServerGlobalBizSettings.Cache.TaxPartPurchaseId,
|
||||||
|
// DefaultTaxRateSaleId = AyaNova.Util.ServerGlobalBizSettings.Cache.TaxRateSaleId,
|
||||||
|
// WorkOrderTravelDefaultMinutes = AyaNova.Util.ServerGlobalBizSettings.Cache.WorkOrderTravelDefaultMinutes,
|
||||||
|
// WorkLaborScheduleDefaultMinutes = AyaNova.Util.ServerGlobalBizSettings.Cache.WorkLaborScheduleDefaultMinutes,
|
||||||
|
// SignatureTitle = AyaNova.Util.ServerGlobalBizSettings.Cache.SignatureTitle,
|
||||||
|
// SignatureHeader = AyaNova.Util.ServerGlobalBizSettings.Cache.SignatureHeader,
|
||||||
|
// SignatureFooter = AyaNova.Util.ServerGlobalBizSettings.Cache.SignatureFooter,
|
||||||
|
// CSRInfoText = AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerServiceRequestInfoText,
|
||||||
|
|
||||||
|
|
||||||
|
// //used to drive UI in case of unlicensed or attention required
|
||||||
|
// LicenseStatus = AyaNova.Core.License.ActiveKey.Status,
|
||||||
|
// MaintenanceExpired = AyaNova.Core.License.ActiveKey.MaintenanceExpired,
|
||||||
|
// ServerDbId = AyaNova.Core.License.ServerDbId,
|
||||||
|
// Company = AyaNova.Core.License.ActiveKey.RegisteredTo
|
||||||
|
|
||||||
|
//};
|
||||||
|
|
||||||
|
|
||||||
await IntegrationLog($"PFC: AyaNova user \"{AyaNovaUserName}\" starting QBI session, pre-flight check (PFC) commencing...");
|
await IntegrationLog($"PFC: AyaNova user \"{AyaNovaUserName}\" starting QBI session, pre-flight check (PFC) commencing...");
|
||||||
|
|
||||||
//QB CONNECTION validation and setup
|
//QB CONNECTION validation and setup
|
||||||
@@ -5186,8 +5216,8 @@ namespace AyaNovaQBI
|
|||||||
ca.SalesPrice.SetValue((double)c.Retail);
|
ca.SalesPrice.SetValue((double)c.Retail);
|
||||||
ca.PurchaseCost.SetValue((double)c.Cost);
|
ca.PurchaseCost.SetValue((double)c.Cost);
|
||||||
|
|
||||||
HERE TODO NEXT
|
|
||||||
if (AyaBizUtils.GlobalSettings.UseInventory)
|
if (USE_INVENTORY)
|
||||||
{
|
{
|
||||||
PartInventoryValuesFetcher pbw = PartInventoryValuesFetcher.GetItem(c.ID);
|
PartInventoryValuesFetcher pbw = PartInventoryValuesFetcher.GetItem(c.ID);
|
||||||
ca.QuantityOnHand.SetValue((double)pbw.QuantityOnHand);
|
ca.QuantityOnHand.SetValue((double)pbw.QuantityOnHand);
|
||||||
|
|||||||
Reference in New Issue
Block a user