Compare commits

...

295 Commits

Author SHA1 Message Date
Robert Ferrús d1c08e68d3 Merge branch 'master' into 8064-itemTagState
gitea/salix/pipeline/pr-master This commit looks good Details
2024-10-03 07:37:16 +00:00
Alex Moreno fe10f03459 Merge pull request '8062-testToMaster_2' (!3059) from 8062-testToMaster_2 into master
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3059
Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
2024-10-03 05:43:40 +00:00
Robert Ferrús e51dd897c3 Merge pull request 'master' (!3055) from master into test
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-dev This commit looks good Details
gitea/salix/pipeline/pr-master This commit looks good Details
Reviewed-on: #3055
Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
2024-10-02 09:13:09 +00:00
Pako Natek 6c31c85d72 Merge pull request '8030-testPriceDelta' (!3048) from 8030-testPriceDelta into test
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3048
Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
2024-10-02 05:54:23 +00:00
Pako Natek d87f940fff Merge branch 'test' into 8030-testPriceDelta
gitea/salix/pipeline/pr-test This commit looks good Details
2024-10-02 05:40:48 +00:00
Pako Natek 7d3c2a4a1c fix: refs #8030 schema missing in zoneGeo table
gitea/salix/pipeline/pr-test This commit looks good Details
2024-10-02 07:36:04 +02:00
Pako Natek 3c89d1e5e0 fix: refs #8030 foreign key zoneGeo 2024-10-02 07:34:57 +02:00
Pako Natek a48843a5cf feat: refs #8030 new field vn.priceDelta.zoneGeoFk 2024-10-02 07:30:49 +02:00
Javi Gallego 1cf14035d5 feat: existingRefund without ticketRefund
gitea/salix/pipeline/head This commit looks good Details
2024-10-01 15:51:30 +02:00
Javi Gallego d31340ff25 Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into test
gitea/salix/pipeline/head This commit looks good Details
2024-10-01 12:22:36 +02:00
Javi Gallego fe741fa7e1 fix: getSimilar daysInForward 2024-10-01 12:22:33 +02:00
Alex Moreno f916509b86 fix(StockBought): revert bad merge master to test
gitea/salix/pipeline/head This commit looks good Details
2024-10-01 11:30:34 +02:00
Guillermo Bonet 2b4504c954 Merge branch 'master' into test
gitea/salix/pipeline/head This commit looks good Details
2024-10-01 08:52:41 +02:00
Sergio De la torre 3ccc0c9b32 Merge pull request 'fix: refs #6868 handleUser addIsOnReservationMode' (!3042) from 6868-HandleUser into test
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3042
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-10-01 05:47:04 +00:00
Sergio De la torre b4a2be660d fix: refs #6868 handleUser addIsOnReservationMode
gitea/salix/pipeline/pr-test This commit looks good Details
2024-10-01 07:08:11 +02:00
Javi Gallego 329920389d fix: option Error
gitea/salix/pipeline/head This commit looks good Details
2024-09-30 15:49:46 +02:00
Alex Moreno 75d0c298a1 Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix into test
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-master This commit looks good Details
2024-09-30 14:38:17 +02:00
Pablo Natek 1f5c644e0f Merge pull request 'Revert "Merge pull request '7404-stockBuyed' (!2836) from 7404-stockBuyed into dev"' (!3030) from 7404-revert-commit 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: #3030
Reviewed-by: Javier Segarra <jsegarra@verdnatura.es>
2024-09-30 05:16:58 +00:00
Javier Segarra 35e4c0e76b Merge branch 'test' into 7404-revert-commit
gitea/salix/pipeline/pr-test This commit looks good Details
2024-09-27 11:01:40 +00:00
Pablo Natek f858674c8a Revert "Merge pull request '7404-stockBuyed' (!2836) from 7404-stockBuyed into dev"
gitea/salix/pipeline/pr-test This commit looks good Details
This reverts commit f6c5f41d44, reversing
changes made to 5ee5da24e1.
2024-09-27 12:01:54 +02:00
Pako Natek 52b25f53b1 Merge pull request '8030-testPriceDelta' (!3026) from 8030-testPriceDelta into test
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-dev This commit looks good Details
Reviewed-on: #3026
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-09-26 15:32:23 +00:00
Pako Natek 0edae3c144 Merge branch 'test' into 8030-testPriceDelta
gitea/salix/pipeline/pr-test This commit looks good Details
2024-09-26 12:57:29 +00:00
Alex Moreno 326c1755d6 Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix into test
gitea/salix/pipeline/head This commit looks good Details
2024-09-25 12:07:57 +02:00
Pako Natek 2b6c604fcd feat(components): refs #8030 new component bonus
gitea/salix/pipeline/pr-test Build queued... Details
With table vn.priceDelta, buyers set a range of items to be affected for a price increasing

Refs: #8030
2024-09-25 07:37:52 +02:00
Pako Natek 8c18bcd776 feat(components): refs #8030 new component bonus
With table vn.priceDelta, buyers set a range of items to be affected for a price increasing

Refs: #8030
2024-09-25 07:36:48 +02:00
Alex Moreno 45a016065d Merge pull request 'feat(travelFilter): add daysOnward' (!3008) from hotFix_travelList_daysOnward into test
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3008
Reviewed-by: Jorge Penadés <jorgep@verdnatura.es>
2024-09-24 10:21:54 +00:00
Alex Moreno 9106171b92 Merge branch 'test' into hotFix_travelList_daysOnward
gitea/salix/pipeline/pr-test This commit looks good Details
2024-09-24 09:39:21 +00:00
Alex Moreno 7dae387b7f Merge pull request '8032-devToTest_2440' (!3009) from 8032-devToTest_2440 into test
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3009
Reviewed-by: Jon Elias <jon@verdnatura.es>
2024-09-24 09:34:47 +00:00
Alex Moreno afbf084535 Merge branch 'test' into 8032-devToTest_2440
gitea/salix/pipeline/pr-test This commit looks good Details
2024-09-24 09:29:38 +00:00
Alex Moreno ae97c8a035 Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix into test
gitea/salix/pipeline/head This commit looks good Details
2024-09-24 11:29:09 +02:00
Alex Moreno 76e545d488 Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix into hotFix_travelList_daysOnward
gitea/salix/pipeline/pr-master This commit looks good Details
gitea/salix/pipeline/pr-test There was a failure building this commit Details
2024-09-24 08:35:30 +02:00
Alex Moreno 882f1eb7c2 feat(travelFilter): add daysOnward
gitea/salix/pipeline/pr-master This commit looks good Details
2024-09-23 15:30:10 +02:00
Ivan Mas f4de066d16 Merge pull request 'refactor: refs #7725 deprecate worker.isF11Allowed' (!3002) from 7725-refactorIsF11Allowed into dev
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-test This commit looks good Details
Reviewed-on: #3002
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-09-23 10:26:41 +00:00
Ivan Mas 06f8f8e95e refactor: refs #7725 deprecate worker.isF11Allowed
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-22 08:39:19 +02:00
Pako Natek ada3fbe019 Merge pull request 'feat(TPV): refs #7999 new frmLongTermStorage' (!2998) from 7999-longTermStorage into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2998
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-09-20 11:07:43 +00:00
Pako Natek e9b93ff99b Merge branch 'dev' into 7999-longTermStorage
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-20 08:13:52 +00:00
Pako Natek e8add6e614 feat(TPV): refs #7999 new frmLongTermStorage
gitea/salix/pipeline/pr-dev This commit looks good Details
Parking table foreign key updated
Old proc removed

Refs: #7999
2024-09-20 10:12:24 +02:00
Guillermo Bonet 28c38d09fd Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details
2024-09-19 16:41:08 +02:00
Guillermo Bonet 8c2e6558a3 Merge branch 'master' into test
gitea/salix/pipeline/head This commit looks good Details
2024-09-19 16:40:49 +02:00
Ivan Mas 5dec25d423 Merge pull request 'feat: refs #7343 Modify driverRouteEmail.js' (!2994) from 7343-ModifyDiverRouteEmail into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2994
Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
2024-09-19 11:07:14 +00:00
Ivan Mas 24b9dfb9a9 Merge branch 'dev' into 7343-ModifyDiverRouteEmail
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-19 10:50:44 +00:00
Ivan Mas c82c9395a4 feat: refs #7343 Requested changes
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-19 12:49:45 +02:00
Alex Moreno ccb60eee87 Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/pipeline/head There was a failure building this commit Details
2024-09-19 12:42:12 +02:00
Alex Moreno b7e712b738 Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix into test
gitea/salix/pipeline/head This commit looks good Details
2024-09-19 12:38:08 +02:00
Ivan Mas c30ecd3760 feat: refs #7343 Modify driverRouteEmail.js
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-19 12:26:06 +02:00
Alex Moreno 9efc712859 Merge pull request 'refactor(vnUser): refs #7792 use twoFactorFk and add foreignKey' (!2937) from 7792-twoFactorFk into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2937
Reviewed-by: Juan Ferrer <juan@verdnatura.es>
2024-09-18 10:41:40 +00:00
Ivan Mas 09dfacd753 Merge pull request 'refactor: refs #7934 Delete vn.MIDNIGHT function' (!2984) from 7934-DeleteVn.MIDNIGHT into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2984
Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
2024-09-18 10:14:01 +00:00
Alex Moreno 79d79f0c9b Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7792-twoFactorFk
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-18 12:03:52 +02:00
Ivan Mas 51981eda06 Merge branch 'dev' into 7934-DeleteVn.MIDNIGHT
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-18 10:01:17 +00:00
Alex Moreno e523b12536 fix: refs #7792 enable null
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-18 09:50:55 +02:00
Javier Segarra c9db888266 Merge pull request '#7677 - return more postcode fields' (!2865) from 7677_vnLocation_perf into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2865
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-09-18 07:08:42 +00:00
Javier Segarra 3783bddd2c Merge branch 'dev' into 7677_vnLocation_perf
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-18 07:05:18 +00:00
Alex Moreno c75cc87129 refactor: refs #7792 revert TwoFactorType
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-18 08:31:26 +02:00
Alex Moreno 829ecba2ef refactor: refs #7792 revert TwoFactorType
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-18 08:30:05 +02:00
Guillermo Bonet 7f9cd1e0d9 Merge pull request 'feat: refs #7893 Created waste_addSalesLauncher' (!2972) from 7893-waste_addSales into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2972
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-09-18 05:40:17 +00:00
Robert Ferrús 72feaba2d2 Merge pull request 'feat: refs #7964 entry_beforeUpdate' (!2966) from 7964-entry_getCommission into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2966
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-09-18 05:26:23 +00:00
Robert Ferrús 168e2e3e25 Merge branch 'dev' into 7964-entry_getCommission
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-18 05:19:46 +00:00
Javier Segarra 96159224a4 Merge branch 'dev' of https: refs #7677//gitea.verdnatura.es/verdnatura/salix into 7677_vnLocation_perf
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-17 16:48:09 +02:00
Ivan Mas 7cd8e535f0 refactor: refs #7934 Delete vn.MIDNIGHT function
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-17 16:19:09 +02:00
Javi Gallego 06d06d7b1a Merge pull request '3505-closureTests' (!2970) from 3505-closureTests into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2970
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-09-17 13:09:18 +00:00
Javier Segarra 7f6bd55eaa Merge branch 'dev' into 7677_vnLocation_perf
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-17 13:07:25 +00:00
Pablo Natek f6c5f41d44 Merge pull request '7404-stockBuyed' (!2836) from 7404-stockBuyed into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2836
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-09-17 11:59:48 +00:00
Pablo Natek ad6fcc0d36 Merge branch 'dev' into 7404-stockBuyed
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-17 11:57:54 +00:00
Guillermo Bonet a3022a7379 Merge branch 'dev' into 7893-waste_addSales
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-17 10:35:27 +00:00
Guillermo Bonet fa5ace677c refactor: refs #7893 Requested changes
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-17 12:35:08 +02:00
Javier Segarra f962b2e38b perf(salix): refs #7677 #7677 restore files because unnecessary change
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-17 11:44:34 +02:00
Javier Segarra 2e32dfddc4 perf(salix): refs #7677 #7677 restore files 2024-09-17 11:43:28 +02:00
Javier Segarra 3e5442c40b Merge branch 'dev' into 7677_vnLocation_perf 2024-09-17 11:42:04 +02:00
Jon Elias 5ee5da24e1 Merge pull request '#6346 Added script for wagon section' (!2968) from 6346-WagonToCard into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2968
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-09-17 09:09:46 +00:00
Jon Elias eb083d6d2b Merge branch 'dev' into 6346-WagonToCard
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-17 09:07:26 +00:00
Jon Elias bd621c7848 Merge pull request 'fix: refs #6346 fixed SQL' (!2959) from Hotfix-WagonSQL into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2959
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-09-17 09:07:14 +00:00
Jon Elias c8315714d4 Merge branch 'dev' into Hotfix-WagonSQL
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-17 09:05:17 +00:00
Pablo Natek 1036330471 Merge branch '7404-stockBuyed' of https://gitea.verdnatura.es/verdnatura/salix into 7404-stockBuyed
gitea/salix/pipeline/pr-dev Build queued... Details
2024-09-17 10:32:29 +02:00
Pablo Natek 0c259b7a81 fix: refs #7404 remove duplicate translate 2024-09-17 10:32:26 +02:00
Pablo Natek d308f185bc Merge branch 'dev' into 7404-stockBuyed
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-17 08:11:17 +00:00
Guillermo Bonet 88f434435b Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details
2024-09-17 08:42:34 +02:00
Javi Gallego e5e14878b8 feat: refs #3505 remove return
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-17 07:57:00 +02:00
Javi Gallego 361d60a8a8 Merge pull request 'feat: refs #7956 itemGetSimilar' (!2945) from 7956-itemGetSimilar into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2945
Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
2024-09-17 05:28:48 +00:00
Javi Gallego 06efa8be94 Merge branch 'dev' into 3505-closureTests 2024-09-17 07:12:01 +02:00
Alex Moreno cabc9660d6 Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/pipeline/head This commit looks good Details
2024-09-16 14:27:08 +02:00
Robert Ferrús 10fcbffd37 feat: refs #7964 entry_beforeUpdate not
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-16 13:37:35 +02:00
Guillermo Bonet 51da7ae063 feat: refs #7893 Created waste_addSalesLauncher
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-16 13:33:53 +02:00
Javi Gallego f43fa32d36 feat: refs #3505 fdescribe
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-16 13:26:53 +02:00
Javi Gallego e4a74ba0e9 feat: refs #3505 testBack closure 2024-09-16 13:24:33 +02:00
Jon Elias 3aebe88593 Merge branch 'dev' into 6346-WagonToCard
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-16 11:04:27 +00:00
Robert Ferrús e361b789f4 Merge branch 'dev' into 7964-entry_getCommission
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-16 11:03:08 +00:00
Guillermo Bonet a84817f5e3 Merge pull request 'feat: refs #7912 Added new waste types' (!2967) from 7912-wasteChanges into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2967
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-09-16 11:00:15 +00:00
Jon Elias 9aff118b6e feat: refs #6346 added script for wagons
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-16 13:00:11 +02:00
Guillermo Bonet 0d7953a869 Merge branch 'dev' into 7912-wasteChanges
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-16 10:33:23 +00:00
Guillermo Bonet 5c7a537275 feat: refs #7912 Added new waste types
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-16 12:32:52 +02:00
Robert Ferrús bdef639f78 Merge branch 'dev' into 7964-entry_getCommission
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-16 10:29:26 +00:00
Jorge Penadés f1a8e206b5 Merge pull request '#7828 makeCorrectCalls' (!2955) from 7828-makeCorrectCalls into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2955
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-09-16 10:26:49 +00:00
Robert Ferrús 7540526b9b feat: refs #7964 entry_beforeUpdate
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-16 12:26:29 +02:00
Jorge Penadés 0a0701f7c2 Merge branch 'dev' into 7828-makeCorrectCalls
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-16 10:24:36 +00:00
Pablo Natek e62e7fd798 Merge branch '7404-stockBuyed' of https://gitea.verdnatura.es/verdnatura/salix into 7404-stockBuyed
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-16 12:17:52 +02:00
Pablo Natek 1f1da689d4 fix: refs #7404 remove console log 2024-09-16 12:17:51 +02:00
Pablo Natek 88962b051f Merge branch 'dev' into 7404-stockBuyed
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-16 10:13:13 +00:00
Pablo Natek 138640f991 fix: refs #7404 update test to match new fixtures for travel by continent
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-16 12:05:36 +02:00
Guillermo Bonet 51cabd06a4 refactor: refs #7562 Deleted deprecated objects
gitea/salix/pipeline/head This commit looks good Details
2024-09-16 10:44:04 +02:00
Javi Gallego be95162d1a Merge pull request 'feat: refs #7977 muestra las facturas sin vencimientos tambien' (!2964) from 7977-supplierStatement into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2964
Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
2024-09-16 07:10:46 +00:00
Pablo Natek 8f4f2d2d15 Merge branch 'dev' of https: refs #7404//gitea.verdnatura.es/verdnatura/salix into 7404-stockBuyed
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-16 09:06:04 +02:00
Javi Gallego d7679fcb50 feat: refs #7977 muestra las facturas sin vencimientos tambien
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-16 09:01:47 +02:00
Pablo Natek cc1cd0563f feat: refs #7404 fixtures and translates
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-16 09:00:46 +02:00
Jon Elias 8b7beb7247 Merge branch 'dev' into Hotfix-WagonSQL
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-16 06:20:16 +00:00
Guillermo Bonet 5489a5edbc Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details
2024-09-16 07:16:33 +02:00
Guillermo Bonet 63dde3dd78 fix: refs #7819 Version
gitea/salix/pipeline/head This commit looks good Details
2024-09-13 14:13:14 +02:00
Ivan Mas dc57c68421 Merge pull request 'feat: refs #7819 Delete obsolete objects' (!2911) from 7819-Delete_obsolete_objects into dev
gitea/salix/pipeline/head There was a failure building this commit Details
Reviewed-on: #2911
Reviewed-by: Juan Ferrer <juan@verdnatura.es>
2024-09-13 12:02:15 +00:00
Ivan Mas dc5691fce7 Merge branch 'dev' into 7819-Delete_obsolete_objects
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-13 11:49:28 +00:00
Jon Elias 8d050a8e08 Merge branch 'dev' into Hotfix-WagonSQL
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-13 11:07:55 +00:00
Sergio De la torre 11193bebe6 Merge pull request '6868_createLogin' (!2598) from 6868_createLogin into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2598
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-09-13 09:43:31 +00:00
Jon Elias 4ba8565006 Merge branch 'dev' into Hotfix-WagonSQL
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-13 09:31:09 +00:00
Jon Elias f1f0f5920c fix: refs #6346 fixed SQL
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-13 11:29:05 +02:00
Ivan Mas 8fce0d969b Merge pull request 'refactor: refs #7923 Delete Logiflora functions' (!2954) from 7923-DeleteLogifloraFunctions into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2954
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-09-13 08:53:48 +00:00
Ivan Mas d7336b93df Merge branch 'dev' into 7923-DeleteLogifloraFunctions
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-13 08:49:11 +00:00
Javier Segarra 0d47d58b71 Merge branch '7677_vnLocation_perf' of https: refs #7677//gitea.verdnatura.es/verdnatura/salix into 7677_vnLocation_perf
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-13 09:45:09 +02:00
Javier Segarra 6f18b8a719 Merge branch 'dev' into 7677_vnLocation_perf
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-13 07:28:45 +00:00
Jorge Penadés 2dc55a706c Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7828-makeCorrectCalls
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-13 09:20:57 +02:00
Alex Moreno bbb3889154 fix: sql wagonTypeTray
gitea/salix/pipeline/head This commit looks good Details
2024-09-13 08:54:03 +02:00
Alex Moreno ebbc143152 fix: sql wagonTypeTray
gitea/salix/pipeline/head There was a failure building this commit Details
2024-09-13 08:29:41 +02:00
Jon Elias 67b901e573 Merge pull request '#6346 new WagonType section' (!2778) from 6346-FixWagonModule into dev
gitea/salix/pipeline/head There was a failure building this commit Details
Reviewed-on: #2778
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-09-13 06:16:08 +00:00
Jon Elias 99bd20bc05 Merge branch 'dev' into 6346-FixWagonModule
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-13 06:13:26 +00:00
Sergio De la torre 630e9cec1e Merge pull request 'test' (!2958) from test into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2958
Reviewed-by: Robert Ferrús <robert@verdnatura.es>
2024-09-13 05:41:50 +00:00
Sergio De la torre e80fe1d0dc feat: refs #6868 refs# 6868 handleUser
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-13 07:10:47 +02:00
Sergio De la torre 2d4e667009 feat: refs #6868 refs# 6868 handleUser
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-13 07:02:30 +02:00
Sergio De la torre 05b6c75a19 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 6868_createLogin 2024-09-13 07:02:15 +02:00
Sergio De la torre 93e7163858 feat: refs #6868 refs# 6868 handleUser 2024-09-12 17:09:27 +02:00
Guillermo Bonet 3d598a4ec4 fix: refs #7952 Version
gitea/salix/pipeline/head Build queued... Details
2024-09-12 14:57:19 +02:00
Pako Natek bd47420e82 Merge pull request 'locallyTested' (!2956) from 7969-hasPlantTray into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2956
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-09-12 12:46:43 +00:00
Pako Natek a0bfc20595 revision
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-12 14:34:19 +02:00
Pako Natek b1027f454b locallyTested
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-12 14:13:17 +02:00
Alex Moreno ccfff69e90 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/pipeline/head There was a failure building this commit Details
2024-09-12 13:26:11 +02:00
Alex Moreno 1abf6a14f9 fix: workerDms filter workerFk 2024-09-12 13:26:09 +02:00
Ivan Mas 8a1677f4e9 Merge branch 'dev' into 7923-DeleteLogifloraFunctions
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-12 11:25:45 +00:00
Ivan Mas 1c1ce485b3 Merge pull request 'refactor: refs #7952 Deprecate creditInsurance.creditClassification' (!2951) from 7952-DeprecateCreditInsurance.creditClassification into dev
gitea/salix/pipeline/head There was a failure building this commit Details
Reviewed-on: #2951
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-09-12 11:25:16 +00:00
Ivan Mas e47dfa7f5b Merge branch 'dev' into 7952-DeprecateCreditInsurance.creditClassification
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-12 11:21:57 +00:00
Guillermo Bonet 6b6eea78da feat: refs #7562 myt version increased to 1.6.11
gitea/salix/pipeline/head This commit looks good Details
2024-09-12 13:21:01 +02:00
Jorge Penadés 36d8e88ac3 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7828-makeCorrectCalls
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-12 13:10:56 +02:00
Ivan Mas 4f9eb865d0 Merge branch 'dev' into 7952-DeprecateCreditInsurance.creditClassification
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-12 10:27:27 +00:00
Ivan Mas 37900daf9e Merge branch 'dev' into 7923-DeleteLogifloraFunctions
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-12 10:19:51 +00:00
Guillermo Bonet 2f6a80a746 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/pipeline/head This commit looks good Details
2024-09-12 11:02:42 +02:00
Guillermo Bonet b6cba2325a feat: refs #7562 myt version increased to 1.6.10 2024-09-12 11:02:41 +02:00
Jorge Penadés edccd95fa1 fix: refs #7828 rollback
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-12 10:29:03 +02:00
Jorge Penadés b2bc095caa fix: refs #7828 rollback
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-12 10:28:29 +02:00
Jorge Penadés 74fafdf330 fix: refs #7828 filter mail access
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-12 10:27:18 +02:00
Guillermo Bonet fcfef2a970 Merge pull request 'refactor: refs #7900 Deleted sectorProdPriority column' (!2941) from 7900-sectorProdPriority into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2941
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-09-12 08:21:32 +00:00
Guillermo Bonet bb97ccb6bb Merge pull request 'feat: refs #7562 Created deleteDeprecatedObjects' (!2627) from 7562-deleteDeprecatedObjects into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2627
Reviewed-by: Juan Ferrer <juan@verdnatura.es>
2024-09-12 08:08:16 +00:00
Jorge Penadés 6f81ca08db Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7828-makeCorrectCalls
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-12 09:55:03 +02:00
Alex Moreno 9435ce8c5b Merge pull request '7182-workerDms_optimization' (!2946) from 7182-workerDms_optimization into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2946
Reviewed-by: Jorge Penadés <jorgep@verdnatura.es>
2024-09-12 07:28:07 +00:00
Jorge Penadés f1f10d1367 refactor: refs #7828 wip 2024-09-12 09:15:07 +02:00
Guillermo Bonet 6075ec6518 feat: refs #7562 Requested changes
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-12 09:06:03 +02:00
Jon Elias d36ce6bf99 Merge branch 'dev' into 6346-FixWagonModule
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-12 05:43:17 +00:00
Guillermo Bonet f46b3122a6 Merge pull request 'refactor: refs #7895 workerDocument to workerDms' (!2953) from 7895-workerDms into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2953
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-09-12 05:39:41 +00:00
Jon Elias 0100e03562 Merge branch '6346-FixWagonModule' of https://gitea.verdnatura.es/verdnatura/salix into 6346-FixWagonModule
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-12 07:36:57 +02:00
Jon Elias a73bdfe18f Merge branch 'dev' of https: refs #6346//gitea.verdnatura.es/verdnatura/salix into 6346-FixWagonModule 2024-09-12 07:36:55 +02:00
Javier Segarra 504e2f0ed2 Merge branch 'dev' into 7956-itemGetSimilar
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-11 17:42:05 +00:00
Ivan Mas 0feb44e404 refactor: refs #7923 Delete Logiflora functions
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-11 15:07:37 +02:00
Guillermo Bonet 728c40916c refactor: refs #7895 workerDocument to workerDms
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-11 14:38:58 +02:00
Guillermo Bonet 956058c10c Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details
2024-09-11 14:19:51 +02:00
Ivan Mas d15be5100d refactor: refs #7952 Deprecate creditInsurance.creditClassification
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-11 13:42:04 +02:00
Guillermo Bonet 6b5f59a09b Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details
2024-09-11 12:54:27 +02:00
Guillermo Bonet 479fc02245 Merge pull request 'feat: refs #6727 Added util logClean' (!2602) from 6727-logClean into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2602
Reviewed-by: Juan Ferrer <juan@verdnatura.es>
2024-09-11 10:48:02 +00:00
Javier Segarra ace4e6975d Merge pull request 'refs #6156 new field' (!1718) from 6156-advanceTicketsNewField into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #1718
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-09-11 10:27:05 +00:00
Guillermo Bonet 2a41fc6fc4 Merge branch 'dev' into 6727-logClean
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-11 09:25:52 +00:00
Javi Gallego 10f7583587 feat: refs #7956 sin AS
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-11 11:22:22 +02:00
Alex Moreno 17fecf6dcb Merge branch '7182-workerDms_optimization' of https://gitea.verdnatura.es/verdnatura/salix into 7182-workerDms_optimization
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-11 10:31:44 +02:00
Alex Moreno c21da8d258 fix: refs #7182 function name 2024-09-11 10:31:43 +02:00
Alex Moreno e062088f1e Merge branch 'dev' into 7182-workerDms_optimization
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-11 08:29:38 +00:00
Pablo Natek 842c98edfc Merge branch 'dev' into 6156-advanceTicketsNewField
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-11 08:22:24 +00:00
Pablo Natek 92f305b9fd fix: refs #6156 proc and version 2024-09-11 10:19:55 +02:00
Jorge Penadés d699d9f60c Merge pull request '#7663 setWeight' (!2817) from 7663-setWeight into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2817
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-09-11 07:40:31 +00:00
Jorge Penadés 2ee0c93e24 chore: refs #7663 fix test
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-11 09:35:26 +02:00
Jorge Penadés 249646236a Merge branch '7663-setWeight' of https://gitea.verdnatura.es/verdnatura/salix into 7663-setWeight
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-11 09:30:31 +02:00
Jorge Penadés 558ab6eba2 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7663-setWeight 2024-09-11 09:30:18 +02:00
Alex Moreno a65506aebd Merge branch 'dev' into 7663-setWeight
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-11 06:35:01 +00:00
Javier Segarra 0aadb6d70f Merge pull request '#5938 - fine_ticketAdvance' (!2940) from 5938_fine_ticketAdvance into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2940
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-09-11 06:29:34 +00:00
Alex Moreno 63866a34da Merge branch 'dev' into 6346-FixWagonModule
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-11 06:21:31 +00:00
Alex Moreno fbfbf21e06 fix: refs #7182 unnesesary file
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-11 08:17:18 +02:00
Alex Moreno 8dc83e2444 feat: refs #7182 optimize workerDms filter 2024-09-11 08:16:21 +02:00
Javi Gallego ed8cf628a5 feat: refs #7956 tabulaciones
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-11 08:15:32 +02:00
Javi Gallego 6ae15a8e64 feat: refs #7956 definer 2024-09-11 08:13:28 +02:00
Javi Gallego 56e6a7e6aa feat: refs #7956 parametro daysInForward 2024-09-11 08:10:21 +02:00
Alex Moreno e7d3062208 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7182-workerDms_optimization 2024-09-11 08:07:29 +02:00
Sergio De la torre b492a1e6a8 feat: refs #6868 refs# 6868 handleUser
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-11 08:05:26 +02:00
Sergio De la torre f7f7df55f5 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 6868_createLogin 2024-09-11 08:00:07 +02:00
Pablo Natek 8607a60ca7 feat: refs #7404 format date before select
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-11 07:56:08 +02:00
Javier Segarra f487aed336 Merge branch 'dev' into 5938_fine_ticketAdvance
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-10 14:16:56 +00:00
Jorge Penadés ff61a7d88f Merge pull request '#4074 useAcls' (!2827) from 4074-useAcls into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2827
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-09-10 11:50:34 +00:00
Jorge Penadés 85c50db19e Merge branch 'dev' into 4074-useAcls
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-10 11:45:09 +00:00
Guillermo Bonet 68063fdc52 Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details
2024-09-10 12:58:38 +02:00
Alex Moreno bb27f0f1f5 build: init version 2440
gitea/salix/pipeline/head This commit looks good Details
2024-09-10 10:34:28 +02:00
Jorge Penadés 91abf2eefe refactor: refs #7663 accurate error
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-10 09:50:02 +02:00
Jorge Penadés e2ef3472b5 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7663-setWeight
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-10 09:41:46 +02:00
Javi Gallego 1c0e148233 fix: cau #217599
gitea/salix/pipeline/head This commit looks good Details
2024-09-10 09:08:43 +02:00
Jon Elias 3fd9b8195b Merge branch 'dev' into 6346-FixWagonModule
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-10 05:53:49 +00:00
Jon Elias 9759715609 fix: refs #6346 created test
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-10 07:52:09 +02:00
Jon Elias 0593ea9a30 Merge branch '6346-FixWagonModule' of https://gitea.verdnatura.es/verdnatura/salix into 6346-FixWagonModule
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-10 07:50:42 +02:00
Jon Elias 125c0c9b3b refactor: refs #6346 requested changes 2024-09-10 07:50:40 +02:00
Jorge Penadés eadff638f9 chore: refs #4074 drop focus
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-09 15:59:40 +02:00
Jorge Penadés 45649359be chore: refs #4074 fix test
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-09 15:59:17 +02:00
Javier Segarra c407dde7a0 feat(salix): refs #6156 #6156 remove redundant condition 2024-09-09 15:14:01 +02:00
Jorge Penadés 579ac481f3 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 4074-useAcls
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-09 15:13:52 +02:00
Javier Segarra 615f57b2e6 feat(salix): refs #6156 #6156 simplify CONCAT_WS 2024-09-09 15:13:32 +02:00
Javier Segarra f9a25617f0 feat(salix): refs #6156 #6156 add missing values 2024-09-09 15:13:08 +02:00
Javier Segarra f70f475223 feat(salix): refs #6156 #6156 change user definer 2024-09-09 15:12:44 +02:00
Javier Segarra 773933ca3c feat(salix): refs #6156 #6156 change config sql 2024-09-09 15:11:55 +02:00
Alex Moreno 1aa888b1a3 feat(WorkerDms_filter): refs #7182 split code. fix: filter 2024-09-09 15:11:09 +02:00
Javier Segarra a5f6fe95ea feat(salix): refs #5938 #5938 add futureAlertLevel
gitea/salix/pipeline/pr-dev Build queued... Details
2024-09-09 14:58:02 +02:00
Guillermo Bonet bf1a43a23e refactor: refs #7900 Deleted sectorProdPriority column
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-09 14:43:16 +02:00
Javier Segarra 89c2d2705c feat(salix): refs #5938 #5938 change value-field 2024-09-09 14:21:59 +02:00
Javier Segarra f15b33778c feat(salix): refs #5938 #5938 replace variables 2024-09-09 14:21:42 +02:00
Javier Segarra 38ee76f7c9 Merge branch 'dev' into 6156-advanceTicketsNewField 2024-09-09 12:20:02 +00:00
Jorge Penadés 26be5b292b Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 4074-useAcls
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-09 14:18:01 +02:00
Jorge Penadés 6e511f00c0 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 4074-useAcls
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-09 13:58:46 +02:00
Javier Segarra 2fef104954 Merge branch 'dev' into 6156-advanceTicketsNewField 2024-09-09 10:48:20 +00:00
Javier Segarra 31b04cba75 feat(salix): refs #6156 #6156 Move to myt version 2024-09-09 12:08:12 +02:00
Alex Moreno ae15d51341 Merge branch 'dev' into 7792-twoFactorFk
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-09 08:39:36 +00:00
Javier Segarra 378ee1119f Merge branch 'dev' of https: refs #6156//gitea.verdnatura.es/verdnatura/salix into 6156-advanceTicketsNewField 2024-09-09 10:18:10 +02:00
Jon Elias c93275b62d Merge branch 'dev' into 6346-FixWagonModule
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-09 08:06:04 +00:00
Jorge Penadés 18ec76d156 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 4074-useAcls
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-09 10:03:22 +02:00
Alex Moreno 71eb44d083 refactor(vnUser): refs #7792 use twoFactorFk and add foreignKey
gitea/salix/pipeline/pr-dev Build queued... Details
2024-09-09 09:58:20 +02:00
Guillermo Bonet 261bebbc3b feat: refs #6727 Deleted duplicated indexes
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-09 09:41:40 +02:00
Guillermo Bonet 56eb3e093d feat: refs #6727 Added indexes in creationDate
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-09 09:39:10 +02:00
Guillermo Bonet 7053f2786a Merge branch 'dev' into 6727-logClean 2024-09-09 09:38:40 +02:00
Jon Elias b3aa263cea Merge branch 'dev' of https: refs #6346//gitea.verdnatura.es/verdnatura/salix into 6346-FixWagonModule
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-09 07:32:11 +02:00
Jorge Penadés c43c61991d Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 4074-useAcls
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-06 14:22:57 +02:00
Jorge Penadés 901cdc7117 feat: refs #4074 modify acls
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-06 14:18:15 +02:00
Jorge Penadés 99ce158632 chore: refs #7663 return correct type
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-06 11:33:15 +02:00
Jorge Penadés 26d47b3f38 Merge branch 'dev' of https: refs #7663//gitea.verdnatura.es/verdnatura/salix into 7663-setWeight
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-06 11:29:53 +02:00
Ivan Mas 900e840eec Merge branch 'dev' into 7819-Delete_obsolete_objects
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-06 07:43:06 +00:00
Guillermo Bonet 4daea90b1b feat: refs #7562 refs #7759 Requested changes
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-06 08:25:21 +02:00
Guillermo Bonet 925002256a Merge branch 'dev' into 7562-deleteDeprecatedObjects
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-06 05:49:20 +00:00
Guillermo Bonet 7486c4a3c6 feat: refs #7562 refs #7532 Requested changes
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-06 07:48:53 +02:00
Jorge Penadés 998d3865a3 chore: refs #7663 fix test
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-05 08:56:15 +02:00
Jorge Penadés df5961a2a2 feat: refs #7663 wip test
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-04 11:41:47 +02:00
Jorge Penadés 544ddb0f15 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7663-setWeight
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-04 10:39:46 +02:00
Jorge Penadés 9797d5e219 feat: refs #7663 return created invoice ids
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-03 17:33:44 +02:00
Sergio De la torre 36cf6b1aee feat: refs #6868 refs# 6868 handleUser
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-03 16:50:55 +02:00
Jorge Penadés a07582faa4 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7663-setWeight
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-03 16:22:04 +02:00
Jon Elias 26876fd0a6 Merge branch 'dev' of https: refs #6346//gitea.verdnatura.es/verdnatura/salix into 6346-FixWagonModule
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-03 14:35:59 +02:00
Jon Elias 29b0851741 refactor: refs #6346 hook added in wagon-type-tray model
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-03 14:35:05 +02:00
Ivan Mas 690898630c Merge branch 'dev' into 7819-Delete_obsolete_objects
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-03 10:35:47 +00:00
Ivan Mas d330529bf2 feat: refs #7819 Delete obsolete objects
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-03 12:33:26 +02:00
Jorge Penadés a0ac2be203 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7663-setWeight
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-03 09:08:56 +02:00
Pablo Natek e20ef7c699 Merge branch 'dev' of https: refs #7404//gitea.verdnatura.es/verdnatura/salix into 7404-stockBuyed
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-03 07:50:41 +02:00
Jorge Penadés 4c5f5c8324 fix: refs #7663 conflicts
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-02 17:08:23 +02:00
Jorge Penadés b83e548feb Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7663-setWeight
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-02 17:02:00 +02:00
Guillermo Bonet f15fd66e48 Merge branch 'dev' into 7562-deleteDeprecatedObjects
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-02 07:57:10 +02:00
Guillermo Bonet 2ba391fc85 feat: refs #7562 Deleted deleteDeprecatedObjects objects
gitea/salix/pipeline/pr-dev Build queued... Details
2024-09-02 07:57:00 +02:00
Jorge Penadés 4a3faebe7d Merge branch 'dev' of https: refs #7663//gitea.verdnatura.es/verdnatura/salix into 7663-setWeight
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-08-26 16:59:40 +02:00
Jon Elias ec4b8b9e4f Merge branch '6346-FixWagonModule' of https://gitea.verdnatura.es/verdnatura/salix into 6346-FixWagonModule 2024-08-21 13:25:29 +02:00
Javier Segarra b594011433 feat(salix): refs #7677 #7677 return more postcode fields 2024-08-20 07:01:13 +02:00
Javier Segarra 8fad522a3e feat(salix): refs #7677 #7677 return more postcode fields
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-08-19 12:45:06 +02:00
Jorge Penadés 57a1de7f13 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7663-setWeight
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-08-14 16:29:12 +02:00
Jorge Penadés 6c9676ce9c chore: refs #7663 fix logic
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-08-13 14:52:26 +02:00
Jorge Penadés 52d62710e6 chore: refs #7663 fix logic
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-08-13 13:49:00 +02:00
Jorge Penadés 85f064c869 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7663-setWeight
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-08-13 11:41:52 +02:00
Jorge Penadés c742f6f79d Merge branch 'dev' of https: refs #7663//gitea.verdnatura.es/verdnatura/salix into 7663-setWeight
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-08-12 16:59:28 +02:00
Pablo Natek b636b5429a fix: refs #7404 refactor fixtures
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-08-09 08:20:42 +02:00
Pablo Natek 323ab638d7 fix: refs #7404 fix fixtures and back test
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-08-05 15:55:44 +02:00
Pablo Natek 0e7272f911 fix: refs #7404 fix error message
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-08-05 15:42:21 +02:00
Pablo Natek f148635c68 Merge branch 'dev' of https: refs #7404//gitea.verdnatura.es/verdnatura/salix into 7404-stockBuyed 2024-08-05 15:41:41 +02:00
Pablo Natek 6d25cb3c8c fix: refs #7404 fix translation
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-08-05 15:35:48 +02:00
Pablo Natek 47543d5760 refactor: refs #7404 remove console.log 2024-08-05 15:34:01 +02:00
Pablo Natek 961fafb33e feat: refs #7404 stockBought add and calculate 2024-08-05 15:32:36 +02:00
Jorge Penadés 388ab80f46 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7663-setWeight
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-07-31 10:46:45 +02:00
Jorge Penadés 57f6c6d9a1 chore: refs #7663 WIP setWeight
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-07-31 10:43:55 +02:00
Jon Elias 9e844c15b7 Merge branch 'dev' into 6346-FixWagonModule
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-07-25 05:07:32 +00:00
Jon Elias 9cf5f8759f Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 6346-FixWagonModule 2024-07-24 07:34:44 +02:00
Jon Elias 03523afff1 Merge branch 'dev' into 6346-FixWagonModule
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-07-23 11:26:59 +00:00
Jon Elias 2568ac4e92 feat: refs #6346 new wagon type section
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-07-23 13:24:43 +02:00
Guillermo Bonet 9466c7e529 Merge branch 'dev' into 6727-logClean
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-07-19 07:30:07 +00:00
Guillermo Bonet c94ca96226 feat: #6727 Minor changes
gitea/salix/pipeline/pr-dev Build queued... Details
2024-07-19 09:29:42 +02:00
Guillermo Bonet 1133750629 feat: #6727 Requested changes
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-07-19 09:29:15 +02:00
Guillermo Bonet 3cf5555612 feat: refs #6727 Fixes
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-07-19 08:58:51 +02:00
Guillermo Bonet 930e2951b7 feat: refs #6727 Added started and finished
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-07-19 08:27:39 +02:00
Sergio De la torre a82df8e2a2 feat handleUser refs #6868
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-07-16 17:20:35 +02:00
Sergio De la torre 7870416860 feat handleUser refs #6868
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-07-16 17:08:38 +02:00
Sergio De la torre 144cf20e71 feat handleUser refs #6868
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-07-16 10:14:19 +02:00
Sergio De la torre ae6963c26d feat handleUser refs #6868
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-07-16 08:19:13 +02:00
Sergio De la torre ac0c3b79b4 feat createLogin refs #6868 2024-07-15 15:51:52 +02:00
Guillermo Bonet aedc8071e1 feat: refs #7562 Changes
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-06-21 14:27:22 +02:00
Guillermo Bonet c0668d054f feat: refs #7562 Changes
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-06-21 13:51:33 +02:00
Guillermo Bonet c330e8c715 feat: refs #7562 Minor change
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-06-21 13:24:20 +02:00
Guillermo Bonet d61e32917a feat: refs #7562 Created deleteDeprecatedObjects
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-06-21 13:22:59 +02:00
Guillermo Bonet 4880d1497f feat: refs #6727 Added util logClean
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-06-18 08:40:33 +02:00
Sergio De la torre c6da9e72e0 feat newLogin refs #6868
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-06-17 16:53:06 +02:00
Sergio De la torre 0ab620b485 feat newLogin refs #6868 2024-06-17 16:50:00 +02:00
Sergio De la torre 9d5d62afaf feat newLogin refs #6868
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-06-17 13:56:58 +02:00
Sergio De la torre 60f64ff74b Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 6868_createLogin 2024-06-17 07:35:57 +02:00
Sergio De la torre 52b82603d2 feat login-app refs #6868 2024-06-13 10:40:37 +02:00
Sergio De la torre 5c3ce40bbd feat login-app refs #6868 2024-06-11 07:12:47 +02:00
Sergio De la torre 379ad6a8e2 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 6868_createLogin 2024-06-10 11:37:01 +02:00
Sergio De la torre d1214a998a feat: login refs #6868 2024-06-06 07:01:55 +02:00
Pablo Natek 147ae85a6e Merge branch 'dev' into 6156-advanceTicketsNewField
gitea/salix/pipeline/head There was a failure building this commit Details
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2023-08-24 11:44:44 +00:00
Pablo Natek 78eba23d12 refs #6156 new field
gitea/salix/pipeline/head There was a failure building this commit Details
2023-08-24 13:44:15 +02:00
158 changed files with 1769 additions and 1531 deletions

View File

@ -12,9 +12,8 @@ const ticket1 = {
'addressFk': 1,
'agencyModeFk': 999
};
let expedition;
const expedition1 = {
'id': 17,
'agencyModeFk': 999,
'ticketFk': 44,
'freightItemFk': 71,
@ -47,7 +46,7 @@ describe('MRWConfig createShipment()', () => {
await createMrwConfig();
await models.Ticket.create(ticket1);
await models.Expedition.create(expedition1);
expedition = await models.Expedition.create(expedition1);
});
afterAll(async() => {
@ -93,7 +92,7 @@ describe('MRWConfig createShipment()', () => {
}
it('should create a shipment and return a base64Binary label', async() => {
const {file} = await models.MrwConfig.createShipment(expedition1.id);
const {file} = await models.MrwConfig.createShipment(expedition.id);
expect(file).toEqual(mockBase64Binary);
});
@ -101,7 +100,7 @@ describe('MRWConfig createShipment()', () => {
it('should fail if mrwConfig has no data', async() => {
let error;
await models.MrwConfig.destroyAll();
await models.MrwConfig.createShipment(expedition1.id).catch(e => {
await models.MrwConfig.createShipment(expedition.id).catch(e => {
error = e;
}).finally(async() => {
expect(error.message).toEqual(`MRW service is not configured`);
@ -126,7 +125,7 @@ describe('MRWConfig createShipment()', () => {
yesterday.setDate(yesterday.getDate() - 1);
await models.Ticket.updateAll({id: ticket1.id}, {shipped: yesterday});
await models.MrwConfig.createShipment(expedition1.id).catch(e => {
await models.MrwConfig.createShipment(expedition.id).catch(e => {
error = e;
}).finally(async() => {
expect(error.message).toEqual(`This ticket has a shipped date earlier than today`);
@ -136,7 +135,7 @@ describe('MRWConfig createShipment()', () => {
it('should send mail if you are past the dead line and is not notified today', async() => {
await models.MrwConfig.updateAll({id: 1}, {expeditionDeadLine: '10:00:00', notified: null});
await models.MrwConfig.createShipment(expedition1.id);
await models.MrwConfig.createShipment(expedition.id);
const notification = await getLastNotification();
expect(notification.notificationFk).toEqual(filter.notificationFk);
@ -144,7 +143,7 @@ describe('MRWConfig createShipment()', () => {
it('should send mail if you are past the dead line and it is notified from another day', async() => {
await models.MrwConfig.updateAll({id: 1}, {expeditionDeadLine: '10:00:00', notified: new Date()});
await models.MrwConfig.createShipment(expedition1.id);
await models.MrwConfig.createShipment(expedition.id);
const notification = await getLastNotification();
expect(notification.notificationFk).toEqual(filter.notificationFk);
@ -152,7 +151,7 @@ describe('MRWConfig createShipment()', () => {
it('should not send mail if you are past the dead line and it is notified', async() => {
await models.MrwConfig.updateAll({id: 1}, {expeditionDeadLine: '10:00:00', notified: Date.vnNew()});
await models.MrwConfig.createShipment(expedition1.id);
await models.MrwConfig.createShipment(expedition.id);
const notification = await getLastNotification();
expect(notification).toEqual(null);

View File

@ -29,7 +29,7 @@ describe('Postcode filter()', () => {
}
}, options);
expect(results.length).toEqual(4);
expect(results.length).toEqual(5);
await tx.rollback();
} catch (e) {
await tx.rollback();
@ -63,7 +63,7 @@ describe('Postcode filter()', () => {
search: 'one',
}}, options);
expect(results.length).toEqual(4);
expect(results.length).toEqual(5);
await tx.rollback();
} catch (e) {
await tx.rollback();

View File

@ -26,7 +26,7 @@ module.exports = Self => {
description: 'The user lang'
}, {
arg: 'twoFactor',
type: 'string',
type: 'any',
description: 'The user twoFactor'
}
],

View File

@ -165,7 +165,8 @@
"hasGrant",
"realm",
"email",
"emailVerified"
"emailVerified",
"twoFactor"
]
}
}

View File

@ -335,21 +335,21 @@ INSERT INTO `vn`.`payDem`(`id`, `payDem`)
(2, 20),
(7, 0);
INSERT INTO `vn`.`autonomy`(`id`, `name`, `countryFk`)
INSERT INTO `vn`.`autonomy`(`id`, `name`, `countryFk`, `hasDailyInvoice`)
VALUES
(1, 'Autonomy one', 1),
(2, 'Autonomy two', 1),
(3, 'Autonomy three', 2),
(4, 'Autonomy four', 13);
(1, 'Autonomy one', 1, 1),
(2, 'Autonomy two', 1, 0),
(3, 'Autonomy three', 2, 0),
(4, 'Autonomy four', 13, 0);
INSERT INTO `vn`.`province`(`id`, `name`, `countryFk`, `autonomyFk`, `warehouseFk`)
VALUES
(1, 'Province one', 1, 1, NULL),
(2, 'Province two', 1, 1, NULL),
(3, 'Province three', 30, 2, NULL),
(4, 'Province four', 2, 3, NULL),
(5, 'Province five', 13, 4, NULL);
(1, 'Province one', 1, 1, NULL),
(2, 'Province two', 1, 1, NULL),
(3, 'Province three', 30, 2, NULL),
(4, 'Province four', 2, 3, NULL),
(5, 'Province five', 13, 4, NULL);
INSERT INTO `vn`.`town`(`id`, `name`, `provinceFk`)
VALUES
@ -365,6 +365,7 @@ INSERT INTO `vn`.`postCode`(`code`, `townFk`, `geoFk`)
('46460', 2, 6),
('46680', 3, 6),
('46600', 4, 7),
('46600',1, 6),
('EC170150', 5, 8);
INSERT INTO `vn`.`clientType`(`code`, `type`)
@ -397,7 +398,7 @@ INSERT INTO `vn`.`client`(`id`,`name`,`fi`,`socialName`,`contact`,`street`,`city
(1107, 'Hank Pym', '09854837G', 'ANT MAN', 'Hawk', 'ANTHILL, SAN FRANCISCO, CALIFORNIA', 'Gotham', 46460, 1111111111, 222222222, 1, 'HankPym@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 0, 0, NULL, 0, 0, 19, 0, 'florist','normal'),
(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, NULL, 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, NULL, 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, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 0, 0, NULL, 0, 0, NULL, 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, NULL, 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, NULL, 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, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 0, 1, 0, NULL, 1, 0, NULL, 0, 'others','loses');
@ -821,10 +822,10 @@ INSERT INTO `vn`.`ticketTracking`(`ticketFk`, `stateFk`, `userFk`, `created`)
(12, 3, 19, util.VN_NOW()),
(13, 3, 19, util.VN_NOW()),
(14, 3, 19, util.VN_NOW()),
(15, 2, 19, util.VN_NOW()),
(15, 10, 19, util.VN_NOW()),
(16, 3, 19, util.VN_NOW()),
(17, 2, 19, util.VN_NOW()),
(18, 2, 19, util.VN_NOW()),
(37, 10, 19, util.VN_NOW()),
(19, 2, 19, util.VN_NOW()),
(20, 1, 19, DATE_ADD(util.VN_NOW(), INTERVAL +1 MONTH)),
(21, 1, 19, DATE_ADD(util.VN_NOW(), INTERVAL +1 MONTH)),
@ -1031,19 +1032,20 @@ INSERT INTO `vn`.`expeditionStateType`(`id`, `description`, `code`)
INSERT INTO `vn`.`expedition`(`id`, `agencyModeFk`, `ticketFk`, `freightItemFk`, `created`, `counter`, `workerFk`, `externalId`, `packagingFk`, `stateTypeFk`, `hostFk`)
VALUES
(1, 1, 1, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 18, 'UR9000006041', 94, 1, 'pc1'),
(2, 1, 1, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 18, 'UR9000006041', 94, 1, NULL),
(3, 1, 1, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 3, 18, 'UR9000006041', 94, 2, NULL),
(4, 1, 1, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 4, 18, 'UR9000006041', 94, 2, NULL),
(5, 1, 2, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 18, NULL, 94, 3, NULL),
(6, 7, 3, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), 1, 18, NULL, 94, 3, NULL),
(7, 2, 4, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH), 1, 18, NULL, 94, NULL,NULL),
(8, 3, 5, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH), 1, 18, NULL, 94, 1, NULL),
(9, 3, 6, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 18, NULL, 94, 2, NULL),
(10, 7, 7, 71, util.VN_NOW(), 1, 18, NULL, 94, 3, NULL),
(11, 7, 8, 71, util.VN_NOW(), 1, 18, NULL, 94, 3, NULL),
(12, 7, 9, 71, util.VN_NOW(), 1, 18, NULL, 94, 3, NULL),
(13, 1, 10,71, util.VN_NOW(), 1, 18, NULL, 94, 3, NULL);
(1, 1, 1, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 18, 'UR9000006041', 94, 1, 'pc1'),
(2, 1, 1, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 18, 'UR9000006041', 94, 1, NULL),
(3, 1, 1, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 3, 18, 'UR9000006041', 94, 2, NULL),
(4, 1, 1, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 4, 18, 'UR9000006041', 94, 2, NULL),
(5, 1, 2, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 18, NULL, 94, 3, NULL),
(6, 7, 3, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), 1, 18, NULL, 94, 3, NULL),
(7, 2, 4, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH), 1, 18, NULL, 94, NULL,NULL),
(8, 3, 5, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH), 1, 18, NULL, 94, 1, NULL),
(9, 3, 6, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 18, NULL, 94, 2, NULL),
(10, 7, 7, 71, util.VN_NOW(), 1, 18, NULL, 94, 3, NULL),
(11, 7, 8, 71, util.VN_NOW(), 1, 18, NULL, 94, 3, NULL),
(12, 7, 9, 71, util.VN_NOW(), 1, 18, NULL, 94, 3, NULL),
(13, 1, 10, 71, util.VN_NOW(), 1, 18, NULL, 94, 3, NULL),
(14, 1, 37, 71, util.VN_NOW(), 1, 18, NULL, 94, 3, NULL);
INSERT INTO `vn`.`expeditionState`(`id`, `created`, `expeditionFk`, `typeFk`, `userFk`)
@ -1478,7 +1480,8 @@ INSERT INTO `vn`.`ticketWeekly`(`ticketFk`, `weekDay`)
(2, 1),
(3, 2),
(5, 6),
(15, 6);
(15, 6),
(17, 6);
INSERT INTO `vn`.`awb` (id, code, package, weight, created, amount, transitoryFk, taxFk)
VALUES
@ -1521,23 +1524,23 @@ INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `isConfirmed
INSERT INTO `vn`.`entryConfig` (`defaultEntry`, `inventorySupplierFk`, `defaultSupplierFk`)
VALUES (2, 4, 1);
INSERT INTO `bs`.`waste`(`buyerFk`, `year`, `week`, `itemFk`, `itemTypeFk`, `saleTotal`, `saleWasteQuantity`, `saleInternalWaste`, `saleExternalWaste`)
INSERT INTO `bs`.`waste`(`buyerFk`, `year`, `week`, `itemFk`, `itemTypeFk`, `saleTotal`, `saleWasteQuantity`, `saleExternalWaste`, `saleFaultWaste`, `saleContainerWaste`, `saleBreakWaste`, `saleOtherWaste`)
VALUES
('35', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 1, 1, '1062', '51', '56.20', '56.20'),
('35', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 2, 1, '35074', '687', '53.12', '89.69'),
('35', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 3, 1, '1777', '13', '12.02', '53.12'),
('35', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 4, 1, '3182', '59', '51', '56.20'),
('35', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 5, 1, '1747', '13', '53.12', '53.12'),
('35', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 6, 1, '7182', '59', '51', '53.12'),
('35', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 7, 1, '1777', '13', '89.69', '89.69'),
('35', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 8, 1, '4181', '59', '53.12', '53.12'),
('35', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 9, 1, '7268', '59', '12.02', '56.20'),
('103', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 2, 1, '-74', '0', '51', '89.69'),
('103', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 3, 1, '-7', '0', '12.02', '53.12'),
('103', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 4, 1, '1100', '0', '51', '56.20'),
('103', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 5, 1, '848', '-187', '12.02', '89.69'),
('103', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 6, 1, '186', '0', '51', '53.12'),
('103', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 7, 1, '277', '0', '53.12', '56.20');
('35', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 1, 1, '1062', '51', '56.20', '56.20', '56.20', '56.20', '56.20'),
('35', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 2, 1, '35074', '687', '53.12', '89.69', '56.20', '56.20', '56.20'),
('35', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 3, 1, '1777', '13', '12.02', '53.12', '56.20', '56.20', '56.20'),
('35', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 4, 1, '3182', '59', '51', '56.20', '56.20', '56.20', '56.20'),
('35', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 5, 1, '1747', '13', '53.12', '53.12', '56.20', '56.20', '56.20'),
('35', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 6, 1, '7182', '59', '51', '53.12', '56.20', '56.20', '56.20'),
('35', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 7, 1, '1777', '13', '89.69', '89.69', '56.20', '56.20', '56.20'),
('35', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 8, 1, '4181', '59', '53.12', '53.12', '56.20', '56.20', '56.20'),
('35', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 9, 1, '7268', '59', '12.02', '56.20', '56.20', '56.20', '56.20'),
('103', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 2, 1, '-74', '0', '51', '89.69', '56.20', '56.20', '56.20'),
('103', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 3, 1, '-7', '0', '12.02', '53.12', '56.20', '56.20', '56.20'),
('103', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 4, 1, '1100', '0', '51', '56.20', '56.20', '56.20', '56.20'),
('103', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 5, 1, '848', '-187', '12.02', '89.69', '56.20', '56.20', '56.20'),
('103', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 6, 1, '186', '0', '51', '53.12', '56.20', '56.20', '56.20'),
('103', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 7, 1, '277', '0', '53.12', '56.20', '56.20', '56.20', '56.20');
INSERT INTO `vn`.`buy`(`id`,`entryFk`,`itemFk`,`buyingValue`,`quantity`,`packagingFk`,`stickers`,`freightValue`,`packageValue`,`comissionValue`,`packing`,`grouping`,`groupingMode`,`location`,`price1`,`price2`,`price3`, `printedStickers`,`isChecked`,`isIgnored`,`weight`, `created`)
VALUES
@ -2488,7 +2491,7 @@ INSERT INTO `vn`.`clientDms`(`clientFk`, `dmsFk`)
(1104, 2),
(1104, 3);
INSERT INTO `vn`.`workerDocument`(`id`, `worker`, `document`,`isReadableByWorker`)
INSERT INTO `vn`.`workerDms`(`id`, `workerFk`, `dmsFk`,`isReadableByWorker`)
VALUES
(1, 1106, 4, TRUE),
(2, 1107, 3, FALSE);
@ -2573,18 +2576,18 @@ INSERT INTO `vn`.`rate`(`dated`, `warehouseFk`, `rate0`, `rate1`, `rate2`, `rate
(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 YEAR), 1, 10, 15, 20, 25),
(util.VN_CURDATE(), 1, 12, 17, 22, 27);
INSERT INTO `vn`.`dua` (id, code, awbFk__, issued, operated, booked, bookEntried, gestdocFk, customsValue, companyFk)
INSERT INTO `vn`.`dua` (id, code, issued, operated, booked, bookEntried, gestdocFk, customsValue, companyFk)
VALUES
(1, '19ES0028013A481523', 1, util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 1, 11276.95, 442),
(2, '21ES00280136115760', 2, util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 1376.20, 442),
(3, '19ES00280131956004', 3, util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 3, 14268.50, 442),
(4, '19ES00280131955995', 4, util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 1, 8242.50, 442),
(5, '19ES00280132022070', 5, util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 10012.49, 442),
(6, '19ES00280132032308', 6, util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 19914.25, 442),
(7, '19ES00280132025489', 7, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 1934.06, 442),
(8, '19ES00280132025490', 8, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 3618.52, 442),
(9, '19ES00280132025491', 9, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 7126.23, 442),
(10, '19ES00280132025492', 10, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 4631.45, 442);
(1, '19ES0028013A481523', util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 1, 11276.95, 442),
(2, '21ES00280136115760', util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 1376.20, 442),
(3, '19ES00280131956004', util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 3, 14268.50, 442),
(4, '19ES00280131955995', util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 1, 8242.50, 442),
(5, '19ES00280132022070', util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 10012.49, 442),
(6, '19ES00280132032308', util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 19914.25, 442),
(7, '19ES00280132025489', DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 1934.06, 442),
(8, '19ES00280132025490', DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 3618.52, 442),
(9, '19ES00280132025491', DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 7126.23, 442),
(10, '19ES00280132025492', DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 4631.45, 442);
INSERT INTO `vn`.`duaEntry` (`duaFk`, `entryFk`, `value`, `customsValue`, `euroValue`)
VALUES
@ -3057,9 +3060,6 @@ INSERT INTO `vn`.`workerTimeControlMail` (`id`, `workerFk`, `year`, `week`, `sta
(3, 9, 2000, 51, 'CONFIRMED', util.VN_NOW(), 1, NULL),
(4, 9, 2001, 1, 'SENDED', util.VN_NOW(), 1, NULL);
INSERT INTO `vn`.`wagonConfig` (`id`, `width`, `height`, `maxWagonHeight`, `minHeightBetweenTrays`, `maxTrays`)
VALUES
(1, 1350, 1900, 200, 50, 6);
INSERT INTO `vn`.`wagonTypeColor` (`id`, `name`, `rgb`)
VALUES
@ -3068,15 +3068,19 @@ INSERT INTO `vn`.`wagonTypeColor` (`id`, `name`, `rgb`)
(3, 'green', '#00ff00'),
(4, 'blue', '#0000ff');
INSERT INTO `vn`.`wagonConfig` (`id`, `width`, `height`, `maxWagonHeight`, `minHeightBetweenTrays`, `maxTrays`, `defaultTrayColorFk`)
VALUES
(1, 1350, 1900, 200, 50, 6, 1);
INSERT INTO `vn`.`wagonType` (`id`, `name`, `divisible`)
VALUES
(1, 'Wagon Type #1', 1);
INSERT INTO `vn`.`wagonTypeTray` (`id`, `typeFk`, `height`, `colorFk`)
INSERT INTO `vn`.`wagonTypeTray` (`id`, `wagonTypeFk`, `height`, `wagonTypeColorFk`)
VALUES
(1, 1, 100, 1),
(1, 1, 0, 1),
(2, 1, 50, 2),
(3, 1, 0, 3);
(3, 1, 100, 3);
INSERT INTO `salix`.`accessTokenConfig` (`id`, `renewPeriod`, `courtesyTime`, `renewInterval`)
VALUES
@ -3969,6 +3973,6 @@ VALUES
(5, 'Referencia Nominas', 'payRef'),
(6, 'ABA', 'aba');
INSERT IGNORE INTO ormConfig
INSERT IGNORE INTO ormConfig
SET id =1,
selectLimit = 1000;

View File

@ -1,8 +1,22 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`waste_addSales`()
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`waste_addSales`(
vDateFrom DATE,
vDateTo DATE
)
BEGIN
DECLARE vDateFrom DATE DEFAULT util.VN_CURDATE() - INTERVAL WEEKDAY(util.VN_CURDATE()) DAY;
DECLARE vDateTo DATE DEFAULT vDateFrom + INTERVAL 6 DAY;
/**
* Recalcula las mermas de un periodo.
*
* @param vDateFrom Fecha desde
* @param vDateTo Fecha hasta
*/
IF vDateFrom IS NULL THEN
SET vDateFrom = util.VN_CURDATE() - INTERVAL WEEKDAY(util.VN_CURDATE()) DAY;
END IF;
IF vDateTo IS NULL THEN
SET vDateTo = vDateFrom + INTERVAL 6 DAY;
END IF;
CALL cache.last_buy_refresh(FALSE);
@ -14,16 +28,32 @@ BEGIN
s.itemFk,
SUM((b.buyingValue + b.freightValue + b.comissionValue + b.packageValue) * s.quantity),
SUM(IF(aw.`type`, s.quantity, 0)),
SUM(
IF(
aw.`type` = 'internal',
SUM(IF(
aw.`type` = 'external',
(b.buyingValue + b.freightValue + b.comissionValue + b.packageValue) * s.quantity,
0
)
),
SUM(
IF(
aw.`type` = 'external',
),
SUM(IF(
aw.`type` = 'fault',
(b.buyingValue + b.freightValue + b.comissionValue + b.packageValue) * s.quantity,
0
)
),
SUM(IF(
aw.`type` = 'container',
(b.buyingValue + b.freightValue + b.comissionValue + b.packageValue) * s.quantity,
0
)
),
SUM(IF(
aw.`type` = 'break',
(b.buyingValue + b.freightValue + b.comissionValue + b.packageValue) * s.quantity,
0
)
),
SUM(IF(
aw.`type` = 'other',
(b.buyingValue + b.freightValue + b.comissionValue + b.packageValue) * s.quantity,
0
)
@ -40,6 +70,6 @@ BEGIN
JOIN vn.buy b ON b.id = lb.buy_id
WHERE t.shipped BETWEEN vDateFrom AND vDateTo
AND w.isManaged
GROUP BY i.id;
GROUP BY YEAR(t.shipped), WEEK(t.shipped, 4), i.id;
END$$
DELIMITER ;

View File

@ -0,0 +1,6 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`waste_addSalesLauncher`()
BEGIN
CALL waste_addSales(NULL, NULL);
END$$
DELIMITER ;

View File

@ -1,8 +0,0 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `edi`.`floramondo`
ON SCHEDULE EVERY 6 MINUTE
STARTS '2022-01-28 09:52:45.000'
ON COMPLETION NOT PRESERVE
DISABLE
DO CALL edi.floramondo_offerRefresh()$$
DELIMITER ;

View File

@ -1,522 +0,0 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `edi`.`floramondo_offerRefresh`()
proc: BEGIN
DECLARE vLanded DATETIME;
DECLARE vDone INT DEFAULT FALSE;
DECLARE vFreeId INT;
DECLARE vSupplyResponseFk INT;
DECLARE vLastInserted DATETIME;
DECLARE vIsAuctionDay BOOLEAN;
DECLARE vMaxNewItems INT DEFAULT 10000;
DECLARE vStartingTime DATETIME;
DECLARE vAalsmeerMarketPlaceID VARCHAR(13) DEFAULT '8713783439043';
DECLARE vDayRange INT;
DECLARE cur1 CURSOR FOR
SELECT id
FROM edi.item_free;
DECLARE cur2 CURSOR FOR
SELECT srId
FROM itemToInsert;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
DECLARE EXIT HANDLER FOR SQLSTATE '45000'
BEGIN
ROLLBACK;
RESIGNAL;
END;
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
BEGIN
DO RELEASE_LOCK('edi.floramondo_offerRefresh');
SET @isTriggerDisabled = FALSE;
RESIGNAL;
END;
IF 'test' = (SELECT environment FROM util.config) THEN
LEAVE proc;
END IF;
IF !GET_LOCK('edi.floramondo_offerRefresh', 0) THEN
LEAVE proc;
END IF;
SELECT dayRange INTO vDayRange
FROM offerRefreshConfig;
IF vDayRange IS NULL THEN
CALL util.throw("Variable vDayRange not declared");
END IF;
SET vStartingTime = util.VN_NOW();
TRUNCATE edi.offerList;
INSERT INTO edi.offerList(supplier, total)
SELECT v.name, COUNT(DISTINCT sr.ID) total
FROM edi.supplyResponse sr
JOIN edi.VMPSettings v ON v.VMPID = sr.vmpID
WHERE sr.NumberOfUnits > 0
AND sr.EmbalageCode != 999
GROUP BY sr.vmpID;
UPDATE edi.offerList o
JOIN (SELECT v.name, COUNT(*) total
FROM edi.supplyOffer sr
JOIN edi.VMPSettings v ON v.VMPID = sr.vmpID
GROUP BY sr.vmpID) sub ON o.supplier = sub.name
SET o.`filter` = sub.total;
-- Elimina de la lista de items libres aquellos que ya existen
DELETE itf.*
FROM edi.item_free itf
JOIN vn.item i ON i.id = itf.id;
CREATE OR REPLACE TEMPORARY TABLE tmp
(INDEX (`Item_ArticleCode`))
ENGINE = MEMORY
SELECT t.*
FROM (
SELECT *
FROM edi.supplyOffer
ORDER BY (MarketPlaceID = vAalsmeerMarketPlaceID) DESC,
NumberOfUnits DESC LIMIT 10000000000000000000) t
GROUP BY t.srId;
CREATE OR REPLACE TEMPORARY TABLE edi.offer (INDEX (`srID`), INDEX (`EmbalageCode`),
INDEX (`ef1`), INDEX (`ef2`), INDEX (`ef3`), INDEX (`ef4`),INDEX (`ef5`), INDEX (`ef6`),
INDEX (`s1Value`), INDEX (`s2Value`), INDEX (`s3Value`), INDEX (`s4Value`),INDEX (`s5Value`), INDEX (`s6Value`))
ENGINE = MEMORY
SELECT so.*,
ev1.type_description s1Value,
ev2.type_description s2Value,
ev3.type_description s3Value,
ev4.type_description s4Value,
ev5.type_description s5Value,
ev6.type_description s6Value,
eif1.feature ef1,
eif2.feature ef2,
eif3.feature ef3,
eif4.feature ef4,
eif5.feature ef5,
eif6.feature ef6
FROM tmp so
LEFT JOIN edi.item_feature eif1 ON eif1.item_id = so.Item_ArticleCode
AND eif1.presentation_order = 1
AND eif1.expiry_date IS NULL
LEFT JOIN edi.item_feature eif2 ON eif2.item_id = so.Item_ArticleCode
AND eif2.presentation_order = 2
AND eif2.expiry_date IS NULL
LEFT JOIN edi.item_feature eif3 ON eif3.item_id = so.Item_ArticleCode
AND eif3.presentation_order = 3
AND eif3.expiry_date IS NULL
LEFT JOIN edi.item_feature eif4 ON eif4.item_id = so.Item_ArticleCode
AND eif4.presentation_order = 4
AND eif4.expiry_date IS NULL
LEFT JOIN edi.item_feature eif5 ON eif5.item_id = so.Item_ArticleCode
AND eif5.presentation_order = 5
AND eif5.expiry_date IS NULL
LEFT JOIN edi.item_feature eif6 ON eif6.item_id = so.Item_ArticleCode
AND eif6.presentation_order = 6
AND eif6.expiry_date IS NULL
LEFT JOIN edi.`value` ev1 ON ev1.type_id = eif1.feature
AND so.s1 = ev1.type_value
LEFT JOIN edi.`value` ev2 ON ev2.type_id = eif2.feature
AND so.s2 = ev2.type_value
LEFT JOIN edi.`value` ev3 ON ev3.type_id = eif3.feature
AND so.s3 = ev3.type_value
LEFT JOIN edi.`value` ev4 ON ev4.type_id = eif4.feature
AND so.s4 = ev4.type_value
LEFT JOIN edi.`value` ev5 ON ev5.type_id = eif5.feature
AND so.s5 = ev5.type_value
LEFT JOIN edi.`value` ev6 ON ev6.type_id = eif6.feature
AND so.s6 = ev6.type_value
ORDER BY Price;
DROP TEMPORARY TABLE tmp;
DELETE o
FROM edi.offer o
LEFT JOIN vn.tag t1 ON t1.ediTypeFk = o.ef1 AND t1.overwrite = 'size'
LEFT JOIN vn.tag t2 ON t2.ediTypeFk = o.ef2 AND t2.overwrite = 'size'
LEFT JOIN vn.tag t3 ON t3.ediTypeFk = o.ef3 AND t3.overwrite = 'size'
LEFT JOIN vn.tag t4 ON t4.ediTypeFk = o.ef4 AND t4.overwrite = 'size'
LEFT JOIN vn.tag t5 ON t5.ediTypeFk = o.ef5 AND t5.overwrite = 'size'
LEFT JOIN vn.tag t6 ON t6.ediTypeFk = o.ef6 AND t6.overwrite = 'size'
JOIN vn.floramondoConfig fc ON TRUE
WHERE (t1.id IS NOT NULL AND CONVERT(s1Value, UNSIGNED) > fc.itemMaxSize)
OR (t2.id IS NOT NULL AND CONVERT(s2Value, UNSIGNED) > fc.itemMaxSize)
OR (t3.id IS NOT NULL AND CONVERT(s3Value, UNSIGNED) > fc.itemMaxSize)
OR (t4.id IS NOT NULL AND CONVERT(s4Value, UNSIGNED) > fc.itemMaxSize)
OR (t5.id IS NOT NULL AND CONVERT(s5Value, UNSIGNED) > fc.itemMaxSize)
OR (t6.id IS NOT NULL AND CONVERT(s6Value, UNSIGNED) > fc.itemMaxSize);
START TRANSACTION;
-- Actualizamos el campo supplyResponseFk para aquellos articulos que ya estan creados y reutilizamos
UPDATE IGNORE edi.offer o
JOIN vn.item i
ON i.name = o.product_name
AND i.subname <=> o.company_name
AND i.value5 <=> o.s1Value
AND i.value6 <=> o.s2Value
AND i.value7 <=> o.s3Value
AND i.value8 <=> o.s4Value
AND i.value9 <=> o.s5Value
AND i.value10 <=> o.s6Value
AND i.NumberOfItemsPerCask <=> o.NumberOfItemsPerCask
AND i.EmbalageCode <=> o.EmbalageCode
AND i.quality <=> o.Quality
JOIN vn.itemType it ON it.id = i.typeFk
LEFT JOIN vn.sale s ON s.itemFk = i.id
LEFT JOIN vn.ticket t ON t.id = s.ticketFk
AND t.shipped > (util.VN_CURDATE() - INTERVAL 1 WEEK)
LEFT JOIN edi.supplyResponse sr ON sr.ID = i.supplyResponseFk
LEFT JOIN edi.deliveryInformation di ON di.supplyResponseID = sr.ID
LEFT JOIN edi.putOrder po ON po.supplyResponseID = i.supplyResponseFk
AND po.OrderTradeLineDateTime > (util.VN_CURDATE() - INTERVAL 1 WEEK)
SET i.supplyResponseFk = o.srID
WHERE (sr.ID IS NULL
OR sr.NumberOfUnits = 0
OR di.LatestOrderDateTime < util.VN_NOW()
OR di.ID IS NULL)
AND it.isInventory
AND t.id IS NULL
AND po.id IS NULL;
CREATE OR REPLACE TEMPORARY TABLE itemToInsert
ENGINE = MEMORY
SELECT o.*, CAST(NULL AS DECIMAL(6,0)) itemFk
FROM edi.offer o
LEFT JOIN vn.item i ON i.supplyResponseFk = o.srId
WHERE i.id IS NULL
LIMIT vMaxNewItems;
-- Reciclado de nº de item
OPEN cur1;
OPEN cur2;
read_loop: LOOP
FETCH cur2 INTO vSupplyResponseFk;
FETCH cur1 INTO vFreeId;
IF vDone THEN
LEAVE read_loop;
END IF;
UPDATE itemToInsert
SET itemFk = vFreeId
WHERE srId = vSupplyResponseFk;
END LOOP;
CLOSE cur1;
CLOSE cur2;
-- Insertamos todos los items en Articles de la oferta
INSERT INTO vn.item(id,
`name`,
longName,
subName,
expenseFk,
typeFk,
intrastatFk,
originFk,
supplyResponseFk,
numberOfItemsPerCask,
embalageCode,
quality,
isFloramondo)
SELECT iti.itemFk,
iti.product_name,
iti.product_name,
iti.company_name,
iti.expenseFk,
iti.itemTypeFk,
iti.intrastatFk,
iti.originFk,
iti.`srId`,
iti.NumberOfItemsPerCask,
iti.EmbalageCode,
iti.Quality,
TRUE
FROM itemToInsert iti;
-- Inserta la foto de los articulos nuevos (prioridad alta)
INSERT IGNORE INTO vn.itemImageQueue(itemFk, url)
SELECT i.id, PictureReference
FROM itemToInsert ii
JOIN vn.item i ON i.supplyResponseFk = ii.srId
WHERE PictureReference IS NOT NULL
AND i.image IS NULL;
INSERT INTO edi.`log`(tableName, fieldName,fieldValue)
SELECT 'itemImageQueue','NumImagenesPtes', COUNT(*)
FROM vn.itemImageQueue
WHERE attempts = 0;
-- Inserta si se añadiesen tags nuevos
INSERT IGNORE INTO vn.tag (name, ediTypeFk)
SELECT description, type_id FROM edi.type;
-- Desabilita el trigger para recalcular los tags al final
SET @isTriggerDisabled = TRUE;
-- Inserta los tags sólo en los articulos nuevos
INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
SELECT i.id, t.id , ii.product_name, 1
FROM itemToInsert ii
JOIN vn.tag t ON t.`name` = 'Producto'
JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
WHERE NOT ii.product_name IS NULL;
INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
SELECT i.id, t.id , ii.Quality, 3
FROM itemToInsert ii
JOIN vn.tag t ON t.`name` = 'Calidad'
JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
WHERE NOT ii.Quality IS NULL;
INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
SELECT i.id, t.id , ii.company_name, 4
FROM itemToInsert ii
JOIN vn.tag t ON t.`name` = 'Productor'
JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
WHERE NOT ii.company_name IS NULL;
INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
SELECT i.id, t.id , s1Value, 5
FROM itemToInsert ii
JOIN vn.tag t ON t.ediTypeFk = ii.ef1
JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
WHERE NOT s1Value IS NULL;
INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
SELECT i.id, t.id , s2Value, 6
FROM itemToInsert ii
JOIN vn.tag t ON t.ediTypeFk = ii.ef2
JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
WHERE NOT s2Value IS NULL;
INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
SELECT i.id, t.id , s3Value, 7
FROM itemToInsert ii
JOIN vn.tag t ON t.ediTypeFk = ii.ef3
JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
WHERE NOT s3Value IS NULL;
INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
SELECT i.id, t.id , s4Value, 8
FROM itemToInsert ii
JOIN vn.tag t ON t.ediTypeFk = ii.ef4
JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
WHERE NOT s4Value IS NULL;
INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
SELECT i.id, t.id , s5Value, 9
FROM itemToInsert ii
JOIN vn.tag t ON t.ediTypeFk = ii.ef5
JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
WHERE NOT s5Value IS NULL;
INSERT INTO vn.itemTag(itemFk, tagFk, value, priority)
SELECT i.id, t.id , s6Value, 10
FROM itemToInsert ii
JOIN vn.tag t ON t.ediTypeFk = ii.ef6
JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
WHERE NOT s6Value IS NULL;
INSERT IGNORE INTO vn.itemTag(itemFk, tagFk, value, priority)
SELECT i.id, t.id, IFNULL(ink.name, ik.color), 11
FROM itemToInsert ii
JOIN vn.item i ON i.supplyResponseFk = ii.`srId`
JOIN vn.tag t ON t.`name` = 'Color'
LEFT JOIN edi.feature f ON f.item_id = ii.Item_ArticleCode
LEFT JOIN edi.`type` tp ON tp.type_id = f.feature_type_id
AND tp.`description` = 'Hoofdkleur 1'
LEFT JOIN vn.ink ON ink.dutchCode = f.feature_value
LEFT JOIN vn.itemInk ik ON ik.longName = i.longName
WHERE ink.name IS NOT NULL
OR ik.color IS NOT NULL;
CREATE OR REPLACE TABLE tmp.item
(PRIMARY KEY (id))
SELECT i.id FROM vn.item i
JOIN itemToInsert ii ON i.supplyResponseFk = ii.`srId`;
CALL vn.item_refreshTags();
DROP TABLE tmp.item;
SELECT MIN(LatestDeliveryDateTime) INTO vLanded
FROM edi.supplyResponse sr
JOIN edi.deliveryInformation di ON di.supplyResponseID = sr.ID
JOIN edi.marketPlace mp ON mp.id = sr.MarketPlaceID
JOIN vn.floramondoConfig fc
WHERE mp.isLatestOrderDateTimeRelevant
AND di.LatestOrderDateTime > IF(
fc.MaxLatestOrderHour > HOUR(util.VN_NOW()),
util.VN_CURDATE(),
util.VN_CURDATE() + INTERVAL 1 DAY);
UPDATE vn.floramondoConfig
SET nextLanded = vLanded
WHERE vLanded IS NOT NULL;
-- Elimina la oferta obsoleta
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.item i ON i.id = b.itemFk
LEFT JOIN edi.supplyResponse sr ON i.supplyResponseFk = sr.ID
LEFT JOIN edi.deliveryInformation di ON di.ID = b.deliveryFk
SET b.quantity = 0
WHERE (IFNULL(di.LatestOrderDateTime,util.VN_NOW()) <= util.VN_NOW()
OR i.supplyResponseFk IS NULL
OR sr.NumberOfUnits = 0)
AND am.name = 'LOGIFLORA'
AND e.isRaid;
-- Localiza las entradas de cada almacen
UPDATE edi.warehouseFloramondo
SET entryFk = vn.entry_getForLogiflora(vLanded + INTERVAL travellingDays DAY, warehouseFk);
IF vLanded IS NOT NULL THEN
-- Actualiza la oferta existente
UPDATE vn.buy b
JOIN edi.warehouseFloramondo wf ON wf.entryFk = b.entryFk
JOIN vn.item i ON i.id = b.itemFk
JOIN edi.offer o ON i.supplyResponseFk = o.`srId`
SET b.quantity = o.NumberOfUnits * o.NumberOfItemsPerCask,
b.buyingValue = o.price
WHERE (b.quantity <> o.NumberOfUnits * o.NumberOfItemsPerCask
OR b.buyingValue <> o.price);
-- Inserta el resto
SET vLastInserted := util.VN_NOW();
-- Inserta la oferta
INSERT INTO vn.buy (
entryFk,
itemFk,
quantity,
buyingValue,
stickers,
packing,
`grouping`,
groupingMode,
packagingFk,
deliveryFk)
SELECT wf.entryFk,
i.id,
o.NumberOfUnits * o.NumberOfItemsPerCask quantity,
o.Price,
o.NumberOfUnits etiquetas,
o.NumberOfItemsPerCask packing,
GREATEST(1, IFNULL(o.MinimumQuantity,0)) * o.NumberOfItemsPerCask `grouping`,
'packing',
o.embalageCode,
o.diId
FROM edi.offer o
JOIN vn.item i ON i.supplyResponseFk = o.srId
JOIN edi.warehouseFloramondo wf
JOIN vn.packaging p ON p.id
LIKE o.embalageCode
LEFT JOIN vn.buy b ON b.itemFk = i.id
AND b.entryFk = wf.entryFk
WHERE b.id IS NULL; -- Quitar esta linea y mirar de crear los packages a tiempo REAL
INSERT INTO vn.itemCost(
itemFk,
warehouseFk,
cm3,
cm3delivery)
SELECT b.itemFk,
wf.warehouseFk,
@cm3 := vn.buy_getUnitVolume(b.id),
IFNULL((vc.standardFlowerBox * 1000) / i.packingOut, @cm3)
FROM warehouseFloramondo wf
JOIN vn.volumeConfig vc
JOIN vn.buy b ON b.entryFk = wf.entryFk
JOIN vn.item i ON i.id = b.itemFk
LEFT JOIN vn.itemCost ic ON ic.itemFk = b.itemFk
AND ic.warehouseFk = wf.warehouseFk
WHERE (ic.cm3 IS NULL OR ic.cm3 = 0)
ON DUPLICATE KEY UPDATE cm3 = @cm3, cm3delivery = IFNULL((vc.standardFlowerBox * 1000) / i.packingOut, @cm3);
CREATE OR REPLACE TEMPORARY TABLE tmp.buyRecalc
SELECT b.id
FROM vn.buy b
JOIN warehouseFloramondo wf ON wf.entryFk = b.entryFk
WHERE b.created >= vLastInserted;
CALL vn.buy_recalcPrices();
UPDATE edi.offerList o
JOIN (SELECT v.name, COUNT(DISTINCT b.itemFk) total
FROM vn.buy b
JOIN vn.item i ON i.id = b.itemFk
JOIN edi.supplyResponse sr ON sr.ID = i.supplyResponseFk
JOIN edi.VMPSettings v ON v.VMPID = sr.vmpID
JOIN edi.warehouseFloramondo wf ON wf.entryFk = b.entryFk
JOIN vn.warehouse w ON w.id = wf.warehouseFk
WHERE w.name = 'VNH'
AND b.quantity > 0
GROUP BY sr.vmpID) sub ON o.supplier = sub.name
SET o.vnh = sub.total;
UPDATE edi.offerList o
JOIN (SELECT v.name, COUNT(DISTINCT b.itemFk) total
FROM vn.buy b
JOIN vn.item i ON i.id = b.itemFk
JOIN edi.supplyResponse sr ON sr.ID = i.supplyResponseFk
JOIN edi.VMPSettings v ON v.VMPID = sr.vmpID
JOIN edi.warehouseFloramondo wf ON wf.entryFk = b.entryFk
JOIN vn.warehouse w ON w.id = wf.warehouseFk
WHERE w.name = 'ALGEMESI'
AND b.quantity > 0
GROUP BY sr.vmpID) sub ON o.supplier = sub.name
SET o.algemesi = sub.total;
END IF;
DROP TEMPORARY TABLE
edi.offer,
itemToInsert;
SET @isTriggerDisabled = FALSE;
COMMIT;
-- Esto habria que pasarlo a procesos programados o trabajar con tags y dejar las familias
UPDATE vn.item i
SET typeFk = 121
WHERE i.longName LIKE 'Rosa Garden %'
AND typeFk = 17;
UPDATE vn.item i
SET typeFk = 156
WHERE i.longName LIKE 'Rosa ec %'
AND typeFk = 17;
-- Refresca las fotos de los items existentes que mostramos (prioridad baja)
INSERT IGNORE INTO vn.itemImageQueue(itemFk, url, priority)
SELECT i.id, sr.PictureReference, 100
FROM edi.supplyResponse sr
JOIN vn.item i ON i.supplyResponseFk = sr.ID
JOIN edi.supplyOffer so ON so.srId = sr.ID
JOIN hedera.image i2 ON i2.name = i.image
AND i2.collectionFk = 'catalog'
WHERE i2.updated <= (UNIX_TIMESTAMP(util.VN_NOW()) - vDayRange)
AND sr.NumberOfUnits;
INSERT INTO edi.`log`
SET tableName = 'floramondo_offerRefresh',
fieldName = 'Tiempo de proceso',
fieldValue = TIMEDIFF(util.VN_NOW(), vStartingTime);
DO RELEASE_LOCK('edi.floramondo_offerRefresh');
END$$
DELIMITER ;

View File

@ -0,0 +1,8 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `util`.`log_clean`
ON SCHEDULE EVERY 1 DAY
STARTS '2024-07-09 00:30:00.000'
ON COMPLETION PRESERVE
ENABLE
DO CALL util.log_clean$$
DELIMITER ;

View File

@ -0,0 +1,54 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`log_clean`()
BEGIN
/**
* Hace limpieza de los datos de las tablas log,
* dejando únicamente los días de retención configurados.
*/
DECLARE vSchemaName VARCHAR(65);
DECLARE vSchemaNameQuoted VARCHAR(65);
DECLARE vTableName VARCHAR(65);
DECLARE vTableNameQuoted VARCHAR(65);
DECLARE vRetentionDays INT;
DECLARE vStarted DATETIME;
DECLARE vDated DATE;
DECLARE vDone BOOL;
DECLARE vQueue CURSOR FOR
SELECT schemaName, tableName, retentionDays
FROM logCleanMultiConfig
ORDER BY `order`;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
OPEN vQueue;
l: LOOP
SET vDone = FALSE;
FETCH vQueue INTO vSchemaName, vTableName, vRetentionDays;
IF vDone THEN
LEAVE l;
END IF;
IF vRetentionDays THEN
SET vStarted = VN_NOW();
SET vSchemaNameQuoted = quoteIdentifier(vSchemaName);
SET vTableNameQuoted = quoteIdentifier(vTableName);
SET vDated = VN_CURDATE() - INTERVAL vRetentionDays DAY;
EXECUTE IMMEDIATE CONCAT(
'DELETE FROM ', vSchemaNameQuoted,
'.', vTableNameQuoted,
" WHERE creationDate < '", vDated, "'"
);
UPDATE logCleanMultiConfig
SET `started` = vStarted,
`finished` = VN_NOW()
WHERE schemaName = vSchemaName
AND tableName = vTableName;
END IF;
END LOOP;
CLOSE vQueue;
END$$
DELIMITER ;

View File

@ -1,8 +0,0 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`MIDNIGHT`(vDate DATE)
RETURNS datetime
DETERMINISTIC
BEGIN
RETURN TIMESTAMP(vDate,'23:59:59');
END$$
DELIMITER ;

View File

@ -1,64 +0,0 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`entry_getForLogiflora`(vLanded DATE, vWarehouseFk INT)
RETURNS int(11)
NOT DETERMINISTIC
READS SQL DATA
BEGIN
/**
* Devuelve una entrada para Logiflora. Si no existe la crea.
*
* @param vLanded Fecha de llegada al almacén
* @param vWarehouseFk Identificador de vn.warehouse
*/
DECLARE vTravelFk INT;
DECLARE vEntryFk INT;
DECLARE previousEntryFk INT;
SET vTravelFk = vn.travel_getForLogiflora(vLanded, vWarehouseFk);
IF vLanded THEN
SELECT IFNULL(MAX(id),0) INTO vEntryFk
FROM vn.entry
WHERE travelFk = vTravelFk
AND isRaid;
IF NOT vEntryFk THEN
INSERT INTO vn.entry(travelFk, supplierFk, commission, companyFk, currencyFk, isRaid)
SELECT vTravelFk, s.id, 4, c.id, cu.id, TRUE
FROM vn.supplier s
JOIN vn.company c ON c.code = 'VNL'
JOIN vn.currency cu ON cu.code = 'EUR'
WHERE s.name = 'KONINKLIJE COOPERATIEVE BLOEMENVEILING FLORAHOLLAN';
SELECT MAX(id) INTO vEntryFk
FROM vn.entry
WHERE travelFk = vTravelFk;
END IF;
END IF;
SELECT entryFk INTO previousEntryFk
FROM edi.warehouseFloramondo wf
WHERE wf.warehouseFk = vWarehouseFk;
IF IFNULL(previousEntryFk,0) != vEntryFk THEN
UPDATE buy b
SET b.printedStickers = 0
WHERE entryFk = previousEntryFk;
DELETE FROM buy WHERE entryFk = previousEntryFk;
DELETE FROM entry WHERE id = previousEntryFk;
END IF;
RETURN vEntryFk;
END$$
DELIMITER ;

View File

@ -1,30 +0,0 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`routeProposal_`(vTicketFk INT)
RETURNS int(11)
NOT DETERMINISTIC
READS SQL DATA
BEGIN
DECLARE vRouteFk INT;
DECLARE vAddressFk INT;
DECLARE vShipped DATETIME;
SELECT addressFk, date(shipped) INTO vAddressFk, vShipped
FROM vn.ticket
WHERE id = vTicketFk;
SELECT routeFk INTO vRouteFk
FROM
(SELECT t.routeFk, sum(af.friendship) friendshipSum
FROM vn.ticket t
JOIN cache.addressFriendship af ON af.addressFk2 = t.addressFk AND af.addressFk1 = vAddressFk
WHERE t.shipped BETWEEN vShipped and MIDNIGHT(vShipped)
AND t.routeFk
GROUP BY routeFk
ORDER BY friendshipSum DESC
) sub
LIMIT 1;
RETURN vRouteFk;
END$$
DELIMITER ;

View File

@ -1,52 +0,0 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`travel_getForLogiflora`(vLanded DATE, vWarehouseFk INT)
RETURNS int(11)
NOT DETERMINISTIC
READS SQL DATA
BEGIN
/**
* Devuelve un número de travel para compras de Logiflora a partir de la fecha de llegada y del almacén.
* Si no existe lo genera.
*
* @param vLanded Fecha de llegada al almacén
* @param vWarehouseFk Identificador de vn.warehouse
*/
DECLARE vTravelFk INT;
IF vLanded THEN
SELECT IFNULL(MAX(tr.id),0) INTO vTravelFk
FROM vn.travel tr
JOIN vn.warehouse wIn ON wIn.id = tr.warehouseInFk
JOIN vn.warehouse wOut ON wOut.id = tr.warehouseOutFk
JOIN vn.agencyMode am ON am.id = tr.agencyModeFk
WHERE wIn.id = vWarehouseFk
AND wOut.name = 'Holanda'
AND am.name = 'LOGIFLORA'
AND landed = vLanded;
IF NOT vTravelFk THEN
INSERT INTO vn.travel(landed, shipped, warehouseInFk, warehouseOutFk, agencyModeFk)
SELECT vLanded, util.VN_CURDATE(), vWarehouseFk, wOut.id, am.id
FROM vn.warehouse wOut
JOIN vn.agencyMode am ON am.name = 'LOGIFLORA'
WHERE wOut.name = 'Holanda';
SELECT MAX(tr.id) INTO vTravelFk
FROM vn.travel tr
JOIN vn.warehouse wIn ON wIn.id = tr.warehouseInFk
JOIN vn.warehouse wOut ON wOut.id = tr.warehouseOutFk
WHERE wIn.id = vWarehouseFk
AND wOut.name = 'Holanda'
AND landed = vLanded;
END IF;
END IF;
RETURN vTravelFk;
END$$
DELIMITER ;

View File

@ -23,7 +23,7 @@ BEGIN
JOIN vn.ticketCollection tc ON tc.ticketFk = tob.ticketFk
LEFT JOIN vn.observationType ot ON ot.id = tob.observationTypeFk
WHERE ot.`code` = 'itemPicker'
AND tc.collectionFk = vParamFk
AND tc.collectionFk = vParamFk OR tc.ticketFk = vParamFk
)
SELECT t.id ticketFk,
IF(!(vItemPackingTypeFk <=> 'V'), cc.code, CONCAT(SUBSTRING('ABCDEFGH', tc.wagon, 1), '-', tc.`level`)) `level`,

View File

@ -369,4 +369,4 @@ BEGIN
tTrain,
tmp.productionBuffer;
END$$
DELIMITER ;
DELIMITER ;

View File

@ -10,7 +10,7 @@ BEGIN
SELECT * FROM (
SELECT cc.client clientFk, ci.grade
FROM creditClassification cc
JOIN creditInsurance ci ON cc.id = ci.creditClassification
JOIN creditInsurance ci ON cc.id = ci.creditClassificationFk
WHERE dateEnd IS NULL
ORDER BY ci.creationDate DESC
LIMIT 10000000000000000000) t1

View File

@ -1,79 +0,0 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemFuentesBalance`(vDaysInFuture INT)
BEGIN
/* Se utiliza para calcular la necesidad de mover mercancia entre el almacén de fuentes y el nuestro
*
* @param vDaysInFuture Rango de dias para calcular entradas y salidas
*
*/
DECLARE vWarehouseFk INT;
SELECT s.warehouseFk INTO vWarehouseFk
FROM vn.sector s
WHERE s.code = 'FUENTES_PICASSE';
CALL cache.stock_refresh(FALSE);
SELECT i.id itemFk,
i.longName,
i.size,
i.subName,
v.amount - IFNULL(fue.Fuentes,0) - IFNULL(alb.albenfruit,0) as visible,
fue.Fuentes,
alb.Albenfruit,
sale.venta,
IFNULL(buy.compra,0) + IFNULL(mov.traslado,0) as compra,
IFNULL(v.amount,0) + IFNULL(sale.venta,0) + IFNULL(buy.compra,0) + IFNULL(mov.traslado,0)
- IFNULL(fue.Fuentes,0) - IFNULL(alb.albenfruit,0) as saldo
FROM vn.item i
JOIN vn.itemType it ON it.id = i.typeFk
JOIN vn.itemCategory ic ON ic.id = it.categoryFk
LEFT JOIN (
SELECT ish.itemFk, CAST(SUM(ish.visible) AS DECIMAL(10,0)) AS Fuentes
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 s ON s.id = p.sectorFk
WHERE s.code = 'FUENTES_PICASSE'
GROUP BY ish.itemFk
) fue ON fue.itemFk = i.id
LEFT JOIN (
SELECT ish.itemFk, CAST(SUM(ish.visible) AS DECIMAL(10,0)) AS Albenfruit
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 s ON s.id = p.sectorFk
WHERE s.code = 'ALBENFRUIT'
GROUP BY ish.itemFk
) alb ON alb.itemFk = i.id
LEFT JOIN cache.stock v ON i.id = v.item_id AND v.warehouse_id = vWarehouseFk
LEFT JOIN (
SELECT itemFk item_id, CAST(sum(quantity)AS DECIMAL(10,0)) as venta
FROM itemTicketOut
WHERE shipped BETWEEN util.VN_CURDATE() AND TIMESTAMPADD(DAY,vDaysInFuture , util.dayend(util.VN_CURDATE()))
AND warehouseFk = vWarehouseFk
GROUP BY itemFk
) sale ON sale.item_id = i.id
LEFT JOIN (
SELECT itemFk item_id, CAST(sum(quantity)AS DECIMAL(10,0)) as compra
FROM itemEntryIn
WHERE landed BETWEEN util.VN_CURDATE() AND TIMESTAMPADD(DAY,vDaysInFuture , util.dayend(util.VN_CURDATE()))
AND warehouseInFk = vWarehouseFk
AND isVirtualStock = FALSE
GROUP BY itemFk
) buy ON buy.item_id = i.id
LEFT JOIN (
SELECT itemFk item_id, CAST(sum(quantity)AS DECIMAL(10,0)) as traslado
FROM itemEntryOut
WHERE shipped BETWEEN util.VN_CURDATE() AND TIMESTAMPADD(DAY,vDaysInFuture , util.dayend(util.VN_CURDATE()))
AND warehouseOutFk = vWarehouseFk
GROUP BY itemFk
) mov ON mov.item_id = i.id
WHERE (v.amount OR fue.Fuentes OR alb.Albenfruit)
AND i.itemPackingTypeFk = 'H'
AND ic.shortLife;
END$$
DELIMITER ;

View File

@ -38,7 +38,7 @@ BEGIN
AND IFNULL(sub3.transit,0) < s.quantity
AND s.isPicked = FALSE
AND s.reserved = FALSE
AND t.shipped BETWEEN util.VN_CURDATE() AND MIDNIGHT(util.VN_CURDATE())
AND t.shipped BETWEEN util.VN_CURDATE() AND util.midnight()
AND tst.isPreviousPreparable = TRUE
AND t.warehouseFk = vWarehouseFk
AND iss.sectorFk = vSectorFk

View File

@ -3,25 +3,24 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_getSimilar`(
vSelf INT,
vWarehouseFk INT,
vDated DATE,
vShowType BOOL
vShowType BOOL,
vDaysInForward INT
)
BEGIN
/**
* Propone articulos disponibles ordenados, con la cantidad
* Propone articulos ordenados, con la cantidad
* de veces usado y segun sus caracteristicas.
*
* @param vSelf Id de artículo
* @param vWarehouseFk Id de almacen
* @param vDated Fecha
* @param vShowType Mostrar tipos
* @param vDaysInForward Días de alcance para las ventas
*/
DECLARE vAvailableCalcFk INT;
DECLARE vVisibleCalcFk INT;
DECLARE vTypeFk INT;
DECLARE vPriority INT DEFAULT 1;
CALL cache.available_refresh(vAvailableCalcFk, FALSE, vWarehouseFk, vDated);
CALL cache.visible_refresh(vVisibleCalcFk, FALSE, vWarehouseFk);
WITH itemTags AS (
SELECT i.id,
@ -41,8 +40,25 @@ BEGIN
AND it.priority = vPriority
LEFT JOIN vn.tag t ON t.id = it.tagFk
WHERE i.id = vSelf
),
stock AS (
SELECT itemFk, SUM(visible) stock
FROM vn.itemShelvingStock
WHERE warehouseFk = vWarehouseFk
GROUP BY itemFk
),
sold AS (
SELECT SUM(s.quantity) quantity, s.itemFk
FROM vn.sale s
JOIN vn.ticket t ON t.id = s.ticketFk
LEFT JOIN vn.itemShelvingSale iss ON iss.saleFk = s.id
WHERE t.shipped >= CURDATE() + INTERVAL vDaysInForward DAY
AND iss.saleFk IS NULL
AND t.warehouseFk = vWarehouseFk
GROUP BY s.itemFk
)
SELECT i.id itemFk,
LEAST(CAST(sd.quantity AS INT), sk.stock) advanceable,
i.longName,
i.subName,
i.tag5,
@ -64,13 +80,13 @@ BEGIN
WHEN b.groupingMode = 'packing' THEN b.packing
ELSE 1
END minQuantity,
v.visible located,
sk.stock located,
b.price2
FROM vn.item i
LEFT JOIN sold sd ON sd.itemFk = i.id
JOIN cache.available a ON a.item_id = i.id
AND a.calc_id = vAvailableCalcFk
LEFT JOIN cache.visible v ON v.item_id = i.id
AND v.calc_id = vVisibleCalcFk
LEFT JOIN stock sk ON sk.itemFk = i.id
LEFT JOIN cache.last_buy lb ON lb.item_id = i.id
AND lb.warehouse_id = vWarehouseFk
LEFT JOIN vn.itemProposal ip ON ip.mateFk = i.id
@ -80,20 +96,21 @@ BEGIN
LEFT JOIN vn.tag t ON t.id = it.tagFk
LEFT JOIN vn.buy b ON b.id = lb.buy_id
JOIN itemTags its
WHERE a.available > 0
WHERE (a.available > 0 OR sd.quantity < sk.stock)
AND (i.typeFk = its.typeFk OR NOT vShowType)
AND i.id <> vSelf
ORDER BY `counter` DESC,
(t.name = its.name) DESC,
(it.value = its.value) DESC,
(i.tag5 = its.tag5) DESC,
match5 DESC,
(i.tag6 = its.tag6) DESC,
match6 DESC,
(i.tag7 = its.tag7) DESC,
match7 DESC,
(i.tag8 = its.tag8) DESC,
match8 DESC
ORDER BY (a.available > 0) DESC,
`counter` DESC,
(t.name = its.name) DESC,
(it.value = its.value) DESC,
(i.tag5 = its.tag5) DESC,
match5 DESC,
(i.tag6 = its.tag6) DESC,
match6 DESC,
(i.tag7 = its.tag7) DESC,
match7 DESC,
(i.tag8 = its.tag8) DESC,
match8 DESC
LIMIT 100;
END$$
DELIMITER ;

View File

@ -268,16 +268,15 @@ proc: BEGIN
UPDATE tmp.productionBuffer pb
JOIN sale s ON s.ticketFk = pb.ticketFk
JOIN item i ON i.id = s.itemFk
JOIN itemType it ON it.id = i.typeFk
JOIN itemCategory ic ON ic.id = it.categoryFk
JOIN cache.last_buy lb ON lb.warehouse_id = vWarehouseFk AND lb.item_id = s.itemFk
JOIN cache.last_buy lb ON lb.warehouse_id = vWarehouseFk
AND lb.item_id = s.itemFk
JOIN buy b ON b.id = lb.buy_id
JOIN packaging p ON p.id = b.packagingFk
JOIN productionConfig pc
SET pb.hasPlantTray = TRUE
WHERE p.isPlantTray
AND s.quantity >= b.packing
AND pb.isOwn;
AND pb.isOwn;
DROP TEMPORARY TABLE
tmp.productionTicket,
@ -287,4 +286,4 @@ proc: BEGIN
tItemShelvingStock,
tItemPackingType;
END$$
DELIMITER ;
DELIMITER ;

View File

@ -55,7 +55,6 @@ BEGIN
i.itemPackingTypeFk,
isa.`size`,
isa.Estado,
isa.sectorProdPriority,
isa.available,
isa.sectorFk,
isa.matricula,

View File

@ -0,0 +1,62 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`stockBought_calculate`(
vDated DATE
)
proc: BEGIN
/**
* Calculate the stock of the auction warehouse from the inventory date to vDated
* without taking into account the outputs of the same day vDated
*
* @param vDated Date to calculate the stock.
*/
IF vDated < util.VN_CURDATE() THEN
LEAVE proc;
END IF;
CREATE OR REPLACE TEMPORARY TABLE tStockBought
SELECT workerFk, reserve
FROM stockBought
WHERE dated = vDated
AND reserve;
DELETE FROM stockBought WHERE dated = vDated;
CALL item_calculateStock(vDated);
INSERT INTO stockBought(workerFk, bought, dated)
SELECT it.workerFk,
ROUND(SUM(
(ti.quantity / b.packing) *
buy_getVolume(b.id)
) / vc.palletM3 / 1000000, 1) bought,
vDated
FROM itemType it
JOIN item i ON i.typeFk = it.id
LEFT JOIN tmp.item ti ON ti.itemFk = i.id
JOIN itemCategory ic ON ic.id = it.categoryFk
JOIN warehouse wh ON wh.code = 'VNH'
JOIN tmp.buyUltimate bu ON bu.itemFk = i.id
AND bu.warehouseFk = wh.id
JOIN buy b ON b.id = bu.buyFk
JOIN volumeConfig vc
WHERE ic.display
GROUP BY it.workerFk
HAVING bought;
UPDATE stockBought s
JOIN tStockBought ts ON ts.workerFk = s.workerFk
SET s.reserve = ts.reserve
WHERE s.dated = vDated;
INSERT INTO stockBought (workerFk, reserve, dated)
SELECT ts.workerFk, ts.reserve, vDated
FROM tStockBought ts
WHERE ts.workerFk NOT IN (
SELECT workerFk
FROM stockBought
WHERE dated = vDated
);
DROP TEMPORARY TABLE tStockBought, tmp.item, tmp.buyUltimate;
END$$
DELIMITER ;

View File

@ -17,14 +17,14 @@ BEGIN
* @param vOrderBy Order by criteria
* @param vIsConciliated Indicates whether it is reconciled or not
* @param vHasEntries Indicates if future entries must be shown
* @return tmp.supplierStatement
* @return tmp.supplierStatement
*/
DECLARE vBalanceStartingDate DATETIME;
SET @euroBalance:= 0;
SET @currencyBalance:= 0;
SELECT balanceStartingDate
SELECT balanceStartingDate
INTO vBalanceStartingDate
FROM invoiceInConfig;
@ -64,14 +64,14 @@ BEGIN
c.code,
'invoiceIn' statementType
FROM invoiceIn ii
JOIN invoiceInDueDay iid ON iid.invoiceInFk = ii.id
LEFT JOIN invoiceInDueDay iid ON iid.invoiceInFk = ii.id
JOIN currency c ON c.id = ii.currencyFk
WHERE ii.issued >= vBalanceStartingDate
AND ii.supplierFk = vSupplierFk
AND ii.supplierFk = vSupplierFk
AND vCurrencyFk IN (ii.currencyFk, 0)
AND vCompanyFk IN (ii.companyFk, 0)
AND (vIsConciliated = ii.isBooked OR NOT vIsConciliated)
GROUP BY iid.id
GROUP BY iid.id, ii.id
UNION ALL
SELECT p.bankFk,
p.companyFk,
@ -107,7 +107,7 @@ BEGIN
AND vCurrencyFk IN (p.currencyFk, 0)
AND vCompanyFk IN (p.companyFk, 0)
AND (vIsConciliated = p.isConciliated OR NOT vIsConciliated)
UNION ALL
UNION ALL
SELECT NULL,
companyFk,
NULL,
@ -134,7 +134,7 @@ BEGIN
AND vCurrencyFk IN (se.currencyFk,0)
AND vCompanyFk IN (se.companyFk,0)
AND (vIsConciliated = se.isConciliated OR NOT vIsConciliated)
UNION ALL
UNION ALL
SELECT NULL bankFk,
e.companyFk,
'E' serial,
@ -150,7 +150,7 @@ BEGIN
FALSE isBooked,
c.code,
'order'
FROM entry e
FROM entry e
JOIN travel tr ON tr.id = e.travelFk
JOIN currency c ON c.id = e.currencyFk
WHERE e.supplierFk = vSupplierFk

View File

@ -19,8 +19,7 @@ BEGIN
CREATE OR REPLACE TEMPORARY TABLE tmp.filter
(INDEX (id))
SELECT
origin.ticketFk futureId,
SELECT origin.ticketFk futureId,
dest.ticketFk id,
dest.state,
origin.futureState,
@ -51,48 +50,48 @@ BEGIN
origin.warehouseFk futureWarehouseFk,
origin.companyFk futureCompanyFk,
IFNULL(dest.nickname, origin.nickname) nickname,
dest.landed
dest.landed,
dest.preparation
FROM (
SELECT
s.ticketFk,
c.salesPersonFk workerFk,
t.shipped,
t.totalWithVat,
st.name futureState,
am.name futureAgency,
count(s.id) futureLines,
GROUP_CONCAT(DISTINCT ipt.code ORDER BY ipt.code) futureIpt,
CAST(SUM(litros) AS DECIMAL(10,0)) futureLiters,
SUM(s.quantity <= (IFNULL(il.stock,0) + IFNULL(im.amount, 0))) hasStock,
z.id futureZoneFk,
z.name futureZoneName,
st.classColor,
t.clientFk,
t.nickname,
t.addressFk,
t.warehouseFk,
t.companyFk,
t.agencyModeFk
FROM ticket t
JOIN client c ON c.id = t.clientFk
JOIN sale s ON s.ticketFk = t.id
JOIN saleVolume sv ON sv.saleFk = s.id
JOIN item i ON i.id = s.itemFk
JOIN ticketState ts ON ts.ticketFk = t.id
JOIN state st ON st.id = ts.stateFk
JOIN agencyMode am ON t.agencyModeFk = am.id
JOIN zone z ON t.zoneFk = z.id
LEFT JOIN itemPackingType ipt ON ipt.code = i.itemPackingTypeFk
LEFT JOIN tmp.itemMinacum im ON im.itemFk = i.id
AND im.warehouseFk = vWarehouseFk
LEFT JOIN tmp.itemList il ON il.itemFk = i.id
WHERE t.shipped BETWEEN vDateFuture AND util.dayend(vDateFuture)
AND t.warehouseFk = vWarehouseFk
GROUP BY t.id
SELECT s.ticketFk,
c.salesPersonFk workerFk,
t.shipped,
t.totalWithVat,
st.name futureState,
am.name futureAgency,
count(s.id) futureLines,
GROUP_CONCAT(DISTINCT ipt.code ORDER BY ipt.code) futureIpt,
CAST(SUM(litros) AS DECIMAL(10,0)) futureLiters,
SUM(s.quantity <= (IFNULL(il.stock,0) + IFNULL(im.amount, 0))) hasStock,
z.id futureZoneFk,
z.name futureZoneName,
st.classColor,
t.clientFk,
t.nickname,
t.addressFk,
t.warehouseFk,
t.companyFk,
t.agencyModeFk
FROM ticket t
JOIN client c ON c.id = t.clientFk
JOIN sale s ON s.ticketFk = t.id
JOIN saleVolume sv ON sv.saleFk = s.id
JOIN item i ON i.id = s.itemFk
JOIN ticketState ts ON ts.ticketFk = t.id
JOIN `state` st ON st.id = ts.stateFk
JOIN agencyMode am ON t.agencyModeFk = am.id
JOIN `zone` z ON t.zoneFk = z.id
LEFT JOIN zoneClosure zc ON zc.zoneFk = t.zoneFk
LEFT JOIN itemPackingType ipt ON ipt.code = i.itemPackingTypeFk
LEFT JOIN tmp.itemMinacum im ON im.itemFk = i.id
AND im.warehouseFk = vWarehouseFk
LEFT JOIN tmp.itemList il ON il.itemFk = i.id
WHERE t.shipped BETWEEN vDateFuture AND util.dayend(vDateFuture)
AND t.warehouseFk = vWarehouseFk
GROUP BY t.id
) origin
LEFT JOIN (
SELECT
t.id ticketFk,
SELECT t.id ticketFk,
st.name state,
GROUP_CONCAT(DISTINCT ipt.code ORDER BY ipt.code) ipt,
t.shipped,
@ -108,18 +107,25 @@ BEGIN
t.warehouseFk,
t.companyFk,
t.landed,
t.agencyModeFk
t.agencyModeFk,
SEC_TO_TIME(
COALESCE(HOUR(t.shipped), HOUR(zc.hour), HOUR(z.hour)) * 3600 +
COALESCE(MINUTE(t.shipped), MINUTE(zc.hour), MINUTE(z.hour)) * 60
) preparation
FROM ticket t
JOIN sale s ON s.ticketFk = t.id
JOIN saleVolume sv ON sv.saleFk = s.id
JOIN item i ON i.id = s.itemFk
JOIN ticketState ts ON ts.ticketFk = t.id
JOIN state st ON st.id = ts.stateFk
JOIN `state` st ON st.id = ts.stateFk
JOIN agencyMode am ON t.agencyModeFk = am.id
LEFT JOIN itemPackingType ipt ON ipt.code = i.itemPackingTypeFk
LEFT JOIN `zone` z ON z.id = t.zoneFk
LEFT JOIN zoneClosure zc ON zc.zoneFk = t.zoneFk
JOIN ticketCanAdvanceConfig tc
WHERE t.shipped BETWEEN vDateToAdvance AND util.dayend(vDateToAdvance)
AND t.warehouseFk = vWarehouseFk
AND st.order <= 5
AND st.order <= tc.destinationOrder
GROUP BY t.id
) dest ON dest.addressFk = origin.addressFk
WHERE origin.hasStock;

View File

@ -21,6 +21,7 @@ BEGIN
t.clientFk,
t.warehouseFk,
ts.alertLevel,
sub2.alertLevel futureAlertLevel,
t.shipped,
t.totalWithVat,
sub2.shipped futureShipped,
@ -47,6 +48,7 @@ BEGIN
t.addressFk,
t.id,
t.shipped,
ts.alertLevel,
st.name state,
st.code,
st.classColor,

View File

@ -5,7 +5,7 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`creditInsurance_afterIn
BEGIN
UPDATE `client` c
JOIN vn.creditClassification cc ON cc.client = c.id
SET creditInsurance = NEW.credit WHERE cc.id = NEW.creditClassification;
SET creditInsurance = NEW.credit WHERE cc.id = NEW.creditClassificationFk;
END$$
DELIMITER ;

View File

@ -1,10 +0,0 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`creditInsurance_beforeInsert`
BEFORE INSERT ON `creditInsurance`
FOR EACH ROW
BEGIN
IF NEW.creditClassificationFk THEN
SET NEW.creditClassification = NEW.creditClassificationFk;
END IF;
END$$
DELIMITER ;

View File

@ -71,7 +71,10 @@ BEGIN
SET NEW.currencyFk = entry_getCurrency(NEW.currencyFk, NEW.supplierFk);
END IF;
IF NOT (NEW.travelFk <=> OLD.travelFk) OR NOT (NEW.currencyFk <=> OLD.currencyFk) THEN
IF NOT (NEW.travelFk <=> OLD.travelFk)
OR NOT (NEW.currencyFk <=> OLD.currencyFk)
OR NOT (NEW.supplierFk <=> OLD.supplierFk) THEN
SET NEW.commission = entry_getCommission(NEW.travelFk, NEW.currencyFk, NEW.supplierFk);
END IF;
END$$

View File

@ -5,7 +5,7 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`solunionCAP_afterInsert
BEGIN
UPDATE client c
JOIN creditClassification cc ON cc.client = c.id
JOIN creditInsurance ci ON ci.creditClassification = cc.id
JOIN creditInsurance ci ON ci.creditClassificationFk = cc.id
SET creditInsurance = ci.credit * 2 WHERE ci.id = NEW.creditInsurance;
END$$
DELIMITER ;

View File

@ -6,12 +6,12 @@ BEGIN
IF NEW.dateLeaving IS NOT NULL THEN
UPDATE client c
JOIN creditClassification cc ON cc.client = c.id
JOIN creditInsurance ci ON ci.creditClassification = cc.id
JOIN creditInsurance ci ON ci.creditClassificationFk = cc.id
SET creditInsurance = ci.credit WHERE ci.id = OLD.creditInsurance;
ELSE
UPDATE client c
JOIN creditClassification cc ON cc.client = c.id
JOIN creditInsurance ci ON ci.creditClassification = cc.id
JOIN creditInsurance ci ON ci.creditClassificationFk = cc.id
SET creditInsurance = ci.credit * 2 WHERE ci.id = OLD.creditInsurance;
END IF;
END$$

View File

@ -5,7 +5,7 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`solunionCAP_beforeDelet
BEGIN
UPDATE client c
JOIN creditClassification cc ON cc.client = c.id
JOIN creditInsurance ci ON ci.creditClassification = cc.id
JOIN creditInsurance ci ON ci.creditClassificationFk = cc.id
SET creditInsurance = ci.credit WHERE ci.id = OLD.creditInsurance;
END$$
DELIMITER ;

View File

@ -1,11 +1,11 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workerDocument_afterDelete`
AFTER DELETE ON `workerDocument`
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workerDms_afterDelete`
AFTER DELETE ON `workerDms`
FOR EACH ROW
BEGIN
INSERT INTO workerLog
SET `action` = 'delete',
`changedModel` = 'WorkerDocument',
`changedModel` = 'WorkerDms',
`changedModelId` = OLD.id,
`userFk` = account.myUser_getId();
END$$

View File

@ -1,6 +1,6 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workerDocument_beforeInsert`
BEFORE INSERT ON `workerDocument`
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workerDms_beforeInsert`
BEFORE INSERT ON `workerDms`
FOR EACH ROW
BEGIN
SET NEW.editorFk = account.myUser_getId();

View File

@ -1,6 +1,6 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workerDocument_beforeUpdate`
BEFORE UPDATE ON `workerDocument`
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workerDms_beforeUpdate`
BEFORE UPDATE ON `workerDms`
FOR EACH ROW
BEGIN
SET NEW.editorFk = account.myUser_getId();

View File

@ -10,7 +10,6 @@ AS SELECT `s`.`id` AS `saleFk`,
`s`.`concept` AS `concept`,
`i`.`size` AS `size`,
`st`.`name` AS `Estado`,
`st`.`sectorProdPriority` AS `sectorProdPriority`,
`stock`.`visible` AS `available`,
`stock`.`sectorFk` AS `sectorFk`,
`stock`.`shelvingFk` AS `matricula`,

View File

@ -13,4 +13,4 @@ FROM (
`vn`.`ticketState` `ts`
JOIN `vn`.`ticket` `t` ON(`t`.`id` = `ts`.`ticketFk`)
)
WHERE `t`.`shipped` BETWEEN `util`.`VN_CURDATE`() AND `MIDNIGHT`(`util`.`VN_CURDATE`())
WHERE `t`.`shipped` BETWEEN `util`.`VN_CURDATE`() AND `util`.`midnight`()

View File

@ -41,7 +41,6 @@ AS SELECT `i`.`id` AS `Id_Article`,
`i`.`hasKgPrice` AS `hasKgPrice`,
`i`.`equivalent` AS `Equivalente`,
`i`.`isToPrint` AS `Imprimir`,
`i`.`family` AS `Familia__`,
`i`.`doPhoto` AS `do_photo`,
`i`.`created` AS `odbc_date`,
`i`.`isFloramondo` AS `isFloramondo`,

View File

@ -6,7 +6,6 @@ AS SELECT `s`.`id` AS `id`,
`s`.`order` AS `order`,
`s`.`alertLevel` AS `alert_level`,
`s`.`code` AS `code`,
`s`.`sectorProdPriority` AS `sectorProdPriority`,
`s`.`nextStateFk` AS `nextStateFk`,
`s`.`isPreviousPreparable` AS `isPreviousPreparable`,
`s`.`isPicked` AS `isPicked`

View File

@ -0,0 +1,19 @@
ALTER TABLE vn.collectionWagonTicket DROP FOREIGN KEY IF EXISTS collectionWagonTicket_tray;
ALTER TABLE vn.wagonConfig DROP FOREIGN KEY IF EXISTS wagonConfig_wagonTypeColor_FK;
CREATE OR REPLACE TABLE vn.wagonTypeTray (
id INT(11) UNSIGNED auto_increment,
wagonTypeFk INT(11) UNSIGNED NULL,
height INT(11) UNSIGNED NULL,
wagonTypeColorFk int(11) UNSIGNED NULL,
CONSTRAINT wagonTypeTray_pk PRIMARY KEY (id),
CONSTRAINT wagonTypeTray_wagonType_FK FOREIGN KEY (wagonTypeFk) REFERENCES vn.wagonType(id) ON DELETE CASCADE ON UPDATE RESTRICT,
CONSTRAINT wagonTypeTray_wagonTypeColor_FK FOREIGN KEY (wagonTypeColorFk) REFERENCES vn.wagonTypeColor(id)
)
ENGINE=InnoDB
DEFAULT CHARSET=utf8mb3
COLLATE=utf8mb3_unicode_ci;
ALTER TABLE vn.wagonConfig ADD IF NOT EXISTS defaultHeight INT UNSIGNED DEFAULT 0 NULL COMMENT 'Default height in cm for a base tray';
ALTER TABLE vn.wagonConfig ADD IF NOT EXISTS defaultTrayColorFk int(11) UNSIGNED NULL COMMENT 'Default color for a base tray';
ALTER TABLE vn.wagonConfig ADD CONSTRAINT wagonConfig_wagonTypeColor_FK FOREIGN KEY (defaultTrayColorFk) REFERENCES vn.wagonTypeColor(id);
ALTER TABLE vn.collectionWagonTicket ADD CONSTRAINT collectionWagonTicket_tray FOREIGN KEY (trayFk) REFERENCES vn.wagonTypeTray(id);

View File

@ -0,0 +1,13 @@
CREATE OR REPLACE TABLE `util`.`logCleanMultiConfig` (
`schemaName` varchar(64) NOT NULL,
`tableName` varchar(64) NOT NULL,
`retentionDays` int(11) DEFAULT NULL,
`order` int(11) DEFAULT NULL,
`started` datetime DEFAULT NULL,
`finished` datetime DEFAULT NULL,
PRIMARY KEY (`schemaName`,`tableName`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
INSERT INTO `util`.`logCleanMultiConfig` (`schemaName`, `tableName`)
SELECT TABLE_SCHEMA, TABLE_NAME FROM information_schema.`COLUMNS`
WHERE COLUMN_NAME IN ('newInstance', 'newInstance');

View File

@ -0,0 +1 @@
CREATE INDEX userLog_creationDate_IDX USING BTREE ON account.userLog (creationDate DESC);

View File

@ -0,0 +1 @@
CREATE INDEX roleLog_creationDate_IDX USING BTREE ON account.roleLog (creationDate DESC);

View File

@ -0,0 +1 @@
CREATE INDEX ACLLog_creationDate_IDX USING BTREE ON salix.ACLLog (creationDate DESC);

View File

@ -0,0 +1 @@
CREATE INDEX supplierLog_creationDate_IDX USING BTREE ON vn.supplierLog (creationDate DESC);

View File

@ -0,0 +1 @@
CREATE INDEX deviceProductionLog_creationDate_IDX USING BTREE ON vn.deviceProductionLog (creationDate DESC);

View File

@ -0,0 +1 @@
CREATE INDEX routeLog_creationDate_IDX USING BTREE ON vn.routeLog (creationDate DESC);

View File

@ -0,0 +1 @@
CREATE INDEX itemLog_creationDate_IDX USING BTREE ON vn.itemLog (creationDate DESC);

View File

@ -0,0 +1 @@
CREATE INDEX userLog_creationDate_IDX USING BTREE ON vn.userLog (creationDate DESC);

View File

@ -0,0 +1 @@
CREATE INDEX invoiceInLog_creationDate_IDX USING BTREE ON vn.invoiceInLog (creationDate DESC);

View File

@ -0,0 +1 @@
CREATE INDEX zoneLog_creationDate_IDX USING BTREE ON vn.zoneLog (creationDate DESC);

View File

@ -0,0 +1 @@
CREATE INDEX clientLog_creationDate_IDX USING BTREE ON vn.clientLog (creationDate DESC);

View File

@ -0,0 +1 @@
CREATE INDEX workerLog_creationDate_IDX USING BTREE ON vn.workerLog (creationDate DESC);

View File

@ -0,0 +1 @@
CREATE INDEX rateLog_creationDate_IDX USING BTREE ON vn.rateLog (creationDate DESC);

View File

@ -0,0 +1 @@
CREATE INDEX claimLog_creationDate_IDX USING BTREE ON vn.claimLog (creationDate DESC);

View File

@ -0,0 +1 @@
CREATE INDEX packingSiteDeviceLog_creationDate_IDX USING BTREE ON vn.packingSiteDeviceLog (creationDate DESC);

View File

@ -0,0 +1 @@
CREATE INDEX travelLog_creationDate_IDX USING BTREE ON vn.travelLog (creationDate DESC);

View File

@ -0,0 +1 @@
CREATE INDEX shelvingLog_creationDate_IDX USING BTREE ON vn.shelvingLog (creationDate DESC);

View File

@ -0,0 +1 @@
CREATE INDEX productionConfigLog_creationDate_IDX USING BTREE ON vn.productionConfigLog (creationDate DESC);

View File

@ -0,0 +1 @@
CREATE INDEX entryLog_creationDate_IDX USING BTREE ON vn.entryLog (creationDate DESC);

View File

@ -0,0 +1 @@
CREATE INDEX agencyLog_creationDate_IDX USING BTREE ON vn.agencyLog (creationDate DESC);

View File

@ -0,0 +1 @@
CREATE INDEX parkingLog_creationDate_IDX USING BTREE ON vn.parkingLog (creationDate DESC);

View File

@ -0,0 +1 @@
CREATE INDEX bufferLog_creationDate_IDX USING BTREE ON srt.bufferLog (creationDate DESC);

View File

@ -0,0 +1,16 @@
ALTER TABLE IF EXISTS `vn`.`payrollWorker`
MODIFY COLUMN IF EXISTS `nss__` varchar(23) NOT NULL COMMENT '@deprecated 2024-03-15',
MODIFY COLUMN IF EXISTS `codpuesto__` int(10) NOT NULL COMMENT '@deprecated 2024-03-15',
MODIFY COLUMN IF EXISTS `codcontrato__` int(10) NOT NULL COMMENT '@deprecated 2024-03-15',
MODIFY COLUMN IF EXISTS `FAntiguedad__` date NOT NULL COMMENT '@deprecated 2024-03-15',
MODIFY COLUMN IF EXISTS `grupotarifa__` int(10) NOT NULL COMMENT '@deprecated 2024-03-15',
MODIFY COLUMN IF EXISTS `codcategoria__` int(10) NOT NULL COMMENT '@deprecated 2024-03-15',
MODIFY COLUMN IF EXISTS `ContratoTemporal__` tinyint(1) NOT NULL DEFAULT 0 COMMENT '@deprecated 2024-03-15';
ALTER TABLE IF EXISTS `vn`.`payrollWorkCenter`
MODIFY COLUMN IF EXISTS `Centro__` varchar(255) NOT NULL COMMENT '@deprecated 2024-03-15',
MODIFY COLUMN IF EXISTS `nss_cotizacion__` varchar(15) NOT NULL COMMENT '@deprecated 2024-03-15',
MODIFY COLUMN IF EXISTS `domicilio__` varchar(255) NOT NULL COMMENT '@deprecated 2024-03-15',
MODIFY COLUMN IF EXISTS `poblacion__` varchar(45) NOT NULL COMMENT '@deprecated 2024-03-15',
MODIFY COLUMN IF EXISTS `cp__` varchar(5) NOT NULL COMMENT '@deprecated 2024-03-15',
MODIFY COLUMN IF EXISTS `empresa_id__` int(10) NOT NULL COMMENT '@deprecated 2024-03-15';

View File

@ -0,0 +1,30 @@
-- Place your SQL code here
-- vn.stockBought definition
CREATE TABLE IF NOT EXISTS vn.stockBought (
id INT UNSIGNED auto_increment NOT NULL,
workerFk int(10) unsigned NOT NULL,
bought decimal(10,2) NOT NULL COMMENT 'purchase volume in m3 for the day',
reserve decimal(10,2) NULL COMMENT 'reserved volume in m3 for the day',
dated DATE NOT NULL DEFAULT current_timestamp(),
CONSTRAINT stockBought_pk PRIMARY KEY (id),
CONSTRAINT stockBought_unique UNIQUE KEY (workerFk,dated),
CONSTRAINT stockBought_worker_FK FOREIGN KEY (workerFk) REFERENCES vn.worker(id)
)
ENGINE=InnoDB
DEFAULT CHARSET=utf8mb3
COLLATE=utf8mb3_unicode_ci;
INSERT IGNORE vn.stockBought (workerFk, bought, reserve, dated)
SELECT userFk, SUM(buyed), SUM(IFNULL(reserved,0)), dated
FROM vn.stockBuyed
WHERE userFk IS NOT NULL
AND buyed IS NOT NULL
GROUP BY userFk, dated;
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
VALUES ('StockBought','*','READ','ALLOW','ROLE','buyer'),
('StockBought','*','WRITE','ALLOW','ROLE','buyer'),
('Buyer','*','READ','ALLOW','ROLE','buyer');

View File

@ -0,0 +1,9 @@
-- Place your SQL code here
INSERT INTO salix.ACL
SET model = 'Ticket',
property = 'setWeight',
accessType = 'WRITE',
permission = 'ALLOW',
principalType = 'ROLE',
principalId = 'salesPerson';

View File

@ -0,0 +1,8 @@
ALTER TABLE util.config
CHANGE dbVersion dbVersion__ char(11) DEFAULT NULL COMMENT '@deprecated 2024-09-02 refs #7819';
ALTER TABLE util.config
CHANGE hasTriggersDisabled hasTriggersDisabled__ tinyint(1) DEFAULT 0 NOT NULL COMMENT '@deprecated 2024-09-02 refs #7819';
RENAME TABLE account.accountLog TO account.accountLog__;
ALTER TABLE account.accountLog__ COMMENT='@deprecated 2024-09-02 refs #7819';

View File

@ -0,0 +1 @@
DROP DATABASE IF EXISTS `.mysqlworkbench`;

View File

@ -0,0 +1,84 @@
ALTER TABLE bi.rutasBoard DROP COLUMN coste_bulto__;
ALTER TABLE bi.rutasBoard DROP COLUMN Dia__;
ALTER TABLE bi.rutasBoard DROP COLUMN km__;
ALTER TABLE bi.rutasBoard DROP COLUMN m3__;
ALTER TABLE bi.rutasBoard DROP COLUMN Matricula__;
ALTER TABLE bi.rutasBoard DROP COLUMN month__;
ALTER TABLE bi.rutasBoard DROP COLUMN Terceros__;
ALTER TABLE bi.rutasBoard DROP COLUMN Tipo__;
ALTER TABLE bi.rutasBoard DROP COLUMN warehouse_id__;
ALTER TABLE bi.rutasBoard DROP COLUMN year__;
ALTER TABLE bs.clientDied DROP COLUMN Boss__;
ALTER TABLE bs.clientDied DROP COLUMN clientName__;
ALTER TABLE bs.clientDied DROP COLUMN workerCode__;
ALTER TABLE bs.salesByItemTypeDay DROP COLUMN netSale__;
ALTER TABLE vn.agency DROP FOREIGN KEY agency_FK;
ALTER TABLE vn.agency DROP COLUMN warehouseAliasFk__;
ALTER TABLE vn.awbComponent DROP COLUMN dated__;
ALTER TABLE vn.buy DROP COLUMN containerFk__;
ALTER TABLE vn.chat DROP COLUMN status__;
ALTER TABLE vn.claim DROP COLUMN rma__;
ALTER TABLE vn.client DROP COLUMN clientTypeFk__;
ALTER TABLE vn.client DROP COLUMN hasIncoterms__;
ALTER TABLE vn.clientType DROP COLUMN id__;
ALTER TABLE vn.cmr DROP FOREIGN KEY cmr_fk1;
ALTER TABLE vn.cmr DROP COLUMN ticketFk__;
ALTER TABLE vn.company DROP COLUMN sage200Company__;
ALTER TABLE vn.country DROP FOREIGN KEY country_FK;
ALTER TABLE vn.country DROP COLUMN politicalCountryFk__;
ALTER TABLE vn.deliveryNote DROP FOREIGN KEY albaran_FK;
ALTER TABLE vn.deliveryNote DROP COLUMN farmingFk__;
ALTER TABLE vn.dmsType DROP COLUMN path__;
ALTER TABLE vn.dua DROP COLUMN awbFk__;
ALTER TABLE vn.entry DROP COLUMN isBlocked__;
ALTER TABLE vn.expedition DROP COLUMN itemFk__;
ALTER TABLE vn.item DROP COLUMN minQuantity__;
ALTER TABLE vn.item DROP COLUMN packingShelve__;
ALTER TABLE vn.itemType DROP COLUMN compression__;
ALTER TABLE vn.itemType DROP COLUMN density__;
ALTER TABLE vn.itemType DROP COLUMN hasComponents__;
ALTER TABLE vn.itemType DROP COLUMN location__;
ALTER TABLE vn.itemType DROP COLUMN maneuver__;
ALTER TABLE vn.itemType DROP COLUMN profit__;
ALTER TABLE vn.itemType DROP COLUMN target__;
ALTER TABLE vn.itemType DROP COLUMN topMargin__;
ALTER TABLE vn.itemType DROP COLUMN transaction__;
ALTER TABLE vn.itemType DROP FOREIGN KEY warehouseFk5;
ALTER TABLE vn.itemType DROP COLUMN warehouseFk__;
ALTER TABLE vn.ledgerConfig DROP COLUMN lastBookEntry__;
ALTER TABLE vn.saleTracking DROP FOREIGN KEY saleTracking_FK_1;
ALTER TABLE vn.saleTracking DROP COLUMN actionFk__;
ALTER TABLE vn.supplier DROP COLUMN isFarmer__;
ALTER TABLE vn.supplierAccount DROP COLUMN description__;
ALTER TABLE vn.ticketRequest DROP COLUMN buyerCode__;
ALTER TABLE vn.travel DROP COLUMN agencyFk__;
ALTER TABLE vn.warehouse DROP FOREIGN KEY warehouse_ibfk_2;
ALTER TABLE vn.warehouse DROP COLUMN aliasFk__;
ALTER TABLE vn.worker DROP COLUMN labelerFk__;

View File

@ -0,0 +1,21 @@
DROP TABLE IF EXISTS account.mailClientAccess__;
DROP TABLE IF EXISTS account.mailSenderAccess__;
DROP TABLE IF EXISTS bi.analisis_ventas_familia_evolution__;
DROP TABLE IF EXISTS bi.live_counter__;
DROP TABLE IF EXISTS bi.partitioning_information__;
DROP TABLE IF EXISTS bi.primer_pedido__;
DROP TABLE IF EXISTS bi.tarifa_premisas__;
DROP TABLE IF EXISTS bi.tarifa_warehouse__;
DROP TABLE IF EXISTS bs.compradores__;
DROP TABLE IF EXISTS bs.salesMonthlySnapshot___;
DROP TABLE IF EXISTS bs.salesPerson__;
DROP TABLE IF EXISTS bs.vendedores_evolution__;
DROP TABLE IF EXISTS vn.botanicExport__;
DROP TABLE IF EXISTS vn.claimRma__;
DROP TABLE IF EXISTS vn.coolerPathDetail__;
DROP TABLE IF EXISTS vn.forecastedBalance__;
DROP TABLE IF EXISTS vn.routeLoadWorker__;
DROP TABLE IF EXISTS vn.routeUserPercentage__;
DROP TABLE IF EXISTS vn.ticketSms__;
DROP TABLE IF EXISTS vn.ticketTrackingState__;
DROP TABLE IF EXISTS vn.warehouseAlias__;

View File

@ -0,0 +1,12 @@
-- Place your SQL code here
DELETE FROM salix.ACL WHERE model = 'Province' LIMIT 1;
DELETE FROM salix.ACL WHERE model = 'Town' LIMIT 1;
UPDATE salix.ACL SET accessType = 'READ' WHERE model = 'BankEntity';
INSERT INTO salix.ACL
SET model = 'BankEntity',
property = '*',
accessType = 'WRITE',
permission = 'ALLOW',
principalType = 'ROLE',
principalId = 'financial';

View File

@ -0,0 +1 @@
CREATE INDEX saleGroupLog_creationDate_IDX USING BTREE ON vn.saleGroupLog (creationDate DESC);

View File

@ -0,0 +1,9 @@
-- Place your SQL code here
CREATE TABLE IF NOT EXISTS vn.ticketCanAdvanceConfig (
id int(10) unsigned NOT NULL,
destinationOrder INT NULL,
PRIMARY KEY (`id`),
CONSTRAINT `ticketCanAdvanceConfig_check` CHECK (`id` = 1)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
INSERT INTO vn.ticketCanAdvanceConfig SET id =1, destinationOrder = 5;

View File

@ -0,0 +1 @@
ALTER TABLE vn.state DROP COLUMN sectorProdPriority;

View File

@ -0,0 +1,2 @@
INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId)
VALUES( 'Device', 'handleUser', '*', 'ALLOW', 'ROLE', 'employee');

View File

@ -0,0 +1,3 @@
ALTER TABLE vn.creditInsurance DROP FOREIGN KEY CreditInsurance_Fk1;
ALTER TABLE vn.creditInsurance
CHANGE creditClassification creditClassification__ int(11) DEFAULT NULL COMMENT '@deprecated 2024-09-11';

View File

@ -0,0 +1 @@
ALTER TABLE vn.workerDocument CHANGE worker workerFk int(10) unsigned DEFAULT NULL NULL;

View File

@ -0,0 +1 @@
ALTER TABLE vn.workerDocument CHANGE document dmsFk int(11) DEFAULT NULL NULL;

View File

@ -0,0 +1 @@
RENAME TABLE vn.workerDocument TO vn.workerDms;

View File

@ -0,0 +1,4 @@
-- Place your SQL code here
INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId)
VALUES ('WorkerTimeControlMail', 'count', 'READ', 'ALLOW', 'ROLE', 'employee'),
('Worker', '__get__mail', 'READ', 'ALLOW', 'ROLE', 'hr');

View File

@ -1,2 +1,2 @@
ALTER TABLE vn.productionConfig ADD IF NOT EXISTS minPlantTrayLength INT DEFAULT 53 NOT NULL
COMMENT 'minimum length for plant tray restriction. Avoid to make collection of the ticket with this kind of item';
ALTER TABLE vn.productionConfig ADD IF NOT EXISTS minPlantTrayLength INT DEFAULT 53 NOT NULL
COMMENT 'minimum length for plant tray restriction. Avoid to make collection of the ticket with this kind of item';

View File

@ -0,0 +1,13 @@
ALTER TABLE `vn`.`payrollWorkCenter` DROP PRIMARY KEY;
ALTER TABLE `vn`.`payrollWorkCenter` DROP COLUMN `empresa_id__`;
ALTER TABLE `vn`.`payrollWorkCenter` DROP COLUMN `Centro__`;
ALTER TABLE `vn`.`payrollWorkCenter` DROP COLUMN `nss_cotizacion__`;
ALTER TABLE `vn`.`payrollWorkCenter` DROP COLUMN `domicilio__`;
ALTER TABLE `vn`.`payrollWorkCenter` DROP COLUMN `poblacion__`;
ALTER TABLE `vn`.`payrollWorkCenter` DROP COLUMN `cp__`;
ALTER TABLE `vn`.`payrollWorker` DROP COLUMN `nss__`;
ALTER TABLE `vn`.`payrollWorker` DROP COLUMN `codpuesto__`;
ALTER TABLE `vn`.`payrollWorker` DROP COLUMN `codcontrato__`;
ALTER TABLE `vn`.`payrollWorker` DROP COLUMN `FAntiguedad__`;
ALTER TABLE `vn`.`payrollWorker` DROP COLUMN `codcategoria__`;
ALTER TABLE `vn`.`payrollWorker` DROP COLUMN `ContratoTemporal__`;

View File

@ -0,0 +1,12 @@
ALTER TABLE vn.collectionWagon DROP FOREIGN KEY IF EXISTS collectionWagon_FK_1;
ALTER TABLE vn.collectionWagonTicket DROP FOREIGN KEY IF EXISTS collectionWagonTicket_FK_1;
ALTER TABLE vn.wagonVolumetry DROP FOREIGN KEY IF EXISTS wagonVolumetry_FK_1;
ALTER TABLE vn.wagon MODIFY COLUMN id int(11) unsigned auto_increment NOT NULL COMMENT '26 letras de alfabeto inglés';
ALTER TABLE vn.collectionWagon MODIFY COLUMN wagonFk int(11) unsigned NOT NULL;
ALTER TABLE vn.collectionWagonTicket MODIFY COLUMN wagonFk int(11) unsigned NOT NULL;
ALTER TABLE vn.wagonVolumetry MODIFY COLUMN wagonFk int(11) unsigned NOT NULL;
ALTER TABLE vn.collectionWagon ADD CONSTRAINT collectionWagon_FK_1 FOREIGN KEY (wagonFk) REFERENCES vn.wagon(id) ON DELETE RESTRICT ON UPDATE CASCADE;
ALTER TABLE vn.collectionWagonTicket ADD CONSTRAINT collectionWagonTicket_FK_1 FOREIGN KEY (wagonFk) REFERENCES vn.wagon(id) ON DELETE RESTRICT ON UPDATE CASCADE;
ALTER TABLE vn.wagonVolumetry ADD CONSTRAINT wagonVolumetry_FK_1 FOREIGN KEY (wagonFk) REFERENCES vn.wagon(id) ON DELETE RESTRICT ON UPDATE CASCADE;

View File

@ -0,0 +1,19 @@
ALTER TABLE vn.addressWaste
MODIFY COLUMN `type` enum('external', 'fault', 'container', 'break', 'other')
CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL;
UPDATE vn.addressWaste
SET `type`='container'
WHERE addressFk=77;
UPDATE vn.addressWaste
SET `type`='fault'
WHERE addressFk=317;
UPDATE vn.addressWaste
SET `type`='break'
WHERE addressFk=57702;
UPDATE vn.addressWaste
SET `type`='other'
WHERE addressFk=43432;

View File

@ -0,0 +1,6 @@
ALTER TABLE bs.waste
DROP COLUMN saleInternalWaste,
ADD saleFaultWaste decimal(10,2) DEFAULT NULL NULL,
ADD saleContainerWaste decimal(10,2) DEFAULT NULL NULL,
ADD saleBreakWaste decimal(10,2) DEFAULT NULL NULL,
ADD saleOtherWaste decimal(10,2) DEFAULT NULL NULL;

View File

@ -0,0 +1,3 @@
UPDATE bs.nightTask
SET `procedure` = 'waste_addSalesLauncher'
WHERE `procedure` = 'waste_addSales';

View File

@ -0,0 +1 @@
GRANT EXECUTE ON PROCEDURE bs.waste_addSales TO buyerBoss;

View File

@ -0,0 +1,3 @@
-- Place your SQL code here
ALTER TABLE vn.parking DROP FOREIGN KEY IF EXISTS parking_fk1;
ALTER TABLE vn.parking ADD CONSTRAINT parking_fk1 FOREIGN KEY (sectorFk) REFERENCES vn.sector(id) ON DELETE RESTRICT ON UPDATE CASCADE;

View File

@ -0,0 +1,2 @@
ALTER TABLE vn.worker
CHANGE isF11Allowed isF11Allowed__ TINYINT(1) NOT NULL DEFAULT 0 COMMENT '@deprecated 2024-09-22';

View File

@ -0,0 +1,31 @@
-- vn.priceDelta definition
CREATE OR REPLACE TABLE vn.priceDelta (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`itemTypeFk` smallint(5) unsigned NOT NULL,
`minSize` int(10) unsigned DEFAULT NULL COMMENT 'Minimum item.size',
`maxSize` int(10) unsigned DEFAULT NULL COMMENT 'Maximum item.size',
`inkFk` varchar(3) DEFAULT NULL,
`originFk` tinyint(2) unsigned DEFAULT NULL,
`producerFk` mediumint(3) unsigned DEFAULT NULL,
`fromDated` date DEFAULT NULL,
`toDated` date DEFAULT NULL,
`absIncreasing` decimal(10,3) DEFAULT NULL COMMENT 'Absolute increasing of final price',
`ratIncreasing` int(11) DEFAULT NULL COMMENT 'Increasing ratio for the cost price',
`warehouseFk` smallint(6) unsigned NOT NULL,
`created` timestamp NOT NULL DEFAULT current_timestamp(),
`editorFk` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `priceDelta_itemType_FK` (`itemTypeFk`),
KEY `priceDelta_ink_FK` (`inkFk`),
KEY `priceDelta_producer_FK` (`producerFk`),
KEY `priceDelta_warehouse_FK` (`warehouseFk`),
KEY `priceDelta_worker_FK` (`editorFk`),
CONSTRAINT `priceDelta_ink_FK` FOREIGN KEY (`inkFk`) REFERENCES `ink` (`id`) ON UPDATE CASCADE,
CONSTRAINT `priceDelta_itemType_FK` FOREIGN KEY (`itemTypeFk`) REFERENCES `itemType` (`id`) ON UPDATE CASCADE,
CONSTRAINT `priceDelta_producer_FK` FOREIGN KEY (`producerFk`) REFERENCES `producer` (`id`) ON UPDATE CASCADE,
CONSTRAINT `priceDelta_warehouse_FK` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE,
CONSTRAINT `priceDelta_worker_FK` FOREIGN KEY (`editorFk`) REFERENCES `worker` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Defines the increasing o decreasing for ranges of items';
GRANT INSERT, SELECT, UPDATE, DELETE ON TABLE vn.priceDelta TO buyer;

View File

@ -0,0 +1,6 @@
-- Place your SQL code here
ALTER TABLE vn.priceDelta ADD IF NOT EXISTS zoneGeoFk int(11) NULL;
ALTER TABLE vn.priceDelta ADD CONSTRAINT priceDelta_zoneGeo_FK FOREIGN KEY IF NOT EXISTS (zoneGeoFk)
REFERENCES vn.zoneGeo (`id`) ON DELETE RESTRICT ON UPDATE CASCADE;

View File

@ -687,8 +687,8 @@ export default {
ticketFuture: {
searchResult: 'vn-ticket-future tbody tr',
openAdvancedSearchButton: 'vn-searchbar .append vn-icon[icon="arrow_drop_down"]',
originDated: 'vn-date-picker[label="Origin date"]',
futureDated: 'vn-date-picker[label="Destination date"]',
originScopeDays: 'vn-date-picker[label="Origin date"]',
futureScopeDays: 'vn-date-picker[label="Destination date"]',
linesMax: 'vn-textfield[label="Max Lines"]',
litersMax: 'vn-textfield[label="Max Liters"]',
ipt: 'vn-autocomplete[label="Origin IPT"]',

View File

@ -35,6 +35,14 @@ describe('Client Edit billing data path', () => {
it(`should attempt to edit the billing data without an IBAN but fail`, async() => {
await page.autocompleteSearch($.payMethod, 'PayMethod with IBAN');
await page.waitToClick($.saveButton);
const message = await page.waitForSnackbar();
expect(message.text).toContain('That payment method requires an IBAN');
});
it(`should edit the billing data and save the form`, async() => {
await page.autocompleteSearch($.payMethod, 'PayMethod five');
await page.autocompleteSearch($.swiftBic, 'BBKKESMMMMM');
await page.clearInput($.dueDay);
await page.write($.dueDay, '60');
@ -45,10 +53,13 @@ describe('Client Edit billing data path', () => {
await page.waitToClick($.saveButton);
const message = await page.waitForSnackbar();
expect(message.text).toContain('That payment method requires an IBAN');
expect(message.text).toContain('Notification sent!');
});
it(`should create a new BIC code`, async() => {
await page.loginAndModule('financial', 'client');
await page.accessToSearchResult('Bruce Banner');
await page.accessToSection('client.card.billingData');
await page.waitToClick($.newBankEntityButton);
await page.write($.newBankEntityName, 'Gotham City Bank');
await page.write($.newBankEntityBIC, 'GTHMCT');
@ -66,7 +77,7 @@ describe('Client Edit billing data path', () => {
it(`should confirm the IBAN pay method was sucessfully saved`, async() => {
const payMethod = await page.waitToGetProperty($.payMethod, 'value');
expect(payMethod).toEqual('PayMethod with IBAN');
expect(payMethod).toEqual('PayMethod five');
});
it(`should clear the BIC code field, update the IBAN to see how he BIC code autocompletes`, async() => {
@ -79,14 +90,6 @@ describe('Client Edit billing data path', () => {
expect(automaticCode).toEqual('CAIXESBB');
});
it(`should save the form with all its new data`, async() => {
await page.waitForWatcherData($.watcher);
await page.waitToClick($.saveButton);
const message = await page.waitForSnackbar();
expect(message.text).toContain('Notification sent!');
});
it('should confirm the billing data have been edited', async() => {
const dueDate = await page.waitToGetProperty($.dueDay, 'value');
const IBAN = await page.waitToGetProperty($.IBAN, 'value');
@ -94,7 +97,9 @@ describe('Client Edit billing data path', () => {
const receivedCoreLCR = await page.checkboxState($.receivedCoreLCRCheckbox);
const receivedCoreVNL = await page.checkboxState($.receivedCoreVNLCheckbox);
const receivedB2BVNL = await page.checkboxState($.receivedB2BVNLCheckbox);
const payMethod = await page.waitToGetProperty($.payMethod, 'value');
expect(payMethod).toEqual('PayMethod five');
expect(dueDate).toEqual('60');
expect(IBAN).toEqual('ES9121000418450200051332');
expect(swiftBic).toEqual('CAIXESBB');

View File

@ -19,7 +19,7 @@ describe('Ticket descriptor path', () => {
it('should count the amount of tickets in the turns section', async() => {
const result = await page.countElement(selectors.ticketsIndex.weeklyTicket);
expect(result).toEqual(5);
expect(result).toEqual(6);
});
it('should go back to the ticket index then search and access a ticket summary', async() => {
@ -106,7 +106,7 @@ describe('Ticket descriptor path', () => {
await page.doSearch();
const nResults = await page.countElement(selectors.ticketsIndex.searchWeeklyResult);
expect(nResults).toEqual(5);
expect(nResults).toEqual(6);
});
it('should update the agency then remove it afterwards', async() => {

View File

@ -30,18 +30,18 @@ describe('Ticket Future path', () => {
expect(message.text).toContain('warehouseFk is a required argument');
await page.waitToClick(selectors.ticketFuture.openAdvancedSearchButton);
await page.clearInput(selectors.ticketFuture.futureDated);
await page.clearInput(selectors.ticketFuture.futureScopeDays);
await page.waitToClick(selectors.ticketFuture.submit);
message = await page.waitForSnackbar();
expect(message.text).toContain('futureDated is a required argument');
expect(message.text).toContain('futureScopeDays is a required argument');
await page.waitToClick(selectors.ticketFuture.openAdvancedSearchButton);
await page.clearInput(selectors.ticketFuture.originDated);
await page.clearInput(selectors.ticketFuture.originScopeDays);
await page.waitToClick(selectors.ticketFuture.submit);
message = await page.waitForSnackbar();
expect(message.text).toContain('originDated is a required argument');
expect(message.text).toContain('originScopeDays is a required argument');
await page.waitToClick(selectors.ticketFuture.openAdvancedSearchButton);
await page.waitToClick(selectors.ticketFuture.submit);
@ -71,7 +71,7 @@ describe('Ticket Future path', () => {
await page.autocompleteSearch(selectors.ticketFuture.state, 'Free');
await page.waitToClick(selectors.ticketFuture.submit);
expect(httpRequest).toContain('state=FREE');
expect(httpRequest).toContain('state=0');
await page.waitToClick(selectors.ticketFuture.openAdvancedSearchButton);
@ -80,7 +80,7 @@ describe('Ticket Future path', () => {
await page.autocompleteSearch(selectors.ticketFuture.futureState, 'Free');
await page.waitToClick(selectors.ticketFuture.submit);
expect(httpRequest).toContain('futureState=FREE');
expect(httpRequest).toContain('futureState=0');
await page.waitToClick(selectors.ticketFuture.openAdvancedSearchButton);
await page.clearInput(selectors.ticketFuture.state);

View File

@ -237,5 +237,8 @@
"CONSTRAINT `chkParkingCodeFormat` failed for `vn`.`parking`": "CONSTRAINT `chkParkingCodeFormat` failed for `vn`.`parking`",
"This postcode already exists": "This postcode already exists",
"Original invoice not found": "Original invoice not found",
"There is already a tray with the same height": "There is already a tray with the same height",
"The height must be greater than 50cm": "The height must be greater than 50cm",
"The maximum height of the wagon is 200cm": "The maximum height of the wagon is 200cm",
"The quantity claimed cannot be greater than the quantity of the line": "The quantity claimed cannot be greater than the quantity of the line"
}

View File

@ -366,12 +366,17 @@
"The invoices have been created but the PDFs could not be generated": "Se ha facturado pero no se ha podido generar el PDF",
"It has been invoiced but the PDF of refund not be generated": "Se ha facturado pero no se ha podido generar el PDF del abono",
"Payment method is required": "El método de pago es obligatorio",
"Cannot send mail": "No se pudo enviar el correo",
"Cannot send mail": "Não é possível enviar o email",
"CONSTRAINT `supplierAccountTooShort` failed for `vn`.`supplier`": "La cuenta debe tener exactamente 10 dígitos",
"The sale not exists in the item shelving": "La venta no existe en la estantería del artículo",
"The entry not have stickers": "La entrada no tiene etiquetas",
"Too many records": "Demasiados registros",
"Original invoice not found": "Factura original no encontrada",
"The entry has no lines or does not exist": "La entrada no tiene lineas o no existe",
"Weight already set": "El peso ya está establecido",
"This ticket is not allocated to your department": "Este ticket no está asignado a tu departamento",
"There is already a tray with the same height": "Ya existe una bandeja con la misma altura",
"The height must be greater than 50cm": "La altura debe ser superior a 50cm",
"The maximum height of the wagon is 200cm": "La altura máxima es 200cm",
"The quantity claimed cannot be greater than the quantity of the line": "La cantidad reclamada no puede ser mayor que la cantidad de la línea"
}

View File

@ -1,4 +1,7 @@
{
"Account": {
"dataSource": "vn"
},
"AccountConfig": {
"dataSource": "vn"
},
@ -47,9 +50,6 @@
"SipConfig": {
"dataSource": "vn"
},
"Account": {
"dataSource": "vn"
},
"UserLog": {
"dataSource": "vn"
},

View File

@ -46,4 +46,4 @@
"permission": "ALLOW"
}
]
}
}

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