add: profit akun coa

This commit is contained in:
ilham
2021-12-23 20:43:34 +07:00
parent ef1ef4d429
commit d9415dbaa3
3 changed files with 11 additions and 1 deletions

View File

@@ -95,6 +95,15 @@ export class UsersService {
dataCoaAR.coaEntityManager = manager;
await this.coaService.create(dataCoaAR);
if (roles.name == 'Supervisor' || roles.name == 'Sales') {
const dataCOAProfit = new InputCoaDto();
dataCOAProfit.user = userData;
dataCOAProfit.balanceType = balanceType.CREDIT;
dataCOAProfit.type = coaType.PROFIT;
dataCOAProfit.coaEntityManager = manager;
await this.coaService.create(dataCOAProfit);
}
if (createUserDto.superior) {
const dataCoaAP = new InputCoaDto();
dataCoaAP.user = userData;