Example #1
0
        private void directPayment(int moneyType, bool returnSale)
        {
            ComboBoxItem selectedItem      = (ComboBoxItem)section.SelectedItem;
            string       department_string = selectedItem.Tag.ToString();
            int          department        = int.Parse(department_string);

            decimal price = DocPack.manualParseDecimal(priceForDirectPayment.Text);
            decimal summ  = DocPack.manualParseDecimal(moneyForDirectPayment.Text);

            string sendingSMSorEMAIL = directPaymentSending.Text;

            string printing = stringForPrinting.Text;
            bool   vat      = vatDirectPayment.IsChecked ?? true;

            string[] result = Cashbox.DirectPayment(
                moneyPrice: price, moneySumm: summ, forPrinting: printing, sending: sendingSMSorEMAIL,
                department: department, moneyType: moneyType, returnSale: returnSale, VAT: vat
                ).Split(':');

            if (result[0] == "OK")
            {
                CleanCheck();
                MessageBoxes.ChangeMessage(result[1]);
            }
            else
            {
                ShowError(moneyPlace, "Ошибка кассы: " + result[1]);
            }
        }
Example #2
0
        private void AddedNonPricedService(TextBox field, string service)
        {
            decimal summ = DocPack.manualParseDecimal(field.Text);

            if (summ > 0)
            {
                ManualDocPack.AddService(service + "=" + summ.ToString());
            }
        }
Example #3
0
        public bool CashOutcome(string summ)
        {
            PrepareDriver();

            atolDriver.setParam(Constants.LIBFPTR_PARAM_SUM, (uint)DocPack.manualParseDecimal(summ));
            atolDriver.cashOutcome();

            Log.AddWithCode("выплата денег (" + summ + ")");

            return(atolDriver.printText() < 0 ? false : true);
        }
Example #4
0
        public bool CashOutcome(string summ)
        {
            PrepareDriver();

            Driver.Summ1 = DocPack.manualParseDecimal(summ);
            Driver.CashOutcome();

            Log.AddWithCode("выплата денег (" + summ + ")");

            return(Driver.ResultCode == 0 ? true : false);
        }
Example #5
0
        private void printMoneyDirectPayment_Click(object sender, RoutedEventArgs e)
        {
            decimal summ = DocPack.manualParseDecimal(moneyForDirectPayment.Text);

            if (CheckMoneyFail(summ))
            {
                return;
            }

            directPayment(moneyType: 1, returnSale: false);
        }
Example #6
0
        private void printCheckMoney_Click(object sender, RoutedEventArgs e)
        {
            decimal money = DocPack.manualParseDecimal(moneyForCheck.Text);

            string sending = printSending.Text;

            if (CheckMoneyFail(money) || CheckAnotherDateFail(returnDate.Text))
            {
                return;
            }

            string[] result = Cashbox.PrintDocPack(
                Cashbox.manDocPackForPrinting, MoneyType: 1, MoneySumm: money, sendingAddress: sending
                ).Split(':');

            CheckError(result, checkPlace);
        }
Example #7
0
        private void printRCheckMoney_Click(object sender, RoutedEventArgs e)
        {
            decimal money = DocPack.manualParseDecimal(moneyForRCheck.Text);

            if (CheckMoneyFail(money))
            {
                return;
            }

            string[] result = Cashbox.PrintDocPack(
                Cashbox.manDocPackForPrinting, MoneyType: 1, MoneySumm: money
                ).Split(':');

            CheckError(result, receptionPlace);

            if (result[0] == "OK")
            {
                CleanCheck();
            }
        }