Merge branch 'dev' of https: refs #6629//gitea.verdnatura.es/verdnatura/salix into 6629-addressObservationBack2
gitea/salix/pipeline/pr-dev This commit looks good
Details
gitea/salix/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
commit
95e7757574
103
CHANGELOG.md
103
CHANGELOG.md
|
@ -1,3 +1,106 @@
|
|||
# Version 24.52 - 2024-01-07
|
||||
|
||||
### Added 🆕
|
||||
|
||||
- chore: pullinfo by:alexm
|
||||
- chore: refs #8002 drop comments by:jorgep
|
||||
- chore: refs #8002 drop useless code by:jorgep
|
||||
- feat: added translations and show error in item-type by:Jon
|
||||
- feat: modified data to be equal as the updated back by:Jon
|
||||
- feat: refs #4460 invoiceIn refund by:Carlos Andrés
|
||||
- feat: refs #4466 invoiceIn refund by:Carlos Andrés
|
||||
- feat: refs #6583 add new opt in where builder by:jorgep
|
||||
- feat: refs #6583 add tests by:jorgep
|
||||
- feat: refs #6583 retrieve cloned sale by:jorgep
|
||||
- feat: refs #6583 rollback by:jorgep
|
||||
- feat: refs #7301 add inventory-config and acl by:pablone
|
||||
- feat: refs #7301 update SQL fixtures and enhance lastEntriesFilter logic by:pablone
|
||||
- feat: refs #7882 Added locationiq service by:guillermo
|
||||
- feat: refs #7882 Added osrm service by:guillermo
|
||||
- feat: refs #7882 Added tests by:guillermo
|
||||
- feat: refs #7882 Fixed problems osrm service by:guillermo
|
||||
- feat: refs #7882 Osrm service by:guillermo
|
||||
- feat: refs #7882 Reequested changes by:guillermo
|
||||
- feat: refs #7882 Requested changes by:guillermo
|
||||
- feat: refs #7936 add back test for updateInvoiceIn by:jorgep
|
||||
- feat: refs #7936 add company filter by:jorgep
|
||||
- feat: refs #7936 add currency check to updateInvoiceIn by:jorgep
|
||||
- feat: refs #7936 add currency handling in invoiceIn trigger by:jorgep
|
||||
- feat: refs #7936 add locale by:jorgep
|
||||
- feat: refs #7936 add minimum due date by:jorgep
|
||||
- feat: refs #7936 add reference rates for currency in fixtures by:jorgep
|
||||
- feat: refs #7936 add save validation by:jorgep
|
||||
- feat: refs #7936 add SiiTypeInvoiceIn model and update invoice correction logic by:jorgep
|
||||
- feat: refs #7936 add tests for invoiceIn by:jorgep
|
||||
- feat: refs #7936 add tests for invoiceIn filter by:jorgep
|
||||
- feat: refs #7936 add validation to InvoiceIn & InvoiceInTax by:jorgep
|
||||
- feat: refs #7936 return country code & is vies fields by:jorgep
|
||||
- feat: refs #8002 adjust to lilium by:jorgep
|
||||
- feat: refs #8002 drop support btn by:jorgep
|
||||
- feat: refs #8174 Changed datatype incompatibility access by:guillermo
|
||||
- feat: refs #8174 Created table sim by:guillermo
|
||||
- feat: refs #8174 create table simsupplier by:Jbreso
|
||||
- feat: refs #8174 fix by:Jbreso
|
||||
- feat: refs#8174 simSupplier by:Jbreso
|
||||
- feat: refs #8190 entry_getCommission by:robert
|
||||
- feat: refs #8190 entry_getCommission change request by:robert
|
||||
- feat: refs #8218 Added time and code in mistakeType by:guillermo
|
||||
- feat: refs #8293 include zone data by:Jtubau
|
||||
- refactor: refs #6583 entry report table style by:jorgep
|
||||
|
||||
### Changed 📦
|
||||
|
||||
- refactor: refs #6583 entry report table style by:jorgep
|
||||
- refactor: refs #6583 use warehouseId var by:jorgep
|
||||
- refactor: refs #7301 update entry and item filter tests to validate results against specific criteria by:pablone
|
||||
- refactor: refs #7882 Added ACL's by:guillermo
|
||||
- refactor: refs #7882 Deleted quadminds files by:guillermo
|
||||
- refactor: refs #7936 add transaction & tests by:jorgep
|
||||
- refactor: refs #7936 remove old trigger and add isRaid column to travel table by:jorgep
|
||||
- refactor: refs #7936 remove schema by:jorgep
|
||||
- refactor: refs #8002 use loop wip by:jorgep
|
||||
- refactor: refs #8004 simplify SQL query by removing redundant aliases by:pablone
|
||||
- refactor: refs #8262 Deprecated inventoryFailure by:guillermo
|
||||
- refactor: refs #8266 changed expedition item name by:Jtubau
|
||||
- refactor: refs #8272 delete bi.rotacion by:ivanm
|
||||
|
||||
### Fixed 🛠️
|
||||
|
||||
- feat: refs #7301 update SQL fixtures and enhance lastEntriesFilter logic by:pablone
|
||||
- feat: refs #7936 add reference rates for currency in fixtures by:jorgep
|
||||
- feat: refs #8174 fix by:Jbreso
|
||||
- fix: 8174 pasar PIN a CHAR by:Jbreso
|
||||
- fix: monitorPayMethodFilter by:carlossa
|
||||
- fix: refs #6389 back by:carlossa
|
||||
- fix: refs #6389 filter by:carlossa
|
||||
- fix: refs #6389 packing by:carlossa
|
||||
- fix: refs #6389 saleMonitor filter by:carlossa
|
||||
- fix: refs #6389 salesFilter by:carlossa
|
||||
- fix: refs #6583 drop focus by:jorgep
|
||||
- fix: refs #6583 update onlyWithDestination logic to handle null values correctly by:jorgep
|
||||
- fix: refs #7028 fix confirm deny by:carlossa
|
||||
- fix: refs #7028 fix pr by:carlossa
|
||||
- fix: refs #7028 fix tback findById by:carlossa
|
||||
- fix: refs #7028 fix userError by:carlossa
|
||||
- fix: refs #7028 remove ifs by:carlossa
|
||||
- fix: refs #7028 requesterId fix by:carlossa
|
||||
- fix: refs #7028 requesterId fix salesPerson by:carlossa
|
||||
- fix: refs #7031 fix vnPrice by:carlossa
|
||||
- fix: refs #7031 remove check by:carlossa
|
||||
- fix: refs #7301 update ACL insertion to use INSERT IGNORE and refine property value by:pablone
|
||||
- fix: refs #7936 add IF NOT EXISTS to isRaid column in travel table by:jorgep
|
||||
- fix: refs #7936 change type by:jorgep
|
||||
- fix: refs #7936 check if insert in hook & change test description by:jorgep
|
||||
- fix: refs #7936 conflicts by:jorgep
|
||||
- fix: refs #7936 locale by:jorgep
|
||||
- fix: refs #7936 update Spanish locale for SII terms by:jorgep
|
||||
- fix: refs #8174 fix by:Jbreso
|
||||
- fix: refs#8174 fix by:Jbreso
|
||||
- fix: refs8174 pasar a char el PIN by:Jbreso
|
||||
- fix: refs #8174 Version by:guillermo
|
||||
- fix: refs #8251 add eng template by:carlossa
|
||||
- fix: refs #8315 fixture claimDevelopment by:alexm
|
||||
|
||||
# Version 24.48 - 2024-11-25
|
||||
|
||||
### Added 🆕
|
||||
|
|
|
@ -7,7 +7,8 @@ def RUN_BUILD
|
|||
|
||||
def BRANCH_ENV = [
|
||||
test: 'test',
|
||||
master: 'production'
|
||||
master: 'production',
|
||||
beta: 'production'
|
||||
]
|
||||
|
||||
node {
|
||||
|
@ -18,7 +19,8 @@ node {
|
|||
PROTECTED_BRANCH = [
|
||||
'dev',
|
||||
'test',
|
||||
'master'
|
||||
'master',
|
||||
'beta'
|
||||
].contains(env.BRANCH_NAME)
|
||||
|
||||
FROM_GIT = env.JOB_NAME.startsWith('gitea/')
|
||||
|
@ -62,6 +64,18 @@ pipeline {
|
|||
PROJECT_NAME = 'salix'
|
||||
}
|
||||
stages {
|
||||
stage('Version') {
|
||||
when {
|
||||
expression { RUN_BUILD }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def packageJson = readJSON file: 'package.json'
|
||||
def version = "${packageJson.version}-build${env.BUILD_ID}"
|
||||
writeFile(file: 'VERSION.txt', text: version)
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Install') {
|
||||
environment {
|
||||
NODE_ENV = ''
|
||||
|
@ -118,11 +132,10 @@ pipeline {
|
|||
when {
|
||||
expression { RUN_BUILD }
|
||||
}
|
||||
environment {
|
||||
VERSION = readFile 'VERSION.txt'
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def packageJson = readJSON file: 'package.json'
|
||||
env.VERSION = "${packageJson.version}-build${env.BUILD_ID}"
|
||||
}
|
||||
sh 'docker-compose build back'
|
||||
}
|
||||
}
|
||||
|
@ -156,11 +169,10 @@ pipeline {
|
|||
when {
|
||||
expression { RUN_BUILD }
|
||||
}
|
||||
environment {
|
||||
VERSION = readFile 'VERSION.txt'
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def packageJson = readJSON file: 'package.json'
|
||||
env.VERSION = "${packageJson.version}-build${env.BUILD_ID}"
|
||||
}
|
||||
sh 'gulp build'
|
||||
sh 'docker-compose build front'
|
||||
}
|
||||
|
@ -175,12 +187,9 @@ pipeline {
|
|||
}
|
||||
environment {
|
||||
CREDENTIALS = credentials('docker-registry')
|
||||
VERSION = readFile 'VERSION.txt'
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def packageJson = readJSON file: 'package.json'
|
||||
env.VERSION = "${packageJson.version}-build${env.BUILD_ID}"
|
||||
}
|
||||
sh 'docker login --username $CREDENTIALS_USR --password $CREDENTIALS_PSW $REGISTRY'
|
||||
sh 'docker-compose push'
|
||||
}
|
||||
|
@ -207,11 +216,10 @@ pipeline {
|
|||
when {
|
||||
expression { FROM_GIT }
|
||||
}
|
||||
environment {
|
||||
VERSION = readFile 'VERSION.txt'
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def packageJson = readJSON file: 'package.json'
|
||||
env.VERSION = "${packageJson.version}-build${env.BUILD_ID}"
|
||||
}
|
||||
withKubeConfig([
|
||||
serverUrl: "$KUBERNETES_API",
|
||||
credentialsId: 'kubernetes',
|
||||
|
|
|
@ -40,6 +40,7 @@ module.exports = Self => {
|
|||
|
||||
const sales = await Self.rawSql(`
|
||||
SELECT s.ticketFk,
|
||||
NULL ticketOrder,
|
||||
sgd.saleGroupFk,
|
||||
s.id saleFk,
|
||||
s.itemFk,
|
||||
|
@ -83,6 +84,7 @@ module.exports = Self => {
|
|||
GROUP BY s.id, ish.id, p.code, p2.code
|
||||
UNION ALL
|
||||
SELECT s.ticketFk,
|
||||
DENSE_RANK() OVER (ORDER BY ss.id),
|
||||
sgd.saleGroupFk,
|
||||
s.id saleFk,
|
||||
s.itemFk,
|
||||
|
|
|
@ -24,12 +24,13 @@ module.exports = Self => {
|
|||
|
||||
Self.cancelShipment = async expeditionFk => {
|
||||
const models = Self.app.models;
|
||||
|
||||
const mrw = await models.MrwConfig.findOne();
|
||||
const {externalId} = await models.Expedition.findById(expeditionFk);
|
||||
const clientType = await models.MrwConfig.getClientType(expeditionFk);
|
||||
const template = fs.readFileSync(__dirname + '/cancelShipment.ejs', 'utf-8');
|
||||
const renderedXml = ejs.render(template, {mrw, externalId, clientType});
|
||||
|
||||
await Self.rawSql('CALL util.debugAdd(?,?);', ['cancelShipment', renderedXml]);
|
||||
const response = await axios.post(mrw.url, renderedXml, {
|
||||
headers: {
|
||||
'Content-Type': 'application/soap+xml; charset=utf-8'
|
||||
|
@ -37,12 +38,11 @@ module.exports = Self => {
|
|||
});
|
||||
|
||||
const xmlString = response.data;
|
||||
await Self.rawSql('CALL util.debugAdd(?,?);', ['cancelShipmentResponse', xmlString]);
|
||||
const parser = new DOMParser();
|
||||
const xmlDoc = parser.parseFromString(xmlString, 'text/xml');
|
||||
|
||||
await Self.rawSql('CALL util.debugAdd(?,?);', ['cancelShipment', xmlDoc]);
|
||||
|
||||
const result = xmlDoc.getElementsByTagName('Mensaje')[0].textContent;
|
||||
return result.toLowerCase().includes('se ha cancelado correctamente');
|
||||
return ['no se ha encontrado', 'se ha cancelado correctamente'].some(res => result.toLowerCase().includes(res));
|
||||
};
|
||||
};
|
||||
|
|
|
@ -0,0 +1,112 @@
|
|||
const UserError = require('vn-loopback/util/user-error');
|
||||
const axios = require('axios');
|
||||
|
||||
module.exports = Self => {
|
||||
Self.remoteMethod('optimize', {
|
||||
description: 'Return optimized coords',
|
||||
accessType: 'READ',
|
||||
accepts: [{
|
||||
arg: 'addressIds',
|
||||
type: 'array',
|
||||
required: true
|
||||
}, {
|
||||
arg: 'firstAddressId',
|
||||
type: 'number',
|
||||
required: false
|
||||
}, {
|
||||
arg: 'lastAddressId',
|
||||
type: 'number',
|
||||
required: false
|
||||
}],
|
||||
returns: {
|
||||
type: 'object',
|
||||
root: true
|
||||
},
|
||||
http: {
|
||||
path: `/optimize`,
|
||||
verb: 'GET'
|
||||
}
|
||||
});
|
||||
|
||||
Self.optimize = async(addressIds, firstAddressId, lastAddressId) => {
|
||||
const models = Self.app.models;
|
||||
try {
|
||||
const osrmConfig = await models.OsrmConfig.findOne();
|
||||
if (!osrmConfig) throw new UserError(`OSRM service is not configured`);
|
||||
|
||||
let coords = [];
|
||||
if (firstAddressId) {
|
||||
const address = await models.Address.findById(firstAddressId);
|
||||
if (address.latitude && address.longitude) {
|
||||
coords.push({
|
||||
addressId: address.id,
|
||||
latitude: address.latitude.toFixed(6),
|
||||
longitude: address.longitude.toFixed(6)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
for (const addressId of addressIds) {
|
||||
const address = await models.Address.findById(addressId);
|
||||
if (address.latitude && address.longitude) {
|
||||
coords.push({
|
||||
addressId,
|
||||
latitude: address.latitude.toFixed(6),
|
||||
longitude: address.longitude.toFixed(6)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (lastAddressId) {
|
||||
const firstAddress = await models.Address.findById(lastAddressId);
|
||||
if (firstAddress.latitude && firstAddress.longitude) {
|
||||
coords.push({
|
||||
addressId: firstAddress.id,
|
||||
latitude: firstAddress.latitude.toFixed(6),
|
||||
longitude: firstAddress.longitude.toFixed(6)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (!coords.length) throw new UserError('No address has coordinates');
|
||||
|
||||
const concatCoords = coords
|
||||
.map(coord => `${coord.longitude},${coord.latitude}`)
|
||||
.join(';');
|
||||
const response = await axios.post(`
|
||||
${osrmConfig.url}/trip/v1/driving/${concatCoords}?source=first&destination=last&roundtrip=true
|
||||
`);
|
||||
const tolerance = osrmConfig.tolerance;
|
||||
for (const waypoint of response.data.waypoints) {
|
||||
const longitude = waypoint.location[0];
|
||||
const latitude = waypoint.location[1];
|
||||
|
||||
const matchedAddress = coords.find(coord =>
|
||||
coord.position === undefined &&
|
||||
Math.abs(coord.latitude - latitude) <= tolerance &&
|
||||
Math.abs(coord.longitude - longitude) <= tolerance
|
||||
);
|
||||
if (matchedAddress)
|
||||
matchedAddress.position = waypoint.waypoint_index;
|
||||
}
|
||||
coords.sort((a, b) => {
|
||||
const posA = a.position !== undefined ? a.position : Infinity;
|
||||
const posB = b.position !== undefined ? b.position : Infinity;
|
||||
return posA - posB;
|
||||
});
|
||||
|
||||
return coords;
|
||||
} catch (err) {
|
||||
switch (err.response?.data?.code) {
|
||||
case 'NoTrips':
|
||||
throw new UserError('No trips found because input coordinates are not connected');
|
||||
case 'NotImplemented':
|
||||
throw new UserError('This request is not supported');
|
||||
case 'InvalidOptions':
|
||||
throw new UserError('Invalid options or too many coordinates');
|
||||
default:
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
|
@ -0,0 +1,33 @@
|
|||
const models = require('vn-loopback/server/server').models;
|
||||
|
||||
describe('osrmConfig optimize()', function() {
|
||||
it('should send coords, receive OSRM response, and return a correctly ordered result', async function() {
|
||||
const result = await models.OsrmConfig.optimize([4, 3], 1, 2);
|
||||
|
||||
// Verifications
|
||||
expect(Array.isArray(result)).toBe(true);
|
||||
expect(result.length).toBe(4);
|
||||
|
||||
// Check the order
|
||||
expect(result[0].addressId).toBe(1);
|
||||
expect(result[1].addressId).toBe(4);
|
||||
expect(result[2].addressId).toBe(3);
|
||||
expect(result[3].addressId).toBe(2);
|
||||
|
||||
// Check the coordinates format
|
||||
expect(result[0].latitude).toBe('10.111111');
|
||||
expect(result[0].longitude).toBe('-74.111111');
|
||||
});
|
||||
|
||||
it('should throw an error if no addresses are provided', async function() {
|
||||
let error;
|
||||
try {
|
||||
await models.OsrmConfig.optimize([], null);
|
||||
} catch (e) {
|
||||
error = e;
|
||||
}
|
||||
|
||||
expect(error).toBeDefined();
|
||||
expect(error.message).toBe('No address has coordinates');
|
||||
});
|
||||
});
|
|
@ -29,35 +29,34 @@ module.exports = Self => {
|
|||
});
|
||||
|
||||
Self.sendToSupport = async(ctx, reason, additionalData) => {
|
||||
const userId = ctx.req.accessToken.userId;
|
||||
const emailUser =
|
||||
await Self.app.models.EmailUser.findById(ctx.req.accessToken.userId, {fields: ['email']});
|
||||
await Self.app.models.EmailUser.findById(userId, {fields: ['email']});
|
||||
|
||||
let html = `<strong>Motivo</strong>:<br/>${reason}<br/>`;
|
||||
html += `<strong>Usuario</strong>:<br/>${ctx.req.accessToken.userId} ${emailUser.email}<br/>`;
|
||||
let html = `<h2>Motivo: ${reason}</h2>`;
|
||||
html += `<h3>Usuario: ${userId} ${emailUser.email}</h3>`;
|
||||
html += `<h3>Additional Data:</h3>`;
|
||||
html += '<ul>';
|
||||
for (const [key, val] of Object.entries(additionalData)) {
|
||||
if (key !== 'config') html += `<li>${key}: ${parse(val)}</li>`;
|
||||
else {
|
||||
html += `<li>${key}:</li><ul style="list-style-type: square;">`;
|
||||
for (const [confKey, confVal] of Object.entries(val))
|
||||
html += `<li>${confKey}: ${parse(confVal)}</li>`;
|
||||
html += '</ul>';
|
||||
}
|
||||
}
|
||||
html += '</ul>';
|
||||
|
||||
delete additionalData.backError.config.headers.Authorization;
|
||||
const httpRequest = JSON.parse(additionalData?.httpRequest);
|
||||
|
||||
if (httpRequest)
|
||||
delete httpRequest.config.headers.Authorization;
|
||||
additionalData.httpRequest = httpRequest;
|
||||
|
||||
for (const data in additionalData)
|
||||
html += `<strong>${data}</strong>:<br/>${tryParse(additionalData[data])}<br/>`;
|
||||
|
||||
const subjectReason = httpRequest?.data?.error;
|
||||
const {message, path, name} = additionalData;
|
||||
await smtp.send({
|
||||
to: `${config.app.reportEmail}, ${emailUser.email}`,
|
||||
subject:
|
||||
'[Support-Salix] ' +
|
||||
additionalData?.frontPath + ' ' +
|
||||
subjectReason?.name + ':' +
|
||||
subjectReason?.message,
|
||||
subject: `[Support-Salix] ${path} ${name}: ${message}`,
|
||||
html
|
||||
});
|
||||
};
|
||||
|
||||
function tryParse(value) {
|
||||
function parse(value) {
|
||||
try {
|
||||
try {
|
||||
value = JSON.parse(value);
|
||||
|
|
|
@ -1,88 +0,0 @@
|
|||
const axios = require('axios');
|
||||
const UserError = require('vn-loopback/util/user-error');
|
||||
const moment = require('moment');
|
||||
|
||||
module.exports = Self => {
|
||||
Self.remoteMethod('sendOrders', {
|
||||
description: 'Sends a set of orders',
|
||||
accessType: 'WRITE',
|
||||
accepts: [{
|
||||
arg: 'tickets',
|
||||
type: ['number'],
|
||||
required: true
|
||||
}
|
||||
],
|
||||
returns: {
|
||||
type: 'string',
|
||||
root: true
|
||||
},
|
||||
http: {
|
||||
path: `/sendOrders`,
|
||||
verb: 'POST'
|
||||
}
|
||||
});
|
||||
Self.sendOrders = async tickets => {
|
||||
const config = await Self.app.models.QuadmindsApiConfig.findOne();
|
||||
if (!config) throw new UserError('Config params not set');
|
||||
|
||||
if (tickets.length > config.maxObjects)
|
||||
throw new UserError(`Quadminds does not support more than ${config.maxObjects} tickets`);
|
||||
|
||||
let poisData = [];
|
||||
let isOk;
|
||||
for (let offset = 0; !isOk; offset = offset + config.limit) {
|
||||
const pois = await axios.get(`${config.url}pois/search?limit=${config.limit}&offset=${offset}`, {
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
'X-Saas-Apikey': config.key
|
||||
}
|
||||
});
|
||||
pois.data.data.length ? poisData.push(...pois.data.data) : isOk = true;
|
||||
}
|
||||
|
||||
const poiMap = new Map(poisData.map(poi => [poi.code, poi._id]));
|
||||
|
||||
let orders = await Self.rawSql(`
|
||||
SELECT a.id poiCode,
|
||||
t.id code,
|
||||
t.shipped date,
|
||||
'PEDIDO' operation,
|
||||
t.totalWithVat totalAmount,
|
||||
t.totalWithoutVat totalAmountWithoutTaxes,
|
||||
SUM(sv.volume) volume
|
||||
FROM ticket t
|
||||
JOIN address a ON a.id = t.addressFk
|
||||
JOIN saleVolume sv ON sv.ticketFk = t.id
|
||||
WHERE t.id IN (?)
|
||||
GROUP BY t.id
|
||||
`, [tickets]);
|
||||
|
||||
// Transformo code en string ya que lo obtenermos como integer
|
||||
orders = orders.map(order => {
|
||||
return {
|
||||
...order,
|
||||
poiId: poiMap.get(order.poiCode.toString()) || undefined,
|
||||
code: order.code.toString(),
|
||||
date: moment(order.date).format('YYYY-MM-DD'),
|
||||
totalAmount: order.totalAmount || undefined,
|
||||
totalAmountWithoutTaxes: order.totalAmountWithoutTaxes || undefined,
|
||||
timeWindow: [{
|
||||
from: config.orderTimeFrom,
|
||||
to: config.orderTimeTo
|
||||
}],
|
||||
orderMeasures: [{
|
||||
constraintId: 3, // Volumen
|
||||
value: order.volume
|
||||
}]
|
||||
};
|
||||
});
|
||||
|
||||
await axios.post(`${config.url}orders`, orders, {
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
'Content-Type': 'application/json',
|
||||
'X-Saas-Apikey': config.key
|
||||
}
|
||||
});
|
||||
};
|
||||
};
|
|
@ -1,87 +0,0 @@
|
|||
const axios = require('axios');
|
||||
const UserError = require('vn-loopback/util/user-error');
|
||||
|
||||
module.exports = Self => {
|
||||
Self.remoteMethod('sendPois', {
|
||||
description: 'Sends a set of pois',
|
||||
accessType: 'WRITE',
|
||||
accepts: [{
|
||||
arg: 'tickets',
|
||||
type: ['number'],
|
||||
required: true
|
||||
}
|
||||
],
|
||||
returns: {
|
||||
type: 'string',
|
||||
root: true
|
||||
},
|
||||
http: {
|
||||
path: `/sendPois`,
|
||||
verb: 'POST'
|
||||
}
|
||||
});
|
||||
Self.sendPois = async tickets => {
|
||||
const config = await Self.app.models.QuadmindsApiConfig.findOne();
|
||||
if (!config) throw new UserError('Config params not set');
|
||||
|
||||
if (tickets.length > config.maxObjects)
|
||||
throw new UserError(`Quadminds does not support more than ${config.maxObjects} tickets`);
|
||||
|
||||
let pois = await Self.rawSql(`
|
||||
WITH deliveryNotes AS (
|
||||
SELECT t.id, t.routeFk, tn.description
|
||||
FROM ticket t
|
||||
JOIN ticketObservation tn ON tn.ticketFk = t.id
|
||||
JOIN observationType ot ON ot.id = tn.observationTypeFk
|
||||
WHERE ot.code = 'delivery'
|
||||
)
|
||||
SELECT a.id code,
|
||||
c.socialName name,
|
||||
IF(ABS(a.latitude - ROUND(a.latitude)) < 0.000001, NULL, a.latitude) latitude,
|
||||
IF(ABS(a.longitude - ROUND(a.longitude)) < 0.000001, NULL, a.longitude) longitude,
|
||||
a.street,
|
||||
a.city locality,
|
||||
p.name state,
|
||||
co.name country,
|
||||
CONCAT_WS(', ', IFNULL(a.street, ''), IFNULL(a.city, ''), IFNULL(p.name, '')) longAddress,
|
||||
CONCAT(IFNULL(a.mobile, c.mobile)) phoneNumber,
|
||||
dn.description poiDeliveryComments,
|
||||
c.email email
|
||||
FROM ticket t
|
||||
JOIN address a ON a.id = t.addressFk
|
||||
JOIN province p ON p.id = a.provinceFk
|
||||
JOIN country co ON co.id = p.countryFk
|
||||
JOIN client c ON c.id = t.clientFk
|
||||
LEFT JOIN deliveryNotes dn ON dn.id = t.id
|
||||
WHERE t.id IN (?)
|
||||
GROUP BY t.id
|
||||
`, [tickets]);
|
||||
|
||||
// Transformo code en string ya que lo obtenermos como integer
|
||||
pois = pois.map(poi => {
|
||||
return {
|
||||
...poi,
|
||||
code: poi.code.toString(),
|
||||
latitude: poi.latitude || undefined,
|
||||
longitude: poi.longitude || undefined,
|
||||
address: {
|
||||
street: poi.street || undefined,
|
||||
locality: poi.locality || undefined,
|
||||
state: poi.state || undefined,
|
||||
country: poi.country || undefined
|
||||
},
|
||||
poiDeliveryComments: poi.poiDeliveryComments || undefined,
|
||||
phoneNumber: poi.phoneNumber || undefined,
|
||||
email: poi.email || undefined
|
||||
};
|
||||
});
|
||||
|
||||
await axios.post(`${config.url}pois`, pois, {
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
'Content-Type': 'application/json',
|
||||
'X-Saas-Apikey': config.key
|
||||
}
|
||||
});
|
||||
};
|
||||
};
|
|
@ -19,7 +19,7 @@ module.exports = Self => {
|
|||
if (acl.principalType == 'ROLE' && acl.permission == 'ALLOW') {
|
||||
const staticAcl = {
|
||||
model: model.name,
|
||||
property: '*',
|
||||
property: acl.property,
|
||||
accessType: acl.accessType,
|
||||
permission: acl.permission,
|
||||
principalType: acl.principalType,
|
||||
|
|
|
@ -22,7 +22,7 @@ module.exports = Self => {
|
|||
description: 'The user email'
|
||||
}, {
|
||||
arg: 'lang',
|
||||
type: 'string',
|
||||
type: 'any',
|
||||
description: 'The user lang'
|
||||
}, {
|
||||
arg: 'twoFactor',
|
||||
|
|
|
@ -10,10 +10,10 @@ describe('workerActivity insert()', () => {
|
|||
|
||||
try {
|
||||
await models.WorkerActivityType.create(
|
||||
{'code': 'STOP', 'description': 'STOP'}, options
|
||||
{'code': 'TEST', 'description': 'TEST'}, options
|
||||
);
|
||||
|
||||
await models.WorkerActivity.add(ctx, 'STOP', 'APP', options);
|
||||
await models.WorkerActivity.add(ctx, 'TEST', 'APP', options);
|
||||
|
||||
count = await models.WorkerActivity.count(
|
||||
{'workerFK': 1106}, options
|
||||
|
|
|
@ -88,6 +88,9 @@
|
|||
"Language": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"OsrmConfig": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"Machine": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
|
@ -121,18 +124,21 @@
|
|||
"Province": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"QuadmindsApiConfig": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"Autonomy": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"Payment": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"PbxConfig": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"Postcode": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"Prefix": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"ReferenceRate": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
module.exports = Self => {
|
||||
require('../methods/osrm-config/optimize')(Self);
|
||||
};
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"name": "OsrmConfig",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "osrmConfig"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number",
|
||||
"id": true,
|
||||
"required": true
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"tolerance": {
|
||||
"type": "number",
|
||||
"required": false
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"name": "PbxConfig",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "pbx.config"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number",
|
||||
"id": true
|
||||
},
|
||||
"defaultPrefix": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"acls": [
|
||||
{
|
||||
"property": "*",
|
||||
"accessType": "READ",
|
||||
"principalType": "ROLE",
|
||||
"principalId": "employee",
|
||||
"permission": "ALLOW"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"name": "Prefix",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "pbx.prefix"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"country": {
|
||||
"type": "string",
|
||||
"id": true
|
||||
},
|
||||
"prefix": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"acls": [
|
||||
{
|
||||
"property": "*",
|
||||
"accessType": "READ",
|
||||
"principalType": "ROLE",
|
||||
"principalId": "employee",
|
||||
"permission": "ALLOW"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -20,6 +20,9 @@
|
|||
},
|
||||
"backupPrinterNotificationDelay": {
|
||||
"type": "string"
|
||||
},
|
||||
"itemOrderReviewHours": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
module.exports = Self => {
|
||||
require('../methods/quadminds-api-config/sendPois')(Self);
|
||||
require('../methods/quadminds-api-config/sendOrders')(Self);
|
||||
};
|
|
@ -1,34 +0,0 @@
|
|||
{
|
||||
"name": "QuadmindsApiConfig",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "quadmindsApiConfig"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number",
|
||||
"id": true,
|
||||
"required": true
|
||||
},
|
||||
"url": {
|
||||
"type": "string"
|
||||
},
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
"maxObjects": {
|
||||
"type": "number"
|
||||
},
|
||||
"limit": {
|
||||
"type": "number"
|
||||
},
|
||||
"orderTimeFrom": {
|
||||
"type": "string"
|
||||
},
|
||||
"orderTimeTo": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -9,7 +9,7 @@
|
|||
},
|
||||
"vn": {
|
||||
"view": {
|
||||
"expeditionPallet_Print": "99f75145ac2e7b612a6d71e74b6e55f194a465780fd9875a15eb01e6596b447e"
|
||||
"expeditionPallet_Print": "04fc5f2967ce53bfbb85f7f48b9a3dca4a4f7111ac41e1775f4cc7d6538774b2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ USE `util`;
|
|||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
|
||||
INSERT INTO `version` VALUES ('vn-database','11358','45f7b60f1b43b24505a3e9abc6738dc484ad4fd5','2024-11-26 12:27:58','11365');
|
||||
INSERT INTO `version` VALUES ('vn-database','11385','72bf27f08d3ddf646ec0bb6594fc79cecd4b72f2','2025-01-07 07:46:33','11395');
|
||||
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','10107','00-firstScript.sql','jenkins@10.0.2.69','2022-04-23 10:53:53',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','10112','00-firstScript.sql','jenkins@10.0.2.69','2022-05-09 09:14:53',NULL,NULL);
|
||||
|
@ -1072,21 +1072,26 @@ INSERT INTO `versionLog` VALUES ('vn-database','11300','00-firstScript.sql','jen
|
|||
INSERT INTO `versionLog` VALUES ('vn-database','11302','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:57',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11308','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-23 12:41:55',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11311','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:57',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11312','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-12-10 07:20:04',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11314','00-restrictedAsterisk.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11315','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11316','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11317','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11319','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11321','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11322','00-entryAcl.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-12-10 07:20:04',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11324','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-13 10:49:47',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11325','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11326','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11327','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-01-07 07:46:24',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11330','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11331','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11332','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-12-10 07:20:04',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11336','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11337','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11338','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 09:14:12',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11339','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11341','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-12-10 07:20:04',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11342','00-itemShelving.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:06:34',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11342','01-itemShelving.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:06:35',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11342','02-itemShelving.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:06:37',NULL,NULL);
|
||||
|
@ -1105,10 +1110,35 @@ INSERT INTO `versionLog` VALUES ('vn-database','11347','00-firstScript.sql','jen
|
|||
INSERT INTO `versionLog` VALUES ('vn-database','11348','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:28:14',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11349','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:28:14',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11350','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:28:14',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11351','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-12-10 07:20:04',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11352','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-01-07 07:46:24',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11353','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:28:14',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11354','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-12-10 07:20:04',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11355','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:28:14',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11357','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:28:16',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11358','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:28:21',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11359','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-12-10 07:20:04',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11362','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-28 08:52:33',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11363','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-12-10 07:20:04',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11366','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-12-10 07:20:04',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11367','00-deprecate.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-12-10 07:20:04',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11368','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-01-07 07:46:32',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11368','01-acls.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-01-07 07:46:32',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11369','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-12-10 07:20:05',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11371','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-12-10 07:20:05',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11371','01-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-12-10 07:20:47',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11371','02-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-12-10 07:22:29',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11371','03-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-12-10 07:22:31',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11372','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-12-09 13:30:30',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11373','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-12-02 16:09:01',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11375','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-12-03 08:58:20',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11376','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-01-07 07:46:32',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11377','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-12-10 07:22:31',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11378','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-01-07 07:46:32',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11379','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-01-07 07:46:32',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11379','01-secScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-01-07 07:46:32',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11384','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-01-07 07:46:32',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11385','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-01-07 07:46:33',NULL,NULL);
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
|
@ -1666,7 +1696,6 @@ INSERT INTO `ACL` VALUES (209,'Ticket','recalculateComponents','WRITE','ALLOW','
|
|||
INSERT INTO `ACL` VALUES (211,'TravelLog','*','READ','ALLOW','ROLE','buyer',NULL);
|
||||
INSERT INTO `ACL` VALUES (212,'Thermograph','*','*','ALLOW','ROLE','buyer',NULL);
|
||||
INSERT INTO `ACL` VALUES (213,'TravelThermograph','*','WRITE','ALLOW','ROLE','buyer',NULL);
|
||||
INSERT INTO `ACL` VALUES (214,'Entry','*','*','ALLOW','ROLE','buyer',NULL);
|
||||
INSERT INTO `ACL` VALUES (216,'TravelThermograph','*','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (218,'Intrastat','*','*','ALLOW','ROLE','buyer',NULL);
|
||||
INSERT INTO `ACL` VALUES (221,'UserConfig','getUserConfig','READ','ALLOW','ROLE','guest',NULL);
|
||||
|
@ -1695,7 +1724,6 @@ INSERT INTO `ACL` VALUES (258,'PayDem','*','READ','ALLOW','ROLE','employee',NULL
|
|||
INSERT INTO `ACL` VALUES (259,'Client','createReceipt','*','ALLOW','ROLE','salesAssistant',NULL);
|
||||
INSERT INTO `ACL` VALUES (260,'PrintServerQueue','*','WRITE','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (261,'SupplierAccount','*','WRITE','ALLOW','ROLE','administrative',783);
|
||||
INSERT INTO `ACL` VALUES (262,'Entry','*','*','ALLOW','ROLE','administrative',NULL);
|
||||
INSERT INTO `ACL` VALUES (263,'InvoiceIn','*','READ','ALLOW','ROLE','administrative',NULL);
|
||||
INSERT INTO `ACL` VALUES (264,'StarredModule','*','*','ALLOW','ROLE','$authenticated',NULL);
|
||||
INSERT INTO `ACL` VALUES (265,'ItemBotanical','*','WRITE','ALLOW','ROLE','logisticBoss',NULL);
|
||||
|
@ -2012,7 +2040,7 @@ INSERT INTO `ACL` VALUES (605,'Ticket','sendSms','WRITE','ALLOW','ROLE','employe
|
|||
INSERT INTO `ACL` VALUES (606,'Ticket','isLocked','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (607,'Ticket','freightCost','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (608,'Ticket','getComponentsSum','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (609,'Ticket','updateAttributes','WRITE','ALLOW','ROLE','deliveryAssistant',10578);
|
||||
INSERT INTO `ACL` VALUES (609,'Ticket','updateAttributes','WRITE','ALLOW','ROLE','delivery',19295);
|
||||
INSERT INTO `ACL` VALUES (610,'Ticket','deliveryNoteCsv','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (611,'State','find','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (612,'State','findById','READ','ALLOW','ROLE','employee',NULL);
|
||||
|
@ -2110,7 +2138,7 @@ INSERT INTO `ACL` VALUES (746,'Claim','getSummary','READ','ALLOW','ROLE','claimV
|
|||
INSERT INTO `ACL` VALUES (747,'CplusRectificationType','*','READ','ALLOW','ROLE','administrative',NULL);
|
||||
INSERT INTO `ACL` VALUES (748,'SiiTypeInvoiceOut','*','READ','ALLOW','ROLE','salesPerson',NULL);
|
||||
INSERT INTO `ACL` VALUES (749,'InvoiceCorrectionType','*','READ','ALLOW','ROLE','salesPerson',NULL);
|
||||
INSERT INTO `ACL` VALUES (750,'InvoiceOut','transferInvoice','WRITE','ALLOW','ROLE','administrative',NULL);
|
||||
INSERT INTO `ACL` VALUES (750,'InvoiceOut','transfer','WRITE','ALLOW','ROLE','administrative',13657);
|
||||
INSERT INTO `ACL` VALUES (751,'Application','executeProc','*','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (752,'Application','executeFunc','*','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (753,'NotificationSubscription','getList','READ','ALLOW','ROLE','employee',NULL);
|
||||
|
@ -2248,9 +2276,9 @@ INSERT INTO `ACL` VALUES (895,'ItemShelvingLog','*','READ','ALLOW','ROLE','produ
|
|||
INSERT INTO `ACL` VALUES (901,'WorkerTimeControl','sendMail','WRITE','ALLOW','ROLE','system',NULL);
|
||||
INSERT INTO `ACL` VALUES (902,'Entry','filter','READ','ALLOW','ROLE','supplier',NULL);
|
||||
INSERT INTO `ACL` VALUES (903,'Entry','getBuys','READ','ALLOW','ROLE','supplier',NULL);
|
||||
INSERT INTO `ACL` VALUES (904,'Entry','buyLabelSupplier','READ','ALLOW','ROLE','supplier',10578);
|
||||
INSERT INTO `ACL` VALUES (904,'Entry','buyLabelSupplier','READ','ALLOW','ROLE','supplier',19295);
|
||||
INSERT INTO `ACL` VALUES (905,'AddressWaste','*','READ','ALLOW','ROLE','production',NULL);
|
||||
INSERT INTO `ACL` VALUES (906,'Entry','print','READ','ALLOW','ROLE','supplier',NULL);
|
||||
INSERT INTO `ACL` VALUES (906,'Entry','labelSupplier','READ','ALLOW','ROLE','supplier',19295);
|
||||
INSERT INTO `ACL` VALUES (907,'Expedition_PrintOut','*','*','ALLOW','ROLE','production',NULL);
|
||||
INSERT INTO `ACL` VALUES (908,'Docuware','upload','WRITE','ALLOW','ROLE','hrBuyer',13657);
|
||||
INSERT INTO `ACL` VALUES (909,'Entry','getBuysCsv','READ','ALLOW','ROLE','supplier',19295);
|
||||
|
@ -2298,6 +2326,63 @@ INSERT INTO `ACL` VALUES (953,'RouteAction','find','READ','ALLOW','ROLE','delive
|
|||
INSERT INTO `ACL` VALUES (954,'RouteComplement','find','READ','ALLOW','ROLE','delivery',10578);
|
||||
INSERT INTO `ACL` VALUES (955,'RouteComplement','create','WRITE','ALLOW','ROLE','delivery',10578);
|
||||
INSERT INTO `ACL` VALUES (956,'RouteComplement','deleteById','WRITE','ALLOW','ROLE','delivery',10578);
|
||||
INSERT INTO `ACL` VALUES (957,'SaleGroup','find','READ','ALLOW','ROLE','production',10578);
|
||||
INSERT INTO `ACL` VALUES (958,'Worker','canCreateAbsenceInPast','WRITE','ALLOW','ROLE','hr',10578);
|
||||
INSERT INTO `ACL` VALUES (959,'WorkerRelative','updateAttributes','*','ALLOW','ROLE','hr',10578);
|
||||
INSERT INTO `ACL` VALUES (960,'WorkerRelative','crud','WRITE','ALLOW','ROLE','hr',10578);
|
||||
INSERT INTO `ACL` VALUES (961,'WorkerRelative','findById','*','ALLOW','ROLE','hr',10578);
|
||||
INSERT INTO `ACL` VALUES (962,'WorkerRelative','find','*','ALLOW','ROLE','hr',10578);
|
||||
INSERT INTO `ACL` VALUES (963,'WorkerRelative','upsert','*','ALLOW','ROLE','hr',10578);
|
||||
INSERT INTO `ACL` VALUES (964,'WorkerRelative','filter','*','ALLOW','ROLE','hr',10578);
|
||||
INSERT INTO `ACL` VALUES (965,'WorkerIrpf','updateAttributes','*','ALLOW','ROLE','hr',10578);
|
||||
INSERT INTO `ACL` VALUES (966,'WorkerIrpf','crud','*','ALLOW','ROLE','hr',10578);
|
||||
INSERT INTO `ACL` VALUES (967,'WorkerIrpf','findById','*','ALLOW','ROLE','hr',10578);
|
||||
INSERT INTO `ACL` VALUES (968,'WorkerIrpf','find','*','ALLOW','ROLE','hr',10578);
|
||||
INSERT INTO `ACL` VALUES (969,'WorkerIrpf','upsert','*','ALLOW','ROLE','hr',10578);
|
||||
INSERT INTO `ACL` VALUES (970,'WorkerIrpf','filter','*','ALLOW','ROLE','hr',10578);
|
||||
INSERT INTO `ACL` VALUES (971,'DisabilityGrade','updateAttributes','*','ALLOW','ROLE','hr',10578);
|
||||
INSERT INTO `ACL` VALUES (972,'DisabilityGrade','crud','*','ALLOW','ROLE','hr',10578);
|
||||
INSERT INTO `ACL` VALUES (973,'DisabilityGrade','findById','*','ALLOW','ROLE','hr',10578);
|
||||
INSERT INTO `ACL` VALUES (974,'DisabilityGrade','find','*','ALLOW','ROLE','hr',10578);
|
||||
INSERT INTO `ACL` VALUES (975,'DisabilityGrade','upsert','*','ALLOW','ROLE','hr',10578);
|
||||
INSERT INTO `ACL` VALUES (976,'Entry','upsert','WRITE','ALLOW','ROLE','administrative',10578);
|
||||
INSERT INTO `ACL` VALUES (977,'Entry','updateAttributes','WRITE','ALLOW','ROLE','administrative',10578);
|
||||
INSERT INTO `ACL` VALUES (978,'Entry','isBooked','READ','ALLOW','ROLE','administrative',10578);
|
||||
INSERT INTO `ACL` VALUES (979,'Entry','findById','READ','ALLOW','ROLE','administrative',10578);
|
||||
INSERT INTO `ACL` VALUES (980,'Entry','find','READ','ALLOW','ROLE','administrative',10578);
|
||||
INSERT INTO `ACL` VALUES (981,'Entry','filter','READ','ALLOW','ROLE','administrative',10578);
|
||||
INSERT INTO `ACL` VALUES (982,'Entry','count','READ','ALLOW','ROLE','administrative',10578);
|
||||
INSERT INTO `ACL` VALUES (983,'Entry','getEntry','READ','ALLOW','ROLE','administrative',10578);
|
||||
INSERT INTO `ACL` VALUES (984,'Entry','getBuys','READ','ALLOW','ROLE','administrative',10578);
|
||||
INSERT INTO `ACL` VALUES (985,'Entry','findOne','READ','ALLOW','ROLE','administrative',10578);
|
||||
INSERT INTO `ACL` VALUES (986,'Entry','deleteBuys','WRITE','ALLOW','ROLE','administrative',10578);
|
||||
INSERT INTO `ACL` VALUES (987,'Entry','editLatestBuys','WRITE','ALLOW','ROLE','administrative',10578);
|
||||
INSERT INTO `ACL` VALUES (988,'Entry','importBuys','WRITE','ALLOW','ROLE','administrative',10578);
|
||||
INSERT INTO `ACL` VALUES (989,'Entry','importBuysPreview','READ','ALLOW','ROLE','administrative',10578);
|
||||
INSERT INTO `ACL` VALUES (990,'Entry','lastItemBuys','READ','ALLOW','ROLE','administrative',10578);
|
||||
INSERT INTO `ACL` VALUES (991,'Entry','latestBuysFilter','READ','ALLOW','ROLE','administrative',10578);
|
||||
INSERT INTO `ACL` VALUES (992,'Entry','upsert','WRITE','ALLOW','ROLE','buyer',10578);
|
||||
INSERT INTO `ACL` VALUES (993,'Entry','updateAttributes','WRITE','ALLOW','ROLE','buyer',10578);
|
||||
INSERT INTO `ACL` VALUES (994,'Entry','findById','READ','ALLOW','ROLE','buyer',10578);
|
||||
INSERT INTO `ACL` VALUES (995,'Entry','find','READ','ALLOW','ROLE','buyer',10578);
|
||||
INSERT INTO `ACL` VALUES (996,'Entry','filter','READ','ALLOW','ROLE','buyer',10578);
|
||||
INSERT INTO `ACL` VALUES (997,'Entry','count','READ','ALLOW','ROLE','buyer',10578);
|
||||
INSERT INTO `ACL` VALUES (998,'Entry','getEntry','READ','ALLOW','ROLE','buyer',10578);
|
||||
INSERT INTO `ACL` VALUES (999,'Entry','getBuys','READ','ALLOW','ROLE','buyer',10578);
|
||||
INSERT INTO `ACL` VALUES (1000,'Entry','findOne','READ','ALLOW','ROLE','buyer',10578);
|
||||
INSERT INTO `ACL` VALUES (1001,'Entry','deleteBuys','WRITE','ALLOW','ROLE','buyer',10578);
|
||||
INSERT INTO `ACL` VALUES (1002,'Entry','editLatestBuys','WRITE','ALLOW','ROLE','buyer',10578);
|
||||
INSERT INTO `ACL` VALUES (1003,'Entry','importBuys','WRITE','ALLOW','ROLE','buyer',10578);
|
||||
INSERT INTO `ACL` VALUES (1004,'Entry','importBuysPreview','READ','ALLOW','ROLE','buyer',10578);
|
||||
INSERT INTO `ACL` VALUES (1005,'Entry','lastItemBuys','READ','ALLOW','ROLE','buyer',10578);
|
||||
INSERT INTO `ACL` VALUES (1006,'Entry','latestBuysFilter','READ','ALLOW','ROLE','buyer',10578);
|
||||
INSERT INTO `ACL` VALUES (1007,'ItemShelving','getItemsByReviewOrder','READ','ALLOW','ROLE','production',19294);
|
||||
INSERT INTO `ACL` VALUES (1008,'Entry','buyLabelSupplier','READ','ALLOW','ROLE','employee',19295);
|
||||
INSERT INTO `ACL` VALUES (1009,'Entry','buyLabel','READ','ALLOW','ROLE','supplier',19295);
|
||||
INSERT INTO `ACL` VALUES (1010,'InventoryConfig','find','READ','ALLOW','ROLE','buyer',10578);
|
||||
INSERT INTO `ACL` VALUES (1011,'SiiTypeInvoiceIn','find','READ','ALLOW','ROLE','salesPerson',10578);
|
||||
INSERT INTO `ACL` VALUES (1012,'OsrmConfig','optimize','READ','ALLOW','ROLE','employee',10578);
|
||||
INSERT INTO `ACL` VALUES (1013,'Route','optimizePriority','*','ALLOW','ROLE','employee',10578);
|
||||
|
||||
INSERT INTO `fieldAcl` VALUES (1,'Client','name','update','employee');
|
||||
INSERT INTO `fieldAcl` VALUES (2,'Client','contact','update','employee');
|
||||
|
@ -2454,9 +2539,8 @@ INSERT INTO `companyI18n` VALUES (442,'en','In compliance with the provisions of
|
|||
INSERT INTO `companyI18n` VALUES (442,'fr','Conformément aux dispositions de la loi organique 15/1999 sur la protection des données personnelles, nous vous informons que les données personnelles que vous fournissez seront incluses dans des dossiers. VERDNATURA LEVANTE S.L., vous pouvez à tout moment, exercer les droits d``accès, de rectification, d``annulation et d``opposition, en communiquant par écrit au siège social de la société. Le dossier a pour objet la gestion administrative, la comptabilité et la facturation.');
|
||||
INSERT INTO `companyI18n` VALUES (442,'pt','Em cumprimento do disposto na lei Orgânica 15/1999, de Protecção de Dados de Carácter Pessoal, comunicamos que os dados pessoais que facilite se incluirão nos ficheiros automatizados de VERDNATURA LEVANTE S.L., podendo em todo momento exercer os direitos de acesso, rectificação, cancelação e oposição, comunicando por escrito ao domicílio social da entidade. A finalidade do ficheiro é a gestão administrativa, contabilidade e facturação.');
|
||||
|
||||
INSERT INTO `cplusRectificationType` VALUES (1,'Campo vacio');
|
||||
INSERT INTO `cplusRectificationType` VALUES (1,'S – Por sustitución');
|
||||
INSERT INTO `cplusRectificationType` VALUES (2,'I – Por diferencias');
|
||||
INSERT INTO `cplusRectificationType` VALUES (3,'S – Por sustitución');
|
||||
|
||||
INSERT INTO `cplusSubjectOp` VALUES (1,'Campo vacio');
|
||||
INSERT INTO `cplusSubjectOp` VALUES (2,'S1 – Sujeta – No exenta');
|
||||
|
@ -2472,70 +2556,47 @@ INSERT INTO `cplusTaxBreak` VALUES (7,'E6 - Exenta por otros');
|
|||
|
||||
INSERT INTO `claimResponsible` VALUES (1,'Compradores',0,'buy');
|
||||
INSERT INTO `claimResponsible` VALUES (2,'Proveedor',0,'sup');
|
||||
INSERT INTO `claimResponsible` VALUES (3,'Entradores',0,'ent');
|
||||
INSERT INTO `claimResponsible` VALUES (4,'Camareros',0,'bar');
|
||||
INSERT INTO `claimResponsible` VALUES (6,'Sacadores',0,'pic');
|
||||
INSERT INTO `claimResponsible` VALUES (7,'Revisadores',0,'chk');
|
||||
INSERT INTO `claimResponsible` VALUES (8,'Calidad general',0,'qas');
|
||||
INSERT INTO `claimResponsible` VALUES (9,'Encajadores',0,'pck');
|
||||
INSERT INTO `claimResponsible` VALUES (10,'Clima',0,'wea');
|
||||
INSERT INTO `claimResponsible` VALUES (11,'Comerciales',1,'com');
|
||||
INSERT INTO `claimResponsible` VALUES (12,'Clientes',1,'cli');
|
||||
INSERT INTO `claimResponsible` VALUES (13,'Administración',0,'adm');
|
||||
INSERT INTO `claimResponsible` VALUES (14,'Agencia',0,'age');
|
||||
INSERT INTO `claimResponsible` VALUES (15,'Repartidores',0,'del');
|
||||
INSERT INTO `claimResponsible` VALUES (16,'Informatica',0,'ite');
|
||||
INSERT INTO `claimResponsible` VALUES (17,'Transp.origen',0,'tra');
|
||||
INSERT INTO `claimResponsible` VALUES (18,'Confeccion',0,'con');
|
||||
INSERT INTO `claimResponsible` VALUES (19,'OTROS',0,'oth');
|
||||
INSERT INTO `claimResponsible` VALUES (21,'Gerencia',0,'man');
|
||||
INSERT INTO `claimResponsible` VALUES (22,'Paletizadores',0,'pal');
|
||||
INSERT INTO `claimResponsible` VALUES (23,'Preparación Previa',0,'pre');
|
||||
INSERT INTO `claimResponsible` VALUES (24,'Almacén PCA',0,'war');
|
||||
INSERT INTO `claimResponsible` VALUES (25,'Huelga',0,'str');
|
||||
INSERT INTO `claimResponsible` VALUES (27,'Prep. por caja',0,'');
|
||||
INSERT INTO `claimResponsible` VALUES (27,'Prep. por caja',0,'pbb');
|
||||
INSERT INTO `claimResponsible` VALUES (45,'Negativo',0,'neg');
|
||||
|
||||
INSERT INTO `claimReason` VALUES (1,'Prisas',0);
|
||||
INSERT INTO `claimReason` VALUES (2,'Novato',0);
|
||||
INSERT INTO `claimReason` VALUES (3,'Exceso de confianza',0);
|
||||
INSERT INTO `claimReason` VALUES (4,'Exceso de celo',0);
|
||||
INSERT INTO `claimReason` VALUES (5,'Indiferencia',0);
|
||||
INSERT INTO `claimReason` VALUES (6,'Extraviado o Hurto',0);
|
||||
INSERT INTO `claimReason` VALUES (7,'Incompetencia',0);
|
||||
INSERT INTO `claimReason` VALUES (8,'Ubicación erronea',0);
|
||||
INSERT INTO `claimReason` VALUES (9,'Dat.Inctos/Pak.conf',0);
|
||||
INSERT INTO `claimReason` VALUES (10,'Datos duplicados',0);
|
||||
INSERT INTO `claimReason` VALUES (11,'Fallo stock',0);
|
||||
INSERT INTO `claimReason` VALUES (12,'Innovación',0);
|
||||
INSERT INTO `claimReason` VALUES (13,'Distracción',1);
|
||||
INSERT INTO `claimReason` VALUES (15,'Portes indebidos',0);
|
||||
INSERT INTO `claimReason` VALUES (16,'Baja calidad',0);
|
||||
INSERT INTO `claimReason` VALUES (17,'Defectuoso',0);
|
||||
INSERT INTO `claimReason` VALUES (19,'Endiñado',0);
|
||||
INSERT INTO `claimReason` VALUES (20,'Calor',0);
|
||||
INSERT INTO `claimReason` VALUES (21,'Frio',0);
|
||||
INSERT INTO `claimReason` VALUES (22,'Cambiado',0);
|
||||
INSERT INTO `claimReason` VALUES (24,'Cansancio',1);
|
||||
INSERT INTO `claimReason` VALUES (25,'Mal etiquetado',1);
|
||||
INSERT INTO `claimReason` VALUES (26,'Cantidad malentendido',0);
|
||||
INSERT INTO `claimReason` VALUES (30,'No revisado',1);
|
||||
INSERT INTO `claimReason` VALUES (34,'Error fotografia',0);
|
||||
INSERT INTO `claimReason` VALUES (40,'Fallo Personal VN',0);
|
||||
INSERT INTO `claimReason` VALUES (41,'Fallo Personal Cliente',0);
|
||||
INSERT INTO `claimReason` VALUES (42,'Otros',0);
|
||||
INSERT INTO `claimReason` VALUES (43,'Precio alto',0);
|
||||
INSERT INTO `claimReason` VALUES (44,'Abuso de confianza',0);
|
||||
INSERT INTO `claimReason` VALUES (45,'Retraso Agencia',0);
|
||||
INSERT INTO `claimReason` VALUES (46,'Delicado',0);
|
||||
INSERT INTO `claimReason` VALUES (47,'Seco',0);
|
||||
INSERT INTO `claimReason` VALUES (48,'Retraso Reparto',0);
|
||||
INSERT INTO `claimReason` VALUES (49,'Mal Embalado',0);
|
||||
INSERT INTO `claimReason` VALUES (50,'Tumbado',0);
|
||||
INSERT INTO `claimReason` VALUES (51,'Enfermo/Plaga',0);
|
||||
INSERT INTO `claimReason` VALUES (52,'Mala gestión comercial',0);
|
||||
INSERT INTO `claimReason` VALUES (53,'Mala gestión comprador',0);
|
||||
INSERT INTO `claimReason` VALUES (54,'A2',0);
|
||||
INSERT INTO `claimReason` VALUES (55,'Entrega 48h o más',0);
|
||||
INSERT INTO `claimReason` VALUES (56,'Error cliente',0);
|
||||
INSERT INTO `claimReason` VALUES (57,'A2/B1',0);
|
||||
|
@ -2549,7 +2610,6 @@ INSERT INTO `claimRedelivery` VALUES (5,'Tour');
|
|||
INSERT INTO `claimRedelivery` VALUES (6,'Fuera Peninsula');
|
||||
INSERT INTO `claimRedelivery` VALUES (7,'Francia');
|
||||
|
||||
INSERT INTO `claimResult` VALUES (1,'Otros daños');
|
||||
INSERT INTO `claimResult` VALUES (2,'Roces');
|
||||
INSERT INTO `claimResult` VALUES (3,'Humedad');
|
||||
INSERT INTO `claimResult` VALUES (4,'Deshidratacion');
|
||||
|
@ -2558,26 +2618,22 @@ INSERT INTO `claimResult` VALUES (6,'Incompleto (Faltas)');
|
|||
INSERT INTO `claimResult` VALUES (7,'Error packing');
|
||||
INSERT INTO `claimResult` VALUES (8,'Error color');
|
||||
INSERT INTO `claimResult` VALUES (9,'Error medida');
|
||||
INSERT INTO `claimResult` VALUES (10,'Error origen');
|
||||
INSERT INTO `claimResult` VALUES (11,'Envejecido');
|
||||
INSERT INTO `claimResult` VALUES (12,'Venta Perdida');
|
||||
INSERT INTO `claimResult` VALUES (13,'Duplicacion');
|
||||
INSERT INTO `claimResult` VALUES (14,'Rechazado');
|
||||
INSERT INTO `claimResult` VALUES (15,'Rotura');
|
||||
INSERT INTO `claimResult` VALUES (16,'Deterioro/Estropeado');
|
||||
INSERT INTO `claimResult` VALUES (17,'Podrido');
|
||||
INSERT INTO `claimResult` VALUES (18,'Baboso');
|
||||
INSERT INTO `claimResult` VALUES (19,'Cocido');
|
||||
INSERT INTO `claimResult` VALUES (20,'Congelado');
|
||||
INSERT INTO `claimResult` VALUES (21,'Machacado');
|
||||
INSERT INTO `claimResult` VALUES (22,'Error precio');
|
||||
INSERT INTO `claimResult` VALUES (23,'Manchado');
|
||||
INSERT INTO `claimResult` VALUES (24,'No entregado');
|
||||
INSERT INTO `claimResult` VALUES (25,'Cobro indebido');
|
||||
INSERT INTO `claimResult` VALUES (26,'Decepcion/Esperaba mas');
|
||||
INSERT INTO `claimResult` VALUES (27,'Otros');
|
||||
INSERT INTO `claimResult` VALUES (28,'Baboso/Cocido');
|
||||
INSERT INTO `claimResult` VALUES (29,'Video Camara');
|
||||
INSERT INTO `claimResult` VALUES (29,'Videocámaras');
|
||||
INSERT INTO `claimResult` VALUES (30,'Manipulado');
|
||||
INSERT INTO `claimResult` VALUES (31,'ReclamReclamado PR/AG');
|
||||
|
||||
INSERT INTO `component` VALUES (10,'Precios Especiales',4,NULL,NULL,1,'specialPrices',0);
|
||||
INSERT INTO `component` VALUES (14,'porte extra por dia semana',6,NULL,NULL,1,'extraCostPerWeekDay',0);
|
||||
|
@ -2625,64 +2681,71 @@ INSERT INTO `continent` VALUES (3,'África','AF');
|
|||
INSERT INTO `continent` VALUES (4,'Europa','EU');
|
||||
INSERT INTO `continent` VALUES (5,'Oceanía','OC');
|
||||
|
||||
INSERT INTO `department` VALUES (1,'VN','VERDNATURA',1,116,763,0,0,0,0,26,NULL,'/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (1,'VN','VERDNATURA',1,130,763,0,0,0,0,26,NULL,'/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (22,'shopping','COMPRAS',2,5,NULL,72,0,0,1,1,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (23,'CMA','CAMARA',15,16,NULL,72,1,1,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,1,NULL,NULL,NULL,'PREVIOUS');
|
||||
INSERT INTO `department` VALUES (31,'it','INFORMATICA',6,7,NULL,72,0,0,1,0,1,'/1/','informatica-cau',1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (34,'accounting','CONTABILIDAD',8,9,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (35,'finance','FINANZAS',10,11,NULL,0,0,0,1,0,1,'/1/',NULL,1,'begonya@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (36,'labor','LABORAL',12,13,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (36,'labor','LABORAL',12,13,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (37,'PROD','PRODUCCION',14,37,NULL,72,1,1,1,11,1,'/1/',NULL,0,NULL,0,1,1,1,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (38,'picking','SACADO',17,18,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,0,1,NULL,NULL,NULL,'ON_PREPARATION');
|
||||
INSERT INTO `department` VALUES (39,'packing','ENCAJADO',19,20,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,'PACKING');
|
||||
INSERT INTO `department` VALUES (41,'administration','ADMINISTRACION',38,39,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (43,'VT','VENTAS',40,75,NULL,0,0,0,1,17,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (44,'management','GERENCIA',76,77,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (45,'logistic','LOGISTICA',78,79,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (46,'delivery','REPARTO',80,81,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,'DELIVERY');
|
||||
INSERT INTO `department` VALUES (48,'storage','ALMACENAJE',82,83,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'STORAGE');
|
||||
INSERT INTO `department` VALUES (49,NULL,'PROPIEDAD',84,85,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (52,NULL,'CARGA AEREA',86,87,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (43,'VT','VENTAS',40,89,NULL,0,0,0,1,24,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (44,'management','GERENCIA',90,91,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (45,'logistic','LOGISTICA',92,93,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (46,'delivery','REPARTO',94,95,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,'DELIVERY');
|
||||
INSERT INTO `department` VALUES (48,'storage','ALMACENAJE',96,97,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'STORAGE');
|
||||
INSERT INTO `department` VALUES (49,NULL,'PROPIEDAD',98,99,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (52,NULL,'CARGA AEREA',100,101,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (53,'marketing','MARKETING Y COMUNICACIÓN',41,42,NULL,72,0,0,2,0,43,'/1/43/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (54,NULL,'ORNAMENTALES',88,89,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (54,NULL,'ORNAMENTALES',102,103,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (55,NULL,'TALLER NATURAL',21,22,14548,72,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,1118,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (56,NULL,'TALLER ARTIFICIAL',23,24,8470,72,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,1927,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (58,'CMP','CAMPOS',90,93,NULL,72,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'FIELD');
|
||||
INSERT INTO `department` VALUES (59,'maintenance','MANTENIMIENTO',94,95,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (58,'CMP','CAMPOS',104,107,NULL,72,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'FIELD');
|
||||
INSERT INTO `department` VALUES (59,'maintenance','MANTENIMIENTO',108,109,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (60,'claims','RECLAMACIONES',43,44,NULL,72,0,0,2,0,43,'/1/43/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,'CLAIM');
|
||||
INSERT INTO `department` VALUES (61,NULL,'VNH',96,99,NULL,73,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (66,NULL,'VERDNAMADRID',100,101,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (61,NULL,'VNH',110,113,NULL,73,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (66,NULL,'VERDNAMADRID',114,115,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (68,NULL,'COMPLEMENTOS',25,26,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (69,NULL,'VERDNABARNA',102,103,NULL,74,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (80,'spainTeam5','EQUIPO ESPAÑA 5',45,46,4250,0,0,0,2,0,43,'/1/43/','es5_equipo',1,'es5@verdnatura.es',0,0,0,0,NULL,NULL,'5300',NULL);
|
||||
INSERT INTO `department` VALUES (86,NULL,'LIMPIEZA',104,105,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (89,NULL,'COORDINACION',106,107,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (90,NULL,'TRAILER',97,98,NULL,0,0,0,2,0,61,'/1/61/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (69,NULL,'VERDNABARNA',116,117,NULL,74,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (80,'spainTeam5','EQUIPO ESPAÑA 5',45,46,4250,0,0,0,2,0,43,'/1/43/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (86,NULL,'LIMPIEZA',118,119,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (89,NULL,'COORDINACION',120,121,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (90,NULL,'TRAILER',111,112,NULL,0,0,0,2,0,61,'/1/61/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (91,'artificial','ARTIFICIAL',27,28,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'PREVIOUS');
|
||||
INSERT INTO `department` VALUES (92,NULL,'EQUIPO SILVERIO',47,48,1203,0,0,0,2,0,43,'/1/43/','sdc_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (94,'spainTeam2','EQUIPO ESPAÑA 2',49,50,3797,0,0,0,2,0,43,'/1/43/','es2_equipo',1,'es2@verdnatura.es',0,0,0,0,NULL,NULL,'5100',NULL);
|
||||
INSERT INTO `department` VALUES (95,'spainTeam1','EQUIPO ESPAÑA 1',51,52,24065,0,0,0,2,0,43,'/1/43/','es1_equipo',1,'es1@verdnatura.es',0,0,0,0,NULL,NULL,'5000',NULL);
|
||||
INSERT INTO `department` VALUES (94,'spainTeam2','EQUIPO ESPAÑA 2',49,50,3797,0,0,0,2,0,43,'/1/43/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (95,'spainTeam1','EQUIPO ESPAÑA 1',51,52,24065,0,0,0,2,0,43,'/1/43/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (96,NULL,'EQUIPO C LOPEZ',53,54,4661,0,0,0,2,0,43,'/1/43/','cla_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (115,NULL,'EQUIPO CLAUDI',55,56,3810,0,0,0,2,0,43,'/1/43/','csr_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (123,NULL,'EQUIPO ELENA BASCUÑANA',57,58,7102,0,0,0,2,0,43,'/1/43/','ebt_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (124,NULL,'CONTROL INTERNO',108,109,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (125,'spainTeam3','EQUIPO ESPAÑA 3',59,60,1118,0,0,0,2,0,43,'/1/43/','es3_equipo',1,'es3@verdnatura.es',0,0,0,0,NULL,NULL,'5200',NULL);
|
||||
INSERT INTO `department` VALUES (124,NULL,'CONTROL INTERNO',122,123,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (125,'spainTeam3','EQUIPO ESPAÑA 3',59,60,1118,0,0,0,2,0,43,'/1/43/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (126,NULL,'PRESERVADO',29,30,NULL,0,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (128,NULL,'PALETIZADO',31,32,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'PALLETIZING');
|
||||
INSERT INTO `department` VALUES (130,NULL,'REVISION',33,34,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,'ON_CHECKING');
|
||||
INSERT INTO `department` VALUES (131,'greenhouse','INVERNADERO',91,92,NULL,0,0,0,2,0,58,'/1/58/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (131,'greenhouse','INVERNADERO',105,106,NULL,0,0,0,2,0,58,'/1/58/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (132,NULL,'EQUIPO DC',61,62,1731,0,0,0,2,0,43,'/1/43/','dc_equipo',1,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (133,'franceTeam','EQUIPO FRANCIA',63,64,1731,72,0,0,2,0,43,'/1/43/','fr_equipo',1,'gestionfrancia@verdnatura.es',0,0,0,0,NULL,NULL,'3300',NULL);
|
||||
INSERT INTO `department` VALUES (134,'portugalTeam','EQUIPO PORTUGAL',65,66,6264,0,0,0,2,0,43,'/1/43/','pt_equipo',1,'portugal@verdnatura.es',0,0,0,0,NULL,NULL,'3500',NULL);
|
||||
INSERT INTO `department` VALUES (135,'routers','ENRUTADORES',110,111,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (136,'heavyVehicles','VEHICULOS PESADOS',112,113,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (137,'sorter','SORTER',114,115,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (139,'spainTeam4','EQUIPO ESPAÑA 4',67,68,3803,0,0,0,2,0,43,'/1/43/','es4_equipo',1,'es4@verdnatura.es',0,0,0,0,NULL,NULL,'5400',NULL);
|
||||
INSERT INTO `department` VALUES (133,'franceTeamManagement','EQUIPO GESTIÓN FRANCIA',63,64,9751,72,0,0,2,0,43,'/1/43/','fr_equipo',1,'gestionfrancia@verdnatura.es',0,0,0,0,NULL,NULL,'3300',NULL);
|
||||
INSERT INTO `department` VALUES (134,'portugalTeam','EQUIPO PORTUGAL',65,66,8964,0,0,0,2,0,43,'/1/43/','pt_equipo',1,'portugal@verdnatura.es',0,0,0,0,NULL,NULL,'3500',NULL);
|
||||
INSERT INTO `department` VALUES (135,'routers','ENRUTADORES',124,125,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (136,'heavyVehicles','VEHICULOS PESADOS',126,127,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (137,'sorter','SORTER',128,129,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (139,'spainTeam4','EQUIPO ESPAÑA 4',67,68,3803,0,0,0,2,0,43,'/1/43/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (140,'internationalTeam','EQUIPO INTERNACIONAL',69,70,24065,0,0,0,2,0,43,'/1/43/','int_equipo',1,'international@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (141,NULL,'PREVIA',35,36,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,'PREVIOUS');
|
||||
INSERT INTO `department` VALUES (146,NULL,'VERDNACOLOMBIA',3,4,NULL,72,0,0,2,0,22,'/1/22/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (147,'spainTeamAsia','EQUIPO ESPAÑA ASIA',71,72,40214,0,0,0,2,0,43,'/1/43/','esA_equipo',0,'esA@verdnatura.es',0,0,0,0,NULL,NULL,'5500',NULL);
|
||||
INSERT INTO `department` VALUES (148,NULL,'CAPTATION FRANCIA',73,74,NULL,0,0,0,2,0,43,'/1/43/',NULL,0,NULL,0,0,0,0,NULL,NULL,'6000',NULL);
|
||||
INSERT INTO `department` VALUES (147,'spainTeamAsia','EQUIPO ESPAÑA ASIA',71,72,40214,0,0,0,2,0,43,'/1/43/','esA_equipo',1,'esA@verdnatura.es',0,0,0,0,NULL,NULL,'5500',NULL);
|
||||
INSERT INTO `department` VALUES (148,'franceTeamCatchment','EQUIPO CAPTACIÓN FRANCIA',73,74,25178,0,0,0,2,0,43,'/1/43/',NULL,1,NULL,0,0,0,0,NULL,NULL,'6000',NULL);
|
||||
INSERT INTO `department` VALUES (149,'spainTeamCatchment','EQUIPO ESPAÑA CAPTACIÓN',75,76,1203,0,0,0,2,0,43,'/1/43/','es_captacion_equipo',1,'es_captacion@verdnatura.es',0,0,0,0,NULL,NULL,'5700',NULL);
|
||||
INSERT INTO `department` VALUES (150,'spainTeamLevanteIslands','EQUIPO ESPAÑA LEVANTE',77,78,1118,0,0,0,2,0,43,'/1/43/','es_levante_equipo',1,'levanteislas.verdnatura@gmail.com',0,0,0,0,NULL,NULL,'5000',NULL);
|
||||
INSERT INTO `department` VALUES (151,'spainTeamNorthwest','EQUIPO ESPAÑA NOROESTE',79,80,7102,0,0,0,2,0,43,'/1/43/','es_noroeste_equipo',1,'noroeste.verdnatura@gmail.com',0,0,0,0,NULL,NULL,'5300',NULL);
|
||||
INSERT INTO `department` VALUES (152,'spainTeamNortheast','EQUIPO ESPAÑA NORESTE',81,82,1118,0,0,0,2,0,43,'/1/43/','es_noreste_equipo',1,'noreste.verdnatura@gmail.com',0,0,0,0,NULL,NULL,'5200',NULL);
|
||||
INSERT INTO `department` VALUES (153,'spainTeamSouth','EQUIPO ESPAÑA SUR',83,84,36578,0,0,0,2,0,43,'/1/43/','es_sur_equipo',1,'sur.verdnatura@gmail.com',0,0,0,0,NULL,NULL,'5400',NULL);
|
||||
INSERT INTO `department` VALUES (154,'spainTeamCenter','EQUIPO ESPAÑA CENTRO',85,86,4661,0,0,0,2,0,43,'/1/43/','es_centro_equipo',1,'centro.verdnatura@gmail.com',0,0,0,0,NULL,NULL,'5100',NULL);
|
||||
INSERT INTO `department` VALUES (155,'spainTeamVip','EQUIPO ESPAÑA VIP',87,88,5432,0,0,0,2,0,43,'/1/43/','es_vip_equipo',1,'vip.verdnatura@gmail.com',0,0,0,0,NULL,NULL,'5600',NULL);
|
||||
|
||||
INSERT INTO `docuware` VALUES (1,'deliveryNote','Albaranes cliente','find','find','N__ALBAR_N',NULL);
|
||||
INSERT INTO `docuware` VALUES (2,'deliveryNote','Albaranes cliente','store','Archivar','N__ALBAR_N',NULL);
|
||||
|
@ -2784,7 +2847,6 @@ INSERT INTO `state` VALUES (7,'Sin Acabar',1,0,'NOT_READY',7,0,0,0,0,0,0,4,1,'al
|
|||
INSERT INTO `state` VALUES (8,'Revisado',8,2,'CHECKED',8,0,1,0,3,0,0,1,0,'warning');
|
||||
INSERT INTO `state` VALUES (9,'Encajando',9,3,'PACKING',9,0,1,0,0,0,0,1,0,NULL);
|
||||
INSERT INTO `state` VALUES (10,'Encajado',10,3,'PACKED',10,0,1,0,0,0,0,0,0,NULL);
|
||||
INSERT INTO `state` VALUES (11,'Facturado',0,4,'INVOICED',11,0,1,0,0,0,0,0,0,NULL);
|
||||
INSERT INTO `state` VALUES (12,'Bloqueado',0,0,'BLOCKED',12,0,0,0,0,0,0,4,1,'alert');
|
||||
INSERT INTO `state` VALUES (13,'En Reparto',11,4,'ON_DELIVERY',13,0,1,0,0,0,0,0,0,NULL);
|
||||
INSERT INTO `state` VALUES (14,'Preparado',6,2,'PREPARED',14,0,1,0,2,0,0,1,0,'warning');
|
||||
|
@ -2797,19 +2859,15 @@ INSERT INTO `state` VALUES (23,'URGENTE',5,2,'LAST_CALL',23,1,0,1,0,0,0,4,1,'suc
|
|||
INSERT INTO `state` VALUES (24,'Encadenado',4,0,'CHAINED',24,0,0,0,0,0,0,3,1,'success');
|
||||
INSERT INTO `state` VALUES (25,'Embarcando',3,0,'BOARDING',25,1,0,0,0,0,0,3,0,'alert');
|
||||
INSERT INTO `state` VALUES (26,'Prep Previa',5,0,'PREVIOUS_PREPARATION',28,1,0,0,1,0,0,2,0,'warning');
|
||||
INSERT INTO `state` VALUES (27,'Prep Asistida',5,2,'ASSISTED_PREPARATION',27,0,0,0,0,0,0,2,0,'success');
|
||||
INSERT INTO `state` VALUES (28,'Previa OK',3,0,'OK PREVIOUS',28,1,0,1,1,1,1,3,0,'warning');
|
||||
INSERT INTO `state` VALUES (29,'Previa Impreso',4,0,'PRINTED PREVIOUS',29,1,0,1,0,0,1,2,0,'success');
|
||||
INSERT INTO `state` VALUES (30,'Embarcado',4,2,'BOARD',30,0,0,0,2,0,0,3,0,'success');
|
||||
INSERT INTO `state` VALUES (31,'Polizon Impreso',4,2,'PRINTED STOWAWAY',29,1,0,1,0,0,1,2,0,'success');
|
||||
INSERT INTO `state` VALUES (32,'Polizon OK',3,2,'OK STOWAWAY',31,1,0,0,1,1,1,3,0,'warning');
|
||||
INSERT INTO `state` VALUES (33,'Auto_Impreso',4,0,'PRINTED_AUTO',29,1,0,1,0,0,1,2,0,'success');
|
||||
INSERT INTO `state` VALUES (34,'Pte Pago',3,0,'WAITING_FOR_PAYMENT',34,0,0,0,0,0,0,4,1,'alert');
|
||||
INSERT INTO `state` VALUES (35,'Semi-Encajado',9,3,'HALF_PACKED',10,0,1,0,0,0,0,1,0,NULL);
|
||||
INSERT INTO `state` VALUES (36,'Previa Revisando',3,0,'PREVIOUS_CONTROL',37,1,0,0,4,0,1,2,0,'warning');
|
||||
INSERT INTO `state` VALUES (37,'Previa Revisado',3,0,'PREVIOUS_CONTROLLED',29,1,0,1,0,0,1,2,0,'warning');
|
||||
INSERT INTO `state` VALUES (38,'Prep Cámara',6,2,'COOLER_PREPARATION',14,0,0,0,2,0,0,2,0,'warning');
|
||||
INSERT INTO `state` VALUES (41,'Prep Parcial',6,2,'PARTIAL_PREPARATION',14,0,0,0,2,0,0,2,0,'warning');
|
||||
INSERT INTO `state` VALUES (42,'Entregado en parte',13,3,'PARTIAL_DELIVERED',16,0,1,0,0,0,0,0,0,NULL);
|
||||
INSERT INTO `state` VALUES (43,'Preparación por caja',6,2,'BOX_PICKING',42,0,0,0,2,0,0,2,0,'warning');
|
||||
|
||||
|
@ -2820,6 +2878,17 @@ INSERT INTO `ticketCanAdvanceConfig` VALUES (1,5);
|
|||
|
||||
INSERT INTO `volumeConfig` VALUES (2.67,1.60,0.8,150,0.30,120,57,2.0,50,200,10,167.0);
|
||||
|
||||
INSERT INTO `workerActivityType` VALUES ('CLAIM','RECLAMACIONES');
|
||||
INSERT INTO `workerActivityType` VALUES ('DELIVERY','REPARTO');
|
||||
INSERT INTO `workerActivityType` VALUES ('FIELD','CAMPOS');
|
||||
INSERT INTO `workerActivityType` VALUES ('ON_CHECKING','REVISION');
|
||||
INSERT INTO `workerActivityType` VALUES ('ON_PREPARATION','SACADO');
|
||||
INSERT INTO `workerActivityType` VALUES ('PACKING','ENCAJADO');
|
||||
INSERT INTO `workerActivityType` VALUES ('PALLETIZING','PALETIZADO');
|
||||
INSERT INTO `workerActivityType` VALUES ('PREVIOUS','ARTIFICIAL-CÁMARA');
|
||||
INSERT INTO `workerActivityType` VALUES ('STOP','PARADA');
|
||||
INSERT INTO `workerActivityType` VALUES ('STORAGE','ALMACENAJE');
|
||||
|
||||
INSERT INTO `workCenter` VALUES (1,'Silla',20,859,1,'Av espioca 100',552703,NULL);
|
||||
INSERT INTO `workCenter` VALUES (2,'Mercaflor',19,NULL,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `workCenter` VALUES (3,'Marjales',26,20008,NULL,NULL,NULL,NULL);
|
||||
|
@ -3149,6 +3218,7 @@ USE `sage`;
|
|||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
|
||||
INSERT INTO `TiposIva` VALUES (2,0,'Operaciones no sujetas',0.0000000000,0.0000000000,0.0000000000,'','4770000020','','','','','','','95B21A93-5910-489D-83BB-C32788C9B19D','','','','','','','','','',0);
|
||||
INSERT INTO `TiposIva` VALUES (3,0,'IVA ESPECIAL 2%',0.0000000000,2.0000000000,0.0000000000,'4720000002','4770000012','','','','','','','9E6160D5-984E-4643-ACBC-1EBC3BF73360','','','','','','','','','',0);
|
||||
INSERT INTO `TiposIva` VALUES (4,0,'I.V.A. 4%',0.0000000000,4.0000000000,0.0000000000,'4720000004','4770000004','','6310000000','','','','','9E6160D5-984E-4643-ACBC-1EBC3BF73360','','','','','','','','','',0);
|
||||
INSERT INTO `TiposIva` VALUES (5,0,'I.V.A. 4% y R.E. 0.5%',0.0000000000,4.0000000000,0.5000000000,'','4770000504','4770000405','','','','','','DBEFA562-63FB-4FFC-8171-64F0C6F065FF','','','','','','','','','',0);
|
||||
INSERT INTO `TiposIva` VALUES (6,0,'H.P. IVA 4% CEE',0.0000000000,4.0000000000,0.0000000000,'4721000004','4771000004','','','','','','','DD0ECBA8-2EF5-425E-911B-623580BADA77','','','','','','','','','',0);
|
||||
|
|
|
@ -805,7 +805,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','edi','grafana','supplyResponse','ju
|
|||
INSERT IGNORE INTO `tables_priv` VALUES ('','cache','customer','last_buy','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','client','carlosap@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Update','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','invoiceInTax','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','workerTeam','juan@10.5.1.2','0000-00-00 00:00:00','Select,Insert,Update','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','workerTeam','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','profile_type','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','postgresql','hr','profile_media','alexm@%','0000-00-00 00:00:00','Select,Insert','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','recovery','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
|
@ -835,7 +835,6 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','bi','salesPerson','tarifa_component
|
|||
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','employee','expeditionLog','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','bs','salesPerson','clientNewBorn','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','saleItemShelving__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesBoss','workerTeam','juan@10.5.1.2','0000-00-00 00:00:00','Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','employee','expedition','alexm@%','0000-00-00 00:00:00','Update','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemShelvingStock','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','saleParking__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||
|
@ -887,7 +886,6 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketDms','alexm@%
|
|||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','ektEntryAssign','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','intrastat','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','supplierAgencyTerm','alexm@%','0000-00-00 00:00:00','Update','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','entryConfig','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','franceExpressConfig','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','manager','ticketLog','juan@10.5.1.2','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','ticketCollection','alexm@%','0000-00-00 00:00:00','Delete','');
|
||||
|
@ -945,7 +943,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','role','alexm@%','00
|
|||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientCredit','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','worker','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','workerAppTester','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','propertyGroup','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','propertyGroup','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','worker','alexm@%','0000-00-00 00:00:00','Update','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerBusinessType','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','workerDepartment','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
|
@ -964,7 +962,6 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','workerMana','alexm@%',
|
|||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','workerMana','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','ticketPackaging','alexm@%','0000-00-00 00:00:00','Insert','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','ticketPackagingStartingStock','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','entryConfig','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','officeBoss','ticketPackagingStartingStock','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerRelatives','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','ticketPackagingStartingStock','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
|
@ -982,7 +979,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','bi','officeBoss','Greuge_Evolution'
|
|||
INSERT IGNORE INTO `tables_priv` VALUES ('','bi','claimManager','rotacion','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','bs','grafana','sale','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','zonePromo__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','accountingConfig','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','accountingConfig','carlosap@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Update','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','accountingType','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','agencyMode','alexm@%','0000-00-00 00:00:00','Insert,Update','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','cache','employee','visible','juan@10.5.1.2','0000-00-00 00:00:00','Select','');
|
||||
|
@ -1246,6 +1243,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','bs','deliveryAssistant','m3','alexm
|
|||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','ticketDms','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','time','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','v_Articles_botanical','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','inventoryConfig','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','workerDepartment','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','zoneEvent','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','bi','deliveryAssistant','rotacion','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
|
@ -1418,9 +1416,12 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financialBoss','accountDetail'
|
|||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','accountDetail','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Update','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','maintenanceBoss','project','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','maintenanceBoss','machineDetail','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyerSalesAssistant','route','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Update','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','workerActivityType','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','delivery','zoneConfig','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyerSalesAssistant','route','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','workCenter','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyerSalesAssistant','Rutas','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Update','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','marketingBoss','specialPrice','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','genericAllocation','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','businessReasonEnd','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','buy_edi','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
|
@ -1480,7 +1481,6 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','itemStateTag'
|
|||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','material','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','saleUnit','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','origin','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','itemType','jgallego@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','delivery','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','itemFarmingTag','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','itemWrappingTag','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||
|
@ -1490,6 +1490,10 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','itemBaseTag',
|
|||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','itemBreederTag','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemShelvingLog','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','itemTextureTag','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','travelThermograph','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','thermograph','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyerSalesAssistant','Tickets','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Update','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','sim','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||
/*!40000 ALTER TABLE `tables_priv` ENABLE KEYS */;
|
||||
|
||||
/*!40000 ALTER TABLE `columns_priv` DISABLE KEYS */;
|
||||
|
@ -1875,6 +1879,7 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','subordinateget
|
|||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_afterUpsert','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','util','grafana','dayend','FUNCTION','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','srt','production','buffer_settypebyname','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','grafana','clientGetMana','FUNCTION','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','barcodeToItem','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','ticket_splititempackingtype','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','entry_getCommission','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
||||
|
@ -1911,7 +1916,6 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','util','android','debugadd','PROCEDUR
|
|||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','copyComponentsFromSaleList','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','duaEntryValueUpdate','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','duaInvoiceInBooking','PROCEDURE','carlosap@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelvinglog_get','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expedition_getstate','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','srt','production','expedition_scan','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','productionBoss','saleSplit','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
|
@ -2134,7 +2138,6 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','srt','delivery','buffer_settypebynam
|
|||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expedition_getstate','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','srt','delivery','expedition_scan','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelving_get','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelvinglog_get','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelving_add','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelving_getsaledate','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelving_filterbuyer','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
|
@ -2154,6 +2157,7 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','sectorcollection_new
|
|||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','sectorcollection_get','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','setparking','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','shelvingparking_get','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','buy_getLastWithoutInventory','FUNCTION','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','saletracking_addprevok','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','sectorcollectionsalegroup_add','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','saletracking_updateischecked','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
|
@ -2162,6 +2166,7 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','travel_updatepacking
|
|||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','freelance_getinfo','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','company_getfiscaldata','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expedition_getfromroute','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','zone_getPostalCode','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemplacementsupplyaiming','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expeditionstate_addbypallet','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','srt','delivery','expeditionloading_add','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
|
@ -2254,7 +2259,7 @@ INSERT IGNORE INTO `global_priv` VALUES ('','buyerBoss','{\"access\": 0, \"versi
|
|||
INSERT IGNORE INTO `global_priv` VALUES ('','buyerSalesAssistant','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
||||
INSERT IGNORE INTO `global_priv` VALUES ('','claimManager','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
||||
INSERT IGNORE INTO `global_priv` VALUES ('','cooler','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
||||
INSERT IGNORE INTO `global_priv` VALUES ('','coolerAssist','{\"access\":0,\"version_id\":100707,\"is_role\":true}');
|
||||
INSERT IGNORE INTO `global_priv` VALUES ('','coolerAssist','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
||||
INSERT IGNORE INTO `global_priv` VALUES ('','coolerBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
||||
INSERT IGNORE INTO `global_priv` VALUES ('','customer','{\"access\": 0, \"max_questions\": 0, \"max_updates\": 30000, \"max_connections\": 300000, \"max_user_connections\": 400, \"max_statement_time\": 0.000000, \"is_role\": true,\"version_id\":100707}');
|
||||
INSERT IGNORE INTO `global_priv` VALUES ('','delivery','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -5701,7 +5701,7 @@ BEGIN
|
|||
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
|
||||
IF (SELECT COUNT(*) FROM vn.invoiceIn
|
||||
IF (SELECT COUNT(*) FROM invoiceIn
|
||||
WHERE supplierRef = NEW.supplierRef
|
||||
AND supplierFk = NEW.supplierFk
|
||||
AND YEAR(issued) = YEAR(NEW.issued)
|
||||
|
@ -5713,7 +5713,7 @@ BEGIN
|
|||
IF NEW.supplierFk != OLD.supplierFk THEN
|
||||
CALL supplier_checkIsActive(NEW.supplierFk);
|
||||
SELECT withholdingSageFk INTO vWithholdingSageFk
|
||||
FROM vn.supplier
|
||||
FROM supplier
|
||||
WHERE id = NEW.supplierFk;
|
||||
SET NEW.withholdingSageFk = vWithholdingSageFk;
|
||||
END IF;
|
||||
|
@ -5737,25 +5737,31 @@ DELIMITER ;;
|
|||
AFTER UPDATE ON `invoiceIn`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
IF NEW.issued != OLD.issued
|
||||
OR NEW.currencyFk != OLD.currencyFk THEN
|
||||
DECLARE vIsEuro BOOL;
|
||||
|
||||
SELECT `code` = 'EUR' INTO vIsEuro
|
||||
FROM currency
|
||||
WHERE id = NEW.currencyFk;
|
||||
|
||||
IF (NOT NEW.issued <=> OLD.issued
|
||||
OR NEW.currencyFk <> OLD.currencyFk) THEN
|
||||
|
||||
UPDATE invoiceInTax iit
|
||||
JOIN invoiceIn ii ON ii.id = iit.invoiceInFk
|
||||
LEFT JOIN referenceRate rr ON rr.dated = ii.issued
|
||||
AND rr.currencyFk = ii.currencyFk
|
||||
SET iit.taxableBase = IF(iit.foreignValue IS NULL, iit.taxableBase, iit.foreignValue / rr.value)
|
||||
SET iit.taxableBase = IF(vIsEuro, iit.taxableBase, iit.foreignValue / rr.value),
|
||||
iit.foreignValue = IF(vIsEuro, NULL, iit.foreignValue)
|
||||
WHERE ii.id = NEW.id;
|
||||
|
||||
UPDATE invoiceInDueDay iidd
|
||||
JOIN invoiceIn ii ON ii.id = iidd.invoiceInFk
|
||||
LEFT JOIN referenceRate rr ON rr.dated = ii.issued
|
||||
AND rr.currencyFk = ii.currencyFk
|
||||
SET iidd.amount = IF(iidd.foreignValue IS NULL, iidd.amount, iidd.foreignValue / rr.value)
|
||||
SET iidd.amount = IF(vIsEuro, iidd.amount, iidd.foreignValue / rr.value),
|
||||
iidd.foreignValue = IF(vIsEuro, NULL, iidd.foreignValue)
|
||||
WHERE ii.id = NEW.id;
|
||||
|
||||
END IF;
|
||||
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
|
@ -6447,7 +6453,7 @@ BEGIN
|
|||
JOIN vn.route r ON r.id = t.routeFk
|
||||
WHERE r.isOk = FALSE
|
||||
AND ic.itemFk = NEW.itemFk
|
||||
AND r.created >= util.VN_CURDATE()
|
||||
AND r.dated >= util.VN_CURDATE()
|
||||
GROUP BY r.id;
|
||||
IF NEW.cm3Delivery = 0 AND NEW.warehouseFk = 60 THEN
|
||||
CALL mail_insert(
|
||||
|
@ -6546,36 +6552,6 @@ BEGIN
|
|||
SET NEW.userFk = account.myUser_getId();
|
||||
SET NEW.available = NEW.visible;
|
||||
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
/*!50003 SET character_set_client = utf8mb4 */ ;
|
||||
/*!50003 SET character_set_results = utf8mb4 */ ;
|
||||
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
|
||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemShelving_afterInsert`
|
||||
AFTER INSERT ON `itemShelving`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
INSERT INTO itemShelvingLog
|
||||
SET itemShelvingFk = NEW.id,
|
||||
workerFk = account.myUser_getId(),
|
||||
accion = 'CREA REGISTRO',
|
||||
itemFk = NEW.itemFk,
|
||||
shelvingFk = NEW.shelvingFk,
|
||||
visible = NEW.visible,
|
||||
`grouping` = NEW.`grouping`,
|
||||
packing = NEW.packing,
|
||||
available = NEW.available;
|
||||
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
|
@ -6619,63 +6595,6 @@ DELIMITER ;
|
|||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemShelving_afterUpdate`
|
||||
AFTER UPDATE ON `itemShelving`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
INSERT INTO itemShelvingLog
|
||||
SET itemShelvingFk = NEW.id,
|
||||
workerFk = account.myUser_getId(),
|
||||
accion = 'CAMBIO',
|
||||
itemFk = NEW.itemFk,
|
||||
shelvingFk = NEW.shelvingFk,
|
||||
visible = NEW.visible,
|
||||
`grouping` = NEW.`grouping`,
|
||||
packing = NEW.packing,
|
||||
available = NEW.available;
|
||||
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
/*!50003 SET character_set_client = utf8mb4 */ ;
|
||||
/*!50003 SET character_set_results = utf8mb4 */ ;
|
||||
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
|
||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemShelving_beforeDelete`
|
||||
BEFORE DELETE ON `itemShelving`
|
||||
FOR EACH ROW
|
||||
INSERT INTO vn.itemShelvingLog(itemShelvingFk,
|
||||
workerFk,
|
||||
accion,
|
||||
shelvingFk,
|
||||
itemFk)
|
||||
VALUES( OLD.id,
|
||||
account.myUser_getId(),
|
||||
'ELIMINADO',
|
||||
OLD.shelvingFk,
|
||||
OLD.itemFk) */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
/*!50003 SET character_set_client = utf8mb4 */ ;
|
||||
/*!50003 SET character_set_results = utf8mb4 */ ;
|
||||
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
|
||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemShelving_afterDelete`
|
||||
AFTER DELETE ON `itemShelving`
|
||||
FOR EACH ROW
|
||||
|
@ -8138,7 +8057,7 @@ BEGIN
|
|||
SELECT IFNULL(b.workCenterFK, r.defaultWorkCenterFk)
|
||||
FROM vn.routeConfig r
|
||||
LEFT JOIN vn.business b ON b.workerFk = vUserFk
|
||||
AND NEW.created BETWEEN b.started AND IFNULL(b.ended, NEW.created));
|
||||
AND NEW.dated BETWEEN b.started AND IFNULL(b.ended, NEW.dated));
|
||||
|
||||
IF ISNULL(NEW.agencyModeFk) THEN
|
||||
SELECT r.agencyModeFk INTO vDefaultAgencyModeFk
|
||||
|
@ -8248,6 +8167,7 @@ BEGIN
|
|||
OR !(NEW.workerFk <=> OLD.workerFk)
|
||||
OR !(NEW.m3 <=> OLD.m3)
|
||||
OR !(NEW.agencyModeFk <=> OLD.agencyModeFk)
|
||||
OR !(NEW.dated <=> OLD.dated)
|
||||
OR !(NEW.vehicleFk <=> OLD.vehicleFk)THEN
|
||||
CALL route_calcCommission(NEW.id);
|
||||
END IF;
|
||||
|
@ -8400,7 +8320,7 @@ BEGIN
|
|||
JOIN vn.route r ON r.id = t.routeFk
|
||||
WHERE r.isOk = FALSE
|
||||
AND s.id = NEW.id
|
||||
AND r.created >= util.VN_CURDATE()
|
||||
AND r.dated >= util.VN_CURDATE()
|
||||
GROUP BY r.id;
|
||||
END IF;
|
||||
END */;;
|
||||
|
@ -8508,7 +8428,7 @@ BEGIN
|
|||
JOIN vn.route r ON r.id = t.routeFk
|
||||
WHERE r.isOk = FALSE
|
||||
AND s.id = NEW.id
|
||||
AND r.created >= util.VN_CURDATE()
|
||||
AND r.dated >= util.VN_CURDATE()
|
||||
GROUP BY r.id;
|
||||
END IF;
|
||||
|
||||
|
@ -8550,7 +8470,7 @@ BEGIN
|
|||
JOIN vn.route r ON r.id = t.routeFk
|
||||
WHERE r.isOk = FALSE
|
||||
AND s.id = OLD.id
|
||||
AND r.created >= util.VN_CURDATE()
|
||||
AND r.dated >= util.VN_CURDATE()
|
||||
GROUP BY r.id;
|
||||
END IF;
|
||||
END */;;
|
||||
|
@ -9657,7 +9577,7 @@ BEGIN
|
|||
FROM `route`
|
||||
WHERE NOT isOk
|
||||
AND id IN (OLD.routeFk, NEW.routeFk)
|
||||
AND created >= util.VN_CURDATE()
|
||||
AND dated >= util.VN_CURDATE()
|
||||
GROUP BY id;
|
||||
END IF;
|
||||
|
||||
|
@ -9680,7 +9600,7 @@ BEGIN
|
|||
JOIN vn.route r ON r.id = t.routeFk
|
||||
WHERE r.isOk = FALSE
|
||||
AND t.id = NEW.id
|
||||
AND r.created >= util.VN_CURDATE()
|
||||
AND r.dated >= util.VN_CURDATE()
|
||||
GROUP BY r.id;
|
||||
SET NEW.shipped = DATE_FORMAT(NEW.shipped, '2000-%m-%d %T');
|
||||
SET NEW.landed = DATE_FORMAT(NEW.landed, '2000-%m-%d %T');
|
||||
|
@ -9759,7 +9679,7 @@ BEGIN
|
|||
FROM vn.route r
|
||||
WHERE r.isOk = FALSE
|
||||
AND r.id = OLD.routeFk
|
||||
AND r.created >= util.VN_CURDATE()
|
||||
AND r.dated >= util.VN_CURDATE()
|
||||
GROUP BY r.id;
|
||||
|
||||
DELETE FROM sale WHERE ticketFk = OLD.id;
|
||||
|
@ -11579,4 +11499,4 @@ USE `vn2008`;
|
|||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2024-11-26 12:09:13
|
||||
-- Dump completed on 2025-01-07 6:51:57
|
||||
|
|
|
@ -426,50 +426,50 @@ INSERT INTO `vn`.`clientConfig`(`id`, `riskTolerance`, `maxCreditRows`, `maxPric
|
|||
(1, 200, 10, 0.25, 2, 4, 5, 300.00, 1, 1, 2);
|
||||
|
||||
|
||||
INSERT INTO `vn`.`address`(`id`, `nickname`, `street`, `city`, `postalCode`, `provinceFk`, `phone`, `mobile`, `isActive`, `clientFk`, `agencyModeFk`, `longitude`, `latitude`, `isEqualizated`, `isDefaultAddress`)
|
||||
INSERT INTO `vn`.`address`(`id`, `nickname`, `street`, `city`, `postalCode`, `provinceFk`, `phone`, `mobile`, `isActive`, `clientFk`, `agencyModeFk`, `longitude`, `latitude`, `isEqualizated`, `isDefaultAddress`, `customsAgentFk`)
|
||||
VALUES
|
||||
(1, 'Bruce Wayne', '1007 Mountain Drive, Gotham', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1101, 2, NULL, NULL, 0, 1),
|
||||
(2, 'Petter Parker', '20 Ingram Street', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1102, 2, NULL, NULL, 0, 1),
|
||||
(3, 'Clark Kent', '344 Clinton Street', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1103, 2, NULL, NULL, 0, 1),
|
||||
(4, 'Tony Stark', '10880 Malibu Point', 'Gotham', 46460, 1, 1111111111, 222222222, 1 , 1104, 2, NULL, NULL, 0, 1),
|
||||
(5, 'Max Eisenhardt', 'Unknown Whereabouts', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1105, 2, NULL, NULL, 0, 1),
|
||||
(6, 'DavidCharlesHaller', 'Evil hideout', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1106, 2, NULL, NULL, 0, 1),
|
||||
(7, 'Hank Pym', 'Anthill', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1107, 2, NULL, NULL, 0, 1),
|
||||
(8, 'Charles Xavier', '3800 Victory Pkwy, Cincinnati, OH 45207, USA', 'Gotham', 46460, 5, 1111111111, 222222222, 1, 1108, 2, NULL, NULL, 0, 1),
|
||||
(9, 'Bruce Banner', 'Somewhere in New York', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 1),
|
||||
(10, 'Jessica Jones', 'NYCC 2015 Poster', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1110, 2, NULL, NULL, 0, 1),
|
||||
(11, 'Missing', 'The space', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1111, 10, NULL, NULL, 0, 1),
|
||||
(12, 'Trash', 'New York city', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1112, 10, NULL, NULL, 0, 1),
|
||||
(101, 'Somewhere in Thailand', 'address 01', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(102, 'Somewhere in Poland', 'address 02', 'Gotham', 46460, 1, 3333333333, 444444444, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(103, 'Somewhere in Japan', 'address 03', 'Gotham', 46460, 1, 3333333333, 444444444, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(104, 'Somewhere in Spain', 'address 04', 'Gotham', 46460, 1, 3333333333, 444444444, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(105, 'Somewhere in Potugal', 'address 05', 'Gotham', 46460, 1, 5555555555, 666666666, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(106, 'Somewhere in UK', 'address 06', 'Gotham', 46460, 1, 5555555555, 666666666, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(107, 'Somewhere in Valencia', 'address 07', 'Gotham', 46460, 1, 5555555555, 666666666, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(108, 'Somewhere in Gotham', 'address 08', 'Gotham', 46460, 1, 5555555555, 666666666, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(109, 'Somewhere in London', 'address 09', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(110, 'Somewhere in Algemesi', 'address 10', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(111, 'Somewhere in Carlet', 'address 11', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(112, 'Somewhere in Campanar', 'address 12', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(113, 'Somewhere in Malilla', 'address 13', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(114, 'Somewhere in France', 'address 14', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(115, 'Somewhere in Birmingham', 'address 15', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(116, 'Somewhere in Scotland', 'address 16', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(117, 'Somewhere in nowhere', 'address 17', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(118, 'Somewhere over the rainbow', 'address 18', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(119, 'Somewhere in Alberic', 'address 19', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(120, 'Somewhere in Montortal', 'address 20', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(121, 'the bat cave', 'address 21', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1101, 2, NULL, NULL, 0, 0),
|
||||
(122, 'NY roofs', 'address 22', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1102, 2, NULL, NULL, 0, 0),
|
||||
(123, 'The phone box', 'address 23', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1103, 2, NULL, NULL, 0, 0),
|
||||
(124, 'Stark tower Gotham', 'address 24', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1104, 2, NULL, NULL, 0, 0),
|
||||
(125, 'The plastic cell', 'address 25', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1105, 2, NULL, NULL, 0, 0),
|
||||
(126, 'Many places', 'address 26', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1106, 2, NULL, NULL, 0, 0),
|
||||
(127, 'Your pocket', 'address 27', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1107, 2, NULL, NULL, 0, 0),
|
||||
(128, 'Cerebro', 'address 28', 'Gotham', 46460, 5, 1111111111, 222222222, 1, 1108, 2, NULL, NULL, 0, 0),
|
||||
(129, 'Luke Cages Bar', 'address 29', 'Gotham', 'EC170150', 1, 1111111111, 222222222, 1, 1110, 2, NULL, NULL, 0, 0),
|
||||
(130, 'Non valid address', 'address 30', 'Gotham', 46460, 1, 1111111111, 222222222, 0, 1101, 2, NULL, NULL, 0, 0);
|
||||
(1, 'Bruce Wayne', '1007 Mountain Drive, Gotham', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1101, 2, -74.1111111, 10.1111111, 0, 1, 1),
|
||||
(2, 'Petter Parker', '20 Ingram Street', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1102, 2, -74.2222222, 10.2222222, 0, 1, NULL),
|
||||
(3, 'Clark Kent', '344 Clinton Street', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1103, 2, -74.3333333, 10.3333333, 0, 1, NULL),
|
||||
(4, 'Tony Stark', '10880 Malibu Point', 'Gotham', 46460, 1, 1111111111, 222222222, 1 , 1104, 2, -74.4444444, 10.4444444, 0, 1, NULL),
|
||||
(5, 'Max Eisenhardt', 'Unknown Whereabouts', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1105, 2, NULL, NULL, 0, 1, NULL),
|
||||
(6, 'DavidCharlesHaller', 'Evil hideout', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1106, 2, NULL, NULL, 0, 1, NULL),
|
||||
(7, 'Hank Pym', 'Anthill', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1107, 2, NULL, NULL, 0, 1, NULL),
|
||||
(8, 'Charles Xavier', '3800 Victory Pkwy, Cincinnati, OH 45207, USA', 'Gotham', 46460, 5, 1111111111, 222222222, 1, 1108, 2, NULL, NULL, 0, 1, NULL),
|
||||
(9, 'Bruce Banner', 'Somewhere in New York', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 1, NULL),
|
||||
(10, 'Jessica Jones', 'NYCC 2015 Poster', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1110, 2, NULL, NULL, 0, 1, NULL),
|
||||
(11, 'Missing', 'The space', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1111, 10, NULL, NULL, 0, 1, NULL),
|
||||
(12, 'Trash', 'New York city', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1112, 10, NULL, NULL, 0, 1, NULL),
|
||||
(101, 'Somewhere in Thailand', 'address 01', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0, NULL),
|
||||
(102, 'Somewhere in Poland', 'address 02', 'Gotham', 46460, 1, 3333333333, 444444444, 1, 1109, 2, NULL, NULL, 0, 0, NULL),
|
||||
(103, 'Somewhere in Japan', 'address 03', 'Gotham', 46460, 1, 3333333333, 444444444, 1, 1109, 2, NULL, NULL, 0, 0, NULL),
|
||||
(104, 'Somewhere in Spain', 'address 04', 'Gotham', 46460, 1, 3333333333, 444444444, 1, 1109, 2, NULL, NULL, 0, 0, NULL),
|
||||
(105, 'Somewhere in Potugal', 'address 05', 'Gotham', 46460, 1, 5555555555, 666666666, 1, 1109, 2, NULL, NULL, 0, 0, NULL),
|
||||
(106, 'Somewhere in UK', 'address 06', 'Gotham', 46460, 1, 5555555555, 666666666, 1, 1109, 2, NULL, NULL, 0, 0, NULL),
|
||||
(107, 'Somewhere in Valencia', 'address 07', 'Gotham', 46460, 1, 5555555555, 666666666, 1, 1109, 2, NULL, NULL, 0, 0, NULL),
|
||||
(108, 'Somewhere in Gotham', 'address 08', 'Gotham', 46460, 1, 5555555555, 666666666, 1, 1109, 2, NULL, NULL, 0, 0, NULL),
|
||||
(109, 'Somewhere in London', 'address 09', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0, NULL),
|
||||
(110, 'Somewhere in Algemesi', 'address 10', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0, NULL),
|
||||
(111, 'Somewhere in Carlet', 'address 11', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0, NULL),
|
||||
(112, 'Somewhere in Campanar', 'address 12', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0, NULL),
|
||||
(113, 'Somewhere in Malilla', 'address 13', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0, NULL),
|
||||
(114, 'Somewhere in France', 'address 14', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0, NULL),
|
||||
(115, 'Somewhere in Birmingham', 'address 15', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0, NULL),
|
||||
(116, 'Somewhere in Scotland', 'address 16', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0, NULL),
|
||||
(117, 'Somewhere in nowhere', 'address 17', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0, NULL),
|
||||
(118, 'Somewhere over the rainbow', 'address 18', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0, NULL),
|
||||
(119, 'Somewhere in Alberic', 'address 19', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0, NULL),
|
||||
(120, 'Somewhere in Montortal', 'address 20', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0, NULL),
|
||||
(121, 'the bat cave', 'address 21', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1101, 2, NULL, NULL, 0, 0, NULL),
|
||||
(122, 'NY roofs', 'address 22', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1102, 2, NULL, NULL, 0, 0, NULL),
|
||||
(123, 'The phone box', 'address 23', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1103, 2, -74.555555, 10.555555, 0, 0, NULL),
|
||||
(124, 'Stark tower Gotham', 'address 24', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1104, 2, NULL, NULL, 0, 0, NULL),
|
||||
(125, 'The plastic cell', 'address 25', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1105, 2, NULL, NULL, 0, 0, NULL),
|
||||
(126, 'Many places', 'address 26', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1106, 2, NULL, NULL, 0, 0, NULL),
|
||||
(127, 'Your pocket', 'address 27', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1107, 2, NULL, NULL, 0, 0, NULL),
|
||||
(128, 'Cerebro', 'address 28', 'Gotham', 46460, 5, 1111111111, 222222222, 1, 1108, 2, NULL, NULL, 0, 0, NULL),
|
||||
(129, 'Luke Cages Bar', 'address 29', 'Gotham', 'EC170150', 1, 1111111111, 222222222, 1, 1110, 2, NULL, NULL, 0, 0, NULL),
|
||||
(130, 'Non valid address', 'address 30', 'Gotham', 46460, 1, 1111111111, 222222222, 0, 1101, 2, NULL, NULL, 0, 0, NULL);
|
||||
|
||||
INSERT INTO `vn`.`address`( `nickname`, `street`, `city`, `postalCode`, `provinceFk`, `isActive`, `clientFk`, `agencyModeFk`, `isDefaultAddress`)
|
||||
SELECT name, CONCAT(name, 'Street'), 'GOTHAM', 46460, 1, 1, id, 2, 1
|
||||
|
@ -648,13 +648,13 @@ INSERT INTO `vn`.`invoiceOutSerial`
|
|||
('X', 'Exportación global', 0, 'WORLD', 0, 'global'),
|
||||
('N', 'Múltiple Intracomunitaria', 0, 'CEE', 1, 'multiple');
|
||||
|
||||
INSERT INTO `vn`.`invoiceOut`(`id`, `serial`, `amount`, `issued`,`clientFk`, `created`, `companyFk`, `dued`, `booked`, `bankFk`, `hasPdf`)
|
||||
INSERT INTO `vn`.`invoiceOut`(`id`, `serial`, `amount`, `issued`,`clientFk`, `created`, `companyFk`, `dued`, `booked`, `bankFk`, `hasPdf`, `customsAgentFk`, `incotermsFk`)
|
||||
VALUES
|
||||
(1, 'T', 1026.24, util.VN_CURDATE(), 1101, util.VN_CURDATE(), 442, util.VN_CURDATE(), util.VN_CURDATE(), 1, 0),
|
||||
(2, 'T', 121.36, util.VN_CURDATE(), 1102, util.VN_CURDATE(), 442, util.VN_CURDATE(), util.VN_CURDATE(), 1, 0),
|
||||
(3, 'T', 8.88, util.VN_CURDATE(), 1103, util.VN_CURDATE(), 442, util.VN_CURDATE(), util.VN_CURDATE(), 1, 0),
|
||||
(4, 'T', 8.88, util.VN_CURDATE(), 1104, util.VN_CURDATE(), 442, util.VN_CURDATE(), util.VN_CURDATE(), 1, 0),
|
||||
(5, 'A', 8.88, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1103, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 442, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 0);
|
||||
(1, 'E', 1026.24, util.VN_CURDATE(), 1101, util.VN_CURDATE(), 442, util.VN_CURDATE(), util.VN_CURDATE(), 1, 0, 1, 'FAS'),
|
||||
(2, 'T', 121.36, util.VN_CURDATE(), 1102, util.VN_CURDATE(), 442, util.VN_CURDATE(), util.VN_CURDATE(), 1, 0, NULL, NULL),
|
||||
(3, 'T', 8.88, util.VN_CURDATE(), 1103, util.VN_CURDATE(), 442, util.VN_CURDATE(), util.VN_CURDATE(), 1, 0, NULL, NULL),
|
||||
(4, 'T', 8.88, util.VN_CURDATE(), 1104, util.VN_CURDATE(), 442, util.VN_CURDATE(), util.VN_CURDATE(), 1, 0, NULL, NULL),
|
||||
(5, 'A', 8.88, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1103, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 442, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 0, NULL, NULL);
|
||||
|
||||
UPDATE `vn`.`invoiceOut` SET ref = 'T1111111' WHERE id = 1;
|
||||
UPDATE `vn`.`invoiceOut` SET ref = 'T2222222' WHERE id = 2;
|
||||
|
@ -745,15 +745,15 @@ INSERT INTO `vn`.`zoneClosure` (`zoneFk`, `dated`, `hour`)
|
|||
|
||||
INSERT INTO `vn`.`zoneConfig` (`id`, `scope`) VALUES (1, '1');
|
||||
|
||||
INSERT INTO `vn`.`route`(`id`, `time`, `workerFk`, `created`, `vehicleFk`, `agencyModeFk`, `description`, `m3`, `cost`, `started`, `finished`, `zoneFk`)
|
||||
INSERT INTO `vn`.`route`(`id`, `time`, `workerFk`, `created`, `vehicleFk`, `agencyModeFk`, `description`, `m3`, `cost`, `started`, `finished`, `zoneFk`, `dated`)
|
||||
VALUES
|
||||
(1, '1899-12-30 12:15:00', 56, util.VN_CURDATE(), 1, 1, 'first route', 1.8, 10, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1),
|
||||
(2, '1899-12-30 13:20:00', 56, util.VN_CURDATE(), 1, 2, 'second route', 0.2, 20, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 9),
|
||||
(3, '1899-12-30 14:30:00', 56, util.VN_CURDATE(), 2, 3, 'third route', 0.5, 30, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 10),
|
||||
(4, '1899-12-30 15:45:00', 56, util.VN_CURDATE(), 3, 4, 'fourth route', 0, 40, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 12),
|
||||
(5, '1899-12-30 16:00:00', 56, util.VN_CURDATE(), 4, 5, 'fifth route', 0.1, 50, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 13),
|
||||
(6, NULL, 57, util.VN_CURDATE(), 5, 7, 'sixth route', 1.7, 60, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 3),
|
||||
(7, NULL, 57, util.VN_CURDATE(), 6, 8, 'seventh route', 0, 70, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 5);
|
||||
(1, '1899-12-30 12:15:00', 56, util.VN_CURDATE(), 1, 1, 'first route', 1.8, 10, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1, util.VN_CURDATE()),
|
||||
(2, '1899-12-30 13:20:00', 56, util.VN_CURDATE(), 1, 2, 'second route', 0.2, 20, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 9, util.VN_CURDATE()),
|
||||
(3, '1899-12-30 14:30:00', 56, util.VN_CURDATE(), 2, 3, 'third route', 0.5, 30, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 10, util.VN_CURDATE()),
|
||||
(4, '1899-12-30 15:45:00', 56, util.VN_CURDATE(), 3, 4, 'fourth route', 0, 40, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 12, util.VN_CURDATE()),
|
||||
(5, '1899-12-30 16:00:00', 56, util.VN_CURDATE(), 4, 5, 'fifth route', 0.1, 50, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 13, util.VN_CURDATE()),
|
||||
(6, NULL, 57, util.VN_CURDATE(), 5, 7, 'sixth route', 1.7, 60, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 3, util.VN_CURDATE()),
|
||||
(7, NULL, 57, util.VN_CURDATE(), 6, 8, 'seventh route', 0, 70, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 5, util.VN_CURDATE());
|
||||
|
||||
INSERT INTO `vn`.`ticket`(`id`, `priority`, `agencyModeFk`,`warehouseFk`,`routeFk`, `shipped`, `landed`, `clientFk`,`nickname`, `addressFk`, `refFk`, `isDeleted`, `zoneFk`, `zonePrice`, `zoneBonus`, `created`, `weight`, `cmrFk`, `problem`, `risk`)
|
||||
VALUES
|
||||
|
@ -974,26 +974,30 @@ INSERT INTO `vn`.`itemFamily`(`code`, `description`)
|
|||
('SER', 'Services'),
|
||||
('VT', 'Sales');
|
||||
|
||||
INSERT INTO `vn`.`item`(`id`, `typeFk`, `stems`, `originFk`, `description`, `producerFk`, `intrastatFk`, `expenseFk`,
|
||||
`comment`, `relevancy`, `image`, `subName`, `minPrice`, `family`, `isFloramondo`, `genericFk`, `itemPackingTypeFk`, `hasMinPrice`, `weightByPiece`)
|
||||
VALUES
|
||||
(1, 2, 1, 1, NULL, 1, 06021010, 2000000000, NULL, 0, '1', NULL, 0, 'EMB', 0, NULL, 'V', 0, 3),
|
||||
(2, 2, 1, 2, NULL, 1, 06021010, 2000000000, NULL, 0, '2', NULL, 0, 'VT', 0, NULL, 'H', 0, 2),
|
||||
(3, 1, 1, 3, NULL, 1, 05080000, 4751000000, NULL, 0, '3', NULL, 0, 'VT', 0, NULL, NULL, 0, 5),
|
||||
(4, 1, 1, 1, 'Increases block', 1, 05080000, 4751000000, NULL, 0, '4', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL),
|
||||
(5, 3, 1, 2, NULL, 2, 06021010, 4751000000, NULL, 0, '5', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL),
|
||||
(6, 5, 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '6', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL),
|
||||
(7, 5, 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '7', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL),
|
||||
(8, 2, 1, 1, NULL, 1, 06021010, 2000000000, NULL, 0, '8', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL),
|
||||
(9, 2, 1, 2, NULL, 1, 06021010, 2000000000, NULL, 0, '9', NULL, 0, 'VT', 1, NULL, NULL, 0, NULL),
|
||||
(10, 1, 1, 3, NULL, 1, 05080000, 4751000000, NULL, 0, '10', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL),
|
||||
(11, 1, 1, 1, NULL, 1, 05080000, 4751000000, NULL, 0, '11', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL),
|
||||
(12, 3, 1, 2, NULL, 2, 06021010, 4751000000, NULL, 0, '12', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL),
|
||||
(13, 5, 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '13', NULL, 1, 'VT', 1, NULL, NULL, 1, NULL),
|
||||
(14, 5, 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 'VT', 1, NULL, NULL, 0, NULL),
|
||||
(15, 4, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 'EMB', 0, NULL, NULL, 0, NULL),
|
||||
(16, 6, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 'EMB', 0, NULL, NULL, 0, NULL),
|
||||
(71, 6, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL);
|
||||
INSERT INTO `vn`.`item`(
|
||||
`id`, `typeFk`, `stems`, `originFk`, `description`, `producerFk`, `intrastatFk`, `expenseFk`,
|
||||
`comment`, `relevancy`, `image`, `subName`, `minPrice`, `family`, `isFloramondo`, `genericFk`,
|
||||
`itemPackingTypeFk`, `hasMinPrice`, `weightByPiece`, `isCustomInspectionRequired`
|
||||
)
|
||||
VALUES
|
||||
(1, 2, 1, 1, NULL, 1, 06021010, 2000000000, NULL, 0, '1', NULL, 0, 'EMB', 0, NULL, 'V', 0, 3, 1),
|
||||
(2, 2, 1, 2, NULL, 1, 06021010, 2000000000, NULL, 0, '2', NULL, 0, 'VT', 0, NULL, 'H', 0, 2, 1),
|
||||
(3, 1, 1, 3, NULL, 1, 05080000, 4751000000, NULL, 0, '3', NULL, 0, 'VT', 0, NULL, NULL, 0, 5, 0),
|
||||
(4, 1, 1, 1, 'Increases block', 1, 05080000, 4751000000, NULL, 0, '4', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, 0),
|
||||
(5, 3, 1, 2, NULL, 2, 06021010, 4751000000, NULL, 0, '5', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, 0),
|
||||
(6, 5, 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '6', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, 0),
|
||||
(7, 5, 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '7', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, 0),
|
||||
(8, 2, 1, 1, NULL, 1, 06021010, 2000000000, NULL, 0, '8', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, 0),
|
||||
(9, 2, 1, 2, NULL, 1, 06021010, 2000000000, NULL, 0, '9', NULL, 0, 'VT', 1, NULL, NULL, 0, NULL, 0),
|
||||
(10, 1, 1, 3, NULL, 1, 05080000, 4751000000, NULL, 0, '10', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, 0),
|
||||
(11, 1, 1, 1, NULL, 1, 05080000, 4751000000, NULL, 0, '11', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, 0),
|
||||
(12, 3, 1, 2, NULL, 2, 06021010, 4751000000, NULL, 0, '12', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, 0),
|
||||
(13, 5, 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '13', NULL, 1, 'VT', 1, NULL, NULL, 1, NULL, 0),
|
||||
(14, 5, 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 'VT', 1, NULL, NULL, 0, NULL, 0),
|
||||
(15, 4, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 'EMB', 0, NULL, NULL, 0, NULL, 0),
|
||||
(16, 6, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 'EMB', 0, NULL, NULL, 0, NULL, 0),
|
||||
(71, 6, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, 0);
|
||||
|
||||
|
||||
-- Update the taxClass after insert of the items
|
||||
UPDATE `vn`.`itemTaxCountry` SET `taxClassFk` = 2
|
||||
|
@ -1516,21 +1520,24 @@ INSERT INTO `vn`.`travel`(`id`,`shipped`, `landed`, `warehouseInFk`, `warehouseO
|
|||
(8, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 5, 1, 1, 50.00, 500, 'eight travel', 1, 2, 10, FALSE, NULL),
|
||||
(10, DATE_ADD(util.VN_CURDATE(), INTERVAL +5 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL +5 DAY), 5, 1, 1, 50.00, 500, 'nineth travel', 1, 2, 10, TRUE, 2),
|
||||
(11, util.VN_CURDATE() - INTERVAL 1 DAY , util.VN_CURDATE(), 6, 3, 0, 50.00, 500, 'eleventh travel', 1, 2, 4, FALSE, NULL),
|
||||
(12, util.VN_CURDATE() , util.VN_CURDATE() + INTERVAL 1 DAY, 6, 3, 0, 50.00, 500, 'eleventh travel', 1, 2, 4, FALSE, NULL);
|
||||
(12, util.VN_CURDATE() , util.VN_CURDATE() + INTERVAL 1 DAY, 6, 3, 0, 50.00, 500, 'eleventh travel', 1, 2, 4, FALSE, NULL),
|
||||
(13, util.VN_CURDATE() - INTERVAL 1 MONTH - INTERVAL 1 DAY, util.VN_CURDATE() - INTERVAL 1 MONTH, 6, 3, 0, 50.00, 500, 'eleventh travel', 1, 2, 4, FALSE, NULL);
|
||||
|
||||
INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `isConfirmed`, `companyFk`, `invoiceNumber`, `reference`, `isExcludedFromAvailable`, `evaNotes`, `typeFk`)
|
||||
VALUES
|
||||
(1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 1, 442, 'IN2001', 'Movement 1', 0, '', 'packaging'),
|
||||
(2, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 0, 442, 'IN2002', 'Movement 2', 0, 'observation two', 'product'),
|
||||
(1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 1, 442, 'IN2001', 'Movement 1', 0, '', 'packaging'),
|
||||
(2, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 0, 442, 'IN2002', 'Movement 2', 0, 'observation two' , 'product'),
|
||||
(3, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 3, 0, 442, 'IN2003', 'Movement 3', 0, 'observation three', 'product'),
|
||||
(4, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 0, 69, 'IN2004', 'Movement 4', 0, 'observation four', 'product'),
|
||||
(5, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 5, 0, 442, 'IN2005', 'Movement 5', 0, 'observation five', 'product'),
|
||||
(6, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 6, 0, 442, 'IN2006', 'Movement 6', 0, 'observation six', 'product'),
|
||||
(4, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 0, 69, 'IN2004', 'Movement 4', 0, 'observation four' , 'product'),
|
||||
(5, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 5, 0, 442, 'IN2005', 'Movement 5', 0, 'observation five' , 'product'),
|
||||
(6, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 6, 0, 442, 'IN2006', 'Movement 6', 0, 'observation six' , 'product'),
|
||||
(7, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 7, 0, 442, 'IN2007', 'Movement 7', 0, 'observation seven', 'product'),
|
||||
(8, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 7, 0, 442, 'IN2008', 'Movement 8', 1, '', 'product'),
|
||||
(9, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL +2 DAY), 10, 0, 442, 'IN2009', 'Movement 9', 1, '', 'product'),
|
||||
(10, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL +2 DAY), 10, 0, 442, 'IN2009', 'Movement 10', 1, '', 'product'),
|
||||
(99, 69, util.VN_CURDATE() - INTERVAL 1 MONTH, 11, 0, 442, 'IN2009', 'Movement 99', 0, '', 'product');
|
||||
(8, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 7, 0, 442, 'IN2008', 'Movement 8', 1, '', 'product'),
|
||||
(9, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL +2 DAY), 10, 0, 442, 'IN2009', 'Movement 9', 1, '', 'product'),
|
||||
(10, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL +2 DAY), 10, 0, 442, 'IN2010', 'Movement 10',1, '', 'product'),
|
||||
(11, 4, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), 1, 1, 442, 'IN2011', 'Movement 11',0, '', 'product'),
|
||||
(12, 4, util.VN_CURDATE() - INTERVAL 1 MONTH, 13, 1, 442, 'IN2012', 'Movement 12',0, '', 'product'),
|
||||
(99, 69, util.VN_CURDATE() - INTERVAL 1 MONTH, 11, 0, 442, 'IN2009', 'Movement 99',0, '', 'product');
|
||||
|
||||
INSERT INTO `vn`.`entryConfig` (`defaultEntry`, `inventorySupplierFk`, `defaultSupplierFk`)
|
||||
VALUES (2, 4, 1);
|
||||
|
@ -1570,7 +1577,9 @@ INSERT INTO `bs`.`waste`(`buyerFk`, `year`, `week`, `itemFk`, `itemTypeFk`, `sal
|
|||
(13, 7, 1, 50, 0, 3, 1, 2.000, 2.000, 0.000, 1, 1, 'packing', NULL, 0.00, 99.6, 99.4, 0, 1, 0, 4, util.VN_CURDATE()),
|
||||
(14, 7, 2, 5, 0, 3, 1, 2.000, 2.000, 0.000, 10, 10, 'grouping', NULL, 0.00, 7.30, 7.00, 0, 1, 0, 4, util.VN_CURDATE()),
|
||||
(15, 7, 4, 1.25, 0, 3, 1, 2.000, 2.000, 0.000, 10, 10, 'grouping', NULL, 0.00, 1.75, 1.67, 0, 1, 0, 4, util.VN_CURDATE()),
|
||||
(16, 99,1,50.0000, 5000, 4, 1, 1.500, 1.500, 0.000, 1, 1, 'packing', NULL, 0.00, 99.60, 99.40, 0, 1, 0, 1.00, '2024-07-30 08:13:51.000');
|
||||
(16, 99,1,50.0000, 5000, 4, 1, 1.500, 1.500, 0.000, 1, 1, 'packing', NULL, 0.00, 99.60, 99.40, 0, 1, 0, 1.00, '2024-07-30 08:13:51.000'),
|
||||
(17, 11, 1, 50, 5000, 4, 1, 1.500, 1.500, 0.000, 1, 1, 'packing', NULL, 0.00, 99.6, 99.4, 0, 1, 0, 1, util.VN_CURDATE() - INTERVAL 2 MONTH),
|
||||
(18, 12, 1, 50, 5000, 4, 1, 1.500, 1.500, 0.000, 1, 1, 'grouping', NULL, 0.00, 99.6, 99.4, 0, 1, 0, 1, util.VN_CURDATE() - INTERVAL 2 MONTH);
|
||||
|
||||
INSERT INTO `hedera`.`order`(`id`, `date_send`, `customer_id`, `delivery_method_id`, `agency_id`, `address_id`, `company_id`, `note`, `source_app`, `confirmed`,`total`, `date_make`, `first_row_stamp`, `confirm_date`)
|
||||
VALUES
|
||||
|
@ -1920,7 +1929,7 @@ INSERT INTO `vn`.`claimDestination`(`id`, `description`, `addressFk`)
|
|||
|
||||
INSERT INTO `vn`.`claimDevelopment`(`id`, `claimFk`, `claimResponsibleFk`, `workerFk`, `claimReasonFk`, `claimResultFk`, `claimRedeliveryFk`, `claimDestinationFk`)
|
||||
VALUES
|
||||
(1, 1, 1, 21, 1, 1, 2, 5),
|
||||
(1, 1, 1, 21, 7, 1, 2, 5),
|
||||
(2, 1, 2, 21, 7, 2, 2, 5),
|
||||
(3, 2, 7, 21, 9, 3, 2, 5),
|
||||
(4, 3, 7, 21, 15, 8, 2, 5),
|
||||
|
@ -2040,7 +2049,7 @@ INSERT INTO `vn`.`ticketService`(`id`, `description`, `quantity`, `price`, `taxC
|
|||
INSERT INTO `pbx`.`config` (id,defaultPrefix)
|
||||
VALUES (1,'0034');
|
||||
|
||||
INSERT INTO `pbx`.`prefix` (country, prefix)
|
||||
INSERT IGNORE INTO `pbx`.`prefix` (country, prefix)
|
||||
VALUES
|
||||
('es', '0034'),
|
||||
('fr', '0033'),
|
||||
|
@ -3772,7 +3781,8 @@ VALUES
|
|||
(999992, 18, 50, '2023-09-21', NULL, 1, NULL, 103, NULL),
|
||||
(1000000, 18, 25, '2023-09-21', 25, 500, NULL, 103, NULL),
|
||||
(999996, 19, 5, '2023-09-27', 1, 5, NULL, 103, NULL),
|
||||
(999997, 21, 10, '2023-09-27', 5, 100, NULL, 103, NULL);
|
||||
(999997, 21, 10, '2023-09-27', 5, 100, NULL, 103, NULL),
|
||||
(1000000, 16, 25, '2023-08-21',25, 500, NULL, NULL, NULL);
|
||||
|
||||
-- Previous for Bolas de madera
|
||||
INSERT IGNORE INTO vn.sectorCollection
|
||||
|
@ -3962,7 +3972,7 @@ VALUES(1, '');
|
|||
|
||||
INSERT INTO dipole.expedition_PrintOut (expeditionFk, ticketFk, addressFk, street, postalCode, city, shopName, isPrinted, created, printerFk, routeFk, parkingCode,
|
||||
truckName, clientFk, phone, province, agency, m3, workerCode, itemFk, quantity, longName, shelvingFk, comments)
|
||||
VALUES(1, 1, 0, ' ', ' ', ' ', ' ', 0, '2001-01-01 00:00:00', 1, 0, ' ', ' ', 0, NULL, '', NULL, 0.000, NULL, 10, NULL, NULL, 'NCC', NULL);
|
||||
VALUES(1, 1, 0, ' ', ' ', ' ', ' ', 0, '2001-01-01 00:00:00', 1, 0, ' ', ' ', 0, NULL, '', NULL, 0.000, NULL, 10, NULL, 'Ranged Reinforced weapon sniper rifle 700mm' , 'NCC', NULL);
|
||||
|
||||
INSERT INTO vn.accountDetail
|
||||
(id, value, accountDetailTypeFk, supplierAccountFk)
|
||||
|
@ -4026,10 +4036,23 @@ INSERT INTO srt.buffer (id, x, y, `size`, `length`, stateFk, typeFk, isActive, c
|
|||
|
||||
INSERT IGNORE INTO vn.saySimpleCountry (countryFk, channel)
|
||||
VALUES (19, '1169'),
|
||||
(8, '1183');
|
||||
(8, '1183'),
|
||||
(1, '1320');
|
||||
|
||||
INSERT IGNORE INTO vn.saySimpleConfig (url, defaultChannel)
|
||||
VALUES ('saysimle-url-mock', 1320);
|
||||
VALUES ('saysimle-url-mock', '1819');
|
||||
|
||||
INSERT INTO vn.workerIrpf (workerFk,spouseNif, geographicMobilityDate)
|
||||
VALUES (1106,'26493101E','2019-09-20');
|
||||
|
||||
INSERT INTO vn.referenceRate (currencyFk, dated, value)
|
||||
VALUES (2, '2000-12-01', 1.0495),
|
||||
(2, '2001-01-01', 1.0531),
|
||||
(2, '2001-02-01', 7.6347);
|
||||
|
||||
INSERT IGNORE INTO vn.osrmConfig (id,url,tolerance)
|
||||
VALUES (1,'https://router.project-osrm.org', 0.002);
|
||||
|
||||
INSERT IGNORE INTO vn.inventoryConfig
|
||||
SET id = 1,
|
||||
supplierFk = 4;
|
||||
|
|
|
@ -19,14 +19,14 @@ BEGIN
|
|||
bultos)
|
||||
SELECT r.id,
|
||||
r.agencyModeFk,
|
||||
r.created,
|
||||
r.dated,
|
||||
SUM(sv.volume / ebv.m3)
|
||||
FROM vn.route r
|
||||
JOIN vn.ticket t ON t.routeFk = r.id
|
||||
LEFT JOIN vn.`zone` z ON z.id = t.zoneFk
|
||||
JOIN vn.saleVolume sv ON sv.ticketFk = t.id
|
||||
JOIN vn.expeditionBoxVol ebv ON ebv.code = 'transportBox'
|
||||
WHERE r.created BETWEEN vDatedFrom AND vDatedTo
|
||||
WHERE r.dated BETWEEN vDatedFrom AND vDatedTo
|
||||
AND z.isVolumetric
|
||||
GROUP BY r.id;
|
||||
|
||||
|
@ -38,12 +38,12 @@ BEGIN
|
|||
Bultos)
|
||||
SELECT r.id,
|
||||
r.agencyModeFk,
|
||||
r.created,
|
||||
r.dated,
|
||||
SUM(t.packages)
|
||||
FROM vn.route r
|
||||
JOIN vn.ticket t ON t.routeFk = r.id
|
||||
LEFT JOIN vn.`zone` z ON z.id = t.zoneFk
|
||||
WHERE r.created BETWEEN vDatedFrom AND vDatedTo
|
||||
WHERE r.dated BETWEEN vDatedFrom AND vDatedTo
|
||||
AND NOT z.isVolumetric
|
||||
GROUP BY r.id
|
||||
ON DUPLICATE KEY UPDATE Bultos = Bultos + VALUES(Bultos);
|
||||
|
@ -60,7 +60,7 @@ BEGIN
|
|||
JOIN vn.component c ON c.id = sc.componentFk
|
||||
JOIN vn.componentType ct ON ct.id = c.typeFk
|
||||
WHERE ct.code = 'freight'
|
||||
AND r.created BETWEEN vDatedFrom AND vDatedTo
|
||||
AND r.dated BETWEEN vDatedFrom AND vDatedTo
|
||||
GROUP BY r.id
|
||||
) sub ON sub.routeFk = r.Id_Ruta
|
||||
SET r.practico = IFNULL(sub.totalPractice / r.Bultos, 0);
|
||||
|
@ -77,7 +77,7 @@ BEGIN
|
|||
JOIN vn.address ad ON ad.id = t.addressFk
|
||||
JOIN vn.client c ON c.id = ad.clientFk
|
||||
LEFT JOIN vn.`zone` z ON z.id = t.zoneFk
|
||||
WHERE r.created BETWEEN vDatedFrom AND vDatedTo
|
||||
WHERE r.dated BETWEEN vDatedFrom AND vDatedTo
|
||||
AND NOT z.isVolumetric
|
||||
GROUP BY t.routeFk
|
||||
) sub ON r.Id_Ruta = sub.routeFk
|
||||
|
@ -93,7 +93,7 @@ BEGIN
|
|||
JOIN vn.saleVolume sf ON sf.ticketFk = t.id
|
||||
JOIN vn.client c ON c.id = t.clientFk
|
||||
JOIN vn.`zone` z ON z.id = t.zoneFk
|
||||
WHERE r.created BETWEEN vDatedFrom AND vDatedTo
|
||||
WHERE r.dated BETWEEN vDatedFrom AND vDatedTo
|
||||
AND z.isVolumetric
|
||||
GROUP BY t.routeFk
|
||||
) sub ON r.Id_Ruta = sub.routeFk
|
||||
|
@ -108,7 +108,7 @@ BEGIN
|
|||
JOIN vn.route r ON r.id = t.routeFk
|
||||
JOIN vn.greuge g ON g.ticketFk = t.id
|
||||
JOIN vn.greugeType gt ON gt.id = g.greugeTypeFk
|
||||
WHERE r.created BETWEEN vDatedFrom AND vDatedTo
|
||||
WHERE r.dated BETWEEN vDatedFrom AND vDatedTo
|
||||
AND gt.code = 'freightDifference'
|
||||
GROUP BY t.routeFk
|
||||
) sub ON r.Id_Ruta = sub.routeFk
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
CREATE OR REPLACE DEFINER=`root`@`localhost`
|
||||
SQL SECURITY DEFINER
|
||||
VIEW `bi`.`rotacion`
|
||||
AS SELECT `ic`.`itemFk` AS `Id_Article`,
|
||||
`ic`.`warehouseFk` AS `warehouse_id`,
|
||||
`ic`.`quantity` AS `total`,
|
||||
`ic`.`rotation` AS `rotacion`,
|
||||
`ic`.`cm3` AS `cm3`,
|
||||
`ic`.`storage` AS `almacenaje`,
|
||||
`ic`.`handling` AS `manipulacion`,
|
||||
`ic`.`extraCharge` AS `auxiliar`,
|
||||
`ic`.`wasted` AS `mermas`,
|
||||
`ic`.`cm3delivery` AS `cm3reparto`,
|
||||
`ic`.`grams` AS `grams`
|
||||
FROM `vn`.`itemCost` `ic`
|
|
@ -10,19 +10,27 @@ BEGIN
|
|||
* @param vDateFrom Fecha desde
|
||||
* @param vDateTo Fecha hasta
|
||||
*/
|
||||
IF vDateFrom IS NULL THEN
|
||||
SET vDateFrom = util.VN_CURDATE() - INTERVAL WEEKDAY(util.VN_CURDATE()) DAY;
|
||||
DECLARE vDaysInYear INT;
|
||||
SET vDaysInYear = DATEDIFF(util.lastDayOfYear(CURDATE()), util.firstDayOfYear(CURDATE()));
|
||||
|
||||
SET vDateFrom = COALESCE(vDateFrom, util.VN_CURDATE());
|
||||
SET vDateTo = COALESCE(vDateTo, util.VN_CURDATE());
|
||||
|
||||
IF DATEDIFF(vDateTo, vDateFrom) > vDaysInYear THEN
|
||||
CALL util.throw('The period cannot be longer than one year');
|
||||
END IF;
|
||||
|
||||
IF vDateTo IS NULL THEN
|
||||
SET vDateTo = vDateFrom + INTERVAL 6 DAY;
|
||||
END IF;
|
||||
-- Obtiene el primer día de la semana de esa fecha
|
||||
SET vDateFrom = DATE_SUB(vDateFrom, INTERVAL ((WEEKDAY(vDateFrom) + 1) % 7) DAY);
|
||||
|
||||
-- Obtiene el último día de la semana de esa fecha
|
||||
SET vDateTo = DATE_ADD(vDateTo, INTERVAL (6 - ((WEEKDAY(vDateTo) + 1) % 7)) DAY);
|
||||
|
||||
CALL cache.last_buy_refresh(FALSE);
|
||||
|
||||
REPLACE bs.waste
|
||||
SELECT YEAR(t.shipped),
|
||||
WEEK(t.shipped, 4),
|
||||
SELECT YEARWEEK(t.shipped, 6) DIV 100,
|
||||
WEEK(t.shipped, 6),
|
||||
it.workerFk,
|
||||
it.id,
|
||||
s.itemFk,
|
||||
|
@ -68,8 +76,8 @@ BEGIN
|
|||
JOIN cache.last_buy lb ON lb.item_id = i.id
|
||||
AND lb.warehouse_id = w.id
|
||||
JOIN vn.buy b ON b.id = lb.buy_id
|
||||
WHERE t.shipped BETWEEN vDateFrom AND vDateTo
|
||||
WHERE t.shipped BETWEEN vDateFrom AND util.dayEnd(vDateTo)
|
||||
AND w.isManaged
|
||||
GROUP BY YEAR(t.shipped), WEEK(t.shipped, 4), i.id;
|
||||
GROUP BY YEARWEEK(t.shipped, 6) DIV 100, WEEK(t.shipped, 6), i.id;
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
|
|
@ -107,7 +107,7 @@ BEGIN
|
|||
) INTO vHas0Amount;
|
||||
|
||||
IF vHas0Amount THEN
|
||||
CALL util.throw('Hay líneas vacías. Por favor, elimínelas');
|
||||
CALL util.throw('orderLinesWithZero');
|
||||
END IF;
|
||||
|
||||
START TRANSACTION;
|
||||
|
|
|
@ -4,10 +4,10 @@ BEGIN
|
|||
/**
|
||||
* Traslada la info de contabilidad relacionada con las facturas recibidas
|
||||
*
|
||||
* @vInvoiceInFk Factura recibida
|
||||
* @vXDiarioFk Id tabla XDiario
|
||||
* @param vInvoiceInFk Factura recibida
|
||||
* @param vXDiarioFk Id tabla XDiario
|
||||
*/
|
||||
DECLARE vInvoiceInOriginalFk INT;
|
||||
DECLARE vInvoiceInOriginalFk INT;
|
||||
DECLARE vDone BOOL DEFAULT FALSE;
|
||||
DECLARE vBase DOUBLE;
|
||||
DECLARE vVat DOUBLE;
|
||||
|
@ -25,7 +25,7 @@ BEGIN
|
|||
DECLARE vIsInformativeExportation BOOL DEFAULT FALSE;
|
||||
|
||||
DECLARE vCursor CURSOR FOR
|
||||
SELECT it.taxableBase,
|
||||
SELECT SUM(it.taxableBase),
|
||||
CAST(SUM((( it.taxableBase / 100) * t.PorcentajeIva)) AS DECIMAL (10,2)),
|
||||
t.PorcentajeIva,
|
||||
it.transactionTypeSageFk,
|
||||
|
@ -204,32 +204,31 @@ BEGIN
|
|||
FROM vn.invoiceInCorrection
|
||||
WHERE correctingFk = vInvoiceInFk;
|
||||
|
||||
IF vInvoiceInOriginalFk THEN
|
||||
|
||||
IF vInvoiceInOriginalFk THEN
|
||||
UPDATE movContaIVA mci
|
||||
JOIN vn.invoiceInRefund iir ON iir.invoiceInRefundFk = vInvoiceInFk
|
||||
JOIN vn.invoiceInCorrection iic ON iic.correctingFk = vInvoiceInFk
|
||||
JOIN vn.siiTypeInvoiceIn st ON st.id = iic.siiTypeInvoiceInFk
|
||||
JOIN (SELECT issued,
|
||||
SUM(sub.taxableBase) taxableBase,
|
||||
SUM(sub.taxableBase) taxableBase,
|
||||
SUM(ROUND((sub.taxableBase * sub.PorcentajeIva) / 100 , 2)) vat
|
||||
FROM(SELECT issued,
|
||||
SUM(iit.taxableBase) taxableBase,
|
||||
SUM(iit.taxableBase) taxableBase,
|
||||
ti.PorcentajeIva
|
||||
FROM vn.invoiceIn i
|
||||
FROM vn.invoiceIn i
|
||||
JOIN vn.invoiceInTax iit ON iit.invoiceInFk = i.id
|
||||
JOIN sage.TiposIva ti ON ti.CodigoIva = iit.taxTypeSageFk
|
||||
JOIN TiposIva ti ON ti.CodigoIva = iit.taxTypeSageFk
|
||||
WHERE i.id = vInvoiceInOriginalFk
|
||||
GROUP BY ti.CodigoIva)sub
|
||||
)invoiceInOriginal
|
||||
JOIN ClavesOperacion co ON co.Descripcion = 'Factura rectificativa'
|
||||
SET mci.TipoRectificativa = iir.refundCategoryFk,
|
||||
mci.ClaseAbonoRectificativas = iir.refundType,
|
||||
mci.ClaseAbonoRectificativas = iir.refundType,
|
||||
mci.FechaFacturaOriginal = invoiceInOriginal.issued,
|
||||
mci.FechaOperacion = invoiceInOriginal.issued,
|
||||
mci.BaseImponibleOriginal = invoiceInOriginal.taxableBase,
|
||||
mci.CuotaIvaOriginal = invoiceInOriginal.vat,
|
||||
mci.ClaveOperacionFactura = co.ClaveOperacionFactura_
|
||||
WHERE mci.id = vXDiarioFk;
|
||||
|
||||
END IF;
|
||||
END$$
|
||||
DELIMITER ;
|
||||
DELIMITER ;
|
||||
|
|
|
@ -169,6 +169,7 @@ BEGIN
|
|||
UPDATE movContaIVA mci
|
||||
JOIN vn.invoiceOut i ON i.id = vInvoiceOutCorrectedFk
|
||||
JOIN vn.invoiceCorrection ic ON ic.correctedFk = vInvoiceOutCorrectedFk
|
||||
JOIN vn.siiTypeInvoiceOut st ON st.id = ic.siiTypeInvoiceOutFk
|
||||
JOIN (SELECT SUM(IF(IFNULL(e.vatFk, TRUE), iot.taxableBase, 0)) taxableBase,
|
||||
SUM(IF(IFNULL(e.vatFk, TRUE), iot.vat, 0)) vat,
|
||||
SUM(IF(IFNULL(e.vatFk, TRUE), 0, iot.vat)) equ
|
||||
|
@ -177,8 +178,8 @@ BEGIN
|
|||
WHERE iot.invoiceOutFk = vInvoiceOutCorrectedFk
|
||||
) tax
|
||||
JOIN ClavesOperacion co ON co.Descripcion = 'Factura rectificativa'
|
||||
SET mci.TipoRectificativa = 2,
|
||||
mci.ClaseAbonoRectificativas = 1,
|
||||
SET mci.TipoRectificativa = ic.cplusRectificationTypeFk,
|
||||
mci.ClaseAbonoRectificativas = REGEXP_REPLACE(st.`code`, '[^0-9]', ''),
|
||||
mci.FechaFacturaOriginal = i.issued,
|
||||
mci.FechaOperacion = i.issued,
|
||||
mci.BaseImponibleOriginal = tax.taxableBase,
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`buy_getLastWithoutInventory`(
|
||||
vItemFk INT,
|
||||
vWarehouseFk INT
|
||||
)
|
||||
RETURNS int(11)
|
||||
DETERMINISTIC
|
||||
BEGIN
|
||||
/**
|
||||
* Retorna la última compra que no sea inventario.
|
||||
*
|
||||
* @param vItemFk Id del artículo
|
||||
* @param vWarehouseFk Id del almacén
|
||||
* @return Id de compra
|
||||
*/
|
||||
DECLARE vBuyFk INT;
|
||||
|
||||
SELECT b.id INTO vBuyFk
|
||||
FROM buy b
|
||||
JOIN entry e ON e.id = b.entryFk
|
||||
JOIN travel t ON t.id = e.travelFk
|
||||
WHERE e.id <> (SELECT defaultEntry FROM entryConfig)
|
||||
AND e.supplierFk <> (SELECT supplierFk FROM inventoryConfig)
|
||||
AND e.typeFk <> 'inventory'
|
||||
AND b.itemFk = vItemFk
|
||||
AND (t.warehouseInFk = vWarehouseFk OR t.warehouseInFk IS NULL)
|
||||
ORDER BY ABS(DATEDIFF(util.VN_CURDATE(), t.landed)), e.created DESC
|
||||
LIMIT 1;
|
||||
|
||||
RETURN vBuyFk;
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -11,6 +11,7 @@ BEGIN
|
|||
DECLARE vCurrentCommission INT;
|
||||
DECLARE vIsNotEUR INT;
|
||||
DECLARE vLastEntryFk INT;
|
||||
DECLARE vLanded INT;
|
||||
|
||||
SELECT count(*) INTO vIsNotEUR
|
||||
FROM currency c
|
||||
|
@ -26,23 +27,25 @@ BEGIN
|
|||
|
||||
RETURN IFNULL(vCommission, 0);
|
||||
ELSE
|
||||
SELECT landed INTO vLanded
|
||||
FROM travel
|
||||
WHERE id = vTravelFk;
|
||||
|
||||
SELECT e.id INTO vLastEntryFk
|
||||
FROM `entry` e
|
||||
JOIN travel tr ON tr.id = e.travelFk
|
||||
WHERE e.supplierFk = vSupplierFk
|
||||
ORDER BY tr.landed DESC
|
||||
LIMIT 1;
|
||||
WHERE e.supplierFk = vSupplierFk
|
||||
ORDER BY (vLanded <= tr.landed), tr.landed DESC
|
||||
LIMIT 1;
|
||||
|
||||
IF vLastEntryFk THEN
|
||||
SELECT commission INTO vCurrentCommission
|
||||
FROM `entry`
|
||||
WHERE id = vLastEntryFk;
|
||||
|
||||
ELSE
|
||||
SELECT commission INTO vCurrentCommission
|
||||
FROM supplier s
|
||||
WHERE s.id = vSupplierFk;
|
||||
|
||||
END IF;
|
||||
|
||||
RETURN vCurrentCommission;
|
||||
|
|
|
@ -26,7 +26,7 @@ BEGIN
|
|||
JOIN cache.zoneAgencyFriendship zf ON zf.agencyModeFk = r.agencyModeFk
|
||||
WHERE friendship >= vSignificativeFriendship
|
||||
AND zf.zoneFk = vZoneFk
|
||||
AND r.created = vLanded
|
||||
AND r.dated = vLanded
|
||||
ORDER BY friendship;
|
||||
|
||||
-- Se eliminan aquellas que superan el volumen máximo
|
||||
|
|
|
@ -26,7 +26,7 @@ BEGIN
|
|||
JOIN cache.zoneAgencyFriendship zf ON zf.agencyModeFk = r.agencyModeFk
|
||||
WHERE friendship >= vSignificativeFriendship
|
||||
AND zf.zoneFk = vZoneFk
|
||||
AND r.created = vLanded
|
||||
AND r.dated = vLanded
|
||||
ORDER BY friendship;
|
||||
|
||||
-- Se eliminan aquellas que superan el volumen máximo
|
||||
|
|
|
@ -46,7 +46,7 @@ BEGIN
|
|||
JOIN claimDestination cd ON cd.id = ce.claimDestinationFk
|
||||
JOIN claim c ON c.id = ce.claimFk
|
||||
JOIN claimState cs ON cs.id = c.claimStateFk
|
||||
WHERE cd.description NOT IN ('Bueno', 'Corregido')
|
||||
WHERE cd.code NOT IN ('good', 'corrected', 'supplierClaim')
|
||||
AND NOT ce.isGreuge
|
||||
AND cs.code = 'resolved';
|
||||
|
||||
|
@ -71,7 +71,7 @@ BEGIN
|
|||
JOIN claimDestination cd ON cd.id = ce.claimDestinationFk
|
||||
JOIN claim c ON c.id = ce.claimFk
|
||||
JOIN claimState cs ON cs.id = c.claimStateFk
|
||||
WHERE cd.description NOT IN ('Bueno', 'Corregido')
|
||||
WHERE cd.code NOT IN ('good', 'corrected', 'supplierClaim')
|
||||
AND NOT ce.isGreuge
|
||||
AND cs.code = 'resolved'
|
||||
AND c.isChargedToMana;
|
||||
|
@ -82,7 +82,7 @@ BEGIN
|
|||
JOIN claim c ON c.id = ce.claimFk
|
||||
JOIN claimState cs ON cs.id = c.claimStateFk
|
||||
SET ce.isGreuge = TRUE
|
||||
WHERE cd.description NOT IN ('Bueno', 'Corregido')
|
||||
WHERE cd.code NOT IN ('good', 'corrected', 'supplierClaim')
|
||||
AND NOT ce.isGreuge
|
||||
AND cs.code = 'resolved';
|
||||
|
||||
|
@ -161,7 +161,7 @@ BEGIN
|
|||
JOIN claimDestination cd ON cd.id = ce.claimDestinationFk
|
||||
JOIN claim c ON c.id = ce.claimFk
|
||||
JOIN claimState cs ON cs.id = c.claimStateFk
|
||||
WHERE cd.description NOT IN ('Bueno', 'Corregido')
|
||||
WHERE cd.code NOT IN ('good', 'corrected', 'supplierClaim')
|
||||
AND cs.code = 'resolved'
|
||||
AND c.ticketCreated >= util.VN_CURDATE() - INTERVAL 1 YEAR
|
||||
GROUP BY c.clientFk
|
||||
|
|
|
@ -41,6 +41,6 @@ BEGIN
|
|||
WHERE expeditionFk = e.id)
|
||||
LEFT JOIN expeditionState es2 ON es2.id = es.id
|
||||
WHERE t.routeFk = vRouteFk AND e.freightItemFk <> FALSE
|
||||
ORDER BY r.created, t.priority DESC;
|
||||
ORDER BY r.dated, t.priority DESC;
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
|
|
@ -54,7 +54,9 @@ proc:BEGIN
|
|||
WHERE shipped BETWEEN vCreated AND util.dayEnd(vCreated)
|
||||
AND clientFk = vClientFk
|
||||
AND addressFk = vAddressFk
|
||||
AND warehouseFk = vWarehouseFk;
|
||||
AND warehouseFk = vWarehouseFk
|
||||
AND nickname = 'CAJAS AUTOCONSUMO'
|
||||
LIMIT 1;
|
||||
|
||||
IF vTicketFk IS NULL AND vAction = 'add' THEN
|
||||
INSERT INTO ticket(clientFk, warehouseFk, shipped, nickname, addressFk)
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`inventoryFailureAdd`()
|
||||
BEGIN
|
||||
|
||||
DECLARE done BOOL DEFAULT FALSE;
|
||||
DECLARE vTicketFk INT;
|
||||
|
||||
DECLARE rs CURSOR FOR
|
||||
SELECT id FROM vn.ticket
|
||||
WHERE shipped = util.yesterday()
|
||||
AND clientFk = 400
|
||||
AND warehouseFk IN (1,44);
|
||||
|
||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
|
||||
|
||||
OPEN rs;
|
||||
|
||||
FETCH rs INTO vTicketFk;
|
||||
|
||||
WHILE NOT done DO
|
||||
|
||||
INSERT INTO vn.inventoryFailure(dated, itemFk, quantity, value, warehouseFk, throwerFk)
|
||||
SELECT t.shipped,
|
||||
s.itemFk,
|
||||
s.quantity,
|
||||
b.buyingValue + b.freightValue + b.packageValue + b.comissionValue,
|
||||
t.warehouseFk,
|
||||
w.id
|
||||
FROM vn.ticket t
|
||||
JOIN vn.sale s ON s.ticketFk = t.id
|
||||
LEFT JOIN cache.last_buy lb ON lb.warehouse_id = t.warehouseFk AND item_id = s.itemFk
|
||||
LEFT JOIN vn.buy b ON b.id = lb.buy_id
|
||||
LEFT JOIN vn.worker w ON w.code = LEFT(s.concept, 3)
|
||||
WHERE t.id = vTicketFk
|
||||
AND s.quantity > 0;
|
||||
|
||||
FETCH rs INTO vTicketFk;
|
||||
|
||||
END WHILE;
|
||||
|
||||
|
||||
CLOSE rs;
|
||||
|
||||
|
||||
|
||||
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -43,7 +43,7 @@ BEGIN
|
|||
ii.cplusTaxBreakFk,
|
||||
ii.cplusSubjectOpFk,
|
||||
ii.siiTypeInvoiceInFk,
|
||||
ii.cplusRectificationTypeFk,
|
||||
ic.cplusRectificationTypeFk,
|
||||
ii.booked,
|
||||
IFNULL(a.isUeeMember, c.isUeeMember) isUeeMember,
|
||||
(c.id = cc.id) isSameCountry,
|
||||
|
@ -66,6 +66,7 @@ BEGIN
|
|||
e.name expenseName
|
||||
FROM invoiceIn ii
|
||||
JOIN supplier s ON s.id = ii.supplierFk
|
||||
LEFT JOIN invoiceInCorrection ic ON ic.correctingFk = ii.id
|
||||
LEFT JOIN province p ON p.id = s.provinceFk
|
||||
LEFT JOIN autonomy a ON a.id = p.autonomyFk
|
||||
JOIN country c ON c.id = s.countryFk
|
||||
|
|
|
@ -34,6 +34,7 @@ BEGIN
|
|||
DECLARE vMaxShipped DATE;
|
||||
DECLARE vDone BOOL;
|
||||
DECLARE vTicketFk INT;
|
||||
DECLARE vAddressFk INT;
|
||||
DECLARE vCursor CURSOR FOR
|
||||
SELECT id
|
||||
FROM tmp.ticketToInvoice;
|
||||
|
@ -48,11 +49,13 @@ BEGIN
|
|||
DATE(vInvoiceDate) >= invoiceOut_getMaxIssued(
|
||||
vSerial,
|
||||
t.companyFk,
|
||||
YEAR(vInvoiceDate))
|
||||
YEAR(vInvoiceDate)),
|
||||
t.addressFk
|
||||
INTO vClientFk,
|
||||
vCompanyFk,
|
||||
vMaxShipped,
|
||||
vIsCorrectInvoiceDate
|
||||
vIsCorrectInvoiceDate,
|
||||
vAddressFk
|
||||
FROM tmp.ticketToInvoice tt
|
||||
JOIN ticket t ON t.id = tt.id;
|
||||
|
||||
|
@ -105,7 +108,9 @@ BEGIN
|
|||
clientFk,
|
||||
dued,
|
||||
companyFk,
|
||||
siiTypeInvoiceOutFk
|
||||
siiTypeInvoiceOutFk,
|
||||
customsAgentFk,
|
||||
incotermsFk
|
||||
)
|
||||
SELECT
|
||||
1,
|
||||
|
@ -118,9 +123,12 @@ BEGIN
|
|||
vCplusCorrectingInvoiceTypeFk,
|
||||
IF(vSerial = vSimplifiedSerial,
|
||||
vCplusSimplifiedInvoiceTypeFk,
|
||||
vCplusStandardInvoiceTypeFk))
|
||||
FROM client
|
||||
WHERE id = vClientFk;
|
||||
vCplusStandardInvoiceTypeFk)),
|
||||
a.customsAgentFk,
|
||||
a.incotermsFk
|
||||
FROM client c
|
||||
JOIN address a ON a.id = vAddressFk
|
||||
WHERE c.id = vClientFk;
|
||||
|
||||
SET vNewInvoiceId = LAST_INSERT_ID();
|
||||
|
||||
|
|
|
@ -164,10 +164,6 @@ BEGIN
|
|||
SET itemFk = vItemNew
|
||||
WHERE itemFk = vItemOld;
|
||||
|
||||
UPDATE inventoryFailure
|
||||
SET itemFk = vItemNew
|
||||
WHERE itemFk = vItemOld;
|
||||
|
||||
UPDATE genericAllocation
|
||||
SET itemFk = vItemNew
|
||||
WHERE itemFk = vItemOld;
|
||||
|
|
|
@ -27,7 +27,7 @@ BEGIN
|
|||
rm.ticketFree = 0,
|
||||
rm.ticketProduction = 0,
|
||||
rm.ticketPacked = 0,
|
||||
rm.dated = r.created;
|
||||
rm.dated = r.dated;
|
||||
|
||||
UPDATE routesMonitor rm
|
||||
JOIN (
|
||||
|
|
|
@ -14,7 +14,7 @@ BEGIN
|
|||
DECLARE vIsKmTruckRate BOOL;
|
||||
DECLARE vCountryFk INT;
|
||||
|
||||
SELECT r.created >= rc.cutoffDated INTO vIsUpdatable
|
||||
SELECT r.dated >= rc.cutoffDated INTO vIsUpdatable
|
||||
FROM route r
|
||||
JOIN routeConfig rc
|
||||
WHERE r.id = vSelf;
|
||||
|
|
|
@ -52,7 +52,8 @@ BEGIN
|
|||
IFNULL(dest.nickname, origin.nickname) nickname,
|
||||
dest.landed,
|
||||
dest.preparation,
|
||||
origin.departmentFk
|
||||
origin.departmentFk,
|
||||
origin.saleClonedFk
|
||||
FROM (
|
||||
SELECT s.ticketFk,
|
||||
c.salesPersonFk workerFk,
|
||||
|
@ -73,11 +74,13 @@ BEGIN
|
|||
t.warehouseFk,
|
||||
t.companyFk,
|
||||
t.agencyModeFk,
|
||||
wd.departmentFk
|
||||
wd.departmentFk,
|
||||
sc.saleClonedFk
|
||||
FROM ticket t
|
||||
JOIN client c ON c.id = t.clientFk
|
||||
JOIN workerDepartment wd ON wd.workerFk = c.salesPersonFk
|
||||
JOIN sale s ON s.ticketFk = t.id
|
||||
LEFT JOIN saleCloned sc ON sc.saleClonedFk = s.id
|
||||
JOIN saleVolume sv ON sv.saleFk = s.id
|
||||
JOIN item i ON i.id = s.itemFk
|
||||
JOIN ticketState ts ON ts.ticketFk = t.id
|
||||
|
|
|
@ -10,8 +10,8 @@ BEGIN
|
|||
* @param vIsRaid idRaid value
|
||||
* @param vDaysInForward daysInForward value
|
||||
*/
|
||||
IF (NOT vIsRaid AND vDaysInForward IS NOT NULL) OR (vIsRaid AND vDaysInForward IS NULL) THEN
|
||||
CALL util.throw('The raid information is not correct');
|
||||
IF NOT vIsRaid AND vDaysInForward THEN
|
||||
CALL util.throw('If daysInForward has a value, the raid cannot be unchecked');
|
||||
END IF;
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
|
|
@ -8,22 +8,15 @@ BEGIN
|
|||
DECLARE vDone BOOL DEFAULT FALSE;
|
||||
DECLARE vBuyerEmail VARCHAR(40);
|
||||
DECLARE vTravelLink TEXT;
|
||||
DECLARE vMailBody TEXT DEFAULT '';
|
||||
DECLARE vMailBody TEXT;
|
||||
DECLARE vDaysBetweenDates INT;
|
||||
DECLARE vSubject VARCHAR(30);
|
||||
|
||||
DECLARE vCur CURSOR FOR
|
||||
SELECT GROUP_CONCAT(DISTINCT
|
||||
CONCAT('https://salix.verdnatura.es/#!/travel/',
|
||||
ttm.travelFk,
|
||||
'/summary ')
|
||||
ORDER BY ttm.travelFk SEPARATOR '\n\r') travelLink,
|
||||
CONCAT(u.name, '@verdnatura.es') buyerEmail
|
||||
FROM tTravelToMove ttm
|
||||
JOIN entry e ON e.travelFk = ttm.travelFk
|
||||
JOIN buy b ON b.entryFk = e.id
|
||||
JOIN item i ON i.id = b.itemFk
|
||||
JOIN itemType it ON it.id = i.typeFk
|
||||
JOIN account.user u ON u.id = it.workerFk
|
||||
GROUP BY u.name;
|
||||
DECLARE vTravels CURSOR FOR
|
||||
SELECT GROUP_CONCAT(DISTINCT travelLink ORDER BY id SEPARATOR '\n\r'),
|
||||
buyerEmail
|
||||
FROM tTravelToMove
|
||||
GROUP BY buyerEmail;
|
||||
|
||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
|
||||
|
||||
|
@ -34,35 +27,50 @@ BEGIN
|
|||
END;
|
||||
|
||||
CREATE OR REPLACE TEMPORARY TABLE tTravelToMove
|
||||
SELECT id travelFk,
|
||||
util.VN_CURDATE() + INTERVAL daysInForward DAY newLanded
|
||||
FROM travel
|
||||
WITH travels AS (
|
||||
SELECT id,
|
||||
CONCAT('https://salix.verdnatura.es/#!/travel/', id,'/summary') travelLink,
|
||||
util.VN_CURDATE() + INTERVAL daysInForward DAY newLanded,
|
||||
util.VN_CURDATE() - INTERVAL DATEDIFF(landed, shipped) + daysInForward DAY newShipped
|
||||
FROM vn.travel
|
||||
WHERE isRaid
|
||||
AND daysInForward;
|
||||
AND daysInForward
|
||||
)SELECT t.id,
|
||||
t.travelLink,
|
||||
t.newLanded,
|
||||
t.newShipped,
|
||||
CONCAT(u.name, '@verdnatura.es') buyerEmail
|
||||
FROM travels t
|
||||
STRAIGHT_JOIN vn.entry e ON e.travelFk = t.id
|
||||
JOIN vn.buy b ON b.entryFk = e.id
|
||||
JOIN vn.item i ON i.id = b.itemFk
|
||||
JOIN vn.itemType it ON it.id = i.typeFk
|
||||
JOIN account.user u ON u.id = it.workerFk
|
||||
GROUP BY t.id;
|
||||
|
||||
START TRANSACTION;
|
||||
|
||||
UPDATE travel tr
|
||||
JOIN tTravelToMove ttm ON ttm.travelFk = tr.id
|
||||
SET tr.landed = ttm.newLanded;
|
||||
JOIN tTravelToMove ttm ON ttm.id = tr.id
|
||||
SET tr.landed = ttm.newLanded,
|
||||
tr.shipped = ttm.newShipped;
|
||||
|
||||
OPEN vCur;
|
||||
OPEN vTravels;
|
||||
|
||||
l: LOOP
|
||||
SET vDone = FALSE;
|
||||
FETCH vCur INTO vTravelLink, vBuyerEmail;
|
||||
FETCH vTravels INTO vTravelLink, vBuyerEmail;
|
||||
|
||||
IF vDone THEN
|
||||
LEAVE l;
|
||||
END IF;
|
||||
|
||||
CALL `vn`.`mail_insert`(
|
||||
vBuyerEmail,
|
||||
'noreply@verdnatura.es',
|
||||
'Cambio de fecha en Redadas',
|
||||
CONCAT('Se ha movido los siguientes travels: \n\r ', vTravelLink));
|
||||
SET vSubject = 'Cambio de fecha en Redadas',
|
||||
vMailBody = CONCAT('Se ha movido los siguientes travels: \n\r ', vTravelLink);
|
||||
|
||||
CALL mail_insert(vBuyerEmail, 'noreply@verdnatura.es', vSubject, vMailBody);
|
||||
END LOOP;
|
||||
CLOSE vCur;
|
||||
CLOSE vTravels;
|
||||
COMMIT;
|
||||
DROP TEMPORARY TABLE tTravelToMove;
|
||||
END$$
|
||||
|
|
|
@ -3,24 +3,30 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`invoiceIn_afterUpdate`
|
|||
AFTER UPDATE ON `invoiceIn`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
IF NEW.issued != OLD.issued
|
||||
OR NEW.currencyFk != OLD.currencyFk THEN
|
||||
DECLARE vIsEuro BOOL;
|
||||
|
||||
SELECT `code` = 'EUR' INTO vIsEuro
|
||||
FROM currency
|
||||
WHERE id = NEW.currencyFk;
|
||||
|
||||
IF (NOT NEW.issued <=> OLD.issued
|
||||
OR NEW.currencyFk <> OLD.currencyFk) THEN
|
||||
|
||||
UPDATE invoiceInTax iit
|
||||
JOIN invoiceIn ii ON ii.id = iit.invoiceInFk
|
||||
LEFT JOIN referenceRate rr ON rr.dated = ii.issued
|
||||
AND rr.currencyFk = ii.currencyFk
|
||||
SET iit.taxableBase = IF(iit.foreignValue IS NULL, iit.taxableBase, iit.foreignValue / rr.value)
|
||||
SET iit.taxableBase = IF(vIsEuro, iit.taxableBase, iit.foreignValue / rr.value),
|
||||
iit.foreignValue = IF(vIsEuro, NULL, iit.foreignValue)
|
||||
WHERE ii.id = NEW.id;
|
||||
|
||||
UPDATE invoiceInDueDay iidd
|
||||
JOIN invoiceIn ii ON ii.id = iidd.invoiceInFk
|
||||
LEFT JOIN referenceRate rr ON rr.dated = ii.issued
|
||||
AND rr.currencyFk = ii.currencyFk
|
||||
SET iidd.amount = IF(iidd.foreignValue IS NULL, iidd.amount, iidd.foreignValue / rr.value)
|
||||
SET iidd.amount = IF(vIsEuro, iidd.amount, iidd.foreignValue / rr.value),
|
||||
iidd.foreignValue = IF(vIsEuro, NULL, iidd.foreignValue)
|
||||
WHERE ii.id = NEW.id;
|
||||
|
||||
END IF;
|
||||
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
|
|
@ -16,7 +16,7 @@ BEGIN
|
|||
JOIN vn.route r ON r.id = t.routeFk
|
||||
WHERE r.isOk = FALSE
|
||||
AND ic.itemFk = NEW.itemFk
|
||||
AND r.created >= util.VN_CURDATE()
|
||||
AND r.dated >= util.VN_CURDATE()
|
||||
GROUP BY r.id;
|
||||
IF NEW.cm3Delivery = 0 AND NEW.warehouseFk = 60 THEN
|
||||
CALL mail_insert(
|
||||
|
|
|
@ -22,6 +22,7 @@ BEGIN
|
|||
OR !(NEW.workerFk <=> OLD.workerFk)
|
||||
OR !(NEW.m3 <=> OLD.m3)
|
||||
OR !(NEW.agencyModeFk <=> OLD.agencyModeFk)
|
||||
OR !(NEW.dated <=> OLD.dated)
|
||||
OR !(NEW.vehicleFk <=> OLD.vehicleFk)THEN
|
||||
CALL route_calcCommission(NEW.id);
|
||||
END IF;
|
||||
|
|
|
@ -14,7 +14,7 @@ BEGIN
|
|||
SELECT IFNULL(b.workCenterFK, r.defaultWorkCenterFk)
|
||||
FROM vn.routeConfig r
|
||||
LEFT JOIN vn.business b ON b.workerFk = vUserFk
|
||||
AND NEW.created BETWEEN b.started AND IFNULL(b.ended, NEW.created));
|
||||
AND NEW.dated BETWEEN b.started AND IFNULL(b.ended, NEW.dated));
|
||||
|
||||
IF ISNULL(NEW.agencyModeFk) THEN
|
||||
SELECT r.agencyModeFk INTO vDefaultAgencyModeFk
|
||||
|
|
|
@ -23,7 +23,7 @@ BEGIN
|
|||
JOIN vn.route r ON r.id = t.routeFk
|
||||
WHERE r.isOk = FALSE
|
||||
AND s.id = NEW.id
|
||||
AND r.created >= util.VN_CURDATE()
|
||||
AND r.dated >= util.VN_CURDATE()
|
||||
GROUP BY r.id;
|
||||
END IF;
|
||||
END$$
|
||||
|
|
|
@ -54,7 +54,7 @@ BEGIN
|
|||
JOIN vn.route r ON r.id = t.routeFk
|
||||
WHERE r.isOk = FALSE
|
||||
AND s.id = NEW.id
|
||||
AND r.created >= util.VN_CURDATE()
|
||||
AND r.dated >= util.VN_CURDATE()
|
||||
GROUP BY r.id;
|
||||
END IF;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
JOIN vn.route r ON r.id = t.routeFk
|
||||
WHERE r.isOk = FALSE
|
||||
AND s.id = OLD.id
|
||||
AND r.created >= util.VN_CURDATE()
|
||||
AND r.dated >= util.VN_CURDATE()
|
||||
GROUP BY r.id;
|
||||
END IF;
|
||||
END$$
|
||||
|
|
|
@ -8,7 +8,7 @@ BEGIN
|
|||
FROM vn.route r
|
||||
WHERE r.isOk = FALSE
|
||||
AND r.id = OLD.routeFk
|
||||
AND r.created >= util.VN_CURDATE()
|
||||
AND r.dated >= util.VN_CURDATE()
|
||||
GROUP BY r.id;
|
||||
|
||||
DELETE FROM sale WHERE ticketFk = OLD.id;
|
||||
|
|
|
@ -22,7 +22,7 @@ BEGIN
|
|||
FROM `route`
|
||||
WHERE NOT isOk
|
||||
AND id IN (OLD.routeFk, NEW.routeFk)
|
||||
AND created >= util.VN_CURDATE()
|
||||
AND dated >= util.VN_CURDATE()
|
||||
GROUP BY id;
|
||||
END IF;
|
||||
|
||||
|
@ -45,7 +45,7 @@ BEGIN
|
|||
JOIN vn.route r ON r.id = t.routeFk
|
||||
WHERE r.isOk = FALSE
|
||||
AND t.id = NEW.id
|
||||
AND r.created >= util.VN_CURDATE()
|
||||
AND r.dated >= util.VN_CURDATE()
|
||||
GROUP BY r.id;
|
||||
SET NEW.shipped = DATE_FORMAT(NEW.shipped, '2000-%m-%d %T');
|
||||
SET NEW.landed = DATE_FORMAT(NEW.landed, '2000-%m-%d %T');
|
||||
|
|
|
@ -20,6 +20,10 @@ BEGIN
|
|||
CALL travel_checkWarehouseIsFeedStock(NEW.warehouseInFk);
|
||||
END IF;
|
||||
|
||||
IF NOT (NEW.isRaid <=> OLD.isRaid) OR NOT (NEW.daysInForward <=> OLD.daysInForward) THEN
|
||||
CALL travel_checkRaid(NEW.isRaid, NEW.daysInForward);
|
||||
END IF;
|
||||
|
||||
IF NOT (NEW.awbFk <=> OLD.awbFk)THEN
|
||||
SELECT COUNT(*) INTO vHasAnyInvoiceBooked
|
||||
FROM travel t
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workerManaExcluded_beforeInsert`
|
||||
BEFORE INSERT ON `workerManaExcluded`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
DELETE FROM workerMana
|
||||
WHERE workerFk = NEW.workerFk;
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -0,0 +1,9 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workerManaExcluded_beforeUpdate`
|
||||
BEFORE UPDATE ON `workerManaExcluded`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
DELETE FROM workerMana
|
||||
WHERE workerFk = NEW.workerFk;
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -0,0 +1,10 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workerMana_beforeInsert`
|
||||
BEFORE INSERT ON `workerMana`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
IF (SELECT EXISTS(SELECT TRUE FROM workerManaExcluded WHERE workerFk = NEW.workerFk)) THEN
|
||||
CALL util.throw('Worker is excluded from mana');
|
||||
END IF;
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -0,0 +1,10 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workerMana_beforeUpdate`
|
||||
BEFORE UPDATE ON `workerMana`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
IF (SELECT EXISTS(SELECT TRUE FROM workerManaExcluded WHERE workerFk = NEW.workerFk)) THEN
|
||||
CALL util.throw('Worker is excluded from mana');
|
||||
END IF;
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -3,10 +3,12 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workerTimeControl_after
|
|||
AFTER DELETE ON `workerTimeControl`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
INSERT INTO workerLog
|
||||
SET `action` = 'delete',
|
||||
`changedModel` = 'WorkerTimeControl',
|
||||
`changedModelId` = OLD.id,
|
||||
`userFk` = account.myUser_getId();
|
||||
IF account.myUser_getId() IS NOT NULL THEN
|
||||
INSERT INTO workerLog
|
||||
SET `action` = 'delete',
|
||||
`changedModel` = 'WorkerTimeControl',
|
||||
`changedModelId` = OLD.id,
|
||||
`userFk` = account.myUser_getId();
|
||||
END IF;
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
|
|
@ -9,8 +9,8 @@ AS SELECT `rs2`.`description` AS `truck`,
|
|||
`rs`.`id` <=> `rm`.`roadmapStopFk` AS `isMatch`,
|
||||
`t`.`warehouseFk` AS `warehouseFk`,
|
||||
IF(
|
||||
`r`.`created` > `util`.`VN_CURDATE`() + INTERVAL 1 DAY,
|
||||
ucase(dayname(`r`.`created`)),
|
||||
`r`.`dated` > `util`.`VN_CURDATE`() + INTERVAL 1 DAY,
|
||||
ucase(dayname(`r`.`dated`)),
|
||||
NULL
|
||||
) AS `nombreDia`
|
||||
FROM (
|
||||
|
|
|
@ -6,7 +6,7 @@ AS SELECT `r`.`id` AS `routeFk`,
|
|||
COUNT(DISTINCT `e`.`id`) AS `expeditions`,
|
||||
COUNT(DISTINCT `es`.`id`) AS `scanned`,
|
||||
max(`e`.`created`) AS `lastPacked`,
|
||||
`r`.`created` AS `created`
|
||||
`r`.`dated` AS `created`
|
||||
FROM (
|
||||
(
|
||||
(
|
||||
|
@ -23,5 +23,5 @@ FROM (
|
|||
)
|
||||
LEFT JOIN `vn`.`expeditionScan` `es` ON(`es`.`expeditionFk` = `e`.`id`)
|
||||
)
|
||||
WHERE `r`.`created` >= `util`.`yesterday`()
|
||||
WHERE `r`.`dated` >= `util`.`yesterday`()
|
||||
GROUP BY `r`.`id`
|
||||
|
|
|
@ -3,7 +3,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost`
|
|||
VIEW `vn2008`.`Rutas`
|
||||
AS SELECT `r`.`id` AS `Id_Ruta`,
|
||||
`r`.`workerFk` AS `Id_Trabajador`,
|
||||
`r`.`created` AS `Fecha`,
|
||||
`r`.`dated` AS `Fecha`,
|
||||
`r`.`vehicleFk` AS `Id_Vehiculo`,
|
||||
`r`.`agencyModeFk` AS `Id_Agencia`,
|
||||
`r`.`time` AS `Hora`,
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
ALTER TABLE vn.invoiceOut ADD COLUMN IF NOT EXISTS customsAgentFk INT(11) DEFAULT NULL AFTER siiTrascendencyInvoiceOutFk;
|
||||
ALTER TABLE vn.invoiceOut ADD COLUMN IF NOT EXISTS incotermsFk varchar(3) DEFAULT NULL AFTER customsAgentFk;
|
||||
|
||||
ALTER TABLE vn.invoiceOut ADD CONSTRAINT invoiceOut_customsAgentFk FOREIGN KEY (customsAgentFk)
|
||||
REFERENCES vn.customsAgent (id) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
ALTER TABLE vn.invoiceOut ADD CONSTRAINT invoiceOut_incotermsFk FOREIGN KEY (incotermsFk)
|
||||
REFERENCES vn.incoterms (`code`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
UPDATE vn.invoiceOut io
|
||||
JOIN vn.client c ON c.id = io.clientFk
|
||||
JOIN vn.ticket t ON t.clientFk = c.id
|
||||
JOIN vn.address a ON a.id = t.addressFk
|
||||
SET io.customsAgentFk = a.customsAgentFk,
|
||||
io.incotermsFk = a.incotermsFk;
|
|
@ -0,0 +1,11 @@
|
|||
INSERT INTO hedera.message (code, description)
|
||||
VALUES ('orderLinesWithZero','There are empty lines. Please delete them');
|
||||
|
||||
INSERT INTO hedera.messageI18n (code, lang, description)
|
||||
VALUES ('orderLinesWithZero','es','Hay líneas vacías. Por favor, elimínelas');
|
||||
|
||||
INSERT INTO hedera.messageI18n (code, lang, description)
|
||||
VALUES ('orderLinesWithZero','fr','Il y a des lignes vides. Veuillez les supprimer');
|
||||
|
||||
INSERT INTO hedera.messageI18n (code, lang, description)
|
||||
VALUES ('orderLinesWithZero','pt','Existem linhas vazias. Por favor, apague-os');
|
|
@ -0,0 +1,185 @@
|
|||
CREATE TABLE IF NOT EXISTS `vn`.`sim` (
|
||||
`code` VARCHAR(25) COMMENT 'No se ha puesto BIGINT por incompatibilidad con Access',
|
||||
`line` VARCHAR(15) NOT NULL CHECK (`line` REGEXP '^[0-9]+$'),
|
||||
`ext` INT(4) NOT NULL,
|
||||
`pin` VARCHAR(4) NOT NULL CHECK (`pin` REGEXP '^[0-9]+$'),
|
||||
`puk` VARCHAR(15) NOT NULL CHECK (`pin` REGEXP '^[0-9]+$'),
|
||||
PRIMARY KEY (`code`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
|
||||
|
||||
ALTER TABLE vn.deviceProductionUser CHANGE simSerialNumber simFk VARCHAR(25) DEFAULT NULL NULL;
|
||||
ALTER TABLE vn.deviceProductionUser MODIFY COLUMN simFk VARCHAR(25) DEFAULT NULL NULL;
|
||||
|
||||
INSERT IGNORE INTO `vn`.`sim` (`line`, `ext`, `pin`, `code`, `puk`) VALUES
|
||||
('621188151', 2209, '1486', '3456985220092508','14213470'),
|
||||
('621188152', 2210, '8765', '3456985220092509','99473093'),
|
||||
('621188153', 2211, '3064', '3456985220092510','52967210'),
|
||||
('621188759', 2081, '3700', '3456985220123637','56600999'),
|
||||
('621188760', 2082, '3259', '345698522023638','87492404'),
|
||||
('621188761', 2083, '2790', '3456985220123639','94009456'),
|
||||
('621188762', 2084, '2480', '3456985220123644','1484999'),
|
||||
('621188763', 2085, '6876', '3456985220123641','36577064'),
|
||||
('621188766', 2086, '7775', '3456985220123642','80761698'),
|
||||
('621188769', 2088, '4027', '3456985220123643','37921712'),
|
||||
('621188771', 2089, '8797', '3456985220123640','63092540'),
|
||||
('621188772', 2090, '8404', '3456985220123645','21014997'),
|
||||
('621188773', 2091, '5481', '3456985220123646','16317277'),
|
||||
('621188774', 2092, '9632', '3456985220123647','22235994'),
|
||||
('621188775', 2093, '4654', '3456985220123648','28506486'),
|
||||
('621188838', 2094, '1392', '3456985220123649','29498627'),
|
||||
('621188839', 2095, '7774', '3456985220123650','46263490'),
|
||||
('621188840', 2096, '7304', '3456985220123658','8212044'),
|
||||
('621188841', 2097, '5569', '3456985220123652','81597658'),
|
||||
('621188842', 2098, '4944', '3456985220123653','24961501'),
|
||||
('621188843', 2099, '5142', '3456985220123654','17035634'),
|
||||
('621188844', 2111, '7245', '3456985220123655','90231951'),
|
||||
('621188846', 2110, '6590', '3456985220123656','72201537'),
|
||||
('667680207', 2564, '4042', '34569832200759166','48401979'),
|
||||
('667680315', 2565, '7143', '34569832200759372','32143252'),
|
||||
('667680318', 2566, '6342', '34569832200759364','39597112'),
|
||||
('667680413', 2567, '5580', '34569832200759356','32786992'),
|
||||
('667680463', 2568, '0171', '34569832200759349','34240853'),
|
||||
('667688217', 2569, '2500', '34569832200759331','5687589'),
|
||||
('633603945', 2212, '7129', '34569832200759323','51554019'),
|
||||
('622130186', 2213, '4826', '34569832200759307','19623551'),
|
||||
('633973424', 2214, '8535', '34569832200759299','94619307'),
|
||||
('633703828', 2215, '8628', '34569832200759281','22468012'),
|
||||
('622025110', 2216, '2399', '34569832200759273','34602918'),
|
||||
('622924867', 2217, '5665', '34569832200759265','26920216'),
|
||||
('722409630', 2218, '5211', '34569832200759240','93750137'),
|
||||
('623590529', 2219, '0493', '34569832200759208','47077088'),
|
||||
('633243462', 2220, '6902', '34569832200759174','6421962'),
|
||||
('633047286', 2221, '5592', '34569832200759182','32069439'),
|
||||
('744716801', 2112, '9184', '34569832200759190','57049814'),
|
||||
('655995021', 2131, '8896', '34569852202049093','19497356'),
|
||||
('685522718', 2132, '1955', '34569852202049101','28519879'),
|
||||
('674587213', 2994, '2006', '34569332200223743','62360135'),
|
||||
('674587227', 2993, '9271', '34569332200223750','81628192'),
|
||||
('674587229', 2993, '0900', '34569332200223768','91119071'),
|
||||
('674587231', 2992, '5007', '34569332200223776','45826232'),
|
||||
('674587234', 2991, '1378', '34569332200223784','91245744'),
|
||||
('674587240', 2990, '0905', '34569332200223792','13083224'),
|
||||
('674587245', 2989, '9059', '34569332200223800','15291807'),
|
||||
('674587250', 2988, '8188', '34569332200223818','83017918'),
|
||||
('674587254', 2987, '2962', '34569332200223826','92809271'),
|
||||
('674587256', 2986, '0358', '34569332200223834','81067040'),
|
||||
('674592713', 2570, '2537', '34569332200230672','82325850'),
|
||||
('697832478', 2579, '0936', '34568732200494825','49658372'),
|
||||
('697832176', 2571, '5944', '34568732200494742','19039461'),
|
||||
('697832477', 2572, '5138', '34568732200494759','25712504'),
|
||||
('697832178', 2573, '4597', '34568732200494767','66241760'),
|
||||
('697832182', 2574, '9241', '34568732200494775','07342562'),
|
||||
('697832196', 2575, '2995', '34568732200494783','53929026'),
|
||||
('697832214', 2576, '7434', '34568732200494791','49698432'),
|
||||
('697832230', 2577, '7004', '34568732200494809','21578612'),
|
||||
('697832235', 2578, '9674', '34568732200494817','93090700'),
|
||||
('673420375', 2599, '5430', '34562052300117259','35911412'),
|
||||
('673420367', 2598, '8402', '34562052300117242','924654'),
|
||||
('673420361', 2597, '5125', '34562052300117234','12027970'),
|
||||
('673420355', 2596, '5069', '34562052300117226','34978149'),
|
||||
('673420348', 2595, '8911', '34562052300117218','4228121'),
|
||||
('673420346', 2594, '2461', '34562052300117200','67670772'),
|
||||
('673420345', 2593, '2226', '34562052300117192','90586404'),
|
||||
('673420306', 2592, '3355', '34562052300117184','97850017'),
|
||||
('673420257', 2591, '9395', '34562052300117176','50713786'),
|
||||
('673420231', 2590, '1378', '34562052300117168','50151763'),
|
||||
('673420223', 2589, '9580', '34562052300117150','99534550'),
|
||||
('673420216', 2588, '4955', '34562052300117143','317554'),
|
||||
('673420203', 2587, '6742', '34562052300117135','69321531'),
|
||||
('673420201', 2586, '1659', '34562052300117127','54720480'),
|
||||
('673420199', 2585, '7823', '34562052300117119','22923796'),
|
||||
('673420198', 2584, '1787', '34562052300117101','54414630'),
|
||||
('673420168', 2583, '6334', '34562052300117093','50694894'),
|
||||
('673420147', 2582, '8951', '34562052300117085','1402535'),
|
||||
('673420125', 2581, '3068', '34562052300117077','86216200'),
|
||||
('673420124', 2580, '9517', '34562052300117069','42504099'),
|
||||
('600294609', 2715, '7474', '34569832304894588','55923317'),
|
||||
('600084713', 2703, '8342', '34569832304894570','8392636'),
|
||||
('600084732', 2704, '1625', '34569832304894513','75477452'),
|
||||
('600084850', 2705, '9896', '34569832304894653','28589813'),
|
||||
('600084951', 2706, '5520', '34569832304894661','75353012'),
|
||||
('600084978', 2707, '2698', '34569832304894679','9005523'),
|
||||
('600085403', 2708, '0837', '34569832304894646','77051152'),
|
||||
('600085513', 2709, '3106', '34569832304894687','41571002'),
|
||||
('600293916', 2712, '8990', '34569832304894620','95188676'),
|
||||
('600294160', 2714, '6376', '34569832304894703','79879896'),
|
||||
('671919529', 2975, '9184', '34569832304806236','7535392'),
|
||||
('671919942', 2981, '0328', '34569832304806269','31052894'),
|
||||
('671919530', 2976, '0344', '34569832304806251','89860304'),
|
||||
('671919533', 2977, '0668', '34569832304806244','42921771'),
|
||||
('671919535', 2978, '0105', '34569832304806277','31009417'),
|
||||
('671919537', 2979, '0881', '34569832304806285','33479769'),
|
||||
('671919540', 2980, '9874', '34569832304806293','14103929'),
|
||||
('671919525', 2972, '2089', '34569832304806301','45903729'),
|
||||
('671919527', 2973, '8206', '34569832304806368','1586035'),
|
||||
('671919528', 2974, '2532', '34569832304806327','62310124'),
|
||||
('673668717', 2836, '7973', '34562032301044223','15635496'),
|
||||
('673668734', 2837, '4457', '34562032301044231','18313118'),
|
||||
('673668738', 2824, '2911', '34562032301044249','30875583'),
|
||||
('673668745', 2838, '7253', '34562032301044256','62754222'),
|
||||
('673668796', 2839, '0068', '34562032301044264','15556829'),
|
||||
('673668803', 2840, '2386', '34562032301044272','17572287'),
|
||||
('673669591', 2850, '3833', '34562032301044280','34828896'),
|
||||
('673668808', 2841, '3584', '34562032301044298','16234497'),
|
||||
('673670102', 2851, '3554', '34562032301044306','23652625'),
|
||||
('673670131', 2852, '4412', '34562032301044314','88611709'),
|
||||
('673670135', 2827, '6058', '34562032301044322','53918579'),
|
||||
('673670201', 2828, '8066', '34562032301044330','92369343'),
|
||||
('673670225', 2829, '4592', '34562032301044348','24126635'),
|
||||
('673670236', 2830, '2974', '34562032301044355','88608465'),
|
||||
('673671485', 2849, '0349', '34562032301044363','44944874'),
|
||||
('673461977', 2871, '1728', '34562032400157090','46975780'),
|
||||
('673461975', 2870, '4734', '34562032400157082','69628432'),
|
||||
('673461972', 2867, '6276', '34562032400157058','53338365'),
|
||||
('673461979', 2872, '6043', '34562032400157108','36525197'),
|
||||
('673461958', 2859, '3164', '34562032400156977','58947831'),
|
||||
('673461957', 2857, '8685', '34562032400156969','15826386'),
|
||||
('673461944', 2853, '1073', '34562032400156910','20452195'),
|
||||
('673461974', 2869, '7121', '34562032400157074','32044645'),
|
||||
('673461973', 2868, '8022', '34562032400157066','29282044'),
|
||||
('673461971', 2866, '3089', '34562032400157041','66149978'),
|
||||
('673461969', 2865, '7555', '34562032400157033','78391293'),
|
||||
('673461960', 2860, '5203', '34562032400156985','37138232'),
|
||||
('673461952', 2855, '6915', '34562032400156936','62724661'),
|
||||
('673461949', 2854, '8706', '34562032400156928','5594345'),
|
||||
('673461966', 2863, '2496', '34562032400157017','93450666'),
|
||||
('673461968', 2864, '3703', '34562032400157025','23208841'),
|
||||
('673461963', 2862, '9364', '34562032400157009','29712130'),
|
||||
('673462719', 2873, '9387', '34562032400156951','50434348'),
|
||||
('673461962', 2861, '8441', '34562032400156993','39686909'),
|
||||
('673461956', 2826, '5392', '34562032400156944','5496107'),
|
||||
('673465284', 2694, '1523', '34562032400171349','14554994'),
|
||||
('673465282', 2692, '4645', '34562032400171323','24871187'),
|
||||
('673465283', 2693, '5253', '34562032400171331','28303238'),
|
||||
('673465841', 2696, '0849', '34562032400171257','21673222'),
|
||||
('673465258', 2679, '4140', '34562032400171174','39793881'),
|
||||
('673465263', 2680, '6922', '34562032400171182','12253261'),
|
||||
('673465265', 2681, '9112', '34562032400171190','93894366'),
|
||||
('673465267', 2682, '3259', '34562032400171208','2342189'),
|
||||
('673465268', 2683, '8540', '34562032400171216','63886925'),
|
||||
('673465285', 2695, '4167', '34562032400171356','79227618'),
|
||||
('673465270', 2684, '4292', '34562032400171224','19216349'),
|
||||
('673465272', 2685, '4007', '34562032400171232','14396903'),
|
||||
('673465273', 2686, '6894', '34562032400171240','13569394'),
|
||||
('673465274', 2687, '5268', '34562032400171265','59453667'),
|
||||
('673465275', 2688, '0232', '34562032400171273','62324713'),
|
||||
('673465276', 2689, '2720', '34562032400171281','65977200'),
|
||||
('673465843', 2698, '4773', '34562032400171364','78387158'),
|
||||
('673465842', 2697, '3729', '34562032400171315','94201789'),
|
||||
('673465280', 2691, '0503', '34562032400171307','12298533'),
|
||||
('673465279', 2690, '8239', '34562032400171299','76183877');
|
||||
|
||||
UPDATE vn.deviceProductionUser
|
||||
SET simFk = NULL
|
||||
WHERE id IN (
|
||||
SELECT dpu.id
|
||||
FROM vn.deviceProductionUser dpu
|
||||
LEFT JOIN vn.sim s ON s.code = dpu.simFk
|
||||
WHERE s.code IS NULL
|
||||
AND dpu.simFk IS NOT NULL
|
||||
);
|
||||
|
||||
ALTER TABLE vn.deviceProductionUser ADD CONSTRAINT deviceProductionUser_sim_FK
|
||||
FOREIGN KEY (simFk) REFERENCES vn.sim(code) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
GRANT SELECT, INSERT, DELETE, UPDATE ON TABLE vn.sim TO hr;
|
|
@ -0,0 +1,3 @@
|
|||
-- Place your SQL code here
|
||||
INSERT IGNORE INTO salix.ACL (model, property, accessType, permission, principalType, principalId)
|
||||
VALUES('InventoryConfig', 'find', 'READ', 'ALLOW', 'ROLE', 'buyer');
|
|
@ -0,0 +1,48 @@
|
|||
USE vn;
|
||||
|
||||
DROP TRIGGER IF EXISTS invoiceIn_beforeUpdate;
|
||||
|
||||
UPDATE invoiceIn
|
||||
SET cplusRectificationTypeFk = NULL
|
||||
WHERE cplusRectificationTypeFk = 1;
|
||||
|
||||
DELETE IGNORE FROM cplusRectificationType WHERE id = 1;
|
||||
|
||||
UPDATE cplusRectificationType
|
||||
SET id = 1
|
||||
WHERE id = 3;
|
||||
|
||||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`invoiceIn_beforeUpdate`
|
||||
BEFORE UPDATE ON `invoiceIn`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
DECLARE vWithholdingSageFk INT;
|
||||
|
||||
IF NOT (NEW.supplierRef <=> OLD.supplierRef) AND NOT util.checkPrintableChars(NEW.supplierRef) THEN
|
||||
CALL util.throw('The invoiceIn reference contains invalid characters');
|
||||
END IF;
|
||||
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
|
||||
IF (SELECT COUNT(*) FROM invoiceIn
|
||||
WHERE supplierRef = NEW.supplierRef
|
||||
AND supplierFk = NEW.supplierFk
|
||||
AND YEAR(issued) = YEAR(NEW.issued)
|
||||
AND id <> NEW.id
|
||||
) THEN
|
||||
CALL util.throw('reference duplicated');
|
||||
END IF;
|
||||
|
||||
IF NEW.supplierFk != OLD.supplierFk THEN
|
||||
CALL supplier_checkIsActive(NEW.supplierFk);
|
||||
SELECT withholdingSageFk INTO vWithholdingSageFk
|
||||
FROM supplier
|
||||
WHERE id = NEW.supplierFk;
|
||||
SET NEW.withholdingSageFk = vWithholdingSageFk;
|
||||
END IF;
|
||||
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId)
|
||||
VALUES('SiiTypeInvoiceIn', 'find', 'READ', 'ALLOW', 'ROLE', 'salesPerson');
|
||||
|
||||
DROP TABLE IF EXISTS vn.invoiceInCorrection;
|
||||
|
||||
CREATE TABLE `invoiceInCorrection` (
|
||||
`correctingFk` mediumint(8) unsigned NOT NULL COMMENT 'Factura rectificativa',
|
||||
`correctedFk` mediumint(8) unsigned NOT NULL COMMENT 'Factura rectificada',
|
||||
`cplusRectificationTypeFk` int(10) unsigned NOT NULL,
|
||||
`siiTypeInvoiceInFk` int(10) unsigned NOT NULL,
|
||||
`invoiceCorrectionTypeFk` int(11) NOT NULL DEFAULT 3,
|
||||
PRIMARY KEY (`correctingFk`),
|
||||
KEY `invoiceInCorrection_correctedFk` (`correctedFk`),
|
||||
KEY `invoiceInCorrection_cplusRectificationTypeFk` (`cplusRectificationTypeFk`),
|
||||
KEY `invoiceInCorrection_siiTypeInvoiceIn` (`siiTypeInvoiceInFk`),
|
||||
KEY `invoiceInCorrection_invoiceCorrectionTypeFk` (`invoiceCorrectionTypeFk`),
|
||||
CONSTRAINT `invoiceInCorrection_correctedFk` FOREIGN KEY (`correctedFk`) REFERENCES `invoiceIn` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `invoiceInCorrection_correctingFk` FOREIGN KEY (`correctingFk`) REFERENCES `invoiceIn` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `invoiceInCorrection_cplusRectificationTypeFk` FOREIGN KEY (`cplusRectificationTypeFk`) REFERENCES `cplusRectificationType` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `invoiceInCorrection_invoiceCorrectionTypeFk` FOREIGN KEY (`invoiceCorrectionTypeFk`) REFERENCES `invoiceCorrectionType` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `invoiceInCorrection_siiTypeInvoiceIn` FOREIGN KEY (`siiTypeInvoiceInFk`) REFERENCES `siiTypeInvoiceIn` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
ALTER TABLE vn.duaInvoiceIn DROP KEY IF EXISTS duaFk_UNIQUE;
|
||||
ALTER TABLE vn.duaInvoiceIn DROP KEY IF EXISTS duaInvoiceIn_unique;
|
||||
ALTER TABLE vn.duaInvoiceIn ADD CONSTRAINT duaInvoiceIn_unique
|
||||
UNIQUE KEY (invoiceInFk);
|
||||
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE vn.route ADD dated DATE;
|
|
@ -0,0 +1 @@
|
|||
UPDATE vn.route SET dated = created;
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE vn.route
|
||||
MODIFY COLUMN dated DATE NOT NULL;
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE vn.route
|
||||
MODIFY COLUMN created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;
|
|
@ -0,0 +1,2 @@
|
|||
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
|
||||
VALUES ('Worker','canCreateAbsenceInPast','WRITE','ALLOW','ROLE','hr');
|
|
@ -0,0 +1,107 @@
|
|||
INSERT IGNORE INTO vn.saySimpleCountry
|
||||
SET countryFk = 1,
|
||||
channel = '1320';
|
||||
|
||||
UPDATE vn.saySimpleConfig
|
||||
SET defaultChannel = '1819';
|
||||
|
||||
INSERT IGNORE INTO pbx.prefix (country, prefix) VALUES
|
||||
('ES', '0034'),
|
||||
('IT', '0039'),
|
||||
('DE', '0049'),
|
||||
('RO', '0040'),
|
||||
('NL', '0031'),
|
||||
('BE', '0032'),
|
||||
('RU', '007'),
|
||||
('PT', '00351'),
|
||||
('LT', '00370'),
|
||||
('UA', '00380'),
|
||||
('CO', '0057'),
|
||||
('FI', '00358'),
|
||||
('EC', '00593'),
|
||||
('LB', '00961'),
|
||||
('IL', '00972'),
|
||||
('TH', '0066'),
|
||||
('PA', '00507'),
|
||||
('GB', '0044'),
|
||||
('FR', '0033'),
|
||||
('PL', '0048'),
|
||||
('MX', '0052'),
|
||||
('MA', '00212'),
|
||||
('AI', '001268'),
|
||||
('GH', '00233'),
|
||||
('SE', '0046'),
|
||||
('AE', '00971'),
|
||||
('KE', '00254'),
|
||||
('AD', '00376'),
|
||||
('AO', '00244'),
|
||||
('LU', '00352'),
|
||||
('BY', '00375'),
|
||||
('MD', '00373'),
|
||||
('DK', '0045'),
|
||||
('ET', '00251'),
|
||||
('AU', '0061'),
|
||||
('CA', '0001'),
|
||||
('CL', '0056'),
|
||||
('CN', '0086'),
|
||||
('CR', '00506'),
|
||||
('GT', '00502'),
|
||||
('CI', '00225'),
|
||||
('PE', '0051'),
|
||||
('LK', '0094'),
|
||||
('ZA', '0027'),
|
||||
('TR', '0090'),
|
||||
('ZW', '00263'),
|
||||
('MY', '0060'),
|
||||
('NZ', '0064'),
|
||||
('IE', '00353'),
|
||||
('MN', '00976'),
|
||||
('SV', '00503'),
|
||||
('ZM', '00260'),
|
||||
('JP', '0081'),
|
||||
('RW', '00250'),
|
||||
('AL', '00355'),
|
||||
('KW', '00965'),
|
||||
('SG', '0065'),
|
||||
('SR', '00597'),
|
||||
('KR', '0082'),
|
||||
('US', '0001'),
|
||||
('RS', '00381'),
|
||||
('AT', '0043'),
|
||||
('EG', '0020'),
|
||||
('LV', '00371'),
|
||||
('CY', '00357'),
|
||||
('CZ', '00420'),
|
||||
('BB', '001246'),
|
||||
('SK', '00421'),
|
||||
('IN', '0091'),
|
||||
('DZ', '00213'),
|
||||
('BR', '0055'),
|
||||
('GR', '0030'),
|
||||
('MC', '00377'),
|
||||
('SI', '00386'),
|
||||
('GP', '00590'),
|
||||
('NO', '0047'),
|
||||
('CH', '0041'),
|
||||
('AR', '0054'),
|
||||
('CU', '0053'),
|
||||
('GQ', '00240'),
|
||||
('GN', '00224'),
|
||||
('HN', '00504'),
|
||||
('ML', '00223'),
|
||||
('NI', '00505'),
|
||||
('PK', '0092'),
|
||||
('PY', '00595'),
|
||||
('SN', '00221'),
|
||||
('UY', '00598'),
|
||||
('VE', '0058'),
|
||||
('BG', '00359'),
|
||||
('GE', '00995'),
|
||||
('EE', '00372'),
|
||||
('SA', '00966'),
|
||||
('RN', '00234'),
|
||||
('HK', '00852'),
|
||||
('GI', '00350'),
|
||||
('CM', '00237'),
|
||||
('HU', '0036'),
|
||||
('AM', '00374');
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE vn.ticket DROP FOREIGN KEY tickets_zone_fk;
|
||||
ALTER TABLE vn.ticket ADD CONSTRAINT tickets_zone_fk FOREIGN KEY (zoneFk) REFERENCES vn.`zone`(id) ON DELETE SET NULL ON UPDATE CASCADE;
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE vn.`zone` MODIFY COLUMN `price` DECIMAL(10,2);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
-- Place your SQL code here
|
||||
|
||||
|
||||
ALTER TABLE vn.productionConfig ADD IF NOT EXISTS itemOrderReviewHours int(11) DEFAULT 24 NULL
|
||||
COMMENT 'Horas que no se tienen en cuenta para comprobar orden en el almacén, null para desactivar revisión';
|
|
@ -0,0 +1 @@
|
|||
DROP TABLE vn.quadmindsApiConfig;
|
|
@ -0,0 +1,20 @@
|
|||
CREATE TABLE `vn`.`osrmConfig` (
|
||||
`id` int(10) unsigned NOT NULL,
|
||||
`url` varchar(100) NOT NULL COMMENT 'Dirección base de la API',
|
||||
`tolerance` decimal(6,6) NOT NULL DEFAULT 0 COMMENT 'Tolerancia entre las coordenadas enviadas y las retornadas',
|
||||
PRIMARY KEY (`id`),
|
||||
CONSTRAINT `osrmConfig_check` CHECK (`id` = 1)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
|
||||
|
||||
-- Para que no de error al añadir la FK de zone
|
||||
UPDATE vn.zone
|
||||
SET price = 0.1
|
||||
WHERE price = 0;
|
||||
|
||||
ALTER TABLE vn.`zone`
|
||||
ADD addressFk int(11) DEFAULT NULL COMMENT 'Punto de distribución de donde salen para repartir',
|
||||
ADD CONSTRAINT zone_address_FK FOREIGN KEY (addressFk) REFERENCES vn.address(id) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
ALTER TABLE vn.zoneConfig
|
||||
ADD defaultAddressFk int(11) DEFAULT NULL NULL COMMENT 'Punto de distribución por defecto',
|
||||
ADD CONSTRAINT zoneConfig_address_FK FOREIGN KEY (defaultAddressFk) REFERENCES vn.address(id) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
@ -0,0 +1,5 @@
|
|||
INSERT IGNORE INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
|
||||
VALUES ('OsrmConfig','optimize','READ','ALLOW','ROLE','employee'),
|
||||
('Route', 'optimizePriority','*','ALLOW','ROLE','employee');
|
||||
INSERT IGNORE INTO vn.osrmConfig (id,url,tolerance)
|
||||
VALUES (1,'https://router.project-osrm.org', 0.002);
|
|
@ -0,0 +1,3 @@
|
|||
ALTER TABLE vn.mistakeType
|
||||
ADD `time` int(10) NULL COMMENT 'Segundos que se suelen tardar en arreglar el fallo',
|
||||
ADD code varchar(50) DEFAULT NULL NULL AFTER id;
|
|
@ -0,0 +1,5 @@
|
|||
RENAME TABLE vn.inventoryFailure TO vn.inventoryFailure__;
|
||||
ALTER TABLE vn.inventoryFailure__ COMMENT='@deprecated 2024-12-16';
|
||||
|
||||
RENAME TABLE vn.inventoryFailureCause TO vn.inventoryFailureCause__;
|
||||
ALTER TABLE vn.inventoryFailureCause__ COMMENT='@deprecated 2024-12-16';
|
|
@ -0,0 +1,8 @@
|
|||
CREATE TABLE IF NOT EXISTS vn.productionCountry(
|
||||
countryFk MEDIUMINT(8) UNSIGNED NOT NULL,
|
||||
volumeGrowthEstimatePercent DECIMAL(6, 2) COMMENT 'Porcentaje estimado de crecimiento del volumen',
|
||||
PRIMARY KEY (countryFk),
|
||||
CONSTRAINT productionCountryVolume_countryFK
|
||||
FOREIGN KEY (countryFk) REFERENCES vn.country (id)
|
||||
ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
) COMMENT = 'Datos de producción por país'
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
ALTER TABLE vn.country
|
||||
ADD CONSTRAINT country_unique_name UNIQUE KEY (name);
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE `vn`.`item`
|
||||
ADD COLUMN `isCustomInspectionRequired` TINYINT(1) NOT NULL DEFAULT 0 COMMENT 'Indicates if the item requires physical inspection at customs';
|
|
@ -0,0 +1,5 @@
|
|||
DELETE FROM vn.workerMana
|
||||
WHERE workerFk IN (
|
||||
SELECT workerFk
|
||||
FROM vn.workerManaExcluded
|
||||
);
|
|
@ -0,0 +1,4 @@
|
|||
DELETE FROM salix.ACL WHERE property = 'canCreateAbsenceInPast';
|
||||
|
||||
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
|
||||
VALUES ('Worker','canModifyAbsenceInPast','WRITE','ALLOW','ROLE','hr');
|
|
@ -791,7 +791,7 @@ export default {
|
|||
},
|
||||
createRouteView: {
|
||||
worker: 'vn-route-create vn-worker-autocomplete[ng-model="$ctrl.route.workerFk"]',
|
||||
createdDatePicker: 'vn-route-create vn-date-picker[ng-model="$ctrl.route.created"]',
|
||||
createdDatePicker: 'vn-route-create vn-date-picker[ng-model="$ctrl.route.dated"]',
|
||||
vehicleAuto: 'vn-route-create vn-autocomplete[ng-model="$ctrl.route.vehicleFk"]',
|
||||
agency: 'vn-route-create vn-autocomplete[ng-model="$ctrl.route.agencyModeFk"]',
|
||||
description: 'vn-route-create [ng-model="$ctrl.route.description"]',
|
||||
|
|
|
@ -27,18 +27,6 @@ export default class Controller extends Component {
|
|||
setTimeout(() => element.classList.add('shown'), 30);
|
||||
shape.element = element;
|
||||
|
||||
if (data.additionalData && this.vnToken.token) {
|
||||
this.additionalData = data.additionalData;
|
||||
let supportButton = document.createElement('i');
|
||||
supportButton.setAttribute('class', 'material-icons clickable');
|
||||
supportButton.addEventListener('click', () => this.$.supportDialog.show());
|
||||
element.appendChild(supportButton);
|
||||
|
||||
let buttonIcon = 'support_agent';
|
||||
buttonIcon = document.createTextNode(buttonIcon);
|
||||
supportButton.appendChild(buttonIcon);
|
||||
}
|
||||
|
||||
if (shape.type)
|
||||
element.classList.add(shape.type);
|
||||
|
||||
|
|
|
@ -9,13 +9,6 @@ export default class Controller extends Dialog {
|
|||
responseHandler(response) {
|
||||
if (response !== 'accept')
|
||||
return super.responseHandler(response);
|
||||
|
||||
this.$http.post('Ostickets/send-to-support', {
|
||||
reason: this.reason,
|
||||
additionalData: this.additionalData
|
||||
})
|
||||
.then(() => super.responseHandler(response))
|
||||
.then(() => this.vnApp.showSuccess(this.$t('Email sended!')));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -246,5 +246,9 @@
|
|||
"ticketLostExpedition": "The ticket [{{ticketId}}]({{{ticketUrl}}}) has the following lost expedition:{{ expeditionId }}",
|
||||
"The raid information is not correct": "The raid information is not correct",
|
||||
"Payment method is required": "Payment method is required",
|
||||
"Sales already moved": "Sales already moved"
|
||||
}
|
||||
"Sales already moved": "Sales already moved",
|
||||
"Holidays to past days not available": "Holidays to past days not available",
|
||||
"Price cannot be blank": "Price cannot be blank",
|
||||
"There are tickets to be invoiced": "There are tickets to be invoiced",
|
||||
"The address of the customer must have information about Incoterms and Customs Agent": "The address of the customer must have information about Incoterms and Customs Agent"
|
||||
}
|
|
@ -388,7 +388,15 @@
|
|||
"You do not have permission to modify the booked field": "No tienes permisos para modificar el campo contabilizada",
|
||||
"ticketLostExpedition": "El ticket [{{ticketId}}]({{{ticketUrl}}}) tiene la siguiente expedición perdida:{{ expeditionId }}",
|
||||
"The web user's email already exists": "El correo del usuario web ya existe",
|
||||
"Sales already moved": "Ya han sido transferidas",
|
||||
"The raid information is not correct": "La información de la redada no es correcta"
|
||||
"Sales already moved": "Ya han sido transferidas",
|
||||
"The raid information is not correct": "La información de la redada no es correcta",
|
||||
"No trips found because input coordinates are not connected": "No se encontraron rutas porque las coordenadas de entrada no están conectadas",
|
||||
"This request is not supported": "Esta solicitud no es compatible",
|
||||
"Invalid options or too many coordinates": "Opciones invalidas o demasiadas coordenadas",
|
||||
"No address has coordinates": "Ninguna dirección tiene coordenadas",
|
||||
"An item type with the same code already exists": "Un tipo con el mismo código ya existe",
|
||||
"Holidays to past days not available": "Las vacaciones a días pasados no están disponibles",
|
||||
"All tickets have a route order": "Todos los tickets tienen orden de ruta",
|
||||
"Price cannot be blank": "Price cannot be blank",
|
||||
"There are tickets to be invoiced": "La zona tiene tickets por facturar"
|
||||
}
|
||||
|
||||
|
|
|
@ -29,14 +29,14 @@ module.exports = Self => {
|
|||
const models = Self.app.models;
|
||||
const myOptions = {};
|
||||
let tx;
|
||||
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
||||
if (!myOptions.transaction) {
|
||||
tx = await Self.beginTransaction({});
|
||||
myOptions.transaction = tx;
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
const user = await models.VnUser.findOne({
|
||||
|
|
|
@ -80,6 +80,12 @@ module.exports = Self => {
|
|||
description: 'The claimResponsible id',
|
||||
http: {source: 'query'}
|
||||
},
|
||||
{
|
||||
arg: 'zoneFk',
|
||||
type: 'string',
|
||||
description: 'The zone name',
|
||||
http: {source: 'query'}
|
||||
},
|
||||
{
|
||||
arg: 'myTeam',
|
||||
type: 'boolean',
|
||||
|
@ -174,6 +180,8 @@ module.exports = Self => {
|
|||
to.setHours(23, 59, 59, 999);
|
||||
|
||||
return {'cl.created': {between: [value, to]}};
|
||||
case 'zoneFk':
|
||||
return {'t.zoneFk': value};
|
||||
case 'myTeam':
|
||||
if (value)
|
||||
return {'cl.workerFk': {inq: teamMembersId}};
|
||||
|
@ -195,11 +203,15 @@ module.exports = Self => {
|
|||
u.name AS workerName,
|
||||
cs.code stateCode,
|
||||
cs.description stateDescription,
|
||||
cl.created
|
||||
cl.created,
|
||||
z.name zoneName,
|
||||
z.id zoneId
|
||||
FROM claim cl
|
||||
LEFT JOIN client c ON c.id = cl.clientFk
|
||||
LEFT JOIN account.user u ON u.id = cl.workerFk
|
||||
LEFT JOIN claimState cs ON cs.id = cl.claimStateFk`
|
||||
LEFT JOIN claimState cs ON cs.id = cl.claimStateFk
|
||||
LEFT JOIN ticket t ON t.id = cl.ticketFk
|
||||
LEFT JOIN zone z ON z.id = t.zoneFk`
|
||||
);
|
||||
|
||||
stmt.merge(conn.makeSuffix(filter));
|
||||
|
|
|
@ -2,7 +2,7 @@ const UserError = require('vn-loopback/util/user-error');
|
|||
|
||||
module.exports = function(Self) {
|
||||
Self.remoteMethod('canBeInvoiced', {
|
||||
description: 'Change property isEqualizated in all client addresses',
|
||||
description: 'Check if a client can be invoiced',
|
||||
accessType: 'READ',
|
||||
accepts: [
|
||||
{
|
||||
|
@ -38,7 +38,7 @@ module.exports = function(Self) {
|
|||
Object.assign(myOptions, options);
|
||||
|
||||
const client = await models.Client.findById(id, {
|
||||
fields: ['id', 'isTaxDataChecked', 'hasToInvoice', 'payMethodFk'],
|
||||
fields: ['id', 'isTaxDataChecked', 'hasToInvoice', 'payMethodFk', 'isActive'],
|
||||
include:
|
||||
{
|
||||
relation: 'payMethod',
|
||||
|
@ -53,9 +53,6 @@ module.exports = function(Self) {
|
|||
if (client.payMethod().code === 'wireTransfer' && !company.supplierAccountFk)
|
||||
throw new UserError('The company has not informed the supplier account for bank transfers');
|
||||
|
||||
if (client.isTaxDataChecked && client.hasToInvoice)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
return client.isTaxDataChecked && client.hasToInvoice && client.isActive;
|
||||
};
|
||||
};
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue