credit request
This commit is contained in:
parent
68f3544477
commit
92a476bd05
|
@ -1,8 +1,11 @@
|
|||
const Stylesheet = require(`${appPath}/core/stylesheet`);
|
||||
const Stylesheet = require(`vn-print/core/stylesheet`);
|
||||
|
||||
const path = require('path');
|
||||
const vnPrintPath = path.resolve('print');
|
||||
|
||||
module.exports = new Stylesheet([
|
||||
`${appPath}/common/css/spacing.css`,
|
||||
`${appPath}/common/css/misc.css`,
|
||||
`${appPath}/common/css/layout.css`,
|
||||
`${appPath}/common/css/email.css`])
|
||||
`${vnPrintPath}/common/css/spacing.css`,
|
||||
`${vnPrintPath}/common/css/misc.css`,
|
||||
`${vnPrintPath}/common/css/layout.css`,
|
||||
`${vnPrintPath}/common/css/email.css`])
|
||||
.mergeStyles();
|
|
@ -1,4 +1,4 @@
|
|||
const Component = require(`${appPath}/core/component`);
|
||||
const Component = require(`vn-print/core/component`);
|
||||
const emailHeader = new Component('email-header');
|
||||
const emailFooter = new Component('email-footer');
|
||||
const attachment = new Component('attachment');
|
||||
|
@ -15,7 +15,7 @@ module.exports = {
|
|||
return {attachments};
|
||||
},
|
||||
props: {
|
||||
recipientId: {
|
||||
id: {
|
||||
type: [Number, String],
|
||||
required: true
|
||||
},
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
const Stylesheet = require(`${appPath}/core/stylesheet`);
|
||||
const Stylesheet = require(`vn-print/core/stylesheet`);
|
||||
|
||||
const path = require('path');
|
||||
const vnPrintPath = path.resolve('print');
|
||||
|
||||
module.exports = new Stylesheet([
|
||||
`${appPath}/common/css/spacing.css`,
|
||||
`${appPath}/common/css/misc.css`,
|
||||
`${appPath}/common/css/layout.css`,
|
||||
`${appPath}/common/css/email.css`])
|
||||
`${vnPrintPath}/common/css/spacing.css`,
|
||||
`${vnPrintPath}/common/css/misc.css`,
|
||||
`${vnPrintPath}/common/css/layout.css`,
|
||||
`${vnPrintPath}/common/css/email.css`])
|
||||
.mergeStyles();
|
|
@ -1,4 +1,4 @@
|
|||
const Component = require(`${appPath}/core/component`);
|
||||
const Component = require(`vn-print/core/component`);
|
||||
const emailHeader = new Component('email-header');
|
||||
const emailFooter = new Component('email-footer');
|
||||
const attachment = new Component('attachment');
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
const Stylesheet = require(`${appPath}/core/stylesheet`);
|
||||
const Stylesheet = require(`vn-print/core/stylesheet`);
|
||||
|
||||
const path = require('path');
|
||||
const vnPrintPath = path.resolve('print');
|
||||
|
||||
module.exports = new Stylesheet([
|
||||
`${appPath}/common/css/spacing.css`,
|
||||
`${appPath}/common/css/misc.css`,
|
||||
`${appPath}/common/css/layout.css`,
|
||||
`${appPath}/common/css/report.css`,
|
||||
`${vnPrintPath}/common/css/spacing.css`,
|
||||
`${vnPrintPath}/common/css/misc.css`,
|
||||
`${vnPrintPath}/common/css/layout.css`,
|
||||
`${vnPrintPath}/common/css/report.css`,
|
||||
`${__dirname}/style.css`])
|
||||
.mergeStyles();
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
const Component = require(`${appPath}/core/component`);
|
||||
const Component = require(`vn-print/core/component`);
|
||||
const reportHeader = new Component('report-header');
|
||||
const reportFooter = new Component('report-footer');
|
||||
|
||||
module.exports = {
|
||||
name: 'client-debt-statement',
|
||||
async serverPrefetch() {
|
||||
this.client = await this.fetchClient(this.recipientId);
|
||||
this.sales = await this.fetchSales(this.recipientId, this.from);
|
||||
this.client = await this.fetchClient(this.id);
|
||||
this.sales = await this.fetchSales(this.id, this.from);
|
||||
|
||||
if (!this.client)
|
||||
throw new Error('Something went wrong');
|
||||
|
@ -22,21 +22,21 @@ module.exports = {
|
|||
return {totalBalance: 0.00};
|
||||
},
|
||||
methods: {
|
||||
fetchClient(clientId) {
|
||||
return this.findOneFromDef('client', [clientId]);
|
||||
fetchClient(id) {
|
||||
return this.findOneFromDef('client', [id]);
|
||||
},
|
||||
fetchSales(clientId, from) {
|
||||
fetchSales(id, from) {
|
||||
return this.rawSqlFromDef('sales', [
|
||||
from,
|
||||
clientId,
|
||||
id,
|
||||
from,
|
||||
clientId,
|
||||
id,
|
||||
from,
|
||||
clientId,
|
||||
id,
|
||||
from,
|
||||
clientId,
|
||||
id,
|
||||
from,
|
||||
clientId
|
||||
id
|
||||
]);
|
||||
},
|
||||
getBalance(sale) {
|
||||
|
@ -68,7 +68,7 @@ module.exports = {
|
|||
'report-footer': reportFooter.build()
|
||||
},
|
||||
props: {
|
||||
recipientId: {
|
||||
id: {
|
||||
type: [Number, String],
|
||||
required: true
|
||||
},
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
const Stylesheet = require(`${appPath}/core/stylesheet`);
|
||||
const Stylesheet = require(`vn-print/core/stylesheet`);
|
||||
|
||||
const path = require('path');
|
||||
const vnPrintPath = path.resolve('print');
|
||||
|
||||
module.exports = new Stylesheet([
|
||||
`${appPath}/common/css/spacing.css`,
|
||||
`${appPath}/common/css/misc.css`,
|
||||
`${appPath}/common/css/layout.css`,
|
||||
`${appPath}/common/css/report.css`,
|
||||
`${vnPrintPath}/common/css/spacing.css`,
|
||||
`${vnPrintPath}/common/css/misc.css`,
|
||||
`${vnPrintPath}/common/css/layout.css`,
|
||||
`${vnPrintPath}/common/css/report.css`,
|
||||
`${__dirname}/style.css`])
|
||||
.mergeStyles();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const Component = require(`${appPath}/core/component`);
|
||||
const Component = require(`vn-print/core/component`);
|
||||
const reportHeader = new Component('report-header');
|
||||
const reportFooter = new Component('report-footer');
|
||||
|
||||
|
|
Loading…
Reference in New Issue