Esempio n. 1
0
        // DailyCashFlowReport
        public Object GetFinance([FromBody] FinanceankPlan fp)
        {
            string              sJSONResponse = "";
            FinanceOutput       fop           = new FinanceOutput();
            List <FinanceTypes> ftype         = new List <FinanceTypes>();

            for (int i = 1; i <= 2; i++)
            {
                string Type = "";
                if (i == 2)
                {
                    Type = "Expence";
                }
                FinanceTypes dashboardlist = new FinanceTypes {
                    TypeId = i, TypeName = "Income", SubTypes = GetSubType(i, fp.FromDate, fp.ToDate, fp.BranchCode)
                };
                ftype.Add(dashboardlist);
            }

            fop.status    = "success";
            fop.value     = ftype;
            sJSONResponse = JsonConvert.SerializeObject(fop);

            return(sJSONResponse);
        }
Esempio n. 2
0
        public Object GetFinanceBankReconcilation([FromBody] FinanceankPlan fp)
        {
            string  sJSONResponse      = "";
            DataSet dt_Packageresposne = new DataSet();

            DataTable        dt_FinRecouncillation = getdata(string.Format("select TypeID,SubTypeID,LedgerID,VendorID,SourceId,FAPaymentModes,BranchCode,Amount,Date,InvoiceId,ExpenditureTo,BankAccountId,MatchedId,Recouncelled,FATID,Comments from FinanceBankReconcilation where BranchCode='{0}'  ", fp.BranchCode));
            FinanReconcilOpt fro = new FinanReconcilOpt();

            try
            {
                List <FinanceBankReconcilation> financerec = new List <FinanceBankReconcilation>();

                financerec.Add(new FinanceBankReconcilation
                {
                    TypeID = dt_FinRecouncillation.Rows[0]["TypeID"].ToString()
                    ,
                    SubTypeID = dt_FinRecouncillation.Rows[0]["SubTypeID"].ToString()
                    ,
                    LedgerID = dt_FinRecouncillation.Rows[0]["LedgerID"].ToString()
                    ,
                    VendorID = dt_FinRecouncillation.Rows[0]["VendorID"].ToString()
                    ,
                    SourceId = dt_FinRecouncillation.Rows[0]["SourceId"].ToString()
                    ,
                    FAPaymentModes = dt_FinRecouncillation.Rows[0]["FAPaymentModes"].ToString()
                    ,
                    BranchCode = dt_FinRecouncillation.Rows[0]["BranchCode"].ToString()
                    ,
                    Amount = dt_FinRecouncillation.Rows[0]["Amount"].ToString()
                    ,
                    Date = dt_FinRecouncillation.Rows[0]["Date"].ToString()
                    ,
                    InvoiceId = dt_FinRecouncillation.Rows[0]["InvoiceId"].ToString()
                    ,
                    ExpenditureTo = dt_FinRecouncillation.Rows[0]["ExpenditureTo"].ToString()
                    ,
                    BankAccountId = dt_FinRecouncillation.Rows[0]["BankAccountId"].ToString()
                    ,
                    MatchedId = dt_FinRecouncillation.Rows[0]["MatchedId"].ToString()
                    ,
                    Recouncelled = dt_FinRecouncillation.Rows[0]["Recouncelled"].ToString()
                    ,
                    FATID = dt_FinRecouncillation.Rows[0]["FATID"].ToString()
                    ,
                    Comments = dt_FinRecouncillation.Rows[0]["Comments"].ToString()
                });

                fro.status    = "Success";
                fro.value     = financerec;
                sJSONResponse = JsonConvert.SerializeObject(fro);
            }
            catch (Exception ec)
            {
                fro.status    = "fail";
                sJSONResponse = JsonConvert.SerializeObject(fro);
            }
            return(sJSONResponse);
        }
Esempio n. 3
0
        public Object GetFinanceTransactionReconcilation([FromBody] FinanceankPlan fp)
        {
            string  sJSONResponse      = "";
            DataSet dt_Packageresposne = new DataSet();

            DataTable dt_FinanceTransactionRecouncillation = getdata(string.Format("select TypeID,SourceID,SourceName,FAPaymentModes,BranchCode,MembershipCode,InvoiceID,Amount,PaymentDate,Receipt,AccountName,Comments,Source,BankAccountId from FinanceTransactionReconcilation where BranchCode='{0}' ", fp.BranchCode));
            FinanceTransactionReconcilationopt fro         = new FinanceTransactionReconcilationopt();

            try
            {
                List <FinanceTransactionReconcilation> financetransactionrecouncill = new List <FinanceTransactionReconcilation>();

                financetransactionrecouncill.Add(new FinanceTransactionReconcilation
                {
                    TypeID = dt_FinanceTransactionRecouncillation.Rows[0]["TypeID"].ToString()
                    ,
                    SourceID = dt_FinanceTransactionRecouncillation.Rows[0]["SourceID"].ToString()
                    ,
                    SourceName = dt_FinanceTransactionRecouncillation.Rows[0]["SourceName"].ToString()
                    ,
                    FAPaymentModes = dt_FinanceTransactionRecouncillation.Rows[0]["FAPaymentModes"].ToString()
                    ,
                    BranchCode = dt_FinanceTransactionRecouncillation.Rows[0]["BranchCode"].ToString()
                    ,
                    MembershipCode = dt_FinanceTransactionRecouncillation.Rows[0]["MembershipCode"].ToString()
                    ,
                    InvoiceID = dt_FinanceTransactionRecouncillation.Rows[0]["InvoiceID"].ToString()
                    ,
                    Amount = dt_FinanceTransactionRecouncillation.Rows[0]["Amount"].ToString()
                    ,
                    PaymentDate = dt_FinanceTransactionRecouncillation.Rows[0]["PaymentDate"].ToString()
                    ,
                    Receipt = dt_FinanceTransactionRecouncillation.Rows[0]["Receipt"].ToString()
                    ,
                    AccountName = dt_FinanceTransactionRecouncillation.Rows[0]["AccountName"].ToString()
                    ,
                    Comments = dt_FinanceTransactionRecouncillation.Rows[0]["Comments"].ToString()
                    ,
                    Source = dt_FinanceTransactionRecouncillation.Rows[0]["Source"].ToString()
                    ,
                    BankAccountId = dt_FinanceTransactionRecouncillation.Rows[0]["BankAccountId"].ToString()
                });

                fro.status    = "Success";
                fro.value     = financetransactionrecouncill;
                sJSONResponse = JsonConvert.SerializeObject(fro);
            }
            catch (Exception ec)
            {
                fro.status    = "fail";
                sJSONResponse = JsonConvert.SerializeObject(fro);
            }
            return(sJSONResponse);
        }
Esempio n. 4
0
        public Object FinanceAccountingTransactions([FromBody] FinanceankPlan fp)
        {
            FATopt  FOutputA       = new FATopt();
            DataSet ds_SlotBooking = new DataSet();
            string  sJSONResponse  = "";

            try
            {
                List <FATTypes> types = new List <FATTypes>();
                for (int i = 1; i <= 3; i++)
                {
                    if (i == 1)
                    {
                        types.Add(new FATTypes {
                            TypeId = 1, TypeName = "CashInFlow", SubType = GetSubTypes(1)
                        });
                    }
                    if (i == 2)
                    {
                        types.Add(new FATTypes {
                            TypeId = 2, TypeName = "CashOutFlow", SubType = GetSubTypes(2)
                        });
                    }
                }

                FOutputA.status = "success";
                FOutputA.value  = types;

                sJSONResponse = JsonConvert.SerializeObject(FOutputA);
            }
            catch (Exception ec)
            {
                FOutputA.status = "fail";
                sJSONResponse   = JsonConvert.SerializeObject(FOutputA);
            }


            return(sJSONResponse);
        }