diff --git a/modules/invoiceOut/back/methods/invoiceOut/createPdf.js b/modules/invoiceOut/back/methods/invoiceOut/createPdf.js index 2a0aec2bb..b866a5cf2 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/createPdf.js +++ b/modules/invoiceOut/back/methods/invoiceOut/createPdf.js @@ -59,10 +59,10 @@ module.exports = Self => { } }); - const created = invoiceOut.created; - const year = created.getFullYear().toString(); - const month = (created.getMonth() + 1).toString(); - const day = created.getDate().toString(); + const issued = invoiceOut.issued; + const year = issued.getFullYear().toString(); + const month = (issued.getMonth() + 1).toString(); + const day = issued.getDate().toString(); const container = await models.InvoiceContainer.container(year); const rootPath = container.client.root; diff --git a/modules/invoiceOut/back/methods/invoiceOut/download.js b/modules/invoiceOut/back/methods/invoiceOut/download.js index 0dcbd0e92..f1138dd51 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/download.js +++ b/modules/invoiceOut/back/methods/invoiceOut/download.js @@ -45,10 +45,10 @@ module.exports = Self => { try { const invoiceOut = await models.InvoiceOut.findById(id, null, myOptions); - const created = invoiceOut.created; - const year = created.getFullYear().toString(); - const month = (created.getMonth() + 1).toString(); - const day = created.getDate().toString(); + const issued = invoiceOut.issued; + const year = issued.getFullYear().toString(); + const month = (issued.getMonth() + 1).toString(); + const day = issued.getDate().toString(); const container = await models.InvoiceContainer.container(year); const rootPath = container.client.root;