//http://localhost:61612/api/ChartOfAccount/CoaViews?AccountIds=3&AccountIds=4&AccountIds=5 public async Task <IList <ChartOfAccountView> > Get([FromQuery] FilterChartOfAccount filter) { ChartOfAccountModule coaMod = new ChartOfAccountModule(); IList <ChartOfAccountView> list = await coaMod.ChartOfAccount.Query().GetViewsByIds(filter.AccountIds); return(list); }
public async Task TestCustomerCashPayment2() { int customerId = 2; GeneralLedgerView ledgerView = new GeneralLedgerView(); CustomerModule custMod = new CustomerModule(); long? addressId = await custMod.AddressBook.Query().GetAddressIdByCustomerId(customerId); ChartOfAccountModule coaMod = new ChartOfAccountModule(); ChartOfAccount coa = await coaMod.ChartOfAccount.Query().GetEntity("1000", "1200", "101", ""); ledgerView.GeneralLedgerId = -1; ledgerView.DocNumber = 1; ledgerView.DocType = "PV"; ledgerView.Amount = 250M; ledgerView.LedgerType = "AA"; ledgerView.GLDate = DateTime.Parse("8/10/2018"); ledgerView.AccountId = coa.AccountId; ledgerView.CreatedDate = DateTime.Parse("8/10/2018"); ledgerView.AddressId = addressId ?? 0; ledgerView.Comment = "First installment payment for dashboard"; ledgerView.DebitAmount = 250; ledgerView.CreditAmount = 0; ledgerView.FiscalPeriod = 8; ledgerView.FiscalYear = 2018; ledgerView.CheckNumber = "112"; AccountReceivableModule acctRecMod = new AccountReceivableModule(); bool result = await acctRecMod.CreateCustomerLedger(ledgerView); Assert.True(result); }
public async Task <IList <ChartOfAccountView> > GetPersonalExpenseCoa() { ChartOfAccountModule coaMod = new ChartOfAccountModule(); string company = "1000"; string busUnit = "1200"; string objectNumber = "502"; IList <ChartOfAccountView> list = await coaMod.ChartOfAccount.Query().GetViewsByAccount(company, busUnit, objectNumber, ""); return(list); }
public async Task TestCustomerCashPayment() { long?customerId = 9; GeneralLedgerView ledgerView = new GeneralLedgerView(); CustomerModule custMod = new CustomerModule(); long? addressId = await custMod.AddressBook.Query().GetAddressIdByCustomerId(customerId); ChartOfAccountModule coaMod = new ChartOfAccountModule(); ChartOfAccount coa = await coaMod.ChartOfAccount.Query().GetEntity("1000", "1200", "101", ""); ledgerView.GeneralLedgerId = -1; ledgerView.DocNumber = 12; ledgerView.DocType = "PV"; ledgerView.Amount = 189.63M; ledgerView.LedgerType = "AA"; ledgerView.GLDate = DateTime.Parse("7/21/2018"); ledgerView.AccountId = coa.AccountId; ledgerView.CreatedDate = DateTime.Parse("7/21/2018"); ledgerView.AddressId = addressId ?? 0; ledgerView.Comment = "Payment in Part for 50% sharing of project income"; ledgerView.DebitAmount = 189.63M; ledgerView.CreditAmount = 0; ledgerView.FiscalPeriod = 7; ledgerView.FiscalYear = 2018; ledgerView.CheckNumber = "111"; AccountReceivableModule acctRecMod = new AccountReceivableModule(); bool result = await acctRecMod.CreateCustomerCashPayment(ledgerView); Assert.True(true); }