Пример #1
0
        private void GroupFooter1_Format(object sender, EventArgs e)
        {
            // сумма без НДС - расчетная
            txtGroupFooter107.Value = (decimal)(Convert.ToDecimal(txtGroupFooter106.Value) - Convert.ToDecimal(txtGroupFooter105.Value));

            txtGroupFooter108.Text = txtGroupFooter108.Tag + " " + RFMPublic.RFMUtilities.Declen(_nCnt, "номер", "номера", "номеров") + " записей.";
            if ((int)Math.Round(_nOutputDocumentBox, 0) != 0)
            {
                txtGroupFooter109.Text = txtGroupFooter109.Tag + RFMPublic.RFMUtilities.ValToTxt((int)Math.Round(_nOutputDocumentBox, 0));
            }
            else
            {
                txtGroupFooter109.Text = "";
            }
            txtGroupFooter110.Text = txtGroupFooter110.Tag + _nOutputDocumentNetto.ToString("# ### ##0.000");
            txtGroupFooter111.Text = txtGroupFooter111.Tag + "(" + ((int)Math.Floor(_nOutputDocumentNetto)).ToString("# ### ##0").Trim() + " кг " +
                                     ((int)((_nOutputDocumentNetto - Math.Floor(_nOutputDocumentNetto)) * 1000)).ToString("000") + " г)";
            txtGroupFooter112.Text = txtGroupFooter112.Tag + _nOutputDocumentBrutto.ToString("# ### ##0.000");
            txtGroupFooter113.Text = txtGroupFooter113.Tag + "(" + ((int)Math.Floor(_nOutputDocumentBrutto)).ToString("# ### ##0").Trim() + " кг " +
                                     ((int)((_nOutputDocumentBrutto - Math.Floor(_nOutputDocumentBrutto)) * 1000)).ToString("000") + " г)";
            if (_nCurrencyID.ToString() == _sRubID)
            {
                txtGroupFooter114.Text = RFMUtilities.ValToRub(_nAmount);
            }
            else
            {
                txtGroupFooter114.Text = RFMUtilities.ValToRub(_nAmount, _sCurrencyAlias);
            }
            txtGroupFooter115.Text = "";
        }
Пример #2
0
 private void GroupFooter1_Format(object sender, EventArgs e)
 {
     if (_nCurrencyID.ToString() == _sRubID)
     {
         txtGroupFooterAmount.Text = RFMUtilities.ValToRub(_nAmount);
     }
     else
     {
         txtGroupFooterAmount.Text = RFMUtilities.ValToRub(_nAmount, _sCurrencyAlias);
     }
 }
Пример #3
0
 private void GroupFooter1_Format(object sender, EventArgs e)
 {
     txtGroupFooter108.Text = txtGroupFooter108.Tag.ToString().Replace("#", _nCnt.ToString("######").Trim()) + " " + _nAmount.ToString("### ### ##0.00#").Trim() + " " + _sCurrencyAlias;
     if (_nCurrencyID.ToString() == _sRubID)
     {
         txtGroupFooter109.Text = RFMUtilities.ValToRub(_nAmount);
     }
     else
     {
         txtGroupFooter109.Text = RFMUtilities.ValToRub(_nAmount, _sCurrencyAlias);
     }
 }
Пример #4
0
        private void GroupFooter1_Format(object sender, EventArgs e)
        {
            txtGroupFooterAdd.Text = txtGroupFooterAdd.Tag.ToString().Replace("#", RFMPublic.RFMUtilities.Declen(_nCnt, "номер", "номера", "номеров") + " записей");
            if ((int)Math.Round(_nOutputDocumentBox, 0) != 0)
            {
                txtGroupFooterBoxes.Text = txtGroupFooterBoxes.Tag + RFMPublic.RFMUtilities.ValToTxt((int)Math.Round(_nOutputDocumentBox, 0));
            }
            else
            {
                txtGroupFooterBoxes.Text = "";
            }
            txtGroupFooterNetto.Text     = txtGroupFooterNetto.Tag + _nOutputDocumentNetto.ToString("# ### ##0.000");
            txtGroupFooterNettoText.Text = txtGroupFooterNettoText.Tag + "(" + ((int)Math.Floor(_nOutputDocumentNetto)).ToString("# ### ##0").Trim() + " кг " +
                                           ((int)((_nOutputDocumentNetto - Math.Floor(_nOutputDocumentNetto)) * 1000)).ToString("000") + " г)";
            txtGroupFooterBrutto.Text     = txtGroupFooterBrutto.Tag + _nOutputDocumentBrutto.ToString("# ### ##0.000");
            txtGroupFooterBruttoText.Text = txtGroupFooterBruttoText.Tag + "(" + ((int)Math.Floor(_nOutputDocumentBrutto)).ToString("# ### ##0").Trim() + " кг " +
                                            ((int)((_nOutputDocumentBrutto - Math.Floor(_nOutputDocumentBrutto)) * 1000)).ToString("000") + " г)";
            if (_nCurrencyID.ToString() == _sRubID)
            {
                txtGroupFooterAmount.Text = RFMUtilities.ValToRub(_nAmount);
            }
            else
            {
                txtGroupFooterAmount.Text = RFMUtilities.ValToRub(_nAmount, _sCurrencyAlias);
            }

            // ƒл¤ возможности печати чистовых документов менеджерами
            // (после подтверждени¤ доставки клиенту)
            // сбрасываем алиас пользовател¤
            if (sDateBring.Length == 0)
            {
                txtCurrentUserName.Text      =
                    txtCurrentUserName1.Text =
                        ((RFMBaseClasses.RFMFormMain)System.Windows.Forms.Application.OpenForms[0]).UserInfo.UserAlias;
            }
            else
            {
                txtCurrentUserName.Text = txtCurrentUserName1.Text = "";
            }
        }
Пример #5
0
        private void GroupFooter1_Format(object sender, EventArgs e)
        {
            txtGroupFooterAdd.Text = txtGroupFooterAdd.Tag.ToString().Replace("#", RFMPublic.RFMUtilities.Declen(_nCnt, "номер", "номера", "номеров") + " записей");
            if ((int)Math.Round(_nOutputDocumentBox, 0) != 0)
            {
                txtGroupFooterBoxes.Text = txtGroupFooterBoxes.Tag + RFMPublic.RFMUtilities.ValToTxt((int)Math.Round(_nOutputDocumentBox, 0));
            }
            else
            {
                txtGroupFooterBoxes.Text = "";
            }
            txtGroupFooterNettoText.Text = _nOutputDocumentNetto.ToString("# ### ##0.000") +
                                           " (" + ((int)Math.Floor(_nOutputDocumentNetto)).ToString("# ### ##0").Trim() + " кг " +
                                           ((int)((_nOutputDocumentNetto - Math.Floor(_nOutputDocumentNetto)) * 1000)).ToString("000") + " г)";
            txtGroupFooterBruttoText.Text = _nOutputDocumentBrutto.ToString("# ### ##0.000") +
                                            " (" + ((int)Math.Floor(_nOutputDocumentBrutto)).ToString("# ### ##0").Trim() + " кг " +
                                            ((int)((_nOutputDocumentBrutto - Math.Floor(_nOutputDocumentBrutto)) * 1000)).ToString("000") + " г)";
            if (_nCurrencyID.ToString() == _sRubID)
            {
                txtGroupFooterAmount.Text = RFMUtilities.ValToRub(_nAmount);
            }
            else
            {
                txtGroupFooterAmount.Text = RFMUtilities.ValToRub(_nAmount, _sCurrencyAlias);
            }

            txtGroupFooterVatSum.Text   = _nVatAllSum.ToString("### ### ###0.00");
            txtGroupFooterNoVatSum.Text = _nNoVatAllSum.ToString("### ### ###0.00");

            if (_nVat1Rate > 0)
            {
                txtGroupFooterLabelVat1Sum.Text   = txtGroupFooterLabelVat1Sum.Tag.ToString().Replace("#", _nVat1Rate.ToString("######").Trim());
                txtGroupFooterLabelNoVat1Sum.Text = txtGroupFooterLabelNoVat1Sum.Tag.ToString().Replace("#", _nVat1Rate.ToString("######").Trim());
                txtGroupFooterVat1Sum.Text        = _nVat1Sum.ToString("### ### ###0.00");
                txtGroupFooterNoVat1Sum.Text      = _nNoVat1Sum.ToString("### ### ###0.00");
            }
            else
            {
                txtGroupFooterLabelVat1Sum.Text          =
                    txtGroupFooterLabelNoVat1Sum.Text    =
                        txtGroupFooterVat1Sum.Text       =
                            txtGroupFooterNoVat1Sum.Text =
                                "";
            }

            if (_nVat2Rate > 0)
            {
                txtGroupFooterLabelVat2Sum.Text   = txtGroupFooterLabelVat2Sum.Tag.ToString().Replace("#", _nVat2Rate.ToString("######").Trim());
                txtGroupFooterLabelNoVat2Sum.Text = txtGroupFooterLabelNoVat2Sum.Tag.ToString().Replace("#", _nVat2Rate.ToString("######").Trim());
                txtGroupFooterVat2Sum.Text        = _nVat2Sum.ToString("### ### ###0.00");
                txtGroupFooterNoVat2Sum.Text      = _nNoVat2Sum.ToString("### ### ###0.00");
            }
            else
            {
                txtGroupFooterLabelVat2Sum.Text          =
                    txtGroupFooterLabelNoVat2Sum.Text    =
                        txtGroupFooterVat2Sum.Text       =
                            txtGroupFooterNoVat2Sum.Text =
                                "";
            }
        }
Пример #6
0
        private void GroupFooter1_Format(object sender, EventArgs e)
        {
            if (_bFactoring)
            {
                barcode1.Visible     =
                    barcode2.Visible =
                        true;
                barcode1.Text = Utilities.GetCRCBarCode_128A(Utilities.GetAlfaBankBarCode_128A42(sPayeeINN, sPayerINN, nSum, dDate));
                barcode2.Text = Utilities.GetCRCBarCode_128A(Utilities.GetAlfaBankBarCode_128A40(_sFactureNumber, sIsoCode));
            }
            else
            {
                barcode1.Visible     =
                    barcode2.Visible =
                        false;
            }

            /*
             * txtGroupFooterAdd.Text = txtGroupFooterAdd.Tag.ToString().Replace("#", _nCnt.ToString().Trim() + " (" + RFMPublic.RFMUtilities.ValToTxt(_nCnt) + ")");
             *
             * txtGroupFooterContractNumber.Text = _sContractNumberText;
             *
             * if ((int)Math.Round(_nOutputDocumentBox, 0) != 0)
             * {
             *      txtGroupFooterBoxes.Text = txtGroupFooterBoxes.Tag + RFMPublic.RFMUtilities.ValToTxt((int)Math.Round(_nOutputDocumentBox, 0));
             * }
             * else
             * {
             *      txtGroupFooterBoxes.Text = "";
             * }
             *
             * txtGroupFooterNettoText.Text = _nOutputDocumentNetto.ToString("# ### ##0.000") +
             *      " (" + ((int)Math.Floor(_nOutputDocumentNetto)).ToString("# ### ##0").Trim() + " êã " +
             *      ((int)((_nOutputDocumentNetto - Math.Floor(_nOutputDocumentNetto)) * 1000)).ToString("000") + " ã)";
             *
             * txtGroupFooterBruttoText.Text = _nOutputDocumentBrutto.ToString("# ### ##0.000") +
             *      " (" + ((int)Math.Floor(_nOutputDocumentBrutto)).ToString("# ### ##0").Trim() + " êã " +
             *      ((int)((_nOutputDocumentBrutto - Math.Floor(_nOutputDocumentBrutto)) * 1000)).ToString("000") + " ã)";
             */

            if (_nCurrencyID.ToString() == _sRubID)
            {
                txtGroupFooterAmount.Text = RFMUtilities.ValToRub(_nAmount);
            }
            else
            {
                txtGroupFooterAmount.Text = RFMUtilities.ValToRub(_nAmount, _sCurrencyAlias);
            }

            txtGroupFooterVatSum.Text   = _nVatAllSum.ToString("### ### ###0.00");
            txtGroupFooterNoVatSum.Text = _nNoVatAllSum.ToString("### ### ###0.00");

            if (_nVat1Rate > 0)
            {
                txtGroupFooterLabelVat1Sum.Text   = txtGroupFooterLabelVat1Sum.Tag.ToString().Replace("#", _nVat1Rate.ToString("######").Trim());
                txtGroupFooterLabelNoVat1Sum.Text = txtGroupFooterLabelNoVat1Sum.Tag.ToString().Replace("#", _nVat1Rate.ToString("######").Trim());
                txtGroupFooterVat1Sum.Text        = _nVat1Sum.ToString("### ### ###0.00");
                txtGroupFooterNoVat1Sum.Text      = _nNoVat1Sum.ToString("### ### ###0.00");
            }
            else
            {
                txtGroupFooterLabelVat1Sum.Text          =
                    txtGroupFooterLabelNoVat1Sum.Text    =
                        txtGroupFooterVat1Sum.Text       =
                            txtGroupFooterNoVat1Sum.Text =
                                "";
            }

            if (_nVat2Rate > 0)
            {
                txtGroupFooterLabelVat2Sum.Text   = txtGroupFooterLabelVat2Sum.Tag.ToString().Replace("#", _nVat2Rate.ToString("######").Trim());
                txtGroupFooterLabelNoVat2Sum.Text = txtGroupFooterLabelNoVat2Sum.Tag.ToString().Replace("#", _nVat2Rate.ToString("######").Trim());
                txtGroupFooterVat2Sum.Text        = _nVat2Sum.ToString("### ### ###0.00");
                txtGroupFooterNoVat2Sum.Text      = _nNoVat2Sum.ToString("### ### ###0.00");
            }
            else
            {
                txtGroupFooterLabelVat2Sum.Text          =
                    txtGroupFooterLabelNoVat2Sum.Text    =
                        txtGroupFooterVat2Sum.Text       =
                            txtGroupFooterNoVat2Sum.Text =
                                "";
            }
        }
Пример #7
0
        private void GroupFooter1_Format(object sender, EventArgs e)
        {
            /*
             * if (_bFactoring)
             * {
             *      barcode1.Visible =
             *      barcode2.Visible =
             *              true;
             *      barcode1.Text = Utilities.GetCRCBarCode_128A(Utilities.GetAlfaBankBarCode_128A42(sPayeeINN, sPayerINN, nSum, dDate));
             *      barcode2.Text = Utilities.GetCRCBarCode_128A(Utilities.GetAlfaBankBarCode_128A40(_sFactureNumber, sIsoCode));
             * }
             * else
             * {
             *      barcode1.Visible =
             *      barcode2.Visible =
             *      false;
             * }
             */

            /*
             * txtGroupFooterAdd.Text = txtGroupFooterAdd.Tag.ToString().Replace("#", _nCnt.ToString().Trim() + " (" + RFMPublic.RFMUtilities.ValToTxt(_nCnt) + ")");
             *
             * txtGroupFooterContractNumber.Text = _sContractNumberText;
             *
             * if ((int)Math.Round(_nOutputDocumentBox, 0) != 0)
             * {
             *      txtGroupFooterBoxes.Text = txtGroupFooterBoxes.Tag + RFMPublic.RFMUtilities.ValToTxt((int)Math.Round(_nOutputDocumentBox, 0));
             * }
             * else
             * {
             *      txtGroupFooterBoxes.Text = "";
             * }
             *
             * txtGroupFooterNettoText.Text = _nOutputDocumentNetto.ToString("# ### ##0.000") +
             *      " (" + ((int)Math.Floor(_nOutputDocumentNetto)).ToString("# ### ##0").Trim() + " êã " +
             *      ((int)((_nOutputDocumentNetto - Math.Floor(_nOutputDocumentNetto)) * 1000)).ToString("000") + " ã)";
             *
             * txtGroupFooterBruttoText.Text = _nOutputDocumentBrutto.ToString("# ### ##0.000") +
             *      " (" + ((int)Math.Floor(_nOutputDocumentBrutto)).ToString("# ### ##0").Trim() + " êã " +
             *      ((int)((_nOutputDocumentBrutto - Math.Floor(_nOutputDocumentBrutto)) * 1000)).ToString("000") + " ã)";
             */

            if (_nCurrencyID.ToString() == _sRubID)
            {
                txtGroupFooterAmount.Text = RFMUtilities.ValToRub(_nAmount);
            }
            else
            {
                txtGroupFooterAmount.Text = RFMUtilities.ValToRub(_nAmount, _sCurrencyAlias);
            }

            /*
             * txtGroupFooterVatSum.Text = _nVatAllSum.ToString("### ### ###0.00");
             * txtGroupFooterNoVatSum.Text = _nNoVatAllSum.ToString("### ### ###0.00");
             *
             * if (_nVat1Rate > 0)
             * {
             *      txtGroupFooterLabelVat1Sum.Text = txtGroupFooterLabelVat1Sum.Tag.ToString().Replace("#", _nVat1Rate.ToString("######").Trim());
             *      txtGroupFooterLabelNoVat1Sum.Text = txtGroupFooterLabelNoVat1Sum.Tag.ToString().Replace("#", _nVat1Rate.ToString("######").Trim());
             *      txtGroupFooterVat1Sum.Text = _nVat1Sum.ToString("### ### ###0.00");
             *      txtGroupFooterNoVat1Sum.Text = _nNoVat1Sum.ToString("### ### ###0.00");
             * }
             * else
             * {
             *      txtGroupFooterLabelVat1Sum.Text =
             *      txtGroupFooterLabelNoVat1Sum.Text =
             *      txtGroupFooterVat1Sum.Text =
             *      txtGroupFooterNoVat1Sum.Text =
             *              "";
             * }
             *
             * if (_nVat2Rate > 0)
             * {
             *      txtGroupFooterLabelVat2Sum.Text = txtGroupFooterLabelVat2Sum.Tag.ToString().Replace("#", _nVat2Rate.ToString("######").Trim());
             *      txtGroupFooterLabelNoVat2Sum.Text = txtGroupFooterLabelNoVat2Sum.Tag.ToString().Replace("#", _nVat2Rate.ToString("######").Trim());
             *      txtGroupFooterVat2Sum.Text = _nVat2Sum.ToString("### ### ###0.00");
             *      txtGroupFooterNoVat2Sum.Text = _nNoVat2Sum.ToString("### ### ###0.00");
             * }
             * else
             * {
             *      txtGroupFooterLabelVat2Sum.Text =
             *      txtGroupFooterLabelNoVat2Sum.Text =
             *      txtGroupFooterVat2Sum.Text =
             *      txtGroupFooterNoVat2Sum.Text =
             *              "";
             * }
             */

            txtCurrentUserName.Text      =
                txtCurrentUserName1.Text =
                    ((RFMBaseClasses.RFMFormMain)System.Windows.Forms.Application.OpenForms[0]).UserInfo.UserAlias;
        }