fix: subtitle issue with sales transaction number.

This commit is contained in:
Ahmed Bouhuolia
2020-11-24 11:33:29 +02:00
parent 218d90c571
commit 9779591029
24 changed files with 218 additions and 76 deletions

View File

@@ -1,5 +1,5 @@
import { Inject, Service } from 'typedi';
import { omit, difference } from 'lodash';
import { omit, difference, defaultTo } from 'lodash';
import {
EventDispatcher,
EventDispatcherInterface,
@@ -51,8 +51,7 @@ export default class CustomersService {
return {
...omit(customerDTO, ['customerType']),
contactType: customerDTO.customerType,
active: (typeof customerDTO.active === 'undefined') ?
true : customerDTO.active,
active: defaultTo(customerDTO.active, true),
};
}