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);
|
||||
}
|
||||
|
||||
const invoiceableClients = await getInvoiceableClients(ctx, myOptions);
|
||||
const invoiceableClients = await getInvoiceableClients(ctx, minShipped, myOptions);
|
||||
|
||||
if (!invoiceableClients) return;
|
||||
|
||||
|
@ -145,11 +145,9 @@ module.exports = Self => {
|
|||
], options);
|
||||
}
|
||||
|
||||
async function getInvoiceableClients(ctx, options) {
|
||||
async function getInvoiceableClients(ctx, minShipped, options) {
|
||||
const models = Self.app.models;
|
||||
const args = ctx.args;
|
||||
const minShipped = new Date();
|
||||
minShipped.setFullYear(minShipped.getFullYear() - 1);
|
||||
|
||||
const query = `SELECT
|
||||
c.id,
|
||||
|
|
Loading…
Reference in New Issue