Ejemplo n.º 1
0
        public async Task <IActionResult> GetAccountReceivableInterestView(long accountReceivableInterestId)
        {
            AccountReceivableInterestModule invMod = new AccountReceivableInterestModule();

            AccountReceivableInterestView view = await invMod.AccountReceivableInterest.Query().GetViewById(accountReceivableInterestId);

            return(Ok(view));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> DeleteAccountReceivableInterest([FromBody] AccountReceivableInterestView view)
        {
            AccountReceivableInterestModule invMod = new AccountReceivableInterestModule();
            AccountReceivableInterest       accountReceivableInterest = await invMod.AccountReceivableInterest.Query().MapToEntity(view);

            invMod.AccountReceivableInterest.DeleteAccountReceivableInterest(accountReceivableInterest).Apply();

            return(Ok(view));
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> UpdateAccountReceivableInterest([FromBody] AccountReceivableInterestView view)
        {
            AccountReceivableInterestModule invMod = new AccountReceivableInterestModule();

            AccountReceivableInterest accountReceivableInterest = await invMod.AccountReceivableInterest.Query().MapToEntity(view);


            invMod.AccountReceivableInterest.UpdateAccountReceivableInterest(accountReceivableInterest).Apply();

            AccountReceivableInterestView retView = await invMod.AccountReceivableInterest.Query().GetViewById(accountReceivableInterest.AcctRecInterestId);


            return(Ok(retView));
        }
Ejemplo n.º 4
0
        public async Task <IActionResult> AddAccountReceivableInterest([FromBody] AccountReceivableInterestView view)
        {
            AccountReceivableInterestModule invMod = new AccountReceivableInterestModule();

            NextNumber nnAccountReceivableInterest = await invMod.AccountReceivableInterest.Query().GetNextNumber();

            view.AccountReceivableInterestNumber = nnAccountReceivableInterest.NextNumberValue;

            AccountReceivableInterest accountReceivableInterest = await invMod.AccountReceivableInterest.Query().MapToEntity(view);

            invMod.AccountReceivableInterest.AddAccountReceivableInterest(accountReceivableInterest).Apply();

            AccountReceivableInterestView newView = await invMod.AccountReceivableInterest.Query().GetViewByNumber(view.AccountReceivableInterestNumber);


            return(Ok(newView));
        }