This commit is contained in:
Gerard 2019-01-15 11:26:08 +01:00
commit 90d308afd6
7 changed files with 59 additions and 46 deletions

View File

@ -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
- /containers/vn-mailer:/etc/vn-mailer

View File

@ -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 = ?

View File

@ -6,7 +6,6 @@
data="addresses"
auto-load="true">
</vn-crud-model>
<vn-vertical>
<vn-card pad-large compact>
<vn-title vn-one>Addresses</vn-title>

View File

@ -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':

View File

@ -30,7 +30,7 @@
</vn-one>
<vn-one>
<div class="totalBox" ng-if="riskTotal.length">
<h6> Total por empresa</h6>
<h6 translate>Total by company</h6>
<vn-auto ng-repeat="riskByCompany in riskTotal">
<vn-label-value
label="{{riskByCompany.company.code}}"
@ -48,11 +48,11 @@
<vn-th>Creation date</vn-th>
<vn-th>Employee</vn-th>
<vn-th>Reference</vn-th>
<vn-th>Bank</vn-th>
<vn-th>Debit</vn-th>
<vn-th>Havings</vn-th>
<vn-th>Balance</vn-th>
<vn-th>Conciliated</vn-th>
<vn-th number>Bank</vn-th>
<vn-th number>Debit</vn-th>
<vn-th number>Havings</vn-th>
<vn-th number>Balance</vn-th>
<vn-th center>Conciliated</vn-th>
<vn-th></vn-th>
</vn-tr>
</vn-thead>
@ -62,23 +62,23 @@
<vn-td>{{::risk.created | dateTime:'dd/MM/yyyy HH:mm'}}</vn-td>
<vn-td>{{::risk.firstName}} {{::risk.name}}</vn-td>
<vn-td>{{::risk.ref ? 'N/FRA ' + risk.ref : ''}}</vn-td>
<vn-td>{{::risk.bankFk}}</vn-td>
<vn-td>{{::risk.debit | currency:'€':2}}</vn-td>
<vn-td>{{::risk.credit | currency:'€':2}}</vn-td>
<vn-td>{{risk.balance | currency:'€':2}}</vn-td>
<vn-td style="text-align: center">
<vn-td number>{{::risk.bankFk}}</vn-td>
<vn-td number>{{::risk.debit | currency:'€':2}}</vn-td>
<vn-td number>{{::risk.credit | currency:'€':2}}</vn-td>
<vn-td number>{{risk.balance | currency:'€':2}}</vn-td>
<vn-td center>
<vn-check
field="risk.isConciliate"
disabled="true">
</vn-check>
</vn-td>
<vn-td style="text-align: center">
<a ng-show="risk.ref"
<vn-td center>
<a ng-show="risk.pdf"
href="api/InvoiceOuts/{{::risk.ref}}/download?access_token={{::$ctrl.accessToken}}">
<vn-icon
<vn-icon-button
icon="cloud_download"
title="Download PDF">
</vn-icon>
</vn-icon-button>
</a>
</vn-td>
</vn-tr>
@ -94,8 +94,13 @@
</vn-pagination>
</vn-card>
</vn-vertical>
<a ui-sref="client.card.risk.create" vn-tooltip="New payment"
vn-bind="+" fixed-bottom-right>
<vn-float-button vn-acl="administrative" vn-acl-action="remove" icon="add"></vn-float-button>
<a ui-sref="client.card.risk.create"
vn-tooltip="New payment"
vn-bind="+"
fixed-bottom-right>
<vn-float-button
vn-acl="administrative"
vn-acl-action="remove"
icon="add">
</vn-float-button>
</a>

View File

@ -4,4 +4,7 @@ Bank: Caja
Debit: Debe
Conciliated: Conciliado
New payment: Añadir pago
Havings: Haber
Havings: Haber
Balance: Balance
Total by company: Total por empresa
Download PDF: Descargar PDF

View File

@ -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;
module.exports = config;