Compare commits
247 Commits
7151-dms_r
...
dev
Author | SHA1 | Date |
---|---|---|
Alex Moreno | 816a7f23e5 | |
Alex Moreno | 93a0d4cdf4 | |
Alex Moreno | 3c70dd77c9 | |
Alex Moreno | c66ae728d6 | |
Guillermo Bonet | 89d941c115 | |
Guillermo Bonet | f8a79057b2 | |
Ivan Mas | f2b74794de | |
Ivan Mas | f32d709b9d | |
Alex Moreno | 45f7b60f1b | |
Jorge Penadés | 00288e5a7f | |
Guillermo Bonet | c14484366e | |
Guillermo Bonet | 6487497638 | |
Pablo Natek | 7b3a08d222 | |
Pablo Natek | e6df9d426f | |
Pablo Natek | 3057d80e76 | |
Guillermo Bonet | ed6f490188 | |
Guillermo Bonet | 45e6d7f046 | |
Pablo Natek | 5a050e2748 | |
Robert Ferrús | 43e39fd127 | |
Robert Ferrús | 56b0d254b8 | |
Pablo Natek | 0cbaac91c2 | |
Robert Ferrús | 00353186e6 | |
Guillermo Bonet | 2eed2f00a9 | |
Robert Ferrús | 4fc3006298 | |
Robert Ferrús | 35b508d3d6 | |
Alex Moreno | 1a11832281 | |
Carlos Andrés | d007e4f218 | |
Carlos Andrés | 26406b6fdb | |
Sergio De la torre | b0b64b2630 | |
Sergio De la torre | f6941928cd | |
Sergio De la torre | 0b5ef35d22 | |
Alex Moreno | ed39ae7e4b | |
Jorge Penadés | e2d827d937 | |
Jorge Penadés | 584287b211 | |
Jorge Penadés | a68d7e8c0b | |
Jorge Penadés | 9da5b4ecda | |
Jorge Penadés | ca1ccff10b | |
Guillermo Bonet | 65ca1b5af3 | |
Carlos Andrés | 771aeaa9bd | |
Guillermo Bonet | 1c6f59a0ec | |
Guillermo Bonet | 4ab2d7fd09 | |
Ivan Mas | 00412e3258 | |
Carlos Andrés | 7cf6acec19 | |
Guillermo Bonet | c440472693 | |
Jorge Penadés | 470d9bde64 | |
Jorge Penadés | b97058735c | |
Guillermo Bonet | 46c85d44d6 | |
Guillermo Bonet | a731bb3a45 | |
Guillermo Bonet | c73196edec | |
Javier Segarra | f01051a266 | |
Javier Segarra | a6d2f9c3f8 | |
Javier Segarra | 0c592946e6 | |
Carlos Andrés | 52364bbe2d | |
Carlos Andrés | 7ad17d75d7 | |
Javi Gallego | 78d3d01649 | |
Javi Gallego | 41b3f34158 | |
Sergio De la torre | fc75eae338 | |
Sergio De la torre | 5ac255ac52 | |
Javi Gallego | 53673f43b8 | |
Javi Gallego | 0ecbef0c9f | |
Carlos Andrés | 770ace0f8e | |
Carlos Andrés | 2563d1f0e4 | |
Carlos Andrés | 0870a1c3d6 | |
Carlos Andrés | dbf71b981e | |
Javi Gallego | 80851e094d | |
Javi Gallego | 510fffb61a | |
Carlos Andrés | 762d4b9955 | |
Sergio De la torre | 07201f6448 | |
Sergio De la torre | 512b4a54df | |
Carlos Satorres | 7b177fa09f | |
Carlos Satorres | 2978af8341 | |
Ivan Mas | fee9bbe387 | |
Ivan Mas | b2fa7e7caf | |
Javi Gallego | b3ce3a0cc2 | |
Jon Elias | 9cd16981e6 | |
Alex Moreno | 0ac46882be | |
Alex Moreno | f5b16ca36d | |
Carlos Satorres | 2098ea7163 | |
Carlos Andrés | 031c4398ae | |
Jorge Penadés | e125dee691 | |
Jorge Penadés | 940bc8caed | |
Ivan Mas | 0274c01c14 | |
Ivan Mas | 830573e229 | |
Carlos Satorres | 82f4815282 | |
Guillermo Bonet | 69bdf8efb2 | |
Sergio De la torre | a8dea64bc1 | |
Sergio De la torre | 9fbffe8a6b | |
Jorge Penadés | 16111220fb | |
Jorge Penadés | bbb7815765 | |
Carlos Satorres | d46683cd31 | |
Carlos Satorres | 7ab1b7d171 | |
Carlos Satorres | df249b05d3 | |
Pablo Natek | cde3c8c50a | |
Guillermo Bonet | 42a27f3407 | |
Guillermo Bonet | d302a9c3ba | |
Guillermo Bonet | 917e3128a9 | |
Guillermo Bonet | 22ce7a4dd4 | |
Guillermo Bonet | a4b568e9b8 | |
Carlos Satorres | 91164624bc | |
Carlos Satorres | be311c0557 | |
Jorge Penadés | e4317a385c | |
Jorge Penadés | 3cce342d9d | |
Pablo Natek | 5e52b3b596 | |
Carlos Andrés | ad345a0b91 | |
Carlos Andrés | 43abb52efc | |
Ivan Mas | 715cea0670 | |
Ivan Mas | a9d45bde4c | |
Alex Moreno | 46148d7ba3 | |
Alex Moreno | 033e269a5d | |
Carlos Andrés | 63c0747304 | |
Carlos Andrés | 953bc84a58 | |
Jon Elias | 492c79de46 | |
Jon Elias | 149524f4fd | |
Jon Elias | f145649fc7 | |
Carlos Andrés | 6a43d3c752 | |
Jorge Penadés | 2335b57e05 | |
Jorge Penadés | c31fa7e9cf | |
Alex Moreno | 60734136c3 | |
Sergio De la torre | f192b92c6a | |
Robert Ferrús | b29053e850 | |
Jorge Penadés | f89080d373 | |
Sergio De la torre | feb11c123e | |
Sergio De la torre | d21b42a567 | |
Robert Ferrús | 7b5e474d24 | |
Carlos Andrés | a7ab8696ac | |
Carlos Andrés | 43e121a2f3 | |
Alex Moreno | 6a65ab42ce | |
Alex Moreno | 562d3b0f70 | |
Pablo Natek | a3f92a284f | |
Pablo Natek | 2f93da199a | |
Alex Moreno | 413e9e1e9f | |
Alex Moreno | 7f39edf014 | |
Pablo Natek | 0d205eb6ce | |
Sergio De la torre | f3e5806990 | |
Sergio De la torre | 6a94848007 | |
Sergio De la torre | 38f2421de0 | |
Sergio De la torre | 8840d57041 | |
Sergio De la torre | 2335ef754a | |
Javi Gallego | 7a9bcf11e2 | |
Pablo Natek | b70b69557e | |
Pablo Natek | 4e7a96442a | |
Pablo Natek | 33d9ba9b44 | |
Pablo Natek | 056b5adddc | |
Javi Gallego | a40a5a22ab | |
Alex Moreno | 28ee32a411 | |
Carlos Satorres | 6b0d7762b4 | |
Carlos Satorres | 2790e92741 | |
Carlos Satorres | 6619ec451c | |
Guillermo Bonet | 8d4769d74d | |
Guillermo Bonet | cdcc5051d2 | |
Guillermo Bonet | 2b770c0201 | |
Guillermo Bonet | aed4bc89c7 | |
Javi Gallego | 72415a4348 | |
Guillermo Bonet | baadd621e1 | |
Javier Segarra | 3f6a23fe35 | |
Javier Segarra | 4b64b27ca7 | |
Jorge Penadés | 433f883700 | |
Pablo Natek | d2b545aaae | |
Guillermo Bonet | 66009ee0dd | |
Guillermo Bonet | 754c0cb9ab | |
Guillermo Bonet | a64f9b74ec | |
Jorge Penadés | dd637b9333 | |
Jorge Penadés | 5e78317b5e | |
Javier Segarra | f471f7e76c | |
Javier Segarra | 9558d030ff | |
Robert Ferrús | 5e21e4e368 | |
Robert Ferrús | 329488d700 | |
Guillermo Bonet | 2b97c18412 | |
Sergio De la torre | 7d5928bc3d | |
Guillermo Bonet | e81727f3f8 | |
Guillermo Bonet | 353ca659cd | |
Javier Segarra | 6c00efae89 | |
Ivan Mas | 2a1c0ef2af | |
Ivan Mas | 6a11416838 | |
Jon Elias | d2ea0a4bbd | |
Jon Elias | 7d7c66de89 | |
Jon Elias | 4783cc23ac | |
Jon Elias | af781d4c1a | |
Jon Elias | 6ed521ae5e | |
Pablo Natek | 60f989b566 | |
Pablo Natek | 55daa2d02b | |
Guillermo Bonet | b529ccfe29 | |
Robert Ferrús | 923296e85e | |
Guillermo Bonet | a3945070f2 | |
Robert Ferrús | c5f1b05671 | |
Robert Ferrús | f7a5fc7e31 | |
Pablo Natek | 86e4e3e981 | |
Sergio De la torre | 07318656b7 | |
Sergio De la torre | 7a4455d6d0 | |
Pablo Natek | d8e728e823 | |
Pablo Natek | 9ac54f463a | |
Guillermo Bonet | b9397c527d | |
Guillermo Bonet | bde192966e | |
Guillermo Bonet | cba1abad68 | |
Guillermo Bonet | d4b0da50d0 | |
Jon Elias | 66149a69a7 | |
Jon Elias | 7be1bc385f | |
Guillermo Bonet | b7655b4f92 | |
Guillermo Bonet | 477fb7ded9 | |
Jon Elias | dcae6dfbb4 | |
Jon Elias | ea4adbea85 | |
Jon Elias | 0f913d8975 | |
Ivan Mas | 870882cdc1 | |
Ivan Mas | 20bd426704 | |
Carlos Andrés | b8f2e0b906 | |
Carlos Andrés | 358ed2513d | |
Carlos Andrés | 69d6e4a104 | |
Sergio De la torre | 3a8c37aef8 | |
Javi Gallego | ea45d1da0a | |
Carlos Andrés | cf102699d5 | |
Jorge Penadés | a41fc36f90 | |
Jorge Penadés | e0ffc2840b | |
Jon Elias | bb7cecdcff | |
Jon Elias | 1e8a7eff60 | |
Jon Elias | 25891e0bad | |
Jorge Penadés | 5c054fe0d3 | |
Pablo Natek | c4fc51f4b8 | |
Pablo Natek | 50a73c98a2 | |
Pablo Natek | d6349f113c | |
Pablo Natek | 0c20aea45f | |
Pablo Natek | 39f7391abf | |
Pablo Natek | fc61f7e4ab | |
Carlos Satorres | 73efb8f1a8 | |
Carlos Satorres | fa108e2af0 | |
Carlos Satorres | c5afde3334 | |
Carlos Satorres | e0e487859f | |
Javi Gallego | cd3dd854ef | |
Carlos Satorres | ca6d8a67cb | |
Carlos Satorres | 6b10f60933 | |
Carlos Satorres | 55a409c680 | |
Javi Gallego | a432133c18 | |
Carlos Satorres | 248ae64872 | |
Javi Gallego | fa9451ea38 | |
Pablo Natek | 838dd9e1b4 | |
Carlos Satorres | 903d85a243 | |
Carlos Satorres | 0a726a8fe7 | |
Robert Ferrús | 7e0f19b368 | |
Sergio De la torre | 989b68c33a | |
Pablo Natek | 78ee7e141d | |
Pablo Natek | a35c10adab | |
Pablo Natek | 3ce8d21ed3 | |
Carlos Satorres | 60375d153f | |
Carlos Satorres | 355ce46393 | |
Carlos Satorres | 5da6c09f68 | |
Carlos Satorres | c0ee82fd4f | |
Carlos Satorres | 1a01b3e587 | |
Guillermo Bonet | 33f1ed360b |
|
@ -36,3 +36,7 @@ rules:
|
||||||
jasmine/no-focused-tests: 0
|
jasmine/no-focused-tests: 0
|
||||||
jasmine/prefer-toHaveBeenCalledWith: 0
|
jasmine/prefer-toHaveBeenCalledWith: 0
|
||||||
arrow-spacing: ["error", { "before": true, "after": true }]
|
arrow-spacing: ["error", { "before": true, "after": true }]
|
||||||
|
no-restricted-syntax:
|
||||||
|
- "error"
|
||||||
|
- selector: "NewExpression[callee.name='Date']"
|
||||||
|
message: "Use Date.vnNew() instead of new Date()."
|
||||||
|
|
114
CHANGELOG.md
114
CHANGELOG.md
|
@ -1,3 +1,117 @@
|
||||||
|
# Version 24.48 - 2024-11-25
|
||||||
|
|
||||||
|
### Added 🆕
|
||||||
|
|
||||||
|
- feat: refs #4948 Added ticket_selfConsumptionPackaging by:guillermo
|
||||||
|
- feat: refs #6818 add config table by:jorgep
|
||||||
|
- feat: refs #6818 add records by:jorgep
|
||||||
|
- feat: refs #6818 saysimple integration by:jorgep
|
||||||
|
- feat: refs #6845 userInterface by:sergiodt
|
||||||
|
- feat: refs #6869 add back by:jorgep
|
||||||
|
- feat: refs #6869 define model by:jorgep
|
||||||
|
- feat: refs #6869 refs#6869 itemShelving_get (origin/6869-createGetDetails) by:sergiodt
|
||||||
|
- feat: refs #7006 itemTypeLog by:guillermo
|
||||||
|
- feat: refs #7006 itemTypeLog created by:guillermo
|
||||||
|
- feat: refs #7006 Requested changes by:guillermo
|
||||||
|
- feat: refs #7193 added scope in parking model by:Jon
|
||||||
|
- feat: refs #7244 Requested changes by:guillermo
|
||||||
|
- feat: refs #7266 Added details and improvements in item label reports by:guillermo
|
||||||
|
- feat: refs #7266 buyFkForPrint by:sergiodt
|
||||||
|
- feat: refs #7266 First commit by:guillermo
|
||||||
|
- feat: refs #7266 Item label barcode by:guillermo
|
||||||
|
- feat: refs #7266 Item label QR by:guillermo
|
||||||
|
- feat: refs #7266 Item label QR finished by:guillermo
|
||||||
|
- feat: refs #7266 Minor change by:guillermo
|
||||||
|
- feat: refs #7266 Print corrections by:guillermo
|
||||||
|
- feat: refs #7266 Requested changes and improvements by:guillermo
|
||||||
|
- feat: refs #7266 Requested changes and query optimization by:guillermo
|
||||||
|
- feat: refs #7266 Version by:guillermo
|
||||||
|
- feat: refs #7289 #7289 apply option 1 by:Javier Segarra
|
||||||
|
- feat: refs #7289 #7289 remove bad translation by:Javier Segarra
|
||||||
|
- feat: refs #7524 restrict fields by:jorgep
|
||||||
|
- feat: refs #7641 fine tunning by:jorgep
|
||||||
|
- feat: refs #7641 improve style by:jorgep
|
||||||
|
- feat: refs #7743 add simple spec for sendMail by:pablone
|
||||||
|
- feat: refs #7743 add try catch stmt to the test by:pablone
|
||||||
|
- feat: refs #7874 add default type by:jorgep
|
||||||
|
- feat: refs #7874 use name by:jorgep
|
||||||
|
- feat: refs #7920 Added ItemShelving in shelvingLog by:guillermo
|
||||||
|
- feat: refs #7921 refs#7921 sendLostExpedition by:sergiodt
|
||||||
|
- feat: refs #7922 refs #792 scanOrder by:sergiodt
|
||||||
|
- feat: refs #7943 quitar lectura en metodos comunes by:jgallego
|
||||||
|
- feat: refs #7943 return just the required content by:jorgep
|
||||||
|
- feat: refs #7943 usa back con permisos by:jgallego
|
||||||
|
- feat: refs #8020 machineWorkerDeprecated by:sergiodt
|
||||||
|
- feat: refs #8057 Added data updates by:guillermo
|
||||||
|
- feat: refs #8057 Added data updates (origin/8057-geoFk) by:guillermo
|
||||||
|
- feat: refs #8057 Added geoFk columns by:guillermo
|
||||||
|
- feat: refs #8057 Fix version by:guillermo
|
||||||
|
- feat: refs #8057 More precision in getGeo by:guillermo
|
||||||
|
- feat: refs #8057 Requested changes by:guillermo
|
||||||
|
- feat: refs #8071 quitar esquema by:robert
|
||||||
|
- feat: refs #8071 travel_weeklyClone by:robert
|
||||||
|
- feat: refs #8080 Added column comment by:guillermo
|
||||||
|
- feat: refs #8083 add prop by:jorgep
|
||||||
|
- feat: refs #8087 Traspasar redadas a travels by:Carlos Andrés
|
||||||
|
- feat: refs #8099 refs#8099 addComplmentSalary by:sergiodt
|
||||||
|
- feat: refs #8124 Enrutadores nuevos requerimientos by:Carlos Andrés
|
||||||
|
- feat: refs #8124 Enrutadores nuevos requerimientos (origin/8124-enrutadoresNuevosRequerimientos) by:Carlos Andrés
|
||||||
|
- feat: refs #8127 entry_getCommission by:robert
|
||||||
|
- feat: refs #8127 quitar esquemas by:robert
|
||||||
|
- feat: refs #8135 refs#8135 updateTicketACL (origin/8135-ticketACL) by:sergiodt
|
||||||
|
- feat: refs #8143 deprecate recoverPass and sync from account.user by:ivanm
|
||||||
|
- feat: refs #8150 movExpeditions by:sergiodt
|
||||||
|
- feat: refs #8151 Added test by:guillermo
|
||||||
|
- feat: refs #8151 moveExpeditions by:guillermo
|
||||||
|
- feat: refs #8151 Requested changes by:guillermo
|
||||||
|
- feat(Supplier): refs #6828 add companySize by:alexm
|
||||||
|
- refactor: refs #7641 entry report style by:jorgep
|
||||||
|
|
||||||
|
### Changed 📦
|
||||||
|
|
||||||
|
- refactor: refs #6920 add correct role by:alexm
|
||||||
|
- refactor: refs #7242 Deleted select column by:guillermo
|
||||||
|
- refactor: refs #7457 Added from param if not exists by:guillermo
|
||||||
|
- refactor: refs #7641 entry report style by:jorgep
|
||||||
|
- refactor: refs #7715 Deleted hasNewLabelMrwMethod column by:guillermo
|
||||||
|
- refactor: refs #7920 Fix tests by:guillermo
|
||||||
|
- refactor: refs #7920 Fix version by:guillermo
|
||||||
|
- refactor: refs #7920 itemShelvingLog by:guillermo
|
||||||
|
- refactor: refs #7920 Main change by:guillermo
|
||||||
|
- refactor: refs #7920 Major changes by:guillermo
|
||||||
|
- refactor: refs #7920 No changes in itemShelvingLog table by:guillermo
|
||||||
|
- refactor: refs #7920 Requested changes by:guillermo
|
||||||
|
- refactor: refs #7950 Created cmr model (7950-cmrModelUnify) by:guillermo
|
||||||
|
- refactor: refs #7950 Requested changes by:guillermo
|
||||||
|
- refactor: refs #8153 Optimized order_getTax by:guillermo
|
||||||
|
|
||||||
|
### Fixed 🛠️
|
||||||
|
|
||||||
|
- fix: clean deletes also zoneEvent range records by:jgallego
|
||||||
|
- fix: more data for fixture.before by:Pako
|
||||||
|
- fix: refs #4948 Tests by:guillermo
|
||||||
|
- fix: refs #6644 email and translations by:carlossa
|
||||||
|
- fix: refs #6818 add config by:jorgep
|
||||||
|
- fix: refs #6818 add defaultChannel by:jorgep
|
||||||
|
- fix: refs #6818 use right col type by:jorgep
|
||||||
|
- fix: refs #6869 use id as primaryKey by:jorgep
|
||||||
|
- fix: refs #7244 Added collection ACL by:guillermo
|
||||||
|
- fix: refs #7283 item filters by:carlossa
|
||||||
|
- fix: refs #7283 remove by:carlossa
|
||||||
|
- fix: refs #7283 remove tests by:carlossa
|
||||||
|
- fix: refs #7283 tback by:carlossa
|
||||||
|
- fix: refs #7323 add remaining fields (origin/7323-warfix-addRemainingFields) by:jorgep
|
||||||
|
- fix: refs #7457 add with on select to reduce by:pablone
|
||||||
|
- fix: refs #7457 empty commit for gitea by:pablone
|
||||||
|
- fix: refs #7457 error on empty from param and add translate by:pablone
|
||||||
|
- fix: refs #7457 remove group by calc time reduce bellow 1s by:pablone
|
||||||
|
- fix: refs #7457 remove translate and use param definition for restriction by:pablone
|
||||||
|
- fix: refs #7641 align columns by:jorgep
|
||||||
|
- fix: refs #7641 drop boilerplate code by:jorgep
|
||||||
|
- fix: refs #7920 refs#7920 itemShelvingLog by:sergiodt
|
||||||
|
- fix: refs #8153 Version by:guillermo
|
||||||
|
- revert cd7ed6987a88e00275b562d3248f368b6333620c by:Javier Segarra
|
||||||
|
|
||||||
# Version 24.38 - 2024-09-17
|
# Version 24.38 - 2024-09-17
|
||||||
|
|
||||||
### Added 🆕
|
### Added 🆕
|
||||||
|
|
|
@ -29,10 +29,8 @@ module.exports = Self => {
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.getSales = async(ctx, collectionOrTicketFk, print, source, options) => {
|
Self.getSales = async(ctx, collectionOrTicketFk, print, source, options) => {
|
||||||
const models = Self.app.models;
|
|
||||||
const userId = ctx.req.accessToken.userId;
|
const userId = ctx.req.accessToken.userId;
|
||||||
const myOptions = {userId};
|
const myOptions = {userId};
|
||||||
const $t = ctx.req.__;
|
|
||||||
|
|
||||||
if (typeof options == 'object')
|
if (typeof options == 'object')
|
||||||
Object.assign(myOptions, options);
|
Object.assign(myOptions, options);
|
||||||
|
@ -59,22 +57,6 @@ module.exports = Self => {
|
||||||
|
|
||||||
if (print) await Self.rawSql('CALL vn.collection_printSticker(?,NULL)', [id], myOptions);
|
if (print) await Self.rawSql('CALL vn.collection_printSticker(?,NULL)', [id], myOptions);
|
||||||
|
|
||||||
for (let ticket of tickets) {
|
|
||||||
if (ticket.observaciones) {
|
|
||||||
let observations = ticket.observaciones.split(' ');
|
|
||||||
|
|
||||||
for (let observation of observations) {
|
|
||||||
const salesPerson = ticket.salesPersonFk;
|
|
||||||
if (observation.startsWith('#') || observation.startsWith('@')) {
|
|
||||||
await models.Chat.send(ctx,
|
|
||||||
observation,
|
|
||||||
$t('ticketCommercial', {ticket: ticket.ticketFk, salesPerson})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return getCollection(id, tickets, sales, placements, myOptions);
|
return getCollection(id, tickets, sales, placements, myOptions);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -57,13 +57,14 @@ module.exports = Self => {
|
||||||
ROW_NUMBER () OVER (PARTITION BY s.id ORDER BY pickingOrder) currentItemShelving,
|
ROW_NUMBER () OVER (PARTITION BY s.id ORDER BY pickingOrder) currentItemShelving,
|
||||||
COUNT(*) OVER (PARTITION BY s.id ORDER BY s.id) totalItemShelving,
|
COUNT(*) OVER (PARTITION BY s.id ORDER BY s.id) totalItemShelving,
|
||||||
sh.code,
|
sh.code,
|
||||||
p2.code parkingCode,
|
p2.code parkingCodePrevia,
|
||||||
p2.pickingOrder pickingOrder,
|
p2.pickingOrder pickingOrderPrevia,
|
||||||
p.code parkingCodePrevia,
|
p.code parkingCode,
|
||||||
p.pickingOrder pickingOrderPrevia,
|
p.pickingOrder pickingOrder,
|
||||||
iss.id itemShelvingSaleFk,
|
iss.id itemShelvingSaleFk,
|
||||||
iss.isPicked,
|
iss.isPicked,
|
||||||
iss.itemShelvingFk
|
iss.itemShelvingFk,
|
||||||
|
st.code stateCode
|
||||||
FROM ticketCollection tc
|
FROM ticketCollection tc
|
||||||
LEFT JOIN collection c ON c.id = tc.collectionFk
|
LEFT JOIN collection c ON c.id = tc.collectionFk
|
||||||
JOIN sale s ON s.ticketFk = tc.ticketFk
|
JOIN sale s ON s.ticketFk = tc.ticketFk
|
||||||
|
@ -77,6 +78,7 @@ module.exports = Self => {
|
||||||
LEFT JOIN parking p ON p.id = sh.parkingFk
|
LEFT JOIN parking p ON p.id = sh.parkingFk
|
||||||
LEFT JOIN itemColor ic ON ic.itemFk = s.itemFk
|
LEFT JOIN itemColor ic ON ic.itemFk = s.itemFk
|
||||||
LEFT JOIN origin o ON o.id = i.originFk
|
LEFT JOIN origin o ON o.id = i.originFk
|
||||||
|
LEFT JOIN state st ON st.id = sg.stateFk
|
||||||
WHERE tc.collectionFk = ?
|
WHERE tc.collectionFk = ?
|
||||||
GROUP BY s.id, ish.id, p.code, p2.code
|
GROUP BY s.id, ish.id, p.code, p2.code
|
||||||
UNION ALL
|
UNION ALL
|
||||||
|
@ -104,7 +106,8 @@ module.exports = Self => {
|
||||||
p.pickingOrder,
|
p.pickingOrder,
|
||||||
iss.id itemShelvingSaleFk,
|
iss.id itemShelvingSaleFk,
|
||||||
iss.isPicked,
|
iss.isPicked,
|
||||||
iss.itemShelvingFk
|
iss.itemShelvingFk,
|
||||||
|
st.code stateCode
|
||||||
FROM sectorCollection sc
|
FROM sectorCollection sc
|
||||||
JOIN sectorCollectionSaleGroup ss ON ss.sectorCollectionFk = sc.id
|
JOIN sectorCollectionSaleGroup ss ON ss.sectorCollectionFk = sc.id
|
||||||
JOIN saleGroup sg ON sg.id = ss.saleGroupFk
|
JOIN saleGroup sg ON sg.id = ss.saleGroupFk
|
||||||
|
@ -118,6 +121,7 @@ module.exports = Self => {
|
||||||
LEFT JOIN parking p ON p.id = sh.parkingFk
|
LEFT JOIN parking p ON p.id = sh.parkingFk
|
||||||
LEFT JOIN itemColor ic ON ic.itemFk = s.itemFk
|
LEFT JOIN itemColor ic ON ic.itemFk = s.itemFk
|
||||||
LEFT JOIN origin o ON o.id = i.originFk
|
LEFT JOIN origin o ON o.id = i.originFk
|
||||||
|
LEFT JOIN state st ON st.id = sg.stateFk
|
||||||
WHERE sc.id = ?
|
WHERE sc.id = ?
|
||||||
AND sgd.saleGroupFk
|
AND sgd.saleGroupFk
|
||||||
GROUP BY s.id, ish.id, p.code, p2.code`, [id, id], myOptions);
|
GROUP BY s.id, ish.id, p.code, p2.code`, [id, id], myOptions);
|
||||||
|
|
|
@ -28,9 +28,10 @@ describe('ticket assign()', () => {
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should throw an error when there is not picking tickets', async() => {
|
it('should throw an error when there are no picking tickets', async() => {
|
||||||
try {
|
try {
|
||||||
await models.Collection.assign(ctx, options);
|
await models.Collection.assign(ctx, options);
|
||||||
|
fail('Expected an error to be thrown, but none was thrown.');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
expect(e.message).toEqual('There are not picking tickets');
|
expect(e.message).toEqual('There are not picking tickets');
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ module.exports = Self => {
|
||||||
const url = await Self.app.models.Url.findOne({
|
const url = await Self.app.models.Url.findOne({
|
||||||
where: {
|
where: {
|
||||||
appName,
|
appName,
|
||||||
environment: process.env.NODE_ENV || 'dev'
|
environment: process.env.NODE_ENV || 'development'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return url?.url;
|
return url?.url;
|
||||||
|
|
|
@ -31,7 +31,7 @@ module.exports = Self => {
|
||||||
return await Self.rawSql(`
|
return await Self.rawSql(`
|
||||||
INSERT INTO workerActivity (workerFk, workerActivityTypeFk, model)
|
INSERT INTO workerActivity (workerFk, workerActivityTypeFk, model)
|
||||||
SELECT ?, ?, ?
|
SELECT ?, ?, ?
|
||||||
FROM workerTimeControlParams wtcp
|
FROM workerTimeControlConfig wtcc
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT wa.workerFk,
|
SELECT wa.workerFk,
|
||||||
wa.created,
|
wa.created,
|
||||||
|
@ -44,7 +44,7 @@ module.exports = Self => {
|
||||||
) sub ON TRUE
|
) sub ON TRUE
|
||||||
WHERE sub.workerFk IS NULL
|
WHERE sub.workerFk IS NULL
|
||||||
OR sub.code <> ?
|
OR sub.code <> ?
|
||||||
OR TIMESTAMPDIFF(SECOND, sub.created, util.VN_NOW()) > wtcp.dayBreak;`
|
OR TIMESTAMPDIFF(SECOND, sub.created, util.VN_NOW()) > wtcc.dayBreak;`
|
||||||
, [userId, code, model, userId, code], myOptions);
|
, [userId, code, model, userId, code], myOptions);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -79,6 +79,9 @@
|
||||||
"ImageCollectionSize": {
|
"ImageCollectionSize": {
|
||||||
"dataSource": "vn"
|
"dataSource": "vn"
|
||||||
},
|
},
|
||||||
|
"ImageConfig": {
|
||||||
|
"dataSource": "vn"
|
||||||
|
},
|
||||||
"ImageContainer": {
|
"ImageContainer": {
|
||||||
"dataSource": "imageStorage"
|
"dataSource": "imageStorage"
|
||||||
},
|
},
|
||||||
|
|
|
@ -14,9 +14,6 @@
|
||||||
},
|
},
|
||||||
"itemFk": {
|
"itemFk": {
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
|
||||||
"isChecked": {
|
|
||||||
"type": "boolean"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"name": "ImageConfig",
|
||||||
|
"base": "VnModel",
|
||||||
|
"options": {
|
||||||
|
"mysql": {
|
||||||
|
"table": "hedera.imageConfig"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"url": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"acls": [
|
||||||
|
{
|
||||||
|
"accessType": "READ",
|
||||||
|
"principalType": "ROLE",
|
||||||
|
"principalId": "$authenticated",
|
||||||
|
"permission": "ALLOW"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -4,7 +4,7 @@ USE `util`;
|
||||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||||
|
|
||||||
INSERT INTO `version` VALUES ('vn-database','11311','315864403260623fede9f0471ef3d9036faf23b1','2024-11-12 08:00:59','11336');
|
INSERT INTO `version` VALUES ('vn-database','11358','45f7b60f1b43b24505a3e9abc6738dc484ad4fd5','2024-11-26 12:27:58','11365');
|
||||||
|
|
||||||
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','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);
|
INSERT INTO `versionLog` VALUES ('vn-database','10112','00-firstScript.sql','jenkins@10.0.2.69','2022-05-09 09:14:53',NULL,NULL);
|
||||||
|
@ -1065,11 +1065,50 @@ INSERT INTO `versionLog` VALUES ('vn-database','11290','00-firstScript.sql','jen
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11291','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-17 09:10:30',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11291','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-17 09:10:30',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11294','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:37',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11294','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:37',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11295','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-10 08:45:13',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11295','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-10 08:45:13',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11297','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:29',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11297','01-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11298','00-closure.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:37',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11298','00-closure.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:37',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11300','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-18 08:27:05',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11300','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-18 08:27:05',NULL,NULL);
|
||||||
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','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','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','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','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','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','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','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','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);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11342','03-itemShelving.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:11:07',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11342','04-itemShelvingLog.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:11:07',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11342','05-itemShelvingLog.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:11:07',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11342','06-itemShelvingLog.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:11:07',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11343','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:11:07',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11344','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-13 17:36:45',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11344','01-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-13 17:46:26',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11345','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:11:08',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11346','00-address.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:15:02',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11346','01-client.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:16:29',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11346','02-supplier.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:27:57',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11347','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:27:57',NULL,NULL);
|
||||||
|
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','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','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);
|
||||||
|
|
||||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||||
|
@ -1973,13 +2012,11 @@ 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 (606,'Ticket','isLocked','READ','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (607,'Ticket','freightCost','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 (608,'Ticket','getComponentsSum','READ','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (609,'Ticket','updateAttributes','WRITE','ALLOW','ROLE','delivery',NULL);
|
INSERT INTO `ACL` VALUES (609,'Ticket','updateAttributes','WRITE','ALLOW','ROLE','deliveryAssistant',10578);
|
||||||
INSERT INTO `ACL` VALUES (610,'Ticket','deliveryNoteCsv','READ','ALLOW','ROLE','employee',NULL);
|
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 (611,'State','find','READ','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (612,'State','findById','READ','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (612,'State','findById','READ','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (613,'State','findOne','READ','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (613,'State','findOne','READ','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (614,'Worker','find','READ','ALLOW','ROLE','employee',NULL);
|
|
||||||
INSERT INTO `ACL` VALUES (616,'Worker','findOne','READ','ALLOW','ROLE','employee',NULL);
|
|
||||||
INSERT INTO `ACL` VALUES (617,'Worker','filter','READ','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (617,'Worker','filter','READ','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (618,'Worker','getWorkedHours','READ','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (618,'Worker','getWorkedHours','READ','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (619,'Worker','active','READ','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (619,'Worker','active','READ','ALLOW','ROLE','employee',NULL);
|
||||||
|
@ -2045,7 +2082,6 @@ INSERT INTO `ACL` VALUES (716,'ExpeditionMistake','*','WRITE','ALLOW','ROLE','em
|
||||||
INSERT INTO `ACL` VALUES (717,'WorkerMistake','*','WRITE','ALLOW','ROLE','coolerAssist',NULL);
|
INSERT INTO `ACL` VALUES (717,'WorkerMistake','*','WRITE','ALLOW','ROLE','coolerAssist',NULL);
|
||||||
INSERT INTO `ACL` VALUES (718,'MistakesTypes','*','WRITE','ALLOW','ROLE','coolerAssist',NULL);
|
INSERT INTO `ACL` VALUES (718,'MistakesTypes','*','WRITE','ALLOW','ROLE','coolerAssist',NULL);
|
||||||
INSERT INTO `ACL` VALUES (719,'MistakeType','*','READ','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (719,'MistakeType','*','READ','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (720,'MachineWorker','*','READ','ALLOW','ROLE','coolerAssist',NULL);
|
|
||||||
INSERT INTO `ACL` VALUES (721,'Printer','*','READ','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (721,'Printer','*','READ','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (722,'SaleMistake','*','WRITE','ALLOW','ROLE','production',NULL);
|
INSERT INTO `ACL` VALUES (722,'SaleMistake','*','WRITE','ALLOW','ROLE','production',NULL);
|
||||||
INSERT INTO `ACL` VALUES (723,'Item','setVisibleDiscard','WRITE','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (723,'Item','setVisibleDiscard','WRITE','ALLOW','ROLE','employee',NULL);
|
||||||
|
@ -2083,13 +2119,10 @@ INSERT INTO `ACL` VALUES (755,'Route','findById','READ','ALLOW','ROLE','employee
|
||||||
INSERT INTO `ACL` VALUES (756,'Route','findOne','READ','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (756,'Route','findOne','READ','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (757,'Route','getRoutesByWorker','READ','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (757,'Route','getRoutesByWorker','READ','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (758,'Route','canViewAllRoute','READ','ALLOW','ROLE','deliveryAssistant',NULL);
|
INSERT INTO `ACL` VALUES (758,'Route','canViewAllRoute','READ','ALLOW','ROLE','deliveryAssistant',NULL);
|
||||||
INSERT INTO `ACL` VALUES (759,'Route','cmr','READ','ALLOW','ROLE','employee',NULL);
|
|
||||||
INSERT INTO `ACL` VALUES (760,'Cmr','downloadZip','READ','ALLOW','ROLE','employee',NULL);
|
|
||||||
INSERT INTO `ACL` VALUES (761,'Route','downloadZip','READ','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (761,'Route','downloadZip','READ','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (762,'Route','filter','READ','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (762,'Route','filter','READ','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (763,'Route','getByWorker','READ','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (763,'Route','getByWorker','READ','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (764,'Route','getDeliveryPoint','READ','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (764,'Route','getDeliveryPoint','READ','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (765,'Route','cmrs','READ','ALLOW','ROLE','employee',NULL);
|
|
||||||
INSERT INTO `ACL` VALUES (766,'Route','getSuggestedTickets','READ','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (766,'Route','getSuggestedTickets','READ','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (767,'Route','getTickets','READ','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (767,'Route','getTickets','READ','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (768,'Route','guessPriority','WRITE','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (768,'Route','guessPriority','WRITE','ALLOW','ROLE','employee',NULL);
|
||||||
|
@ -2130,7 +2163,6 @@ INSERT INTO `ACL` VALUES (802,'MailAliasAccount','deleteById','WRITE','ALLOW','R
|
||||||
INSERT INTO `ACL` VALUES (804,'DeviceProduction','*','READ','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (804,'DeviceProduction','*','READ','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (805,'Collection','assign','WRITE','ALLOW','ROLE','production',NULL);
|
INSERT INTO `ACL` VALUES (805,'Collection','assign','WRITE','ALLOW','ROLE','production',NULL);
|
||||||
INSERT INTO `ACL` VALUES (806,'ExpeditionPallet','getPallet','READ','ALLOW','ROLE','production',NULL);
|
INSERT INTO `ACL` VALUES (806,'ExpeditionPallet','getPallet','READ','ALLOW','ROLE','production',NULL);
|
||||||
INSERT INTO `ACL` VALUES (807,'MachineWorker','updateInTime','WRITE','ALLOW','ROLE','production',NULL);
|
|
||||||
INSERT INTO `ACL` VALUES (808,'MobileAppVersionControl','getVersion','READ','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (808,'MobileAppVersionControl','getVersion','READ','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (809,'SaleTracking','delete','WRITE','ALLOW','ROLE','production',NULL);
|
INSERT INTO `ACL` VALUES (809,'SaleTracking','delete','WRITE','ALLOW','ROLE','production',NULL);
|
||||||
INSERT INTO `ACL` VALUES (810,'SaleTracking','updateTracking','WRITE','ALLOW','ROLE','production',NULL);
|
INSERT INTO `ACL` VALUES (810,'SaleTracking','updateTracking','WRITE','ALLOW','ROLE','production',NULL);
|
||||||
|
@ -2216,7 +2248,7 @@ 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 (901,'WorkerTimeControl','sendMail','WRITE','ALLOW','ROLE','system',NULL);
|
||||||
INSERT INTO `ACL` VALUES (902,'Entry','filter','READ','ALLOW','ROLE','supplier',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 (903,'Entry','getBuys','READ','ALLOW','ROLE','supplier',NULL);
|
||||||
INSERT INTO `ACL` VALUES (904,'Entry','buyLabel','READ','ALLOW','ROLE','supplier',NULL);
|
INSERT INTO `ACL` VALUES (904,'Entry','buyLabelSupplier','READ','ALLOW','ROLE','supplier',10578);
|
||||||
INSERT INTO `ACL` VALUES (905,'AddressWaste','*','READ','ALLOW','ROLE','production',NULL);
|
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','print','READ','ALLOW','ROLE','supplier',NULL);
|
||||||
INSERT INTO `ACL` VALUES (907,'Expedition_PrintOut','*','*','ALLOW','ROLE','production',NULL);
|
INSERT INTO `ACL` VALUES (907,'Expedition_PrintOut','*','*','ALLOW','ROLE','production',NULL);
|
||||||
|
@ -2230,7 +2262,6 @@ INSERT INTO `ACL` VALUES (914,'VnToken','killSession','*','ALLOW','ROLE','develo
|
||||||
INSERT INTO `ACL` VALUES (915,'ACL','*','WRITE','ALLOW','ROLE','developerBoss',10578);
|
INSERT INTO `ACL` VALUES (915,'ACL','*','WRITE','ALLOW','ROLE','developerBoss',10578);
|
||||||
INSERT INTO `ACL` VALUES (917,'InvoiceOut','refundAndInvoice','WRITE','ALLOW','ROLE','administrative',10578);
|
INSERT INTO `ACL` VALUES (917,'InvoiceOut','refundAndInvoice','WRITE','ALLOW','ROLE','administrative',10578);
|
||||||
INSERT INTO `ACL` VALUES (918,'Worker','__get__descriptor','READ','ALLOW','ROLE','employee',10578);
|
INSERT INTO `ACL` VALUES (918,'Worker','__get__descriptor','READ','ALLOW','ROLE','employee',10578);
|
||||||
INSERT INTO `ACL` VALUES (919,'Worker','findById','READ','ALLOW','ROLE','employee',10578);
|
|
||||||
INSERT INTO `ACL` VALUES (920,'QuadmindsApiConfig','*','*','ALLOW','ROLE','delivery',19295);
|
INSERT INTO `ACL` VALUES (920,'QuadmindsApiConfig','*','*','ALLOW','ROLE','delivery',19295);
|
||||||
INSERT INTO `ACL` VALUES (922,'SaleGroup','*','WRITE','ALLOW','ROLE','production',19294);
|
INSERT INTO `ACL` VALUES (922,'SaleGroup','*','WRITE','ALLOW','ROLE','production',19294);
|
||||||
INSERT INTO `ACL` VALUES (923,'Worker','__get__advancedSummary','READ','ALLOW','ROLE','hr',10578);
|
INSERT INTO `ACL` VALUES (923,'Worker','__get__advancedSummary','READ','ALLOW','ROLE','hr',10578);
|
||||||
|
@ -2250,6 +2281,23 @@ INSERT INTO `ACL` VALUES (936,'Device','handleUser','*','ALLOW','ROLE','employee
|
||||||
INSERT INTO `ACL` VALUES (937,'WorkerTimeControlMail','count','READ','ALLOW','ROLE','employee',10578);
|
INSERT INTO `ACL` VALUES (937,'WorkerTimeControlMail','count','READ','ALLOW','ROLE','employee',10578);
|
||||||
INSERT INTO `ACL` VALUES (938,'Worker','__get__mail','READ','ALLOW','ROLE','hr',10578);
|
INSERT INTO `ACL` VALUES (938,'Worker','__get__mail','READ','ALLOW','ROLE','hr',10578);
|
||||||
INSERT INTO `ACL` VALUES (939,'Machine','*','*','ALLOW','ROLE','productionBoss',10578);
|
INSERT INTO `ACL` VALUES (939,'Machine','*','*','ALLOW','ROLE','productionBoss',10578);
|
||||||
|
INSERT INTO `ACL` VALUES (940,'ItemTypeLog','find','READ','ALLOW','ROLE','employee',10578);
|
||||||
|
INSERT INTO `ACL` VALUES (941,'Entry','buyLabel','READ','ALLOW','ROLE','employee',10578);
|
||||||
|
INSERT INTO `ACL` VALUES (942,'Cmr','filter','READ','ALLOW','ROLE','production',10578);
|
||||||
|
INSERT INTO `ACL` VALUES (943,'Cmr','downloadZip','READ','ALLOW','ROLE','production',10578);
|
||||||
|
INSERT INTO `ACL` VALUES (944,'Cmr','print','READ','ALLOW','ROLE','production',10578);
|
||||||
|
INSERT INTO `ACL` VALUES (945,'Collection','create','WRITE','ALLOW','ROLE','productionBoss',10578);
|
||||||
|
INSERT INTO `ACL` VALUES (946,'Collection','upsert','WRITE','ALLOW','ROLE','productionBoss',10578);
|
||||||
|
INSERT INTO `ACL` VALUES (947,'Collection','replaceById','WRITE','ALLOW','ROLE','productionBoss',10578);
|
||||||
|
INSERT INTO `ACL` VALUES (948,'Collection','updateAll','WRITE','ALLOW','ROLE','productionBoss',10578);
|
||||||
|
INSERT INTO `ACL` VALUES (949,'Collection','updateAttributes','WRITE','ALLOW','ROLE','productionBoss',10578);
|
||||||
|
INSERT INTO `ACL` VALUES (950,'Collection','deleteById','WRITE','ALLOW','ROLE','productionBoss',10578);
|
||||||
|
INSERT INTO `ACL` VALUES (951,'Collection','destroyAll','WRITE','ALLOW','ROLE','productionBoss',10578);
|
||||||
|
INSERT INTO `ACL` VALUES (952,'Collection','destroyById','WRITE','ALLOW','ROLE','productionBoss',10578);
|
||||||
|
INSERT INTO `ACL` VALUES (953,'RouteAction','find','READ','ALLOW','ROLE','delivery',10578);
|
||||||
|
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 `fieldAcl` VALUES (1,'Client','name','update','employee');
|
INSERT INTO `fieldAcl` VALUES (1,'Client','name','update','employee');
|
||||||
INSERT INTO `fieldAcl` VALUES (2,'Client','contact','update','employee');
|
INSERT INTO `fieldAcl` VALUES (2,'Client','contact','update','employee');
|
||||||
|
@ -2581,13 +2629,13 @@ INSERT INTO `department` VALUES (1,'VN','VERDNATURA',1,116,763,0,0,0,0,26,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 (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 (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 (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,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 (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,0,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 (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 (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 (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,0,0,0,0,NULL,NULL,NULL,NULL);
|
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 (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 (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 (45,'logistic','LOGISTICA',78,79,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
|
@ -2630,7 +2678,7 @@ INSERT INTO `department` VALUES (135,'routers','ENRUTADORES',110,111,NULL,0,0,0,
|
||||||
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 (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 (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 (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 (140,'internationalTeam','EQUIPO INTERNACIONAL',69,70,33320,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 (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 (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 (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 (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);
|
||||||
|
|
|
@ -49,6 +49,7 @@ INSERT IGNORE INTO `db` VALUES ('','geo','developerBoss','Y','Y','Y','Y','N','N'
|
||||||
INSERT IGNORE INTO `db` VALUES ('','floranet','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N');
|
INSERT IGNORE INTO `db` VALUES ('','floranet','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N');
|
||||||
INSERT IGNORE INTO `db` VALUES ('','tmp','guest','Y','Y','Y','Y','N','Y','N','N','N','N','Y','N','N','N','N','N','N','N','N','N');
|
INSERT IGNORE INTO `db` VALUES ('','tmp','guest','Y','Y','Y','Y','N','Y','N','N','N','N','Y','N','N','N','N','N','N','N','N','N');
|
||||||
INSERT IGNORE INTO `db` VALUES ('','util','salix','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N');
|
INSERT IGNORE INTO `db` VALUES ('','util','salix','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N');
|
||||||
|
INSERT IGNORE INTO `db` VALUES ('','srt','maintenanceBoss','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N');
|
||||||
INSERT IGNORE INTO `db` VALUES ('','dipole','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N');
|
INSERT IGNORE INTO `db` VALUES ('','dipole','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N');
|
||||||
INSERT IGNORE INTO `db` VALUES ('','bi','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N');
|
INSERT IGNORE INTO `db` VALUES ('','bi','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N');
|
||||||
INSERT IGNORE INTO `db` VALUES ('','sage','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N');
|
INSERT IGNORE INTO `db` VALUES ('','sage','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N');
|
||||||
|
@ -941,7 +942,6 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','volumeConfig','alex
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','ticketTrackingState','alexm@%','0000-00-00 00:00:00','Select,Insert,Update','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','ticketTrackingState','alexm@%','0000-00-00 00:00:00','Select,Insert,Update','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','warehouse','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','warehouse','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','role','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','role','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workCenter','alexm@%','0000-00-00 00:00:00','Select','');
|
|
||||||
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','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','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','coolerAssist','workerAppTester','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
|
@ -1246,7 +1246,6 @@ 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','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 ('','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 ('','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','deliveryAssistant','workCenter','alexm@db-proxy2.static.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','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 ('','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','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','bi','deliveryAssistant','rotacion','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
|
@ -1388,7 +1387,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','entry','jenki
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Cubos_Retorno','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Cubos_Retorno','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimDestination','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimDestination','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','entryConfig','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','entryConfig','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','farmingDeliveryNote','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','farmingDeliveryNote','carlosap@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','sage','grafana','TiposIva','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','sage','grafana','TiposIva','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','bs','buyer','waste','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','bs','buyer','waste','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientObservation','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientObservation','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
|
@ -1419,13 +1418,9 @@ 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','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','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','maintenanceBoss','machineDetail','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','antenna','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 ('','srt','maintenanceBoss','bufferPool','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
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 ('','srt','maintenanceBoss','enteringLog','guillermo@db-proxy1.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 ('','srt','maintenanceBoss','expeditionLoading','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','failureLog','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','movingLog','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','sorterLog','guillermo@db-proxy1.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','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 ('','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','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','buy_edi','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
|
@ -1463,7 +1458,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryBoss','vehicleDms','gu
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryBoss','vehicleInvoiceIn','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryBoss','vehicleInvoiceIn','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryBoss','vehicleNotes','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryBoss','vehicleNotes','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','saleGroup','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','saleGroup','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','bufferLog','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','shelvingLog','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financialBoss','supplierAccount','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financialBoss','supplierAccount','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','tillSerial','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','tillSerial','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','stockBuyed','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','stockBuyed','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
|
@ -1494,6 +1489,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','itemStemTag',
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','itemBaseTag','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','itemBaseTag','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','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','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','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','');
|
||||||
/*!40000 ALTER TABLE `tables_priv` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `tables_priv` ENABLE KEYS */;
|
||||||
|
|
||||||
/*!40000 ALTER TABLE `columns_priv` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `columns_priv` DISABLE KEYS */;
|
||||||
|
@ -1873,6 +1869,7 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','buy_getVolumeByE
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_getVolumeByEntry','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_getVolumeByEntry','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','entry_moveNotPrinted','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','entry_moveNotPrinted','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','buy_getVolume','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','buy_getVolume','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','stockBuyedByWorker','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','buy_getsplit','PROCEDURE','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','buy_getsplit','PROCEDURE','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','subordinategetlist','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','subordinategetlist','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
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 ('','vn','buyer','buy_afterUpsert','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
|
@ -1925,7 +1922,7 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','util','grafana','firstdayofyear','FU
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','util','claimManager','dayend','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','util','claimManager','dayend','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','util','employee','log_add','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','util','employee','log_add','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','srt','employee','moving_between','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','srt','employee','moving_between','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','bi','financial','defaultersfromdate','PROCEDURE','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','bi','financial','defaultersfromdate','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','getuser','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','getuser','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','hasanynegativebase','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','hasanynegativebase','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','marketingBoss','hasanynegativebase','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','marketingBoss','hasanynegativebase','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
|
@ -2020,6 +2017,7 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','logshow','PROCEDURE','alex
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyerBoss','supplierpackaging_reportsource','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyerBoss','supplierpackaging_reportsource','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financialBoss','supplierexpenses','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financialBoss','supplierexpenses','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','grafana','firstdayofweek','FUNCTION','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','grafana','firstdayofweek','FUNCTION','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','stockBuyed_add','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','mail_insert','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','mail_insert','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','duaParcialMake','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','duaParcialMake','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','palletizerBoss','packingsite_startcollection','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','palletizerBoss','packingsite_startcollection','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
|
@ -2099,7 +2097,6 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','collection_printst
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','deviceproductionuser_getworker','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','deviceproductionuser_getworker','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','ticket_printlabelprevious','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','ticket_printlabelprevious','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','ticket_isoutclosurezone','FUNCTION','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','ticket_isoutclosurezone','FUNCTION','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','workermachinery_isregistered','FUNCTION','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','ticketstatetoday_setstate','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','ticketstatetoday_setstate','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','device_checklogin','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','device_checklogin','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','worker_getfromhasmistake','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','worker_getfromhasmistake','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
|
@ -2107,7 +2104,7 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','sectorcollection_n
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','sectorcollection_get','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','sectorcollection_get','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','setparking','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','setparking','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','shelvingparking_get','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','shelvingparking_get','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','machine_getworkerplate','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','report_print','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','saletracking_addprevok','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','saletracking_addprevok','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','sectorcollectionsalegroup_add','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','sectorcollectionsalegroup_add','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','saletracking_updateischecked','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','saletracking_updateischecked','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
|
@ -2116,7 +2113,7 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','travel_updatepacki
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','freelance_getinfo','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','freelance_getinfo','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','company_getfiscaldata','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','company_getfiscaldata','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expedition_getfromroute','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expedition_getfromroute','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','machineworker_gethistorical','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','buy_getUltimate','FUNCTION','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemplacementsupplyaiming','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemplacementsupplyaiming','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expeditionstate_addbypallet','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expeditionstate_addbypallet','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','srt','production','expeditionloading_add','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','srt','production','expeditionloading_add','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
|
@ -2150,7 +2147,6 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','collection_printstic
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','deviceproductionuser_getworker','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','deviceproductionuser_getworker','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','ticket_printlabelprevious','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','ticket_printlabelprevious','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','ticket_isoutclosurezone','FUNCTION','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','ticket_isoutclosurezone','FUNCTION','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','workermachinery_isregistered','FUNCTION','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','ticketstatetoday_setstate','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','ticketstatetoday_setstate','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','device_checklogin','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','device_checklogin','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','worker_getfromhasmistake','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','worker_getfromhasmistake','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
|
@ -2158,7 +2154,6 @@ 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','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','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','delivery','shelvingparking_get','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','machine_getworkerplate','PROCEDURE','guillermo@db-proxy1.static.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','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','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');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','saletracking_updateischecked','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
|
@ -2167,7 +2162,6 @@ 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','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','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','delivery','expedition_getfromroute','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','machineworker_gethistorical','PROCEDURE','guillermo@db-proxy1.static.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','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 ('','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');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','srt','delivery','expeditionloading_add','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
|
@ -2257,6 +2251,7 @@ INSERT IGNORE INTO `global_priv` VALUES ('','assetManager','{\"access\":0,\"vers
|
||||||
INSERT IGNORE INTO `global_priv` VALUES ('','buyer','{\"access\": 0, \"version_id\": 101106, \"is_role\": true}');
|
INSERT IGNORE INTO `global_priv` VALUES ('','buyer','{\"access\": 0, \"version_id\": 101106, \"is_role\": true}');
|
||||||
INSERT IGNORE INTO `global_priv` VALUES ('','buyerAssistant','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
INSERT IGNORE INTO `global_priv` VALUES ('','buyerAssistant','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
||||||
INSERT IGNORE INTO `global_priv` VALUES ('','buyerBoss','{\"access\": 0, \"version_id\": 101106, \"is_role\": true}');
|
INSERT IGNORE INTO `global_priv` VALUES ('','buyerBoss','{\"access\": 0, \"version_id\": 101106, \"is_role\": true}');
|
||||||
|
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 ('','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 ('','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\":100707,\"is_role\":true}');
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -875,7 +875,7 @@ BEGIN
|
||||||
b.stickers = NEW.NumberOfUnits
|
b.stickers = NEW.NumberOfUnits
|
||||||
WHERE i.supplyResponseFk = NEW.ID
|
WHERE i.supplyResponseFk = NEW.ID
|
||||||
AND am.name = 'LOGIFLORA'
|
AND am.name = 'LOGIFLORA'
|
||||||
AND e.isRaid
|
AND tr.isRaid
|
||||||
AND tr.landed >= util.VN_CURDATE();
|
AND tr.landed >= util.VN_CURDATE();
|
||||||
|
|
||||||
END */;;
|
END */;;
|
||||||
|
@ -1460,6 +1460,9 @@ DELIMITER ;;
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
|
IF NEW.`property` = '*' THEN
|
||||||
|
CALL util.throw('The property field cannot be *');
|
||||||
|
END IF;
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
|
@ -2000,6 +2003,7 @@ BEGIN
|
||||||
DECLARE vIsEqualizated BOOL;
|
DECLARE vIsEqualizated BOOL;
|
||||||
|
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
|
SET NEW.geoFk = address_getGeo(NEW.id);
|
||||||
|
|
||||||
IF (NEW.phone <> '') THEN
|
IF (NEW.phone <> '') THEN
|
||||||
CALL pbx.phone_isValid(NEW.phone);
|
CALL pbx.phone_isValid(NEW.phone);
|
||||||
|
@ -2036,7 +2040,6 @@ DELIMITER ;;
|
||||||
BEFORE UPDATE ON `address`
|
BEFORE UPDATE ON `address`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
|
|
||||||
IF !(NEW.phone <=> OLD.phone) AND (NEW.phone <> '') THEN
|
IF !(NEW.phone <=> OLD.phone) AND (NEW.phone <> '') THEN
|
||||||
|
@ -2047,6 +2050,11 @@ BEGIN
|
||||||
CALL pbx.phone_isValid(NEW.mobile);
|
CALL pbx.phone_isValid(NEW.mobile);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
|
IF NOT (NEW.provinceFk <=> OLD.provinceFk)
|
||||||
|
OR (NEW.postalCode <=> OLD.postalCode) THEN
|
||||||
|
|
||||||
|
SET NEW.geoFk = address_getGeo(NEW.id);
|
||||||
|
END IF;
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
|
@ -3423,8 +3431,10 @@ DELIMITER ;;
|
||||||
BEFORE INSERT ON `client`
|
BEFORE INSERT ON `client`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
|
SET NEW.accountingAccount = 4300000000 + NEW.id;
|
||||||
|
SET NEW.lastSalesPersonFk = NEW.salesPersonFk;
|
||||||
|
SET NEW.geoFk = client_getGeo(NEW.id);
|
||||||
|
|
||||||
IF (NEW.phone <> '') THEN
|
IF (NEW.phone <> '') THEN
|
||||||
CALL pbx.phone_isValid(NEW.phone);
|
CALL pbx.phone_isValid(NEW.phone);
|
||||||
|
@ -3433,10 +3443,6 @@ BEGIN
|
||||||
IF (NEW.mobile <> '') THEN
|
IF (NEW.mobile <> '') THEN
|
||||||
CALL pbx.phone_isValid(NEW.mobile);
|
CALL pbx.phone_isValid(NEW.mobile);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
SET NEW.accountingAccount = 4300000000 + NEW.id;
|
|
||||||
|
|
||||||
SET NEW.lastSalesPersonFk = NEW.salesPersonFk;
|
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
|
@ -3550,6 +3556,12 @@ BEGIN
|
||||||
IF NOT (NEW.businessTypeFk <=> OLD.businessTypeFk) AND (NEW.businessTypeFk = 'individual' OR OLD.businessTypeFk = 'individual') THEN
|
IF NOT (NEW.businessTypeFk <=> OLD.businessTypeFk) AND (NEW.businessTypeFk = 'individual' OR OLD.businessTypeFk = 'individual') THEN
|
||||||
SET NEW.isTaxDataChecked = 0;
|
SET NEW.isTaxDataChecked = 0;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
|
IF NOT (NEW.provinceFk <=> OLD.provinceFk)
|
||||||
|
OR (NEW.postcode <=> OLD.postcode) THEN
|
||||||
|
|
||||||
|
SET NEW.geoFk = client_getGeo(NEW.id);
|
||||||
|
END IF;
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
|
@ -4960,7 +4972,7 @@ DELIMITER ;;
|
||||||
BEFORE UPDATE ON `entry`
|
BEFORE UPDATE ON `entry`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
DECLARE vIsVirtual BOOL;
|
DECLARE vIsRaid BOOL;
|
||||||
DECLARE vPrintedCount INT;
|
DECLARE vPrintedCount INT;
|
||||||
DECLARE vHasDistinctWarehouses BOOL;
|
DECLARE vHasDistinctWarehouses BOOL;
|
||||||
DECLARE vTotalBuy INT;
|
DECLARE vTotalBuy INT;
|
||||||
|
@ -4995,17 +5007,19 @@ BEGIN
|
||||||
CALL travel_throwAwb(NEW.travelFk);
|
CALL travel_throwAwb(NEW.travelFk);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
SELECT COUNT(*) > 0 INTO vIsVirtual
|
SELECT t.isRaid INTO vIsRaid
|
||||||
FROM entryVirtual WHERE entryFk = NEW.id;
|
FROM travel t
|
||||||
|
JOIN entry e ON e.travelFk = t.id
|
||||||
|
WHERE e.id = NEW.id;
|
||||||
|
|
||||||
SELECT NOT (o.warehouseInFk <=> n.warehouseInFk)
|
SELECT NOT (o.warehouseInFk <=> n.warehouseInFk)
|
||||||
OR NOT (o.warehouseOutFk <=> n.warehouseOutFk)
|
OR NOT (o.warehouseOutFk <=> n.warehouseOutFk)
|
||||||
INTO vHasDistinctWarehouses
|
INTO vHasDistinctWarehouses
|
||||||
FROM travel o, travel n
|
FROM travel o, travel n
|
||||||
WHERE o.id = OLD.travelFk
|
WHERE o.id = OLD.travelFk
|
||||||
AND n.id = NEW.travelFk;
|
AND n.id = NEW.travelFk;
|
||||||
|
|
||||||
IF vIsVirtual AND vHasDistinctWarehouses THEN
|
IF vIsRaid AND vHasDistinctWarehouses THEN
|
||||||
SIGNAL SQLSTATE '45000'
|
SIGNAL SQLSTATE '45000'
|
||||||
SET MESSAGE_TEXT = 'A cloned entry cannot be moved to a travel with different warehouses';
|
SET MESSAGE_TEXT = 'A cloned entry cannot be moved to a travel with different warehouses';
|
||||||
END IF;
|
END IF;
|
||||||
|
@ -5326,6 +5340,7 @@ BEGIN
|
||||||
FROM expedition e WHERE e.ticketFk = OLD.ticketFk and e.freightItemFk)
|
FROM expedition e WHERE e.ticketFk = OLD.ticketFk and e.freightItemFk)
|
||||||
WHERE t.id = OLD.ticketFk;
|
WHERE t.id = OLD.ticketFk;
|
||||||
|
|
||||||
|
CALL expedition_selfConsumptionPackaging(OLD.id, 'remove');
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
|
@ -6909,10 +6924,31 @@ DELIMITER ;
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||||
DELIMITER ;;
|
DELIMITER ;;
|
||||||
|
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemType_beforeInsert`
|
||||||
|
BEFORE INSERT ON `itemType`
|
||||||
|
FOR EACH ROW
|
||||||
|
BEGIN
|
||||||
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
|
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`.`itemType_beforeUpdate`
|
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemType_beforeUpdate`
|
||||||
BEFORE UPDATE ON `itemType`
|
BEFORE UPDATE ON `itemType`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
IF NEW.itemPackingTypeFk = '' THEN
|
IF NEW.itemPackingTypeFk = '' THEN
|
||||||
|
|
||||||
SET NEW.itemPackingTypeFk = NULL;
|
SET NEW.itemPackingTypeFk = NULL;
|
||||||
|
@ -6939,6 +6975,30 @@ DELIMITER ;
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||||
DELIMITER ;;
|
DELIMITER ;;
|
||||||
|
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemType_afterDelete`
|
||||||
|
AFTER DELETE ON `itemType`
|
||||||
|
FOR EACH ROW
|
||||||
|
BEGIN
|
||||||
|
INSERT INTO itemTypeLog
|
||||||
|
SET `action` = 'delete',
|
||||||
|
`changedModel` = 'ItemType',
|
||||||
|
`changedModelId` = OLD.id,
|
||||||
|
`userFk` = account.myUser_getId();
|
||||||
|
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`.`machine_beforeInsert`
|
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`machine_beforeInsert`
|
||||||
BEFORE INSERT ON `machine`
|
BEFORE INSERT ON `machine`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
|
@ -7584,7 +7644,7 @@ DELIMITER ;;
|
||||||
AFTER DELETE ON `productionConfig`
|
AFTER DELETE ON `productionConfig`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
INSERT INTO productionConfig
|
INSERT INTO productionConfigLog
|
||||||
SET `action` = 'delete',
|
SET `action` = 'delete',
|
||||||
`changedModel` = 'ProductionConfig',
|
`changedModel` = 'ProductionConfig',
|
||||||
`changedModelId` = OLD.id,
|
`changedModelId` = OLD.id,
|
||||||
|
@ -8187,7 +8247,8 @@ BEGIN
|
||||||
OR !(NEW.kmEnd <=> OLD.kmEnd)
|
OR !(NEW.kmEnd <=> OLD.kmEnd)
|
||||||
OR !(NEW.workerFk <=> OLD.workerFk)
|
OR !(NEW.workerFk <=> OLD.workerFk)
|
||||||
OR !(NEW.m3 <=> OLD.m3)
|
OR !(NEW.m3 <=> OLD.m3)
|
||||||
OR !(NEW.agencyModeFk <=> OLD.agencyModeFk)THEN
|
OR !(NEW.agencyModeFk <=> OLD.agencyModeFk)
|
||||||
|
OR !(NEW.vehicleFk <=> OLD.vehicleFk)THEN
|
||||||
CALL route_calcCommission(NEW.id);
|
CALL route_calcCommission(NEW.id);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
|
@ -9086,6 +9147,7 @@ DELIMITER ;;
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
|
SET NEW.geoFk = supplier_getGeo(NEW.id);
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
|
@ -9180,6 +9242,11 @@ BEGIN
|
||||||
SET NEW.isPayMethodChecked = FALSE;
|
SET NEW.isPayMethodChecked = FALSE;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
|
IF NOT (NEW.provinceFk <=> OLD.provinceFk)
|
||||||
|
OR (NEW.postCode <=> OLD.postCode) THEN
|
||||||
|
|
||||||
|
SET NEW.geoFk = supplier_getGeo(NEW.id);
|
||||||
|
END IF;
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
|
@ -10501,28 +10568,6 @@ DELIMITER ;
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||||
DELIMITER ;;
|
DELIMITER ;;
|
||||||
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`town_beforeUpdate`
|
|
||||||
BEFORE UPDATE ON `town`
|
|
||||||
FOR EACH ROW
|
|
||||||
BEGIN
|
|
||||||
-- IF !(OLD.geoFk <=> NEW.geoFk) THEN
|
|
||||||
-- CALL zoneGeo_throwNotEditable;
|
|
||||||
-- END IF;
|
|
||||||
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`.`town_afterUpdate`
|
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`town_afterUpdate`
|
||||||
AFTER UPDATE ON `town`
|
AFTER UPDATE ON `town`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
|
@ -10581,6 +10626,10 @@ BEGIN
|
||||||
|
|
||||||
CALL travel_checkWarehouseIsFeedStock(NEW.warehouseInFk);
|
CALL travel_checkWarehouseIsFeedStock(NEW.warehouseInFk);
|
||||||
|
|
||||||
|
IF NEW.isRaid IS NOT NULL OR NEW.daysInForward IS NOT NULL THEN
|
||||||
|
CALL travel_checkRaid(NEW.isRaid, NEW.daysInForward);
|
||||||
|
END IF;
|
||||||
|
|
||||||
IF NEW.awbFk IS NOT NULL THEN
|
IF NEW.awbFk IS NOT NULL THEN
|
||||||
CALL travel_throwAwb(NEW.id);
|
CALL travel_throwAwb(NEW.id);
|
||||||
END IF;
|
END IF;
|
||||||
|
@ -10620,6 +10669,10 @@ BEGIN
|
||||||
CALL travel_checkWarehouseIsFeedStock(NEW.warehouseInFk);
|
CALL travel_checkWarehouseIsFeedStock(NEW.warehouseInFk);
|
||||||
END IF;
|
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
|
IF NOT (NEW.awbFk <=> OLD.awbFk)THEN
|
||||||
SELECT COUNT(*) INTO vHasAnyInvoiceBooked
|
SELECT COUNT(*) INTO vHasAnyInvoiceBooked
|
||||||
FROM travel t
|
FROM travel t
|
||||||
|
@ -11526,4 +11579,4 @@ USE `vn2008`;
|
||||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||||
|
|
||||||
-- Dump completed on 2024-11-12 7:06:44
|
-- Dump completed on 2024-11-26 12:09:13
|
||||||
|
|
|
@ -1505,32 +1505,32 @@ INSERT INTO `vn`.`awb` (id, code, package, weight, created, amount, transitoryFk
|
||||||
(9, '99610289193', 302, 2972, util.VN_CURDATE(), 3871, 442, 1),
|
(9, '99610289193', 302, 2972, util.VN_CURDATE(), 3871, 442, 1),
|
||||||
(10, '07546500856', 185, 2364, util.VN_CURDATE(), 5321, 442, 1);
|
(10, '07546500856', 185, 2364, util.VN_CURDATE(), 5321, 442, 1);
|
||||||
|
|
||||||
INSERT INTO `vn`.`travel`(`id`,`shipped`, `landed`, `warehouseInFk`, `warehouseOutFk`, `agencyModeFk`, `m3`, `kg`,`ref`, `totalEntries`, `cargoSupplierFk`, `awbFK`, `daysInForward`)
|
INSERT INTO `vn`.`travel`(`id`,`shipped`, `landed`, `warehouseInFk`, `warehouseOutFk`, `agencyModeFk`, `m3`, `kg`,`ref`, `totalEntries`, `cargoSupplierFk`, `awbFK`, `isRaid`, `daysInForward`)
|
||||||
VALUES (1, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), 1, 2, 1, 100.00, 1000, 'first travel', 1, 1, 1, NULL),
|
VALUES (1, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), 1, 2, 1, 100.00, 1000, 'first travel', 1, 1, 1, FALSE, NULL),
|
||||||
(2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 2, 1, 150.00, 2000, 'second travel', 2, 2, 2, NULL),
|
(2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 2, 1, 150.00, 2000, 'second travel', 2, 2, 2, FALSE, NULL),
|
||||||
(3, util.VN_CURDATE(), util.VN_CURDATE(), 1, 2, 1, 0.00, 0.00, 'third travel', 1, 1, 3, NULL),
|
(3, util.VN_CURDATE(), util.VN_CURDATE(), 1, 2, 1, 0.00, 0.00, 'third travel', 1, 1, 3, FALSE, NULL),
|
||||||
(4, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 3, 1, 50.00, 500, 'fourth travel', 0, 2, 4, NULL),
|
(4, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 3, 1, 50.00, 500, 'fourth travel', 0, 2, 4, FALSE, NULL),
|
||||||
(5, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 3, 3, 1, 50.00, 500, 'fifth travel', 1, 1, 5, NULL),
|
(5, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 3, 3, 1, 50.00, 500, 'fifth travel', 1, 1, 5, FALSE, NULL),
|
||||||
(6, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 4, 4, 1, 50.00, 500, 'sixth travel', 1, 2, 6, NULL),
|
(6, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 4, 4, 1, 50.00, 500, 'sixth travel', 1, 2, 6, FALSE,NULL),
|
||||||
(7, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 5, 4, 1, 50.00, 500, 'seventh travel', 2, 1, 7, 2),
|
(7, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 5, 4, 1, 50.00, 500, 'seventh travel', 2, 1, 7, TRUE, 2),
|
||||||
(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, NULL),
|
(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, 2),
|
(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, NULL),
|
(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, NULL);
|
(12, util.VN_CURDATE() , util.VN_CURDATE() + INTERVAL 1 DAY, 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`)
|
INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `isConfirmed`, `companyFk`, `invoiceNumber`, `reference`, `isExcludedFromAvailable`, `evaNotes`, `typeFk`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 1, 442, 'IN2001', 'Movement 1', 0, ''),
|
(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'),
|
(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'),
|
(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'),
|
(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'),
|
(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'),
|
(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'),
|
(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,''),
|
(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, ''),
|
(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, ''),
|
(10, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL +2 DAY), 10, 0, 442, 'IN2009', 'Movement 10', 1, '', 'product'),
|
||||||
(99, 69, '2000-12-01 00:00:00.000', 11, 0, 442, 'IN2009', 'Movement 99', 0, '');
|
(99, 69, util.VN_CURDATE() - INTERVAL 1 MONTH, 11, 0, 442, 'IN2009', 'Movement 99', 0, '', 'product');
|
||||||
|
|
||||||
INSERT INTO `vn`.`entryConfig` (`defaultEntry`, `inventorySupplierFk`, `defaultSupplierFk`)
|
INSERT INTO `vn`.`entryConfig` (`defaultEntry`, `inventorySupplierFk`, `defaultSupplierFk`)
|
||||||
VALUES (2, 4, 1);
|
VALUES (2, 4, 1);
|
||||||
|
@ -2521,10 +2521,6 @@ INSERT INTO `vn`.`queuePriority`(`id`, `priority`, `code`)
|
||||||
(2, 'Normal', 'normal'),
|
(2, 'Normal', 'normal'),
|
||||||
(3, 'Baja', 'low');
|
(3, 'Baja', 'low');
|
||||||
|
|
||||||
INSERT INTO `vn`.`workerTimeControlParams` (`id`, `dayBreak`, `weekBreak`, `weekScope`, `dayWorkMax`, `dayStayMax`, `weekMaxBreak`, `weekMaxScope`, `askInOut`)
|
|
||||||
VALUES
|
|
||||||
(1, 43200, 129600, 734400, 43200, 50400, 259200, 1296000, 36000);
|
|
||||||
|
|
||||||
INSERT IGNORE INTO `vn`.`greugeConfig` (`id`, `freightPickUpPrice`) VALUES ('1', '11');
|
INSERT IGNORE INTO `vn`.`greugeConfig` (`id`, `freightPickUpPrice`) VALUES ('1', '11');
|
||||||
|
|
||||||
INSERT INTO `vn`.`thermograph`(`id`, `model`)
|
INSERT INTO `vn`.`thermograph`(`id`, `model`)
|
||||||
|
@ -4008,6 +4004,13 @@ INSERT IGNORE INTO pbx.queueMember
|
||||||
UPDATE vn.department SET pbxQueue = '1000' WHERE name = "CAMARA";
|
UPDATE vn.department SET pbxQueue = '1000' WHERE name = "CAMARA";
|
||||||
UPDATE vn.department SET pbxQueue = '2000' WHERE name = "VENTAS";
|
UPDATE vn.department SET pbxQueue = '2000' WHERE name = "VENTAS";
|
||||||
|
|
||||||
|
INSERT INTO vn.workerRelatives (workerFk, isDescendant, disabilityGradeFk, birthed, adoptionYear, isDependend, isJointCustody, updated)
|
||||||
|
VALUES
|
||||||
|
(1106, 1, NULL, 0, NULL, 0, 0, '2024-10-29 08:42:44.000');
|
||||||
|
INSERT INTO vn.routeAction (id, name, price, isMainlineDelivered) VALUES(1, 'Pintar traje', 50.00, 0);
|
||||||
|
INSERT INTO vn.routeComplement (id, dated, workerFk, price, routeActionFk) VALUES(1, util.VN_CURDATE(), 9, 50.00, 1);
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO srt.buffer (id, x, y, `size`, `length`, stateFk, typeFk, isActive, code, stratus, hasWorkerWaiting, reserve, routeFk, dayMinute, lastUnloaded, hasStrapper, typeDefaultFk, motors, editorFk)
|
INSERT INTO srt.buffer (id, x, y, `size`, `length`, stateFk, typeFk, isActive, code, stratus, hasWorkerWaiting, reserve, routeFk, dayMinute, lastUnloaded, hasStrapper, typeDefaultFk, motors, editorFk)
|
||||||
VALUES (0, 0, 0, 0, NULL, 3, 1, 0, 'ENT', 0, 0, NULL, NULL, NULL, NULL, 0, 1, 1, NULL),
|
VALUES (0, 0, 0, 0, NULL, 3, 1, 0, 'ENT', 0, 0, NULL, NULL, NULL, NULL, 0, 1, 1, NULL),
|
||||||
(1, 0, 9900, 0, NULL, 1, 0, 0, 'NOK', 0, 0, NULL, NULL, NULL, NULL, 0, 1, 1, NULL),
|
(1, 0, 9900, 0, NULL, 1, 0, 0, 'NOK', 0, 0, NULL, NULL, NULL, NULL, 0, 1, 1, NULL),
|
||||||
|
@ -4021,10 +4024,12 @@ INSERT INTO srt.buffer (id, x, y, `size`, `length`, stateFk, typeFk, isActive, c
|
||||||
(9, 1400, 1500, 500, 13000, 1, 1, 1, '04B', 4, 0, NULL, NULL, NULL, NULL, 0, 1, 1, NULL),
|
(9, 1400, 1500, 500, 13000, 1, 1, 1, '04B', 4, 0, NULL, NULL, NULL, NULL, 0, 1, 1, NULL),
|
||||||
(10, 0, 2000, 500, 13000, 1, 1, 1, '05A', 5, 0, NULL, NULL, NULL, NULL, 0, 1, 1, NULL);
|
(10, 0, 2000, 500, 13000, 1, 1, 1, '05A', 5, 0, NULL, NULL, NULL, NULL, 0, 1, 1, NULL);
|
||||||
|
|
||||||
|
|
||||||
INSERT IGNORE INTO vn.saySimpleCountry (countryFk, channel)
|
INSERT IGNORE INTO vn.saySimpleCountry (countryFk, channel)
|
||||||
VALUES (19, '1169'),
|
VALUES (19, '1169'),
|
||||||
(8, '1183');
|
(8, '1183');
|
||||||
|
|
||||||
INSERT IGNORE INTO vn.saySimpleConfig (url, defaultChannel)
|
INSERT IGNORE INTO vn.saySimpleConfig (url, defaultChannel)
|
||||||
VALUES ('saysimle-url-mock', 1320);
|
VALUES ('saysimle-url-mock', 1320);
|
||||||
|
|
||||||
|
INSERT INTO vn.workerIrpf (workerFk,spouseNif, geographicMobilityDate)
|
||||||
|
VALUES (1106,'26493101E','2019-09-20');
|
||||||
|
|
|
@ -53,7 +53,7 @@ proc: BEGIN
|
||||||
WHERE t.landed BETWEEN vInventoryDate AND vStartDate
|
WHERE t.landed BETWEEN vInventoryDate AND vStartDate
|
||||||
AND t.warehouseInFk = vWarehouse
|
AND t.warehouseInFk = vWarehouse
|
||||||
AND s.name != 'INVENTARIO'
|
AND s.name != 'INVENTARIO'
|
||||||
AND NOT t.daysInForward
|
AND NOT t.isRaid
|
||||||
GROUP BY b.itemFk
|
GROUP BY b.itemFk
|
||||||
) c
|
) c
|
||||||
JOIN vn.item i ON i.id = c.itemFk
|
JOIN vn.item i ON i.id = c.itemFk
|
||||||
|
|
|
@ -14,7 +14,7 @@ BEGIN
|
||||||
b.stickers = NEW.NumberOfUnits
|
b.stickers = NEW.NumberOfUnits
|
||||||
WHERE i.supplyResponseFk = NEW.ID
|
WHERE i.supplyResponseFk = NEW.ID
|
||||||
AND am.name = 'LOGIFLORA'
|
AND am.name = 'LOGIFLORA'
|
||||||
AND tr.daysInForward
|
AND tr.isRaid
|
||||||
AND tr.landed >= util.VN_CURDATE();
|
AND tr.landed >= util.VN_CURDATE();
|
||||||
|
|
||||||
END$$
|
END$$
|
||||||
|
|
|
@ -59,7 +59,7 @@ BEGIN
|
||||||
JOIN vn.travel t ON t.id = e.travelFk
|
JOIN vn.travel t ON t.id = e.travelFk
|
||||||
WHERE t.landed BETWEEN vDateInv AND vDate
|
WHERE t.landed BETWEEN vDateInv AND vDate
|
||||||
AND t.warehouseInFk = vWarehouse
|
AND t.warehouseInFk = vWarehouse
|
||||||
AND NOT t.daysInForward
|
AND NOT t.isRaid
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT b.itemFk, -b.quantity
|
SELECT b.itemFk, -b.quantity
|
||||||
FROM vn.buy b
|
FROM vn.buy b
|
||||||
|
@ -67,7 +67,7 @@ BEGIN
|
||||||
JOIN vn.travel t ON t.id = e.travelFk
|
JOIN vn.travel t ON t.id = e.travelFk
|
||||||
WHERE t.shipped BETWEEN vDateInv AND util.VN_CURDATE()
|
WHERE t.shipped BETWEEN vDateInv AND util.VN_CURDATE()
|
||||||
AND t.warehouseOutFk = vWarehouse
|
AND t.warehouseOutFk = vWarehouse
|
||||||
AND NOT t.daysInForward
|
AND NOT t.isRaid
|
||||||
AND t.isDelivered
|
AND t.isDelivered
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT m.itemFk, -m.quantity
|
SELECT m.itemFk, -m.quantity
|
||||||
|
|
|
@ -26,7 +26,7 @@ BEGIN
|
||||||
|
|
||||||
DECLARE vCursor CURSOR FOR
|
DECLARE vCursor CURSOR FOR
|
||||||
SELECT it.taxableBase,
|
SELECT it.taxableBase,
|
||||||
CAST((( it.taxableBase / 100) * t.PorcentajeIva) AS DECIMAL (10,2)),
|
CAST(SUM((( it.taxableBase / 100) * t.PorcentajeIva)) AS DECIMAL (10,2)),
|
||||||
t.PorcentajeIva,
|
t.PorcentajeIva,
|
||||||
it.transactionTypeSageFk,
|
it.transactionTypeSageFk,
|
||||||
it.taxTypeSageFk,
|
it.taxTypeSageFk,
|
||||||
|
@ -39,7 +39,8 @@ BEGIN
|
||||||
JOIN TiposTransacciones tt ON tt.CodigoTransaccion = it.transactionTypeSageFk
|
JOIN TiposTransacciones tt ON tt.CodigoTransaccion = it.transactionTypeSageFk
|
||||||
LEFT JOIN vn.dua d ON d.id = vInvoiceInFk
|
LEFT JOIN vn.dua d ON d.id = vInvoiceInFk
|
||||||
WHERE i.id = vInvoiceInFk
|
WHERE i.id = vInvoiceInFk
|
||||||
AND d.id IS NULL;
|
AND d.id IS NULL
|
||||||
|
GROUP BY it.taxTypeSageFk;
|
||||||
|
|
||||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
|
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
|
||||||
|
|
||||||
|
|
|
@ -6,12 +6,11 @@ BEGIN
|
||||||
DROP TEMPORARY TABLE IF EXISTS tValues;
|
DROP TEMPORARY TABLE IF EXISTS tValues;
|
||||||
CREATE TEMPORARY TABLE tValues
|
CREATE TEMPORARY TABLE tValues
|
||||||
ENGINE = MEMORY
|
ENGINE = MEMORY
|
||||||
SELECT
|
SELECT b.id buyFk,
|
||||||
b.id buyFk,
|
|
||||||
e.id entryFk,
|
e.id entryFk,
|
||||||
t.id travelFk,
|
t.id travelFk,
|
||||||
b.itemFk,
|
b.itemFk,
|
||||||
t.daysInForward,
|
t.isRaid,
|
||||||
ADDTIME(t.shipped,
|
ADDTIME(t.shipped,
|
||||||
IFNULL(t.shipmentHour, '00:00:00')) shipped,
|
IFNULL(t.shipmentHour, '00:00:00')) shipped,
|
||||||
t.warehouseOutFk,
|
t.warehouseOutFk,
|
||||||
|
@ -50,7 +49,7 @@ BEGIN
|
||||||
itemFk,
|
itemFk,
|
||||||
TIMESTAMPADD(DAY, life, @dated),
|
TIMESTAMPADD(DAY, life, @dated),
|
||||||
quantity,
|
quantity,
|
||||||
IF(isIn, isReceived, isDelivered) AND NOT daysInForward
|
IF(isIn, isReceived, isDelivered) AND NOT isRaid
|
||||||
FROM tValues
|
FROM tValues
|
||||||
WHERE isIn OR !lessThanInventory;
|
WHERE isIn OR !lessThanInventory;
|
||||||
|
|
||||||
|
@ -65,7 +64,7 @@ BEGIN
|
||||||
itemFk,
|
itemFk,
|
||||||
created,
|
created,
|
||||||
quantity,
|
quantity,
|
||||||
IF(isIn, isDelivered, isReceived) AND NOT daysInForward
|
IF(isIn, isDelivered, isReceived) AND NOT isRaid
|
||||||
FROM tValues
|
FROM tValues
|
||||||
WHERE !isIn OR !lessThanInventory;
|
WHERE !isIn OR !lessThanInventory;
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,12 @@ BEGIN
|
||||||
SELECT p.geoFk INTO vGeoFk
|
SELECT p.geoFk INTO vGeoFk
|
||||||
FROM address a
|
FROM address a
|
||||||
JOIN town t ON t.provinceFk = a.provinceFk
|
JOIN town t ON t.provinceFk = a.provinceFk
|
||||||
JOIN postCode p ON p.townFk = t.id AND p.`code` = a.postalCode
|
JOIN postCode p ON p.townFk = t.id
|
||||||
|
AND (p.code = a.postalCode OR a.postalCode IS NULL)
|
||||||
|
JOIN zoneGeo zg ON zg.id = p.geoFk
|
||||||
WHERE a.id = vSelf
|
WHERE a.id = vSelf
|
||||||
ORDER BY (a.city SOUNDS LIKE t.`name`) DESC
|
ORDER BY (a.city SOUNDS LIKE t.name) DESC,
|
||||||
|
(p.code = a.postalCode) DESC
|
||||||
LIMIT 1;
|
LIMIT 1;
|
||||||
|
|
||||||
RETURN vGeoFk;
|
RETURN vGeoFk;
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
DELIMITER $$
|
||||||
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`client_getGeo`(vSelf INT)
|
||||||
|
RETURNS int(11)
|
||||||
|
DETERMINISTIC
|
||||||
|
BEGIN
|
||||||
|
/**
|
||||||
|
* Returns the geo for the passed client.
|
||||||
|
*
|
||||||
|
* @param vSelf The address id
|
||||||
|
* @return The geo id
|
||||||
|
*/
|
||||||
|
DECLARE vGeoFk INT;
|
||||||
|
|
||||||
|
SELECT p.geoFk INTO vGeoFk
|
||||||
|
FROM client c
|
||||||
|
JOIN town t ON t.provinceFk = c.provinceFk
|
||||||
|
JOIN postCode p ON p.townFk = t.id
|
||||||
|
AND (p.code = c.postcode OR c.postcode IS NULL)
|
||||||
|
JOIN zoneGeo zg ON zg.id = p.geoFk
|
||||||
|
WHERE c.id = vSelf
|
||||||
|
ORDER BY (c.city SOUNDS LIKE t.name) DESC,
|
||||||
|
(p.code = c.postcode) DESC
|
||||||
|
LIMIT 1;
|
||||||
|
|
||||||
|
RETURN vGeoFk;
|
||||||
|
END$$
|
||||||
|
DELIMITER ;
|
|
@ -1,48 +1,22 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`entry_getCommission`(vTravelFk INT,
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`entry_getCommission`(vTravelFk INT,
|
||||||
vCurrencyFk INT,
|
vCurrencyFk INT,
|
||||||
vSupplierFk INT
|
vSupplierFk INT
|
||||||
)
|
)
|
||||||
RETURNS int(11)
|
RETURNS int(11)
|
||||||
NOT DETERMINISTIC
|
NOT DETERMINISTIC
|
||||||
READS SQL DATA
|
READS SQL DATA
|
||||||
BEGIN
|
BEGIN
|
||||||
DECLARE vCommission INT;
|
DECLARE vCommission INT;
|
||||||
DECLARE vCurrentCommission INT;
|
DECLARE vCurrentCommission INT;
|
||||||
DECLARE vIsCurrencyUsd INT;
|
DECLARE vIsNotEUR INT;
|
||||||
DECLARE vLastEntryFk INT;
|
DECLARE vLastEntryFk INT;
|
||||||
|
|
||||||
SELECT count(*) INTO vIsCurrencyUsd
|
SELECT count(*) INTO vIsNotEUR
|
||||||
FROM currency c
|
FROM currency c
|
||||||
WHERE c.code = 'USD' AND id = vCurrencyFk;
|
WHERE c.code <> 'EUR' AND id = vCurrencyFk;
|
||||||
|
|
||||||
IF NOT vIsCurrencyUsd THEN
|
|
||||||
|
|
||||||
SELECT e.id INTO vLastEntryFk
|
|
||||||
FROM vn.entry e
|
|
||||||
JOIN vn.travel tr ON tr.id = e.travelFk
|
|
||||||
WHERE e.supplierFk = vSupplierFk
|
|
||||||
ORDER BY tr.landed DESC
|
|
||||||
LIMIT 1;
|
|
||||||
|
|
||||||
IF vLastEntryFk THEN
|
|
||||||
|
|
||||||
SELECT commission INTO vCurrentCommission
|
|
||||||
FROM vn.entry
|
|
||||||
WHERE id = vLastEntryFk;
|
|
||||||
|
|
||||||
ELSE
|
|
||||||
|
|
||||||
SELECT commission INTO vCurrentCommission
|
|
||||||
FROM supplier s
|
|
||||||
WHERE s.id = vSupplierFk;
|
|
||||||
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
RETURN vCurrentCommission;
|
|
||||||
|
|
||||||
ELSE
|
|
||||||
|
|
||||||
|
IF vIsNotEUR THEN
|
||||||
SELECT ROUND(-100 * (1 - (1 / r.value))) INTO vCommission
|
SELECT ROUND(-100 * (1 - (1 / r.value))) INTO vCommission
|
||||||
FROM travel t
|
FROM travel t
|
||||||
LEFT JOIN referenceCurrent r ON r.currencyFk = vCurrencyFk AND r.`dated` <= t.shipped
|
LEFT JOIN referenceCurrent r ON r.currencyFk = vCurrencyFk AND r.`dated` <= t.shipped
|
||||||
|
@ -51,8 +25,27 @@ BEGIN
|
||||||
LIMIT 1;
|
LIMIT 1;
|
||||||
|
|
||||||
RETURN IFNULL(vCommission, 0);
|
RETURN IFNULL(vCommission, 0);
|
||||||
|
ELSE
|
||||||
|
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;
|
||||||
|
|
||||||
END IF;
|
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;
|
||||||
|
END IF;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
DELIMITER $$
|
||||||
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`supplier_getGeo`(vSelf INT)
|
||||||
|
RETURNS int(11)
|
||||||
|
DETERMINISTIC
|
||||||
|
BEGIN
|
||||||
|
/**
|
||||||
|
* Returns the geo for the passed supplier.
|
||||||
|
*
|
||||||
|
* @param vSelf The address id
|
||||||
|
* @return The geo id
|
||||||
|
*/
|
||||||
|
DECLARE vGeoFk INT;
|
||||||
|
|
||||||
|
SELECT p.geoFk INTO vGeoFk
|
||||||
|
FROM supplier s
|
||||||
|
JOIN town t ON t.provinceFk = s.provinceFk
|
||||||
|
JOIN postCode p ON p.townFk = t.id
|
||||||
|
AND (p.code = s.postCode OR s.postCode IS NULL)
|
||||||
|
LEFT JOIN supplierAddress sad ON sad.supplierFk = s.id
|
||||||
|
JOIN zoneGeo zg ON zg.id = p.geoFk
|
||||||
|
WHERE s.id = vSelf
|
||||||
|
ORDER BY (s.city SOUNDS LIKE t.name) DESC,
|
||||||
|
(p.code = s.postCode) DESC,
|
||||||
|
(p.code = sad.postalCode) DESC
|
||||||
|
LIMIT 1;
|
||||||
|
|
||||||
|
RETURN vGeoFk;
|
||||||
|
END$$
|
||||||
|
DELIMITER ;
|
|
@ -1,65 +0,0 @@
|
||||||
DELIMITER $$
|
|
||||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`timeWorkerControl_getDirection`(vUserFk INT, vTimed DATETIME)
|
|
||||||
RETURNS varchar(6) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci
|
|
||||||
NOT DETERMINISTIC
|
|
||||||
READS SQL DATA
|
|
||||||
BEGIN
|
|
||||||
/**
|
|
||||||
* Verifica la dirección de la fichada
|
|
||||||
* @param vUserFk Identificador del trabajador
|
|
||||||
* @param vTimed Hora de la fichada
|
|
||||||
* @return Retorna sentido de la fichada 'in, out, middle'
|
|
||||||
*/
|
|
||||||
|
|
||||||
DECLARE vPrevious DATETIME ;
|
|
||||||
DECLARE vNext DATETIME ;
|
|
||||||
DECLARE vPreviousDirection VARCHAR(3) ;
|
|
||||||
DECLARE vNextDirection VARCHAR(3) ;
|
|
||||||
DECLARE vDayStayMax INT;
|
|
||||||
DECLARE vTimedSeconds INT;
|
|
||||||
DECLARE vLastTimeIn INT;
|
|
||||||
|
|
||||||
SELECT UNIX_TIMESTAMP(vTimed) INTO vTimedSeconds;
|
|
||||||
|
|
||||||
SELECT dayStayMax INTO vDayStayMax
|
|
||||||
FROM vn.workerTimeControlParams;
|
|
||||||
|
|
||||||
SELECT timed, direction INTO vNext,vNextDirection
|
|
||||||
FROM vn.workerTimeControl
|
|
||||||
WHERE userFk = vUserFk
|
|
||||||
AND direction IN ('in','out')
|
|
||||||
AND timed > vTimed
|
|
||||||
ORDER BY timed ASC
|
|
||||||
LIMIT 1;
|
|
||||||
|
|
||||||
SELECT timed, direction INTO vPrevious, vPreviousDirection
|
|
||||||
FROM vn.workerTimeControl
|
|
||||||
WHERE userFk = vUserFk
|
|
||||||
AND direction IN ('in','out')
|
|
||||||
AND timed < vTimed
|
|
||||||
ORDER BY timed DESC
|
|
||||||
LIMIT 1;
|
|
||||||
|
|
||||||
IF (vTimedSeconds - UNIX_TIMESTAMP(vPrevious) + UNIX_TIMESTAMP(vNext) - vTimedSeconds)<= vDayStayMax AND vPreviousDirection = 'in' AND vNextDirection = 'out' THEN
|
|
||||||
RETURN 'middle';
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
|
|
||||||
IF (vTimedSeconds> UNIX_TIMESTAMP(vPrevious)) THEN
|
|
||||||
IF vPreviousDirection = 'in' THEN
|
|
||||||
RETURN 'out';
|
|
||||||
ELSE
|
|
||||||
SELECT UNIX_TIMESTAMP(MAX(timed)) INTO vLastTimeIn
|
|
||||||
FROM vn.workerTimeControl
|
|
||||||
WHERE userFk = vUserFk
|
|
||||||
AND direction ='in'
|
|
||||||
AND timed < vPrevious;
|
|
||||||
IF vTimedSeconds - vLastTimeIn <= vDayStayMax THEN
|
|
||||||
RETURN 'out';
|
|
||||||
END IF;
|
|
||||||
END IF;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
RETURN 'in';
|
|
||||||
END$$
|
|
||||||
DELIMITER ;
|
|
|
@ -39,7 +39,7 @@ BEGIN
|
||||||
AND vWarehouseFk IN (tr.warehouseInFk, 0)
|
AND vWarehouseFk IN (tr.warehouseInFk, 0)
|
||||||
AND b.itemFk = vItemFk
|
AND b.itemFk = vItemFk
|
||||||
AND NOT e.isExcludedFromAvailable
|
AND NOT e.isExcludedFromAvailable
|
||||||
AND NOT tr.daysInForward
|
AND NOT tr.isRaid
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT tr.shipped,
|
SELECT tr.shipped,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -58,7 +58,7 @@ BEGIN
|
||||||
AND s.id <> (SELECT supplierFk FROM inventoryConfig)
|
AND s.id <> (SELECT supplierFk FROM inventoryConfig)
|
||||||
AND b.itemFk = vItemFk
|
AND b.itemFk = vItemFk
|
||||||
AND NOT e.isExcludedFromAvailable
|
AND NOT e.isExcludedFromAvailable
|
||||||
AND NOT tr.daysInForward
|
AND NOT tr.isRaid
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT t.shipped,
|
SELECT t.shipped,
|
||||||
NULL,
|
NULL,
|
||||||
|
|
|
@ -42,7 +42,7 @@ proc: BEGIN
|
||||||
WHERE t.landed BETWEEN vDatedInventory AND vDatedFrom
|
WHERE t.landed BETWEEN vDatedInventory AND vDatedFrom
|
||||||
AND t.warehouseInFk = vWarehouseLanding
|
AND t.warehouseInFk = vWarehouseLanding
|
||||||
AND NOT e.isExcludedFromAvailable
|
AND NOT e.isExcludedFromAvailable
|
||||||
AND NOT t.daysInForward
|
AND NOT t.isRaid
|
||||||
GROUP BY c.itemFk;
|
GROUP BY c.itemFk;
|
||||||
|
|
||||||
-- Tabla con el ultimo dia de last_buy para cada producto
|
-- Tabla con el ultimo dia de last_buy para cada producto
|
||||||
|
@ -57,7 +57,7 @@ proc: BEGIN
|
||||||
JOIN travel tr ON tr.id = e.travelFk
|
JOIN travel tr ON tr.id = e.travelFk
|
||||||
LEFT JOIN tItemRange i ON t.itemFk = i.itemFk
|
LEFT JOIN tItemRange i ON t.itemFk = i.itemFk
|
||||||
WHERE t.warehouseFk = vWarehouseShipment
|
WHERE t.warehouseFk = vWarehouseShipment
|
||||||
AND NOT tr.daysInForward
|
AND NOT tr.isRaid
|
||||||
ON DUPLICATE KEY UPDATE tItemRange.dated = GREATEST(tItemRange.dated,
|
ON DUPLICATE KEY UPDATE tItemRange.dated = GREATEST(tItemRange.dated,
|
||||||
tr.landed);
|
tr.landed);
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ proc: BEGIN
|
||||||
JOIN tItemRangeLive ir ON ir.itemFk = b.itemFk
|
JOIN tItemRangeLive ir ON ir.itemFk = b.itemFk
|
||||||
WHERE NOT e.isExcludedFromAvailable
|
WHERE NOT e.isExcludedFromAvailable
|
||||||
AND b.quantity <> 0
|
AND b.quantity <> 0
|
||||||
AND NOT t.daysInForward
|
AND NOT t.isRaid
|
||||||
AND t.warehouseInFk = vWarehouseLanding
|
AND t.warehouseInFk = vWarehouseLanding
|
||||||
AND t.landed >= vDatedFrom
|
AND t.landed >= vDatedFrom
|
||||||
AND (ir.dated IS NULL OR t.landed <= ir.dated)
|
AND (ir.dated IS NULL OR t.landed <= ir.dated)
|
||||||
|
|
|
@ -166,7 +166,7 @@ BEGIN
|
||||||
LEFT JOIN tmp.buyUltimateFromInterval bufi ON bufi.itemFk = i.id
|
LEFT JOIN tmp.buyUltimateFromInterval bufi ON bufi.itemFk = i.id
|
||||||
LEFT JOIN buy b3 ON b3.id = bufi.buyFk
|
LEFT JOIN buy b3 ON b3.id = bufi.buyFk
|
||||||
WHERE ic.display
|
WHERE ic.display
|
||||||
AND NOT tr.daysInForward
|
AND NOT tr.isRaid
|
||||||
AND (ti.visible OR ti.available)
|
AND (ti.visible OR ti.available)
|
||||||
ORDER BY i.typeFk, i.name, i.id, i.size, i.category, o.name;
|
ORDER BY i.typeFk, i.name, i.id, i.size, i.category, o.name;
|
||||||
|
|
||||||
|
|
|
@ -9,16 +9,18 @@ BEGIN
|
||||||
*
|
*
|
||||||
* @param vSelf Id de entrada
|
* @param vSelf Id de entrada
|
||||||
*/
|
*/
|
||||||
DECLARE vIsEditable BOOL;
|
DECLARE vIsNotEditable BOOL DEFAULT FALSE;
|
||||||
|
|
||||||
SELECT e.isBooked INTO vIsEditable
|
SELECT TRUE INTO vIsNotEditable
|
||||||
FROM `entry` e
|
FROM `entry` e
|
||||||
JOIN entryType et ON et.code = e.typeFk
|
LEFT JOIN entryType et ON et.code = e.typeFk
|
||||||
WHERE NOT et.isInformal
|
WHERE e.id = vSelf
|
||||||
AND e.id = vSelf;
|
AND e.isBooked
|
||||||
|
AND (e.typeFk IS NULL OR NOT et.isInformal);
|
||||||
|
|
||||||
IF vIsEditable AND NOT IFNULL(@isModeInventory, FALSE) THEN
|
IF vIsNotEditable AND NOT IFNULL(@isModeInventory, FALSE) THEN
|
||||||
CALL util.throw(CONCAT('Entry ', vSelf, ' is not editable'));
|
CALL util.throw(CONCAT('Entry ', vSelf, ' is not editable'));
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -22,7 +22,7 @@ BEGIN
|
||||||
FROM vn.entry e
|
FROM vn.entry e
|
||||||
JOIN vn.travel t ON t.id = e.travelFk
|
JOIN vn.travel t ON t.id = e.travelFk
|
||||||
JOIN vn.warehouse w ON w.id = t.warehouseInFk
|
JOIN vn.warehouse w ON w.id = t.warehouseInFk
|
||||||
WHERE t.shipped >= util.VN_CURDATE()
|
WHERE t.landed >= util.VN_CURDATE()
|
||||||
AND e.currencyFk = vCurrency
|
AND e.currencyFk = vCurrency
|
||||||
AND NOT e.isBooked;
|
AND NOT e.isBooked;
|
||||||
|
|
||||||
|
|
|
@ -4,12 +4,12 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`expeditionScan_Put`(
|
||||||
vExpeditionFk INT
|
vExpeditionFk INT
|
||||||
)
|
)
|
||||||
BEGIN
|
BEGIN
|
||||||
IF NOT (SELECT TRUE FROM expedition WHERE id = vExpeditionFk LIMIT 1) THEN
|
IF NOT EXISTS (SELECT id FROM expeditionPallet WHERE id = vPalletFk) THEN
|
||||||
CALL util.throw('Expedition not exists');
|
CALL util.throw('Pallet not exists');
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
IF NOT (SELECT TRUE FROM expeditionPallet WHERE id = vPalletFk LIMIT 1) THEN
|
IF NOT EXISTS (SELECT id FROM expedition WHERE id = vExpeditionFk) THEN
|
||||||
CALL util.throw('Pallet not exists');
|
CALL util.throw('Expedition not exists');
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
REPLACE expeditionScan(expeditionFk, palletFk)
|
REPLACE expeditionScan(expeditionFk, palletFk)
|
||||||
|
|
|
@ -3,7 +3,7 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`expedition_selfConsum
|
||||||
vSelf INT,
|
vSelf INT,
|
||||||
vAction ENUM('add', 'remove')
|
vAction ENUM('add', 'remove')
|
||||||
)
|
)
|
||||||
BEGIN
|
proc:BEGIN
|
||||||
/**
|
/**
|
||||||
* Maneja el consumo de cajas para autoconsumo, permitiendo
|
* Maneja el consumo de cajas para autoconsumo, permitiendo
|
||||||
* añadir o quitar cajas utilizadas según la acción indicada.
|
* añadir o quitar cajas utilizadas según la acción indicada.
|
||||||
|
@ -37,14 +37,14 @@ BEGIN
|
||||||
vWarehouseFk,
|
vWarehouseFk,
|
||||||
vCreated
|
vCreated
|
||||||
FROM expedition e
|
FROM expedition e
|
||||||
JOIN packaging p ON p.id = e.packagingFk
|
LEFT JOIN packaging p ON p.id = e.packagingFk
|
||||||
JOIN item i ON i.id = p.itemFk
|
LEFT JOIN item i ON i.id = p.itemFk
|
||||||
JOIN ticket t ON t.id = e.ticketFk
|
JOIN ticket t ON t.id = e.ticketFk
|
||||||
JOIN productionConfig pc
|
JOIN productionConfig pc
|
||||||
WHERE e.id = vSelf;
|
WHERE e.id = vSelf;
|
||||||
|
|
||||||
IF vClientFk IS NULL OR vAddressFk IS NULL THEN
|
IF vClientFk IS NULL OR vItemFk IS NULL THEN
|
||||||
CALL util.throw('Some config parameters are not set');
|
LEAVE proc;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
SET vCreated = DATE(vCreated);
|
SET vCreated = DATE(vCreated);
|
||||||
|
|
|
@ -137,7 +137,7 @@ BEGIN
|
||||||
JOIN travel tr ON tr.id = e.travelFk
|
JOIN travel tr ON tr.id = e.travelFk
|
||||||
WHERE tr.warehouseInFk = vWarehouseFk
|
WHERE tr.warehouseInFk = vWarehouseFk
|
||||||
AND tr.landed BETWEEN vDateLastInventory AND vDateYesterday
|
AND tr.landed BETWEEN vDateLastInventory AND vDateYesterday
|
||||||
AND NOT tr.daysInForward
|
AND NOT tr.isRaid
|
||||||
GROUP BY b.itemFk;
|
GROUP BY b.itemFk;
|
||||||
|
|
||||||
-- Transfers
|
-- Transfers
|
||||||
|
@ -150,7 +150,7 @@ BEGIN
|
||||||
JOIN travel tr ON tr.id = e.travelFk
|
JOIN travel tr ON tr.id = e.travelFk
|
||||||
WHERE tr.warehouseOutFk = vWarehouseFk
|
WHERE tr.warehouseOutFk = vWarehouseFk
|
||||||
AND tr.shipped BETWEEN vDateLastInventory AND vDateYesterday
|
AND tr.shipped BETWEEN vDateLastInventory AND vDateYesterday
|
||||||
AND NOT tr.daysInForward
|
AND NOT tr.isRaid
|
||||||
GROUP BY b.itemFk
|
GROUP BY b.itemFk
|
||||||
) sub
|
) sub
|
||||||
ON DUPLICATE KEY UPDATE quantity = IFNULL(quantity, 0) + sub.quantityOut;
|
ON DUPLICATE KEY UPDATE quantity = IFNULL(quantity, 0) + sub.quantityOut;
|
||||||
|
|
|
@ -219,7 +219,7 @@ BEGIN
|
||||||
) eWithheld ON TRUE
|
) eWithheld ON TRUE
|
||||||
WHERE tii.taxTypeSageFk IS NOT NULL
|
WHERE tii.taxTypeSageFk IS NOT NULL
|
||||||
AND (tii.taxCode IS NULL OR tii.taxCode NOT IN ('import10', 'import21'))
|
AND (tii.taxCode IS NULL OR tii.taxCode NOT IN ('import10', 'import21'))
|
||||||
GROUP BY tii.PorcentajeIva, tii.expenseFk;
|
GROUP BY tii.CuentaIvaRepercutido;
|
||||||
|
|
||||||
-- Línea iva inversor sujeto pasivo
|
-- Línea iva inversor sujeto pasivo
|
||||||
INSERT INTO XDiario(
|
INSERT INTO XDiario(
|
||||||
|
@ -284,7 +284,7 @@ BEGIN
|
||||||
AND NOT(tii.isVies
|
AND NOT(tii.isVies
|
||||||
AND c.nontaxableTransactionTypeFk = tii.transactionTypeSageFk
|
AND c.nontaxableTransactionTypeFk = tii.transactionTypeSageFk
|
||||||
AND tii.taxCode = 'nonTaxable')
|
AND tii.taxCode = 'nonTaxable')
|
||||||
GROUP BY tii.PorcentajeIva, tii.expenseFk;
|
GROUP BY tii.CuentaIvaRepercutido;
|
||||||
|
|
||||||
-- Actualización del registro original
|
-- Actualización del registro original
|
||||||
UPDATE invoiceIn ii
|
UPDATE invoiceIn ii
|
||||||
|
|
|
@ -3,7 +3,8 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingSale_setQ
|
||||||
vItemShelvingSaleFk INT(10),
|
vItemShelvingSaleFk INT(10),
|
||||||
vQuantity DECIMAL(10,0),
|
vQuantity DECIMAL(10,0),
|
||||||
vIsItemShelvingSaleEmpty BOOLEAN,
|
vIsItemShelvingSaleEmpty BOOLEAN,
|
||||||
vSectorFk INT
|
vSectorFk INT,
|
||||||
|
vShelvingFk VARCHAR(10)
|
||||||
)
|
)
|
||||||
BEGIN
|
BEGIN
|
||||||
/**
|
/**
|
||||||
|
@ -24,6 +25,7 @@ BEGIN
|
||||||
DECLARE vItemFk INT;
|
DECLARE vItemFk INT;
|
||||||
DECLARE vTotalQuantity INT;
|
DECLARE vTotalQuantity INT;
|
||||||
DECLARE vStateCode VARCHAR(45);
|
DECLARE vStateCode VARCHAR(45);
|
||||||
|
DECLARE vCurrentShelvingFk VARCHAR(10);
|
||||||
|
|
||||||
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
||||||
BEGIN
|
BEGIN
|
||||||
|
@ -45,18 +47,26 @@ BEGIN
|
||||||
iss.saleFk,
|
iss.saleFk,
|
||||||
iss.itemShelvingFk,
|
iss.itemShelvingFk,
|
||||||
SUM(IFNULL(iss.quantity,0)),
|
SUM(IFNULL(iss.quantity,0)),
|
||||||
IF(sgd.id, 'PREVIOUS_PREPARATION', 'PREPARED')
|
IF(sgd.id, 'PREVIOUS_PREPARATION', 'PREPARED'),
|
||||||
|
sh.code
|
||||||
INTO vItemFk,
|
INTO vItemFk,
|
||||||
vSaleFk,
|
vSaleFk,
|
||||||
vItemShelvingFk,
|
vItemShelvingFk,
|
||||||
vReservedQuantity,
|
vReservedQuantity,
|
||||||
vStateCode
|
vStateCode,
|
||||||
|
vCurrentShelvingFk
|
||||||
FROM itemShelvingSale iss
|
FROM itemShelvingSale iss
|
||||||
JOIN sale s ON s.id = iss.saleFk
|
JOIN sale s ON s.id = iss.saleFk
|
||||||
LEFT JOIN vn.saleGroupDetail sgd ON sgd.saleFk = iss.saleFk
|
JOIN itemShelving ish ON ish.id = iss.itemShelvingFk
|
||||||
|
LEFT JOIN saleGroupDetail sgd ON sgd.saleFk = iss.saleFk
|
||||||
|
LEFT JOIN shelving sh ON sh.id = ish.shelvingFk
|
||||||
WHERE iss.id = vItemShelvingSaleFk
|
WHERE iss.id = vItemShelvingSaleFk
|
||||||
AND NOT iss.isPicked;
|
AND NOT iss.isPicked;
|
||||||
|
|
||||||
|
IF NOT (vCurrentShelvingFk <=> vShelvingFk) THEN
|
||||||
|
CALL util.throw('The shelving can not be different from the shelving reserved');
|
||||||
|
END IF;
|
||||||
|
|
||||||
IF vQuantity > vReservedQuantity
|
IF vQuantity > vReservedQuantity
|
||||||
OR (vQuantity < vReservedQuantity AND NOT vIsItemShelvingSaleEmpty)
|
OR (vQuantity < vReservedQuantity AND NOT vIsItemShelvingSaleEmpty)
|
||||||
OR (vQuantity = vReservedQuantity AND vIsItemShelvingSaleEmpty) THEN
|
OR (vQuantity = vReservedQuantity AND vIsItemShelvingSaleEmpty) THEN
|
||||||
|
|
|
@ -21,7 +21,8 @@ BEGIN
|
||||||
ish.isChecked,
|
ish.isChecked,
|
||||||
ic.url,
|
ic.url,
|
||||||
ish.available,
|
ish.available,
|
||||||
ish.buyFk
|
ish.buyFk,
|
||||||
|
ish.shelvingFk
|
||||||
FROM itemShelving ish
|
FROM itemShelving ish
|
||||||
JOIN item i ON i.id = ish.itemFk
|
JOIN item i ON i.id = ish.itemFk
|
||||||
JOIN shelving s ON s.id = ish.shelvingFk
|
JOIN shelving s ON s.id = ish.shelvingFk
|
||||||
|
|
|
@ -59,7 +59,7 @@ BEGIN
|
||||||
AND (s.id <> vSupplierInventoryFk OR vDated IS NULL)
|
AND (s.id <> vSupplierInventoryFk OR vDated IS NULL)
|
||||||
AND b.itemFk = vItemFk
|
AND b.itemFk = vItemFk
|
||||||
AND NOT e.isExcludedFromAvailable
|
AND NOT e.isExcludedFromAvailable
|
||||||
AND NOT tr.daysInForward
|
AND NOT tr.isRaid
|
||||||
),
|
),
|
||||||
entriesOut AS (
|
entriesOut AS (
|
||||||
SELECT 'entry',
|
SELECT 'entry',
|
||||||
|
@ -95,7 +95,7 @@ BEGIN
|
||||||
AND b.itemFk = vItemFk
|
AND b.itemFk = vItemFk
|
||||||
AND NOT e.isExcludedFromAvailable
|
AND NOT e.isExcludedFromAvailable
|
||||||
AND NOT w.isFeedStock
|
AND NOT w.isFeedStock
|
||||||
AND NOT tr.daysInForward
|
AND NOT tr.isRaid
|
||||||
),
|
),
|
||||||
sales AS (
|
sales AS (
|
||||||
WITH itemSales AS (
|
WITH itemSales AS (
|
||||||
|
|
|
@ -63,7 +63,7 @@ BEGIN
|
||||||
AND NOT e.isExcludedFromAvailable
|
AND NOT e.isExcludedFromAvailable
|
||||||
AND b.quantity <> 0
|
AND b.quantity <> 0
|
||||||
AND (vItemFk IS NULL OR b.itemFk = vItemFk)
|
AND (vItemFk IS NULL OR b.itemFk = vItemFk)
|
||||||
AND NOT t.daysInForward
|
AND NOT t.isRaid
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT r.itemFk,
|
SELECT r.itemFk,
|
||||||
r.shipment,
|
r.shipment,
|
||||||
|
|
|
@ -30,7 +30,7 @@ BEGIN
|
||||||
AND NOT s.name = 'INVENTARIO'
|
AND NOT s.name = 'INVENTARIO'
|
||||||
AND (vWarehouseFk IS NULL OR t.warehouseInFk = vWarehouseFk)
|
AND (vWarehouseFk IS NULL OR t.warehouseInFk = vWarehouseFk)
|
||||||
AND w.isComparative
|
AND w.isComparative
|
||||||
AND NOT t.daysInForward
|
AND NOT t.isRaid
|
||||||
GROUP BY i.id;
|
GROUP BY i.id;
|
||||||
|
|
||||||
UPDATE tmp.itemInventory y
|
UPDATE tmp.itemInventory y
|
||||||
|
|
|
@ -109,7 +109,7 @@ BEGIN
|
||||||
JOIN warehouse w ON w.id = tr.warehouseInFk
|
JOIN warehouse w ON w.id = tr.warehouseInFk
|
||||||
WHERE tr.landed BETWEEN vInventoried AND vDateDayEnd
|
WHERE tr.landed BETWEEN vInventoried AND vDateDayEnd
|
||||||
AND IF(tr.landed = util.VN_CURDATE(), tr.isReceived, TRUE)
|
AND IF(tr.landed = util.VN_CURDATE(), tr.isReceived, TRUE)
|
||||||
AND NOT tr.daysInForward
|
AND NOT tr.isRaid
|
||||||
AND w.valuatedInventory
|
AND w.valuatedInventory
|
||||||
AND t.isInventory
|
AND t.isInventory
|
||||||
AND e.supplierFk <> vInventorySupplierFk
|
AND e.supplierFk <> vInventorySupplierFk
|
||||||
|
@ -131,7 +131,7 @@ BEGIN
|
||||||
JOIN itemCategory ic ON ic.id = t.categoryFk
|
JOIN itemCategory ic ON ic.id = t.categoryFk
|
||||||
JOIN warehouse w ON w.id = tr.warehouseOutFk
|
JOIN warehouse w ON w.id = tr.warehouseOutFk
|
||||||
WHERE tr.shipped BETWEEN vInventoried AND vDateDayEnd
|
WHERE tr.shipped BETWEEN vInventoried AND vDateDayEnd
|
||||||
AND NOT tr.daysInForward
|
AND NOT tr.isRaid
|
||||||
AND w.valuatedInventory
|
AND w.valuatedInventory
|
||||||
AND t.isInventory
|
AND t.isInventory
|
||||||
AND (t.id = vItemTypeFk OR vItemTypeFk IS NULL)
|
AND (t.id = vItemTypeFk OR vItemTypeFk IS NULL)
|
||||||
|
@ -196,7 +196,7 @@ BEGIN
|
||||||
JOIN warehouse wIn ON wIn.id = tr.warehouseInFk
|
JOIN warehouse wIn ON wIn.id = tr.warehouseInFk
|
||||||
JOIN warehouse wOut ON wOut.id = tr.warehouseOutFk
|
JOIN warehouse wOut ON wOut.id = tr.warehouseOutFk
|
||||||
WHERE vDated >= tr.shipped AND vDated < tr.landed
|
WHERE vDated >= tr.shipped AND vDated < tr.landed
|
||||||
AND NOT tr.daysInForward
|
AND NOT tr.isRaid
|
||||||
AND wIn.valuatedInventory
|
AND wIn.valuatedInventory
|
||||||
AND t.isInventory
|
AND t.isInventory
|
||||||
AND e.isConfirmed
|
AND e.isConfirmed
|
||||||
|
|
|
@ -60,7 +60,7 @@ proc: BEGIN
|
||||||
AND IFNULL(vWarehouseFk, t.warehouseInFk) = t.warehouseInFk
|
AND IFNULL(vWarehouseFk, t.warehouseInFk) = t.warehouseInFk
|
||||||
AND w.isComparative
|
AND w.isComparative
|
||||||
AND NOT e.isExcludedFromAvailable
|
AND NOT e.isExcludedFromAvailable
|
||||||
AND NOT t.daysInForward
|
AND NOT t.isRaid
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT b.itemFk, - b.quantity
|
SELECT b.itemFk, - b.quantity
|
||||||
FROM buy b
|
FROM buy b
|
||||||
|
@ -71,7 +71,7 @@ proc: BEGIN
|
||||||
AND IFNULL(vWarehouseFk, t.warehouseOutFk) = t.warehouseOutFk
|
AND IFNULL(vWarehouseFk, t.warehouseOutFk) = t.warehouseOutFk
|
||||||
AND w.isComparative
|
AND w.isComparative
|
||||||
AND NOT e.isExcludedFromAvailable
|
AND NOT e.isExcludedFromAvailable
|
||||||
AND NOT t.daysInForward
|
AND NOT t.isRaid
|
||||||
) sub
|
) sub
|
||||||
GROUP BY itemFk;
|
GROUP BY itemFk;
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ proc: BEGIN
|
||||||
AND IFNULL(vWarehouseFk, t.warehouseInFk) = t.warehouseInFk
|
AND IFNULL(vWarehouseFk, t.warehouseInFk) = t.warehouseInFk
|
||||||
AND w.isComparative
|
AND w.isComparative
|
||||||
AND NOT e.isExcludedFromAvailable
|
AND NOT e.isExcludedFromAvailable
|
||||||
AND NOT t.daysInForward
|
AND NOT t.isRaid
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT b.itemFk, t.shipped, - b.quantity
|
SELECT b.itemFk, t.shipped, - b.quantity
|
||||||
FROM buy b
|
FROM buy b
|
||||||
|
@ -132,7 +132,7 @@ proc: BEGIN
|
||||||
AND IFNULL(vWarehouseFk, t.warehouseOutFk) = t.warehouseOutFk
|
AND IFNULL(vWarehouseFk, t.warehouseOutFk) = t.warehouseOutFk
|
||||||
AND w.isComparative
|
AND w.isComparative
|
||||||
AND NOT e.isExcludedFromAvailable
|
AND NOT e.isExcludedFromAvailable
|
||||||
AND NOT t.daysInForward
|
AND NOT t.isRaid
|
||||||
) sub
|
) sub
|
||||||
GROUP BY sub.itemFk, sub.dated;
|
GROUP BY sub.itemFk, sub.dated;
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,8 @@ BEGIN
|
||||||
*/
|
*/
|
||||||
DECLARE vIsUpdatable, vIsFreelance BOOL DEFAULT 0;
|
DECLARE vIsUpdatable, vIsFreelance BOOL DEFAULT 0;
|
||||||
DECLARE vAgencyModePricePercentage DOUBLE;
|
DECLARE vAgencyModePricePercentage DOUBLE;
|
||||||
|
DECLARE vIsKmTruckRate BOOL;
|
||||||
|
DECLARE vCountryFk INT;
|
||||||
|
|
||||||
SELECT r.created >= rc.cutoffDated INTO vIsUpdatable
|
SELECT r.created >= rc.cutoffDated INTO vIsUpdatable
|
||||||
FROM route r
|
FROM route r
|
||||||
|
@ -21,10 +23,17 @@ BEGIN
|
||||||
DELETE FROM routeCommission
|
DELETE FROM routeCommission
|
||||||
WHERE routeFk = vSelf;
|
WHERE routeFk = vSelf;
|
||||||
|
|
||||||
SELECT w.isFreelance INTO vIsFreelance
|
SELECT w.isFreelance, v.isKmTruckRate, p.countryFk INTO vIsFreelance, vIsKmTruckRate, vCountryFk
|
||||||
FROM route r
|
FROM route r
|
||||||
JOIN worker w ON w.id = r.workerFk
|
JOIN worker w ON w.id = r.workerFk
|
||||||
WHERE r.id = vSelf;
|
JOIN vehicle v ON v.id = r.vehicleFk
|
||||||
|
LEFT JOIN ticket t ON t.routeFk = r.id
|
||||||
|
LEFT JOIN address a ON a.id = t.addressFk
|
||||||
|
LEFT JOIN province p ON p.id = a.provinceFk
|
||||||
|
WHERE r.id = vSelf
|
||||||
|
GROUP BY p.countryFk
|
||||||
|
ORDER BY COUNT(*) DESC
|
||||||
|
LIMIT 1;
|
||||||
|
|
||||||
SELECT ampp.percentage INTO vAgencyModePricePercentage
|
SELECT ampp.percentage INTO vAgencyModePricePercentage
|
||||||
FROM route r
|
FROM route r
|
||||||
|
@ -39,7 +48,9 @@ BEGIN
|
||||||
workCenterFk,
|
workCenterFk,
|
||||||
freelanceYearlyM3,
|
freelanceYearlyM3,
|
||||||
cat4m3,
|
cat4m3,
|
||||||
cat5m3
|
cat5m3,
|
||||||
|
isKmTruckRate,
|
||||||
|
countryFk
|
||||||
)
|
)
|
||||||
SELECT vSelf,
|
SELECT vSelf,
|
||||||
r.commissionWorkCenterFk,
|
r.commissionWorkCenterFk,
|
||||||
|
@ -51,11 +62,14 @@ BEGIN
|
||||||
IFNULL(r.m3, 0),
|
IFNULL(r.m3, 0),
|
||||||
0
|
0
|
||||||
),
|
),
|
||||||
rc.distributionCat4M3 * IFNULL(r.m3, 0),
|
IFNULL(wc.distributionCat4M3, rc.distributionCat4M3) * IFNULL(r.m3, 0),
|
||||||
rc.distributionCat5M3 * IFNULL(r.m3, 0)
|
IFNULL(wc.distributionCat5M3, rc.distributionCat5M3) * IFNULL(r.m3, 0),
|
||||||
|
vIsKmTruckRate,
|
||||||
|
vCountryFk
|
||||||
FROM route r
|
FROM route r
|
||||||
JOIN vehicle v ON v.id = r.vehicleFk
|
JOIN vehicle v ON v.id = r.vehicleFk
|
||||||
JOIN routeConfig rc
|
JOIN routeConfig rc
|
||||||
|
LEFT JOIN workCenterCommission wc ON wc.workCenterFk = r.commissionWorkCenterFk
|
||||||
WHERE r.id = vSelf
|
WHERE r.id = vSelf
|
||||||
AND r.workerFk
|
AND r.workerFk
|
||||||
AND r.commissionWorkCenterFk;
|
AND r.commissionWorkCenterFk;
|
||||||
|
@ -68,21 +82,28 @@ BEGIN
|
||||||
yearlyKm,
|
yearlyKm,
|
||||||
yearlyM3,
|
yearlyM3,
|
||||||
cat4m3,
|
cat4m3,
|
||||||
cat5m3
|
cat5m3,
|
||||||
|
isKmTruckRate,
|
||||||
|
countryFk
|
||||||
)
|
)
|
||||||
SELECT vSelf,
|
SELECT vSelf,
|
||||||
r.commissionWorkCenterFk,
|
r.commissionWorkCenterFk,
|
||||||
(r.kmEnd - r.kmStart) *
|
(r.kmEnd - r.kmStart) *
|
||||||
IF(v.isKmTruckRate, rc.kmHeavy, rc.kmLight),
|
IF(v.isKmTruckRate, rc.kmHeavy, rc.kmLight),
|
||||||
IFNULL(r.m3, 0) *
|
IFNULL(r.m3, 0) *
|
||||||
IF(v.isKmTruckRate, rc.deliveryM3Cat5, rc.deliveryM3Cat4),
|
IF(v.isKmTruckRate,
|
||||||
|
IFNULL(wc.deliveryM3Cat5, rc.deliveryM3Cat5),
|
||||||
|
IFNULL(wc.deliveryM3Cat4, rc.deliveryM3Cat4)),
|
||||||
(r.kmEnd - r.kmStart) * rc.kmYearly,
|
(r.kmEnd - r.kmStart) * rc.kmYearly,
|
||||||
IFNULL(r.m3, 0) * rc.m3Yearly,
|
IFNULL(r.m3, 0) * rc.m3Yearly,
|
||||||
rc.distributionCat4M3 * IFNULL(r.m3, 0),
|
IFNULL(wc.distributionCat4M3, rc.distributionCat4M3) * IFNULL(r.m3, 0),
|
||||||
rc.distributionCat5M3 * IFNULL(r.m3, 0)
|
IFNULL(wc.distributionCat5M3, rc.distributionCat5M3) * IFNULL(r.m3, 0),
|
||||||
|
vIsKmTruckRate,
|
||||||
|
vCountryFk
|
||||||
FROM route r
|
FROM route r
|
||||||
JOIN vehicle v ON v.id = r.vehicleFk
|
JOIN vehicle v ON v.id = r.vehicleFk
|
||||||
JOIN routeConfig rc
|
JOIN routeConfig rc
|
||||||
|
LEFT JOIN workCenterCommission wc ON wc.workCenterFk = r.commissionWorkCenterFk
|
||||||
WHERE r.id = vSelf
|
WHERE r.id = vSelf
|
||||||
AND r.kmStart
|
AND r.kmStart
|
||||||
AND r.kmEnd
|
AND r.kmEnd
|
||||||
|
|
|
@ -80,7 +80,7 @@ proc: BEGIN
|
||||||
|
|
||||||
UPDATE stockBought s
|
UPDATE stockBought s
|
||||||
JOIN tStockSold ts ON ts.workerFk = s.workerFk
|
JOIN tStockSold ts ON ts.workerFk = s.workerFk
|
||||||
SET s.bought = IF(s.bought < ts.sold, ROUND(s.bought - ts.sold, 1), 0)
|
SET s.bought = IF(s.bought < ABS(ts.sold), 0, ROUND(s.bought - ABS(ts.sold), 1))
|
||||||
WHERE s.dated = vDated;
|
WHERE s.dated = vDated;
|
||||||
|
|
||||||
DROP TEMPORARY TABLE tCurrentData, tmp.item, tmp.buyUltimate, tStockSold;
|
DROP TEMPORARY TABLE tCurrentData, tmp.item, tmp.buyUltimate, tStockSold;
|
||||||
|
|
|
@ -5,122 +5,122 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_splitItemPacki
|
||||||
)
|
)
|
||||||
BEGIN
|
BEGIN
|
||||||
/**
|
/**
|
||||||
* Clona y reparte las ventas de un ticket en funcion del tipo de empaquetado.
|
* Separa en diferentes tickets según el tipo de empaquetado
|
||||||
* Respeta el id inicial para el tipo propuesto.
|
* El ticket original conserva las líneas del tipo de empaquetado especificado
|
||||||
|
* Las líneas sin tipo de empaquetado se asignan al ticket del tipo por defecto.
|
||||||
*
|
*
|
||||||
* @param vSelf Id ticket
|
* @param vSelf Id del ticket original
|
||||||
* @param vOriginalItemPackingTypeFk Tipo para el que se reserva el número de ticket original
|
* @param vOriginalItemPackingTypeFk Tipo de empaquetado a mantener en el ticket original
|
||||||
* @return table tmp.ticketIPT(ticketFk, itemPackingTypeFk)
|
* @return table tmp.ticketIPT(ticketFk, itemPackingTypeFk)
|
||||||
*/
|
*/
|
||||||
DECLARE vItemPackingTypeFk VARCHAR(1) DEFAULT 'H';
|
DECLARE vIsDone BOOLEAN DEFAULT FALSE;
|
||||||
|
DECLARE vCurrentPackingType VARCHAR(1);
|
||||||
|
DECLARE vDefaultPackingType VARCHAR(1);
|
||||||
|
DECLARE vHasOriginalPackingType BOOLEAN;
|
||||||
DECLARE vNewTicketFk INT;
|
DECLARE vNewTicketFk INT;
|
||||||
DECLARE vPackingTypesToSplit INT;
|
DECLARE vTicketFk INT;
|
||||||
DECLARE vDone INT DEFAULT FALSE;
|
|
||||||
|
|
||||||
DECLARE vSaleGroup CURSOR FOR
|
DECLARE vItemPackingTypes CURSOR FOR
|
||||||
SELECT itemPackingTypeFk
|
SELECT DISTINCT itemPackingTypeFk FROM tSalesToMove;
|
||||||
FROM tSaleGroup
|
|
||||||
WHERE itemPackingTypeFk IS NOT NULL
|
|
||||||
ORDER BY (itemPackingTypeFk = vOriginalItemPackingTypeFk) DESC;
|
|
||||||
|
|
||||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
|
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vIsDone = TRUE;
|
||||||
|
|
||||||
|
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
||||||
|
BEGIN
|
||||||
|
ROLLBACK;
|
||||||
|
RESIGNAL;
|
||||||
|
END;
|
||||||
|
|
||||||
|
CREATE OR REPLACE TEMPORARY TABLE tSalesToMove (
|
||||||
|
ticketFk INT,
|
||||||
|
saleFk INT,
|
||||||
|
itemPackingTypeFk VARCHAR(1)
|
||||||
|
) ENGINE=MEMORY;
|
||||||
|
|
||||||
|
SELECT COALESCE(MAX(ic.defaultPackingTypeFk), MAX(i.itemPackingTypeFk)) INTO vDefaultPackingType
|
||||||
|
FROM vn.sale s
|
||||||
|
JOIN item i ON i.id = s.itemFk
|
||||||
|
LEFT JOIN itemConfig ic ON ic.defaultPackingTypeFk = i.itemPackingTypeFk
|
||||||
|
WHERE s.ticketFk = vSelf
|
||||||
|
GROUP BY s.ticketFk;
|
||||||
|
|
||||||
|
SELECT EXISTS (
|
||||||
|
SELECT TRUE
|
||||||
|
FROM sale s
|
||||||
|
JOIN item i ON i.id = s.itemFk
|
||||||
|
WHERE s.ticketFk = vSelf
|
||||||
|
AND i.itemPackingTypeFk = vOriginalItemPackingTypeFk
|
||||||
|
) INTO vHasOriginalPackingType;
|
||||||
|
|
||||||
|
IF vOriginalItemPackingTypeFk IS NULL OR NOT vHasOriginalPackingType THEN
|
||||||
|
SET vOriginalItemPackingTypeFk = vDefaultPackingType;
|
||||||
|
END IF;
|
||||||
|
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
|
|
||||||
SELECT id
|
SELECT t.id INTO vTicketFk
|
||||||
FROM sale
|
FROM ticket t
|
||||||
WHERE ticketFk = vSelf
|
JOIN sale s ON s.id = t.id
|
||||||
AND NOT quantity
|
WHERE t.id = vSelf
|
||||||
FOR UPDATE;
|
FOR UPDATE;
|
||||||
|
|
||||||
DELETE FROM sale
|
INSERT INTO tSalesToMove (saleFk, itemPackingTypeFk)
|
||||||
WHERE NOT quantity
|
SELECT s.id, i.itemPackingTypeFk
|
||||||
AND ticketFk = vSelf;
|
|
||||||
|
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tSale
|
|
||||||
(PRIMARY KEY (id))
|
|
||||||
ENGINE = MEMORY
|
|
||||||
SELECT s.id, i.itemPackingTypeFk, IFNULL(sv.litros, 0) litros
|
|
||||||
FROM sale s
|
FROM sale s
|
||||||
JOIN item i ON i.id = s.itemFk
|
JOIN item i ON i.id = s.itemFk
|
||||||
LEFT JOIN saleVolume sv ON sv.saleFk = s.id
|
WHERE s.ticketFk = vSelf
|
||||||
WHERE s.ticketFk = vSelf;
|
AND i.itemPackingTypeFk <> vOriginalItemPackingTypeFk;
|
||||||
|
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tSaleGroup
|
OPEN vItemPackingTypes;
|
||||||
ENGINE = MEMORY
|
l: LOOP
|
||||||
SELECT itemPackingTypeFk, SUM(litros) totalLitros
|
SET vIsDone = FALSE;
|
||||||
FROM tSale
|
FETCH vItemPackingTypes INTO vCurrentPackingType;
|
||||||
GROUP BY itemPackingTypeFk;
|
|
||||||
|
|
||||||
SELECT COUNT(*) INTO vPackingTypesToSplit
|
IF vIsDone THEN
|
||||||
FROM tSaleGroup
|
LEAVE l;
|
||||||
WHERE itemPackingTypeFk IS NOT NULL;
|
END IF;
|
||||||
|
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tmp.ticketIPT(
|
CALL ticket_Clone(vSelf, vNewTicketFk);
|
||||||
ticketFk INT,
|
|
||||||
itemPackingTypeFk VARCHAR(1)
|
|
||||||
) ENGINE = MEMORY;
|
|
||||||
|
|
||||||
CASE vPackingTypesToSplit
|
SELECT id INTO vTicketFk
|
||||||
WHEN 0 THEN
|
FROM ticket t
|
||||||
INSERT INTO tmp.ticketIPT(ticketFk, itemPackingTypeFk)
|
WHERE t.id = vNewTicketFk
|
||||||
VALUES(vSelf, vItemPackingTypeFk);
|
FOR UPDATE;
|
||||||
WHEN 1 THEN
|
|
||||||
INSERT INTO tmp.ticketIPT(ticketFk, itemPackingTypeFk)
|
|
||||||
SELECT vSelf, itemPackingTypeFk
|
|
||||||
FROM tSaleGroup
|
|
||||||
WHERE itemPackingTypeFk IS NOT NULL;
|
|
||||||
ELSE
|
|
||||||
OPEN vSaleGroup;
|
|
||||||
FETCH vSaleGroup INTO vItemPackingTypeFk;
|
|
||||||
|
|
||||||
INSERT INTO tmp.ticketIPT(ticketFk, itemPackingTypeFk)
|
UPDATE tSalesToMove
|
||||||
VALUES(vSelf, vItemPackingTypeFk);
|
SET ticketFk = vNewTicketFk
|
||||||
|
WHERE itemPackingTypeFk = vCurrentPackingType;
|
||||||
|
|
||||||
l: LOOP
|
IF vCurrentPackingType = vDefaultPackingType THEN
|
||||||
SET vDone = FALSE;
|
INSERT INTO tSalesToMove (ticketFk, saleFk, itemPackingTypeFk)
|
||||||
FETCH vSaleGroup INTO vItemPackingTypeFk;
|
SELECT vNewTicketFk, s.id, i.itemPackingTypeFk
|
||||||
|
FROM sale s
|
||||||
|
JOIN item i ON i.id = s.itemFk
|
||||||
|
WHERE s.ticketFk = vSelf
|
||||||
|
AND i.itemPackingTypeFk IS NULL;
|
||||||
|
END IF;
|
||||||
|
|
||||||
IF vDone THEN
|
END LOOP;
|
||||||
LEAVE l;
|
CLOSE vItemPackingTypes;
|
||||||
END IF;
|
|
||||||
|
|
||||||
CALL ticket_Clone(vSelf, vNewTicketFk);
|
UPDATE sale s
|
||||||
|
JOIN tSalesToMove t ON t.saleFk = s.id
|
||||||
|
SET s.ticketFk = t.ticketFk;
|
||||||
|
|
||||||
INSERT INTO tmp.ticketIPT(ticketFk, itemPackingTypeFk)
|
CREATE OR REPLACE TEMPORARY TABLE tmp.ticketIPT
|
||||||
VALUES(vNewTicketFk, vItemPackingTypeFk);
|
ENGINE=MEMORY
|
||||||
END LOOP;
|
SELECT s.ticketFk, MAX(i.itemPackingTypeFk) itemPackingTypeFk
|
||||||
|
FROM sale s
|
||||||
CLOSE vSaleGroup;
|
JOIN item i ON i.id = s.itemFk
|
||||||
|
WHERE s.ticketFk = vSelf
|
||||||
SELECT s.id
|
GROUP BY s.ticketFk
|
||||||
FROM sale s
|
UNION
|
||||||
JOIN tSale ts ON ts.id = s.id
|
SELECT ticketFk, MAX(itemPackingTypeFk)
|
||||||
JOIN tmp.ticketIPT t ON t.itemPackingTypeFk = ts.itemPackingTypeFk
|
FROM tSalesToMove
|
||||||
FOR UPDATE;
|
GROUP BY ticketFk;
|
||||||
|
|
||||||
UPDATE sale s
|
|
||||||
JOIN tSale ts ON ts.id = s.id
|
|
||||||
JOIN tmp.ticketIPT t ON t.itemPackingTypeFk = ts.itemPackingTypeFk
|
|
||||||
SET s.ticketFk = t.ticketFk;
|
|
||||||
|
|
||||||
SELECT itemPackingTypeFk INTO vItemPackingTypeFk
|
|
||||||
FROM tSaleGroup sg
|
|
||||||
WHERE sg.itemPackingTypeFk IS NOT NULL
|
|
||||||
ORDER BY sg.itemPackingTypeFk
|
|
||||||
LIMIT 1;
|
|
||||||
|
|
||||||
UPDATE sale s
|
|
||||||
JOIN tSale ts ON ts.id = s.id
|
|
||||||
JOIN tmp.ticketIPT t ON t.itemPackingTypeFk = vItemPackingTypeFk
|
|
||||||
SET s.ticketFk = t.ticketFk
|
|
||||||
WHERE ts.itemPackingTypeFk IS NULL;
|
|
||||||
END CASE;
|
|
||||||
|
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
DROP TEMPORARY TABLE
|
DROP TEMPORARY TABLE tSalesToMove;
|
||||||
tSale,
|
|
||||||
tSaleGroup;
|
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -10,7 +10,7 @@ BEGIN
|
||||||
JOIN vn.entry e ON e.travelFk = tr.id
|
JOIN vn.entry e ON e.travelFk = tr.id
|
||||||
JOIN vn.buy b ON b.entryFk = e.id
|
JOIN vn.buy b ON b.entryFk = e.id
|
||||||
WHERE tr.landed BETWEEN vFromDated AND vToDated
|
WHERE tr.landed BETWEEN vFromDated AND vToDated
|
||||||
AND NOT tr.daysInForward
|
AND NOT tr.isRaid
|
||||||
AND tr.warehouseInFk = vWarehouseFk
|
AND tr.warehouseInFk = vWarehouseFk
|
||||||
GROUP BY tr.landed , a.name ;
|
GROUP BY tr.landed , a.name ;
|
||||||
END$$
|
END$$
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
DELIMITER $$
|
||||||
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`travel_checkRaid`(
|
||||||
|
vIsRaid BOOL,
|
||||||
|
vDaysInForward INT
|
||||||
|
)
|
||||||
|
BEGIN
|
||||||
|
/**
|
||||||
|
* Check if the values of isRaid and daysInforward are correct
|
||||||
|
*
|
||||||
|
* @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');
|
||||||
|
END IF;
|
||||||
|
END$$
|
||||||
|
DELIMITER ;
|
|
@ -37,7 +37,8 @@ BEGIN
|
||||||
SELECT id travelFk,
|
SELECT id travelFk,
|
||||||
util.VN_CURDATE() + INTERVAL daysInForward DAY newLanded
|
util.VN_CURDATE() + INTERVAL daysInForward DAY newLanded
|
||||||
FROM travel
|
FROM travel
|
||||||
WHERE daysInForward;
|
WHERE isRaid
|
||||||
|
AND daysInForward;
|
||||||
|
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
|
|
||||||
|
|
|
@ -1,168 +0,0 @@
|
||||||
DELIMITER $$
|
|
||||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`workerTimeControl_check`(vUserFk INT, vDated DATE,vTabletFk VARCHAR(100))
|
|
||||||
proc: BEGIN
|
|
||||||
/**
|
|
||||||
* Verifica si el empleado puede fichar en el momento actual, si puede fichar llama a workerTimeControlAdd
|
|
||||||
*
|
|
||||||
* @param vUserFk Identificador del trabajador
|
|
||||||
* @return Retorna si encuentra un problema 'odd','maxTimeWork','breakDay','breakWeek' ;
|
|
||||||
* En caso de tener algun problema retorna el primero que encuentra
|
|
||||||
*/
|
|
||||||
DECLARE vLastIn DATETIME ;
|
|
||||||
DECLARE vLastOut DATETIME ;
|
|
||||||
DECLARE vDayWorkMax INT;
|
|
||||||
DECLARE vDayBreak INT;
|
|
||||||
DECLARE vWeekBreak INT ;
|
|
||||||
DECLARE vWeekScope INT;
|
|
||||||
DECLARE vDayStayMax INT;
|
|
||||||
DECLARE vProblem VARCHAR(20) DEFAULT NULL;
|
|
||||||
DECLARE vTimedWorked INT;
|
|
||||||
DECLARE vCalendarStateType VARCHAR(20) DEFAULT NULL;
|
|
||||||
DECLARE vDepartmentFk INT;
|
|
||||||
DECLARE vTo VARCHAR(50) DEFAULT NULL;
|
|
||||||
DECLARE vUserName VARCHAR(50) DEFAULT NULL;
|
|
||||||
DECLARE vBody VARCHAR(255) DEFAULT NULL;
|
|
||||||
|
|
||||||
SELECT dayBreak, weekBreak, weekScope, dayWorkMax, dayStayMax
|
|
||||||
INTO vDayBreak, vWeekBreak, vWeekScope, vDayWorkMax, vDayStayMax
|
|
||||||
FROM workerTimeControlParams;
|
|
||||||
|
|
||||||
SELECT MAX(timed) INTO vLastIn
|
|
||||||
FROM workerTimeControl
|
|
||||||
WHERE userFk = vUserFk
|
|
||||||
AND direction = 'in';
|
|
||||||
|
|
||||||
SELECT MAX(timed) INTO vLastOut
|
|
||||||
FROM workerTimeControl
|
|
||||||
WHERE userFk = vUserFk
|
|
||||||
AND direction = 'out';
|
|
||||||
|
|
||||||
SELECT CONCAT(u.name,'@verdnatura.es') INTO vTo
|
|
||||||
FROM account.user u
|
|
||||||
WHERE u.id = (SELECT bossFk FROM worker WHERE id = vUserFk);
|
|
||||||
|
|
||||||
SELECT CONCAT(firstName,' ',lastName) INTO vUserName
|
|
||||||
FROM worker w
|
|
||||||
WHERE w.id = vUserFk;
|
|
||||||
|
|
||||||
|
|
||||||
IF UNIX_TIMESTAMP(util.VN_NOW()) - UNIX_TIMESTAMP(vLastIn) > vDayStayMax THEN -- NUEVA JORNADA
|
|
||||||
|
|
||||||
-- VERIFICAR DESCANSO DIARIO
|
|
||||||
IF UNIX_TIMESTAMP(util.VN_NOW()) - UNIX_TIMESTAMP(vLastOut) < vDayBreak THEN
|
|
||||||
SELECT "Descansos 12 h" AS problem;
|
|
||||||
-- ENVIAMOS CORREO AL BOSSFK
|
|
||||||
SELECT CONCAT(vUserName,' No ha podido fichar por el siguiente problema: ',"Descansos 12 h") INTO vBody;
|
|
||||||
CALL mail_insert(vTo,vTo,'error al fichar',vBody);
|
|
||||||
LEAVE proc;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
-- VERIFICAR FICHADAS IMPARES DEL ÚLTIMO DÍA QUE SE FICHÓ
|
|
||||||
IF (SELECT MOD(COUNT(*),2) -- <>0
|
|
||||||
FROM workerTimeControl
|
|
||||||
WHERE userFk = vUserFk
|
|
||||||
AND timed >= vLastIn
|
|
||||||
) THEN
|
|
||||||
SELECT "Dias con fichadas impares" AS problem;
|
|
||||||
-- ENVIAMOS CORREO AL BOSSFK
|
|
||||||
SELECT CONCAT(vUserName,' No ha podido fichar por el siguiente problema: ',"Dias con fichadas impares") INTO vBody;
|
|
||||||
CALL mail_insert(vTo,vTo,'error al fichar',vBody);
|
|
||||||
LEAVE proc;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
-- VERIFICAR VACACIONES
|
|
||||||
SELECT at2.name INTO vCalendarStateType
|
|
||||||
FROM calendar c
|
|
||||||
JOIN business b ON b.id = c.businessFk
|
|
||||||
JOIN absenceType at2 ON at2.id = c.dayOffTypeFk
|
|
||||||
WHERE c.dated = util.VN_CURDATE()
|
|
||||||
AND at2.isAllowedToWork = FALSE
|
|
||||||
AND b.workerFk = vUserFk
|
|
||||||
LIMIT 1;
|
|
||||||
|
|
||||||
IF(LENGTH(vCalendarStateType)) THEN
|
|
||||||
SELECT vCalendarStateType AS problem;
|
|
||||||
-- ENVIAMOS CORREO AL BOSSFK
|
|
||||||
SELECT CONCAT(vUserName,' No ha podido fichar por el siguiente problema: ',"Vacaciones") INTO vBody;
|
|
||||||
CALL mail_insert(vTo,vTo,'error al fichar',vBody);
|
|
||||||
LEAVE proc;
|
|
||||||
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
-- VERIFICAR CONTRATO EN VIGOR
|
|
||||||
IF (SELECT COUNT(*)
|
|
||||||
FROM business b
|
|
||||||
WHERE b.workerFk = vUserFk
|
|
||||||
AND b.started <= vDated
|
|
||||||
AND IFNULL(b.ended, vDated) >= vDated
|
|
||||||
) = 0 THEN
|
|
||||||
SELECT "No hay un contrato en vigor" AS problem;
|
|
||||||
-- ENVIAMOS CORREO AL BOSSFK
|
|
||||||
SELECT CONCAT(vUserName,' No ha podido fichar por el siguiente problema: ',"No hay un contrato en vigor") INTO vBody;
|
|
||||||
CALL mail_insert(vTo,vTo,'error al fichar',vBody);
|
|
||||||
LEAVE proc;
|
|
||||||
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
-- VERIFICAR DESCANSO SEMANAL
|
|
||||||
SET @vHasBreakWeek:= FALSE;
|
|
||||||
SET @vLastTimed:= UNIX_TIMESTAMP((util.VN_NOW() - INTERVAL vWeekScope SECOND));
|
|
||||||
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.trash;
|
|
||||||
CREATE TEMPORARY TABLE tmp.trash
|
|
||||||
SELECT IF(vWeekBreak-(UNIX_TIMESTAMP(timed)-@vLastTimed) <= 0, @vHasBreakWeek:=TRUE, TRUE) alias,
|
|
||||||
@vLastTimed:= UNIX_TIMESTAMP(timed)
|
|
||||||
FROM workerTimeControl
|
|
||||||
WHERE timed>= (util.VN_NOW() - INTERVAL vWeekScope SECOND)
|
|
||||||
AND userFk= vUserFk
|
|
||||||
AND direction IN ('in','out')
|
|
||||||
ORDER BY timed ASC;
|
|
||||||
|
|
||||||
IF UNIX_TIMESTAMP(util.VN_NOW()) - UNIX_TIMESTAMP(vLastOut) < vWeekBreak AND @vHasBreakWeek = FALSE THEN -- REVISA SI EL DESCANSO SE HA REALIZADO DESPUÉS DE LA ÚLTIMA FICHADA
|
|
||||||
SELECT "Descansos 36 h" AS problem;
|
|
||||||
-- ENVIAMOS CORREO AL BOSSFK
|
|
||||||
SELECT CONCAT(vUserName,' No ha podido fichar por el siguiente problema: ',"Descansos 36 h") INTO vBody;
|
|
||||||
CALL mail_insert(vTo,vTo,'error al fichar',vBody);
|
|
||||||
LEAVE proc;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
DROP TEMPORARY TABLE tmp.trash;
|
|
||||||
|
|
||||||
ELSE -- DIA ACTUAL
|
|
||||||
|
|
||||||
-- VERIFICA QUE EL TIEMPO EFECTIVO NO SUPERE EL MÁXIMO
|
|
||||||
SELECT IFNULL(SUM(if( mod(wtc.order,2)=1, -UNIX_TIMESTAMP(timed), UNIX_TIMESTAMP(timed))),0) - IF( MOD(COUNT(*),2), UNIX_TIMESTAMP(util.VN_NOW()), 0) INTO vTimedWorked
|
|
||||||
FROM workerTimeControl wtc
|
|
||||||
WHERE userFk = vUserFk
|
|
||||||
AND timed >= vLastIn
|
|
||||||
ORDER BY timed;
|
|
||||||
|
|
||||||
IF vTimedWorked > vDayWorkMax THEN
|
|
||||||
SELECT "Jornadas" AS problem;
|
|
||||||
-- ENVIAMOS CORREO AL BOSSFK
|
|
||||||
SELECT CONCAT(vUserName,' No ha podido fichar por el siguiente problema: ',"Jornadas") INTO vBody;
|
|
||||||
CALL mail_insert(vTo,vTo,'error al fichar',vBody);
|
|
||||||
LEAVE proc;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
-- VERIFICAR DEPARTAMENTO
|
|
||||||
/* IF vTabletFk IS NOT NULL THEN
|
|
||||||
SELECT wtcu.departmentFk INTO vDepartmentFk
|
|
||||||
FROM workerTimeControlUserInfo wtcu
|
|
||||||
WHERE wtcu.userFk = vUserFk;
|
|
||||||
IF (SELECT COUNT(td.tabletFk)
|
|
||||||
FROM tabletDepartment td
|
|
||||||
WHERE td.tabletFk = vTabletFk AND td.departmentFk = vDepartmentFk
|
|
||||||
) = 0 THEN
|
|
||||||
SELECT "No perteneces a este departamento." AS problem;
|
|
||||||
-- ENVIAMOS CORREO AL BOSSFK
|
|
||||||
SELECT CONCAT(vUserName,' No a podido fichar por el siguiente problema: ',"No perteneces a este departamento.") INTO vBody;
|
|
||||||
CALL mail_insert(vTo,vTo,'error al fichar',vBody);
|
|
||||||
LEAVE proc;
|
|
||||||
END IF;
|
|
||||||
END IF;*/
|
|
||||||
|
|
||||||
END$$
|
|
||||||
DELIMITER ;
|
|
|
@ -6,6 +6,7 @@ BEGIN
|
||||||
DECLARE vIsEqualizated BOOL;
|
DECLARE vIsEqualizated BOOL;
|
||||||
|
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
|
SET NEW.geoFk = address_getGeo(NEW.id);
|
||||||
|
|
||||||
IF (NEW.phone <> '') THEN
|
IF (NEW.phone <> '') THEN
|
||||||
CALL pbx.phone_isValid(NEW.phone);
|
CALL pbx.phone_isValid(NEW.phone);
|
||||||
|
|
|
@ -3,7 +3,6 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`address_beforeUpdate`
|
||||||
BEFORE UPDATE ON `address`
|
BEFORE UPDATE ON `address`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
|
|
||||||
IF !(NEW.phone <=> OLD.phone) AND (NEW.phone <> '') THEN
|
IF !(NEW.phone <=> OLD.phone) AND (NEW.phone <> '') THEN
|
||||||
|
@ -14,5 +13,10 @@ BEGIN
|
||||||
CALL pbx.phone_isValid(NEW.mobile);
|
CALL pbx.phone_isValid(NEW.mobile);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
|
IF NOT (NEW.provinceFk <=> OLD.provinceFk)
|
||||||
|
OR (NEW.postalCode <=> OLD.postalCode) THEN
|
||||||
|
|
||||||
|
SET NEW.geoFk = address_getGeo(NEW.id);
|
||||||
|
END IF;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -3,8 +3,10 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`client_beforeInsert`
|
||||||
BEFORE INSERT ON `client`
|
BEFORE INSERT ON `client`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
|
SET NEW.accountingAccount = 4300000000 + NEW.id;
|
||||||
|
SET NEW.lastSalesPersonFk = NEW.salesPersonFk;
|
||||||
|
SET NEW.geoFk = client_getGeo(NEW.id);
|
||||||
|
|
||||||
IF (NEW.phone <> '') THEN
|
IF (NEW.phone <> '') THEN
|
||||||
CALL pbx.phone_isValid(NEW.phone);
|
CALL pbx.phone_isValid(NEW.phone);
|
||||||
|
@ -13,9 +15,5 @@ BEGIN
|
||||||
IF (NEW.mobile <> '') THEN
|
IF (NEW.mobile <> '') THEN
|
||||||
CALL pbx.phone_isValid(NEW.mobile);
|
CALL pbx.phone_isValid(NEW.mobile);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
SET NEW.accountingAccount = 4300000000 + NEW.id;
|
|
||||||
|
|
||||||
SET NEW.lastSalesPersonFk = NEW.salesPersonFk;
|
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -72,5 +72,11 @@ BEGIN
|
||||||
IF NOT (NEW.businessTypeFk <=> OLD.businessTypeFk) AND (NEW.businessTypeFk = 'individual' OR OLD.businessTypeFk = 'individual') THEN
|
IF NOT (NEW.businessTypeFk <=> OLD.businessTypeFk) AND (NEW.businessTypeFk = 'individual' OR OLD.businessTypeFk = 'individual') THEN
|
||||||
SET NEW.isTaxDataChecked = 0;
|
SET NEW.isTaxDataChecked = 0;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
|
IF NOT (NEW.provinceFk <=> OLD.provinceFk)
|
||||||
|
OR (NEW.postcode <=> OLD.postcode) THEN
|
||||||
|
|
||||||
|
SET NEW.geoFk = client_getGeo(NEW.id);
|
||||||
|
END IF;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -3,7 +3,7 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`entry_beforeUpdate`
|
||||||
BEFORE UPDATE ON `entry`
|
BEFORE UPDATE ON `entry`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
DECLARE vDaysInForward INT;
|
DECLARE vIsRaid BOOL;
|
||||||
DECLARE vPrintedCount INT;
|
DECLARE vPrintedCount INT;
|
||||||
DECLARE vHasDistinctWarehouses BOOL;
|
DECLARE vHasDistinctWarehouses BOOL;
|
||||||
DECLARE vTotalBuy INT;
|
DECLARE vTotalBuy INT;
|
||||||
|
@ -38,10 +38,10 @@ BEGIN
|
||||||
CALL travel_throwAwb(NEW.travelFk);
|
CALL travel_throwAwb(NEW.travelFk);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
SELECT daysInForward INTO vDaysInForward
|
SELECT t.isRaid INTO vIsRaid
|
||||||
FROM travel t
|
FROM travel t
|
||||||
JOIN entry e ON e.travelFk = t.id
|
JOIN entry e ON e.travelFk = t.id
|
||||||
WHERE entryFk = NEW.id;
|
WHERE e.id = NEW.id;
|
||||||
|
|
||||||
SELECT NOT (o.warehouseInFk <=> n.warehouseInFk)
|
SELECT NOT (o.warehouseInFk <=> n.warehouseInFk)
|
||||||
OR NOT (o.warehouseOutFk <=> n.warehouseOutFk)
|
OR NOT (o.warehouseOutFk <=> n.warehouseOutFk)
|
||||||
|
@ -50,7 +50,7 @@ BEGIN
|
||||||
WHERE o.id = OLD.travelFk
|
WHERE o.id = OLD.travelFk
|
||||||
AND n.id = NEW.travelFk;
|
AND n.id = NEW.travelFk;
|
||||||
|
|
||||||
IF vDaysInForward AND vHasDistinctWarehouses THEN
|
IF vIsRaid AND vHasDistinctWarehouses THEN
|
||||||
SIGNAL SQLSTATE '45000'
|
SIGNAL SQLSTATE '45000'
|
||||||
SET MESSAGE_TEXT = 'A cloned entry cannot be moved to a travel with different warehouses';
|
SET MESSAGE_TEXT = 'A cloned entry cannot be moved to a travel with different warehouses';
|
||||||
END IF;
|
END IF;
|
||||||
|
|
|
@ -21,7 +21,8 @@ BEGIN
|
||||||
OR !(NEW.kmEnd <=> OLD.kmEnd)
|
OR !(NEW.kmEnd <=> OLD.kmEnd)
|
||||||
OR !(NEW.workerFk <=> OLD.workerFk)
|
OR !(NEW.workerFk <=> OLD.workerFk)
|
||||||
OR !(NEW.m3 <=> OLD.m3)
|
OR !(NEW.m3 <=> OLD.m3)
|
||||||
OR !(NEW.agencyModeFk <=> OLD.agencyModeFk)THEN
|
OR !(NEW.agencyModeFk <=> OLD.agencyModeFk)
|
||||||
|
OR !(NEW.vehicleFk <=> OLD.vehicleFk)THEN
|
||||||
CALL route_calcCommission(NEW.id);
|
CALL route_calcCommission(NEW.id);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
|
|
|
@ -4,5 +4,6 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`supplier_beforeInsert`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
|
SET NEW.geoFk = supplier_getGeo(NEW.id);
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -40,5 +40,10 @@ BEGIN
|
||||||
SET NEW.isPayMethodChecked = FALSE;
|
SET NEW.isPayMethodChecked = FALSE;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
|
IF NOT (NEW.provinceFk <=> OLD.provinceFk)
|
||||||
|
OR (NEW.postCode <=> OLD.postCode) THEN
|
||||||
|
|
||||||
|
SET NEW.geoFk = supplier_getGeo(NEW.id);
|
||||||
|
END IF;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
DELIMITER $$
|
|
||||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`town_beforeUpdate`
|
|
||||||
BEFORE UPDATE ON `town`
|
|
||||||
FOR EACH ROW
|
|
||||||
BEGIN
|
|
||||||
-- IF !(OLD.geoFk <=> NEW.geoFk) THEN
|
|
||||||
-- CALL zoneGeo_throwNotEditable;
|
|
||||||
-- END IF;
|
|
||||||
END$$
|
|
||||||
DELIMITER ;
|
|
|
@ -9,6 +9,10 @@ BEGIN
|
||||||
|
|
||||||
CALL travel_checkWarehouseIsFeedStock(NEW.warehouseInFk);
|
CALL travel_checkWarehouseIsFeedStock(NEW.warehouseInFk);
|
||||||
|
|
||||||
|
IF NEW.isRaid IS NOT NULL OR NEW.daysInForward IS NOT NULL THEN
|
||||||
|
CALL travel_checkRaid(NEW.isRaid, NEW.daysInForward);
|
||||||
|
END IF;
|
||||||
|
|
||||||
IF NEW.awbFk IS NOT NULL THEN
|
IF NEW.awbFk IS NOT NULL THEN
|
||||||
CALL travel_throwAwb(NEW.id);
|
CALL travel_throwAwb(NEW.id);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
|
@ -20,6 +20,10 @@ BEGIN
|
||||||
CALL travel_checkWarehouseIsFeedStock(NEW.warehouseInFk);
|
CALL travel_checkWarehouseIsFeedStock(NEW.warehouseInFk);
|
||||||
END IF;
|
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
|
IF NOT (NEW.awbFk <=> OLD.awbFk)THEN
|
||||||
SELECT COUNT(*) INTO vHasAnyInvoiceBooked
|
SELECT COUNT(*) INTO vHasAnyInvoiceBooked
|
||||||
FROM travel t
|
FROM travel t
|
||||||
|
|
|
@ -6,7 +6,7 @@ AS SELECT `t`.`warehouseInFk` AS `warehouseInFk`,
|
||||||
`b`.`itemFk` AS `itemFk`,
|
`b`.`itemFk` AS `itemFk`,
|
||||||
`b`.`quantity` AS `quantity`,
|
`b`.`quantity` AS `quantity`,
|
||||||
`t`.`isReceived` AS `isReceived`,
|
`t`.`isReceived` AS `isReceived`,
|
||||||
`t`.`daysInForward` AS `isVirtualStock`,
|
`t`.`isRaid` AS `isVirtualStock`,
|
||||||
`e`.`id` AS `entryFk`
|
`e`.`id` AS `entryFk`
|
||||||
FROM (
|
FROM (
|
||||||
(
|
(
|
||||||
|
|
|
@ -15,5 +15,5 @@ FROM (
|
||||||
JOIN `vn`.`travel` `t` ON(`e`.`travelFk` = `t`.`id`)
|
JOIN `vn`.`travel` `t` ON(`e`.`travelFk` = `t`.`id`)
|
||||||
)
|
)
|
||||||
WHERE `e`.`isExcludedFromAvailable` = 0
|
WHERE `e`.`isExcludedFromAvailable` = 0
|
||||||
AND NOT `t`.`daysInForward`
|
AND NOT `t`.`isRaid`
|
||||||
AND `b`.`quantity` <> 0
|
AND `b`.`quantity` <> 0
|
||||||
|
|
|
@ -31,5 +31,5 @@ FROM (
|
||||||
LEFT JOIN `edi`.`ekt` `ek` ON(`ek`.`id` = `b`.`ektFk`)
|
LEFT JOIN `edi`.`ekt` `ek` ON(`ek`.`id` = `b`.`ektFk`)
|
||||||
)
|
)
|
||||||
WHERE `tr`.`landed` BETWEEN `util`.`yesterday`() AND `util`.`tomorrow`()
|
WHERE `tr`.`landed` BETWEEN `util`.`yesterday`() AND `util`.`tomorrow`()
|
||||||
AND NOT `tr`.`daysInForward`
|
AND NOT `tr`.`isRaid`
|
||||||
AND `b`.`stickers` > 0
|
AND `b`.`stickers` > 0
|
||||||
|
|
|
@ -8,6 +8,7 @@ AS SELECT `e`.`gestDocFk` AS `gestdoc_id`,
|
||||||
`e`.`isExcludedFromAvailable` AS `Inventario`,
|
`e`.`isExcludedFromAvailable` AS `Inventario`,
|
||||||
`e`.`isConfirmed` AS `Confirmada`,
|
`e`.`isConfirmed` AS `Confirmada`,
|
||||||
`e`.`isOrdered` AS `Pedida`,
|
`e`.`isOrdered` AS `Pedida`,
|
||||||
|
`tr`.`isRaid` AS `isRaid`,
|
||||||
`tr`.`daysInForward` AS `daysInForward`,
|
`tr`.`daysInForward` AS `daysInForward`,
|
||||||
`e`.`evaNotes` AS `notas`,
|
`e`.`evaNotes` AS `notas`,
|
||||||
`e`.`supplierFk` AS `Id_Proveedor`,
|
`e`.`supplierFk` AS `Id_Proveedor`,
|
||||||
|
|
|
@ -18,5 +18,6 @@ AS SELECT `t`.`id` AS `id`,
|
||||||
`t`.`totalEntries` AS `totalEntries`,
|
`t`.`totalEntries` AS `totalEntries`,
|
||||||
`t`.`appointment` AS `appointment`,
|
`t`.`appointment` AS `appointment`,
|
||||||
`t`.`awbFk` AS `awbFk`,
|
`t`.`awbFk` AS `awbFk`,
|
||||||
|
`t`.`isRaid` AS `isRaid`,
|
||||||
`t`.`daysInForward` AS `daysInForward`
|
`t`.`daysInForward` AS `daysInForward`
|
||||||
FROM `vn`.`travel` `t`
|
FROM `vn`.`travel` `t`
|
||||||
|
|
|
@ -86,4 +86,4 @@ FROM (
|
||||||
)
|
)
|
||||||
WHERE NOT `W_IN`.`isFeedStock`
|
WHERE NOT `W_IN`.`isFeedStock`
|
||||||
AND NOT `E`.`Inventario`
|
AND NOT `E`.`Inventario`
|
||||||
AND NOT `TR`.`daysInForward`
|
AND NOT `TR`.`isRaid`
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
ALTER TABLE vn.workerRelatives DROP FOREIGN KEY workerRelatives_disabilityGradeFk;
|
||||||
|
ALTER TABLE vn.workerRelatives DROP FOREIGN KEY workerRelatives_workerFk;
|
||||||
|
|
||||||
|
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
|
||||||
|
VALUES
|
||||||
|
('WorkerRelative','updateAttributes','*','ALLOW','ROLE','hr'),
|
||||||
|
('WorkerRelative','crud','WRITE','ALLOW','ROLE','hr'),
|
||||||
|
('WorkerRelative','findById','*','ALLOW','ROLE','hr'),
|
||||||
|
('WorkerRelative','find','*','ALLOW','ROLE','hr'),
|
||||||
|
('WorkerRelative','upsert','*','ALLOW','ROLE','hr'),
|
||||||
|
('WorkerRelative','filter','*','ALLOW','ROLE','hr'),
|
||||||
|
('WorkerIrpf','updateAttributes','*','ALLOW','ROLE','hr'),
|
||||||
|
('WorkerIrpf','crud','*','ALLOW','ROLE','hr'),
|
||||||
|
('WorkerIrpf','findById','*','ALLOW','ROLE','hr'),
|
||||||
|
('WorkerIrpf','find','*','ALLOW','ROLE','hr'),
|
||||||
|
('WorkerIrpf','upsert','*','ALLOW','ROLE','hr'),
|
||||||
|
('WorkerIrpf','filter','*','ALLOW','ROLE','hr'),
|
||||||
|
('DisabilityGrade','updateAttributes','*','ALLOW','ROLE','hr'),
|
||||||
|
('DisabilityGrade','crud','*','ALLOW','ROLE','hr'),
|
||||||
|
('DisabilityGrade','findById','*','ALLOW','ROLE','hr'),
|
||||||
|
('DisabilityGrade','find','*','ALLOW','ROLE','hr'),
|
||||||
|
('DisabilityGrade','upsert','*','ALLOW','ROLE','hr');
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
-- Eliminar registros existentes donde property = '*'
|
||||||
|
DELETE FROM `salix`.ACL WHERE model = 'entry' AND property = '*';
|
||||||
|
|
||||||
|
-- Insertar permisos para los métodos solicitados en el modelo Entry
|
||||||
|
INSERT INTO `salix`.ACL (model, property, accessType, permission, principalType, principalId)
|
||||||
|
VALUES
|
||||||
|
-- Permisos para administrative
|
||||||
|
('Entry', 'upsert', 'WRITE', 'ALLOW', 'ROLE', 'administrative'),
|
||||||
|
('Entry', 'updateAttributes', 'WRITE', 'ALLOW', 'ROLE', 'administrative'),
|
||||||
|
('Entry', 'isBooked', 'READ', 'ALLOW', 'ROLE', 'administrative'),
|
||||||
|
('Entry', 'findById', 'READ', 'ALLOW', 'ROLE', 'administrative'),
|
||||||
|
('Entry', 'find', 'READ', 'ALLOW', 'ROLE', 'administrative'),
|
||||||
|
('Entry', 'filter', 'READ', 'ALLOW', 'ROLE', 'administrative'),
|
||||||
|
('Entry', 'count', 'READ', 'ALLOW', 'ROLE', 'administrative'),
|
||||||
|
('Entry', 'getEntry', 'READ', 'ALLOW', 'ROLE', 'administrative'),
|
||||||
|
('Entry', 'getBuys', 'READ', 'ALLOW', 'ROLE', 'administrative'),
|
||||||
|
('Entry', 'findOne', 'READ', 'ALLOW', 'ROLE', 'administrative'),
|
||||||
|
('Entry', 'deleteBuys', 'WRITE', 'ALLOW', 'ROLE', 'administrative'),
|
||||||
|
('Entry', 'editLatestBuys', 'WRITE', 'ALLOW', 'ROLE', 'administrative'),
|
||||||
|
('Entry', 'importBuys', 'WRITE', 'ALLOW', 'ROLE', 'administrative'),
|
||||||
|
('Entry', 'importBuysPreview', 'READ', 'ALLOW', 'ROLE', 'administrative'),
|
||||||
|
('Entry', 'lastItemBuys', 'READ', 'ALLOW', 'ROLE', 'administrative'),
|
||||||
|
('Entry', 'latestBuysFilter', 'READ', 'ALLOW', 'ROLE', 'administrative'),
|
||||||
|
|
||||||
|
-- Permisos para buyer (excluyendo isBooked)
|
||||||
|
('Entry', 'upsert', 'WRITE', 'ALLOW', 'ROLE', 'buyer'),
|
||||||
|
('Entry', 'updateAttributes', 'WRITE', 'ALLOW', 'ROLE', 'buyer'),
|
||||||
|
('Entry', 'findById', 'READ', 'ALLOW', 'ROLE', 'buyer'),
|
||||||
|
('Entry', 'find', 'READ', 'ALLOW', 'ROLE', 'buyer'),
|
||||||
|
('Entry', 'filter', 'READ', 'ALLOW', 'ROLE', 'buyer'),
|
||||||
|
('Entry', 'count', 'READ', 'ALLOW', 'ROLE', 'buyer'),
|
||||||
|
('Entry', 'getEntry', 'READ', 'ALLOW', 'ROLE', 'buyer'),
|
||||||
|
('Entry', 'getBuys', 'READ', 'ALLOW', 'ROLE', 'buyer'),
|
||||||
|
('Entry', 'findOne', 'READ', 'ALLOW', 'ROLE', 'buyer'),
|
||||||
|
('Entry', 'deleteBuys', 'WRITE', 'ALLOW', 'ROLE', 'buyer'),
|
||||||
|
('Entry', 'editLatestBuys', 'WRITE', 'ALLOW', 'ROLE', 'buyer'),
|
||||||
|
('Entry', 'importBuys', 'WRITE', 'ALLOW', 'ROLE', 'buyer'),
|
||||||
|
('Entry', 'importBuysPreview', 'READ', 'ALLOW', 'ROLE', 'buyer'),
|
||||||
|
('Entry', 'lastItemBuys', 'READ', 'ALLOW', 'ROLE', 'buyer'),
|
||||||
|
('Entry', 'latestBuysFilter', 'READ', 'ALLOW', 'ROLE', 'buyer');
|
|
@ -0,0 +1,4 @@
|
||||||
|
ALTER TABLE vn.travel ADD isRaid tinyint(1) DEFAULT 0 NOT NULL COMMENT 'Redada';
|
||||||
|
|
||||||
|
ALTER TABLE vn.travel MODIFY COLUMN daysInForward int(10) unsigned DEFAULT NULL
|
||||||
|
COMMENT 'Cuando es una redada, indica el número de días que se añadirán a la fecha de hoy para establecer el landed. NULL si no es una redada';
|
|
@ -0,0 +1,5 @@
|
||||||
|
|
||||||
|
ALTER TABLE vn.travel ADD IF NOT EXISTS isRaid tinyint(1) DEFAULT 0 NOT NULL COMMENT 'Redada';
|
||||||
|
|
||||||
|
ALTER TABLE vn.travel MODIFY COLUMN daysInForward int(10) unsigned DEFAULT NULL
|
||||||
|
COMMENT 'Cuando es una redada, indica el número de días que se añadirán a la fecha de hoy para establecer el landed. NULL si no es una redada';
|
|
@ -1,6 +1,8 @@
|
||||||
|
/*
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tmp.tItemShelvingLog
|
CREATE OR REPLACE TEMPORARY TABLE tmp.tItemShelvingLog
|
||||||
(PRIMARY KEY (id))
|
(PRIMARY KEY (id))
|
||||||
ENGINE = MEMORY
|
ENGINE = MEMORY
|
||||||
SELECT ishl.id, s.id shelvingFk
|
SELECT ishl.id, s.id shelvingFk
|
||||||
FROM vn.itemShelvingLog ishl
|
FROM vn.itemShelvingLog ishl
|
||||||
JOIN vn.shelving s ON s.code = ishl.shelvingFk COLLATE utf8mb3_unicode_ci;
|
JOIN vn.shelving s ON s.code = ishl.shelvingFk COLLATE utf8mb3_unicode_ci;
|
||||||
|
*/
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
ALTER TABLE vn.itemShelvingLog MODIFY COLUMN shelvingFk int(11) NOT NULL;
|
-- ALTER TABLE vn.itemShelvingLog MODIFY COLUMN shelvingFk int(11) NOT NULL;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
|
/*
|
||||||
UPDATE vn.itemShelvingLog ishl
|
UPDATE vn.itemShelvingLog ishl
|
||||||
JOIN tmp.tItemShelvingLog tishl ON tishl.id = ishl.id
|
JOIN tmp.tItemShelvingLog tishl ON tishl.id = ishl.id
|
||||||
SET ishl.shelvingFk = tishl.shelvingFk;
|
SET ishl.shelvingFk = tishl.shelvingFk;
|
||||||
|
|
||||||
DROP TEMPORARY TABLE tmp.tItemShelvingLog;
|
DROP TEMPORARY TABLE tmp.tItemShelvingLog;
|
||||||
|
*/
|
|
@ -0,0 +1,23 @@
|
||||||
|
ALTER TABLE vn.address
|
||||||
|
ADD geoFk int(11) DEFAULT NULL NULL AFTER isLogifloraAllowed,
|
||||||
|
ADD CONSTRAINT address_zoneGeo_FK FOREIGN KEY (geoFk)
|
||||||
|
REFERENCES vn.zoneGeo(id) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
CREATE OR REPLACE TEMPORARY TABLE tmp.tAddressGeo
|
||||||
|
(PRIMARY KEY (id))
|
||||||
|
ENGINE = MEMORY
|
||||||
|
SELECT a.id, p.geoFk
|
||||||
|
FROM vn.address a
|
||||||
|
JOIN vn.town t ON t.provinceFk = a.provinceFk
|
||||||
|
JOIN vn.postCode p ON p.townFk = t.id
|
||||||
|
AND (p.code = a.postalCode OR a.postalCode IS NULL)
|
||||||
|
JOIN vn.zoneGeo zg ON zg.id = p.geoFk
|
||||||
|
GROUP BY a.id
|
||||||
|
ORDER BY (a.city SOUNDS LIKE t.`name`) DESC,
|
||||||
|
(p.code = a.postalCode) DESC;
|
||||||
|
|
||||||
|
UPDATE vn.address a
|
||||||
|
JOIN tmp.tAddressGeo tag ON tag.id = a.id
|
||||||
|
SET a.geoFk = tag.geoFk;
|
||||||
|
|
||||||
|
DROP TEMPORARY TABLE tmp.tAddressGeo;
|
|
@ -0,0 +1,26 @@
|
||||||
|
ALTER TABLE vn.client
|
||||||
|
CHANGE hasDailyInvoice hasDailyInvoice tinyint(1) DEFAULT 0 NOT NULL
|
||||||
|
COMMENT 'Indica si el cliente requiere facturación diaria por defecto se copiará lo que tenga country.hasDailyInvoice'
|
||||||
|
AFTER recommendedCredit,
|
||||||
|
ADD geoFk int(11) DEFAULT NULL NULL AFTER hasDailyInvoice,
|
||||||
|
ADD CONSTRAINT client_zoneGeo_FK FOREIGN KEY (geoFk)
|
||||||
|
REFERENCES vn.zoneGeo(id) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
CREATE OR REPLACE TEMPORARY TABLE tmp.tClientGeo
|
||||||
|
(PRIMARY KEY (id))
|
||||||
|
ENGINE = MEMORY
|
||||||
|
SELECT c.id, p.geoFk
|
||||||
|
FROM vn.client c
|
||||||
|
JOIN vn.town t ON t.provinceFk = c.provinceFk
|
||||||
|
JOIN vn.postCode p ON p.townFk = t.id
|
||||||
|
AND (p.code = c.postcode OR c.postcode IS NULL)
|
||||||
|
JOIN vn.zoneGeo zg ON zg.id = p.geoFk
|
||||||
|
GROUP BY c.id
|
||||||
|
ORDER BY (c.city SOUNDS LIKE t.`name`) DESC,
|
||||||
|
(p.code = c.postcode) DESC;
|
||||||
|
|
||||||
|
UPDATE vn.client c
|
||||||
|
JOIN tmp.tClientGeo tcg ON tcg.id = c.id
|
||||||
|
SET c.geoFk = tcg.geoFk;
|
||||||
|
|
||||||
|
DROP TEMPORARY TABLE tmp.tClientGeo;
|
|
@ -0,0 +1,27 @@
|
||||||
|
ALTER TABLE vn.supplier
|
||||||
|
CHANGE companySize companySize enum('small','medium','big') CHARACTER SET utf8mb3
|
||||||
|
COLLATE utf8mb3_general_ci DEFAULT NULL NULL AFTER stamp,
|
||||||
|
ADD geoFk int(11) DEFAULT NULL NULL AFTER companySize,
|
||||||
|
ADD CONSTRAINT supplier_zoneGeo_FK FOREIGN KEY (geoFk)
|
||||||
|
REFERENCES vn.zoneGeo(id) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
CREATE OR REPLACE TEMPORARY TABLE tmp.tSupplierGeo
|
||||||
|
(PRIMARY KEY (id))
|
||||||
|
ENGINE = MEMORY
|
||||||
|
SELECT s.id, p.geoFk
|
||||||
|
FROM vn.supplier s
|
||||||
|
JOIN vn.town t ON t.provinceFk = s.provinceFk
|
||||||
|
JOIN vn.postCode p ON p.townFk = t.id
|
||||||
|
AND (p.code = s.postCode OR s.postCode IS NULL)
|
||||||
|
LEFT JOIN vn.supplierAddress sad ON sad.supplierFk = s.id
|
||||||
|
JOIN vn.zoneGeo zg ON zg.id = p.geoFk
|
||||||
|
GROUP BY s.id
|
||||||
|
ORDER BY (s.city SOUNDS LIKE t.`name`) DESC,
|
||||||
|
(p.code = s.postCode) DESC,
|
||||||
|
(p.code = sad.postalCode) DESC;
|
||||||
|
|
||||||
|
UPDATE vn.supplier s
|
||||||
|
JOIN tmp.tSupplierGeo tsg ON tsg.id = s.id
|
||||||
|
SET s.geoFk = tsg.geoFk;
|
||||||
|
|
||||||
|
DROP TEMPORARY TABLE tmp.tSupplierGeo;
|
|
@ -0,0 +1,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
UPDATE salix.ACL
|
||||||
|
SET principalId = 'deliveryAssistant'
|
||||||
|
WHERE model = 'Ticket'
|
||||||
|
AND property = 'updateAttributes'
|
||||||
|
AND principalId = "delivery";
|
|
@ -0,0 +1,2 @@
|
||||||
|
ALTER TABLE vn.shelvingLog
|
||||||
|
MODIFY COLUMN changedModel enum('Shelving', 'ItemShelving') CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT 'Shelving' NOT NULL;
|
|
@ -0,0 +1,2 @@
|
||||||
|
|
||||||
|
ALTER TABLE vn.itemConfig ADD defaultPackingTypeFk VARCHAR(1) DEFAULT 'H' NULL;
|
|
@ -0,0 +1,15 @@
|
||||||
|
|
||||||
|
|
||||||
|
USE vn;
|
||||||
|
|
||||||
|
INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId)
|
||||||
|
VALUES('RouteAction', 'find', 'READ', 'ALLOW', 'ROLE', 'delivery');
|
||||||
|
|
||||||
|
INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId)
|
||||||
|
VALUES('RouteComplement', 'find', 'READ', 'ALLOW', 'ROLE', 'delivery');
|
||||||
|
|
||||||
|
INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId)
|
||||||
|
VALUES('RouteComplement', 'create', 'WRITE', 'ALLOW', 'ROLE', 'delivery');
|
||||||
|
|
||||||
|
INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId)
|
||||||
|
VALUES('RouteComplement', 'deleteById', 'WRITE', 'ALLOW', 'ROLE', 'delivery');
|
|
@ -0,0 +1,2 @@
|
||||||
|
RENAME TABLE vn.workerTimeControlParams TO vn.workerTimeControlParams__;
|
||||||
|
ALTER TABLE vn.workerTimeControlParams__ COMMENT='@deprecated 2024-11-19';
|
|
@ -0,0 +1,3 @@
|
||||||
|
-- Place your SQL code here
|
||||||
|
INSERT IGNORE INTO vn.saySimpleConfig (url, defaultChannel)
|
||||||
|
VALUES ('https://verdnatura.saysimple.io/start-conversation', 1320);
|
|
@ -0,0 +1,4 @@
|
||||||
|
ALTER TABLE vn.travel ADD IF NOT EXISTS isRaid tinyint(1) DEFAULT 0 NOT NULL COMMENT 'Redada';
|
||||||
|
|
||||||
|
ALTER TABLE vn.travel MODIFY COLUMN daysInForward int(10) unsigned DEFAULT NULL
|
||||||
|
COMMENT 'Cuando es una redada, indica el número de días que se añadirán a la fecha de hoy para establecer el landed. NULL si no es una redada';
|
|
@ -0,0 +1,51 @@
|
||||||
|
|
||||||
|
ALTER TABLE vn.routeCommission ADD IF NOT EXISTS countryFk mediumint(8) unsigned DEFAULT NULL NULL;
|
||||||
|
ALTER TABLE vn.routeCommission ADD IF NOT EXISTS isKmTruckRate TINYINT(1) DEFAULT NULL NULL;
|
||||||
|
|
||||||
|
ALTER TABLE vn.routeCommission DROP FOREIGN KEY IF EXISTS routeCommission_country_FK;
|
||||||
|
ALTER TABLE vn.routeCommission ADD CONSTRAINT routeCommission_country_FK FOREIGN KEY (countryFk)
|
||||||
|
REFERENCES vn.country(id) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS vn.workCenterCommission (
|
||||||
|
`workCenterFk` INT(11) NOT NULL,
|
||||||
|
`deliveryManAdjustment` DECIMAL(4,2) DEFAULT NULL
|
||||||
|
COMMENT 'Número de trabajadores para equilibrar los repartidores de diferentes centros.
|
||||||
|
Utilizado en repartidores de grafana',
|
||||||
|
`distributionM3Category1` decimal(5,2) DEFAULT NULL,
|
||||||
|
`distributionM3Category2` decimal(5,2) DEFAULT NULL,
|
||||||
|
`distributionCat4M3` DECIMAL(5,2) DEFAULT NULL
|
||||||
|
COMMENT 'Comisión por gestión de la distribución Cat IV',
|
||||||
|
`distributionCat5M3` DECIMAL(5,2) DEFAULT NULL
|
||||||
|
COMMENT 'Comisión por gestión de la distribución Cat V',
|
||||||
|
PRIMARY KEY (`workCenterFk`),
|
||||||
|
CONSTRAINT `workCenterCommission_workCenterFk` FOREIGN KEY (`workCenterFk`)
|
||||||
|
REFERENCES `workCenter` (`id`) ON UPDATE CASCADE ON DELETE RESTRICT
|
||||||
|
);
|
||||||
|
|
||||||
|
UPDATE vn.routeCommission rc
|
||||||
|
JOIN (SELECT id, countryFk, isKmTruckRate
|
||||||
|
FROM (SELECT r.id, c.countryFk, v.isKmTruckRate
|
||||||
|
FROM vn.route r
|
||||||
|
JOIN vn.routeCommission rc ON rc.routeFk = r.id
|
||||||
|
LEFT JOIN vn.ticket t ON t.routeFk = r.id
|
||||||
|
LEFT JOIN vn.client c ON c.id = t.clientFk
|
||||||
|
LEFT JOIN vn.vehicle v ON v.id = r.vehicleFk
|
||||||
|
WHERE r.created >= '2023-12-01'
|
||||||
|
GROUP BY r.id, c.countryFk
|
||||||
|
ORDER BY r.id, COUNT(*) DESC
|
||||||
|
LIMIT 100000000000
|
||||||
|
)sub
|
||||||
|
GROUP BY id
|
||||||
|
)sub ON sub.id = rc.routeFk
|
||||||
|
SET rc.isKmTruckRate = sub.isKmTruckRate,
|
||||||
|
rc.countryFk = sub.countryFk;
|
||||||
|
|
||||||
|
ALTER TABLE vn.workerDistributionCategory ADD IF NOT EXISTS countryFk mediumint(8) unsigned DEFAULT NULL NULL;
|
||||||
|
ALTER TABLE vn.workerDistributionCategory ADD IF NOT EXISTS isKmTruckRate TINYINT(1) DEFAULT NULL NULL;
|
||||||
|
|
||||||
|
ALTER TABLE vn.workerDistributionCategory DROP FOREIGN KEY IF EXISTS workerDistributionCategory_country_FK;
|
||||||
|
ALTER TABLE vn.workerDistributionCategory ADD CONSTRAINT workerDistributionCategory_country_FK FOREIGN KEY (countryFk)
|
||||||
|
REFERENCES vn.country(id) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
ALTER TABLE vn.workerDistributionCategory ADD IF NOT EXISTS commissionSplitWorkers INT UNSIGNED NOT NULL DEFAULT 1
|
||||||
|
COMMENT 'Número de enrutadores entr los que se reparte la comsión';
|
|
@ -0,0 +1,8 @@
|
||||||
|
DELETE FROM vn.stateI18n
|
||||||
|
WHERE `name` IN ('Billed', 'Facturado', 'Assisted preparation', 'Preparación asistida', 'Shipped', 'Embarcado', 'Stowaway OK', 'Polizón OK');
|
||||||
|
|
||||||
|
UPDATE vn.`state` SET nextStateFk = 43
|
||||||
|
WHERE nextStateFk IN (11, 27, 30, 32, 41);
|
||||||
|
|
||||||
|
DELETE FROM vn.`state`
|
||||||
|
WHERE code IN ('INVOICED', 'ASSISTED_PREPARATION', 'BOARD', 'OK STOWAWAY', 'PARTIAL_PREPARATION');
|
|
@ -0,0 +1,4 @@
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId)
|
||||||
|
VALUES('SaleGroup', 'find', 'READ', 'ALLOW', 'ROLE', 'production');
|
|
@ -0,0 +1,7 @@
|
||||||
|
ALTER TABLE vn.workCenterCommission ADD IF NOT EXISTS deliveryM3Cat4 DECIMAL(5,2) DEFAULT NULL NULL;
|
||||||
|
ALTER TABLE vn.workCenterCommission ADD IF NOT EXISTS deliveryM3Cat5 DECIMAL(5,2) DEFAULT NULL NULL;
|
||||||
|
|
||||||
|
INSERT IGNORE INTO vn.workCenterCommission (workCenterFk, deliveryM3Cat4, deliveryM3Cat5)
|
||||||
|
VALUES (5,8.0,8.0);
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
ALTER TABLE `vn`.`creditInsurance` DROP COLUMN `creditClassification__`;
|
||||||
|
ALTER TABLE `vn`.`worker` DROP COLUMN `isF11Allowed__`;
|
||||||
|
ALTER TABLE `util`.`config` DROP COLUMN `dbVersion__`;
|
||||||
|
ALTER TABLE `util`.`config` DROP COLUMN `hasTriggersDisabled__`;
|
||||||
|
ALTER TABLE `vn`.`agencyMode` DROP COLUMN `showAgencyName__`;
|
||||||
|
DROP TABLE `account`.`accountLog__`;
|
||||||
|
DROP TABLE `vn`.`silexACL__`;
|
|
@ -0,0 +1,133 @@
|
||||||
|
import selectors from '../../helpers/selectors.js';
|
||||||
|
import getBrowser from '../../helpers/puppeteer';
|
||||||
|
|
||||||
|
describe('Item summary path', () => {
|
||||||
|
let browser;
|
||||||
|
let page;
|
||||||
|
beforeAll(async() => {
|
||||||
|
browser = await getBrowser();
|
||||||
|
page = browser.page;
|
||||||
|
await page.loginAndModule('employee', 'item');
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async() => {
|
||||||
|
await browser.close();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should search for an item', async() => {
|
||||||
|
await page.doSearch('Ranged weapon');
|
||||||
|
const resultsCount = await page.countElement(selectors.itemsIndex.searchResult);
|
||||||
|
|
||||||
|
await page.waitForTextInElement(selectors.itemsIndex.firstSearchResult, 'Ranged weapon');
|
||||||
|
await page.waitToClick(selectors.itemsIndex.firstResultPreviewButton);
|
||||||
|
const isVisible = await page.isVisible(selectors.itemSummary.basicData);
|
||||||
|
|
||||||
|
expect(resultsCount).toBe(4);
|
||||||
|
expect(isVisible).toBeTruthy();
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should check the item summary preview shows fields from basic data`, async() => {
|
||||||
|
await page.waitForTextInElement(selectors.itemSummary.basicData, 'Ranged weapon longbow 200cm');
|
||||||
|
const result = await page.waitToGetProperty(selectors.itemSummary.basicData, 'innerText');
|
||||||
|
|
||||||
|
expect(result).toContain('Ranged weapon longbow 200cm');
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should check the item summary preview shows fields from tags`, async() => {
|
||||||
|
await page.waitForTextInElement(selectors.itemSummary.tags, 'Brown');
|
||||||
|
const result = await page.waitToGetProperty(selectors.itemSummary.tags, 'innerText');
|
||||||
|
|
||||||
|
expect(result).toContain('Brown');
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should check the item summary preview shows fields from botanical`, async() => {
|
||||||
|
await page.waitForTextInElement(selectors.itemSummary.botanical, 'Abelia');
|
||||||
|
const result = await page.waitToGetProperty(selectors.itemSummary.botanical, 'innerText');
|
||||||
|
|
||||||
|
expect(result).toContain('Abelia');
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should check the item summary preview shows fields from barcode`, async() => {
|
||||||
|
await page.waitForTextInElement(selectors.itemSummary.barcode, '1');
|
||||||
|
const result = await page.waitToGetProperty(selectors.itemSummary.barcode, 'innerText');
|
||||||
|
|
||||||
|
expect(result).toContain('1');
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should close the summary popup`, async() => {
|
||||||
|
await page.closePopup();
|
||||||
|
await page.waitForSelector(selectors.itemSummary.basicData, {hidden: true});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should search for other item', async() => {
|
||||||
|
await page.doSearch('Melee Reinforced');
|
||||||
|
const resultsCount = await page.countElement(selectors.itemsIndex.searchResult);
|
||||||
|
|
||||||
|
await page.waitToClick(selectors.itemsIndex.firstResultPreviewButton);
|
||||||
|
await page.waitForSelector(selectors.itemSummary.basicData, {visible: true});
|
||||||
|
|
||||||
|
expect(resultsCount).toBe(3);
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should now check the item summary preview shows fields from basic data`, async() => {
|
||||||
|
await page.waitForTextInElement(selectors.itemSummary.basicData, 'Melee Reinforced weapon combat fist 15cm');
|
||||||
|
const result = await page.waitToGetProperty(selectors.itemSummary.basicData, 'innerText');
|
||||||
|
|
||||||
|
expect(result).toContain('Melee Reinforced weapon combat fist 15cm');
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should now check the item summary preview shows fields from tags`, async() => {
|
||||||
|
await page.waitForTextInElement(selectors.itemSummary.tags, 'Silver');
|
||||||
|
const result = await page.waitToGetProperty(selectors.itemSummary.tags, 'innerText');
|
||||||
|
|
||||||
|
expect(result).toContain('Silver');
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should now check the item summary preview shows fields from botanical`, async() => {
|
||||||
|
await page.waitForTextInElement(selectors.itemSummary.botanical, '-');
|
||||||
|
const result = await page.waitToGetProperty(selectors.itemSummary.botanical, 'innerText');
|
||||||
|
|
||||||
|
expect(result).toContain('-');
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should now close the summary popup`, async() => {
|
||||||
|
await page.closePopup();
|
||||||
|
await page.waitForSelector(selectors.itemSummary.basicData, {hidden: true});
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should navigate to one of the items detailed section`, async() => {
|
||||||
|
await page.accessToSearchResult('Melee weapon combat fist 15cm');
|
||||||
|
await page.waitForState('item.card.summary');
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should check the descritor edit button is not visible for employee`, async() => {
|
||||||
|
const visibleButton = await page.isVisible(selectors.itemDescriptor.editButton);
|
||||||
|
|
||||||
|
expect(visibleButton).toBeFalsy();
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should check the item summary shows fields from basic data section`, async() => {
|
||||||
|
await page.waitForTextInElement(selectors.itemSummary.basicData, 'Melee weapon combat fist 15cm');
|
||||||
|
const result = await page.waitToGetProperty(selectors.itemSummary.basicData, 'innerText');
|
||||||
|
|
||||||
|
expect(result).toContain('Melee weapon combat fist 15cm');
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should check the item summary shows fields from tags section`, async() => {
|
||||||
|
const result = await page.waitToGetProperty(selectors.itemSummary.tags, 'innerText');
|
||||||
|
|
||||||
|
expect(result).toContain('Silver');
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should check the item summary shows fields from botanical section`, async() => {
|
||||||
|
const result = await page.waitToGetProperty(selectors.itemSummary.botanical, 'innerText');
|
||||||
|
|
||||||
|
expect(result).toContain('procera');
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should check the item summary shows fields from barcodes section`, async() => {
|
||||||
|
const result = await page.waitToGetProperty(selectors.itemSummary.barcode, 'innerText');
|
||||||
|
|
||||||
|
expect(result).toContain('4');
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,64 @@
|
||||||
|
import getBrowser from '../../helpers/puppeteer';
|
||||||
|
|
||||||
|
const $ = {
|
||||||
|
form: 'vn-item-basic-data form',
|
||||||
|
intrastatForm: '.vn-dialog.shown form',
|
||||||
|
newIntrastatButton: 'vn-item-basic-data vn-icon-button[vn-tooltip="New intrastat"] > button'
|
||||||
|
};
|
||||||
|
|
||||||
|
describe('Item Edit basic data path', () => {
|
||||||
|
let browser;
|
||||||
|
let page;
|
||||||
|
|
||||||
|
beforeAll(async() => {
|
||||||
|
browser = await getBrowser();
|
||||||
|
page = browser.page;
|
||||||
|
await page.loginAndModule('buyer', 'item');
|
||||||
|
await page.accessToSearchResult('Melee weapon combat fist 15cm');
|
||||||
|
});
|
||||||
|
|
||||||
|
beforeEach(async() => {
|
||||||
|
await page.accessToSection('item.card.basicData');
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async() => {
|
||||||
|
await browser.close();
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should edit the item basic data and confirm the item data was edited`, async() => {
|
||||||
|
const values = {
|
||||||
|
type: 'Anthurium',
|
||||||
|
intrastat: 'Coral y materiales similares',
|
||||||
|
relevancy: 1,
|
||||||
|
generic: 'Pallet',
|
||||||
|
isActive: false,
|
||||||
|
priceInKg: true,
|
||||||
|
isFragile: true,
|
||||||
|
packingOut: 5
|
||||||
|
};
|
||||||
|
|
||||||
|
const message = await page.sendForm($.form, values);
|
||||||
|
await page.reloadSection('item.card.basicData');
|
||||||
|
const formValues = await page.fetchForm($.form, Object.keys(values));
|
||||||
|
|
||||||
|
expect(message.isSuccess).toBeTrue();
|
||||||
|
expect(formValues).toEqual(values);
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should create a new intrastat and save it`, async() => {
|
||||||
|
await page.click($.newIntrastatButton);
|
||||||
|
await page.waitForSelector($.intrastatForm);
|
||||||
|
await page.fillForm($.intrastatForm, {
|
||||||
|
id: '588420239',
|
||||||
|
description: 'Tropical Flowers'
|
||||||
|
});
|
||||||
|
await page.respondToDialog('accept');
|
||||||
|
|
||||||
|
const message = await page.sendForm($.form);
|
||||||
|
await page.reloadSection('item.card.basicData');
|
||||||
|
const formValues = await page.fetchForm($.form, ['intrastat']);
|
||||||
|
|
||||||
|
expect(message.isSuccess).toBeTrue();
|
||||||
|
expect(formValues).toEqual({intrastat: 'Tropical Flowers'});
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,48 @@
|
||||||
|
import selectors from '../../helpers/selectors.js';
|
||||||
|
import getBrowser from '../../helpers/puppeteer';
|
||||||
|
|
||||||
|
describe('Item edit tax path', () => {
|
||||||
|
let browser;
|
||||||
|
let page;
|
||||||
|
beforeAll(async() => {
|
||||||
|
browser = await getBrowser();
|
||||||
|
page = browser.page;
|
||||||
|
await page.loginAndModule('buyer', 'item');
|
||||||
|
await page.accessToSearchResult('Ranged weapon longbow 200cm');
|
||||||
|
await page.accessToSection('item.card.tax');
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async() => {
|
||||||
|
await browser.close();
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should add the item tax to all countries`, async() => {
|
||||||
|
await page.autocompleteSearch(selectors.itemTax.firstClass, 'General VAT');
|
||||||
|
await page.autocompleteSearch(selectors.itemTax.secondClass, 'General VAT');
|
||||||
|
await page.waitToClick(selectors.itemTax.submitTaxButton);
|
||||||
|
const message = await page.waitForSnackbar();
|
||||||
|
|
||||||
|
expect(message.text).toContain('Data saved!');
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should confirm the first item tax class was edited`, async() => {
|
||||||
|
await page.reloadSection('item.card.tax');
|
||||||
|
const firstVatType = await page.waitToGetProperty(selectors.itemTax.firstClass, 'value');
|
||||||
|
|
||||||
|
expect(firstVatType).toEqual('General VAT');
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should confirm the second item tax class was edited`, async() => {
|
||||||
|
const secondVatType = await page
|
||||||
|
.waitToGetProperty(selectors.itemTax.secondClass, 'value');
|
||||||
|
|
||||||
|
expect(secondVatType).toEqual('General VAT');
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should edit the first class without saving the form`, async() => {
|
||||||
|
await page.autocompleteSearch(selectors.itemTax.firstClass, 'Reduced VAT');
|
||||||
|
const firstVatType = await page.waitToGetProperty(selectors.itemTax.firstClass, 'value');
|
||||||
|
|
||||||
|
expect(firstVatType).toEqual('Reduced VAT');
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,79 @@
|
||||||
|
import selectors from '../../helpers/selectors.js';
|
||||||
|
import getBrowser from '../../helpers/puppeteer';
|
||||||
|
|
||||||
|
describe('Item create tags path', () => {
|
||||||
|
let browser;
|
||||||
|
let page;
|
||||||
|
beforeAll(async() => {
|
||||||
|
browser = await getBrowser();
|
||||||
|
page = browser.page;
|
||||||
|
await page.loginAndModule('buyer', 'item');
|
||||||
|
await page.accessToSearchResult('Ranged weapon longbow 200cm');
|
||||||
|
await page.accessToSection('item.card.tags');
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async() => {
|
||||||
|
await browser.close();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create a new tag and delete a former one', async() => {
|
||||||
|
await page.waitToClick(selectors.itemTags.fourthRemoveTagButton);
|
||||||
|
await page.waitToClick(selectors.itemTags.addItemTagButton);
|
||||||
|
await page.autocompleteSearch(selectors.itemTags.seventhTag, 'Ancho de la base');
|
||||||
|
await page.write(selectors.itemTags.seventhValue, '50');
|
||||||
|
await page.clearInput(selectors.itemTags.seventhRelevancy);
|
||||||
|
await page.write(selectors.itemTags.seventhRelevancy, '4');
|
||||||
|
await page.waitToClick(selectors.itemTags.submitItemTagsButton);
|
||||||
|
const message = await page.waitForSnackbar();
|
||||||
|
|
||||||
|
expect(message.text).toContain('Data saved!');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should confirm the fourth row data is the expected one', async() => {
|
||||||
|
await page.reloadSection('item.card.tags');
|
||||||
|
await page.waitForSelector('vn-item-tags');
|
||||||
|
let result = await page.waitToGetProperty(selectors.itemTags.fourthTag, 'value');
|
||||||
|
|
||||||
|
expect(result).toEqual('Ancho de la base');
|
||||||
|
|
||||||
|
result = await page
|
||||||
|
.waitToGetProperty(selectors.itemTags.fourthValue, 'value');
|
||||||
|
|
||||||
|
expect(result).toEqual('50');
|
||||||
|
|
||||||
|
result = await page
|
||||||
|
.waitToGetProperty(selectors.itemTags.fourthRelevancy, 'value');
|
||||||
|
|
||||||
|
expect(result).toEqual('4');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should confirm the fifth row data is the expected one', async() => {
|
||||||
|
let tag = await page
|
||||||
|
.waitToGetProperty(selectors.itemTags.fifthTag, 'value');
|
||||||
|
|
||||||
|
let value = await page
|
||||||
|
.waitToGetProperty(selectors.itemTags.fifthValue, 'value');
|
||||||
|
|
||||||
|
let relevancy = await page
|
||||||
|
.waitToGetProperty(selectors.itemTags.fifthRelevancy, 'value');
|
||||||
|
|
||||||
|
expect(tag).toEqual('Color');
|
||||||
|
expect(value).toEqual('Brown');
|
||||||
|
expect(relevancy).toEqual('5');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should confirm the sixth row data is the expected one', async() => {
|
||||||
|
let tag = await page
|
||||||
|
.waitToGetProperty(selectors.itemTags.sixthTag, 'value');
|
||||||
|
|
||||||
|
let value = await page
|
||||||
|
.waitToGetProperty(selectors.itemTags.sixthValue, 'value');
|
||||||
|
|
||||||
|
let relevancy = await page
|
||||||
|
.waitToGetProperty(selectors.itemTags.sixthRelevancy, 'value');
|
||||||
|
|
||||||
|
expect(tag).toEqual('Categoria');
|
||||||
|
expect(value).toEqual('+1 precission');
|
||||||
|
expect(relevancy).toEqual('6');
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,66 @@
|
||||||
|
import selectors from '../../helpers/selectors.js';
|
||||||
|
import getBrowser from '../../helpers/puppeteer';
|
||||||
|
|
||||||
|
describe('Item Create botanical path', () => {
|
||||||
|
let browser;
|
||||||
|
let page;
|
||||||
|
beforeAll(async() => {
|
||||||
|
browser = await getBrowser();
|
||||||
|
page = browser.page;
|
||||||
|
await page.loginAndModule('buyer', 'item');
|
||||||
|
await page.accessToSearchResult('Ranged weapon pistol 9mm');
|
||||||
|
await page.accessToSection('item.card.botanical');
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async() => {
|
||||||
|
await browser.close();
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should create a new botanical for the item`, async() => {
|
||||||
|
await page.autocompleteSearch(selectors.itemBotanical.genus, 'Abelia');
|
||||||
|
await page.autocompleteSearch(selectors.itemBotanical.species, 'dealbata');
|
||||||
|
await page.waitToClick(selectors.itemBotanical.submitBotanicalButton);
|
||||||
|
const message = await page.waitForSnackbar();
|
||||||
|
|
||||||
|
expect(message.text).toContain('Data saved!');
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should confirm the Genus for the item was created`, async() => {
|
||||||
|
await page.waitForTextInField(selectors.itemBotanical.genus, 'Abelia');
|
||||||
|
const result = await page
|
||||||
|
.waitToGetProperty(selectors.itemBotanical.genus, 'value');
|
||||||
|
|
||||||
|
expect(result).toEqual('Abelia');
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should confirm the Species for the item was created`, async() => {
|
||||||
|
const result = await page
|
||||||
|
.waitToGetProperty(selectors.itemBotanical.species, 'value');
|
||||||
|
|
||||||
|
expect(result).toEqual('dealbata');
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should edit botanical for the item`, async() => {
|
||||||
|
await page.autocompleteSearch(selectors.itemBotanical.genus, 'Abies');
|
||||||
|
await page.autocompleteSearch(selectors.itemBotanical.species, 'decurrens');
|
||||||
|
await page.waitToClick(selectors.itemBotanical.submitBotanicalButton);
|
||||||
|
const message = await page.waitForSnackbar();
|
||||||
|
|
||||||
|
expect(message.text).toContain('Data saved!');
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should confirm the Genus for the item was edited`, async() => {
|
||||||
|
await page.waitForTextInField(selectors.itemBotanical.genus, 'Abies');
|
||||||
|
const result = await page
|
||||||
|
.waitToGetProperty(selectors.itemBotanical.genus, 'value');
|
||||||
|
|
||||||
|
expect(result).toEqual('Abies');
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should confirm the Species for the item was edited`, async() => {
|
||||||
|
const result = await page
|
||||||
|
.waitToGetProperty(selectors.itemBotanical.species, 'value');
|
||||||
|
|
||||||
|
expect(result).toEqual('decurrens');
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,37 @@
|
||||||
|
import selectors from '../../helpers/selectors.js';
|
||||||
|
import getBrowser from '../../helpers/puppeteer';
|
||||||
|
|
||||||
|
describe('Item Create barcodes path', () => {
|
||||||
|
let browser;
|
||||||
|
let page;
|
||||||
|
beforeAll(async() => {
|
||||||
|
browser = await getBrowser();
|
||||||
|
page = browser.page;
|
||||||
|
await page.loginAndModule('buyer', 'item');
|
||||||
|
await page.accessToSearchResult('Ranged weapon longbow 200cm');
|
||||||
|
await page.accessToSection('item.card.itemBarcode');
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async() => {
|
||||||
|
await browser.close();
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should click create a new code and delete a former one`, async() => {
|
||||||
|
await page.waitToClick(selectors.itemBarcodes.firstCodeRemoveButton);
|
||||||
|
await page.waitToClick(selectors.itemBarcodes.addBarcodeButton);
|
||||||
|
await page.write(selectors.itemBarcodes.thirdCode, '5');
|
||||||
|
await page.waitToClick(selectors.itemBarcodes.submitBarcodesButton);
|
||||||
|
const message = await page.waitForSnackbar();
|
||||||
|
|
||||||
|
expect(message.text).toContain('Data saved!');
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should confirm the barcode 5 is created and it is now the third barcode as the first was deleted`, async() => {
|
||||||
|
await page.reloadSection('item.card.itemBarcode');
|
||||||
|
await page.waitForTextInField(selectors.itemBarcodes.thirdCode, '5');
|
||||||
|
const result = await page
|
||||||
|
.waitToGetProperty(selectors.itemBarcodes.thirdCode, 'value');
|
||||||
|
|
||||||
|
expect(result).toEqual('5');
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,65 @@
|
||||||
|
import selectors from '../../helpers/selectors.js';
|
||||||
|
import getBrowser from '../../helpers/puppeteer';
|
||||||
|
|
||||||
|
const $ = {
|
||||||
|
form: 'vn-item-create form'
|
||||||
|
};
|
||||||
|
|
||||||
|
describe('Item Create', () => {
|
||||||
|
let browser;
|
||||||
|
let page;
|
||||||
|
beforeAll(async() => {
|
||||||
|
browser = await getBrowser();
|
||||||
|
page = browser.page;
|
||||||
|
await page.loginAndModule('buyer', 'item');
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async() => {
|
||||||
|
await browser.close();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should access to the create item view by clicking the create floating button', async() => {
|
||||||
|
await page.waitToClick(selectors.itemsIndex.createItemButton);
|
||||||
|
await page.waitForState('item.create');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return to the item index by clickig the cancel button', async() => {
|
||||||
|
await page.waitToClick(selectors.itemCreateView.cancelButton);
|
||||||
|
await page.waitForState('item.index');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should now access to the create item view by clicking the create floating button', async() => {
|
||||||
|
await page.waitToClick(selectors.itemsIndex.createItemButton);
|
||||||
|
await page.waitForState('item.create');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should throw an error when insert an invalid priority', async() => {
|
||||||
|
const values = {
|
||||||
|
name: 'Infinity Gauntlet',
|
||||||
|
type: 'Crisantemo',
|
||||||
|
intrastat: 'Coral y materiales similares',
|
||||||
|
origin: 'Holand',
|
||||||
|
priority: null
|
||||||
|
};
|
||||||
|
const message = await page.sendForm($.form, values);
|
||||||
|
|
||||||
|
expect(message.text).toContain('Valid priorities');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create the Infinity Gauntlet item', async() => {
|
||||||
|
const values = {
|
||||||
|
name: 'Infinity Gauntlet',
|
||||||
|
type: 'Crisantemo',
|
||||||
|
intrastat: 'Coral y materiales similares',
|
||||||
|
origin: 'Holand',
|
||||||
|
priority: '2'
|
||||||
|
};
|
||||||
|
|
||||||
|
await page.fillForm($.form, values);
|
||||||
|
const formValues = await page.fetchForm($.form, Object.keys(values));
|
||||||
|
const message = await page.sendForm($.form);
|
||||||
|
|
||||||
|
expect(message.isSuccess).toBeTrue();
|
||||||
|
expect(formValues).toEqual(values);
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,141 @@
|
||||||
|
import selectors from '../../helpers/selectors.js';
|
||||||
|
import getBrowser from '../../helpers/puppeteer';
|
||||||
|
|
||||||
|
describe('Item regularize path', () => {
|
||||||
|
let browser;
|
||||||
|
let page;
|
||||||
|
beforeAll(async() => {
|
||||||
|
browser = await getBrowser();
|
||||||
|
page = browser.page;
|
||||||
|
await page.loginAndModule('employee', 'item');
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async() => {
|
||||||
|
await browser.close();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should edit the user local warehouse', async() => {
|
||||||
|
await page.waitForSpinnerLoad();
|
||||||
|
await page.waitToClick(selectors.globalItems.userMenuButton);
|
||||||
|
await page.autocompleteSearch(selectors.globalItems.userLocalWarehouse, 'Warehouse Four');
|
||||||
|
const message = await page.waitForSnackbar();
|
||||||
|
|
||||||
|
expect(message.text).toContain('Data saved!');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should check the local settings were saved', async() => {
|
||||||
|
const userLocalWarehouse = await page
|
||||||
|
.waitToGetProperty(selectors.globalItems.userLocalWarehouse, 'value');
|
||||||
|
|
||||||
|
await page.closePopup();
|
||||||
|
|
||||||
|
expect(userLocalWarehouse).toContain('Warehouse Four');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should search for a specific item', async() => {
|
||||||
|
await page.accessToSearchResult('Ranged weapon pistol 9mm');
|
||||||
|
await page.waitForState('item.card.summary');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should open the regularize dialog and check the warehouse matches the local user settings', async() => {
|
||||||
|
await page.waitToClick(selectors.itemDescriptor.moreMenu);
|
||||||
|
await page.waitToClick(selectors.itemDescriptor.moreMenuRegularizeButton);
|
||||||
|
const result = await page.waitToGetProperty(selectors.itemDescriptor.regularizeWarehouse, 'value');
|
||||||
|
|
||||||
|
expect(result).toEqual('Warehouse Four');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should regularize the item', async() => {
|
||||||
|
await page.write(selectors.itemDescriptor.regularizeQuantity, '100');
|
||||||
|
await page.autocompleteSearch(selectors.itemDescriptor.regularizeWarehouse, 'Warehouse One');
|
||||||
|
await page.waitToClick(selectors.itemDescriptor.regularizeSaveButton);
|
||||||
|
const message = await page.waitForSnackbar();
|
||||||
|
|
||||||
|
expect(message.text).toContain('Data saved!');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should click on the Tickets button of the top bar menu', async() => {
|
||||||
|
await page.waitToClick(selectors.globalItems.applicationsMenuButton);
|
||||||
|
await page.waitForSelector(selectors.globalItems.applicationsMenuVisible);
|
||||||
|
await Promise.all([
|
||||||
|
page.waitForNavigation({waitUntil: ['load', 'networkidle0', 'domcontentloaded']}),
|
||||||
|
page.waitToClick(selectors.globalItems.ticketsButton)
|
||||||
|
]);
|
||||||
|
await page.waitForState('ticket.index');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should clear the user local settings now', async() => {
|
||||||
|
await page.waitToClick(selectors.globalItems.userMenuButton);
|
||||||
|
await page.waitForContentLoaded();
|
||||||
|
await page.clearInput(selectors.globalItems.userConfigFirstAutocomplete);
|
||||||
|
const message = await page.waitForSnackbar();
|
||||||
|
|
||||||
|
expect(message.text).toContain('Data saved!');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should search for the ticket with alias missing', async() => {
|
||||||
|
await page.keyboard.press('Escape');
|
||||||
|
await page.accessToSearchResult('missing');
|
||||||
|
await page.waitForState('ticket.card.summary');
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should check the ticket sale quantity is showing a negative value`, async() => {
|
||||||
|
await page.waitForTextInElement(selectors.ticketSummary.firstSaleQuantity, '-100');
|
||||||
|
const result = await page
|
||||||
|
.waitToGetProperty(selectors.ticketSummary.firstSaleQuantity, 'innerText');
|
||||||
|
|
||||||
|
expect(result).toContain('-100');
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should check the ticket sale discount is 100%`, async() => {
|
||||||
|
const result = await page
|
||||||
|
.waitToGetProperty(selectors.ticketSummary.firstSaleDiscount, 'innerText');
|
||||||
|
|
||||||
|
expect(result).toContain('100 %');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should now click on the Items button of the top bar menu', async() => {
|
||||||
|
await page.waitToClick(selectors.globalItems.applicationsMenuButton);
|
||||||
|
await page.waitForSelector(selectors.globalItems.applicationsMenuVisible);
|
||||||
|
await page.waitToClick(selectors.globalItems.itemsButton);
|
||||||
|
await page.waitForState('item.index');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should search for the item once again', async() => {
|
||||||
|
await page.accessToSearchResult('Ranged weapon pistol 9mm');
|
||||||
|
await page.waitForState('item.card.summary');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should regularize the item once more', async() => {
|
||||||
|
await page.waitToClick(selectors.itemDescriptor.moreMenu);
|
||||||
|
await page.waitToClick(selectors.itemDescriptor.moreMenuRegularizeButton);
|
||||||
|
await page.write(selectors.itemDescriptor.regularizeQuantity, '100');
|
||||||
|
await page.autocompleteSearch(selectors.itemDescriptor.regularizeWarehouse, 'Warehouse One');
|
||||||
|
await page.waitToClick(selectors.itemDescriptor.regularizeSaveButton);
|
||||||
|
const message = await page.waitForSnackbar();
|
||||||
|
|
||||||
|
expect(message.text).toContain('Data saved!');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should again click on the Tickets button of the top bar menu', async() => {
|
||||||
|
await page.waitToClick(selectors.globalItems.applicationsMenuButton);
|
||||||
|
await page.waitForSelector(selectors.globalItems.applicationsMenuVisible);
|
||||||
|
await Promise.all([
|
||||||
|
page.waitForNavigation({waitUntil: ['load', 'networkidle0', 'domcontentloaded']}),
|
||||||
|
page.waitToClick(selectors.globalItems.ticketsButton)
|
||||||
|
]);
|
||||||
|
await page.waitForState('ticket.index');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should search for the ticket missing once again', async() => {
|
||||||
|
await page.accessToSearchResult('Missing');
|
||||||
|
await page.waitForState('ticket.card.summary');
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should check the ticket contains now two sales`, async() => {
|
||||||
|
await page.waitForTextInElement(selectors.ticketSummary.firstSaleQuantity, '-100');
|
||||||
|
const result = await page.countElement(selectors.ticketSummary.sale);
|
||||||
|
|
||||||
|
expect(result).toEqual(2);
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,84 @@
|
||||||
|
import selectors from '../../helpers/selectors.js';
|
||||||
|
import getBrowser from '../../helpers/puppeteer';
|
||||||
|
|
||||||
|
describe('Item index path', () => {
|
||||||
|
let browser;
|
||||||
|
let page;
|
||||||
|
beforeAll(async() => {
|
||||||
|
browser = await getBrowser();
|
||||||
|
page = browser.page;
|
||||||
|
await page.loginAndModule('salesPerson', 'item');
|
||||||
|
await page.waitToClick(selectors.globalItems.searchButton);
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async() => {
|
||||||
|
await browser.close();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should click on the fields to show button to open the list of columns to show', async() => {
|
||||||
|
await page.waitToClick(selectors.itemsIndex.shownColumns);
|
||||||
|
const visible = await page.isVisible(selectors.itemsIndex.shownColumnsList);
|
||||||
|
|
||||||
|
expect(visible).toBeTruthy();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should unmark all checkboxes except the first and the last ones', async() => {
|
||||||
|
await page.waitToClick(selectors.itemsIndex.idCheckbox);
|
||||||
|
await page.waitToClick(selectors.itemsIndex.stemsCheckbox);
|
||||||
|
await page.waitToClick(selectors.itemsIndex.sizeCheckbox);
|
||||||
|
await page.waitToClick(selectors.itemsIndex.typeCheckbox);
|
||||||
|
await page.waitToClick(selectors.itemsIndex.categoryCheckbox);
|
||||||
|
await page.waitToClick(selectors.itemsIndex.intrastadCheckbox);
|
||||||
|
await page.waitToClick(selectors.itemsIndex.originCheckbox);
|
||||||
|
await page.waitToClick(selectors.itemsIndex.buyerCheckbox);
|
||||||
|
await page.waitToClick(selectors.itemsIndex.weightByPieceCheckbox);
|
||||||
|
await page.waitToClick(selectors.itemsIndex.saveFieldsButton);
|
||||||
|
const message = await page.waitForSnackbar();
|
||||||
|
|
||||||
|
expect(message.text).toContain('Data saved!');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should navigate forth and back to see the images column is still visible', async() => {
|
||||||
|
await page.closePopup();
|
||||||
|
await page.waitToClick(selectors.itemsIndex.firstSearchResult);
|
||||||
|
await page.waitToClick(selectors.itemDescriptor.goBackToModuleIndexButton);
|
||||||
|
await page.waitToClick(selectors.globalItems.searchButton);
|
||||||
|
await page.waitForSelector(selectors.itemsIndex.searchResult);
|
||||||
|
await page.waitImgLoad(selectors.itemsIndex.firstItemImage);
|
||||||
|
const imageVisible = await page.isVisible(selectors.itemsIndex.firstItemImageTd);
|
||||||
|
|
||||||
|
expect(imageVisible).toBeTruthy();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should check the ids column is not visible', async() => {
|
||||||
|
await page.waitForSelector(selectors.itemsIndex.firstItemId, {hidden: true});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should mark all unchecked boxes to leave the index as it was', async() => {
|
||||||
|
await page.waitToClick(selectors.itemsIndex.shownColumns);
|
||||||
|
await page.waitToClick(selectors.itemsIndex.idCheckbox);
|
||||||
|
await page.waitToClick(selectors.itemsIndex.stemsCheckbox);
|
||||||
|
await page.waitToClick(selectors.itemsIndex.sizeCheckbox);
|
||||||
|
await page.waitToClick(selectors.itemsIndex.typeCheckbox);
|
||||||
|
await page.waitToClick(selectors.itemsIndex.categoryCheckbox);
|
||||||
|
await page.waitToClick(selectors.itemsIndex.intrastadCheckbox);
|
||||||
|
await page.waitToClick(selectors.itemsIndex.originCheckbox);
|
||||||
|
await page.waitToClick(selectors.itemsIndex.buyerCheckbox);
|
||||||
|
await page.waitToClick(selectors.itemsIndex.weightByPieceCheckbox);
|
||||||
|
await page.waitToClick(selectors.itemsIndex.saveFieldsButton);
|
||||||
|
const message = await page.waitForSnackbar();
|
||||||
|
|
||||||
|
expect(message.text).toContain('Data saved!');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should now navigate forth and back to see the ids column is now visible', async() => {
|
||||||
|
await page.closePopup();
|
||||||
|
await page.waitToClick(selectors.itemsIndex.firstSearchResult);
|
||||||
|
await page.waitToClick(selectors.itemDescriptor.goBackToModuleIndexButton);
|
||||||
|
await page.waitToClick(selectors.globalItems.searchButton);
|
||||||
|
await page.waitForSelector(selectors.itemsIndex.searchResult);
|
||||||
|
const idVisible = await page.isVisible(selectors.itemsIndex.firstItemId);
|
||||||
|
|
||||||
|
expect(idVisible).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,45 @@
|
||||||
|
import selectors from '../../helpers/selectors.js';
|
||||||
|
import getBrowser from '../../helpers/puppeteer';
|
||||||
|
|
||||||
|
describe('Item log path', () => {
|
||||||
|
let browser;
|
||||||
|
let page;
|
||||||
|
beforeAll(async() => {
|
||||||
|
browser = await getBrowser();
|
||||||
|
page = browser.page;
|
||||||
|
await page.loginAndModule('developer', 'item');
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async() => {
|
||||||
|
await browser.close();
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should search for the Knowledge artifact to confirm it isn't created yet`, async() => {
|
||||||
|
await page.doSearch('Knowledge artifact');
|
||||||
|
const nResults = await page.countElement(selectors.itemsIndex.searchResult);
|
||||||
|
|
||||||
|
expect(nResults).toEqual(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should access to the create item view by clicking the create floating button', async() => {
|
||||||
|
await page.waitToClick(selectors.itemsIndex.createItemButton);
|
||||||
|
await page.waitForState('item.create');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create the Knowledge artifact item', async() => {
|
||||||
|
await page.write(selectors.itemCreateView.temporalName, 'Knowledge artifact');
|
||||||
|
await page.autocompleteSearch(selectors.itemCreateView.type, 'Crisantemo');
|
||||||
|
await page.autocompleteSearch(selectors.itemCreateView.intrastat, 'Coral y materiales similares');
|
||||||
|
await page.autocompleteSearch(selectors.itemCreateView.origin, 'Holand');
|
||||||
|
await page.waitToClick(selectors.itemCreateView.createButton);
|
||||||
|
const message = await page.waitForSnackbar();
|
||||||
|
|
||||||
|
expect(message.text).toContain('Data saved!');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return to the items index by clicking the return to items button', async() => {
|
||||||
|
await page.waitToClick(selectors.itemBasicData.goToItemIndexButton);
|
||||||
|
await page.waitForSelector(selectors.itemsIndex.createItemButton);
|
||||||
|
await page.waitForState('item.index');
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,41 @@
|
||||||
|
import selectors from '../../helpers/selectors.js';
|
||||||
|
import getBrowser from '../../helpers/puppeteer';
|
||||||
|
|
||||||
|
describe('Item descriptor path', () => {
|
||||||
|
let browser;
|
||||||
|
let page;
|
||||||
|
beforeAll(async() => {
|
||||||
|
browser = await getBrowser();
|
||||||
|
page = browser.page;
|
||||||
|
await page.loginAndModule('buyer', 'item');
|
||||||
|
await page.accessToSearchResult('1');
|
||||||
|
await page.accessToSection('item.card.basicData');
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async() => {
|
||||||
|
await browser.close();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should set the item to inactive', async() => {
|
||||||
|
await page.waitToClick(selectors.itemBasicData.isActiveCheckbox);
|
||||||
|
await page.waitToClick(selectors.itemBasicData.submitBasicDataButton);
|
||||||
|
const message = await page.waitForSnackbar();
|
||||||
|
|
||||||
|
expect(message.text).toContain('Data saved!');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should reload the section and check the inactive icon is visible', async() => {
|
||||||
|
await page.reloadSection('item.card.basicData');
|
||||||
|
const visibleIcon = await page.isVisible(selectors.itemDescriptor.inactiveIcon);
|
||||||
|
|
||||||
|
expect(visibleIcon).toBeTruthy();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should set the item back to active', async() => {
|
||||||
|
await page.waitToClick(selectors.itemBasicData.isActiveCheckbox);
|
||||||
|
await page.waitToClick(selectors.itemBasicData.submitBasicDataButton);
|
||||||
|
const message = await page.waitForSnackbar();
|
||||||
|
|
||||||
|
expect(message.text).toContain('Data saved!');
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,45 @@
|
||||||
|
import selectors from '../../helpers/selectors.js';
|
||||||
|
import getBrowser from '../../helpers/puppeteer';
|
||||||
|
|
||||||
|
describe('Item request path', () => {
|
||||||
|
let browser;
|
||||||
|
let page;
|
||||||
|
beforeAll(async() => {
|
||||||
|
browser = await getBrowser();
|
||||||
|
page = browser.page;
|
||||||
|
await page.loginAndModule('buyer', 'item');
|
||||||
|
await page.accessToSection('item.request');
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async() => {
|
||||||
|
await browser.close();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should reach the item request section', async() => {
|
||||||
|
await page.waitForState('item.request');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should fill the id and quantity then check the concept was updated', async() => {
|
||||||
|
await page.writeOnEditableTD(selectors.itemRequest.firstRequestItemID, '4');
|
||||||
|
await page.writeOnEditableTD(selectors.itemRequest.firstRequestQuantity, '10');
|
||||||
|
await page.waitForTextInElement(selectors.itemRequest.firstRequestConcept, 'Melee weapon heavy shield 100cm');
|
||||||
|
let filledConcept = await page.waitToGetProperty(selectors.itemRequest.firstRequestConcept, 'innerText');
|
||||||
|
|
||||||
|
expect(filledConcept).toContain('Melee weapon heavy shield 100cm');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should check the status of the request should now be accepted', async() => {
|
||||||
|
let status = await page.waitToGetProperty(selectors.itemRequest.firstRequestStatus, 'innerText');
|
||||||
|
|
||||||
|
expect(status).toContain('Accepted');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should now click on the second declain request icon then type the reason', async() => {
|
||||||
|
await page.waitToClick(selectors.itemRequest.secondRequestDecline);
|
||||||
|
await page.write(selectors.itemRequest.declineReason, 'Not quite as expected');
|
||||||
|
await page.respondToDialog('accept');
|
||||||
|
let status = await page.waitToGetProperty(selectors.itemRequest.secondRequestStatus, 'innerText');
|
||||||
|
|
||||||
|
expect(status).toContain('Denied');
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,97 @@
|
||||||
|
import selectors from '../../helpers/selectors.js';
|
||||||
|
import getBrowser from '../../helpers/puppeteer';
|
||||||
|
|
||||||
|
const $ = selectors.itemFixedPrice;
|
||||||
|
|
||||||
|
describe('Item fixed prices path', () => {
|
||||||
|
let browser;
|
||||||
|
let page;
|
||||||
|
let httpRequest;
|
||||||
|
|
||||||
|
beforeAll(async() => {
|
||||||
|
browser = await getBrowser();
|
||||||
|
page = browser.page;
|
||||||
|
await page.loginAndModule('buyer', 'item');
|
||||||
|
await page.accessToSection('item.fixedPrice');
|
||||||
|
page.on('request', req => {
|
||||||
|
if (req.url().includes(`FixedPrices/filter`))
|
||||||
|
httpRequest = req.url();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async() => {
|
||||||
|
await browser.close();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should filter using all the fields', async() => {
|
||||||
|
await page.write($.generalSearchFilter, 'item');
|
||||||
|
await page.keyboard.press('Enter');
|
||||||
|
|
||||||
|
expect(httpRequest).toContain('search=item');
|
||||||
|
|
||||||
|
await page.click($.chip);
|
||||||
|
await page.click($.reignFilter);
|
||||||
|
|
||||||
|
expect(httpRequest).toContain('categoryFk');
|
||||||
|
|
||||||
|
await page.autocompleteSearch($.typeFilter, 'Alstroemeria');
|
||||||
|
|
||||||
|
expect(httpRequest).toContain('typeFk');
|
||||||
|
|
||||||
|
await page.click($.chip);
|
||||||
|
await page.autocompleteSearch($.buyerFilter, 'buyerNick');
|
||||||
|
|
||||||
|
expect(httpRequest).toContain('buyerFk');
|
||||||
|
|
||||||
|
await page.click($.chip);
|
||||||
|
await page.autocompleteSearch($.warehouseFilter, 'Algemesi');
|
||||||
|
|
||||||
|
expect(httpRequest).toContain('warehouseFk');
|
||||||
|
|
||||||
|
await page.click($.chip);
|
||||||
|
await page.click($.mineFilter);
|
||||||
|
|
||||||
|
expect(httpRequest).toContain('mine=true');
|
||||||
|
|
||||||
|
await page.click($.chip);
|
||||||
|
await page.click($.hasMinPriceFilter);
|
||||||
|
|
||||||
|
expect(httpRequest).toContain('hasMinPrice=true');
|
||||||
|
|
||||||
|
await page.click($.chip);
|
||||||
|
await page.click($.addTag);
|
||||||
|
await page.autocompleteSearch($.tagFilter, 'Color');
|
||||||
|
await page.autocompleteSearch($.tagValueFilter, 'Brown');
|
||||||
|
|
||||||
|
expect(httpRequest).toContain('tags');
|
||||||
|
|
||||||
|
await page.click($.chip);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should click on the add new fixed price button', async() => {
|
||||||
|
await page.waitToClick($.add);
|
||||||
|
await page.waitForSelector($.fourthFixedPrice);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should fill the fixed price data', async() => {
|
||||||
|
const now = Date.vnNew();
|
||||||
|
await page.autocompleteSearch($.fourthWarehouse, 'Warehouse one');
|
||||||
|
await page.writeOnEditableTD($.fourthGroupingPrice, '1');
|
||||||
|
await page.writeOnEditableTD($.fourthPackingPrice, '1');
|
||||||
|
await page.write($.fourthMinPrice, '1');
|
||||||
|
await page.pickDate($.fourthStarted, now);
|
||||||
|
await page.pickDate($.fourthEnded, now);
|
||||||
|
const message = await page.waitForSnackbar();
|
||||||
|
|
||||||
|
expect(message.text).toContain('Data saved!');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should reload the section and check the created price has the expected ID', async() => {
|
||||||
|
await page.goto(`http://localhost:5000/#!/item/fixed-price`);
|
||||||
|
await page.autocompleteSearch($.warehouseFilter, 'Warehouse one');
|
||||||
|
await page.click($.chip);
|
||||||
|
const result = await page.waitToGetProperty($.fourthItemID, 'value');
|
||||||
|
|
||||||
|
expect(result).toContain('13');
|
||||||
|
});
|
||||||
|
});
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue