Compare commits

...

376 Commits
master ... dev

Author SHA1 Message Date
Guillermo Bonet 65ca1b5af3 Merge pull request 'feat: refs #8149 Group by CuentaIvaRepercutido' (!3201) from 8149-ivaXDiario into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3201
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-11-22 12:09:47 +00:00
Carlos Andrés 771aeaa9bd Merge pull request 'test' (!3237) from test into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3237
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-11-22 12:03:18 +00:00
Guillermo Bonet 1c6f59a0ec Merge branch '8149-ivaXDiario' of https://gitea.verdnatura.es/verdnatura/salix into 8149-ivaXDiario
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-22 12:59:26 +01:00
Guillermo Bonet 4ab2d7fd09 feat: refs #8149 Group by CuentaIvaRepercutido 2024-11-22 12:59:24 +01:00
Carlos Andrés 7cf6acec19 Merge pull request '8124-enrutadoresNuevosRequerimientos' (!3235) from 8124-enrutadoresNuevosRequerimientos into test
gitea/salix/pipeline/pr-dev This commit looks good Details
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3235
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-11-22 09:46:03 +00:00
Guillermo Bonet c440472693 Merge branch 'dev' into 8149-ivaXDiario
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-22 09:43:26 +00:00
Jorge Penadés 470d9bde64 Merge pull request 'fix: refs #7229 set right urls' (!3226) from 7229-fixDownloadFile into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3226
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-22 09:34:16 +00:00
Jorge Penadés b97058735c Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7229-fixDownloadFile
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-22 10:25:28 +01:00
Guillermo Bonet 46c85d44d6 Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details
2024-11-22 09:12:23 +01:00
Guillermo Bonet a731bb3a45 Merge branch 'master' into test
gitea/salix/pipeline/head This commit looks good Details
2024-11-22 09:11:29 +01:00
Javier Segarra f01051a266 Merge pull request 'Revert ItemMigration and enbale in Salix (cd7ed6987a)' (!3236) from revert_7283_itemMigration3 into test
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3236
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-11-22 08:02:49 +00:00
Javier Segarra a6d2f9c3f8 Merge branch 'test' into revert_7283_itemMigration3
gitea/salix/pipeline/pr-test This commit looks good Details
2024-11-22 07:56:09 +00:00
Javier Segarra 0c592946e6 revert cd7ed6987a
gitea/salix/pipeline/pr-test This commit looks good Details
2024-11-21 20:24:33 +01:00
Carlos Andrés 52364bbe2d feat: refs #8124 Enrutadores nuevos requerimientos
gitea/salix/pipeline/pr-test This commit looks good Details
2024-11-21 18:44:47 +01:00
Carlos Andrés 7ad17d75d7 feat: refs #8124 Enrutadores nuevos requerimientos 2024-11-21 18:41:55 +01:00
Javi Gallego 78d3d01649 Merge pull request 'feat: refs #7821 isBooked with grants' (!3150) from 7821-entryIsBooked into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3150
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-11-21 15:39:52 +00:00
Javi Gallego 41b3f34158 fix: refs #7821 alias
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-21 16:38:11 +01:00
Javi Gallego 53673f43b8 Merge branch 'dev' into 7821-entryIsBooked
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-21 16:20:25 +01:00
Javi Gallego 0ecbef0c9f Merge branch 'dev' into 7821-entryIsBooked 2024-11-21 16:15:10 +01:00
Carlos Andrés 770ace0f8e Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details
2024-11-21 16:11:42 +01:00
Carlos Andrés 2563d1f0e4 Merge pull request 'refs#8087 Redadas en travel test' (!3232) from travelisRaidTest into test
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3232
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-11-21 14:55:07 +00:00
Carlos Andrés 0870a1c3d6 refs#8087 Redadas en travel test
gitea/salix/pipeline/pr-test This commit looks good Details
2024-11-21 15:09:58 +01:00
Carlos Andrés dbf71b981e Merge pull request 'refactor: refs #8210 ticket_splitItemPackingType' (!3217) from 8210-RefactorTicket_splitItemPackingType into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3217
Reviewed-by: Pako Natek <pako@verdnatura.es>
2024-11-21 12:39:34 +00:00
Javi Gallego 80851e094d Merge branch 'dev' into 7821-entryIsBooked
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-21 13:28:54 +01:00
Javi Gallego 510fffb61a Merge branch 'dev' into 7821-entryIsBooked
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-21 13:09:01 +01:00
Carlos Andrés 762d4b9955 Merge branch 'dev' into 8210-RefactorTicket_splitItemPackingType
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-21 11:53:59 +00:00
Sergio De la torre 07201f6448 Merge pull request 'fix: refs #7920 refs#7920 itemShelvingLog' (!3231) from 7920-itemShelvingLogs into test
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3231
Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
2024-11-21 10:59:52 +00:00
Sergio De la torre 512b4a54df fix: refs #7920 refs#7920 itemShelvingLog
gitea/salix/pipeline/pr-test This commit looks good Details
2024-11-21 11:28:25 +01:00
Ivan Mas fee9bbe387 Merge pull request 'refactor: refs #7690 unify workerTimeControlParams with workerTimeControlConfig' (!3191) from 7690-renameConfigTables into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3191
Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
2024-11-21 09:13:49 +00:00
Ivan Mas b2fa7e7caf Merge branch 'dev' into 7690-renameConfigTables
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-21 09:11:06 +00:00
Javi Gallego b3ce3a0cc2 feat: refs #7821 with test
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-21 09:12:04 +01:00
Jon Elias 9cd16981e6 Merge pull request '#6924 Notify absences only to department boss' (!3175) from 6924-NotifyOnlyToBoss into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3175
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-21 07:06:27 +00:00
Alex Moreno 0ac46882be Merge branch 'dev' into 6924-NotifyOnlyToBoss
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-21 06:54:00 +00:00
Alex Moreno f5b16ca36d Merge pull request 'fix: refs #7529 fix acls' (!3228) from 7529-worerPitFix into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3228
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-21 06:03:19 +00:00
Carlos Satorres 2098ea7163 Merge branch 'dev' into 7529-worerPitFix
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-21 04:48:26 +00:00
Carlos Andrés 031c4398ae refactor: refs #8210 ticket_splitItemPackingType
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-20 19:19:03 +01:00
Jorge Penadés e125dee691 refactor: refs #7229 desestructure
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-20 16:51:14 +01:00
Jorge Penadés 940bc8caed Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7229-fixDownloadFile
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-20 15:34:04 +01:00
Ivan Mas 0274c01c14 Merge branch 'dev' into 7690-renameConfigTables
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-20 13:54:57 +00:00
Ivan Mas 830573e229 refactor: refs #7690 remove modifications printQueue_check.sql
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-20 14:49:55 +01:00
Carlos Satorres 82f4815282 fix: refs #7529 fix acls
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-20 14:16:26 +01:00
Guillermo Bonet 69bdf8efb2 Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details
2024-11-20 14:08:42 +01:00
Sergio De la torre a8dea64bc1 Merge pull request 'fix: refs #7920 refs#7920 itemShelvingLog' (!3227) from 7920-itemShelvingLog into test
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-dev This commit looks good Details
Reviewed-on: #3227
Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
2024-11-20 13:07:51 +00:00
Sergio De la torre 9fbffe8a6b fix: refs #7920 refs#7920 itemShelvingLog
gitea/salix/pipeline/pr-test This commit looks good Details
2024-11-20 14:03:23 +01:00
Jorge Penadés 16111220fb Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7229-fixDownloadFile
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-20 13:52:55 +01:00
Jorge Penadés bbb7815765 fix: refs #7229 set right urls
gitea/salix/pipeline/pr-dev Build queued... Details
2024-11-20 13:52:24 +01:00
Carlos Satorres d46683cd31 Merge pull request 'refs #7529 back models acls' (!2563) from 7529-workerPIT into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2563
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-20 12:21:30 +00:00
Carlos Satorres 7ab1b7d171 Merge branch 'dev' of https: refs #7529//gitea.verdnatura.es/verdnatura/salix into 7529-workerPIT
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-20 13:14:26 +01:00
Carlos Satorres df249b05d3 fix: refs #7529 fix acl
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-20 13:10:43 +01:00
Pablo Natek cde3c8c50a Merge pull request 'feat: refs #8138 reduce credit on risk' (!3215) from 8138-feat-reduce-credit-on-risk into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3215
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-11-20 11:21:09 +00:00
Guillermo Bonet 42a27f3407 Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details
2024-11-20 12:17:53 +01:00
Guillermo Bonet d302a9c3ba Merge branch 'master' into test
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-20 12:17:30 +01:00
Jorge Penadés e4317a385c Merge pull request 'fix: refs #6818 add config' (!3223) from 6818-warmfixxInsertConfig into test
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-dev This commit looks good Details
Reviewed-on: #3223
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-20 09:00:39 +00:00
Jorge Penadés 3cce342d9d fix: refs #6818 add config
gitea/salix/pipeline/pr-test This commit looks good Details
2024-11-20 09:52:42 +01:00
Pablo Natek 5e52b3b596 Merge branch 'dev' into 8138-feat-reduce-credit-on-risk
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-20 06:46:46 +00:00
Carlos Andrés ad345a0b91 Merge pull request 'feat: refs#8087 Redadas en travel' (!3177) from 8087-nuevosCamposTravel into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3177
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-11-19 16:57:15 +00:00
Carlos Andrés 43abb52efc refactor: refs #8210 ticket_splitItemPackingType
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-19 16:58:15 +01:00
Ivan Mas 715cea0670 Merge branch 'dev' into 7690-renameConfigTables
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-19 15:07:03 +00:00
Ivan Mas a9d45bde4c refactor: refs #7690 modify printQueue_check and rename tables
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-19 16:03:23 +01:00
Alex Moreno 46148d7ba3 Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/pipeline/head This commit looks good Details
2024-11-19 14:09:58 +01:00
Alex Moreno 033e269a5d Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix into test
gitea/salix/pipeline/pr-dev This commit looks good Details
gitea/salix/pipeline/head This commit looks good Details
2024-11-19 14:09:46 +01:00
Carlos Andrés 63c0747304 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 8087-nuevosCamposTravel
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-19 13:52:12 +01:00
Carlos Andrés 953bc84a58 feat: refs#8087 Redadas en travel
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-19 13:49:02 +01:00
Jon Elias 492c79de46 Merge branch 'dev' into 6924-NotifyOnlyToBoss
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-19 12:42:53 +00:00
Jon Elias 149524f4fd Merge branch '6924-NotifyOnlyToBoss' of https://gitea.verdnatura.es/verdnatura/salix into 6924-NotifyOnlyToBoss
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-19 13:40:32 +01:00
Jon Elias f145649fc7 fix: refs #6924 requested change 2024-11-19 13:40:31 +01:00
Carlos Andrés 6a43d3c752 feat: refs#8087 Redadas en travel
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-19 13:40:12 +01:00
Jorge Penadés 2335b57e05 Merge pull request '#7323 add remaining fields' (!3220) from 7323-warfix-addRemainingFields into test
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-dev This commit looks good Details
Reviewed-on: #3220
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-19 12:37:24 +00:00
Jorge Penadés c31fa7e9cf Merge branch 'test' into 7323-warfix-addRemainingFields
gitea/salix/pipeline/pr-test This commit looks good Details
2024-11-19 12:33:01 +00:00
Alex Moreno 60734136c3 Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/pipeline/head This commit looks good Details
2024-11-19 13:28:53 +01:00
Sergio De la torre f192b92c6a Merge pull request 'feat: refs #8099 refs#8099 addComplmentSalary' (!3219) from 8099-addComplementSalary into test
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
Reviewed-on: #3219
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-19 12:25:47 +00:00
Jorge Penadés f89080d373 fix: refs #7323 add remaining fields
gitea/salix/pipeline/pr-test This commit looks good Details
2024-11-19 11:53:12 +01:00
Sergio De la torre feb11c123e feat: refs #8099 refs#8099 addComplmentSalary
gitea/salix/pipeline/pr-test This commit looks good Details
2024-11-19 11:45:40 +01:00
Sergio De la torre d21b42a567 feat: refs #8099 refs#8099 addComplmentSalary
gitea/salix/pipeline/pr-test This commit looks good Details
2024-11-19 11:24:00 +01:00
Carlos Andrés a7ab8696ac refactor: refs #8210 ticket_splitItemPackingType
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-19 11:07:19 +01:00
Carlos Andrés 43e121a2f3 refactor: refs #8210 ticket_splitItemPackingType
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-19 11:04:16 +01:00
Alex Moreno 6a65ab42ce build: change package version
gitea/salix/pipeline/head This commit looks good Details
2024-11-19 09:12:42 +01:00
Alex Moreno 562d3b0f70 Merge pull request '8144-devToTest_2448' (!3216) from 8144-devToTest_2448 into test
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3216
Reviewed-by: Carlos Satorres <carlossa@verdnatura.es>
2024-11-19 07:36:02 +00:00
Pablo Natek a3f92a284f Merge branch 'dev' into 8138-feat-reduce-credit-on-risk
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-19 07:02:11 +00:00
Pablo Natek 2f93da199a feat: refs #8138 reduce credit on risk
gitea/salix/pipeline/pr-dev Build queued... Details
2024-11-19 08:01:41 +01:00
Alex Moreno 413e9e1e9f build: refs #8144 change package version
gitea/salix/pipeline/pr-test This commit looks good Details
2024-11-19 07:59:27 +01:00
Alex Moreno 7f39edf014 Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/pipeline/head This commit looks good Details
2024-11-19 07:46:43 +01:00
Javi Gallego 7a9bcf11e2 Merge pull request 'refactor: refs #7457 Added from param if not exists' (!2502) from 7457-orderFilter into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2502
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-11-19 05:33:34 +00:00
Pablo Natek b70b69557e fix: refs #7457 empty commit for gitea 2024-11-19 06:30:19 +01:00
Pablo Natek 056b5adddc Merge branch 'dev' into 7457-orderFilter 2024-11-19 05:12:18 +00:00
Javi Gallego a40a5a22ab fix: refs #7821 fixtures without raid
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-18 14:27:38 +01:00
Carlos Satorres 6b0d7762b4 Merge branch '7529-workerPIT' of https://gitea.verdnatura.es/verdnatura/salix into 7529-workerPIT
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-18 13:57:42 +01:00
Carlos Satorres 2790e92741 fix: refs #7529 fix acl 2024-11-18 13:57:40 +01:00
Guillermo Bonet 8d4769d74d feat: refs #8057 More precision in getGeo
gitea/salix/pipeline/head This commit looks good Details
2024-11-18 13:34:20 +01:00
Guillermo Bonet cdcc5051d2 feat: refs #8057 Fix version
gitea/salix/pipeline/head This commit looks good Details
2024-11-18 13:09:33 +01:00
Guillermo Bonet 2b770c0201 feat: refs #8057 Fix version
gitea/salix/pipeline/head There was a failure building this commit Details
2024-11-18 12:56:37 +01:00
Guillermo Bonet aed4bc89c7 feat: refs #8057 Fix version
gitea/salix/pipeline/head There was a failure building this commit Details
2024-11-18 12:53:36 +01:00
Javi Gallego 72415a4348 Merge branch 'dev' into 7821-entryIsBooked
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-18 12:49:59 +01:00
Guillermo Bonet baadd621e1 Merge pull request 'feat: refs #8057 Added geoFk columns' (!3204) from 8057-geoFk into dev
gitea/salix/pipeline/head There was a failure building this commit Details
Reviewed-on: #3204
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
Reviewed-by: Pako Natek <pako@verdnatura.es>
2024-11-18 11:47:53 +00:00
Javier Segarra 3f6a23fe35 Merge pull request '#7289 Sales already moved' (!3212) from 7289_sales_already_moved into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3212
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-11-18 10:40:54 +00:00
Javier Segarra 4b64b27ca7 Merge branch 'dev' into 7289_sales_already_moved
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-18 10:39:17 +00:00
Jorge Penadés 433f883700 Merge pull request 'feat: refs #6869 define model' (!3172) from 6869-createGetDetails into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3172
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
2024-11-18 10:08:20 +00:00
Pablo Natek d2b545aaae Merge branch 'dev' into 7457-orderFilter 2024-11-18 10:05:29 +00:00
Guillermo Bonet 66009ee0dd Merge branch 'dev' into 8057-geoFk
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-18 09:52:55 +00:00
Guillermo Bonet 754c0cb9ab Merge branch '8057-geoFk' of https://gitea.verdnatura.es/verdnatura/salix into 8057-geoFk
gitea/salix/pipeline/pr-dev Build queued... Details
2024-11-18 10:52:44 +01:00
Guillermo Bonet a64f9b74ec feat: refs #8057 Requested changes 2024-11-18 10:52:41 +01:00
Jorge Penadés dd637b9333 fix: refs #6869 use id as primaryKey
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-18 10:34:23 +01:00
Jorge Penadés 5e78317b5e Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 6869-createGetDetails
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-18 10:15:35 +01:00
Javier Segarra f471f7e76c Merge branch 'dev' into 7289_sales_already_moved
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-18 10:10:57 +01:00
Javier Segarra 9558d030ff feat: refs #7289 #7289 remove bad translation 2024-11-18 10:10:30 +01:00
Robert Ferrús 5e21e4e368 Merge pull request 'feat: refs #8127 entry_getCommission' (!3128) from 8127-entry_updateComission into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3128
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-11-18 08:48:50 +00:00
Robert Ferrús 329488d700 Merge branch 'dev' into 8127-entry_updateComission
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-18 08:46:49 +00:00
Guillermo Bonet 2b97c18412 Merge branch 'dev' into 6869-createGetDetails
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-18 08:34:11 +00:00
Sergio De la torre 7d5928bc3d Merge pull request 'feat: refs #8135 refs#8135 updateTicketACL' (!3210) from 8135-ticketACL into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3210
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-11-18 08:21:18 +00:00
Guillermo Bonet e81727f3f8 Merge branch 'dev' into 8057-geoFk
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-18 07:58:51 +00:00
Guillermo Bonet 353ca659cd feat: refs #8057 Requested changes
gitea/salix/pipeline/pr-dev Build queued... Details
2024-11-18 08:58:38 +01:00
Javier Segarra 6c00efae89 feat: refs #7289 #7289 apply option 1
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-17 17:57:54 +01:00
Ivan Mas 2a1c0ef2af Merge branch 'dev' into 7690-renameConfigTables
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-15 13:35:14 +00:00
Ivan Mas 6a11416838 refactor: refs #7690 copy acls and remove worker-time-control-params.json
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-15 14:30:32 +01:00
Pablo Natek 60f989b566 Merge branch 'dev' into 7457-orderFilter 2024-11-15 11:56:54 +00:00
Pablo Natek 55daa2d02b Merge pull request '7743-simpleTestForSendMail' (!3170) from 7743-simpleTestForSendMail into dev
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-dev This commit looks good Details
Reviewed-on: #3170
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-11-15 11:54:23 +00:00
Guillermo Bonet b529ccfe29 feat: refs #7920 Added ItemShelving in shelvingLog
gitea/salix/pipeline/head This commit looks good Details
2024-11-15 12:43:15 +01:00
Robert Ferrús 923296e85e Merge branch 'dev' into 8127-entry_updateComission
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-15 10:34:34 +00:00
Guillermo Bonet a3945070f2 refactor: refs #7920 No changes in itemShelvingLog table
gitea/salix/pipeline/head This commit looks good Details
2024-11-15 11:34:18 +01:00
Robert Ferrús c5f1b05671 feat: refs #8127 quitar esquemas
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-15 11:32:20 +01:00
Robert Ferrús f7a5fc7e31 Merge branch 'dev' into 8127-entry_updateComission
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-15 10:06:45 +00:00
Pablo Natek 86e4e3e981 Merge branch 'dev' into 7743-simpleTestForSendMail
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-15 09:26:42 +00:00
Sergio De la torre 07318656b7 feat: refs #8135 refs#8135 updateTicketACL
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-15 08:47:30 +01:00
Guillermo Bonet e1a091535e refactor: refs #7920 Fix version
gitea/salix/pipeline/head Something is wrong with the build of this commit Details
2024-11-15 08:45:28 +01:00
Sergio De la torre 7a4455d6d0 feat: refs #6869 refs#6869 itemShelving_get
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-15 08:12:16 +01:00
Guillermo Bonet b5463e5560 refactor: refs #7920 Fix version
gitea/salix/pipeline/head There was a failure building this commit Details
2024-11-15 07:54:33 +01:00
Guillermo Bonet e49285ace8 refactor: refs #7920 Fix version
gitea/salix/pipeline/head There was a failure building this commit Details
2024-11-15 07:51:37 +01:00
Guillermo Bonet e344ae3bf2 refactor: refs #7920 Fix version
gitea/salix/pipeline/head There was a failure building this commit Details
2024-11-15 07:48:17 +01:00
Guillermo Bonet 216b81adda Merge pull request 'refactor: refs #7920 Main change' (!3194) from 7920-itemShelving into dev
gitea/salix/pipeline/head There was a failure building this commit Details
Reviewed-on: #3194
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-11-15 06:44:16 +00:00
Guillermo Bonet 48ffb80094 Merge branch 'dev' into 7920-itemShelving
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-15 06:40:41 +00:00
Pablo Natek d8e728e823 Merge branch 'dev' into 7457-orderFilter 2024-11-15 06:17:04 +00:00
Guillermo Bonet 96b85701d8 Merge pull request 'refactor: refs #7950 Created cmr model' (!3180) from 7950-cmrModelUnify into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3180
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-11-15 06:07:16 +00:00
Guillermo Bonet d1c528c8fd Merge branch 'dev' into 7950-cmrModelUnify
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-15 06:03:36 +00:00
Guillermo Bonet 0fbef4c88a Merge pull request 'fix: refs #7244 Added collection ACL' (!3198) from 7244-collectionAcl into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3198
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-11-15 06:01:48 +00:00
Guillermo Bonet 3b48cf3d5d Merge pull request 'feat: refs #8151 moveExpeditions' (!3200) from 8151-moveExpeditions into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3200
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-11-15 05:59:19 +00:00
Jorge Penadés 7e2194df41 Merge pull request 'fix: refs #6818 add defaultChannel' (!3205) from 6818-addDefaultChannel into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3205
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-11-14 15:41:10 +00:00
Jorge Penadés 4b659c0b48 fix: refs #6818 use right col type
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-14 16:39:35 +01:00
Jorge Penadés f96b914649 fix: refs #6818 use right col type 2024-11-14 16:39:26 +01:00
Jorge Penadés 86c95e185c Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 6818-addDefaultChannel
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-14 16:32:40 +01:00
Jorge Penadés f3e640e4a0 Merge pull request 'refactor: refs #7641 entry report style' (!3178) from 7641-refactorEntryReport into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3178
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-11-14 15:29:14 +00:00
Jorge Penadés 1ca737fd13 Merge branch 'dev' into 7641-refactorEntryReport
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-14 15:22:00 +00:00
Jorge Penadés e242320eed Merge pull request '#7874 setDefaultTypeNote' (!3209) from 7874-setDefaultTypeNote into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3209
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-11-14 15:21:19 +00:00
Jorge Penadés 4766d25dda feat: refs #7874 use name
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-14 15:54:53 +01:00
Pablo Natek 9ac54f463a fix: refs #7457 add with on select to reduce 2024-11-14 15:48:11 +01:00
Jorge Penadés eff251fbb5 feat: refs #7874 add default type 2024-11-14 15:46:51 +01:00
Jorge Penadés ab2e88806e fix: refs #7641 drop boilerplate code
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-14 15:29:54 +01:00
Jorge Penadés c4375b2505 feat: refs #7641 fine tunning 2024-11-14 15:29:18 +01:00
Jorge Penadés 47ae1b59c1 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7641-refactorEntryReport
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-14 15:22:22 +01:00
Alex Moreno a8cb0b9eb8 Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/pipeline/head This commit looks good Details
2024-11-14 12:21:13 +01:00
Jorge Penadés a37332f7be fix: refs #6818 add defaultChannel
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-14 11:18:38 +01:00
Jorge Penadés 25b05637a6 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 6818-addDefaultChannel
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-14 11:17:11 +01:00
Ivan Mas 0a11997250 Merge pull request 'feat: refs #8143 deprecate recoverPass and sync from account.user' (!3203) from 8143-deprecateColumnsFromUser into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3203
Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
2024-11-14 10:16:55 +00:00
Jorge Penadés c8ab5d4344 fix: refs #6818 add defaultChannel
gitea/salix/pipeline/pr-dev Build queued... Details
2024-11-14 11:16:45 +01:00
Ivan Mas 96a13af02c Merge branch 'dev' into 8143-deprecateColumnsFromUser
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-14 10:11:37 +00:00
Guillermo Bonet 54da1a713a Merge branch '8151-moveExpeditions' of https://gitea.verdnatura.es/verdnatura/salix into 8151-moveExpeditions
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-14 10:53:15 +01:00
Guillermo Bonet b3dcaf4cf5 feat: refs #8151 Requested changes 2024-11-14 10:53:13 +01:00
Guillermo Bonet b7cb420c72 Merge branch 'dev' into 8151-moveExpeditions
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-14 09:46:00 +00:00
Guillermo Bonet 534b50f51a feat: refs #8151 Requested changes
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-14 10:45:28 +01:00
Guillermo Bonet d387486ea8 refactor: refs #7920 Requested changes
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-14 09:59:01 +01:00
Guillermo Bonet 2f7de633bd Merge branch 'dev' into 7244-collectionAcl
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-14 08:43:25 +00:00
Guillermo Bonet 8449a6c6d3 feat: refs #7244 Requested changes
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-14 09:42:59 +01:00
Guillermo Bonet 5f50d84213 feat: refs #7244 Requested changes
gitea/salix/pipeline/pr-dev Build queued... Details
2024-11-14 09:42:49 +01:00
Carlos Satorres cd7ed6987a Merge pull request 'fix: refs #7283 remove' (!2907) from 7283-itemsMigration3 into dev
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-dev This commit looks good Details
Reviewed-on: #2907
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
Reviewed-by: Javier Segarra <jsegarra@verdnatura.es>
2024-11-14 08:40:50 +00:00
Guillermo Bonet b9397c527d feat: refs #8057 Added data updates
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-14 09:32:02 +01:00
Guillermo Bonet bde192966e feat: refs #8057 Added data updates
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-14 09:30:36 +01:00
Guillermo Bonet cba1abad68 feat: refs #8057 Added data updates
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-14 09:27:38 +01:00
Carlos Satorres b0812139cb Merge branch '7283-itemsMigration3' of https://gitea.verdnatura.es/verdnatura/salix into 7283-itemsMigration3
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-14 09:26:16 +01:00
Carlos Satorres 155616e622 Merge branch 'dev' of https: refs #7283//gitea.verdnatura.es/verdnatura/salix into 7283-itemsMigration3 2024-11-14 09:26:13 +01:00
Guillermo Bonet d4b0da50d0 feat: refs #8057 Added data updates
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-14 09:00:19 +01:00
Jon Elias 66149a69a7 Merge branch 'dev' into 6924-NotifyOnlyToBoss
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-14 07:37:42 +00:00
Jon Elias 7be1bc385f perf: refs #6924 deleted useless relation
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-14 08:35:28 +01:00
Guillermo Bonet b7655b4f92 feat: refs #8057 Added geoFk columns
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-14 08:24:42 +01:00
Guillermo Bonet 97e53b2ef8 Merge branch 'dev' into 7950-cmrModelUnify
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-14 06:57:26 +00:00
Guillermo Bonet 9c0af7f7c6 refactor: refs #7950 Requested changes
gitea/salix/pipeline/pr-dev Build queued... Details
2024-11-14 07:57:13 +01:00
Ivan Mas e1b0fc298c feat: refs #8143 deprecate recoverPass and sync from account.user
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-13 20:26:54 +01:00
Guillermo Bonet 477fb7ded9 feat: refs #8149 Group by CuentaIvaRepercutido
gitea/salix/pipeline/pr-dev Build queued... Details
2024-11-13 14:27:54 +01:00
Guillermo Bonet d4a60f63c9 feat: refs #8151 Added test
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-13 14:05:03 +01:00
Guillermo Bonet 018393fa93 feat: refs #8151 Added test
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-13 14:04:02 +01:00
Guillermo Bonet 344427da45 feat: refs #8151 moveExpeditions
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-13 13:46:40 +01:00
Guillermo Bonet 72e067ff81 fix: refs #7244 Added collection ACL
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-13 12:53:18 +01:00
Guillermo Bonet 782563f67d Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-13 12:19:42 +01:00
Guillermo Bonet 5a134668da refactor: refs #7920 itemShelvingLog
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-13 12:04:47 +01:00
Guillermo Bonet 755312b981 refactor: refs #7920 Fix tests
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-13 11:51:23 +01:00
Guillermo Bonet 9d5ef3eeb0 Merge branch 'dev' into 7920-itemShelving
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-13 10:16:57 +00:00
Guillermo Bonet b3bf0024e3 refactor: refs #7920 Major changes
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-13 11:15:31 +01:00
Guillermo Bonet 2273dc636e refactor: refs #7920 Major changes
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-13 09:56:38 +01:00
Jorge Penadés 0a92fbbdbc Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7641-refactorEntryReport
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-13 09:53:35 +01:00
Guillermo Bonet 172b4d8e05 Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details
2024-11-13 09:40:30 +01:00
Jorge Penadés 5d908fd5f9 feat: refs #7641 improve style
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-13 09:33:28 +01:00
Jorge Penadés a91f952778 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7641-refactorEntryReport 2024-11-13 09:32:43 +01:00
Jorge Penadés 968e308ab6 Merge pull request 'feat: refs #6818 saysimple integration' (!3168) from 6818-saySimpleIntegration into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3168
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-11-13 08:25:20 +00:00
Jorge Penadés f52041eeff Merge branch 'dev' into 6818-saySimpleIntegration
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-13 08:22:40 +00:00
Guillermo Bonet 779a75cd78 refactor: refs #7920 Major changes
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-13 09:03:44 +01:00
Jon Elias dcae6dfbb4 Merge branch '6924-NotifyOnlyToBoss' of https://gitea.verdnatura.es/verdnatura/salix into 6924-NotifyOnlyToBoss
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-13 08:45:45 +01:00
Jon Elias ea4adbea85 refactor: refs #6924 deleted department check 2024-11-13 08:45:44 +01:00
Jon Elias 0f913d8975 Merge branch 'dev' into 6924-NotifyOnlyToBoss
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-13 06:51:32 +00:00
Guillermo Bonet c2381f0feb refactor: refs #7920 Main change
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-13 07:42:58 +01:00
Guillermo Bonet ab2e35b64c fix: refs #8153 Version
gitea/salix/pipeline/head This commit looks good Details
2024-11-13 07:12:49 +01:00
Guillermo Bonet 628b67e1e5 fix: refs #8153 Version
gitea/salix/pipeline/head There was a failure building this commit Details
2024-11-13 07:10:52 +01:00
Guillermo Bonet a426e9c7c6 Merge pull request 'refactor: refs #8153 Optimized order_getTax' (!3188) from 8153-order_getTaxOptimize into dev
gitea/salix/pipeline/head There was a failure building this commit Details
Reviewed-on: #3188
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-11-13 06:07:38 +00:00
Ivan Mas 870882cdc1 Merge branch 'dev' into 7690-renameConfigTables
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-12 16:27:19 +00:00
Ivan Mas 20bd426704 refactor: refs #7690 unify workerTimeControlParams with workerTimeControlConfig
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-12 17:25:05 +01:00
Carlos Andrés b8f2e0b906 feat: refs#8087 Redadas en travel
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-12 16:50:46 +01:00
Carlos Andrés 358ed2513d feat: refs#8087 Redadas en travel
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-12 16:26:30 +01:00
Carlos Andrés 69d6e4a104 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 8087-nuevosCamposTravel
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-12 16:24:05 +01:00
Jorge Penadés 9b971fc284 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7641-refactorEntryReport
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-12 15:27:29 +01:00
Guillermo Bonet 3c8ef7cdba refactor: refs #7950 Requested changes
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-12 14:54:11 +01:00
Guillermo Bonet 127c6fced0 refactor: refs #8153 Optimized order_getTax
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-12 13:25:51 +01:00
Guillermo Bonet 6427a90c44 Merge branch 'dev' into 7950-cmrModelUnify
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-12 12:25:11 +00:00
Guillermo Bonet 4891e98109 Merge pull request 'refactor: refs #7242 Deleted select column' (!3189) from 7242-unlocated into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3189
Reviewed-by: Sergio De la torre <sergiodt@verdnatura.es>
2024-11-12 12:18:36 +00:00
Guillermo Bonet 2ece748138 refactor: refs #7242 Deleted select column
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-12 13:13:13 +01:00
Guillermo Bonet a67ea6b15f Merge pull request 'refactor: refs #7715 Deleted hasNewLabelMrwMethod column' (!3184) from 7715-byeMrwOld into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3184
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-11-12 12:09:54 +00:00
Guillermo Bonet f45460b0e1 Merge branch 'dev' into 8153-order_getTaxOptimize
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-12 12:04:59 +00:00
Guillermo Bonet d52f537f0c refactor: refs #8153 Optimized order_getTax
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-12 13:04:23 +01:00
Pako Natek 2d70e95996 Merge pull request 'fix: more data for fixture.before' (!3181) from fixturesLocal into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3181
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-11-12 11:29:02 +00:00
Pako Natek a9def89e01 Merge branch 'dev' into fixturesLocal
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-12 11:27:35 +00:00
Sergio De la torre b532691043 Merge pull request 'feat: refs #8150 movExpeditions' (!3167) from 8150-moveExpeditionsApp into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3167
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-11-12 11:02:58 +00:00
Guillermo Bonet dd3a854ec5 Merge pull request 'feat: refs #8080 Added column comment' (!3185) from 8080-duaComment into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3185
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-11-12 10:48:17 +00:00
Guillermo Bonet aec4d0b1a4 Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details
2024-11-12 11:28:32 +01:00
Guillermo Bonet f989b72fab feat: refs #8080 Added column comment
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-12 10:18:00 +01:00
Guillermo Bonet a921e51023 refactor: refs #7715 Deleted hasNewLabelMrwMethod column
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-12 09:51:48 +01:00
Jorge Penadés 0f5ca107f0 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 6818-saySimpleIntegration
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-12 09:45:19 +01:00
Javi Gallego ea45d1da0a Merge branch 'dev' into 7821-entryIsBooked
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-12 09:30:40 +01:00
Alex Moreno d442593823 Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/pipeline/head This commit looks good Details
2024-11-12 08:49:17 +01:00
Pako Natek eb3d0e837f Merge branch 'dev' into fixturesLocal
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-12 07:29:08 +00:00
Pako Natek 76d072e00f fix: more data for fixture.before
gitea/salix/pipeline/pr-dev Build queued... Details
2024-11-12 08:28:26 +01:00
Guillermo Bonet 90e7ab1ec1 refactor: refs #7950 Created cmr model
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-12 08:25:23 +01:00
Guillermo Bonet 5bbcf5005f Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details
2024-11-12 08:04:30 +01:00
Pablo Natek 82bcb48101 Merge pull request 'test' (!3179) from test into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3179
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-12 06:37:16 +00:00
Jorge Penadés 186312702d Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 6818-saySimpleIntegration
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-11 16:41:37 +01:00
Jorge Penadés e38adf4296 fix: refs #7641 align columns
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-11 16:23:17 +01:00
Jorge Penadés 7c016da8f9 refactor: refs #7641 entry report style
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-11 16:16:42 +01:00
Carlos Andrés cf102699d5 feat: refs#8087 Redadas en travel
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-11 14:19:11 +01:00
Alex Moreno 180b0b5b3f Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/pipeline/head This commit looks good Details
2024-11-11 14:09:21 +01:00
Javi Gallego eaad989b3a fix: clean deletes also zoneEvent range records
gitea/salix/pipeline/head This commit looks good Details
2024-11-11 13:57:49 +01:00
Alex Moreno a79905f7c2 Merge pull request 'feat(Supplier): refs #6828 add companySize' (!3174) from 6828-supplier_companySize into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3174
Reviewed-by: Jorge Penadés <jorgep@verdnatura.es>
2024-11-11 12:48:08 +00:00
Alex Moreno 9f763ebae7 Merge branch 'dev' into 6828-supplier_companySize
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-11 12:41:43 +00:00
Jorge Penadés a41fc36f90 feat: refs #6869 define model
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-11 13:02:09 +01:00
Jorge Penadés e0ffc2840b Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 6869-createGetDetails 2024-11-11 12:49:10 +01:00
Guillermo Bonet 0dc77851c0 fix: refs #4948 Tests
gitea/salix/pipeline/head This commit looks good Details
2024-11-11 11:34:37 +01:00
Jon Elias bb7cecdcff Merge branch 'dev' into 6924-NotifyOnlyToBoss
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-11 10:01:09 +00:00
Jon Elias 1e8a7eff60 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 6924-NotifyOnlyToBoss 2024-11-11 10:52:46 +01:00
Jon Elias 25891e0bad feat: refs #6924 notify absences only to department boss
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-11 10:42:06 +01:00
Alex Moreno f7a29cd9c7 feat(Supplier): refs #6828 add companySize
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-11 10:32:17 +01:00
Jorge Penadés 5c054fe0d3 feat: refs #6869 add back
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-11 09:09:51 +01:00
Pablo Natek c4fc51f4b8 Merge branch 'dev' into 7743-simpleTestForSendMail
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-11 07:12:27 +00:00
Pablo Natek 50a73c98a2 feat: refs #7743 add try catch stmt to the test
gitea/salix/pipeline/pr-dev Build queued... Details
2024-11-11 08:12:07 +01:00
Pablo Natek d6349f113c feat: refs #7743 add simple spec for sendMail 2024-11-11 08:06:22 +01:00
Guillermo Bonet a254cb19cd feat: refs #4948 Added ticket_selfConsumptionPackaging
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-11-11 07:40:17 +01:00
Pablo Natek 0c20aea45f Merge branch 'dev' of https: refs #7457//gitea.verdnatura.es/verdnatura/salix into 7457-orderFilter
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-11 07:34:26 +01:00
Pablo Natek 39f7391abf Merge branch '7457-orderFilter' of https://gitea.verdnatura.es/verdnatura/salix into 7457-orderFilter 2024-11-11 07:27:51 +01:00
Pablo Natek fc61f7e4ab fix: refs #7457 remove group by calc time reduce bellow 1s 2024-11-11 07:27:50 +01:00
Jorge Penadés 6ef1f950d1 feat: refs #6818 add config table 2024-11-08 17:47:10 +01:00
Jorge Penadés 9b28cf9130 feat: refs #6818 add records
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-08 12:51:09 +01:00
Carlos Satorres 73efb8f1a8 Merge branch 'dev' into 7529-workerPIT
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-08 11:17:48 +00:00
Carlos Satorres fa108e2af0 fix: refs #7529 fix sql
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-08 11:56:17 +01:00
Jorge Penadés 6927f4b28d feat: refs #6818 saysimple integration
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-08 11:51:00 +01:00
Sergio De la torre fd36f7ecc3 feat: refs #8150 movExpeditions
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-08 10:44:01 +01:00
Javi Gallego dd7c967624 Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details
2024-11-07 14:49:26 +01:00
Carlos Satorres c5afde3334 Merge branch 'dev' of https: refs #7529//gitea.verdnatura.es/verdnatura/salix into 7529-workerPIT
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-07 12:48:05 +01:00
Sergio De la torre cab2b7c93c Merge pull request 'feat: refs #6845 userInterface' (!3161) from 6845-UserInterface into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3161
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-11-06 14:56:13 +00:00
Sergio De la torre 3b87cf0c69 Merge pull request 'feat: refs #7266 buyFkForPrint' (!3159) from 7266-ItemShelvingBuy into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3159
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-11-06 14:55:55 +00:00
Sergio De la torre c113d83797 feat: refs #6845 userInterface
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-05 16:42:51 +01:00
Alex Moreno c899727bfc Merge pull request 'refactor: refs #6920 add correct role' (!3160) from 6920-dms_invoiceIn into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3160
Reviewed-by: Jorge Penadés <jorgep@verdnatura.es>
2024-11-05 09:57:15 +00:00
Alex Moreno 85ded59cb3 refactor: refs #6920 add correct role
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-04 13:46:54 +01:00
Sergio De la torre 37548e5e64 feat: refs #7266 buyFkForPrint
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-04 08:59:10 +01:00
Sergio De la torre 4c0dec19d4 feat: refs #7266 buyFkForPrint
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-04 07:48:28 +01:00
Carlos Satorres e0e487859f fix: refs #7529 fix models
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-29 13:59:47 +01:00
Guillermo Bonet 6c40934f74 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/pipeline/head This commit looks good Details
2024-10-29 09:57:06 +01:00
Guillermo Bonet 17412c5b84 feat: refs #7266 Version 2024-10-29 09:57:04 +01:00
Javi Gallego cd3dd854ef feat: refs #7821 eslint newDate
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-10-29 09:26:20 +01:00
Carlos Satorres ca6d8a67cb Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7529-workerPIT 2024-10-29 08:32:44 +01:00
Carlos Satorres 6b10f60933 fix: refs #7529 mod model
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-29 08:03:18 +01:00
Robert Ferrús 5a9d254396 Merge pull request 'feat: refs #8071 travel_weeklyClone' (!3058) from 8071-travelWeeklyClone into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3058
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-10-29 06:48:05 +00:00
Robert Ferrús f699f64caa Merge branch 'dev' into 8071-travelWeeklyClone
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-29 06:45:57 +00:00
Sergio De la torre 6bf186ca66 Merge pull request 'feat: refs #7922 refs #792 scanOrder' (!3157) from 7922-scanOrder into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3157
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-10-29 06:45:11 +00:00
Sergio De la torre a8cc417fb4 Merge branch 'dev' into 7922-scanOrder
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-29 06:32:32 +00:00
Robert Ferrús 8ab6bc39cc Merge branch 'dev' into 8071-travelWeeklyClone
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-29 06:31:21 +00:00
Guillermo Bonet 2f0fa56040 feat: refs #7266 Version
gitea/salix/pipeline/head This commit looks good Details
2024-10-29 07:19:51 +01:00
Guillermo Bonet 6afb8fbeb5 Merge pull request 'feat: refs #7266 Added details and improvements in item label reports' (!3154) from 7266-itemQrBarcodeLabel into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3154
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-10-29 06:04:15 +00:00
Carlos Satorres 55a409c680 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7529-workerPIT 2024-10-29 06:13:12 +01:00
Carlos Andrés 66a5708efb Merge pull request 'feat: refs #8087 Traspasar redadas a travels' (!3147) from 8087-nuevoCampoTravel into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3147
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-10-28 14:41:01 +00:00
Guillermo Bonet bfc446ab79 feat: refs #7266 Requested changes and improvements
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-28 14:56:01 +01:00
Guillermo Bonet c8662a5051 Merge branch '7266-itemQrBarcodeLabel' of https://gitea.verdnatura.es/verdnatura/salix into 7266-itemQrBarcodeLabel
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-10-28 14:51:21 +01:00
Guillermo Bonet a37b7b71a8 feat: refs #7266 Requested changes and improvements 2024-10-28 14:51:19 +01:00
Javi Gallego a432133c18 Merge branch 'dev' into 7821-entryIsBooked 2024-10-28 14:46:31 +01:00
Robert Ferrús f05b6a46b0 feat: refs #8071 quitar esquema
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-28 14:36:10 +01:00
Robert Ferrús 994b562823 Merge branch 'dev' into 8071-travelWeeklyClone
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-28 13:34:54 +00:00
Carlos Andrés bffb13f94a feat: refs #8087 Traspasar redadas a travels
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-28 14:24:44 +01:00
Carlos Andrés 511c848342 feat: refs #8087 Traspasar redadas a travels
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-28 14:22:08 +01:00
Carlos Andrés 61026d2d34 feat: refs #8087 Traspasar redadas a travels
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-28 14:02:27 +01:00
Carlos Satorres 248ae64872 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7529-workerPIT
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-10-28 13:31:37 +01:00
Carlos Satorres b41e703a1b Merge pull request 'fix: refs #7283 item filters' (!3156) from 7283-fixItemFilters into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3156
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-10-28 12:27:59 +00:00
Carlos Satorres 385279b39d fix: refs #7283 tback
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-28 13:15:40 +01:00
Carlos Satorres 0180998683 fix: refs #7283 item filters
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-10-28 13:08:27 +01:00
Jon Elias 21ddd3fcd0 Merge pull request '#7193 Added scope in parking model' (!3153) from 7193-ParkingCreateScope into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3153
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-10-28 10:48:09 +00:00
Guillermo Bonet b899a7967f Merge branch 'dev' into 7266-itemQrBarcodeLabel
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-28 10:38:17 +00:00
Guillermo Bonet c43bdb5021 feat: refs #7266 Added details and improvements in item label reports
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-28 11:29:15 +01:00
Jon Elias b27aa1bd94 Merge branch 'dev' into 7193-ParkingCreateScope
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-28 09:52:17 +00:00
Sergio De la torre 3f04f3f24b Merge pull request 'feat: refs #7921 refs#7921 sendLostExpedition' (!3149) from 7921-sendExpeditionLost into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3149
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-10-28 09:42:21 +00:00
Jon Elias eb5f57285a feat: refs #7193 added scope in parking model
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-28 10:40:43 +01:00
Sergio De la torre 93feb74949 Merge branch 'dev' of https: refs #7921//gitea.verdnatura.es/verdnatura/salix into 7921-sendExpeditionLost
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-28 10:22:23 +01:00
Jorge Penadés 78edda56c7 Merge pull request 'feat: refs #7524 restrict fields' (!3151) from 7524-fixE2e into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3151
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-10-28 08:47:45 +00:00
Jorge Penadés b20ca1d8d7 Merge branch 'dev' into 7524-fixE2e
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-28 08:43:45 +00:00
Sergio De la torre 6efc2c340c feat: refs #7921 refs#7921 sendLostExpedition
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-10-28 08:57:22 +01:00
Carlos Satorres 2bd3f4514b Merge pull request 'fix: refs #6644 email and translations' (!3152) from 6644-modEmail into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3152
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-10-28 07:07:17 +00:00
Carlos Satorres c8101375a2 Merge branch 'dev' into 6644-modEmail
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-28 07:04:17 +00:00
Carlos Satorres 869c7ab598 fix: refs #6644 email and translations
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-28 07:37:42 +01:00
Guillermo Bonet 8c4d3bac0d Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details
2024-10-28 07:11:38 +01:00
Jorge Penadés d8e241740f feat: refs #7524 restrict fields
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-27 13:47:52 +01:00
Javi Gallego fa9451ea38 feat: refs #7821 isBooked with grants
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-25 16:15:13 +02:00
Carlos Andrés fb0764bc1f feat: refs #8087 Traspasar redadas a travels
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-25 14:34:51 +02:00
Guillermo Bonet 76a9db29c2 Merge pull request 'feat: refs #7006 itemTypeLog created' (!3093) from 7006-itemTypeLog into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3093
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-10-25 12:32:20 +00:00
Guillermo Bonet 14d6eb722e feat: refs #7006 Requested changes
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-25 14:24:26 +02:00
Guillermo Bonet 80764b6495 feat: refs #7006 itemTypeLog
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-25 14:17:57 +02:00
Sergio De la torre e775e56120 feat: refs #7921 refs#7921 sendLostExpedition
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-25 13:48:27 +02:00
Guillermo Bonet 956e89475e Merge branch 'dev' into 7006-itemTypeLog
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-25 11:06:55 +00:00
Jorge Penadés ab145be1aa Merge pull request 'feat: refs #7943 return only the required content' (!3148) from 7943-fixWorker into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3148
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-10-25 09:50:57 +00:00
Jorge Penadés 8f10260795 feat: refs #7943 return just the required content
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-25 11:37:45 +02:00
Sergio De la torre 11e13fdb20 feat: refs #7922 refs #792 scanOrder
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-25 06:40:06 +02:00
Carlos Andrés 4d3bc2c837 feat: refs #8087 Traspasar redadas a travels
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-10-24 19:32:02 +02:00
Carlos Satorres e498cbd060 Merge branch 'dev' into 7283-itemsMigration3
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-24 12:11:31 +00:00
Carlos Andrés 1bf900f81b feat: refs #8087 Traspasar redadas a travels
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-10-24 12:33:47 +02:00
Guillermo Bonet 8569bec34a feat: refs #7266 Minor change
gitea/salix/pipeline/head This commit looks good Details
2024-10-24 12:18:09 +02:00
Guillermo Bonet f6d818f58e Merge pull request 'feat: refs #7266 First commit' (!3129) from 7266-itemLabels into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3129
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-10-24 09:42:50 +00:00
Guillermo Bonet f97f1c2b9a Merge branch 'dev' into 7266-itemLabels
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-24 09:31:14 +00:00
Alex Moreno 7ae99fe6a1 Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/pipeline/head This commit looks good Details
2024-10-24 07:47:54 +02:00
Guillermo Bonet 4d96b1df68 Merge branch '7266-itemLabels' of https://gitea.verdnatura.es/verdnatura/salix into 7266-itemLabels
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-24 07:31:30 +02:00
Guillermo Bonet 4c529da620 feat: refs #7266 Requested changes and query optimization 2024-10-24 07:31:26 +02:00
Guillermo Bonet 4c9682e107 Merge branch 'dev' into 7266-itemLabels
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-24 05:16:16 +00:00
Pablo Natek 838dd9e1b4 Merge branch 'dev' into 7457-orderFilter
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-24 04:36:11 +00:00
Sergio De la torre 5a8f43d0ea Merge pull request 'feat: refs #8020 machineWorkerDeprecated' (!3141) from 8020-mahineWorkerDeprecated into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3141
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-10-23 12:14:36 +00:00
Guillermo Bonet db4b540958 Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details
2024-10-23 12:44:55 +02:00
Sergio De la torre 3da08e3a23 feat: refs #8020 machineWorkerDeprecated
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-23 11:33:45 +02:00
Carlos Satorres f552a3b7e1 Merge branch 'dev' of https: refs #7283//gitea.verdnatura.es/verdnatura/salix into 7283-itemsMigration3
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-23 09:51:38 +02:00
Guillermo Bonet b1a295dca4 feat: refs #7266 Print corrections
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-23 09:46:06 +02:00
Javi Gallego 2f5f4ecc7c Merge pull request 'feat: refs #7943 quitar lectura en metodos comunes' (!3136) from 7943-permisosWorker into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3136
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-10-23 05:53:03 +00:00
Carlos Satorres 72662b3112 Merge branch 'dev' of https: refs #7283//gitea.verdnatura.es/verdnatura/salix into 7283-itemsMigration3
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-23 07:50:40 +02:00
Javi Gallego 62f9f31279 feat: refs #7943 usa back con permisos
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-23 07:44:41 +02:00
Guillermo Bonet 30c1a57b68 Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details
2024-10-23 07:19:07 +02:00
Alex Moreno b4e1b015de Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/pipeline/head This commit looks good Details
2024-10-22 15:08:29 +02:00
Jorge Penadés 13a30783d9 Merge pull request 'feat: refs #8083 add prop' (!3115) from 8083-changeState into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3115
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-10-22 12:47:51 +00:00
Jorge Penadés e772776028 Merge branch 'dev' into 8083-changeState
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-22 12:45:56 +00:00
Guillermo Bonet c3f8da52c6 feat: refs #7266 Item label barcode
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-22 13:43:54 +02:00
Guillermo Bonet 0af58b20be feat: refs #7266 Item label QR finished
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-22 12:02:04 +02:00
Guillermo Bonet bf2d7541a5 feat: refs #7266 Item label QR
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-21 14:57:55 +02:00
Javi Gallego 2b05e8c48e feat: refs #7943 quitar lectura en metodos comunes
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-21 13:29:33 +02:00
Alex Moreno 15a8a70201 Merge branch 'dev' into 8083-changeState
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-21 10:11:56 +00:00
Jorge Penadés 28db5f221b Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 8083-changeState
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-18 16:38:20 +02:00
Carlos Satorres 903d85a243 fix: refs #7529 fix back
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-18 14:06:39 +02:00
Guillermo Bonet 34deba406b feat: refs #7266 First commit
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-18 12:59:52 +02:00
Carlos Satorres 0a726a8fe7 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7529-workerPIT
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-18 11:16:06 +02:00
Robert Ferrús 7e0f19b368 feat: refs #8127 entry_getCommission
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-10-18 08:21:09 +02:00
Pablo Natek 78ee7e141d fix: refs #7457 remove translate and use param definition for restriction
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-17 08:40:25 +02:00
Pablo Natek a35c10adab fix: refs #7457 error on empty from param and add translate
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-10-17 08:35:24 +02:00
Pablo Natek 3ce8d21ed3 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7457-orderFilter
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-10-17 08:19:06 +02:00
Jorge Penadés de0fe37ffe feat: refs #8083 add prop
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-16 16:16:51 +02:00
Carlos Satorres 67714f2dff Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7283-itemsMigration3
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-16 13:59:04 +02:00
Guillermo Bonet 6c62172633 feat: refs #7006 itemTypeLog created
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-14 09:31:35 +02:00
Guillermo Bonet 78a9b788bf feat: refs #7006 itemTypeLog created
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-14 08:42:54 +02:00
Carlos Satorres 60375d153f Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7529-workerPIT
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-10-03 13:02:07 +02:00
Robert Ferrús 06296e7bd5 feat: refs #8071 travel_weeklyClone
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-02 13:39:10 +02:00
Carlos Satorres 7c3d02817e fix: refs #7283 remove tests
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-02 11:59:55 +02:00
Carlos Satorres f786996e2c Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7283-itemsMigration3
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-02 10:50:11 +02:00
Carlos Satorres 1927a914e6 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7283-itemsMigration3
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-10-01 06:30:02 +02:00
Carlos Satorres 355ce46393 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7529-workerPIT
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-19 08:54:53 +02:00
Carlos Satorres 2af4d86c28 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7283-itemsMigration3
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-18 13:32:02 +02:00
Carlos Satorres 5da6c09f68 fix: refs #7529 workerPit
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-18 12:08:49 +02:00
Carlos Satorres c0ee82fd4f Merge branch 'dev' of https: refs #7529//gitea.verdnatura.es/verdnatura/salix into 7529-workerPIT
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-18 07:56:03 +02:00
Carlos Satorres 727c18d6ec Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7283-itemsMigration3 2024-09-17 11:11:51 +02:00
Carlos Satorres 392012ef60 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7283-itemsMigration3
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-16 09:28:45 +02:00
Carlos Satorres 26b28eeb0a Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7283-itemsMigration3 2024-09-13 13:49:57 +02:00
Carlos Satorres 5085921c21 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7283-itemsMigration3
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-12 07:44:50 +02:00
Carlos Satorres 155597bf85 fix: refs #7283 remove
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-02 13:36:03 +02:00
Carlos Satorres 1a01b3e587 refs #7529 back models acls
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-06-10 10:42:52 +02:00
Guillermo Bonet 33f1ed360b refactor: refs #7457 Added from param if not exists
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-23 12:16:12 +02:00
282 changed files with 4851 additions and 3688 deletions

View File

@ -36,3 +36,7 @@ rules:
jasmine/no-focused-tests: 0
jasmine/prefer-toHaveBeenCalledWith: 0
arrow-spacing: ["error", { "before": true, "after": true }]
no-restricted-syntax:
- "error"
- selector: "NewExpression[callee.name='Date']"
message: "Use Date.vnNew() instead of new Date()."

View File

@ -73,7 +73,7 @@ module.exports = Self => {
JOIN item i ON i.id = s.itemFk
JOIN itemShelvingSale iss ON iss.saleFk = s.id
LEFT JOIN itemShelving ish ON ish.id = iss.itemShelvingFk
LEFT JOIN shelving sh ON sh.code = ish.shelvingFk
LEFT JOIN shelving sh ON sh.id = ish.shelvingFk
LEFT JOIN parking p ON p.id = sh.parkingFk
LEFT JOIN itemColor ic ON ic.itemFk = s.itemFk
LEFT JOIN origin o ON o.id = i.originFk
@ -114,7 +114,7 @@ module.exports = Self => {
JOIN item i ON i.id = s.itemFk
JOIN itemShelvingSale iss ON iss.saleFk = s.id
LEFT JOIN itemShelving ish ON ish.id = iss.itemShelvingFk
LEFT JOIN shelving sh ON sh.code = ish.shelvingFk
LEFT JOIN shelving sh ON sh.id = ish.shelvingFk
LEFT JOIN parking p ON p.id = sh.parkingFk
LEFT JOIN itemColor ic ON ic.itemFk = s.itemFk
LEFT JOIN origin o ON o.id = i.originFk

View File

@ -28,9 +28,10 @@ describe('ticket assign()', () => {
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 {
await models.Collection.assign(ctx, options);
fail('Expected an error to be thrown, but none was thrown.');
} catch (e) {
expect(e.message).toEqual('There are not picking tickets');
}

View File

@ -1,132 +0,0 @@
const {models} = require('vn-loopback/server/server');
describe('machineWorker updateInTime()', () => {
const itBoss = 104;
const davidCharles = 1106;
beforeAll(async() => {
ctx = {
req: {
accessToken: {},
headers: {origin: 'http://localhost'},
__: value => value
}
};
});
it('should throw an error if the plate does not exist', async() => {
const tx = await models.MachineWorker.beginTransaction({});
const options = {transaction: tx};
const plate = 'RE-123';
ctx.req.accessToken.userId = 1106;
try {
await models.MachineWorker.updateInTime(ctx, plate, options);
await tx.rollback();
} catch (e) {
const error = e;
expect(error.message).toContain('the plate does not exist');
await tx.rollback();
}
});
it('should grab a machine where is not in use', async() => {
const tx = await models.MachineWorker.beginTransaction({});
const options = {transaction: tx};
const plate = 'RE-003';
ctx.req.accessToken.userId = 1107;
try {
const totalBefore = await models.MachineWorker.find(null, options);
await models.MachineWorker.updateInTime(ctx, plate, options);
const totalAfter = await models.MachineWorker.find(null, options);
expect(totalAfter.length).toEqual(totalBefore.length + 1);
await tx.rollback();
} catch (e) {
await tx.rollback();
}
});
describe('less than 12h', () => {
const plate = 'RE-001';
it('should trow an error if it is not himself', async() => {
const tx = await models.MachineWorker.beginTransaction({});
const options = {transaction: tx};
ctx.req.accessToken.userId = davidCharles;
try {
await models.MachineWorker.updateInTime(ctx, plate, options);
await tx.rollback();
} catch (e) {
const error = e;
expect(error.message).toContain('This machine is already in use');
await tx.rollback();
}
});
it('should throw an error if it is himself with a different machine', async() => {
const tx = await models.MachineWorker.beginTransaction({});
const options = {transaction: tx};
ctx.req.accessToken.userId = itBoss;
const plate = 'RE-003';
try {
await models.MachineWorker.updateInTime(ctx, plate, options);
await tx.rollback();
} catch (e) {
const error = e;
expect(error.message).toEqual('You are already using a machine');
await tx.rollback();
}
});
it('should set the out time if it is himself', async() => {
const tx = await models.MachineWorker.beginTransaction({});
const options = {transaction: tx};
ctx.req.accessToken.userId = itBoss;
try {
const isNotParked = await models.MachineWorker.findOne({
where: {workerFk: itBoss}
}, options);
await models.MachineWorker.updateInTime(ctx, plate, options);
const isParked = await models.MachineWorker.findOne({
where: {workerFk: itBoss}
}, options);
expect(isNotParked.outTime).toBeNull();
expect(isParked.outTime).toBeDefined();
await tx.rollback();
} catch (e) {
await tx.rollback();
}
});
});
describe('equal or more than 12h', () => {
const plate = 'RE-002';
it('should set the out time and grab the machine', async() => {
const tx = await models.MachineWorker.beginTransaction({});
const options = {transaction: tx};
ctx.req.accessToken.userId = davidCharles;
const filter = {
where: {workerFk: davidCharles, machineFk: 2}
};
try {
const isNotParked = await models.MachineWorker.findOne(filter, options);
const totalBefore = await models.MachineWorker.find(null, options);
await models.MachineWorker.updateInTime(ctx, plate, options);
const isParked = await models.MachineWorker.findOne(filter, options);
const totalAfter = await models.MachineWorker.find(null, options);
expect(isNotParked.outTime).toBeNull();
expect(isParked.outTime).toBeDefined();
expect(totalAfter.length).toEqual(totalBefore.length + 1);
await tx.rollback();
} catch (e) {
await tx.rollback();
}
});
});
});

View File

@ -1,77 +0,0 @@
const UserError = require('vn-loopback/util/user-error');
module.exports = Self => {
Self.remoteMethodCtx('updateInTime', {
description: 'Updates the corresponding registry if the worker has been registered in the last few hours',
accessType: 'WRITE',
accepts: [
{
arg: 'plate',
type: 'string',
}
],
http: {
path: `/updateInTime`,
verb: 'POST'
}
});
Self.updateInTime = async(ctx, plate, options) => {
const models = Self.app.models;
const userId = ctx.req.accessToken.userId;
const $t = ctx.req.__;
let tx;
const myOptions = {};
if (typeof options == 'object')
Object.assign(myOptions, options);
if (!myOptions.transaction) {
tx = await Self.beginTransaction({});
myOptions.transaction = tx;
}
try {
const machine = await models.Machine.findOne({
fields: ['id', 'plate'],
where: {plate}
}, myOptions);
if (!machine)
throw new UserError($t('the plate does not exist', {plate}));
const machineWorker = await Self.findOne({
where: {
or: [{machineFk: machine.id}, {workerFk: userId}],
outTime: null,
}
}, myOptions);
const {maxHours} = await models.MachineWorkerConfig.findOne({fields: ['maxHours']}, myOptions);
const hoursDifference = (Date.vnNow() - machineWorker?.inTime?.getTime() ?? 0) / (60 * 60 * 1000);
if (machineWorker) {
const isHimself = userId == machineWorker.workerFk;
const isSameMachine = machine.id == machineWorker.machineFk;
if (hoursDifference < maxHours && !isHimself)
throw new UserError($t('This machine is already in use.'));
if (hoursDifference < maxHours && isHimself && !isSameMachine)
throw new UserError($t('You are already using a machine'));
await machineWorker.updateAttributes({
outTime: Date.vnNew()
}, myOptions);
}
if (!machineWorker || hoursDifference >= maxHours)
await models.MachineWorker.create({machineFk: machine.id, workerFk: userId}, myOptions);
if (tx) await tx.commit();
} catch (e) {
if (tx) await tx.rollback();
throw e;
}
};
};

View File

@ -31,7 +31,7 @@ module.exports = Self => {
return await Self.rawSql(`
INSERT INTO workerActivity (workerFk, workerActivityTypeFk, model)
SELECT ?, ?, ?
FROM workerTimeControlParams wtcp
FROM workerTimeControlConfig wtcc
LEFT JOIN (
SELECT wa.workerFk,
wa.created,
@ -44,7 +44,7 @@ module.exports = Self => {
) sub ON TRUE
WHERE sub.workerFk IS NULL
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);
};
};

View File

@ -79,6 +79,9 @@
"ImageCollectionSize": {
"dataSource": "vn"
},
"ImageConfig": {
"dataSource": "vn"
},
"ImageContainer": {
"dataSource": "imageStorage"
},
@ -88,12 +91,6 @@
"Machine": {
"dataSource": "vn"
},
"MachineWorker": {
"dataSource": "vn"
},
"MachineWorkerConfig": {
"dataSource": "vn"
},
"MobileAppVersionControl": {
"dataSource": "vn"
},
@ -145,6 +142,12 @@
"StarredModule": {
"dataSource": "vn"
},
"SaySimpleCountry": {
"dataSource": "vn"
},
"SaySimpleConfig": {
"dataSource": "vn"
},
"TempContainer": {
"dataSource": "tempStorage"
},

View File

@ -44,6 +44,11 @@
"type": "belongsTo",
"model": "Continent",
"foreignKey": "continentFk"
},
"saySimpleCountry": {
"type": "hasOne",
"model": "SaySimpleCountry",
"foreignKey": "countryFk"
}
},
"acls": [
@ -54,4 +59,4 @@
"permission": "ALLOW"
}
]
}
}

View File

@ -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"
}
]
}

View File

@ -1,18 +0,0 @@
{
"name": "MachineWorkerConfig",
"base": "VnModel",
"options": {
"mysql": {
"table": "vn.machineWorkerConfig"
}
},
"properties": {
"id": {
"type": "number",
"id": true
},
"maxHours": {
"type": "number"
}
}
}

View File

@ -1,3 +0,0 @@
module.exports = Self => {
require('../methods/machine-worker/updateInTime')(Self);
};

View File

@ -1,33 +0,0 @@
{
"name": "MachineWorker",
"base": "VnModel",
"options": {
"mysql": {
"table": "vn.machineWorker"
}
},
"properties": {
"id": {
"type": "number",
"id": true
},
"workerFk": {
"type": "number"
},
"machineFk": {
"type": "number"
},
"inTime": {
"type": "date",
"mysql": {
"columnName": "inTimed"
}
},
"outTime": {
"type": "date",
"mysql": {
"columnName": "outTimed"
}
}
}
}

View File

@ -0,0 +1,29 @@
{
"name": "SaySimpleConfig",
"base": "VnModel",
"options": {
"mysql": {
"table": "saySimpleConfig"
}
},
"properties": {
"id": {
"type": "number",
"id": true
},
"url": {
"type": "string"
},
"defaultChannel": {
"type": "number"
}
},
"acls": [
{
"accessType": "READ",
"principalType": "ROLE",
"principalId": "$authenticated",
"permission": "ALLOW"
}
]
}

View File

@ -0,0 +1,26 @@
{
"name": "SaySimpleCountry",
"base": "VnModel",
"options": {
"mysql": {
"table": "saySimpleCountry"
}
},
"properties": {
"countryFk": {
"type": "number",
"id": true
},
"channel": {
"type": "number"
}
},
"acls": [
{
"accessType": "READ",
"principalType": "ROLE",
"principalId": "$authenticated",
"permission": "ALLOW"
}
]
}

View File

@ -1762,7 +1762,6 @@ INSERT INTO `ACL` VALUES (378,'OsTicket','osTicketReportEmail','WRITE','ALLOW','
INSERT INTO `ACL` VALUES (379,'Item','buyerWasteEmail','WRITE','ALLOW','ROLE','system',NULL);
INSERT INTO `ACL` VALUES (380,'Claim','claimPickupPdf','READ','ALLOW','ROLE','employee',NULL);
INSERT INTO `ACL` VALUES (381,'Claim','claimPickupEmail','WRITE','ALLOW','ROLE','claimManager',NULL);
INSERT INTO `ACL` VALUES (382,'Item','labelPdf','READ','ALLOW','ROLE','employee',NULL);
INSERT INTO `ACL` VALUES (383,'Sector','*','READ','ALLOW','ROLE','employee',NULL);
INSERT INTO `ACL` VALUES (384,'Sector','*','WRITE','ALLOW','ROLE','employee',NULL);
INSERT INTO `ACL` VALUES (385,'Route','driverRoutePdf','READ','ALLOW','ROLE','employee',NULL);
@ -2085,7 +2084,7 @@ INSERT INTO `ACL` VALUES (756,'Route','findOne','READ','ALLOW','ROLE','employee'
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 (759,'Route','cmr','READ','ALLOW','ROLE','employee',NULL);
INSERT INTO `ACL` VALUES (760,'Route','downloadCmrsZip','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 (762,'Route','filter','READ','ALLOW','ROLE','employee',NULL);
INSERT INTO `ACL` VALUES (763,'Route','getByWorker','READ','ALLOW','ROLE','employee',NULL);

File diff suppressed because it is too large Load Diff

View File

@ -400,11 +400,11 @@ INSERT INTO `vn`.`client`(`id`,`name`,`fi`,`socialName`,`contact`,`street`,`city
(1108, 'Charles Xavier', '22641921P', 'PROFESSOR X', 'Beast', '3800 VICTORY PKWY, CINCINNATI, OH 45207, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'CharlesXavier@mydomain.com', NULL, 0, 1234567890, 0, 5, 1, 300, 13, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, NULL, 0, 0, 19, 0, 'florist','normal'),
(1109, 'Bruce Banner', '16104829E', 'HULK', 'Black widow', 'SOMEWHERE IN NEW YORK', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceBanner@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 0, 0, NULL, 0, 0, 9, 0, 'florist','normal'),
(1110, 'Jessica Jones', '58282869H', 'JESSICA JONES', 'Luke Cage', 'NYCC 2015 POSTER', 'Gotham', 46460, 1111111111, 222222222, 1, 'JessicaJones@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, NULL, 0, 0, NULL, 1, 'florist','normal'),
(1111, 'Missing', NULL, 'MISSING MAN', 'Anton', 'THE SPACE, UNIVERSE FAR AWAY', 'Gotham', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 0, 1, 0, NULL, 1, 0, NULL, 0, 'others','loses'),
(1112, 'Trash', NULL, 'GARBAGE MAN', 'Unknown name', 'NEW YORK CITY, UNDERGROUND', 'Gotham', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 0, 1, 0, NULL, 1, 0, NULL, 0, 'others','loses');
(1111, 'Missing', NULL, 'MISSING MAN', 'Anton', 'THE SPACE, UNIVERSE FAR AWAY', 'Gotham', 46460, 1111111111, 222222222, 0, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 0, 1, 0, NULL, 1, 0, NULL, 0, 'others','loses'),
(1112, 'Trash', NULL, 'GARBAGE MAN', 'Unknown name', 'NEW YORK CITY, UNDERGROUND', 'Gotham', 46460, 1111111111, 222222222, 0, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 0, 1, 0, NULL, 1, 0, NULL, 0, 'others','loses');
INSERT INTO `vn`.`client`(`id`, `name`, `fi`, `socialName`, `contact`, `street`, `city`, `postcode`, `isRelevant`, `email`, `iban`,`dueDay`,`accountingAccount`, `isEqualizated`, `provinceFk`, `hasToInvoice`, `credit`, `countryFk`, `isActive`, `quality`, `payMethodFk`,`created`, `isTaxDataChecked`)
SELECT id, name, CONCAT(RPAD(CONCAT(id,9),8,id),'A'), UPPER(CONCAT(name, 'Social')), CONCAT(name, 'Contact'), UPPER(CONCAT(name, 'Street')), 'GOTHAM', 46460, 1, CONCAT(name,'@mydomain.com'), NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1
SELECT id, name, CONCAT(RPAD(CONCAT(id,9),8,id),'A'), UPPER(CONCAT(name, 'Social')), CONCAT(name, 'Contact'), UPPER(CONCAT(name, 'Street')), 'GOTHAM', 46460, 0, CONCAT(name,'@mydomain.com'), NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1
FROM `account`.`role` `r`
WHERE `r`.`hasLogin` = 1;
@ -1254,9 +1254,9 @@ INSERT INTO `vn`.`saleComponent`(`saleFk`, `componentFk`, `value`)
INSERT INTO `vn`.`itemShelving` (`itemFk`, `shelvingFk`, `visible`, `grouping`, `packing`,`buyFk`, `userFk`)
VALUES
(2, 'GVC', 1, 1, 1, 2,1106),
(4, 'HEJ', 1, 1, 1, NULL,1106),
(1, 'UXN', 2, 12, 12, NULL,1106);
(2, 11, 1, 1, 1, 2,1106),
(4, 12, 1, 1, 1, NULL,1106),
(1, 13, 2, 12, 12, NULL,1106);
INSERT INTO `vn`.`itemShelvingSale` (`itemShelvingFk`, `saleFk`, `quantity`, `created`, `userFk`)
VALUES
@ -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),
(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`)
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),
(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),
(3, util.VN_CURDATE(), util.VN_CURDATE(), 1, 2, 1, 0.00, 0.00, 'third travel', 1, 1, 3),
(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),
(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),
(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),
(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),
(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),
(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),
(11, util.VN_CURDATE() - INTERVAL 1 DAY , util.VN_CURDATE(), 6, 3, 0, 50.00, 500, 'eleventh travel', 1, 2, 4),
(12, util.VN_CURDATE() , util.VN_CURDATE() + INTERVAL 1 DAY, 6, 3, 0, 50.00, 500, 'eleventh travel', 1, 2, 4);
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, 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, FALSE, 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, 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, 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, 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, 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, FALSE, NULL),
(10, DATE_ADD(util.VN_CURDATE(), INTERVAL +5 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL +5 DAY), 5, 1, 1, 50.00, 500, 'nineth travel', 1, 2, 10, TRUE, 2),
(11, util.VN_CURDATE() - INTERVAL 1 DAY , util.VN_CURDATE(), 6, 3, 0, 50.00, 500, 'eleventh travel', 1, 2, 4, FALSE, NULL),
(12, util.VN_CURDATE() , util.VN_CURDATE() + INTERVAL 1 DAY, 6, 3, 0, 50.00, 500, 'eleventh travel', 1, 2, 4, FALSE, NULL);
INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `isConfirmed`, `companyFk`, `invoiceNumber`, `reference`, `isExcludedFromAvailable`, `isRaid`, `evaNotes`)
VALUES
(1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 1, 442, 'IN2001', 'Movement 1', 0, 0, ''),
(2, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 0, 442, 'IN2002', 'Movement 2', 0, 0, 'observation two'),
(3, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 3, 0, 442, 'IN2003', 'Movement 3', 0, 0, 'observation three'),
(4, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 0, 69, 'IN2004', 'Movement 4', 0, 0, 'observation four'),
(5, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 5, 0, 442, 'IN2005', 'Movement 5', 0, 0, 'observation five'),
(6, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 6, 0, 442, 'IN2006', 'Movement 6', 0, 0, 'observation six'),
(7, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 7, 0, 442, 'IN2007', 'Movement 7', 0, 0, 'observation seven'),
(8, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 7, 0, 442, 'IN2008', 'Movement 8', 1, 1, ''),
(9, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL +2 DAY), 10, 0, 442, 'IN2009', 'Movement 9', 1, 1, ''),
(10, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL +2 DAY), 10, 0, 442, 'IN2009', 'Movement 10', 1, 1, ''),
(99, 69, '2000-12-01 00:00:00.000', 11, 0, 442, 'IN2009', 'Movement 99', 0, 0, '');
INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `isConfirmed`, `companyFk`, `invoiceNumber`, `reference`, `isExcludedFromAvailable`, `evaNotes`, `typeFk`)
VALUES
(1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 1, 442, 'IN2001', 'Movement 1', 0, '', 'packaging'),
(2, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 0, 442, 'IN2002', 'Movement 2', 0, 'observation two', 'product'),
(3, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 3, 0, 442, 'IN2003', 'Movement 3', 0, 'observation three', 'product'),
(4, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 0, 69, 'IN2004', 'Movement 4', 0, 'observation four', 'product'),
(5, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 5, 0, 442, 'IN2005', 'Movement 5', 0, 'observation five', 'product'),
(6, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 6, 0, 442, 'IN2006', 'Movement 6', 0, 'observation six', 'product'),
(7, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 7, 0, 442, 'IN2007', 'Movement 7', 0, 'observation seven', 'product'),
(8, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 7, 0, 442, 'IN2008', 'Movement 8', 1, '', 'product'),
(9, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL +2 DAY), 10, 0, 442, 'IN2009', 'Movement 9', 1, '', 'product'),
(10, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL +2 DAY), 10, 0, 442, 'IN2009', 'Movement 10', 1, '', 'product'),
(99, 69, util.VN_CURDATE() - INTERVAL 1 MONTH, 11, 0, 442, 'IN2009', 'Movement 99', 0, '', 'product');
INSERT INTO `vn`.`entryConfig` (`defaultEntry`, `inventorySupplierFk`, `defaultSupplierFk`)
VALUES (2, 4, 1);
@ -2454,7 +2454,7 @@ INSERT INTO `vn`.`workerTimeControl`(`userFk`, `timed`, `manual`, `direction`, `
INSERT INTO `vn`.`dmsType`
(`id`, `name`, `readRoleFk`, `writeRoleFk`, `code`)
VALUES
(1, 'Facturas Recibidas', NULL, NULL, 'invoiceIn'),
(1, 'Facturas Recibidas', 1, 1, 'invoiceIn'),
(2, 'Doc oficial', NULL, NULL, 'officialDoc'),
(3, 'Laboral', 37, 37, 'hhrrData'),
(4, 'Albaranes recibidos', NULL, NULL, 'deliveryNote'),
@ -2476,7 +2476,8 @@ INSERT INTO `vn`.`dmsType`
(20, 'Reclamación', 1, 1, 'claim'),
(21, 'Entrada', 1, 1, 'entry'),
(22, 'Proveedor', 1, 1, 'supplier'),
(23, 'Termografos', 35, 35, 'thermograph');
(23, 'Termografos', 35, 35, 'thermograph'),
(24, 'Sello de calidad', 1, 1, 'qualitySeal');
INSERT INTO `vn`.`dms`(`id`, `dmsTypeFk`, `file`, `contentType`, `workerFk`, `warehouseFk`, `companyFk`, `hardCopyNumber`, `hasFile`, `reference`, `description`, `created`)
VALUES
@ -2520,10 +2521,6 @@ INSERT INTO `vn`.`queuePriority`(`id`, `priority`, `code`)
(2, 'Normal', 'normal'),
(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 INTO `vn`.`thermograph`(`id`, `model`)
@ -2842,12 +2839,6 @@ INSERT INTO `vn`.`machine` (`plate`, `maker`, `model`, `warehouseFk`, `departmen
('RE-001', 'STILL', 'LTX-20', 60, 23, 'ELECTRIC TOW', 'Drag cars', 2020, 103, 442),
('RE-002', 'STILL', 'LTX-20', 60, 23, 'ELECTRIC TOW', 'Drag cars', 2020, 103, 442);
INSERT INTO `vn`.`machineWorker` (`workerFk`, `machineFk`, `inTimed`, `outTimed`)
VALUES
(1106, 1, util.VN_CURDATE(), util.VN_CURDATE()),
(1106, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL +1 DAY)),
(1106, 2, util.VN_CURDATE(), NULL),
(1106, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL +1 DAY));
INSERT INTO `vn`.`zoneExclusion` (`id`, `zoneFk`, `dated`, `created`, `userFk`)
VALUES
@ -2960,9 +2951,9 @@ INSERT INTO `vn`.`routeConfig` (`id`, `defaultWorkCenterFk`)
VALUES
(1, 9);
INSERT INTO `vn`.`productionConfig` (`isPreviousPreparationRequired`, `ticketPrintedMax`, `ticketTrolleyMax`, `rookieDays`, `notBuyingMonths`, `id`, `isZoneClosedByExpeditionActivated`, `maxNotReadyCollections`, `minTicketsToCloseZone`, `movingTicketDelRoute`, `defaultZone`, `defautlAgencyMode`, `hasUniqueCollectionTime`, `maxCollectionWithoutUser`, `pendingCollectionsOrder`, `pendingCollectionsAge`, `backupPrinterNotificationDelay`)
INSERT INTO `vn`.`productionConfig` (`isPreviousPreparationRequired`, `ticketPrintedMax`, `ticketTrolleyMax`, `rookieDays`, `notBuyingMonths`, `id`, `isZoneClosedByExpeditionActivated`, `maxNotReadyCollections`, `minTicketsToCloseZone`, `movingTicketDelRoute`, `defaultZone`, `defautlAgencyMode`, `hasUniqueCollectionTime`, `maxCollectionWithoutUser`, `pendingCollectionsOrder`, `pendingCollectionsAge`, `backupPrinterNotificationDelay`, `clientSelfConsumptionFk`, `addressSelfConsumptionFk`)
VALUES
(0, 8, 80, 0, 0, 1, 0, 15, 25, -1, 697, 1328, 0, 1, 8, 6, 3600);
(0, 8, 80, 0, 0, 1, 0, 15, 25, -1, 697, 1328, 0, 1, 8, 6, 3600, 1112, 12);
INSERT INTO `vn`.`collection` (`id`, `created`, `workerFk`, `stateFk`, `itemPackingTypeFk`, `saleTotalCount`, `salePickedCount`, `trainFk`, `sectorFk`, `wagons`)
VALUES
@ -3430,7 +3421,7 @@ INSERT INTO vn.buy
INSERT INTO vn.itemShelving
SET id = 9931,
itemFk = 999993,
shelvingFk = 'NCC',
shelvingFk = 16,
visible = 10,
`grouping` = 5,
packing = 10;
@ -3757,7 +3748,7 @@ INSERT vn.sale
USE vn;
DELETE ish.* FROM vn.itemShelving ish
JOIN vn.shelving sh ON sh.code = ish.shelvingFk
JOIN vn.shelving sh ON sh.id = ish.shelvingFk
JOIN vn.parking p ON p.id = sh.parkingFk
JOIN vn.sector s ON s.id = p.sectorFk
JOIN vn.warehouse w ON w.id = s.warehouseFk
@ -3766,22 +3757,22 @@ DELETE ish.* FROM vn.itemShelving ish
INSERT INTO vn.itemShelving
(itemFk, shelvingFk, visible, created, `grouping`, packing, packagingFk, userFk, isChecked)
VALUES
(999991, 'NAA', 8, '2023-09-20', 1, 20, NULL, 103, NULL),
(999998, 'NAA', 80, '2023-09-20', 10, 30, NULL, 103, NULL),
(1000001, 'NAA', 6, '2023-09-20', 3, 50, NULL, 103, NULL),
(1000000, 'NBB', 50, '2023-09-18', 25, 500, NULL, 103, NULL),
(999993, 'NBB', 25, '2023-09-18', NULL, 10, NULL, 103, NULL),
(999999, 'NBB', 30, '2023-09-18', 10, 500, NULL, 103, NULL),
(999993, 'NCC', 25, '2023-09-20', 5, 10, NULL, 103, NULL),
(999997, 'NCC', 10, '2023-09-20', NULL, 100, NULL, 103, NULL),
(999999, 'NCC', 40, '2023-09-20', 10, 500, NULL, 103, NULL),
(999995, 'NDD', 10, '2023-09-19', NULL, 20, NULL, 103, NULL),
(999994, 'NDD', 48, '2023-09-19', 4, 20, NULL, 103, NULL),
(1000001, 'NEE', 6, '2023-09-21', 3, 50, NULL, 103, NULL),
(999992, 'NEE', 50, '2023-09-21', NULL, 1, NULL, 103, NULL),
(1000000, 'NEE', 25, '2023-09-21', 25, 500, NULL, 103, NULL),
(999996, 'PAA', 5, '2023-09-27', 1, 5, NULL, 103, NULL),
(999997, 'PCC', 10, '2023-09-27', 5, 100, NULL, 103, NULL);
(999991, 14, 8, '2023-09-20', 1, 20, NULL, 103, NULL),
(999998, 14, 80, '2023-09-20', 10, 30, NULL, 103, NULL),
(1000001, 14, 6, '2023-09-20', 3, 50, NULL, 103, NULL),
(1000000, 15, 50, '2023-09-18', 25, 500, NULL, 103, NULL),
(999993, 15, 25, '2023-09-18', NULL, 10, NULL, 103, NULL),
(999999, 15, 30, '2023-09-18', 10, 500, NULL, 103, NULL),
(999993, 16, 25, '2023-09-20', 5, 10, NULL, 103, NULL),
(999997, 16, 10, '2023-09-20', NULL, 100, NULL, 103, NULL),
(999999, 16, 40, '2023-09-20', 10, 500, NULL, 103, NULL),
(999995, 17, 10, '2023-09-19', NULL, 20, NULL, 103, NULL),
(999994, 17, 48, '2023-09-19', 4, 20, NULL, 103, NULL),
(1000001, 18, 6, '2023-09-21', 3, 50, NULL, 103, NULL),
(999992, 18, 50, '2023-09-21', NULL, 1, NULL, 103, NULL),
(1000000, 18, 25, '2023-09-21', 25, 500, NULL, 103, NULL),
(999996, 19, 5, '2023-09-27', 1, 5, NULL, 103, NULL),
(999997, 21, 10, '2023-09-27', 5, 100, NULL, 103, NULL);
-- Previous for Bolas de madera
INSERT IGNORE INTO vn.sectorCollection
@ -3831,8 +3822,6 @@ UPDATE vn.collection
UPDATE vn.sale
SET isPicked =FALSE;
INSERT INTO vn.machineWorkerConfig(id, maxHours)
VALUES(1, 12);
INSERT INTO vn.workerAppTester(workerFk) VALUES(66);
@ -3840,9 +3829,6 @@ INSERT INTO `vn`.`machine` (`plate`, `maker`, `model`, `warehouseFk`, `departmen
VALUES
('RE-003', 'IRON', 'JPH-24', 60, 23, 'ELECTRIC TOW', 'Drag cars', 2020, 103, 442);
INSERT INTO vn.machineWorker(workerFk,machineFk,inTimed) VALUES (104,1,'2001-01-01 10:00:00.00.000');
UPDATE vn.buy SET itemOriginalFk = 1 WHERE id = 1;
UPDATE vn.saleTracking SET stateFk = 26 WHERE id = 5;
@ -4018,4 +4004,32 @@ INSERT IGNORE INTO pbx.queueMember
UPDATE vn.department SET pbxQueue = '1000' WHERE name = "CAMARA";
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)
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),
(2, 0, 0, 450, 13000, 1, 0, 1, '01A', 1, 1, NULL, NULL, NULL, NULL, 0, 1, 1, NULL),
(3, 1400, 0, 450, 13000, 1, 0, 1, '01B', 1, 0, NULL, NULL, NULL, NULL, 0, 1, 1, NULL),
(4, 0, 500, 500, 13000, 1, 4, 1, '02A', 2, 1, NULL, NULL, NULL, NULL, 1, 4, 13, NULL),
(5, 1400, 500, 500, 13000, 1, 4, 1, '02B', 2, 1, NULL, NULL, NULL, NULL, 1, 4, 13, NULL),
(6, 0, 1000, 500, 13000, 1, 1, 1, '03A', 3, 0, NULL, NULL, NULL, NULL, 0, 1, 1, NULL),
(7, 1400, 1000, 500, 13000, 1, 1, 1, '03B', 3, 0, NULL, NULL, NULL, NULL, 0, 1, 1, NULL),
(8, 0, 1500, 500, 13000, 1, 0, 1, '04A', 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);
INSERT IGNORE INTO vn.saySimpleCountry (countryFk, channel)
VALUES (19, '1169'),
(8, '1183');
INSERT IGNORE INTO vn.saySimpleConfig (url, defaultChannel)
VALUES ('saysimle-url-mock', 1320);
INSERT INTO vn.workerIrpf (workerFk,spouseNif, geographicMobilityDate)
VALUES (1106,'26493101E','2019-09-20');

View File

@ -7,8 +7,7 @@ AS SELECT `u`.`id` AS `id`,
`u`.`email` AS `email`,
`u`.`nickname` AS `nickname`,
`u`.`lang` AS `lang`,
`u`.`role` AS `role`,
`u`.`recoverPass` AS `recoverPass`
`u`.`role` AS `role`
FROM `account`.`user` `u`
WHERE `u`.`name` = `myUser_getName`()
WITH CASCADED CHECK OPTION

View File

@ -32,7 +32,7 @@ BEGIN
CREATE OR REPLACE TEMPORARY TABLE tVisible
SELECT itemFk, SUM(visible) totalVisible
FROM vn.itemShelving ish
JOIN vn.shelving sh ON sh.code = ish.shelvingFk
JOIN vn.shelving sh ON sh.id = ish.shelvingFk
JOIN vn.parking p ON p.id = sh.parkingFk
JOIN vn.sector sc ON sc.id = p.sectorFk
WHERE sc.warehouseFk = vWarehouseFk

View File

@ -53,7 +53,7 @@ proc: BEGIN
WHERE t.landed BETWEEN vInventoryDate AND vStartDate
AND t.warehouseInFk = vWarehouse
AND s.name != 'INVENTARIO'
AND NOT e.isRaid
AND NOT t.isRaid
GROUP BY b.itemFk
) c
JOIN vn.item i ON i.id = c.itemFk

View File

@ -6,16 +6,16 @@ BEGIN
UPDATE vn.buy b
JOIN vn.entry e ON e.id = b.entryFk
JOIN vn.travel tr ON tr.id = e.travelFk
JOIN vn.agencyMode am ON am.id = tr.agencyModeFk
JOIN vn.travel tr ON tr.id = e.travelFk
JOIN vn.agencyMode am ON am.id = tr.agencyModeFk
JOIN vn.item i ON i.id = b.itemFk
JOIN edi.supplyResponse sr ON i.supplyResponseFk = sr.ID
SET b.quantity = NEW.NumberOfItemsPerCask * NEW.NumberOfUnits,
b.stickers = NEW.NumberOfUnits
WHERE i.supplyResponseFk = NEW.ID
AND am.name = 'LOGIFLORA'
AND e.isRaid
AND tr.isRaid
AND tr.landed >= util.VN_CURDATE();
END$$
DELIMITER ;

View File

@ -59,7 +59,7 @@ BEGIN
JOIN vn.travel t ON t.id = e.travelFk
WHERE t.landed BETWEEN vDateInv AND vDate
AND t.warehouseInFk = vWarehouse
AND NOT e.isRaid
AND NOT t.isRaid
UNION ALL
SELECT b.itemFk, -b.quantity
FROM vn.buy b
@ -67,7 +67,7 @@ BEGIN
JOIN vn.travel t ON t.id = e.travelFk
WHERE t.shipped BETWEEN vDateInv AND util.VN_CURDATE()
AND t.warehouseOutFk = vWarehouse
AND NOT e.isRaid
AND NOT t.isRaid
AND t.isDelivered
UNION ALL
SELECT m.itemFk, -m.quantity

View File

@ -9,45 +9,54 @@ BEGIN
* @param vOrder El identificador del pedido
* @return tmp.orderTax Bases imponibles, IVA y recargo de equivalencia
*/
-- No poner create or replace, ya que da problemas
DROP TEMPORARY TABLE IF EXISTS tmp.addressCompany;
CREATE TEMPORARY TABLE tmp.addressCompany
(INDEX (addressFk, companyFk))
ENGINE = MEMORY
SELECT DISTINCT o.address_id addressFk, o.company_id companyFk
FROM tmp.`order` tmpOrder
JOIN hedera.`order` o ON o.id = tmpOrder.orderFk;
JOIN `order` o ON o.id = tmpOrder.orderFk;
CALL vn.addressTaxArea;
CALL vn.addressTaxArea();
-- Calcula el IVA y el recargo desglosado.
DROP TEMPORARY TABLE IF EXISTS tmp.orderTax;
CREATE TEMPORARY TABLE tmp.orderTax
(INDEX (orderFk))
CREATE OR REPLACE TEMPORARY TABLE tmp.orderTax
(PRIMARY KEY (orderFk, code, rate))
ENGINE = MEMORY
SELECT o.id orderFk,
WITH orders AS (
SELECT tor.orderFk,
oro.amount * oro.price total,
s.countryFk,
ata.areaFk,
itc.taxClassFk
FROM hedera.orderRow oro
JOIN tmp.order tor ON tor.orderFk = oro.orderFk
JOIN hedera.`order` o ON o.id = tor.orderFk
JOIN vn.item i ON i.id = oro.itemFk
JOIN vn.`client` c ON c.id = o.customer_id
JOIN vn.supplier s ON s.id = o.company_id
JOIN tmp.addressTaxArea ata ON ata.addressFk = o.address_id
AND ata.companyFk = o.company_id
JOIN vn.itemTaxCountry itc ON itc.itemFk = i.id
AND itc.countryFk = s.countryFk
HAVING total
)
SELECT o.orderFk,
tc.code,
SUM(m.amount * m.price) taxableBase,
SUM(o.total) taxableBase,
pgc.rate
FROM tmp.`order` tmpOrder
JOIN `order` o ON o.id = tmpOrder.orderFk
JOIN orderRow m ON m.orderFk = o.id
JOIN vn.item i ON i.id = m.itemFk
JOIN vn.`client` c ON c.id = o.customer_id
JOIN vn.supplier s ON s.id = o.company_id
JOIN tmp.addressTaxArea ata
ON ata.addressFk = o.address_id AND ata.companyFk = o.company_id
JOIN vn.itemTaxCountry itc
ON itc.itemFk = i.id AND itc.countryFk = s.countryFk
JOIN vn.bookingPlanner bp
ON bp.countryFk = s.countryFk
AND bp.taxAreaFk = ata.areaFk
AND bp.taxClassFk = itc.taxClassFk
JOIN vn.pgc ON pgc.`code` = bp.pgcFk
FROM orders o
JOIN vn.bookingPlanner bp ON bp.countryFk = o.countryFk
AND bp.taxAreaFk = o.areaFk
AND bp.taxClassFk = o.taxClassFk
JOIN vn.pgc ON pgc.code = bp.pgcFk
JOIN vn.taxClass tc ON tc.id = bp.taxClassFk
GROUP BY tmpOrder.orderFk, pgc.`code`, pgc.rate
HAVING taxableBase != 0;
GROUP BY o.orderFk, pgc.code, pgc.rate
HAVING taxableBase
ORDER BY bp.priority;
-- No poner create or replace, ya que da problemas
DROP TEMPORARY TABLE IF EXISTS tmp.orderAmount;
CREATE TEMPORARY TABLE tmp.orderAmount
(INDEX (orderFk))

View File

@ -26,7 +26,7 @@ BEGIN
DECLARE vCursor CURSOR FOR
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,
it.transactionTypeSageFk,
it.taxTypeSageFk,
@ -39,7 +39,8 @@ BEGIN
JOIN TiposTransacciones tt ON tt.CodigoTransaccion = it.transactionTypeSageFk
LEFT JOIN vn.dua d ON d.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;

View File

@ -4,5 +4,8 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `salix`.`ACL_beforeInsert`
FOR EACH ROW
BEGIN
SET NEW.editorFk = account.myUser_getId();
IF NEW.`property` = '*' THEN
CALL util.throw('The property field cannot be *');
END IF;
END$$
DELIMITER ;

View File

@ -6,12 +6,11 @@ BEGIN
DROP TEMPORARY TABLE IF EXISTS tValues;
CREATE TEMPORARY TABLE tValues
ENGINE = MEMORY
SELECT
b.id buyFk,
SELECT b.id buyFk,
e.id entryFk,
t.id travelFk,
b.itemFk,
e.isRaid,
t.isRaid,
ADDTIME(t.shipped,
IFNULL(t.shipmentHour, '00:00:00')) shipped,
t.warehouseOutFk,
@ -50,7 +49,7 @@ BEGIN
itemFk,
TIMESTAMPADD(DAY, life, @dated),
quantity,
IF(isIn, isReceived, isDelivered) AND !isRaid
IF(isIn, isReceived, isDelivered) AND NOT isRaid
FROM tValues
WHERE isIn OR !lessThanInventory;
@ -65,7 +64,7 @@ BEGIN
itemFk,
created,
quantity,
IF(isIn, isDelivered, isReceived) AND !isRaid
IF(isIn, isDelivered, isReceived) AND NOT isRaid
FROM tValues
WHERE !isIn OR !lessThanInventory;

View File

@ -1,8 +0,0 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`raidUpdate`
ON SCHEDULE EVERY 1 DAY
STARTS '2017-12-29 00:05:00.000'
ON COMPLETION PRESERVE
ENABLE
DO CALL raidUpdate$$
DELIMITER ;

View File

@ -14,9 +14,12 @@ BEGIN
SELECT p.geoFk INTO vGeoFk
FROM address a
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
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;
RETURN vGeoFk;

View File

@ -0,0 +1,31 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`buy_getUltimate`(
vItemFk INT,
vWarehouseFk INT,
vDated DATE
)
RETURNS int(11)
DETERMINISTIC
BEGIN
/**
* Calcula las últimas compras realizadas hasta una fecha.
*
* @param vItemFk Id del artículo
* @param vWarehouseFk Id del almacén
* @param vDated Compras hasta fecha
* @return Id de compra
*/
DECLARE vBuyFk INT;
CALL buy_getUltimate(vItemFk, vWarehouseFk, vDated);
SELECT buyFk INTO vBuyFk
FROM tmp.buyUltimate;
DROP TEMPORARY TABLE IF EXISTS
tmp.buyUltimate,
tmp.buyUltimateFromInterval;
RETURN vBuyFk;
END$$
DELIMITER ;

View File

@ -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 ;

View File

@ -1,58 +1,51 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`entry_getCommission`(vTravelFk INT,
vCurrencyFk INT,
vSupplierFk INT
vCurrencyFk INT,
vSupplierFk INT
)
RETURNS int(11)
NOT DETERMINISTIC
READS SQL DATA
BEGIN
DECLARE vCommission INT;
DECLARE vCurrentCommission INT;
DECLARE vIsCurrencyUsd INT;
DECLARE vLastEntryFk INT;
SELECT count(*) INTO vIsCurrencyUsd
FROM currency c
WHERE c.code = 'USD' 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
DECLARE vCommission INT;
DECLARE vCurrentCommission INT;
DECLARE vIsNotEUR INT;
DECLARE vLastEntryFk INT;
SELECT count(*) INTO vIsNotEUR
FROM currency c
WHERE c.code <> 'EUR' AND id = vCurrencyFk;
IF vIsNotEUR THEN
SELECT ROUND(-100 * (1 - (1 / r.value))) INTO vCommission
FROM travel t
LEFT JOIN referenceCurrent r ON r.currencyFk = vCurrencyFk AND r.`dated` <= t.shipped
WHERE t.id = vTravelFk
ORDER BY r.`dated` DESC
LIMIT 1;
RETURN IFNULL(vCommission, 0);
END IF;
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;
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$$
DELIMITER ;

View File

@ -9,7 +9,7 @@ BEGIN
SELECT count(*) INTO vItemCount
FROM vn.sale s
JOIN vn.itemShelving ish ON ish.itemFk = s.itemFk
JOIN vn.shelving sh ON sh.code = ish.shelvingFk
JOIN vn.shelving sh ON sh.id = ish.shelvingFk
JOIN vn.parking p ON p.id = sh.parkingFk
WHERE s.ticketFk = vTicketFk
AND p.sectorFk = vSectorFk;

View File

@ -10,7 +10,7 @@ BEGIN
SELECT count(*) INTO vItemCount
FROM vn.sale s
JOIN vn.itemShelving ish ON ish.itemFk = s.itemFk
JOIN vn.shelving sh ON sh.code = ish.shelvingFk
JOIN vn.shelving sh ON sh.id = ish.shelvingFk
JOIN vn.parking p ON p.id = sh.parkingFk
WHERE s.ticketFk = vTicketFk
AND p.sectorFk = vSectorFk;

View File

@ -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 ;

View File

@ -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 ;

View File

@ -1,23 +0,0 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`workerMachinery_isRegistered`(vWorkerFk VARCHAR(10))
RETURNS tinyint(1)
NOT DETERMINISTIC
READS SQL DATA
BEGIN
/**
* Comprueba si existen registros en las últimas horas (maxHours de machineWorkerConfig) del trabajador vWorkerFk y si tiene a nulo la hora outTimed (indica la hora que deja el vehículo)
*
* @param vWorkerFk id del trabajador
* @return Devuelve TRUE/FALSE en caso de que haya o no registros
*/
IF (SELECT COUNT(*)
FROM machineWorker m
WHERE m.workerFk = vWorkerFk
AND m.inTimed >= TIMESTAMPADD(HOUR , -(SELECT maxHours from machineWorkerConfig), util.VN_NOW()) AND ISNULL(m.outTimed))
THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;
END$$
DELIMITER ;

View File

@ -39,7 +39,7 @@ BEGIN
AND vWarehouseFk IN (tr.warehouseInFk, 0)
AND b.itemFk = vItemFk
AND NOT e.isExcludedFromAvailable
AND NOT e.isRaid
AND NOT tr.isRaid
UNION ALL
SELECT tr.shipped,
NULL,
@ -58,7 +58,7 @@ BEGIN
AND s.id <> (SELECT supplierFk FROM inventoryConfig)
AND b.itemFk = vItemFk
AND NOT e.isExcludedFromAvailable
AND NOT e.isRaid
AND NOT tr.isRaid
UNION ALL
SELECT t.shipped,
NULL,
@ -81,7 +81,7 @@ BEGIN
FROM tHistoricalPast
WHERE `date` < vDate;
SELECT p1.*, NULL v_virtual
SELECT p1.*, NULL v_virtual
FROM (
SELECT vDate `date`,
vCalculatedInventory input,
@ -96,7 +96,7 @@ BEGIN
FROM tHistoricalPast
WHERE `date` >= vDate
) p1;
DROP TEMPORARY TABLE tHistoricalPast;
END$$
DELIMITER ;
DELIMITER ;

View File

@ -5,7 +5,7 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`available_traslate`(
vWarehouseShipment INT)
proc: BEGIN
/**
* Calcular la disponibilidad dependiendo del almacen
* Calcular la disponibilidad dependiendo del almacen
* de origen y destino según la fecha.
*
* @param vWarehouseLanding Almacén de llegada
@ -42,10 +42,10 @@ proc: BEGIN
WHERE t.landed BETWEEN vDatedInventory AND vDatedFrom
AND t.warehouseInFk = vWarehouseLanding
AND NOT e.isExcludedFromAvailable
AND NOT e.isRaid
AND NOT t.isRaid
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
-- que hace un replace de la anterior.
CALL buy_getUltimate (NULL, vWarehouseShipment, util.VN_CURDATE());
@ -57,7 +57,7 @@ proc: BEGIN
JOIN travel tr ON tr.id = e.travelFk
LEFT JOIN tItemRange i ON t.itemFk = i.itemFk
WHERE t.warehouseFk = vWarehouseShipment
AND NOT e.isRaid
AND NOT tr.isRaid
ON DUPLICATE KEY UPDATE tItemRange.dated = GREATEST(tItemRange.dated,
tr.landed);
@ -94,7 +94,7 @@ proc: BEGIN
JOIN tItemRangeLive ir ON ir.itemFk = b.itemFk
WHERE NOT e.isExcludedFromAvailable
AND b.quantity <> 0
AND NOT e.isRaid
AND NOT t.isRaid
AND t.warehouseInFk = vWarehouseLanding
AND t.landed >= vDatedFrom
AND (ir.dated IS NULL OR t.landed <= ir.dated)
@ -135,4 +135,4 @@ proc: BEGIN
DROP TEMPORARY TABLE tmp.itemList, tItemRange, tItemRangeLive;
END$$
DELIMITER ;
DELIMITER ;

View File

@ -1,7 +1,7 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`buy_getUltimate`(
vItemFk INT,
vWarehouseFk SMALLINT,
vWarehouseFk INT,
vDated DATE
)
BEGIN

View File

@ -56,7 +56,7 @@ BEGIN
AND ts.id IS NULL;
DELETE FROM claim WHERE ticketCreated < v4Years;
-- Robert ubicacion anterior de travelLog comentario para debug
DELETE FROM zoneEvent WHERE `type` = 'day' AND dated < v3Months;
DELETE FROM zoneEvent WHERE dated < v2Months OR ended < v2Months;
DELETE b FROM buy b
JOIN entryConfig e ON e.defaultEntry = b.entryFk
WHERE b.created < v2Months;

View File

@ -28,7 +28,7 @@ BEGIN
JOIN agencyMode am ON am.id = tr.agencyModeFk
WHERE NOT b.quantity
AND am.code = 'logiflora'
AND e.isRaid;
AND tr.daysInForward;
START TRANSACTION;

View File

@ -83,7 +83,7 @@ BEGIN
AND s.semaphore = 1
GROUP BY st.saleFk) st ON st.saleFk = ts.saleFk
JOIN itemShelving ish ON ish.itemFk = ts.itemFk
JOIN shelving sh ON sh.code = ish.shelvingFk
JOIN shelving sh ON sh.id = ish.shelvingFk
JOIN parking p ON p.id = sh.parkingFk
JOIN sector sc ON sc.id = p.sectorFk
JOIN sectorType st ON st.id = sc.typeFk

View File

@ -30,7 +30,9 @@ BEGIN
t.warehouseFk,
w.id salesPersonFk,
IFNULL(ob.description,'') observaciones,
cc.rgb
cc.rgb,
p.code parkingCode,
IF (ps.ticketFk, TRUE, FALSE) isAdvanced
FROM vn.ticket t
LEFT JOIN vn.ticketCollection tc ON t.id = tc.ticketFk
LEFT JOIN vn.collection c2 ON c2.id = tc.collectionFk
@ -42,7 +44,10 @@ BEGIN
LEFT JOIN vn.agencyMode am ON am.id = z.agencyModeFk
LEFT JOIN vn.client c ON c.id = t.clientFk
LEFT JOIN vn.worker w ON w.id = c.salesPersonFk
LEFT JOIN observation ob ON ob.ticketFk = t.id
LEFT JOIN observation ob ON ob.ticketFk = t.id
LEFT JOIN vn.ticketParking tp ON tp.ticketFk = t.id
LEFT JOIN vn.parking p ON tp.parkingFk = p.id
LEFT JOIN vn.packingSiteAdvanced ps ON ps.ticketFk = t.id
WHERE t.id = vParamFk
AND t.shipped >= vYesterday
UNION
@ -52,7 +57,9 @@ BEGIN
t.warehouseFk,
w.id salesPersonFk,
ob.description,
IF(NOT (vItemPackingTypeFk <=> 'V'), cc.rgb, NULL) `rgb`
IF(NOT (vItemPackingTypeFk <=> 'V'), cc.rgb, NULL) `rgb`,
p.code parkingCode,
IF (ps.ticketFk, TRUE, FALSE) isAdvanced
FROM vn.ticket t
JOIN vn.ticketCollection tc ON t.id = tc.ticketFk
LEFT JOIN vn.collection c2 ON c2.id = tc.collectionFk
@ -64,7 +71,10 @@ BEGIN
LEFT JOIN vn.agencyMode am ON am.id = z.agencyModeFk
LEFT JOIN vn.client c ON c.id = t.clientFk
LEFT JOIN vn.worker w ON w.id = c.salesPersonFk
LEFT JOIN observation ob ON ob.ticketFk = t.id
LEFT JOIN observation ob ON ob.ticketFk = t.id
LEFT JOIN vn.ticketParking tp ON tp.ticketFk = t.id
LEFT JOIN vn.parking p ON tp.parkingFk = p.id
LEFT JOIN vn.packingSiteAdvanced ps ON ps.ticketFk = t.id
WHERE tc.collectionFk = vParamFk
UNION
SELECT sg.ticketFk,
@ -73,7 +83,9 @@ BEGIN
t.warehouseFk,
c.salesPersonFk,
ob.description,
NULL `rgb`
NULL `rgb`,
p.code parkingCode,
IF (ps.ticketFk, TRUE, FALSE) isAdvanced
FROM vn.sectorCollection sc
JOIN vn.sectorCollectionSaleGroup ss ON ss.sectorCollectionFk = sc.id
JOIN vn.saleGroup sg ON sg.id = ss.saleGroupFk
@ -81,7 +93,10 @@ BEGIN
LEFT JOIN vn.zone z ON z.id = t.zoneFk
LEFT JOIN vn.agencyMode am ON am.id = z.agencyModeFk
LEFT JOIN observation ob ON ob.ticketFk = t.id
LEFT JOIN vn.client c ON c.id = t.clientFk
LEFT JOIN vn.client c ON c.id = t.clientFk
LEFT JOIN vn.ticketParking tp ON tp.ticketFk = t.id
LEFT JOIN vn.parking p ON tp.parkingFk = p.id
LEFT JOIN vn.packingSiteAdvanced ps ON ps.ticketFk = t.id
WHERE sc.id = vParamFk
AND t.shipped >= vYesterday
GROUP BY ticketFk;

View File

@ -17,7 +17,6 @@ BEGIN
supplierFk,
dated,
isExcludedFromAvailable,
isRaid,
commission,
currencyFk,
companyFk,
@ -28,7 +27,6 @@ BEGIN
supplierFk,
dated,
isExcludedFromAvailable,
isRaid,
commission,
currencyFk,
companyFk,

View File

@ -5,7 +5,7 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`entry_getTransfer`(
BEGIN
/**
* Retorna los artículos trasladables a partir de una entrada.
*
*
* @param vSelf Id de entrada
*/
DECLARE vDateShipped DATE;
@ -166,7 +166,7 @@ BEGIN
LEFT JOIN tmp.buyUltimateFromInterval bufi ON bufi.itemFk = i.id
LEFT JOIN buy b3 ON b3.id = bufi.buyFk
WHERE ic.display
AND NOT e.isRaid
AND NOT tr.isRaid
AND (ti.visible OR ti.available)
ORDER BY i.typeFk, i.name, i.id, i.size, i.category, o.name;

View File

@ -9,16 +9,18 @@ BEGIN
*
* @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
JOIN entryType et ON et.code = e.typeFk
WHERE NOT et.isInformal
AND e.id = vSelf;
LEFT JOIN entryType et ON et.code = e.typeFk
WHERE 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'));
END IF;
END$$
DELIMITER ;

View File

@ -1,10 +1,15 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`entry_splitByShelving`(vShelvingFk VARCHAR(3), vFromEntryFk INT, vToEntryFk INT)
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`entry_splitByShelving`(
vShelvingCode VARCHAR(10),
vFromEntryFk INT,
vToEntryFk INT
)
BEGIN
/**
* Divide las compras entre dos entradas de acuerdo con lo ubicado en una matr<EFBFBD>cula
* Divide las compras entre dos entradas de
* acuerdo con lo ubicado en una matricula.
*
* @param vShelvingFk Identificador de vn.shelving
* @param vShelvingCode Código de vn.shelving
* @param vFromEntryFk Entrada origen
* @param vToEntryFk Entrada destino
*/
@ -14,7 +19,7 @@ BEGIN
DECLARE vDone BOOLEAN DEFAULT FALSE;
DECLARE cur CURSOR FOR
SELECT bb.id buyFk,
SELECT bb.id buyFk,
LEAST(bb.stickers, FLOOR(ish.visible / ish.packing)) ishStickers,
bb.stickers buyStickers
FROM itemShelving ish
@ -23,7 +28,7 @@ BEGIN
WHERE b.entryFk = vFromEntryFk
ORDER BY b.stickers DESC
LIMIT 10000000000000000000) bb ON bb.itemFk = ish.itemFk
WHERE ish.shelvingFk = vShelvingFk COLLATE utf8_general_ci
WHERE ish.shelvingFk = vShelvingCode COLLATE utf8_general_ci
AND NOT ish.isSplit
GROUP BY ish.id;
@ -107,9 +112,10 @@ BEGIN
UPDATE buy SET printedStickers = vIshStickers WHERE id = LAST_INSERT_ID();
END IF;
UPDATE itemShelving
SET isSplit = TRUE
WHERE shelvingFk = vShelvingFk COLLATE utf8_general_ci;
UPDATE itemShelving ish
JOIN shelving sh ON sh.id = ish.shelvingFk
SET ish.isSplit = TRUE
WHERE sh.code = vShelvingCode COLLATE utf8_general_ci;
END LOOP;
CLOSE cur;
END$$

View File

@ -22,7 +22,7 @@ BEGIN
FROM vn.entry e
JOIN vn.travel t ON t.id = e.travelFk
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 NOT e.isBooked;
@ -33,7 +33,7 @@ BEGIN
SET e.commission = vComission;
SELECT `name` INTO vCurrencyName
FROM currency
FROM currency
WHERE id = vCurrency;
CALL entry_recalc();

View File

@ -16,7 +16,8 @@ BEGIN
a.nickname,
sub2.itemPackingTypeConcat,
est.code,
es.isScanned
es2.isScanned,
es2.scanOrder
FROM expedition e
JOIN ticket t ON t.id = e.ticketFk
JOIN ticketState ts ON ts.ticketFk = e.ticketFk
@ -38,6 +39,7 @@ BEGIN
SELECT MAX(id)
FROM expeditionState es
WHERE expeditionFk = e.id)
LEFT JOIN expeditionState es2 ON es2.id = es.id
WHERE t.routeFk = vRouteFk AND e.freightItemFk <> FALSE
ORDER BY r.created, t.priority DESC;
END$$

View File

@ -0,0 +1,93 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`expedition_selfConsumptionPackaging`(
vSelf INT,
vAction ENUM('add', 'remove')
)
BEGIN
/**
* Maneja el consumo de cajas para autoconsumo, permitiendo
* añadir o quitar cajas utilizadas según la acción indicada.
*
* @param vSelf Id de expedición
*/
DECLARE vClientFk INT;
DECLARE vAddressFk INT;
DECLARE vItemFk INT;
DECLARE vItemName VARCHAR(50);
DECLARE vWarehouseFk INT;
DECLARE vCreated DATE;
DECLARE vTicketFk INT;
DECLARE vSaleFk INT;
DECLARE vQuantity INT;
IF vAction NOT IN ('add', 'remove') THEN
CALL util.throw('Action not supported');
END IF;
SELECT pc.clientSelfConsumptionFk,
pc.addressSelfConsumptionFk,
i.id,
i.name,
t.warehouseFk,
e.created
INTO vClientFk,
vAddressFk,
vItemFk,
vItemName,
vWarehouseFk,
vCreated
FROM expedition e
JOIN packaging p ON p.id = e.packagingFk
JOIN item i ON i.id = p.itemFk
JOIN ticket t ON t.id = e.ticketFk
JOIN productionConfig pc
WHERE e.id = vSelf;
IF vClientFk IS NULL OR vAddressFk IS NULL THEN
CALL util.throw('Some config parameters are not set');
END IF;
SET vCreated = DATE(vCreated);
SELECT id INTO vTicketFk
FROM ticket
WHERE shipped BETWEEN vCreated AND util.dayEnd(vCreated)
AND clientFk = vClientFk
AND addressFk = vAddressFk
AND warehouseFk = vWarehouseFk;
IF vTicketFk IS NULL AND vAction = 'add' THEN
INSERT INTO ticket(clientFk, warehouseFk, shipped, nickname, addressFk)
VALUES (vClientFk, vWarehouseFk, vCreated, 'CAJAS AUTOCONSUMO', vAddressFk);
SET vTicketFk = LAST_INSERT_ID();
END IF;
SELECT id, quantity INTO vSaleFk, vQuantity
FROM sale
WHERE itemFk = vItemFk
AND ticketFk = vTicketFk
LIMIT 1;
IF vAction = 'add' THEN
IF vSaleFk IS NOT NULL THEN
UPDATE sale
SET quantity = quantity + 1
WHERE id = vSaleFk;
ELSE
INSERT INTO sale(itemFk, ticketFk, concept, quantity)
VALUES (vItemFk, vTicketFk, vItemName, 1);
END IF;
ELSE
IF vSaleFk IS NOT NULL THEN
IF vQuantity > 1 THEN
UPDATE sale
SET quantity = quantity - 1
WHERE id = vSaleFk;
ELSE
DELETE FROM sale WHERE id = vSaleFk;
END IF;
END IF;
END IF;
END$$
DELIMITER ;

View File

@ -137,7 +137,7 @@ BEGIN
JOIN travel tr ON tr.id = e.travelFk
WHERE tr.warehouseInFk = vWarehouseFk
AND tr.landed BETWEEN vDateLastInventory AND vDateYesterday
AND NOT isRaid
AND NOT tr.isRaid
GROUP BY b.itemFk;
-- Transfers
@ -150,7 +150,7 @@ BEGIN
JOIN travel tr ON tr.id = e.travelFk
WHERE tr.warehouseOutFk = vWarehouseFk
AND tr.shipped BETWEEN vDateLastInventory AND vDateYesterday
AND NOT isRaid
AND NOT tr.isRaid
GROUP BY b.itemFk
) sub
ON DUPLICATE KEY UPDATE quantity = IFNULL(quantity, 0) + sub.quantityOut;

View File

@ -219,7 +219,7 @@ BEGIN
) eWithheld ON TRUE
WHERE tii.taxTypeSageFk IS NOT NULL
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
INSERT INTO XDiario(
@ -284,7 +284,7 @@ BEGIN
AND NOT(tii.isVies
AND c.nontaxableTransactionTypeFk = tii.transactionTypeSageFk
AND tii.taxCode = 'nonTaxable')
GROUP BY tii.PorcentajeIva, tii.expenseFk;
GROUP BY tii.CuentaIvaRepercutido;
-- Actualización del registro original
UPDATE invoiceIn ii

View File

@ -1,5 +1,9 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyAiming`(vShelvingFk VARCHAR(10), quantity INT, vItemFk INT)
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyAiming`(
vShelvingCode VARCHAR(10),
vQuantity INT,
vItemFk INT
)
BEGIN
SELECT ish.itemFk,
@ -9,21 +13,21 @@ BEGIN
ish.itemShelvingFk,
ish.shelving,
ish.stock,
LEAST(ish.stock,quantity) as total,
LEAST(ish.stock,vQuantity) total,
CONCAT(
CAST(FLOOR(LEAST(ish.stock,quantity) / ish.packing) AS DECIMAL(10,0)),
CAST(FLOOR(LEAST(ish.stock, vQuantity) / ish.packing) AS DECIMAL(10,0)),
' x ',
ish.packing,
IF (
LEAST(ish.stock,quantity) MOD ish.packing,
CONCAT(' + ',CAST(LEAST(ish.stock,quantity) MOD ish.packing AS DECIMAL(10,0))),
LEAST(ish.stock, vQuantity) MOD ish.packing,
CONCAT(' + ',CAST(LEAST(ish.stock, vQuantity) MOD ish.packing AS DECIMAL(10,0))),
''
),
' = ',
LEAST(ish.stock,quantity)
) as proposal
FROM vn.itemShelvingPlacementSupplyStock ish
WHERE ish.shelving = vShelvingFk COLLATE utf8_general_ci
LEAST(ish.stock, vQuantity)
) proposal
FROM itemShelvingPlacementSupplyStock ish
WHERE ish.shelving = vShelvingCode COLLATE utf8_general_ci
AND ish.itemFk = vItemFk;
END$$

View File

@ -1,5 +1,7 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyGetOrder`(vSector INT )
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyGetOrder`(
vSectorFk INT
)
BEGIN
DECLARE vId INT;
@ -7,31 +9,35 @@ BEGIN
DECLARE vNextParkingFk INT;
SELECT sh.parkingFk INTO vLastParkingFk
FROM vn.itemShelvingPlacementSupply isps
JOIN vn.itemShelving ish ON ish.id = isps.itemShelvingFk
JOIN vn.shelving sh ON sh.code = ish.shelvingFk
FROM itemShelvingPlacementSupply isps
JOIN itemShelving ish ON ish.id = isps.itemShelvingFk
JOIN shelving sh ON sh.id = ish.shelvingFk
WHERE isps.userFk = getUser()
ORDER BY isps.created DESC
LIMIT 1;
SET vNextParkingFk = vn.itemShelvingPlacementSupply_ClosestGet(vLastParkingFk);
SET vNextParkingFk = itemShelvingPlacementSupply_ClosestGet(vLastParkingFk);
SELECT ipsl.id INTO vId
FROM vn.itemPlacementSupplyList ipsl
JOIN vn.itemShelvingPlacementSupplyStock ispss ON ispss.itemFk = ipsl.itemFk
FROM itemPlacementSupplyList ipsl
JOIN itemShelvingPlacementSupplyStock ispss ON ispss.itemFk = ipsl.itemFk
WHERE ipsl.saldo > 0
AND (ipsl.repoUserFk is NULL OR ipsl.repoUserFk = getUser())
AND ipsl.sectorFk = vSector
ORDER BY ipsl.repoUserFk DESC, ipsl.priority DESC, (ispss.parkingFk = vNextParkingFk) DESC, ispss.parking DESC, ipsl.created
AND ipsl.sectorFk = vSectorFk
ORDER BY ipsl.repoUserFk DESC,
ipsl.priority DESC,
(ispss.parkingFk = vNextParkingFk) DESC,
ispss.parking DESC,
ipsl.created
LIMIT 1;
UPDATE vn.itemPlacementSupply
UPDATE itemPlacementSupply
SET repoUserFk = getUser()
WHERE id = vId;
SELECT * FROM vn.itemPlacementSupplyList
SELECT * FROM itemPlacementSupplyList
WHERE id = vId
AND sectorFk = vSector;
AND sectorFk = vSectorFk;
END$$
DELIMITER ;

View File

@ -1,5 +1,8 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyStockGetTargetList`(vItemFk INT,vSectorFk INT)
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyStockGetTargetList`(
vItemFk INT,
vSectorFk INT
)
BEGIN
/**
* Devuelve la lista de ubicaciones para itemFk en ese sector. Se utiliza en la preparación previa.
@ -13,11 +16,11 @@ BEGIN
SUM(ish.visible) stockTotal,
ish.created,
p.pickingOrder
FROM vn.itemShelving ish
JOIN vn.shelving sh ON sh.code = ish.shelvingFk
JOIN vn.parking p ON p.id = sh.parkingFk
JOIN vn.sector sc ON sc.id = p.sectorFk
JOIN vn.warehouse w ON w.id = sc.warehouseFk
FROM itemShelving ish
JOIN shelving sh ON sh.id = ish.shelvingFk
JOIN parking p ON p.id = sh.parkingFk
JOIN sector sc ON sc.id = p.sectorFk
JOIN warehouse w ON w.id = sc.warehouseFk
WHERE ish.visible > 0
AND ish.itemFk = vItemFk
GROUP BY ish.id

View File

@ -1,14 +1,14 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingLog_get`(vShelvingFk VARCHAR(10) )
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingLog_get`(
vShelvingCode VARCHAR(10)
)
BEGIN
/**
* Devuelve el log de los item en cada carro
*
* @param vShelvingFk Matrícula del carro
* @param vShelvingCode Matrícula del carro
*
*/
SELECT isl.itemShelvingFk,
isl.created,
isl.accion,
@ -28,8 +28,9 @@ BEGIN
FROM item
JOIN itemShelvingLog isl ON item.id = isl.itemFk
JOIN worker ON isl.workerFk = worker.id
WHERE shelvingFk = vShelvingFk OR isl.itemFk = vShelvingFk
ORDER BY isl.created DESC;
JOIN shelving sh ON sh.id = isl.shelvingFk
WHERE sh.code = vShelvingCode COLLATE utf8mb3_unicode_ci
OR isl.itemFk = vShelvingCode -- ?? Respeto porque ya estaba
ORDER BY isl.created DESC;
END$$
DELIMITER ;

View File

@ -20,7 +20,7 @@ BEGIN
LEFT JOIN (
SELECT itemFk, sum(cast(visible / packing AS DECIMAL(10,0))) AS etiquetas
FROM itemShelving ish
JOIN shelving sh ON sh.code = ish.shelvingFk
JOIN shelving sh ON sh.id = ish.shelvingFk
LEFT JOIN parking pk ON pk.id = sh.parkingFk
WHERE ish.created BETWEEN vFromTimed AND vToTimed
GROUP BY itemFk

View File

@ -27,7 +27,7 @@ proc: BEGIN
ish.available
FROM sale s
JOIN itemShelving ish ON ish.itemFk = s.itemFk
JOIN shelving sh ON sh.code = ish.shelvingFk
JOIN shelving sh ON sh.id = ish.shelvingFk
JOIN parking p ON p.id = sh.parkingFk
JOIN sector sc ON sc.id = p.sectorFk
JOIN productionConfig pc
@ -61,7 +61,7 @@ proc: BEGIN
FROM sale s
LEFT JOIN itemShelvingSale iss ON iss.saleFk = s.id
LEFT JOIN itemShelving ish ON ish.id = iss.itemShelvingFk
LEFT JOIN shelving sh ON sh.code = ish.shelvingFk
LEFT JOIN shelving sh ON sh.id = ish.shelvingFk
LEFT JOIN parking p ON p.id = sh.parkingFk
WHERE s.id = vSaleFk;

View File

@ -48,7 +48,7 @@ BEGIN
iss.itemShelvingFk,
SUM(IFNULL(iss.quantity,0)),
IF(sgd.id, 'PREVIOUS_PREPARATION', 'PREPARED'),
ish.shelvingFk
sh.code
INTO vItemFk,
vSaleFk,
vItemShelvingFk,
@ -58,7 +58,8 @@ BEGIN
FROM itemShelvingSale iss
JOIN sale s ON s.id = iss.saleFk
JOIN itemShelving ish ON ish.id = iss.itemShelvingFk
LEFT JOIN vn.saleGroupDetail sgd ON sgd.saleFk = iss.saleFk
LEFT JOIN saleGroupDetail sgd ON sgd.saleFk = iss.saleFk
LEFT JOIN shelving sh ON sh.id = ish.shelvingFk
WHERE iss.id = vItemShelvingSaleFk
AND NOT iss.isPicked;

View File

@ -1,6 +1,6 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_add`(
vShelvingFk VARCHAR(8),
vShelvingCode VARCHAR(10),
vBarcode VARCHAR(22),
vQuantity INT,
vPackagingFk VARCHAR(10),
@ -12,7 +12,7 @@ BEGIN
/**
* Añade registro o lo actualiza si ya existe.
*
* @param vShelvingFk matrícula del carro
* @param vShelvingCode matrícula del carro
* @param vBarcode el id del registro
* @param vQuantity indica la cantidad del producto
* @param vPackagingFk el packaging del producto en itemShelving, NULL para coger el de la ultima compra
@ -23,10 +23,15 @@ BEGIN
**/
DECLARE vItemFk INT;
DECLARE vBuyFk INT;
DECLARE vShelvingFk INT;
SELECT id INTO vBuyFk
FROM buy WHERE id = vBarcode;
SELECT id INTO vShelvingFk
FROM shelving
WHERE code COLLATE utf8_unicode_ci = vShelvingCode;
SELECT barcodeToItem(vBarcode) INTO vItemFk;
IF vBuyFk IS NULL THEN
@ -40,7 +45,7 @@ BEGIN
END IF;
IF (SELECT COUNT(*) FROM itemShelving
WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk
WHERE shelvingFk = vShelvingFk
AND itemFk = vItemFk
AND packing = vPacking
AND buyFk = vBuyFk) THEN
@ -48,7 +53,9 @@ BEGIN
UPDATE itemShelving
SET visible = visible + vQuantity,
available = available + vQuantity
WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk AND itemFk = vItemFk AND packing = vPacking;
WHERE shelvingFk = vShelvingFk
AND itemFk = vItemFk
AND packing = vPacking;
ELSE

View File

@ -1,29 +1,38 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_addByClaim`(vClaimFk INT, vShelvingFk VARCHAR(3))
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_addByClaim`(
vClaimFk INT,
vShelvingCode VARCHAR(10)
)
BEGIN
/**
* Insert items of claim into itemShelving.
*
* @param vClaimFk The claim
* @param vShelvingFk The shelving
* @param vShelvingCode The shelving code
* @table tmp.buyUltimate
*/
DECLARE vWarehouseFk INT;
DECLARE vShelvingFk INT;
SELECT t.warehouseFk INTO vWarehouseFk
FROM claim c
JOIN ticket t ON t.id = c.ticketFk
WHERE c.id = vClaimFk;
SELECT id INTO vShelvingFk
FROM shelving
WHERE code COLLATE utf8_unicode_ci = vShelvingCode;
CALL buy_getUltimate(NULL, vWarehouseFk, util.VN_CURDATE());
INSERT INTO itemShelving (itemFk, shelvingFk, packing, `grouping`, visible)
SELECT s.itemFk, vShelvingFk, b.packing, b.`grouping`, cb.quantity AS visible
SELECT s.itemFk, vShelvingFk, b.packing, b.`grouping`, cb.quantity visible
FROM claim c
JOIN claimBeginning cb ON c.id = cb.claimFk
JOIN sale s ON s.id = cb.saleFk
JOIN ticket t ON t.id = s.ticketFk
JOIN tmp.buyUltimate bu ON bu.itemFk = s.itemFk AND bu.warehouseFk = t.warehouseFk
JOIN tmp.buyUltimate bu ON bu.itemFk = s.itemFk
AND bu.warehouseFk = t.warehouseFk
JOIN buy b ON b.id = bu.buyFk
WHERE c.id = vClaimFk;
END$$

View File

@ -1,6 +1,6 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_addList`(
vShelvingFk VARCHAR(3),
vShelvingCode VARCHAR(10),
vList TEXT,
vIsChecking BOOL,
vWarehouseFk INT
@ -13,7 +13,7 @@ BEGIN
* Cuando es TRUE sólo inserta los elementos de la colección que no están ya en
* ese shelving, actualizando los valores del campo itemShelving.isChecked
*
* @param vShelvingFk Identificador de shelving
* @param vShelvingCode Código de shelving
* @param vList JSON array con esta estructura: '[value1, value2, ...]'
* @param vIsChecking Define si hay que añadir o comprobar los items
* @param vWarehouseFk Identificador de warehouse
@ -24,6 +24,11 @@ BEGIN
DECLARE vPath VARCHAR(6);
DECLARE vItemFk INT;
DECLARE vIsChecked BOOL;
DECLARE vShelvingFk INT;
SELECT id INTO vShelvingFk
FROM shelving
WHERE code COLLATE utf8_unicode_ci = vShelvingCode;
WHILE vCounter < vListLength DO
SET vPath = CONCAT('$[', vCounter, ']');
@ -34,17 +39,17 @@ BEGIN
SELECT IF(COUNT(*), TRUE, FALSE) INTO vIsChecked
FROM itemShelving
WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk
WHERE shelvingFk = vShelvingFk
AND itemFk = vItemFk;
END IF;
IF NOT vIsChecking OR NOT vIsChecked THEN
CALL itemShelving_add(vShelvingFk, vBarcode, 1, NULL, NULL, NULL, vWarehouseFk);
CALL itemShelving_add(vShelvingCode, vBarcode, 1, NULL, NULL, NULL, vWarehouseFk);
END IF;
UPDATE itemShelving
SET isChecked = vIsChecked
WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk
WHERE shelvingFk = vShelvingFk
AND itemFk = vItemFk
AND isChecked IS NULL;

View File

@ -1,15 +1,18 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_get`(IN vSelf VARCHAR(8))
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_get`(
vShelvingCode VARCHAR(10)
)
BEGIN
/**
* Lista artículos de itemshelving
* Lista artículos de itemShelving.
*
* @param vSelf matrícula del carro
* @param vShelvingCode Matrícula del carro
**/
SELECT ish.itemFk item,
IFNULL(i.longName, CONCAT(i.name, ' ', i.size)) description,
i.name,
i.longName,
i.size,
ish.visible,
CEIL(ish.visible/ish.packing) stickers,
ish.packing,
ish.grouping,
p.code,
@ -17,12 +20,14 @@ BEGIN
s.priority,
ish.isChecked,
ic.url,
ish.available
ish.available,
ish.buyFk,
ish.shelvingFk
FROM itemShelving ish
JOIN item i ON i.id = ish.itemFk
JOIN shelving s ON vSelf = s.code COLLATE utf8_unicode_ci
LEFT JOIN parking p ON s.parkingFk = p.id
JOIN shelving s ON s.id = ish.shelvingFk
LEFT JOIN parking p ON p.id = s.parkingFk
JOIN hedera.imageConfig ic
WHERE ish.shelvingFk COLLATE utf8_unicode_ci = vSelf;
WHERE s.code COLLATE utf8_unicode_ci = vShelvingCode;
END$$
DELIMITER ;

View File

@ -1,21 +1,31 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_getAlternatives`(vShelvingFk VARCHAR(10))
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_getAlternatives`(
vShelvingCode VARCHAR(10)
)
BEGIN
/**
* Devuelve un listado de posibles ubicaciones alternativas a ubicar los item de la matricula
* del carro que se le ha pasado.
* Devuelve un listado de posibles ubicaciones alternativas a ubicar
* los item de la matricula del carro que se le ha pasado.
*
* @param vShelvingFk matricula del carro
* @param vShelvingCode Matricula del carro
*/
SELECT is2.id,is2.shelvingFk , p.code, is2.itemFk , is2.visible, p.pickingOrder
DECLARE vShelvingFk INT;
SELECT id INTO vShelvingFk
FROM shelving
WHERE code COLLATE utf8_unicode_ci = vShelvingCode;
SELECT is2.id,is2.shelvingFk, p.code, is2.itemFk , is2.visible, p.pickingOrder
FROM itemShelving is2
JOIN shelving sh ON sh.code = is2.shelvingFk
JOIN shelving sh ON sh.id = is2.shelvingFk
JOIN parking p ON p.id = sh.parkingFk
JOIN sector s ON s.id = p.sectorFk
LEFT JOIN operator o ON o.sectorFk = s.id AND o.workerFk = account.myUser_getId()
LEFT JOIN operator o ON o.sectorFk = s.id
AND o.workerFk = account.myUser_getId()
JOIN warehouse wh ON wh.id = s.warehouseFk
JOIN itemShelving is3 ON is3.itemFk = is2.itemFk AND is3.shelvingFk = vShelvingFk COLLATE utf8_unicode_ci
WHERE is2.shelvingFk <> vShelvingFk COLLATE utf8_unicode_ci
JOIN itemShelving is3 ON is3.itemFk = is2.itemFk
AND is3.shelvingFk = vShelvingFk
WHERE is2.shelvingFk <> vShelvingFk
GROUP BY is2.id
ORDER BY p.pickingOrder DESC;
END$$

View File

@ -16,7 +16,7 @@ BEGIN
ish.itemFk itemFk,
sh.priority
FROM vn.itemShelving ish
JOIN vn.shelving sh ON sh.`code` = ish.shelvingFk
JOIN vn.shelving sh ON sh.id = ish.shelvingFk
JOIN vn.parking pk ON pk.id = sh.parkingFk
WHERE ish.itemFk = vItemFk
ORDER BY sh.priority DESC, created ASC;

View File

@ -1,14 +1,14 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_getItemDetails`(
vBarcodeItem INT,
vShelvingFK VARCHAR(10)
vShelvingCode VARCHAR(10)
)
BEGIN
/**
* Obtiene el precio y visible de un item
*
* @param vBarcodeItem barcode de artículo
* @param vShelvingFK Ubicación actual del artículo
* @param vShelvingCode Ubicación actual del artículo
*/
DECLARE vIsItem BOOL;
DECLARE vBuyFk INT;
@ -38,18 +38,19 @@ BEGIN
WITH visible AS(
SELECT itemFk,
IFNULL(buyingValue, 0) +
IFNULL(freightValue, 0) +
IFNULL(comissionValue, 0) +
IFNULL(packageValue, 0) itemCost
FROM vn.buy b
IFNULL(freightValue, 0) +
IFNULL(comissionValue, 0) +
IFNULL(packageValue, 0) itemCost
FROM vn.buy b
WHERE b.id = vBuyFk
) SELECT v.itemFk,
vShelvingFK,
vShelvingCode,
v.itemCost,
SUM(ish.visible) visible
FROM vn.itemShelving ish
JOIN vn.shelving sh ON sh.id = ish.shelvingFK
JOIN visible v
WHERE ish.shelvingFK = vShelvingFK COLLATE utf8mb3_general_ci
AND ish.itemFk = v.itemFk;
WHERE sh.code = vShelvingCode COLLATE utf8mb3_general_ci
AND ish.itemFk = v.itemFk;
END$$
DELIMITER ;

View File

@ -1,14 +1,20 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_getSaleDate`(vShelvingFk VARCHAR(3))
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_getSaleDate`(
vShelvingCode VARCHAR(10)
)
BEGIN
/* Devuelve la mínima fecha en que se necesita cada producto en esa matrícula.
*
* @param vShelvingFk Matrícula del carro o pallet
*/
/**
* Devuelve la mínima fecha en que se necesita cada producto en esa matrícula.
*
* @param vShelvingCode Matrícula del carro o pallet
*/
DECLARE vWarehouseFk INT;
DECLARE vStockScopeDays INT;
DECLARE vShelvingFk INT;
SELECT id INTO vShelvingFk
FROM shelving
WHERE code COLLATE utf8_unicode_ci = vShelvingCode;
SELECT s.warehouseFk, stockScopeDays
INTO vWarehouseFk, vStockScopeDays
@ -30,7 +36,7 @@ BEGIN
ENGINE = MEMORY
SELECT itemFk, SUM(visible) visible
FROM itemShelving
WHERE shelvingFk = vShelvingFk COLLATE utf8_unicode_ci
WHERE shelvingFk = vShelvingFk
GROUP BY itemFk;
CREATE OR REPLACE TEMPORARY TABLE tmp.tStockByDay
@ -52,7 +58,7 @@ BEGIN
SELECT ish.itemFk, - SUM(ish.visible), util.VN_CURDATE()
FROM itemShelving ish
JOIN tmp.tItems i ON i.itemFk = ish.itemFk
JOIN shelving sh ON sh.code = ish.shelvingFk
JOIN shelving sh ON sh.id = ish.shelvingFk
JOIN parking p ON sh.parkingFk = p.id
JOIN sector s ON s.id = p.sectorFk
WHERE s.isReserve
@ -110,7 +116,7 @@ BEGIN
UPDATE tmp.tStockByDay sbd
JOIN (SELECT ish.itemFK, SUM(ish.visible) amount
FROM itemShelving ish
JOIN shelving sh ON sh.code = ish.shelvingFk
JOIN shelving sh ON sh.id = ish.shelvingFk
JOIN parking p ON p.id = sh.parkingFk
JOIN sector s ON s.id = p.sectorFk
WHERE s.warehouseFk = vWarehouseFk
@ -150,10 +156,10 @@ BEGIN
p.sectorFk,
ish.shelvingFk
FROM itemShelving ish
JOIN vn.shelving sh ON sh.code = ish.shelvingFk
JOIN vn.shelving sh ON sh.id = ish.shelvingFk
LEFT JOIN parking p ON p.id = parkingFk
LEFT JOIN vn.sector s ON s.id = p.sectorFk
WHERE ish.shelvingFk = vShelvingFk COLLATE utf8_unicode_ci
WHERE ish.shelvingFk = vShelvingFk
) sub4 ON sub4.itemFk = ts.itemFk
LEFT JOIN sector s ON s.id = sub4.sectorFk
LEFT JOIN item i ON i.id = ts.itemFk

View File

@ -42,7 +42,7 @@ BEGIN
JOIN item i ON i.id = ish.itemFk
JOIN itemType it ON it.id = i.typeFk
JOIN tmp.stockMisfit sm ON sm.itemFk = ish.itemFk
JOIN shelving sh ON sh.code = ish.shelvingFk
JOIN shelving sh ON sh.id = ish.shelvingFk
JOIN parking p ON p.id = sh.parkingFk
LEFT JOIN (
SELECT s.itemFk, sum(s.quantity) notPrepared

View File

@ -1,6 +1,6 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_selfConsumption`(
vShelvingFk VARCHAR(10) COLLATE utf8_general_ci,
vShelvingCode VARCHAR(10) COLLATE utf8_general_ci,
vItemFk INT,
vQuantity INT
)
@ -9,9 +9,9 @@ BEGIN
* Leave the indicated amount on the shelve
* and create a ticket with the difference.
*
* @param vShelvingFk id of the shelve where the item is located.
* @param vItemFk article of which the self-consumption ticket is to be created.
* @param vQuantity amount that will stay on the shelve
* @param vShelvingCode Code of the shelve where the item is located
* @param vItemFk Item of which the self-consumption ticket is to be created
* @param vQuantity Amount that will stay on the shelve
*/
DECLARE vVisible INT;
DECLARE vClientFk INT;
@ -21,6 +21,11 @@ BEGIN
DECLARE vAgencyModeFk INT;
DECLARE vItemShelvingFk INT;
DECLARE vAddressFk INT;
DECLARE vShelvingFk INT;
SELECT id INTO vShelvingFk
FROM shelving
WHERE code = vShelvingCode;
SELECT c.id,
pc.clientSelfConsumptionFk,
@ -37,7 +42,7 @@ BEGIN
JOIN parking p ON p.sectorFk = s.id
JOIN shelving s2 ON s2.parkingFk = p.id
JOIN productionConfig pc
WHERE s2.code = vShelvingFk;
WHERE s2.id = vShelvingFk;
IF vClientFk IS NULL THEN
CALL util.throw('The company does not have a customer assigned');
@ -47,7 +52,7 @@ BEGIN
CALL util.throw('The shelf cannot have NULL or negative quantities');
END IF;
IF vShelvingFk IS NULL THEN
IF vShelvingCode IS NULL THEN
CALL util.throw('The shelf is necessary');
END IF;

View File

@ -1,7 +1,7 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_transfer`(
vItemShelvingFk INT,
vShelvingFk VARCHAR(10)
vShelvingCode VARCHAR(10)
)
BEGIN
/**
@ -9,9 +9,14 @@ BEGIN
* fusionando si coincide el packing y la fecha.
*
* @param vItemShelvingFk Identificador de itemShelving
* @param vShelvingFk Identificador de shelving
* @param vShelvingCode Código de shelving
*/
DECLARE vNewItemShelvingFk INT;
DECLARE vShelvingFk INT;
SELECT id INTO vShelvingFk
FROM shelving
WHERE code COLLATE utf8_unicode_ci = vShelvingCode;
SELECT MAX(ish.id) INTO vNewItemShelvingFk
FROM itemShelving ish
@ -26,7 +31,7 @@ BEGIN
AND ish2.packing = ish.packing
AND DATE(ish2.created) = DATE(ish.created)
AND ish2.buyFk = ish.buyFk
WHERE ish.shelvingFk = vShelvingFk COLLATE utf8_unicode_ci;
WHERE ish.shelvingFk = vShelvingFk;
IF vNewItemShelvingFk THEN
UPDATE itemShelving ish
@ -38,9 +43,7 @@ BEGIN
DELETE FROM itemShelving
WHERE id = vItemShelvingFk;
ELSE
IF (SELECT EXISTS(SELECT id FROM shelving
WHERE code = vShelvingFk COLLATE utf8_unicode_ci)) THEN
IF (SELECT EXISTS(SELECT id FROM shelving WHERE id = vShelvingFk)) THEN
UPDATE itemShelving
SET shelvingFk = vShelvingFk
WHERE id = vItemShelvingFk;

View File

@ -1,7 +1,7 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_devalueA2`(
vSelf INT,
vShelvingFK VARCHAR(10),
vShelvingCode VARCHAR(10) COLLATE utf8mb3_general_ci,
vBuyingValue DECIMAL(10,4),
vQuantity INT
)
@ -12,7 +12,7 @@ BEGIN
* de almacén y shelvings correspondientes
*
* @param vSelf Id de artículo a devaluar
* @param vShelvingFK Ubicación actual del artículo
* @param vShelvingCode Código de shelving / ubicación
* @param vBuyingValue Nuevo precio de coste
* @param vQuantity Cantidad del ítem a pasar a A2
*/
@ -109,10 +109,11 @@ BEGIN
CALL util.throw ('The item has not a buy');
END IF;
SELECT id,visible INTO vTargetItemShelvingFk, vCurrentVisible
FROM itemShelving
WHERE shelvingFk = vShelvingFK COLLATE utf8mb3_general_ci
AND itemFk = vSelf
SELECT ish.id, ish.visible INTO vTargetItemShelvingFk, vCurrentVisible
FROM itemShelving ish
JOIN shelving sh ON sh.id = ish.shelvingFk
WHERE sh.code = vShelvingCode
AND ish.itemFk = vSelf
LIMIT 1;
IF vCurrentVisible IS NULL THEN
@ -388,16 +389,17 @@ BEGIN
userFk,
isChecked)
SELECT vItemA2Fk,
shelvingFk,
ish.shelvingFk,
vQuantity ,
`grouping`,
packing,
packagingFk,
ish.`grouping`,
ish.packing,
ish.packagingFk,
account.myUser_getId(),
isChecked
FROM itemShelving
WHERE itemFK = vSelf
AND shelvingFk = vShelvingFK COLLATE utf8mb3_general_ci
ish.isChecked
FROM itemShelving ish
JOIN shelving sh ON sh.id = ish.shelvingFk
WHERE ish.itemFK = vSelf
AND sh.code = vShelvingCode
ON DUPLICATE KEY UPDATE
visible = vQuantity + VALUES(visible);

View File

@ -50,16 +50,16 @@ BEGIN
JOIN vn.entry e ON e.id = b.entryFk
JOIN vn.travel tr ON tr.id = e.travelFk
JOIN vn.supplier s ON s.id = e.supplierFk
JOIN vn.state st ON st.`code` = IF(tr.landed < util.VN_CURDATE()
JOIN vn.state st ON st.`code` = IF(tr.landed < util.VN_CURDATE()
OR (util.VN_CURDATE() AND tr.isReceived),
'DELIVERED',
'FREE')
WHERE tr.landed >= vDateInventory
AND tr.warehouseInFk = vWarehouseFk
AND (s.id <> vSupplierInventoryFk OR vDated IS NULL)
AND (s.id <> vSupplierInventoryFk OR vDated IS NULL)
AND b.itemFk = vItemFk
AND NOT e.isExcludedFromAvailable
AND NOT e.isRaid
AND NOT tr.isRaid
),
entriesOut AS (
SELECT 'entry',
@ -95,7 +95,7 @@ BEGIN
AND b.itemFk = vItemFk
AND NOT e.isExcludedFromAvailable
AND NOT w.isFeedStock
AND NOT e.isRaid
AND NOT tr.isRaid
),
sales AS (
WITH itemSales AS (
@ -147,10 +147,10 @@ BEGIN
NULL
FROM itemSales s
LEFT JOIN vn.state stPrep ON stPrep.`code` = 'PREPARED'
LEFT JOIN vn.saleTracking stk ON stk.saleFk = s.saleFk
LEFT JOIN vn.saleTracking stk ON stk.saleFk = s.saleFk
AND stk.stateFk = stPrep.id
GROUP BY s.saleFk
),
),
orders AS (
SELECT 'order' originType,
o.id originId,
@ -215,9 +215,9 @@ BEGIN
t.`in` invalue,
t.`out`,
@a := @a + IFNULL(t.`in`, 0) - IFNULL(t.`out`, 0) balance,
@currentLineFk := IF (@shipped < util.VN_CURDATE()
@currentLineFk := IF (@shipped < util.VN_CURDATE()
OR (@shipped = util.VN_CURDATE() AND (t.isPicked OR a.`code` >= 'ON_PREPARATION')),
t.lineFk,
t.lineFk,
@currentLineFk) lastPreparedLineFk,
t.isTicket,
t.lineFk,
@ -254,21 +254,21 @@ BEGIN
UNION ALL
SELECT originType,
originId,
shipped,
alertlevel,
stateName,
shipped,
alertlevel,
stateName,
reference,
entityType,
entityId,
entityId,
entityName,
`in`,
`out`,
@a := @a + IFNULL(`in`, 0) - IFNULL(`out`, 0),
0,
isTicket,
lineFk,
isPicked,
clientType,
`in`,
`out`,
@a := @a + IFNULL(`in`, 0) - IFNULL(`out`, 0),
0,
isTicket,
lineFk,
isPicked,
clientType,
claimFk,
`order`
FROM tItemDiary

View File

@ -42,7 +42,6 @@ BEGIN
i.minimum `min`,
p.name producer,
o.code origin,
v.visible - IFNULL(vVisibleItemShelving, 0) unlocated,
a.available,
vVisibleItemShelving,
v.visible,

View File

@ -63,7 +63,7 @@ BEGIN
AND NOT e.isExcludedFromAvailable
AND b.quantity <> 0
AND (vItemFk IS NULL OR b.itemFk = vItemFk)
AND NOT e.isRaid
AND NOT t.isRaid
UNION ALL
SELECT r.itemFk,
r.shipment,

View File

@ -17,22 +17,22 @@ BEGIN
ALTER TABLE tmp.itemInventory
ADD `buy_date` datetime NOT NULL;
CREATE OR REPLACE TEMPORARY TABLE lastBuyScope
SELECT i.id, MAX(t.landed) lastLanded
FROM item i
JOIN buy b ON b.itemFk = i.id
FROM item i
JOIN buy b ON b.itemFk = i.id
JOIN entry e ON e.id = b.entryFk
JOIN travel t ON t.id = e.travelFk
JOIN travel t ON t.id = e.travelFk
JOIN supplier s ON s.id = e.supplierFk
JOIN warehouse w ON w.id = t.warehouseInFk
WHERE t.landed BETWEEN (vDated + INTERVAL - vLastBuyScope DAY) AND vDated
AND NOT s.name = 'INVENTARIO'
AND (vWarehouseFk IS NULL OR t.warehouseInFk = vWarehouseFk)
AND w.isComparative
AND NOT e.isRaid
AND NOT t.isRaid
GROUP BY i.id;
UPDATE tmp.itemInventory y
JOIN lastBuyScope lbs ON lbs.id = y.id
SET y.buy_date = lbs.lastLanded;

View File

@ -25,7 +25,7 @@ BEGIN
LIMIT 1;
SET vHasNotInventory = (vInventoried IS NULL);
IF vHasNotInventory THEN
SELECT landed INTO vInventoryClone
FROM travel tr
@ -50,7 +50,7 @@ BEGIN
PRIMARY KEY (warehouseInventory, itemFk) USING HASH
)
ENGINE = MEMORY;
-- Inventario inicial
IF vHasNotInventory THEN
INSERT INTO tInventory(warehouseFk, itemFk, quantity, warehouseInventory)
@ -109,7 +109,7 @@ BEGIN
JOIN warehouse w ON w.id = tr.warehouseInFk
WHERE tr.landed BETWEEN vInventoried AND vDateDayEnd
AND IF(tr.landed = util.VN_CURDATE(), tr.isReceived, TRUE)
AND NOT e.isRaid
AND NOT tr.isRaid
AND w.valuatedInventory
AND t.isInventory
AND e.supplierFk <> vInventorySupplierFk
@ -131,7 +131,7 @@ BEGIN
JOIN itemCategory ic ON ic.id = t.categoryFk
JOIN warehouse w ON w.id = tr.warehouseOutFk
WHERE tr.shipped BETWEEN vInventoried AND vDateDayEnd
AND NOT e.isRaid
AND NOT tr.isRaid
AND w.valuatedInventory
AND t.isInventory
AND (t.id = vItemTypeFk OR vItemTypeFk IS NULL)
@ -159,7 +159,7 @@ BEGIN
ON DUPLICATE KEY UPDATE tInventory.quantity = tInventory.quantity + s.quantity * IF(vHasNotInventory, 1, -1);
-- Volver a poner lo que esta aun en las estanterias
IF vDated = util.VN_CURDATE() THEN
IF vDated = util.VN_CURDATE() THEN
INSERT INTO tInventory(warehouseFk, itemFk, quantity, warehouseInventory)
SELECT w.id,
s.itemFk,
@ -196,14 +196,14 @@ BEGIN
JOIN warehouse wIn ON wIn.id = tr.warehouseInFk
JOIN warehouse wOut ON wOut.id = tr.warehouseOutFk
WHERE vDated >= tr.shipped AND vDated < tr.landed
AND NOT isRaid
AND NOT tr.isRaid
AND wIn.valuatedInventory
AND t.isInventory
AND e.isConfirmed
AND (t.id = vItemTypeFk OR vItemTypeFk IS NULL)
AND (ic.id = vItemCategoryFk OR vItemCategoryFk IS NULL)
ON DUPLICATE KEY UPDATE tInventory.quantity = tInventory.quantity + (b.quantity);
CALL buy_getUltimate (NULL, NULL, vDateDayEnd);
DELETE FROM tInventory WHERE quantity IS NULL OR NOT quantity;
@ -233,7 +233,7 @@ BEGIN
JOIN warehouse w ON w.id = warehouseFk
JOIN item i ON i.id = ti.itemFk
JOIN itemType tp ON tp.id = i.typeFk
JOIN itemCategory ic ON ic.id = tp.categoryFk
JOIN itemCategory ic ON ic.id = tp.categoryFk
WHERE w.valuatedInventory
AND ti.total > 0;

View File

@ -1,22 +0,0 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`machineWorker_add`(vPlate VARCHAR(10), vWorkerFk INT)
BEGIN
/**
* Inserta registro si el vWorkerFk no ha registrado nada en las últimas 12 horas
* @param vPlate número de matrícula
* @param vWorkerFk id del worker
*
*/
UPDATE vn.machineWorker mw
JOIN vn.machine m ON m.id = mw.machineFk
SET mw.outTimed = util.VN_NOW()
WHERE (mw.workerFk = vWorkerFk OR m.plate = vPlate)
AND ISNULL(mw.outTimed);
INSERT INTO machineWorker (machineFk, workerFk)
SELECT m.id, vWorkerFk
FROM machine m
WHERE m.plate= vPlate;
END$$
DELIMITER ;

View File

@ -1,21 +0,0 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`machineWorker_getHistorical`(vPlate VARCHAR(20), vWorkerFk INT)
BEGIN
/**
* Obtiene historial de la matrícula vPlate que el trabajador vWorkerFk escanea,
* si es jefe de producción muestra el historial completo.
*
* @param vPlate número de matrícula
* @param vWorkerFk id del trabajador
*
*/
DECLARE vWorkerName VARCHAR(255) DEFAULT account.user_getNameFromId(vWorkerFk);
SELECT mw.inTimed,account.user_getNameFromId(mw.workerFk) as workerName, mw.outTimed
FROM machineWorker mw
JOIN machine m ON m.plate = vPlate
WHERE mw.machineFk = m.id
AND mw.workerFk = IF(account.user_hasRole(vWorkerName, 'coolerAssist'), mw.workerFk, vWorkerFk)
ORDER BY mw.inTimed DESC;
END$$
DELIMITER ;

View File

@ -1,38 +0,0 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`machineWorker_update`(vPlate VARCHAR(10), vWorkerFk INT)
BEGIN
/**
* Actualiza el registro correspondiente si el vWorkerFk se ha registrado en las últimas horas (campo maxHours de machineWorkerConfig) con vPlate,
*
* @param vPlate número de matrícula
* @param vWorkerFk id del trabajador
*
*/
DECLARE vMachineFk INT(10);
DECLARE vMaxHours INT(10);
SELECT m.id INTO vMachineFk
FROM machine m
WHERE m.plate = vPlate;
SELECT maxHours INTO vMaxHours
FROM machineWorkerConfig;
IF (SELECT COUNT(*)
FROM machineWorker m
WHERE m.workerFk = vWorkerFk
AND m.inTimed >= TIMESTAMPADD(HOUR , -vMaxHours, util.VN_NOW()) AND ISNULL(m.outTimed)) THEN
UPDATE machineWorker m
SET m.outTimed = CURRENT_TIMESTAMP()
WHERE m.workerFk = vWorkerFk
AND m.inTimed >= TIMESTAMPADD(HOUR , -vMaxHours, util.VN_NOW())
AND ISNULL(m.outTimed)
AND m.machineFk = vMachineFk;
END IF;
END$$
DELIMITER ;

View File

@ -1,16 +0,0 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`machine_getWorkerPlate`(vWorkerFk INT)
BEGIN
/**
* Selecciona la matrícula del vehículo del workerfk
*
* @param vWorkerFk el id del trabajador
*/
SELECT m.plate
FROM machine m
JOIN machineWorker mw ON mw.machineFk = m.id
WHERE mw.inTimed >= TIMESTAMPADD(HOUR , -12,util.VN_NOW())
AND ISNULL(mw.outTimed)
AND mw.workerFk = vWorkerFk;
END$$
DELIMITER ;

View File

@ -1,173 +1,173 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`multipleInventory`(
vDate DATE,
vWarehouseFk TINYINT,
vMaxDays TINYINT
)
proc: BEGIN
DECLARE vDateTomorrow DATE DEFAULT vDate + INTERVAL 1 DAY;
DECLARE vDateFrom DATE DEFAULT vDate;
DECLARE vDateTo DATETIME;
DECLARE vDateToTomorrow DATETIME;
DECLARE vDefaultDayRange INT;
DECLARE vCalcFk INT;
IF vDate < util.VN_CURDATE() THEN
LEAVE proc;
END IF;
IF vDate = util.VN_CURDATE() THEN
SELECT inventoried INTO vDateFrom
FROM config;
END IF;
SELECT defaultDayRange INTO vDefaultDayRange
FROM comparativeConfig;
SET vDateTo = vDate + INTERVAL IFNULL(vMaxDays, vDefaultDayRange) DAY;
SET vDateToTomorrow = vDateTo + INTERVAL 1 DAY;
ALTER TABLE tmp.itemInventory
ADD `avalaible` INT NOT NULL,
ADD `sd` INT NOT NULL,
ADD `rest` INT NOT NULL,
ADD `expected` INT NOT NULL,
ADD `inventory` INT NOT NULL,
ADD `visible` INT NOT NULL,
ADD `life` TINYINT NOT NULL DEFAULT '0';
-- Calculo del inventario
CREATE OR REPLACE TEMPORARY TABLE tItemInventoryCalc
(PRIMARY KEY (itemFk))
ENGINE = MEMORY
SELECT itemFk,
SUM(quantity) quantity
FROM (
SELECT s.itemFk, - s.quantity quantity
FROM sale s
JOIN ticket t ON t.id = s.ticketFk
JOIN warehouse w ON w.id = t.warehouseFk
WHERE t.shipped BETWEEN vDateFrom AND util.dayEnd(vDate)
AND IFNULL(vWarehouseFk, t.warehouseFk) = t.warehouseFk
AND w.isComparative
UNION ALL
SELECT b.itemFk, b.quantity
FROM buy b
JOIN entry e ON e.id = b.entryFk
JOIN travel t ON t.id = e.travelFk
JOIN warehouse w ON w.id = t.warehouseInFk
WHERE t.landed BETWEEN vDateFrom AND util.dayEnd(vDate)
AND IFNULL(vWarehouseFk, t.warehouseInFk) = t.warehouseInFk
AND w.isComparative
AND NOT e.isExcludedFromAvailable
AND NOT e.isRaid
UNION ALL
SELECT b.itemFk, - b.quantity
FROM buy b
JOIN entry e ON e.id = b.entryFk
JOIN travel t ON t.id = e.travelFk
JOIN warehouse w ON w.id = t.warehouseOutFk
WHERE t.shipped BETWEEN vDateFrom AND util.dayEnd(vDate)
AND IFNULL(vWarehouseFk, t.warehouseOutFk) = t.warehouseOutFk
AND w.isComparative
AND NOT e.isExcludedFromAvailable
AND NOT e.isRaid
) sub
GROUP BY itemFk;
-- Cálculo del visible
CALL cache.visible_refresh(vCalcFk, FALSE, vWarehouseFk);
CREATE OR REPLACE TEMPORARY TABLE tItemVisibleCalc
(PRIMARY KEY (item_id))
ENGINE = MEMORY
SELECT item_id, visible
FROM cache.visible
WHERE calc_id = vCalcFk;
UPDATE tmp.itemInventory it
LEFT JOIN tItemInventoryCalc iic ON iic.itemFk = it.id
LEFT JOIN tItemVisibleCalc ivc ON ivc.item_id = it.id
SET it.inventory = iic.quantity,
it.visible = ivc.visible,
it.avalaible = iic.quantity,
it.sd = iic.quantity;
-- Calculo del disponible
CREATE OR REPLACE TEMPORARY TABLE tmp.itemCalc
(INDEX (itemFk, warehouseFk))
ENGINE = MEMORY
SELECT sub.itemFk,
vWarehouseFk warehouseFk,
sub.dated,
SUM(sub.quantity) quantity
FROM (
SELECT s.itemFk,
DATE(t.shipped) dated,
- s.quantity quantity
FROM sale s
JOIN ticket t ON t.id = s.ticketFk
JOIN warehouse w ON w.id = t.warehouseFk
WHERE t.shipped BETWEEN vDateTomorrow AND vDateTo
AND IFNULL(vWarehouseFk, t.warehouseFk) = t.warehouseFk
AND w.isComparative
UNION ALL
SELECT b.itemFk, t.landed, b.quantity
FROM buy b
JOIN entry e ON e.id = b.entryFk
JOIN travel t ON t.id = e.travelFk
JOIN warehouse w ON w.id = t.warehouseInFk
WHERE t.landed BETWEEN vDateTomorrow AND vDateTo
AND IFNULL(vWarehouseFk, t.warehouseInFk) = t.warehouseInFk
AND w.isComparative
AND NOT e.isExcludedFromAvailable
AND NOT e.isRaid
UNION ALL
SELECT b.itemFk, t.shipped, - b.quantity
FROM buy b
JOIN entry e ON e.id = b.entryFk
JOIN travel t ON t.id = e.travelFk
JOIN warehouse w ON w.id = t.warehouseOutFk
WHERE t.shipped BETWEEN vDateTomorrow AND vDateTo
AND IFNULL(vWarehouseFk, t.warehouseOutFk) = t.warehouseOutFk
AND w.isComparative
AND NOT e.isExcludedFromAvailable
AND NOT e.isRaid
) sub
GROUP BY sub.itemFk, sub.dated;
CALL item_getAtp(vDate);
CALL travel_upcomingArrivals(vWarehouseFk, vDate);
CREATE OR REPLACE TEMPORARY TABLE tItemAvailableCalc
(PRIMARY KEY (itemFk))
ENGINE = MEMORY
SELECT it.itemFk,
SUM(it.quantity) quantity,
im.quantity minQuantity
FROM tmp.itemCalc it
JOIN tmp.itemAtp im ON im.itemFk = it.itemFk
JOIN item i ON i.id = it.itemFk
LEFT JOIN origin o ON o.id = i.originFk
LEFT JOIN tmp.itemTravel t ON t.wh = o.warehouseFk
WHERE it.dated < IF(vMaxDays < 0 AND t.landing IS NOT NULL,
t.landing,
vDateToTomorrow)
GROUP BY it.itemFk;
UPDATE tmp.itemInventory it
JOIN tItemAvailableCalc iac ON iac.itemFk = it.id
SET it.avalaible = IF(iac.minQuantity > 0,
it.avalaible,
it.avalaible + iac.minQuantity),
it.sd = it.inventory + iac.quantity;
DROP TEMPORARY TABLE
tmp.itemTravel,
tmp.itemCalc,
tmp.itemAtp,
tItemInventoryCalc,
tItemVisibleCalc,
tItemAvailableCalc;
END$$
DELIMITER ;
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`multipleInventory`(
vDate DATE,
vWarehouseFk TINYINT,
vMaxDays TINYINT
)
proc: BEGIN
DECLARE vDateTomorrow DATE DEFAULT vDate + INTERVAL 1 DAY;
DECLARE vDateFrom DATE DEFAULT vDate;
DECLARE vDateTo DATETIME;
DECLARE vDateToTomorrow DATETIME;
DECLARE vDefaultDayRange INT;
DECLARE vCalcFk INT;
IF vDate < util.VN_CURDATE() THEN
LEAVE proc;
END IF;
IF vDate = util.VN_CURDATE() THEN
SELECT inventoried INTO vDateFrom
FROM config;
END IF;
SELECT defaultDayRange INTO vDefaultDayRange
FROM comparativeConfig;
SET vDateTo = vDate + INTERVAL IFNULL(vMaxDays, vDefaultDayRange) DAY;
SET vDateToTomorrow = vDateTo + INTERVAL 1 DAY;
ALTER TABLE tmp.itemInventory
ADD `avalaible` INT NOT NULL,
ADD `sd` INT NOT NULL,
ADD `rest` INT NOT NULL,
ADD `expected` INT NOT NULL,
ADD `inventory` INT NOT NULL,
ADD `visible` INT NOT NULL,
ADD `life` TINYINT NOT NULL DEFAULT '0';
-- Calculo del inventario
CREATE OR REPLACE TEMPORARY TABLE tItemInventoryCalc
(PRIMARY KEY (itemFk))
ENGINE = MEMORY
SELECT itemFk,
SUM(quantity) quantity
FROM (
SELECT s.itemFk, - s.quantity quantity
FROM sale s
JOIN ticket t ON t.id = s.ticketFk
JOIN warehouse w ON w.id = t.warehouseFk
WHERE t.shipped BETWEEN vDateFrom AND util.dayEnd(vDate)
AND IFNULL(vWarehouseFk, t.warehouseFk) = t.warehouseFk
AND w.isComparative
UNION ALL
SELECT b.itemFk, b.quantity
FROM buy b
JOIN entry e ON e.id = b.entryFk
JOIN travel t ON t.id = e.travelFk
JOIN warehouse w ON w.id = t.warehouseInFk
WHERE t.landed BETWEEN vDateFrom AND util.dayEnd(vDate)
AND IFNULL(vWarehouseFk, t.warehouseInFk) = t.warehouseInFk
AND w.isComparative
AND NOT e.isExcludedFromAvailable
AND NOT t.isRaid
UNION ALL
SELECT b.itemFk, - b.quantity
FROM buy b
JOIN entry e ON e.id = b.entryFk
JOIN travel t ON t.id = e.travelFk
JOIN warehouse w ON w.id = t.warehouseOutFk
WHERE t.shipped BETWEEN vDateFrom AND util.dayEnd(vDate)
AND IFNULL(vWarehouseFk, t.warehouseOutFk) = t.warehouseOutFk
AND w.isComparative
AND NOT e.isExcludedFromAvailable
AND NOT t.isRaid
) sub
GROUP BY itemFk;
-- Cálculo del visible
CALL cache.visible_refresh(vCalcFk, FALSE, vWarehouseFk);
CREATE OR REPLACE TEMPORARY TABLE tItemVisibleCalc
(PRIMARY KEY (item_id))
ENGINE = MEMORY
SELECT item_id, visible
FROM cache.visible
WHERE calc_id = vCalcFk;
UPDATE tmp.itemInventory it
LEFT JOIN tItemInventoryCalc iic ON iic.itemFk = it.id
LEFT JOIN tItemVisibleCalc ivc ON ivc.item_id = it.id
SET it.inventory = iic.quantity,
it.visible = ivc.visible,
it.avalaible = iic.quantity,
it.sd = iic.quantity;
-- Calculo del disponible
CREATE OR REPLACE TEMPORARY TABLE tmp.itemCalc
(INDEX (itemFk, warehouseFk))
ENGINE = MEMORY
SELECT sub.itemFk,
vWarehouseFk warehouseFk,
sub.dated,
SUM(sub.quantity) quantity
FROM (
SELECT s.itemFk,
DATE(t.shipped) dated,
- s.quantity quantity
FROM sale s
JOIN ticket t ON t.id = s.ticketFk
JOIN warehouse w ON w.id = t.warehouseFk
WHERE t.shipped BETWEEN vDateTomorrow AND vDateTo
AND IFNULL(vWarehouseFk, t.warehouseFk) = t.warehouseFk
AND w.isComparative
UNION ALL
SELECT b.itemFk, t.landed, b.quantity
FROM buy b
JOIN entry e ON e.id = b.entryFk
JOIN travel t ON t.id = e.travelFk
JOIN warehouse w ON w.id = t.warehouseInFk
WHERE t.landed BETWEEN vDateTomorrow AND vDateTo
AND IFNULL(vWarehouseFk, t.warehouseInFk) = t.warehouseInFk
AND w.isComparative
AND NOT e.isExcludedFromAvailable
AND NOT t.isRaid
UNION ALL
SELECT b.itemFk, t.shipped, - b.quantity
FROM buy b
JOIN entry e ON e.id = b.entryFk
JOIN travel t ON t.id = e.travelFk
JOIN warehouse w ON w.id = t.warehouseOutFk
WHERE t.shipped BETWEEN vDateTomorrow AND vDateTo
AND IFNULL(vWarehouseFk, t.warehouseOutFk) = t.warehouseOutFk
AND w.isComparative
AND NOT e.isExcludedFromAvailable
AND NOT t.isRaid
) sub
GROUP BY sub.itemFk, sub.dated;
CALL item_getAtp(vDate);
CALL travel_upcomingArrivals(vWarehouseFk, vDate);
CREATE OR REPLACE TEMPORARY TABLE tItemAvailableCalc
(PRIMARY KEY (itemFk))
ENGINE = MEMORY
SELECT it.itemFk,
SUM(it.quantity) quantity,
im.quantity minQuantity
FROM tmp.itemCalc it
JOIN tmp.itemAtp im ON im.itemFk = it.itemFk
JOIN item i ON i.id = it.itemFk
LEFT JOIN origin o ON o.id = i.originFk
LEFT JOIN tmp.itemTravel t ON t.wh = o.warehouseFk
WHERE it.dated < IF(vMaxDays < 0 AND t.landing IS NOT NULL,
t.landing,
vDateToTomorrow)
GROUP BY it.itemFk;
UPDATE tmp.itemInventory it
JOIN tItemAvailableCalc iac ON iac.itemFk = it.id
SET it.avalaible = IF(iac.minQuantity > 0,
it.avalaible,
it.avalaible + iac.minQuantity),
it.sd = it.inventory + iac.quantity;
DROP TEMPORARY TABLE
tmp.itemTravel,
tmp.itemCalc,
tmp.itemAtp,
tItemInventoryCalc,
tItemVisibleCalc,
tItemAvailableCalc;
END$$
DELIMITER ;

View File

@ -217,7 +217,7 @@ proc: BEGIN
st.code = 'previousPrepared' isPreviousPrepared,
sc.itemPackingTypeFk
FROM itemShelving ish
JOIN shelving sh ON sh.code = ish.shelvingFk
JOIN shelving sh ON sh.id = ish.shelvingFk
JOIN parking p ON p.id = sh.parkingFk
JOIN sector sc ON sc.id = p.sectorFk
JOIN sectorType st ON st.id = sc.typeFk

View File

@ -1,31 +0,0 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`raidUpdate`()
BEGIN
/**
* Actualiza el travel de las entradas de redadas
*/
UPDATE entry e
JOIN entryVirtual ev ON ev.entryFk = e.id
JOIN travel t ON t.id = e.travelFk
JOIN (
SELECT *
FROM (
SELECT t.id, t.landed, tt.warehouseInFk, tt.warehouseOutFk
FROM travel t
JOIN (
SELECT t.warehouseInFk, t.warehouseOutFk
FROM entryVirtual ev
JOIN entry e ON e.id = ev.entryFk
JOIN travel t ON t.id = e.travelFk
GROUP BY t.warehouseInFk, t.warehouseOutFk
) tt ON t.warehouseInFk = tt.warehouseInFk AND t.warehouseOutFk = tt.warehouseOutFk
WHERE shipped > util.VN_CURDATE() AND NOT isDelivered
ORDER BY t.landed
LIMIT 10000000000000000000
) t
GROUP BY t.warehouseInFk, t.warehouseOutFk
) tt ON t.warehouseInFk = tt.warehouseInFk AND t.warehouseOutFk = tt.warehouseOutFk
SET e.travelFk = t.id;
END$$
DELIMITER ;

View File

@ -11,6 +11,8 @@ BEGIN
*/
DECLARE vIsUpdatable, vIsFreelance BOOL DEFAULT 0;
DECLARE vAgencyModePricePercentage DOUBLE;
DECLARE vIsKmTruckRate BOOL;
DECLARE vCountryFk INT;
SELECT r.created >= rc.cutoffDated INTO vIsUpdatable
FROM route r
@ -21,10 +23,16 @@ BEGIN
DELETE FROM routeCommission
WHERE routeFk = vSelf;
SELECT w.isFreelance INTO vIsFreelance
SELECT w.isFreelance, v.isKmTruckRate, c.countryFk INTO vIsFreelance, vIsKmTruckRate, vCountryFk
FROM route r
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 client c ON c.id = t.clientFk
WHERE r.id = vSelf
GROUP BY c.countryFk
ORDER BY COUNT(*) DESC
LIMIT 1;
SELECT ampp.percentage INTO vAgencyModePricePercentage
FROM route r
@ -39,7 +47,9 @@ BEGIN
workCenterFk,
freelanceYearlyM3,
cat4m3,
cat5m3
cat5m3,
isKmTruckRate,
countryFk
)
SELECT vSelf,
r.commissionWorkCenterFk,
@ -51,11 +61,14 @@ BEGIN
IFNULL(r.m3, 0),
0
),
rc.distributionCat4M3 * IFNULL(r.m3, 0),
rc.distributionCat5M3 * IFNULL(r.m3, 0)
IFNULL(wc.distributionCat4M3, rc.distributionCat4M3) * IFNULL(r.m3, 0),
IFNULL(wc.distributionCat5M3, rc.distributionCat5M3) * IFNULL(r.m3, 0),
vIsKmTruckRate,
vCountryFk
FROM route r
JOIN vehicle v ON v.id = r.vehicleFk
JOIN routeConfig rc
LEFT JOIN workCenterCommission wc ON wc.workCenter = r.workCenterFk
WHERE r.id = vSelf
AND r.workerFk
AND r.commissionWorkCenterFk;
@ -68,7 +81,9 @@ BEGIN
yearlyKm,
yearlyM3,
cat4m3,
cat5m3
cat5m3,
isKmTruckRate,
countryFk
)
SELECT vSelf,
r.commissionWorkCenterFk,
@ -78,11 +93,14 @@ BEGIN
IF(v.isKmTruckRate, rc.deliveryM3Cat5, rc.deliveryM3Cat4),
(r.kmEnd - r.kmStart) * rc.kmYearly,
IFNULL(r.m3, 0) * rc.m3Yearly,
rc.distributionCat4M3 * IFNULL(r.m3, 0),
rc.distributionCat5M3 * IFNULL(r.m3, 0)
IFNULL(wc.distributionCat4M3, rc.distributionCat4M3) * IFNULL(r.m3, 0),
IFNULL(wc.distributionCat5M3, rc.distributionCat5M3) * IFNULL(r.m3, 0),
vIsKmTruckRate,
vCountryFk
FROM route r
JOIN vehicle v ON v.id = r.vehicleFk
JOIN routeConfig rc
LEFT JOIN workCenterCommission wc ON wc.workCenter = r.workCenterFk
WHERE r.id = vSelf
AND r.kmStart
AND r.kmEnd

View File

@ -27,7 +27,7 @@ BEGIN
DECLARE vQuantity INT;
DECLARE vRemainder INT DEFAULT 0;
DECLARE vRemainderSaleFk INT;
DECLARE vShelving VARCHAR(10);
DECLARE vShelvingFk VARCHAR(10);
DECLARE vTicketFk INT;
SELECT s.quantity,
@ -74,7 +74,7 @@ w1: WHILE vQuantity >= vPacking DO
p.pickingOrder,
ish.created
FROM itemShelving ish
JOIN shelving sh ON sh.code = ish.shelvingFk
JOIN shelving sh ON sh.id = ish.shelvingFk
JOIN parking p ON p.id = sh.parkingFk
LEFT JOIN itemShelvingSale iss
ON iss.itemShelvingFk = ish.id
@ -262,9 +262,9 @@ w1: WHILE vQuantity >= vPacking DO
CALL dipole.expedition_Add(vExpeditionFk,vPrinterFk, TRUE);
SELECT shelvingFk, p.code
INTO vShelving, vParkingCode
INTO vShelvingFk, vParkingCode
FROM itemShelving ish
JOIN shelving sh ON sh.code = ish.shelvingFk
JOIN shelving sh ON sh.id = ish.shelvingFk
JOIN parking p ON p.id = sh.parkingFk
WHERE ish.id = vItemShelvingFk;
@ -273,7 +273,7 @@ w1: WHILE vQuantity >= vPacking DO
itemFk = vItemFk,
quantity = vPacking,
longName = vConcept,
shelvingFk = vShelving,
shelvingFk = vShelvingFk,
parkingCode = vParkingCode,
phone = RIGHT(phone,vMaxPhoneLength),
street = RIGHT(street, vMAxStreetLength)

View File

@ -41,7 +41,7 @@ BEGIN
AND iss.created >= vDated
GROUP BY iss.itemShelvingFk, s.itemFk) tISS
ON tISS.itemFk = ish.itemFk AND tISS.itemShelvingFk = ish.id
JOIN shelving sh ON sh.code = ish.shelvingFk
JOIN shelving sh ON sh.id = ish.shelvingFk
JOIN parking p ON p.id = sh.parkingFk
JOIN tmp.productionBuffer pb ON pb.ticketFk = s.ticketFk
JOIN agencyMode am ON am.id = pb.agencyModeFk

View File

@ -87,7 +87,7 @@ BEGIN
SUM(ish.visible) visible,
s.warehouseFk warehouseFk
FROM itemShelving ish
JOIN shelving sh ON sh.code = ish.shelvingFk
JOIN shelving sh ON sh.id = ish.shelvingFk
JOIN parking p ON p.id = sh.parkingFk
JOIN sector s ON s.id = p.sectorFk
GROUP BY ish.itemFk, s.warehouseFk;

View File

@ -1,11 +1,13 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`shelvingChange`(IN `vShelvingO` VARCHAR(8), IN `vShelvingD` VARCHAR(8))
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`shelvingChange`(
`vShelvingO` VARCHAR(10),
`vShelvingD` VARCHAR(10)
)
BEGIN
UPDATE vn.itemShelving
SET shelvingFk = vShelvingD COLLATE utf8_unicode_ci
WHERE shelvingFk = vShelvingO COLLATE utf8_unicode_ci;
UPDATE itemShelving ish
JOIN shelving sh1 ON sh1.code = vShelvingD COLLATE utf8_unicode_ci
JOIN shelving sh2 ON sh2.code = vShelvingO COLLATE utf8_unicode_ci
SET ish.shelvingFk = sh1.id
WHERE ish.shelvingFk = sh2.id;
END$$
DELIMITER ;

View File

@ -1,8 +1,10 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`shelvingParking_get`(vShelvingFk VARCHAR(10), vWarehouseFk INT, vDayRange INT)
BEGIN
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`shelvingParking_get`(
vShelvingCode VARCHAR(10),
vWarehouseFk INT,
vDayRange INT
)
BEGIN
SELECT s.itemFk,
s.concept,
CAST(SUM(s.quantity) AS DECIMAL(10,0)) as sinServir,
@ -10,14 +12,15 @@ SELECT s.itemFk,
FROM vn.sale s
LEFT JOIN vn.itemShelvingSale iss ON iss.saleFk = s.id
JOIN vn.ticket t ON t.id = s.ticketFk
LEFT JOIN vn.itemShelvingStock ist ON ist.itemFk = s.itemFk AND ist.warehouseFk = vWarehouseFk
JOIN vn.itemShelving ish ON ish.itemFk = s.itemFk AND ish.shelvingFk = vShelvingFk COLLATE utf8_general_ci
LEFT JOIN vn.itemShelvingStock ist ON ist.itemFk = s.itemFk
AND ist.warehouseFk = vWarehouseFk
JOIN vn.itemShelving ish ON ish.itemFk = s.itemFk
JOIN shelving sh ON sh.id = ish.shelvingFk
AND sh.code = vShelvingCode COLLATE utf8_general_ci
WHERE t.shipped BETWEEN util.VN_CURDATE() AND util.dayend(TIMESTAMPADD(DAY, GREATEST(0,vDayRange), util.VN_CURDATE()))
AND iss.saleFk IS NULL
AND t.warehouseFk = vWarehouseFk
GROUP BY s.itemFk
HAVING sinServir > aparcado;
END$$
DELIMITER ;

View File

@ -12,12 +12,12 @@ BEGIN
DELETE ish.*
FROM itemShelving ish
JOIN vn.shelving sh ON sh.code = ish.shelvingFk
JOIN vn.shelving sh ON sh.id = ish.shelvingFk
WHERE sh.parkingFk IS NULL
AND ish.created < TIMESTAMPADD(WEEK,-1,util.VN_CURDATE());
UPDATE shelving sh
LEFT JOIN itemShelving its ON its.shelvingFk = sh.`code`
LEFT JOIN itemShelving its ON its.shelvingFk = sh.id
SET isPrinted = 0,
parkingFk = NULL
WHERE its.id IS NULL
@ -27,11 +27,11 @@ UPDATE shelving sh
OR
sh.parked < util.VN_CURDATE() - INTERVAL 2 WEEK
)
AND IF(code REGEXP '^[A-Za-z]{2}[0-9]', LEFT (code, 2) NOT IN (
SELECT DISTINCT LEFT(its.shelvingFk, 2)
SELECT DISTINCT LEFT(sh.code, 2)
FROM itemShelving its
WHERE its.shelvingFk REGEXP '^[A-Za-z]{2}[0-9]'
JOIN shelving sh ON sh.id = its.shelvingFk
WHERE sh.code REGEXP '^[A-Za-z]{2}[0-9]'
), TRUE);
END$$

View File

@ -25,7 +25,7 @@ BEGIN
LEFT JOIN (
SELECT ish.itemFk, CAST(SUM(ish.visible) AS DECIMAL(10,0)) AS reserva
FROM vn.itemShelving ish
JOIN vn.shelving sh ON sh.code = ish.shelvingFk
JOIN vn.shelving sh ON sh.id = ish.shelvingFk
JOIN vn.parking p ON p.id = sh.parkingFk
JOIN vn.sector s ON s.id = p.sectorFk
WHERE s.code = 'FUENTES_PICASSE'
@ -68,7 +68,7 @@ BEGIN
sh.isSpam
FROM vn.itemShelving ish
JOIN vn.item i ON i.id = ish.itemFk
JOIN vn.shelving sh ON sh.code = ish.shelvingFk
JOIN vn.shelving sh ON sh.id = ish.shelvingFk
JOIN vn.parking p ON p.id = sh.parkingFk
JOIN vn.sector s ON s.id = p.sectorFk
JOIN vn.warehouse w ON w.id = s.warehouseFk

View File

@ -9,7 +9,7 @@ BEGIN
JOIN vn.sale s ON s.ticketFk = t.id
JOIN vn.itemShelvingSale iss ON iss.saleFk = s.id
JOIN vn.itemShelving ish ON ish.id = iss.itemShelvingFk
JOIN vn.shelving sh ON sh.code = ish.shelvingFk
JOIN vn.shelving sh ON sh.id = ish.shelvingFk
JOIN vn.parking p ON p.id = sh.parkingFk
WHERE p.sectorFk = vSectorFk
) sub ON sub.id = td.ticketFk

View File

@ -27,7 +27,7 @@ BEGIN
SUM(ish.visible) visible,
s.warehouseFk warehouseFk
FROM itemShelving ish
JOIN shelving sh ON sh.code = ish.shelvingFk
JOIN shelving sh ON sh.id = ish.shelvingFk
JOIN parking p ON p.id = sh.parkingFk
JOIN sector s ON s.id = p.sectorFk
GROUP BY ish.itemFk,

View File

@ -28,7 +28,7 @@ BEGIN
SUM(ish.visible) visible,
s.warehouseFk warehouseFk
FROM itemShelving ish
JOIN shelving sh ON sh.code = ish.shelvingFk
JOIN shelving sh ON sh.id = ish.shelvingFk
JOIN parking p ON p.id = sh.parkingFk
JOIN sector s ON s.id = p.sectorFk
GROUP BY ish.itemFk,

View File

@ -5,122 +5,122 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_splitItemPacki
)
BEGIN
/**
* Clona y reparte las ventas de un ticket en funcion del tipo de empaquetado.
* Respeta el id inicial para el tipo propuesto.
* Separa en diferentes tickets según el tipo de empaquetado
* 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 vOriginalItemPackingTypeFk Tipo para el que se reserva el número de ticket original
* @param vSelf Id del ticket original
* @param vOriginalItemPackingTypeFk Tipo de empaquetado a mantener en el ticket original
* @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 vPackingTypesToSplit INT;
DECLARE vDone INT DEFAULT FALSE;
DECLARE vTicketFk INT;
DECLARE vSaleGroup CURSOR FOR
SELECT itemPackingTypeFk
FROM tSaleGroup
WHERE itemPackingTypeFk IS NOT NULL
ORDER BY (itemPackingTypeFk = vOriginalItemPackingTypeFk) DESC;
DECLARE vItemPackingTypes CURSOR FOR
SELECT DISTINCT itemPackingTypeFk FROM tSalesToMove;
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;
SELECT id
FROM sale
WHERE ticketFk = vSelf
AND NOT quantity
SELECT t.id INTO vTicketFk
FROM ticket t
JOIN sale s ON s.id = t.id
WHERE t.id = vSelf
FOR UPDATE;
DELETE FROM sale
WHERE NOT quantity
AND ticketFk = vSelf;
CREATE OR REPLACE TEMPORARY TABLE tSale
(PRIMARY KEY (id))
ENGINE = MEMORY
SELECT s.id, i.itemPackingTypeFk, IFNULL(sv.litros, 0) litros
INSERT INTO tSalesToMove (saleFk, itemPackingTypeFk)
SELECT s.id, i.itemPackingTypeFk
FROM sale s
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
ENGINE = MEMORY
SELECT itemPackingTypeFk, SUM(litros) totalLitros
FROM tSale
GROUP BY itemPackingTypeFk;
OPEN vItemPackingTypes;
l: LOOP
SET vIsDone = FALSE;
FETCH vItemPackingTypes INTO vCurrentPackingType;
SELECT COUNT(*) INTO vPackingTypesToSplit
FROM tSaleGroup
WHERE itemPackingTypeFk IS NOT NULL;
IF vIsDone THEN
LEAVE l;
END IF;
CREATE OR REPLACE TEMPORARY TABLE tmp.ticketIPT(
ticketFk INT,
itemPackingTypeFk VARCHAR(1)
) ENGINE = MEMORY;
CALL ticket_Clone(vSelf, vNewTicketFk);
CASE vPackingTypesToSplit
WHEN 0 THEN
INSERT INTO tmp.ticketIPT(ticketFk, itemPackingTypeFk)
VALUES(vSelf, vItemPackingTypeFk);
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;
SELECT id INTO vTicketFk
FROM ticket t
WHERE t.id = vNewTicketFk
FOR UPDATE;
INSERT INTO tmp.ticketIPT(ticketFk, itemPackingTypeFk)
VALUES(vSelf, vItemPackingTypeFk);
UPDATE tSalesToMove
SET ticketFk = vNewTicketFk
WHERE itemPackingTypeFk = vCurrentPackingType;
l: LOOP
SET vDone = FALSE;
FETCH vSaleGroup INTO vItemPackingTypeFk;
IF vCurrentPackingType = vDefaultPackingType THEN
INSERT INTO tSalesToMove (ticketFk, saleFk, itemPackingTypeFk)
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
LEAVE l;
END IF;
END LOOP;
CLOSE vItemPackingTypes;
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)
VALUES(vNewTicketFk, vItemPackingTypeFk);
END LOOP;
CLOSE vSaleGroup;
SELECT s.id
FROM sale s
JOIN tSale ts ON ts.id = s.id
JOIN tmp.ticketIPT t ON t.itemPackingTypeFk = ts.itemPackingTypeFk
FOR UPDATE;
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;
CREATE OR REPLACE TEMPORARY TABLE tmp.ticketIPT
ENGINE=MEMORY
SELECT s.ticketFk, MAX(i.itemPackingTypeFk) itemPackingTypeFk
FROM sale s
JOIN item i ON i.id = s.itemFk
WHERE s.ticketFk = vSelf
GROUP BY s.ticketFk
UNION
SELECT ticketFk, MAX(itemPackingTypeFk)
FROM tSalesToMove
GROUP BY ticketFk;
COMMIT;
DROP TEMPORARY TABLE
tSale,
tSaleGroup;
DROP TEMPORARY TABLE tSalesToMove;
END$$
DELIMITER ;

View File

@ -10,7 +10,7 @@ BEGIN
JOIN vn.entry e ON e.travelFk = tr.id
JOIN vn.buy b ON b.entryFk = e.id
WHERE tr.landed BETWEEN vFromDated AND vToDated
AND e.isRaid = FALSE
AND NOT tr.isRaid
AND tr.warehouseInFk = vWarehouseFk
GROUP BY tr.landed , a.name ;
END$$

View File

@ -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 ;

View File

@ -62,7 +62,7 @@ BEGIN
END IF;
CALL entry_cloneHeader(vAuxEntryFk, vNewEntryFk, vNewTravelFk);
CALL entry_copyBuys(vAuxEntryFk, vNewEntryFk);
CALL entry_copyBuys(vAuxEntryFk, vNewEntryFk);
SELECT evaNotes INTO vEvaNotes
FROM entry
@ -71,6 +71,8 @@ BEGIN
UPDATE entry
SET evaNotes = vEvaNotes
WHERE id = vNewEntryFk;
CALL buy_recalcPricesByEntry(vNewEntryFk);
END LOOP;
SET @isModeInventory = FALSE;

View File

@ -1,72 +1,69 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`travel_moveRaids`()
BEGIN
/*
* Desplaza al dia siguiente los travels que contengan redadas y avisa a los compradores
*
/**
* Desplaza los travels en el futuro y avisa a los compradores
*
*/
DECLARE vDone BOOL DEFAULT FALSE;
DECLARE vWorkerName VARCHAR(50);
DECLARE vRaid TEXT;
DECLARE vWorker VARCHAR(50) DEFAULT '';
DECLARE vBuyerEmail VARCHAR(40);
DECLARE vTravelLink TEXT;
DECLARE vMailBody TEXT DEFAULT '';
DECLARE vCur CURSOR FOR
SELECT GROUP_CONCAT( DISTINCT CONCAT('https://salix.verdnatura.es/#!/travel/', ttr.id, '/summary ') ORDER BY ttr.id SEPARATOR '\n\r'),
u.name
FROM tmp.travel ttr
JOIN entry e ON e.travelFk = ttr.id
SELECT GROUP_CONCAT(DISTINCT
CONCAT('https://salix.verdnatura.es/#!/travel/',
ttm.travelFk,
'/summary ')
ORDER BY ttm.travelFk SEPARATOR '\n\r') travelLink,
CONCAT(u.name, '@verdnatura.es') buyerEmail
FROM tTravelToMove ttm
JOIN entry e ON e.travelFk = ttm.travelFk
JOIN buy b ON b.entryFk = e.id
JOIN item i ON i.id = b.itemFk
JOIN itemType it ON it.id = i.typeFk
JOIN account.user u ON u.id = it.workerFk
GROUP BY u.name;
DECLARE CONTINUE HANDLER FOR NOT FOUND
SET vDone = TRUE;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
ROLLBACK;
RESIGNAL;
END;
DROP TEMPORARY TABLE IF EXISTS tmp.travel;
CREATE TEMPORARY TABLE tmp.travel
SELECT tr.id,tr.landed
FROM travel tr
JOIN entry e ON e.travelFk = tr.id
WHERE tr.landed = util.tomorrow()
AND e.isRaid
GROUP BY tr.id;
CREATE OR REPLACE TEMPORARY TABLE tTravelToMove
SELECT id travelFk,
util.VN_CURDATE() + INTERVAL daysInForward DAY newLanded
FROM travel
WHERE isRaid
AND daysInForward;
START TRANSACTION;
UPDATE travel tr
JOIN tmp.travel ttr ON ttr.id = tr.id
SET tr.landed = TIMESTAMPADD(DAY, 1, tr.landed);
JOIN tTravelToMove ttm ON ttm.travelFk = tr.id
SET tr.landed = ttm.newLanded;
OPEN vCur;
l: LOOP
SET vDone = FALSE;
FETCH vCur INTO vRaid, vWorkerName;
FETCH vCur INTO vTravelLink, vBuyerEmail;
IF vDone THEN
LEAVE l;
END IF;
CALL `vn`.`mail_insert`(CONCAT(vWorkerName, '@verdnatura.es'),
'noreply@verdnatura.es',
'Cambio de fecha en Redadas',
CONCAT('Se ha movido las siguientes redadas: \n\r ', vRaid)
);
CALL `vn`.`mail_insert`(
vBuyerEmail,
'noreply@verdnatura.es',
'Cambio de fecha en Redadas',
CONCAT('Se ha movido los siguientes travels: \n\r ', vTravelLink));
END LOOP;
CLOSE vCur;
COMMIT;
DROP TEMPORARY TABLE tmp.travel;
DROP TEMPORARY TABLE tTravelToMove;
END$$
DELIMITER ;

View File

@ -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 ;

Some files were not shown because too many files have changed in this diff Show More