static void TestVoidInvoice()
{
try
{
SalesAPI api = new SalesAPI();
pcAmerica.DesktopPOS.API.Client.SalesService.Context context = new pcAmerica.DesktopPOS.API.Client.SalesService.Context();
context.CashierID = "100101";
context.StoreID = "1001";
context.StationID = "01";
Console.WriteLine("Enter an invoice number to void: ");
string answer = Console.ReadLine();
Console.WriteLine("Send voided invoice to the kitchen printer?" + Environment.NewLine + "1 for YES" + Environment.NewLine + "0 for NO");
string answer2 = Console.ReadLine();
api.VoidInvoice(context, Convert.ToInt64(answer), answer2 == "1" ? true : false );
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
finally
{
Console.WriteLine("PRESS ENTER TO CONTINUE...");
Console.ReadLine();
}
}