fix(invoice): invalid date for PDF storage
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
7ccb325ecc
commit
3df03b31a3
|
@ -59,10 +59,10 @@ module.exports = Self => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const created = invoiceOut.created;
|
const issued = invoiceOut.issued;
|
||||||
const year = created.getFullYear().toString();
|
const year = issued.getFullYear().toString();
|
||||||
const month = (created.getMonth() + 1).toString();
|
const month = (issued.getMonth() + 1).toString();
|
||||||
const day = created.getDate().toString();
|
const day = issued.getDate().toString();
|
||||||
|
|
||||||
const container = await models.InvoiceContainer.container(year);
|
const container = await models.InvoiceContainer.container(year);
|
||||||
const rootPath = container.client.root;
|
const rootPath = container.client.root;
|
||||||
|
|
|
@ -45,10 +45,10 @@ module.exports = Self => {
|
||||||
try {
|
try {
|
||||||
const invoiceOut = await models.InvoiceOut.findById(id, null, myOptions);
|
const invoiceOut = await models.InvoiceOut.findById(id, null, myOptions);
|
||||||
|
|
||||||
const created = invoiceOut.created;
|
const issued = invoiceOut.issued;
|
||||||
const year = created.getFullYear().toString();
|
const year = issued.getFullYear().toString();
|
||||||
const month = (created.getMonth() + 1).toString();
|
const month = (issued.getMonth() + 1).toString();
|
||||||
const day = created.getDate().toString();
|
const day = issued.getDate().toString();
|
||||||
|
|
||||||
const container = await models.InvoiceContainer.container(year);
|
const container = await models.InvoiceContainer.container(year);
|
||||||
const rootPath = container.client.root;
|
const rootPath = container.client.root;
|
||||||
|
|
Loading…
Reference in New Issue