This commit is contained in:
2022-07-10 02:05:48 +00:00
parent 2c6dd7a90b
commit 0f3ad85a45

View File

@@ -48,16 +48,16 @@ namespace AyaNovaQBI
{ {
#region price problem #region price problem
FixPriceDifference d = new FixPriceDifference(); FixPriceDifference d = new FixPriceDifference();
d.PriceDescription = e.Cell.Row.Cells["Name"].Value.ToString() + "\r\n" + d.OptionTitle = mm.Name + "\r\n" +
"Price on work order: " + ((decimal)e.Cell.Row.Cells["AyaPrice"].Value).ToString("c") + "\r\n" + "Price on work order: " + mm.AyaPrice.ToString("c") + "\r\n" +
"Price in QuickBooks: " + ((decimal)e.Cell.Row.Cells["QBPrice"].Value).ToString("c"); "Price in QuickBooks: " + mm.QBPrice.ToString("c");
if (d.ShowDialog() == DialogResult.Cancel) return; if (d.ShowDialog() == DialogResult.Cancel) return;
//Fixup price here //Fixup price here
switch (d.SelectedResolution) switch (d.SelectedResolution)
{ {
case "AYAONCE": case "AYAONCE":
//Add to price override list so price on workorder item part record is used //Add to price override list so price on workorder item part record is used
_PartPriceOverrides.Add((Guid)e.Cell.Row.Cells["WorkorderItemPartID"].Value); PartPriceOverrides.Add(mm.WorkOrderItemPartId);
break; break;
case "QBONCE": case "QBONCE":
{ {
@@ -116,13 +116,13 @@ namespace AyaNovaQBI
break; break;
case "CHANGEQB": case "CHANGEQB":
//Change the QB price to use the price on this workorder item part //Change the QB price to use the price on this workorder item part
util.ChangeQBItemPrice(e.Cell.Row.Cells["QBListID"].Value.ToString(), (decimal)e.Cell.Row.Cells["AyaPrice"].Value); await util.ChangeQBItemPrice(mm.QBListID, mm.AyaPrice);
break; break;
} }
//remove the object from the grid as it's now dealt with //remove the object from the grid as it's now dealt with
e.Cell.Row.Delete(false); e.Cell.Row.Delete(false);
_ChangesMade = true; ChangesMade = true;
//If all done then close up //If all done then close up
if (grid.Rows.Count == 0) if (grid.Rows.Count == 0)
this.Close(); this.Close();