private static void CloseAlohaTable(int Deposit, FCCIntegration.FCCCheck Chk) { if (AlohaTSClass.IsAlohaTS()) { AlohaTSClass.LogOut(AlohaTSClass.GetTermNum()); AlohaTSClass.RefreshCheckDisplay(); if (Chk.AllChkOnTable) { int CurId = 1; foreach (FCCIntegration.FCCDish ChekinTable in Chk.Dishes) { decimal oplata = ChekinTable.Price; if (CurId == Chk.Dishes.Count) { oplata += ChekinTable.Price + (Deposit - Chk.Ammount); } CurId++; RemoteCloseCheck.AddRemoteChkToQuere(ChekinTable.AlohaCheckNum, 1, CurrentEmpl, (decimal)((double)oplata / (double)100)); } } else { RemoteCloseCheck.AddRemoteChkToQuere(Chk.AlohId, 1, CurrentEmpl, (decimal)((Deposit) / (double)100)); } } else { RemoteCloseCheck.CloseAlohaTableLocalCurentUser(Chk.AlohId, 1, (decimal)(Deposit)); if (iniFile.CreditCardAutoOpenCheck) { AlohaTSClass.OpenEmptyCheck(); } } }
// delegate void DoPaymentsOperDelegate(int PaymentsCount, Check Chk); static private void DoPaymentsOper(int PaymentsCount, Check Chk) { Utils.ToCardLog("DoPaymentsOper TenderType = " + PaymentsCount.ToString()); if (PaymentsCount == 1) { FCC.SetBill(); } else if (PaymentsCount == 2) { /* * if (iniFile.InPasEnabled) * { * DualConnector.DualConnectorMain.Sale(); * } * */ // else if (iniFile.Arcus2Enabled) if (CreditCardAlohaIntegration.CreditCardConnectorEnabled) { string err = ""; CreditCardAlohaIntegration.RunOper(Chk); //DualConnector.DualConnectorMain.Sale(); } } else if (PaymentsCount == 4) { AlohaTSClass.LogOut(); RemoteCloseCheck.AddRemoteChkToQuere(Chk.AlohaCheckNum, 30, Chk.Waiter, Chk.Summ); } GC.Collect(); Utils.ToCardLog("Exit from DoPaymentsOper TenderType = " + PaymentsCount.ToString()); GC.Collect(); }
static public void CreditCardOperationComplited(CreditCardOperationType OperType, bool ShowError, bool res, string resStr, string Receipt) { Utils.ToCardLog(String.Format("CreditCardOperationComplited Receipt: {0}, res: {1}, resStr: {2}", Receipt, res, resStr)); try { if (ShowError) { HideLockScreen(); ShowMsg(resStr); } if ((!String.IsNullOrWhiteSpace(Receipt)) && (Receipt.Trim() != "")) { if ((iniFile.Arcus2PrintSlip) || ((iniFile.PlastikPrintSlip))) { /* * try * { * using (StreamWriter sw = new StreamWriter(@"C:\aloha\check\discount\tmp\check\bugs\" + Guid.NewGuid().ToString() + ".txt")) * { * sw.Write(Receipt); * sw.Close(); * } * } * catch * { } */ PrintSlip(Receipt); } } if (OperType == CreditCardOperationType.Payment || OperType == CreditCardOperationType.VoidPayment) { if (res) { if (currentCheck.AllInTable) { foreach (InpasChk Chk in currentCheck.AllChks) { if ((iniFile.Arcus2PlasticLocalClose) || ((iniFile.PlasticLocalClose))) { RemoteCloseCheck.CloseAlohaTableLocalCurentUser(Chk.AlohaId, 20, (decimal)Chk.Ammount); } else { RemoteCloseCheck.AddRemoteChkToQuere(Chk.AlohaId, 20, Chk.CurrentEmpl, (decimal)Chk.Ammount / 100); } } if ((iniFile.Arcus2PlasticLocalClose) || ((iniFile.PlasticLocalClose))) { AlohaTSClass.OpenEmptyCheck(); } } else { if ((iniFile.Arcus2PlasticLocalClose) || ((iniFile.PlasticLocalClose))) { RemoteCloseCheck.CloseAlohaTableLocalCurentUser(currentCheck.AlohaId, 20, Sum); if (iniFile.CreditCardAutoOpenCheck) { AlohaTSClass.OpenEmptyCheck(); } } else { RemoteCloseCheck.AddRemoteChkToQuere(currentCheck.AlohaId, 20, currentCheck.CurrentEmpl, Sum / 100); } } } } HideLockScreen(); } catch (Exception e) { Utils.ToCardLog("Error CreditCardOperationComplited " + e.Message); } }