コード例 #1
0
        private static void ChooseInvoiceLanguage(IPosTransaction posTransaction, bool copyReceipt, SqlConnection connection, int iFromShowJour)
        {
            Microsoft.Dynamics.Retail.Pos.BlankOperations.WinFormsTouch.frmLanguageForInvoice
                objLI = new BlankOperations.WinFormsTouch.frmLanguageForInvoice();

            objLI.ShowDialog();
            int iLanguage = 0;

            if (objLI.isEnglish == true)
            {
                iLanguage = 1;
            }
            else if (objLI.isArabic == true)
            {
                iLanguage = 2;
            }
            else if (objLI.isBoth == true)
            {
                iLanguage = 3;
            }

            frmSaleInv reportfrm = new frmSaleInv(posTransaction, connection, copyReceipt, 0, iLanguage, iFromShowJour);

            reportfrm.ShowDialog();

            frmSaleInvAccountsCopy reportfrmAcc = new frmSaleInvAccountsCopy(posTransaction, connection, copyReceipt, 0, iLanguage, iFromShowJour);

            reportfrmAcc.ShowDialog();

            if (iFromShowJour == 1)
            {
                frmSaleInvControlCopy reportfrmCon = new frmSaleInvControlCopy(posTransaction, connection, copyReceipt, 0, iLanguage, iFromShowJour);
                reportfrmCon.ShowDialog();
            }
        }
コード例 #2
0
        public frmCustOrderSampleReturn(IPosTransaction posTransaction, IApplication Application, string sCustOrderNo, bool btxtBoxVisible, Int16 iOption = 0)
        {
            InitializeComponent();

            sOrderNum   = sCustOrderNo;
            pos         = posTransaction;
            application = Application;
            retailTrans = pos as RetailTransaction;
            if (retailTrans != null)
            {
                if (!string.IsNullOrEmpty(retailTrans.Customer.PostalCode))
                {
                    sCPinCode = Convert.ToString(retailTrans.Customer.PostalCode);
                }
            }
            else
            {
                sCPinCode = Convert.ToString(application.BusinessLogic.CustomerSystem.GetCustomerInfo(null).PostalCode);
            }
            pnlEntry.Visible = btxtBoxVisible;
            iIsStoneRet      = iOption;
            if (iIsStoneRet == 0)
            {
                label1.Text = "Client's Order Sample Return";
            }
            else
            {
                label1.Text = "Client's Order Stone Return";
            }
        }
コード例 #3
0
        public frmRepairSubDetail(DataTable dtSubOrder, IPosTransaction posTransaction, IApplication Application, frmRepairDetail fOrderDetails, string UniqueID)
        {
            InitializeComponent();
            pos             = posTransaction;
            application     = Application;
            frmRepairDetail = fOrderDetails;
            sUnique         = UniqueID;
            //  BindRateTypeCombo();
            btnPOSItemSearch.Focus();
            dtItemInfo = dtSubOrder;
            dtTemp     = dtSubOrder.Clone();
            DataRow[] drTemp = dtSubOrder.Select("UNIQUEID='" + UniqueID + "'");
            foreach (DataRow dr in drTemp)
            {
                dtTemp.ImportRow(dr);
            }

            grItems.DataSource = dtTemp;
            if (dtTemp != null && dtTemp.Rows.Count > 0)
            {
                Decimal dTotalAmount = 0m;
                foreach (DataRow drTotal in dtTemp.Rows)
                {
                    dTotalAmount += Convert.ToDecimal(drTotal["AMOUNT"]);
                }
            }
        }
コード例 #4
0
        private bool isServiceItem(IPosTransaction transaction, int lineid, ISaleLineItem saleLineItem, string operation)
        {
            if (lineid == 0)
            {
                return(false);
            }

            bool         isServiceItemExists = false;
            SaleLineItem saleitem            = saleLineItem as SaleLineItem;

            if (operation.ToUpper().Trim() != "QTY")
            {
                saleitem = null;
            }
            if (saleitem == null)
            {
                System.Collections.Generic.LinkedList <LSRetailPosis.Transaction.Line.SaleItem.SaleLineItem> saleline = new System.Collections.Generic.LinkedList <LSRetailPosis.Transaction.Line.SaleItem.SaleLineItem>(((LSRetailPosis.Transaction.RetailTransaction)(transaction)).SaleItems);
                foreach (var sale in saleline)
                {
                    if (sale.ItemType == LSRetailPosis.Transaction.Line.SaleItem.BaseSaleItem.ItemTypes.Service && !sale.Voided)
                    {
                        if (sale.LineId == lineid)
                        {
                            isServiceItemExists = true;
                            break;
                        }
                    }
                }
            }
            return(isServiceItemExists);
        }
コード例 #5
0
        /// <summary>
        /// Print Tender Removal Receipt
        /// </summary>
        /// <param name="posTransaction">RemoveTenderTransaction</param>
        public void PrintRemoveTenderReceipt(IPosTransaction posTransaction)
        {
            if (FiscalPrinter.FiscalPrinter.Instance.FiscalPrinterEnabled())
            {
                FiscalPrinter.FiscalPrinter.Instance.PrintRemoveTender(posTransaction);
                return;
            }

            bool copyReceipt = false;

            PrintingActions.Print(FormType.RemoveTender, copyReceipt, false, delegate(FormModulation formMod, FormInfo formInfo)
            {
                StringBuilder reportLayout = new StringBuilder();
                PrintingActions.PrepareReceiptHeader(reportLayout, posTransaction, 10063, copyReceipt);
                reportLayout.AppendLine(PrintingActions.SingleLine);

                reportLayout.AppendLine();
                RemoveTenderTransaction asRemoveTenderTransaction = (RemoveTenderTransaction)posTransaction;
                reportLayout.AppendLine(PrintingActions.FormatTenderLine(ApplicationLocalizer.Language.Translate(10064),
                                                                         Printing.InternalApplication.Services.Rounding.Round(asRemoveTenderTransaction.Amount, true)));
                reportLayout.AppendLine(asRemoveTenderTransaction.Description.ToString());
                reportLayout.AppendLine();
                reportLayout.AppendLine(PrintingActions.DoubleLine);

                formMod  = new FormModulation(Application.Settings.Database.Connection);
                formInfo = formMod.GetInfoForForm(FormType.FloatEntry, copyReceipt, LSRetailPosis.Settings.HardwareProfiles.Printer.ReceiptProfileId);

                return(reportLayout.ToString());
            });
        }
コード例 #6
0
        /// <summary>
        /// Gift card payment related methods
        /// </summary>
        /// <param name="valid"></param>
        /// <param name="comment"></param>
        /// <param name="posTransaction"></param>
        /// <param name="cardInfo"></param>
        /// <param name="gcTenderInfo"></param>
        public void AuthorizeGiftCardPayment(ref bool valid, ref string comment, IPosTransaction posTransaction, ICardInfo cardInfo, ITender gcTenderInfo)
        {
            if (cardInfo == null)
            {
                throw new ArgumentNullException("cardInfo");
            }

            LogMessage("Authorizing a gift card payment", LogTraceLevel.Trace);

            valid = false;

            GiftCardController controller = new GiftCardController(GiftCardController.ContextType.GiftCardPayment, (PosTransaction)posTransaction, (Tender)gcTenderInfo);

            controller.CardNumber = cardInfo.CardNumber;
            using (GiftCardForm giftCardForm = new GiftCardForm(controller))
            {
                POSFormsManager.ShowPOSForm(giftCardForm);

                if (giftCardForm.DialogResult == DialogResult.OK)
                {
                    valid = true;
                    cardInfo.CardNumber   = controller.CardNumber;
                    cardInfo.Amount       = controller.Amount;
                    cardInfo.CurrencyCode = controller.Currency;
                }
            }
        }
コード例 #7
0
        protected override void OnLoad(EventArgs e)
        {
            if (!this.DesignMode)
            {
                TranslateLabels();

                StockCount.InternalApplication.Services.Peripherals.Scanner.ScannerMessageEvent -= new ScannerMessageEventHandler(OnBarcodeScan);
                StockCount.InternalApplication.Services.Peripherals.Scanner.ScannerMessageEvent += new ScannerMessageEventHandler(OnBarcodeScan);
                StockCount.InternalApplication.Services.Peripherals.Scanner.ReEnableForScan();

                scData = new StockCountData(
                    ApplicationSettings.Database.LocalConnection,
                    ApplicationSettings.Database.DATAAREAID,
                    ApplicationSettings.Terminal.StorePrimaryId);

                posTransaction = StockCount.InternalApplication.BusinessLogic.Utility.CreateSalesOrderTransaction(
                    ApplicationSettings.Terminal.StoreId,
                    ApplicationSettings.Terminal.StoreCurrency,
                    ApplicationSettings.Terminal.TaxIncludedInPrice,
                    StockCount.InternalApplication.Services.Rounding);

                ClearForm();
            }

            base.OnLoad(e);
        }
コード例 #8
0
 public frmStoneAdvance(IPosTransaction posTransaction, IApplication Application, frmCustomerOrder fCustOrder)
 {
     InitializeComponent();
     pos          = posTransaction;
     application  = Application;
     frmCustOrder = fCustOrder;
 }
コード例 #9
0
 public frmCustomerFootfall(IPosTransaction posTransaction, IApplication Application)
 {
     InitializeComponent();
     pos             = posTransaction;
     application     = Application;
     btnEdit.Enabled = false;
 }
コード例 #10
0
        /// <summary>
        /// Print Float Entry Receipt
        /// </summary>
        /// <param name="posTransaction">FloatEntryTransaction</param>
        public void PrintFloatEntryReceipt(IPosTransaction posTransaction)
        {
            if (FiscalPrinter.FiscalPrinter.Instance.FiscalPrinterEnabled())
            {
                FiscalPrinter.FiscalPrinter.Instance.PrintFloatEntry(posTransaction);
                return;
            }

            bool copyReceipt = false;

            PrintingActions.Print(FormType.FloatEntry, copyReceipt, false, delegate(FormModulation formMod, FormInfo formInfo)
            {
                StringBuilder reportLayout = new StringBuilder();
                FloatEntryTransaction asFloatEntryTransaction = (FloatEntryTransaction)posTransaction;

                PrintingActions.PrepareReceiptHeader(reportLayout, posTransaction, 10061, copyReceipt);
                reportLayout.AppendLine(PrintingActions.SingleLine);

                reportLayout.AppendLine();
                reportLayout.AppendLine(PrintingActions.FormatTenderLine(ApplicationLocalizer.Language.Translate(10062),
                                                                         Printing.InternalApplication.Services.Rounding.Round(asFloatEntryTransaction.Amount, true)));
                reportLayout.AppendLine(asFloatEntryTransaction.Description.ToString());
                reportLayout.AppendLine();
                reportLayout.AppendLine(PrintingActions.DoubleLine);

                return(reportLayout.ToString());
            });
        }
コード例 #11
0
        public void BlankOperation(IBlankOperationInfo operationInfo, IPosTransaction posTransaction)
        {
            if (operationInfo == null)
            {
                throw new ArgumentNullException("operationInfo");
            }

            switch (operationInfo.OperationId)
            {
            case "2":
                using (Form theForm = new ItemPriceListForm(Application.Settings.Database.Connection, Application.Settings.Database.DataAreaID))
                {
                    theForm.ShowDialog();
                }
                break;

            case "1":
                // Note: can also use  operationInfo.Parameter
                using (Form theForm = new GeneralFiscalForm())
                {
                    theForm.ShowDialog();
                } break;

            default:
                using (Form theForm = new GeneralFiscalForm())
                {
                    theForm.ShowDialog();
                }

                break;
            }
        }
コード例 #12
0
        /// <summary>
        /// Process Linked InfoCodes for TenderLineItem
        /// </summary>
        /// <param name="posTransaction"></param>
        /// <param name="tenderLineItem"></param>
        /// <param name="storeId"></param>
        /// <param name="tableRefId"></param>
        /// <param name="infoCodeType"></param>
        public void ProcessLinkedInfoCodes(IPosTransaction posTransaction, ITenderLineItem tenderLineItem, string storeId, InfoCodeTableRefType tableRefId, InfoCodeType infoCodeType)
        {
            TenderLineItem lineItem = tenderLineItem as TenderLineItem;

            if (lineItem == null)
            {
                NetTracer.Warning("tenderLineItem parameter is null");
                throw new ArgumentNullException("tenderLineItem");
            }

            //Loop while a linkedInfoCode is found
            int i = 0; //Set as a stop for a infinite loop
            LinkedListNode <InfoCodeLineItem> infoCodeItem = lineItem.InfoCodeLines.Last;

            if (infoCodeItem != null)
            {
                while (!string.IsNullOrEmpty(infoCodeItem.Value.LinkedInfoCodeId) && (i < 10))
                {
                    ProcessInfoCode(posTransaction, 0, lineItem.Amount, storeId, lineItem.TenderTypeId, lineItem.CurrencyCode, tableRefId, infoCodeItem.Value.LinkedInfoCodeId, infoCodeItem.Value, infoCodeType);
                    // This is to prevent an infinite loop when infocodes link to themselves..
                    if (infoCodeItem.Value.LinkedInfoCodeId == lineItem.InfoCodeLines.Last.Value.LinkedInfoCodeId)
                    {
                        break;
                    }

                    infoCodeItem = lineItem.InfoCodeLines.Last;
                    i++;
                }
            }
        }
コード例 #13
0
        public frmRepairReturn(IPosTransaction posTransaction, IApplication Application, DataRow drSelect)
        {
            InitializeComponent();

            application = Application;
            pos         = posTransaction;

            txtReturnNo.Text = GetOrderNum();
            txtOrderNo.Text  = Convert.ToString(drSelect["REPAIRID"]);

            if (Convert.ToString(drSelect["OrderDate"]) != "")
            {
                dTPickerOrderDate.Text = Convert.ToString(drSelect["OrderDate"]);
            }

            txtCustomerAccount.Text = Convert.ToString(drSelect["CUSTACCOUNT"]);
            txtCustomerName.Text    = Convert.ToString(drSelect["CustName"]);

            txtItemId.Text = Convert.ToString(drSelect["ITEMID"]);

            sAdvAdjustmentId = Convert.ToString(drSelect["TRANSACTIONID"]);
            sStore           = Convert.ToString(drSelect["RETAILSTOREID"]);
            sTerminal        = Convert.ToString(drSelect["RETAILTERMINALID"]);


            GetRepairReturnCashAdvSkuData(ref dtRepairReturnCashAdvanceDataSku, Convert.ToString(drSelect["REPAIRID"]));
            GetRepairReturnQtyData(Convert.ToString(drSelect["REPAIRID"]));
        }
コード例 #14
0
ファイル: EOD.cs プロジェクト: NimSubha/POS-Plug-ins_Samra
        /// <summary>
        /// Blind closes the current shift.
        /// </summary>
        /// <param name="transaction">The current transaction instance.</param>
        public void BlindCloseShift(IPosTransaction transaction)
        {
            if (transaction == null)
            {
                NetTracer.Warning("transaction parameter is null");
                throw new ArgumentNullException("transaction");
            }

            // Are you sure you want to close the batch?
            DialogResult dialogResult = this.Application.Services.Dialog.ShowMessage(51308, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
            {
                if (dialogResult == DialogResult.Yes)
                {
                    BatchData batchData = new BatchData(Application.Settings.Database.Connection, Application.Settings.Database.DataAreaID);

                    transaction.Shift.Status           = PosBatchStatus.BlindClosed;
                    transaction.Shift.StatusDateTime   = DateTime.Now;
                    transaction.Shift.OpenedAtTerminal = string.Empty;
                    transaction.Shift.CashDrawer       = string.Empty;

                    batchData.UpdateBatch(transaction.Shift);
                    ShiftUsersCache.Remove(transaction.Shift);
                    transaction.Shift.Print();

                    this.Application.Services.Dialog.ShowMessage(51342);
                }
                else
                {
                    ((PosTransaction)transaction).EntryStatus = PosTransaction.TransactionStatus.Cancelled;
                }
            }
        }
コード例 #15
0
        /// <summary>
        /// Prepare the tender part of receipt
        /// </summary>
        /// <param name="reportLayout"></param>
        /// <param name="posTransaction"></param>
        internal static void PrepareReceiptTenders(StringBuilder reportLayout, IPosTransaction posTransaction)
        {
            string tenderName = string.Empty;
            string amount     = string.Empty;

            reportLayout.AppendLine();

            foreach (ITenderLineItem tenderLine in ((TenderCountTransaction)posTransaction).TenderLines)
            {
                if (tenderLine.CurrencyCode == posTransaction.StoreCurrencyCode)
                {
                    // Tenders in the store currency
                    amount     = Printing.InternalApplication.Services.Rounding.RoundForDisplay(tenderLine.Amount, true, true);
                    tenderName = tenderLine.Description;
                }
                else
                {
                    // Foreign currency {Currency - CAD}
                    amount     = Printing.InternalApplication.Services.Rounding.RoundForDisplay(tenderLine.Amount, false, true);
                    tenderName = string.Format("{0} - {1}", tenderLine.Description, tenderLine.CurrencyCode);
                }

                // {Credit Card:......$50}
                reportLayout.AppendLine(FormatTenderLine(tenderName, amount));
            }

            reportLayout.AppendLine();
        }
コード例 #16
0
        /// <summary>
        /// Time registration, this allows operator to register time clock in\clock out time
        /// </summary>
        /// <param name="posTransaction">Current pos transaction.</param>
        public void TimeRegistrations(IPosTransaction posTransaction)
        {
            InteractionRequestedEventArgs request = new InteractionRequestedEventArgs(
                new RegisterTimeNotification(), () => {});

            this.Application.Services.Interaction.InteractionRequest(request);
        }
コード例 #17
0
        /// <summary>
        /// Get a list of sales invoices for a specific customer...
        /// </summary>
        /// <returns></returns>
        private void GetSalesInvoicesForCustomer(ref DataTable salesInvoices, IPosTransaction posTransaction)
        {
            LogMessage("Getting the list of sales invoices for a customer",
                       LSRetailPosis.LogTraceLevel.Trace,
                       "SalesOrder.GetSalesInvoicesForCustomer");

            bool   retVal  = false;
            string comment = string.Empty;

            try
            {
                // Begin by checking if there is a connection to the Transaction Service
                this.Application.TransactionServices.CheckConnection();

                // Publish the credit memo to the Head Office through the Transaction Services...
                this.Application.TransactionServices.GetSalesInvoiceList(ref retVal, ref comment, ref salesInvoices,
                                                                         ((RetailTransaction)posTransaction).Customer.CustomerId);
            }
            catch (LSRetailPosis.PosisException px)
            {
                LSRetailPosis.ApplicationExceptionHandler.HandleException(this.ToString(), px);
                throw;
            }
            catch (Exception x)
            {
                LSRetailPosis.ApplicationExceptionHandler.HandleException(this.ToString(), x);
                throw;
            }
        }
コード例 #18
0
 public frmSearchOrder(IPosTransaction posTransaction, IApplication Application, frmCustomerOrder fCustOrder)
 {
     InitializeComponent();
     pos          = posTransaction;
     application  = Application;
     frmCustOrder = fCustOrder;
     BindGrid(string.Empty);
 }
コード例 #19
0
 /// <summary>
 /// Display transaction on device
 /// </summary>
 /// <param name="posTransaction">PosTransation</param>
 public void ShowTransaction(IPosTransaction posTransaction)
 {
     if (IsActive)
     {
         NetTracer.Information("Peripheral [DualDisplay] - Show Transaction");
         dualDisplayForm.ShowTransaction((PosTransaction)posTransaction);
     }
 }
コード例 #20
0
 public void PrintCardReceipt(FormType formType, IPosTransaction posTransaction, IEFTInfo eftInfo, bool copyReceipt)
 {
     //PrintingActions.Print(formType, copyReceipt, true,
     //    delegate(FormModulation formMod, FormInfo formInfo)
     //    {
     //        return formMod.GetTransformedCardTender(formInfo, eftInfo, (RetailTransaction)posTransaction);
     //    });
 }
コード例 #21
0
 public void PrintCreditMemo(FormType formType, IPosTransaction posTransaction, ITenderLineItem tenderLineItem, bool copyReceipt)
 {
     //PrintingActions.Print(formType, copyReceipt, true,
     //    delegate(FormModulation formMod, FormInfo formInfo)
     //    {
     //        return formMod.GetTransformedTender(formInfo, (TenderLineItem)tenderLineItem, (RetailTransaction)posTransaction);
     //    });
 }
コード例 #22
0
 public CustomerDepositSKUDetails(int howManyRows, IPosTransaction posTransaction, string OrderNumber)
 {
     InitializeComponent();
     howmanyrows = howManyRows;
     ShowItemSearch(0, howmanyrows);
     pos     = posTransaction;
     OrderNo = OrderNumber;
 }
コード例 #23
0
        /// <summary>
        /// Get transaction token for authorized transaction (Secure card storage).
        /// </summary>
        /// <param name="eftInfo">EftInfo object.</param>
        /// <param name="posTransaction">Reference to an IPosTransaction object.</param>
        public void GetTransactionToken(IEFTInfo eftInfo, IPosTransaction posTransaction)
        {
            // call payment processor's credit card tokenization
            // This token can sent to HQ via Transaction Service for Sales Order processing
            string token = string.Empty;

            eftInfo.TransactionToken = token;
        }
コード例 #24
0
        /// <summary>
        /// Displays inventory lookup form.
        /// </summary>
        /// <param name="posTransaction">Current POS transaction</param>
        /// <returns>Dialog result</returns>
        public DialogResult InventoryLookup(IPosTransaction posTransaction)
        {
            using (formInventoryLookup frm = new formInventoryLookup(posTransaction))
            {
                LSRetailPosis.POSProcesses.POSFormsManager.ShowPOSForm(frm);

                return(frm.DialogResult);
            }
        }
コード例 #25
0
 public frmStoneAdvance(DataTable dtOrderStnAdv, IPosTransaction posTransaction, IApplication Application, frmCustomerOrder fCustOrder)
 {
     InitializeComponent();
     pos                = posTransaction;
     application        = Application;
     frmCustOrder       = fCustOrder;
     dtItemInfo         = dtOrderStnAdv;
     grItems.DataSource = dtItemInfo.DefaultView;
 }
コード例 #26
0
ファイル: LogOn.cs プロジェクト: NimSubha/POS-Plug-ins_Samra
        /// <summary>
        /// Verifies if the transaction operator has access for a given operation.
        /// </summary>
        /// <param name="posTransaction">The pos transaction.</param>
        /// <param name="operation">The operation.</param>
        /// <returns>
        /// True if operator has access, false otherwise.
        /// </returns>
        /// <remarks>Use this method when transaction is available.</remarks>
        public bool VerifyOperationAccess(IPosTransaction posTransaction, PosisOperations operation)
        {
            if (posTransaction == null)
            {
                throw new ArgumentNullException("posTransaction");
            }

            return(VerifyOperationAccess(posTransaction.OperatorId, operation, posTransaction.TransactionId));
        }
コード例 #27
0
 public CustomerDepositSKUDetails(DataTable dt, int howManyRows, IPosTransaction posTransaction, string OrderNumber)
 {
     InitializeComponent();
     grItems.DataSource = dt;
     howmanyrows        = howManyRows;
     dtSkuGridItems     = dt;
     pos     = posTransaction;
     OrderNo = OrderNumber;
 }
コード例 #28
0
        public frmSearchOrder(IPosTransaction posTransaction, IApplication Application, string sWhereCondition)
        {
            InitializeComponent();
            pos         = posTransaction;
            application = Application;


            BindGrid(sWhereCondition);
        }
コード例 #29
0
        private void ExecuteCommandAndUpdateTransaction(Contracts.PosisOperations command)
        {
            IPosTransaction ipt = SalesOrder.InternalApplication.RunOperation(command, string.Empty, this.Transaction);

            if ((ipt != null) && (!ipt.OperationCancelled))
            {
                this.Transaction = (CustomerOrderTransaction)ipt;
            }
            OnPropertyChanged("Transaction");
        }
コード例 #30
0
        /// <summary>
        /// Captures the card payment by establishing a connection with the configured payment processor.
        /// </summary>
        /// <param name="eftInfo">Reference to an EftInfo object.</param>
        /// <param name="posTransaction">Current transaction.</param>
        public void CapturePayment(IEFTInfo eftInfo, IPosTransaction posTransaction)
        {
            // Similar logic to ProcessCardPayment():  send a previously-authorized payment to the processor for capture
            //    This will ONLY get called at the end of a transaction if the IsPendingCapture property is set to true.
            //    Unless the transaction is split tender (two or more card payments) this will normally get called shortly
            //    after the call to ProcessCardPayment().  Any information needed to match up an authorization to the capture
            //    request will be stored in the eftInfo object

            // ToDO:  Add code to call the processer's API
        }