fix: get tax formula active only
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
55ddc9b605
commit
c0a0b2316d
|
@ -8,6 +8,7 @@ import {
|
||||||
TransactionBundlingItemEntity,
|
TransactionBundlingItemEntity,
|
||||||
TransactionItemEntity,
|
TransactionItemEntity,
|
||||||
} from '../../entities/transaction-item.entity';
|
} from '../../entities/transaction-item.entity';
|
||||||
|
import { STATUS } from 'src/core/strings/constants/base.constants';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class PriceCalculator {
|
export class PriceCalculator {
|
||||||
|
@ -87,7 +88,11 @@ export class PriceCalculator {
|
||||||
profit_share: profitShare,
|
profit_share: profitShare,
|
||||||
};
|
};
|
||||||
const dpp = await this.formulaService.salesPriceFormula();
|
const dpp = await this.formulaService.salesPriceFormula();
|
||||||
const taxFormula = await this.taxService.getManyByOptions({});
|
const taxFormula = await this.taxService.getManyByOptions({
|
||||||
|
where: {
|
||||||
|
status: STATUS.ACTIVE,
|
||||||
|
},
|
||||||
|
});
|
||||||
const shareFormulas = await this.formulaService.profitShareFormula();
|
const shareFormulas = await this.formulaService.profitShareFormula();
|
||||||
const taxShareFormulas = shareFormulas.map((formula) => {
|
const taxShareFormulas = shareFormulas.map((formula) => {
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue