diff --git a/docker-compose.yml b/docker-compose.yml index 1f4a3ee29..497803c4c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,8 +24,8 @@ services: image: registry.verdnatura.es/salix-mailer:${TAG} restart: unless-stopped build: - dockerfile: services/mailer/Dockerfile + context: services/mailer environment: - NODE_ENV volumes: - - /config/vn-mailer \ No newline at end of file + - /containers/vn-mailer:/etc/vn-mailer \ No newline at end of file diff --git a/modules/client/back/methods/receipt/filter.js b/modules/client/back/methods/receipt/filter.js index f4ec6ad40..b9f26b1ab 100644 --- a/modules/client/back/methods/receipt/filter.js +++ b/modules/client/back/methods/receipt/filter.js @@ -42,7 +42,8 @@ module.exports = Self => { r.bankFk, firstName, name, - r.clientFk + r.clientFk, + FALSE pdf FROM vn.receipt r LEFT JOIN vn.worker w ON w.id = r.workerFk JOIN vn.company c ON c.id = r.companyFk @@ -60,7 +61,8 @@ module.exports = Self => { NULL, NULL, NULL, - i.clientFk + i.clientFk, + i.pdf FROM vn.invoiceOut i JOIN vn.company c ON c.id = i.companyFk WHERE i.clientFk = ? AND i.companyFk = ? diff --git a/modules/client/front/address/index/index.html b/modules/client/front/address/index/index.html index b9e60c2e2..494d249d9 100644 --- a/modules/client/front/address/index/index.html +++ b/modules/client/front/address/index/index.html @@ -6,7 +6,6 @@ data="addresses" auto-load="true"> - Addresses diff --git a/modules/client/front/index/index.js b/modules/client/front/index/index.js index 7fa644f5c..1497224fe 100644 --- a/modules/client/front/index/index.js +++ b/modules/client/front/index/index.js @@ -12,7 +12,7 @@ export default class Controller { case 'search': return /^\d+$/.test(value) ? {id: value} - : {name: {regexp: value}}; + : {name: {like: `%${value}%`}}; case 'phone': return { or: [ @@ -23,7 +23,7 @@ export default class Controller { case 'name': case 'socialName': case 'city': - return {[param]: {regexp: value}}; + return {[param]: {regexp: `%${value}%`}}; case 'id': case 'fi': case 'postcode': diff --git a/modules/client/front/risk/index/index.html b/modules/client/front/risk/index/index.html index d93a77b59..9c87712f9 100644 --- a/modules/client/front/risk/index/index.html +++ b/modules/client/front/risk/index/index.html @@ -30,7 +30,7 @@
-
Total por empresa
+
Total by company
Creation date Employee Reference - Bank - Debit - Havings - Balance - Conciliated + Bank + Debit + Havings + Balance + Conciliated @@ -62,23 +62,23 @@ {{::risk.created | dateTime:'dd/MM/yyyy HH:mm'}} {{::risk.firstName}} {{::risk.name}} {{::risk.ref ? 'N/FRA ' + risk.ref : ''}} - {{::risk.bankFk}} - {{::risk.debit | currency:'€':2}} - {{::risk.credit | currency:'€':2}} - {{risk.balance | currency:'€':2}} - + {{::risk.bankFk}} + {{::risk.debit | currency:'€':2}} + {{::risk.credit | currency:'€':2}} + {{risk.balance | currency:'€':2}} + - - + - - + @@ -94,8 +94,13 @@ - - + + + - \ No newline at end of file diff --git a/modules/client/front/risk/index/locale/es.yml b/modules/client/front/risk/index/locale/es.yml index f0eb2cd52..17672a8a9 100644 --- a/modules/client/front/risk/index/locale/es.yml +++ b/modules/client/front/risk/index/locale/es.yml @@ -4,4 +4,7 @@ Bank: Caja Debit: Debe Conciliated: Conciliado New payment: Añadir pago -Havings: Haber \ No newline at end of file +Havings: Haber +Balance: Balance +Total by company: Total por empresa +Download PDF: Descargar PDF \ No newline at end of file diff --git a/services/mailer/application/config.js b/services/mailer/application/config.js index e1b9eb8d0..f0f0dfea6 100644 --- a/services/mailer/application/config.js +++ b/services/mailer/application/config.js @@ -1,30 +1,34 @@ require('require-yaml'); const fs = require('fs-extra'); -const package = require('../package.json'); -let configPath = `/config/${package.name}`; -let nginxConfigPath = '/config/nginx'; - +const packageJson = require('../package.json'); +let configPath = `/etc/${packageJson.name}`; let env = process.env.NODE_ENV ? process.env.NODE_ENV : 'development'; -if (env === 'development') { - configPath = `${__dirname}/config`; - nginxConfigPath = '../../nginx'; +let config = require('./config/datasources.json'); +let configFiles = [ + `${configPath}/datasources.json`, + `${configPath}/datasources.${env}.json` +]; + +for (let configFile of configFiles) { + if (fs.existsSync(configFile)) + Object.assign(config, require(configFile)); } -let config = require(`${configPath}/datasources.json`); -let configEnvFile = `${configPath}/datasources.${env}.json`; +let proxyConf = {}; +let proxyFiles = [ + '../../nginx/config.yml', + `${configPath}/config.yml`, + `${configPath}/config.${env}.yml` +]; -if (fs.existsSync(configEnvFile)) - Object.assign(config, require(configEnvFile)); - -let proxyConf = require(`${nginxConfigPath}/config.yml`); -let proxyEnvFile = `${nginxConfigPath}/config.${env}.yml`; - -if (fs.existsSync(proxyEnvFile)) - Object.assign(proxyConf, require(proxyEnvFile)); +for (let proxyFile of proxyFiles) { + if (fs.existsSync(proxyFile)) + Object.assign(proxyConf, require(proxyFile)); +} config.proxy = proxyConf; -config.package = package; +config.package = packageJson; config.env = env; -module.exports = config; \ No newline at end of file +module.exports = config;