Exemplo n.º 1
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());
            });
        }
Exemplo n.º 2
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());
            });
        }
Exemplo n.º 3
0
        public void PrintGiftCertificate(FormType formType, IPosTransaction posTransaction, IGiftCardLineItem giftCardLineItem, bool copyReceipt)
        {
            PrintingActions.Print(formType, copyReceipt, false, delegate(FormModulation formMod, FormInfo formInfo)
            {
                StringBuilder reportLayout = new StringBuilder();

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

                reportLayout.AppendLine();
                reportLayout.AppendLine(PrintingActions.FormatTenderLine(ApplicationLocalizer.Language.Translate(10070), giftCardLineItem.SerialNumber));
                reportLayout.AppendLine(PrintingActions.FormatTenderLine(ApplicationLocalizer.Language.Translate(10071),
                                                                         Printing.InternalApplication.Services.Rounding.RoundForDisplay(giftCardLineItem.Balance,
                                                                                                                                        true, true)));
                reportLayout.AppendLine();
                reportLayout.AppendLine(PrintingActions.DoubleLine);

                return(reportLayout.ToString());
            });
        }
Exemplo n.º 4
0
        /// <summary>
        /// Print declare starting amount receipt
        /// </summary>
        /// <param name="posTransaction">FloatEntryTransaction</param>
        public void PrintStartngAmountReceipt(IPosTransaction posTransaction)
        {
            bool copyReceipt = false;

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

                PrintingActions.PrepareReceiptHeader(reportLayout, posTransaction, 10077, false);
                reportLayout.AppendLine(PrintingActions.SingleLine);

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

                return(reportLayout.ToString());
            });
        }