Exemplo n.º 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]);
            }
        }
Exemplo n.º 2
0
        private void AddedNonPricedService(TextBox field, string service)
        {
            decimal summ = DocPack.manualParseDecimal(field.Text);

            if (summ > 0)
            {
                ManualDocPack.AddService(service + "=" + summ.ToString());
            }
        }
Exemplo n.º 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);
        }
Exemplo n.º 4
0
        public bool CashOutcome(string summ)
        {
            PrepareDriver();

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

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

            return(Driver.ResultCode == 0 ? true : false);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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();
            }
        }