Beispiel #1
0
        public void VoucherNoGeneration(DateTime salaryMonth)
        {
            TransactionsGeneralFill obj = new TransactionsGeneralFill();
            AdvancePaymentSP        spAdvancePayment = new AdvancePaymentSP();

            if (strVoucherNo == string.Empty)
            {
                strVoucherNo = "0";
            }
            strVoucherNo = obj.VoucherNumberAutomaicGeneration(decPaymentVoucherTypeId, Convert.ToDecimal(strVoucherNo), salaryMonth, strAdvancePayment);
            if (Convert.ToDecimal(strVoucherNo) != spAdvancePayment.AdvancePaymentGetMaxPlusOne(decPaymentVoucherTypeId))
            {
                strVoucherNo = spAdvancePayment.AdvancePaymentGetMax(decPaymentVoucherTypeId).ToString();
                strVoucherNo = obj.VoucherNumberAutomaicGeneration(decPaymentVoucherTypeId, Convert.ToDecimal(strVoucherNo), salaryMonth, strAdvancePayment);
                if (spAdvancePayment.AdvancePaymentGetMax(decPaymentVoucherTypeId) == "0")
                {
                    strVoucherNo = "0";
                    strVoucherNo = obj.VoucherNumberAutomaicGeneration(decPaymentVoucherTypeId, Convert.ToDecimal(strVoucherNo), salaryMonth, strAdvancePayment);
                }
            }
            if (isAutomatic)
            {
                SuffixPrefixSP   spSuffixPrefix   = new SuffixPrefixSP();
                SuffixPrefixInfo infoSuffixPrefix = new SuffixPrefixInfo();
                infoSuffixPrefix = spSuffixPrefix.GetSuffixPrefixDetails(decPaymentVoucherTypeId, dtpDate);
                string strPrefix = infoSuffixPrefix.Prefix;
                string strSuffix = infoSuffixPrefix.Suffix;
                strInvoiceNo = strPrefix + strVoucherNo + strSuffix;
            }
        }
Beispiel #2
0
        public decimal AdvancePaymentGetMaxPlusOne(decimal decVoucherTypeId)
        {
            decimal Max = 0;

            try
            {
                Max = spAdvancePayment.AdvancePaymentGetMaxPlusOne(decVoucherTypeId);
            }
            catch (Exception ex)
            {
                MessageBox.Show("AP7:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(Max);
        }