feat: invoice, estimate and receipt printing.

This commit is contained in:
a.bouhuolia
2021-08-17 10:47:04 +02:00
parent 70939c5741
commit 160b8b6a1b
50 changed files with 3607 additions and 120 deletions

View File

@@ -1,5 +1,5 @@
import { Model, mixin } from 'objection';
import { snakeCase } from 'lodash';
import { snakeCase, transform } from 'lodash';
import { mapKeysDeep } from 'utils';
import PaginationQueryBuilder from 'models/Pagination';
import DateSession from 'models/DateSession';
@@ -47,4 +47,9 @@ export default class ModelBase extends mixin(Model, [DateSession]) {
static relationBindKnex(model) {
return this.knexBinded ? model.bindKnex(this.knexBinded) : model;
}
toObject(opt) {
const parsedJson = super.$formatJson(this, opt);
return parsedJson;
}
}