Example #1
0
        public ActionResult NonCashVoucher()
        {
            objLoginHelper = (LoginHelper)Session["LogInInformation"];

            if (!securityDal.IsPageAccessible(Helper.ForAccounting, "NonCashVoucher", objLoginHelper.UerRoleOrGroupID, Helper.Inactive, out message))
            {
                Session["messageInformation"] = message;
                return(RedirectToAction("ErrorMessage", "../ErrorHnadle"));
            }

            ViewBag.LocationTitle = objLoginHelper.LocationTitle;
            ViewBag.Location      = objLoginHelper.Location;
            ViewBag.ZoneTitle     = objLoginHelper.ZoneTitle;
            ViewBag.ZoneName      = objLoginHelper.LogInForZoneName;
            ViewBag.RegionTitle   = objLoginHelper.RegionTitle;
            ViewBag.RegionName    = objLoginHelper.LogInForRegionName;
            ViewBag.UnitTitle     = objLoginHelper.UnitTitle;
            ViewBag.UnitName      = objLoginHelper.LogInForUnitName;

            ViewBag.ModuleName = objLoginHelper.ModluleTitle;
            ViewBag.TopMenu    = objLoginHelper.TopMenu;

            ViewBag.Project     = accountingReportDal.ReadProject();
            ViewBag.AccountInfo = accountDeptDal.ReadCashBankAccountWithDimension(objLoginHelper.LocationCode, "100200", objLoginHelper.Location, Helper.SubsidytAccount);

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

            ViewBag.VoucherTransactionNumber = Helper.AccountSequenceNumberGeneration(transactionNumberMax, objLoginHelper);

            return(View());
        }
Example #2
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)
                });
            }
        }
Example #3
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)
                });
            }
        }
Example #4
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)
                });
            }
        }
Example #5
0
        public ActionResult ContraVoucherForAuditor()
        {
            objLoginHelper = (LoginHelper)Session["LogInInformation"];

            if (!securityDal.IsPageAccessible(Helper.ForAuditor, "ContraVoucherForAuditor", objLoginHelper.UerRoleOrGroupID, Helper.Inactive, out message))
            {
                Session["messageInformation"] = message;
                return(RedirectToAction("ErrorMessage", "../ErrorHnadle"));
            }

            string CheckAuditSetup = hrmsDal.ReadAuditSeqNumberAfterCheckFinishedDate(objLoginHelper.LocationCode);

            if (string.IsNullOrEmpty(CheckAuditSetup))
            {
                Session["messageInformation"] = "Please Configure Audit Setup First Before Any Transaction";
                return(RedirectToAction("ErrorMessage", "../ErrorHnadle"));
            }

            ViewBag.LocationTitle = objLoginHelper.LocationTitle;
            ViewBag.Location      = objLoginHelper.Location;
            ViewBag.ZoneTitle     = objLoginHelper.ZoneTitle;
            ViewBag.ZoneName      = objLoginHelper.LogInForZoneName;
            ViewBag.RegionTitle   = objLoginHelper.RegionTitle;
            ViewBag.RegionName    = objLoginHelper.LogInForRegionName;
            ViewBag.UnitTitle     = objLoginHelper.UnitTitle;
            ViewBag.UnitName      = objLoginHelper.LogInForUnitName;

            ViewBag.ModuleName = objLoginHelper.ModluleTitle;
            ViewBag.TopMenu    = objLoginHelper.TopMenu;

            ViewBag.Project = accountingReportDal.ReadProject();

            ViewBag.AccountInfo = accountDeptDal.ReadCashBankAccount(objLoginHelper.LocationCode, "100200", objLoginHelper.Location, Helper.SubsidytAccount);

            List <Aud_AdjustmentReasonCodes> newItemAdjustmentReason = new List <Aud_AdjustmentReasonCodes>();

            newItemAdjustmentReason = inventoryDal.AuditAdjustMentReasons(Helper.ContraVoucherForAuditor, Helper.ReasonForUserOrAuditor, Helper.ForAccounting);
            ViewBag.AuditReasons    = newItemAdjustmentReason;

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

            ViewBag.VoucherTransactionNumber = Helper.AccountSequenceNumberGeneration(transactionNumberMax, objLoginHelper);

            return(View());
        }