private void VoidEj(Ej ej) { if (PosContext.Instance.Training) { return; } foreach (Object obj in ej.EjArrayList) { EjLine ejLine = (EjLine)obj; int voidState = (int)Transaction.Status.VOIDED; // if (ejLine.State != (int)EjLineStates..IN_PROGRESS) continue; switch (ejLine.LineType) { case (int)EjLineType.TRANS_HEADER: EjHeader ejHeader = (EjHeader)ejLine; if (!ejHeader.UpdateState(voidState)) { MessageBox.Show("Error :- Unable to complete UpdateState-Ej"); } break; case (int)EjLineType.ITEM: case (int)EjLineType.PROMOTION: case (int)EjLineType.BANK: case (int)EjLineType.TENDER: case (int)EjLineType.CHECK_TENDER: case (int)EjLineType.CC_TENDER: case (int)EjLineType.GIFT_CERT_TENDER: case (int)EjLineType.DEBIT_TENDER: case (int)EjLineType.ALT_CURRENCY_TENDER: case (int)EjLineType.COUPON: case (int)EjLineType.ACCOUNT: case (int)EjLineType.TAX: case (int)EjLineType.SURCHARGE: // ejLine..UpdateTotals(); break; case (int)EjLineType.TOTAL: break; default: break; } } }
public override void Engage(int keyValue) { PosContext.Instance.CurrentEjItem = null; PosContext.Instance.EjCustomer = null; //PrintJobQueue.Instance.Clear(); PosContext.Instance.CurrentEj = new Ej(); PosContext.Instance.Receipt.Update(this); EjHeader ejHeader = new EjHeader(); ejHeader.Engage(0); PosContext.Instance.CurrentEj.EjAdd(ejHeader); PosEventStack.Instance.NextEvent(); }
private void UpdateTransactionType(int type) { if (PosContext.Instance.CurrentEj == null) { return; } foreach (object obj in PosContext.Instance.CurrentEj.EjArrayList) { if (obj is EjHeader) { EjHeader ejHeader = obj as EjHeader; Transaction tran = (Transaction)ejHeader.DataRecord(); tran.Trans_type = type; tran.UpdateStateAndType(); break; } } }