public async Task <IActionResult> GetAccountReceivableInterestView(long accountReceivableInterestId) { AccountReceivableInterestModule invMod = new AccountReceivableInterestModule(); AccountReceivableInterestView view = await invMod.AccountReceivableInterest.Query().GetViewById(accountReceivableInterestId); return(Ok(view)); }
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)); }
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)); }
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)); }