add: profit akun coa
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user