refacotor: delete duplicated variable
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
84788afc10
commit
e659f0f020
|
@ -95,7 +95,7 @@ module.exports = Self => {
|
||||||
], myOptions);
|
], myOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
const invoiceableClients = await getInvoiceableClients(ctx, myOptions);
|
const invoiceableClients = await getInvoiceableClients(ctx, minShipped, myOptions);
|
||||||
|
|
||||||
if (!invoiceableClients) return;
|
if (!invoiceableClients) return;
|
||||||
|
|
||||||
|
@ -145,11 +145,9 @@ module.exports = Self => {
|
||||||
], options);
|
], options);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getInvoiceableClients(ctx, options) {
|
async function getInvoiceableClients(ctx, minShipped, options) {
|
||||||
const models = Self.app.models;
|
const models = Self.app.models;
|
||||||
const args = ctx.args;
|
const args = ctx.args;
|
||||||
const minShipped = new Date();
|
|
||||||
minShipped.setFullYear(minShipped.getFullYear() - 1);
|
|
||||||
|
|
||||||
const query = `SELECT
|
const query = `SELECT
|
||||||
c.id,
|
c.id,
|
||||||
|
|
Loading…
Reference in New Issue