Exemplo n.º 1
0
        public SubtotalTest()
        {
            m_Adapter = Facade.Create(db: "accounting-test");

            m_Adapter.DeleteVouchers(VoucherQueryUnconstrained.Instance);

            m_Adapter.Upsert(
                new Voucher
            {
                Date    = new(2016, 12, 31, 0, 0, 0, DateTimeKind.Utc),
                Remark  = "xrmk1",
                Details = new()
                {
                    new()
                    {
                        User     = "******",
                        Currency = "JPY",
                        Title    = 1234,
                        SubTitle = 56,
                        Content  = "cnt1",
                        Fund     = 123.45,
                        Remark   = "rmk1",
                    },
                    new()
                    {
                        User     = "******",
                        Currency = "JPY",
                        Title    = 6541,
                        SubTitle = 98,
                        Content  = "cnt1",
                        Fund     = -123.45,
                        Remark   = "rmk2",
                    },
                },
            });
Exemplo n.º 2
0
        public DbTest()
        {
            m_Adapter = Facade.Create(db: "accounting-test");

            m_Adapter.DeleteVouchers(VoucherQueryUnconstrained.Instance);

            ClientUser.Set("b1");
        }
Exemplo n.º 3
0
 public void Dispose()
 {
     m_Adapter.DeleteVouchers(VoucherQueryUnconstrained.Instance);
 }
Exemplo n.º 4
0
        public DbTest()
        {
            m_Adapter = Facade.Create("mongodb://localhost/accounting-test");

            m_Adapter.DeleteVouchers(VoucherQueryUnconstrained.Instance);
        }
Exemplo n.º 5
0
        public SubtotalTest()
        {
            m_Adapter = Facade.Create("mongodb://localhost/accounting-test");

            m_Adapter.DeleteVouchers(VoucherQueryUnconstrained.Instance);

            m_Adapter.Upsert(
                new Voucher
            {
                Date    = new DateTime(2016, 12, 31, 0, 0, 0, DateTimeKind.Utc),
                Remark  = "xrmk1",
                Details = new List <VoucherDetail>
                {
                    new VoucherDetail
                    {
                        Currency = "JPY",
                        Title    = 1234,
                        SubTitle = 56,
                        Content  = "cnt1",
                        Fund     = 123.45,
                        Remark   = "rmk1"
                    },
                    new VoucherDetail
                    {
                        Currency = "JPY",
                        Title    = 6541,
                        SubTitle = 98,
                        Content  = "cnt1",
                        Fund     = -123.45,
                        Remark   = "rmk2"
                    }
                }
            });

            m_Adapter.Upsert(
                new Voucher
            {
                Date    = new DateTime(2017, 02, 01, 0, 0, 0, DateTimeKind.Utc),
                Remark  = "xrmk2",
                Details = new List <VoucherDetail>
                {
                    new VoucherDetail
                    {
                        Currency = "JPY",
                        Title    = 1234,
                        SubTitle = 56,
                        Content  = "cnt1",
                        Fund     = 78.53,
                        Remark   = "rmk1"
                    },
                    new VoucherDetail
                    {
                        Currency = "JPY",
                        Title    = 6541,
                        SubTitle = 98,
                        Content  = "cnt1",
                        Fund     = -78.53,
                        Remark   = "rmk2"
                    },
                    new VoucherDetail
                    {
                        Currency = "USD",
                        Title    = 1234,
                        SubTitle = 56,
                        Content  = "cnt2",
                        Fund     = 66.66,
                        Remark   = "rmk1"
                    },
                    new VoucherDetail
                    {
                        Currency = "USD",
                        Title    = 6541,
                        SubTitle = 98,
                        Content  = "cnt2",
                        Fund     = -66.66,
                        Remark   = "rmk2"
                    }
                }
            });
        }
Exemplo n.º 6
0
 public void Dispose()
 => m_Adapter.DeleteVouchers(VoucherQueryUnconstrained.Instance).AsTask().Wait();
Exemplo n.º 7
0
    public DbTest()
    {
        m_Adapter = Facade.Create(db: "accounting-test");

        m_Adapter.DeleteVouchers(VoucherQueryUnconstrained.Instance).AsTask().Wait();
    }
Exemplo n.º 8
0
        public SubtotalTest()
        {
            m_Adapter = Facade.Create(db: "accounting-test");

            m_Adapter.DeleteVouchers(VoucherQueryUnconstrained.Instance);

            m_Adapter.Upsert(
                new Voucher
            {
                Date    = new DateTime(2016, 12, 31, 0, 0, 0, DateTimeKind.Utc),
                Remark  = "xrmk1",
                Details = new List <VoucherDetail>
                {
                    new VoucherDetail
                    {
                        User     = "******",
                        Currency = "JPY",
                        Title    = 1234,
                        SubTitle = 56,
                        Content  = "cnt1",
                        Fund     = 123.45,
                        Remark   = "rmk1",
                    },
                    new VoucherDetail
                    {
                        User     = "******",
                        Currency = "JPY",
                        Title    = 6541,
                        SubTitle = 98,
                        Content  = "cnt1",
                        Fund     = -123.45,
                        Remark   = "rmk2",
                    },
                },
            });

            m_Adapter.Upsert(
                new Voucher
            {
                Date    = new DateTime(2017, 02, 01, 0, 0, 0, DateTimeKind.Utc),
                Remark  = "xrmk2",
                Details = new List <VoucherDetail>
                {
                    new VoucherDetail
                    {
                        User     = "******",
                        Currency = "JPY",
                        Title    = 1234,
                        SubTitle = 56,
                        Content  = "cnt1",
                        Fund     = 78.53,
                        Remark   = "rmk1",
                    },
                    new VoucherDetail
                    {
                        User     = "******",
                        Currency = "JPY",
                        Title    = 6541,
                        SubTitle = 98,
                        Content  = "cnt1",
                        Fund     = -78.53,
                        Remark   = "rmk2",
                    },
                    new VoucherDetail
                    {
                        User     = "******",
                        Currency = "USD",
                        Title    = 1234,
                        SubTitle = 56,
                        Content  = "cnt2",
                        Fund     = 66.66,
                        Remark   = "rmk1",
                    },
                    new VoucherDetail
                    {
                        User     = "******",
                        Currency = "USD",
                        Title    = 6541,
                        SubTitle = 98,
                        Content  = "cnt2",
                        Fund     = -66.66,
                        Remark   = "rmk2",
                    },
                    new VoucherDetail
                    {
                        User = "******", Currency = "EUR", Title = 2333, Fund = 114514,
                    },
                },
            });

            ClientUser.Set("b1");
        }