This commit is contained in:
@@ -3912,7 +3912,7 @@ namespace AyaNovaQBI
|
|||||||
//Link
|
//Link
|
||||||
var m = new IntegrationItem { AType = AyaType.Vendor, IntegrationItemName = sName, IntegrationItemId = QuickBooksID, LastSync = DateTime.Now, ObjectId = newId };
|
var m = new IntegrationItem { AType = AyaType.Vendor, IntegrationItemName = sName, IntegrationItemId = QuickBooksID, LastSync = DateTime.Now, ObjectId = newId };
|
||||||
QBIntegration.Items.Add(m);
|
QBIntegration.Items.Add(m);
|
||||||
await util.SaveIntegrationObject();
|
await util.SaveIntegrationObject();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -4025,7 +4025,7 @@ namespace AyaNovaQBI
|
|||||||
}
|
}
|
||||||
|
|
||||||
string sName = dr["FullName"].ToString();
|
string sName = dr["FullName"].ToString();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//already a Rate by that name
|
//already a Rate by that name
|
||||||
@@ -4037,7 +4037,7 @@ namespace AyaNovaQBI
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Import seems safe...
|
//Import seems safe...
|
||||||
|
|
||||||
TravelRate c = new TravelRate();
|
TravelRate c = new TravelRate();
|
||||||
c.Name = sName;
|
c.Name = sName;
|
||||||
c.Charge = (decimal)dr["Price"];
|
c.Charge = (decimal)dr["Price"];
|
||||||
@@ -4045,7 +4045,7 @@ namespace AyaNovaQBI
|
|||||||
c.Cost = (decimal)dr["Cost"];
|
c.Cost = (decimal)dr["Cost"];
|
||||||
c.Notes = T(255, dr["SalesDesc"].ToString());
|
c.Notes = T(255, dr["SalesDesc"].ToString());
|
||||||
c.Active = true;
|
c.Active = true;
|
||||||
|
|
||||||
var r = await PostAsync($"travel-rate", Newtonsoft.Json.JsonConvert.SerializeObject(c));
|
var r = await PostAsync($"travel-rate", Newtonsoft.Json.JsonConvert.SerializeObject(c));
|
||||||
long newId = IdFromResponse(r);
|
long newId = IdFromResponse(r);
|
||||||
|
|
||||||
@@ -5069,6 +5069,9 @@ 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);
|
||||||
|
|
||||||
|
if (QVersion > 6.0)//new v8
|
||||||
|
ca.ManufacturerPartNumber.SetValue(T(31, c.ManufacturerNumber));
|
||||||
|
|
||||||
//Set the QB item identification and edit sequence
|
//Set the QB item identification and edit sequence
|
||||||
ca.ListID.SetValue(im.IntegrationItemId);
|
ca.ListID.SetValue(im.IntegrationItemId);
|
||||||
ca.EditSequence.SetValue(sEditSequence);
|
ca.EditSequence.SetValue(sEditSequence);
|
||||||
@@ -5255,6 +5258,9 @@ 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);
|
||||||
|
|
||||||
|
if (QVersion > 6.0)//new v8
|
||||||
|
ca.ManufacturerPartNumber.SetValue(T(31, c.ManufacturerNumber));
|
||||||
|
|
||||||
|
|
||||||
if (USE_INVENTORY)
|
if (USE_INVENTORY)
|
||||||
{
|
{
|
||||||
@@ -5264,7 +5270,7 @@ namespace AyaNovaQBI
|
|||||||
var partinventories = rstocklevel.ObjectResponse["data"].ToObject<List<PartInventory>>();
|
var partinventories = rstocklevel.ObjectResponse["data"].ToObject<List<PartInventory>>();
|
||||||
|
|
||||||
ca.QuantityOnHand.SetValue((double)partinventories.Sum(z => z.Balance));
|
ca.QuantityOnHand.SetValue((double)partinventories.Sum(z => z.Balance));
|
||||||
ca.ReorderPoint.SetValue((double)partstocklevels.Sum(z=>z.MinimumQuantity));
|
ca.ReorderPoint.SetValue((double)partstocklevels.Sum(z => z.MinimumQuantity));
|
||||||
}
|
}
|
||||||
//------------------------
|
//------------------------
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user