This commit is contained in:
parent
c6083ebe61
commit
6185b2f055
|
@ -25,7 +25,7 @@ module.exports = Self => {
|
|||
const minDate = new Date();
|
||||
minDate.setFullYear(minDate.getFullYear() - 1);
|
||||
|
||||
const where = {dated: {gte: minDate.toJSON().split('T')[0]}};
|
||||
const where = {dated: {gte: minDate}};
|
||||
filter = mergeFilters(filter, {where});
|
||||
|
||||
const stmt = new ParameterizedSQL(
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const app = require('vn-loopback/server/server');
|
||||
|
||||
fdescribe('campaign latest()', () => {
|
||||
describe('campaign latest()', () => {
|
||||
it('should return the campaigns from the last year', async() => {
|
||||
const now = new Date();
|
||||
const result = await app.models.Campaign.latest();
|
||||
|
|
|
@ -2652,7 +2652,7 @@ INSERT INTO `vn`.`mdbVersion` (`app`, `branchFk`, `version`)
|
|||
|
||||
INSERT INTO `vn`.`accountingConfig` (`id`, `minDate`, `maxDate`)
|
||||
VALUES
|
||||
(1, '2022-01-01', '2024-01-01');
|
||||
(1, CONCAT(YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 YEAR)), '-01-01'), CONCAT(YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL +1 YEAR)), '-01-01'));
|
||||
|
||||
|
||||
INSERT INTO `vn`.`saleGroup` (`userFk`, `parkingFk`, `sectorFk`)
|
||||
|
|
Loading…
Reference in New Issue