Ejemplo n.º 1
0
        public JsonResult SaveVoucher(VoucherTransaction objCashBankVoucher, List <VoucherTransaction> lstOtherVoucher, string voucherType, List <SubLedgerHeadDetails> lstSubLedgerHeadDetails)
        {
            try
            {
                objLoginHelper = (LoginHelper)Session["LogInInformation"];

                string EntrySource = string.Empty;
                if (voucherType == "C")
                {
                    EntrySource = Helper.ContraVoucherForAccountsEntrySource;
                }
                else if (voucherType == "N")
                {
                    EntrySource = Helper.NonCashVoucherForAccountsEntrySource;
                }
                else if (voucherType == "P")
                {
                    EntrySource = Helper.PaymentVoucherForAccountsEntrySource;
                }
                else if (voucherType == "R")
                {
                    EntrySource = Helper.ReceiveVoucherForAccountsEntrySource;
                }

                ArrayList transactionNumberMax = accountDeptDal.ReadVoucherTransNoMax(objLoginHelper.LocationCode, objLoginHelper.CurrentDate.ToString("yyMMdd"));
                objCashBankVoucher.TransactionNo = Helper.AccountSequenceNumberGeneration(transactionNumberMax, objLoginHelper);

                Acc_TransNoCount objAccTransNocount = new Acc_TransNoCount();
                objAccTransNocount            = voucherProcess.TransNoCount(objCashBankVoucher, objLoginHelper.LocationCode);
                objAccTransNocount.TransCount = null;

                Acc_PrePostTransMaster objPrePostTransMaster = new Acc_PrePostTransMaster();
                objPrePostTransMaster             = voucherProcess.CashBankVoucherProcess(objCashBankVoucher, voucherType, objLoginHelper, EntrySource);
                objPrePostTransMaster.IsAutoEntry = false;

                List <Acc_PrePostTransDetail> lstPrePostTransDetail = new List <Acc_PrePostTransDetail>();
                lstPrePostTransDetail = voucherProcess.OtherBankVoucherProcess(lstOtherVoucher, voucherType, objLoginHelper, EntrySource, objCashBankVoucher.TransactionNo);

                List <Acc_PrePostTransDetailByDimension> lstPrePostTransDetailByDimension = new List <Acc_PrePostTransDetailByDimension>();

                if (lstSubLedgerHeadDetails != null)
                {
                    lstPrePostTransDetailByDimension = voucherProcess.PrePostTransDetailByDimensionProcess(objCashBankVoucher, lstPrePostTransDetail, lstSubLedgerHeadDetails, objLoginHelper.LocationCode);
                }

                objPrePostTransMaster = accountDeptDal.CreateVoucher(objAccTransNocount, objPrePostTransMaster, lstPrePostTransDetail, lstPrePostTransDetailByDimension);

                return(new JsonResult {
                    Data = ExceptionHelper.ExceptionMessage(string.Empty, Helper.AccountSequenceNumberGeneration(objPrePostTransMaster.TransNo))
                });
            }
            catch (Exception ex)
            {
                return(new JsonResult {
                    Data = ExceptionHelper.ExceptionMessage(ex)
                });
            }
        }
Ejemplo n.º 2
0
        public JsonResult SaveEmployeeWiseSalaryPayment(VoucherTransaction objCashBankVoucher, List <VoucherTransaction> lstOtherVoucher, List <EmployeeWiseSalaryPayment> lstEmployeeWiseSalary, string voucherType)
        {
            try
            {
                objLoginHelper = (LoginHelper)Session["LogInInformation"];

                string EntrySource = string.Empty;
                EntrySource = Helper.BankPaymentVoucherForAccountsEntrySource;

                ArrayList transactionNumberMax = accountDeptDal.ReadVoucherTransNoMax(objLoginHelper.LocationCode, objLoginHelper.CurrentDate.ToString("yyMMdd"));
                objCashBankVoucher.TransactionNo = Helper.AccountSequenceNumberGeneration(transactionNumberMax, objLoginHelper);

                Acc_TransNoCount objAccTransNocount = new Acc_TransNoCount();
                objAccTransNocount            = voucherProcess.TransNoCount(objCashBankVoucher, objLoginHelper.LocationCode);
                objAccTransNocount.TransCount = null;

                Acc_PrePostTransMaster objPrePostTransMaster = new Acc_PrePostTransMaster();
                objPrePostTransMaster             = voucherProcess.CashBankVoucherProcess(objCashBankVoucher, voucherType, objLoginHelper, EntrySource);
                objPrePostTransMaster.IsAutoEntry = false;

                List <Acc_PrePostTransDetail> lstPrePostTransDetail = new List <Acc_PrePostTransDetail>();
                lstPrePostTransDetail = voucherProcess.OtherBankVoucherProcess(lstOtherVoucher, voucherType, objLoginHelper, EntrySource, objCashBankVoucher.TransactionNo);

                List <SubLedgerHeadDetails> lstSubLedgerHeadDetails = new List <SubLedgerHeadDetails>();
                lstSubLedgerHeadDetails = voucherProcess.PrepareEmployeeWiseSalaryToSubLedgerDimension(lstEmployeeWiseSalary, objLoginHelper.LocationCode, objCashBankVoucher.TransactionNo);

                List <Acc_PrePostTransDetailByDimension> lstTransDetailByDimension = new List <Acc_PrePostTransDetailByDimension>();
                lstTransDetailByDimension = voucherProcess.PrePostTransDetailByDimensionProcess(objCashBankVoucher, lstPrePostTransDetail, lstSubLedgerHeadDetails, objLoginHelper.LocationCode);


                //start oroginal

                //objPrePostTransMaster = accountDeptDal.CreateVoucher(objPrePostTransMaster, lstEmployeeWiseSalary);

                // objPrePostTransMaster = accountDeptDal.CreateVoucher(objAccTransNocount, objPrePostTransMaster, lstPrePostTransDetail, lstTransDetailByDimension);

                //end oroginal


                //start new
                string supportMethod = "ttd";//its use for support method
                objPrePostTransMaster = accountDeptDal.CreateVoucherForSaveEmployeeWiseSalaryPayment(objAccTransNocount, lstEmployeeWiseSalary, lstPrePostTransDetail, lstTransDetailByDimension, objPrePostTransMaster, supportMethod);
                //end new


                return(new JsonResult {
                    Data = ExceptionHelper.ExceptionMessage(string.Empty, Helper.AccountSequenceNumberGeneration(objPrePostTransMaster.TransNo))
                });
            }
            catch (Exception ex)
            {
                return(new JsonResult {
                    Data = ExceptionHelper.ExceptionMessage(ex)
                });
            }
        }
Ejemplo n.º 3
0
        public JsonResult SavePaymentOrReceieveVoucherForAuditor(VoucherTransaction objCashBankVoucher, List <VoucherTransaction> lstOtherVoucher, VoucherTransactionAudit objvoucherTransactionAudit, string voucherType)
        {
            try
            {
                objLoginHelper = (LoginHelper)Session["LogInInformation"];

                string EntrySource = string.Empty;
                if (voucherType == "C")
                {
                    EntrySource = Helper.ContraVoucherForAuditorEntrySource;
                }
                else if (voucherType == "N")
                {
                    EntrySource = Helper.NonCashVoucherForAuditorEntrySource;
                }
                else if (voucherType == "P")
                {
                    EntrySource = Helper.PaymentVoucherForAuditorEntrySource;
                }
                else if (voucherType == "R")
                {
                    EntrySource = Helper.ReceiveVoucherForAuditorEntrySource;
                }

                Acc_TransNoCount objAccTransNocount = new Acc_TransNoCount();
                objAccTransNocount            = voucherProcess.TransNoCount(objCashBankVoucher, objLoginHelper.LocationCode); //Newly Add By Md.Sultan Mahmud
                objAccTransNocount.TransCount = null;

                Acc_PrePostTransMaster objPrePostTransMaster = new Acc_PrePostTransMaster();
                objPrePostTransMaster = voucherProcess.CashBankVoucherProcess(objCashBankVoucher, voucherType, objLoginHelper, EntrySource);

                List <Acc_PrePostTransDetail> lstPrePostTransDetail = new List <Acc_PrePostTransDetail>();
                lstPrePostTransDetail = voucherProcess.OtherBankVoucherProcess(lstOtherVoucher, voucherType, objLoginHelper, EntrySource, objCashBankVoucher.TransactionNo);

                Aud_AuditAdjustmentRelatedAccountingTransaction objAuditAdjustmentRelatedAccountingTransaction = new Aud_AuditAdjustmentRelatedAccountingTransaction();
                objAuditAdjustmentRelatedAccountingTransaction = voucherProcess.AuditAdjustmentVoucherOrAccount(objvoucherTransactionAudit, objLoginHelper);

                objPrePostTransMaster = accountDeptDal.CreateVoucher(objAccTransNocount, objPrePostTransMaster, lstPrePostTransDetail, objAuditAdjustmentRelatedAccountingTransaction);

                return(new JsonResult {
                    Data = ExceptionHelper.ExceptionMessage(string.Empty, Helper.AccountSequenceNumberGeneration(objPrePostTransMaster.TransNo))
                });
            }
            catch (Exception ex)
            {
                return(new JsonResult {
                    Data = ExceptionHelper.ExceptionMessage(ex)
                });
            }
        }
Ejemplo n.º 4
0
        public Acc_PrePostTransMaster CashBankVoucherProcess(VoucherTransaction objCashBankVoucher, string voucherType, LoginHelper objLoginHelper, string entrySource)
        {
            Acc_PrePostTransMaster objPrePostTransMaster = new Acc_PrePostTransMaster();

            objPrePostTransMaster.LocationCode                 = objLoginHelper.LocationCode;
            objPrePostTransMaster.TransDate                    = objCashBankVoucher.TransactionDate;
            objPrePostTransMaster.ProjectCode                  = objCashBankVoucher.ProjectCode;
            objPrePostTransMaster.TransNo                      = objCashBankVoucher.TransactionNo;
            objPrePostTransMaster.GenParticulars               = objCashBankVoucher.GeneralParticulars;
            objPrePostTransMaster.CBVoucher                    = Helper.VoucherSelection(voucherType);
            objPrePostTransMaster.CBVType                      = Helper.VoucherTypeSelection(voucherType);
            objPrePostTransMaster.IsAutoEntry                  = true;
            objPrePostTransMaster.EntrySource                  = entrySource;
            objPrePostTransMaster.SenderOrReceiverFlag         = null;
            objPrePostTransMaster.SenderOrReceiverLocationCode = null;
            objPrePostTransMaster.UserID    = objLoginHelper.LogInID;
            objPrePostTransMaster.EntryTime = DateTime.Now;

            return(objPrePostTransMaster);
        }
Ejemplo n.º 5
0
 public Acc_PrePostTransMaster CreateVoucher(Acc_TransNoCount objAccTransNocount, Acc_PrePostTransMaster objPrePostTransMaster, List <Acc_PrePostTransDetail> lstPrePostTransDetail, Aud_AuditAdjustmentRelatedAccountingTransaction objAuditAdjustmentRelatedAccountingTransaction, List <Acc_PrePostTransDetailByDimension> lstPrePostTransDetailByDimension)
 {
     return(AMSService.Create(objAccTransNocount, objPrePostTransMaster, lstPrePostTransDetail, objAuditAdjustmentRelatedAccountingTransaction, lstPrePostTransDetailByDimension));
 }
Ejemplo n.º 6
0
 public Acc_PrePostTransMaster CreateVoucher(Acc_PrePostTransMaster objPrePostTransMaster, List <EmployeeWiseSalaryPayment> lstEmployeeWiseSalary)
 {
     return(AMSService.Create(objPrePostTransMaster, lstEmployeeWiseSalary));
 }
Ejemplo n.º 7
0
 public Acc_PrePostTransMaster CreateVoucherForSaveEmployeeWiseSalaryPayment(Acc_TransNoCount objAccTransNocount, List <EmployeeWiseSalaryPayment> lstEmployeeWiseSalary, List <Acc_PrePostTransDetail> lstPrePostTransDetail, List <Acc_PrePostTransDetailByDimension> lstPrePostTransDetailByDimension, Acc_PrePostTransMaster objPrePostTransMaster, string supportMethod)
 {
     return(AMSService.Create(objAccTransNocount, lstEmployeeWiseSalary, lstPrePostTransDetail, lstPrePostTransDetailByDimension, objPrePostTransMaster, supportMethod));
 }
Ejemplo n.º 8
0
 public Acc_PrePostTransMaster CreateVoucher(Acc_TransNoCount objAccTransNocount, Acc_PrePostTransMaster objPrePostTransMaster, List <Acc_PrePostTransDetail> lstPrePostTransDetail, List <Acc_PrePostTransDetailByDimension> lstPrePostTransDetailByDimension)
 {
     return(AMSService.Create(objAccTransNocount, objPrePostTransMaster, lstPrePostTransDetail, lstPrePostTransDetailByDimension));
 }