diff --git a/AyaNovaQBI/MainForm.cs b/AyaNovaQBI/MainForm.cs index b9d6964..9a069fa 100644 --- a/AyaNovaQBI/MainForm.cs +++ b/AyaNovaQBI/MainForm.cs @@ -73,7 +73,7 @@ namespace AyaNovaQBI if (!isLinked) { - grid.Rows[e.RowIndex].ErrorText = "Not invoiceable: use \"Invoice\" -> \"Fix problems\" to resolve"; + grid.Rows[e.RowIndex].ErrorText = "Not invoiceable: use \"Work orders\" -> \"Fix problems\" to resolve"; } else { @@ -113,12 +113,18 @@ namespace AyaNovaQBI private void fixProblemsToolStripMenuItem_Click(object sender, EventArgs e) { - MessageBox.Show("STUB: FIX PROBLEMS"); + FixInvoiceProblems d = new FixInvoiceProblems(); + d.MisMatches = _MisMatches; + d.PartPriceOverrides = _PartPriceOverrides; + d.ShowDialog(); + if (d.ChangesMade) + InitInvoices(); + d.Dispose(); } - private void refreshInvoicesToolStripMenuItem_Click(object sender, EventArgs e) + private async void refreshInvoicesToolStripMenuItem_Click(object sender, EventArgs e) { - MessageBox.Show("STUB: REFRESH INVOICES"); + await InitInvoices(); } private async void preferencesToolStripMenuItem_Click(object sender, EventArgs e) @@ -269,7 +275,7 @@ namespace AyaNovaQBI row["Color"] = z.Color; row["CustomerId"] = z.CustomerId; row["Id"] = z.Id; - row["Linked"]= util.ScanLinksOK(z.Id, _MisMatches, _PartPriceOverrides); + row["Linked"]= await util.ScanLinksOK(z.Id, _MisMatches, _PartPriceOverrides); _GridTable.Rows.Add(row); } grid.DataSource = _GridTable;