Compare commits

...

443 Commits

Author SHA1 Message Date
Pablo Natek 150733e904 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 6367-blankNotification
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-24 10:00:23 +02:00
Carlos Satorres 01e2391e0a Merge pull request '#7292 - createAddresUEEMember' (!2489) from 7292-createAddresUEEMember into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2489
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-05-24 06:40:28 +00:00
Carlos Satorres 2fc6f6356f Merge branch 'dev' into 7292-createAddresUEEMember
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-24 06:38:27 +00:00
Carlos Satorres 9c3700092e Merge branch '7292-createAddresUEEMember' of https://gitea.verdnatura.es/verdnatura/salix into 7292-createAddresUEEMember
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-24 08:37:48 +02:00
Carlos Satorres a435d88e55 refs #7292 fix tback 2024-05-24 08:37:46 +02:00
Carlos Satorres 5eaadf6044 Merge pull request 'fix: refs #6095 filter by refFk null' (!2468) from 6095-refFk-null-on-search into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2468
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-05-24 06:28:28 +00:00
Carlos Satorres a5079a5ae0 Merge branch 'dev' into 6095-refFk-null-on-search
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-24 06:26:46 +00:00
Carlos Satorres ed85abf9ef Merge branch 'dev' into 7292-createAddresUEEMember
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-24 06:22:55 +00:00
Carlos Satorres 4c3428da55 refs #7292 add traduction
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-24 08:21:28 +02:00
Pako Natek 31dc85a0d7 Merge pull request 'feat: refs #6021 add new field' (!2508) from 6021-add-observations-to-json into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2508
Reviewed-by: Pako Natek <pako@verdnatura.es>
2024-05-24 05:32:40 +00:00
Pako Natek 0a1e09be41 Merge branch 'dev' into 6021-add-observations-to-json
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-24 05:31:10 +00:00
Pablo Natek ee17ea4842 feat: refs #6021 add new field
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-23 21:38:02 +02:00
Carlos Satorres 84582120d1 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7292-createAddresUEEMember
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-23 16:12:55 +02:00
Jorge Penadés 2cd3002d06 Merge pull request 'test' (!2506) from test into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2506
Reviewed-by: Jorge Penades <jorgep@verdnatura.es>
2024-05-23 14:07:21 +00:00
Carlos Andrés 14f243f251 Merge pull request 'fix: refs #7400 ledger_next' (!2495) from 7400-warmfix-ledger into test
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-dev This commit looks good Details
Reviewed-on: #2495
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-05-23 14:03:22 +00:00
Carlos Satorres 33ba999725 Merge pull request 'refs #6111 routeList sql' (!2257) from 6111-routeList into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2257
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-05-23 12:47:56 +00:00
Carlos Satorres f45f909995 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7292-createAddresUEEMember
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-23 14:46:33 +02:00
Carlos Satorres ee010a3bb3 refs #7296 fix pr errors, trad
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-23 14:44:47 +02:00
Carlos Andrés 35a583d6d8 Merge pull request 'test' (!2504) from test into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2504
Reviewed-by: Pablo Natek <pablone@verdnatura.es>
2024-05-23 11:42:23 +00:00
Carlos Andrés 8b967ee927 Merge pull request 'fix: problems in colums ticket and sale refs #7213' (!2497) from 7213-Problems-in-colums-ticket-and-sale into test
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-dev This commit looks good Details
Reviewed-on: #2497
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-05-23 10:53:15 +00:00
Pablo Natek a919c71369 Merge pull request 'feat: refs #7187 Add support for multiple PDAs per user' (!2496) from 7187-add-traducctions into test
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2496
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-05-23 10:24:53 +00:00
Pablo Natek 86a6211cd8 fix: refs #7187 fix duplicate
gitea/salix/pipeline/pr-test This commit looks good Details
2024-05-23 12:23:31 +02:00
Carlos Satorres 49c105ae09 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 6095-refFk-null-on-search
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-23 11:54:48 +02:00
Guillermo Bonet 1730276844 Merge pull request 'refactor: refs #7440 itemComparativeOptimization' (!2501) from 7440-itemComparativeOptimization into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2501
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-05-23 08:55:57 +00:00
Guillermo Bonet bbd948c654 refs #7440 Minor change
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-23 09:47:14 +02:00
Guillermo Bonet 56aec1c781 refs #7440 Optimized item_comparative 2024-05-23 09:44:18 +02:00
Carlos Satorres 1fa5a22bb6 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 6111-routeList
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-23 09:17:19 +02:00
Carlos Satorres 83f638323a Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7292-createAddresUEEMember
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-22 16:09:52 +02:00
Carlos Satorres 4c5f46eb9b Merge pull request 'refs #6820 fix back' (!2480) from 6820-fixMaxKmRoute into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2480
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-05-22 13:55:53 +00:00
Carlos Satorres 4dee90ff57 refs #6820 fix pr
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-22 14:56:46 +02:00
Carlos Andrés bc6af32962 fix: problems in colums ticket and sale refs #7213
gitea/salix/pipeline/pr-test This commit looks good Details
2024-05-22 14:50:45 +02:00
Guillermo Bonet a52b9b6d2e Merge pull request 'refactor: refs #7398 Refactor and change ekt_scan' (!2494) from 7398-ektScan into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2494
Reviewed-by: Pako Natek <pako@verdnatura.es>
2024-05-22 06:31:06 +00:00
Guillermo Bonet 0d620c6f33 feat: refs #7398 Change
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-22 08:11:27 +02:00
Pablo Natek 2142b78deb feat: refs #7187 Add support for multiple PDAs per user
gitea/salix/pipeline/pr-test This commit looks good Details
2024-05-21 19:25:18 +02:00
Jorge Penadés 365e5a3ba3 fix: refs # 7400 ledger_next
gitea/salix/pipeline/pr-dev This commit looks good Details
gitea/salix/pipeline/pr-test This commit looks good Details
2024-05-21 17:31:29 +02:00
Alex Moreno f0d3bfba92 Merge pull request 'fix: checking process.env.NODE_ENV' (!2492) from 7421-fix_checking_NODE_ENV into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2492
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-05-21 13:22:02 +00:00
Alex Moreno 28279b0782 Merge branch 'dev' into 7421-fix_checking_NODE_ENV
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-21 13:12:30 +00:00
Alex Moreno ff33c926af fix: move to boot
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-21 15:11:32 +02:00
Guillermo Bonet 2ffdce3c64 refactor: refs #7398 Refactor and change ekt_scan
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-21 14:40:42 +02:00
Pako Natek e00ac020cc Merge pull request 'evita facturacion proveedores' (!2491) from 7420-supplierPackaging_ReportSource into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2491
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-05-21 12:19:06 +00:00
Alex Moreno 1f2017c272 fix: simplify
gitea/salix/pipeline/pr-master There was a failure building this commit Details
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-21 14:03:13 +02:00
Alex Moreno d884192066 fix: checking process.env.NODE_ENV
gitea/salix/pipeline/pr-master This commit looks good Details
2024-05-21 13:52:50 +02:00
Alex Moreno 18bb8a4ea5 fix: checking process.env.NODE_ENV
gitea/salix/pipeline/pr-master This commit looks good Details
2024-05-21 13:50:45 +02:00
Pako Natek ba478d5358 Merge branch 'dev' into 7420-supplierPackaging_ReportSource
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-21 11:31:41 +00:00
Pako Natek dfde2f6846 evita facturacion proveedores
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-21 13:28:05 +02:00
Guillermo Bonet 1f370c8814 Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details
2024-05-21 11:44:52 +02:00
Guillermo Bonet 6e06891937 Merge branch 'master' into test
gitea/salix/pipeline/head This commit looks good Details
2024-05-21 11:44:26 +02:00
Guillermo Bonet d672385776 hotfix: Rectificación Pepe
gitea/salix/pipeline/head This commit looks good Details
2024-05-21 11:44:11 +02:00
Alex Moreno da75bf95c9 deploy: init version
gitea/salix/pipeline/head This commit looks good Details
2024-05-21 11:16:12 +02:00
Alex Moreno 5dd1d1f1b6 Merge pull request '7430_devToTest' (!2490) from 7430_devToTest into test
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2490
Reviewed-by: Carlos Satorres <carlossa@verdnatura.es>
2024-05-21 09:15:02 +00:00
Pablo Natek 9a762d2fd4 Merge pull request '7187-redirect' (!2476) from 7187-redirect into dev
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-test This commit looks good Details
Reviewed-on: #2476
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-05-21 08:23:03 +00:00
Pablo Natek b39f953898 Merge branch 'dev' into 7187-redirect
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-21 08:21:40 +00:00
Carlos Satorres cf630a7213 refs #7292 traduction es
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-21 10:20:54 +02:00
Carlos Satorres 9bd5244f64 refs #7292 hook ueemember 2024-05-21 10:19:21 +02:00
Guillermo Bonet 35e892a90c refs #7422 Fix
gitea/salix/pipeline/head This commit looks good Details
2024-05-21 10:07:51 +02:00
Alex Moreno e1ab0d3051 Merge pull request 'refs #7431 feat: itemPlacementSupplyStockGetTargetList' (!2488) from 7431_itemPlacements into dev
gitea/salix/pipeline/head There was a failure building this commit Details
Reviewed-on: #2488
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-05-21 07:53:05 +00:00
Alex Moreno f803f5a57d Merge branch 'dev' into 7431_itemPlacements
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-21 07:49:00 +00:00
Guillermo Bonet 6f9826421d refactor: refs #7422 Fix e2e
gitea/salix/pipeline/head There was a failure building this commit Details
2024-05-21 09:39:09 +02:00
Sergio De la torre 6dad3d8af4 refs #7431 feat: itemPlacementSupplyStockGetTargetList
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-21 09:37:29 +02:00
Pablo Natek 8e5d12a6cb Merge branch 'dev' into 7187-redirect
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-21 07:18:06 +00:00
Sergio De la torre cb866b4ab7 refs #7431 feat: itemPlacementSupplyStockGetTargetList
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-21 09:16:47 +02:00
Pablo Natek 6438ce3a16 fix: refs #7187 e2e
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-21 09:13:31 +02:00
Pablo Natek 1fef00789f fix: refs #7187 remove bindings
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-21 08:54:53 +02:00
Guillermo Bonet c4b8cef4f8 refactor: refs #7422 Deleted column of Compres
gitea/salix/pipeline/head This commit looks good Details
2024-05-21 08:17:37 +02:00
Guillermo Bonet 030106f06d refactor: refs #7422 Deprecated column
gitea/salix/pipeline/head This commit looks good Details
2024-05-21 08:13:06 +02:00
Guillermo Bonet b33d4ce319 Merge pull request 'refactor: refs #7375 Refactor clientsDisable' (!2471) from 7375-clientsDisable into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2471
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-05-21 06:11:24 +00:00
Guillermo Bonet ac2ed0956b refs #7422 Fixed all problems
gitea/salix/pipeline/head This commit looks good Details
2024-05-21 08:04:28 +02:00
Guillermo Bonet 81c220d130 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-05-21 07:58:53 +02:00
Guillermo Bonet cbf9a4c4e9 refs #7422 Fixed all problems 2024-05-21 07:58:51 +02:00
Pako Natek 0496c90d86 Merge pull request 'casting values' (!2479) from 7420-supplierPackaging_ReportSource into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2479
Reviewed-by: Pablo Natek <pablone@verdnatura.es>
2024-05-21 05:52:34 +00:00
Pako Natek f947b44da1 Merge branch 'dev' into 7420-supplierPackaging_ReportSource
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-21 05:51:15 +00:00
Guillermo Bonet 93314d67b6 refs #7422 Fix
gitea/salix/pipeline/head There was a failure building this commit Details
2024-05-21 07:31:24 +02:00
Guillermo Bonet cc2b5764e9 refs #7422 Fix
gitea/salix/pipeline/head There was a failure building this commit Details
2024-05-21 07:26:54 +02:00
Guillermo Bonet 82d985ff3a refs #7422 Fix
gitea/salix/pipeline/head There was a failure building this commit Details
2024-05-21 07:19:04 +02:00
Guillermo Bonet 8563116091 Merge pull request 'refactor: refs #7422 Deleted tables' (!2478) from 7422-byeVn2008Tables into dev
gitea/salix/pipeline/head There was a failure building this commit Details
Reviewed-on: #2478
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-05-21 05:06:12 +00:00
Pablo Natek 335b9caaa4 fix: refs #7187 got summary before lilium
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-21 01:10:53 +02:00
Carlos Satorres 119102b0b3 refs #6820 acl
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-20 16:00:38 +02:00
Pablo Natek 38b1e48959 Merge pull request 'feat: refs #6021 add new column' (!2485) from 6021-createObservations into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2485
Reviewed-by: Pako Natek <pako@verdnatura.es>
2024-05-20 12:27:48 +00:00
Alex Moreno 6212974154 Merge pull request 'feat: refs #7296 roadmapStop' (!2461) from 7296-expeditionTruckToRoadmapStop into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2461
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
Reviewed-by: Carlos Satorres <carlossa@verdnatura.es>
2024-05-20 12:24:21 +00:00
Pablo Natek dab8ae92ef Merge pull request 'fix: refs #6404 fix cancel shipment' (!2486) from 6404-mrwIntegrationWebService into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2486
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-05-20 12:02:48 +00:00
Pablo Natek 3fa557f90d fix: refs #6404 create shipment
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-20 13:58:32 +02:00
Robert Ferrús 823e8fd7a1 feat: refs #7296 requested changes3
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-20 13:27:38 +02:00
Robert Ferrús 34f48e46e7 feat: refs #7296 requested changes2
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-20 13:19:01 +02:00
Robert Ferrús 996f14341d Merge branch 'dev' into 7296-expeditionTruckToRoadmapStop
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-20 10:31:13 +00:00
Robert Ferrús 62ca4885c4 feat: refs #7296 requested changes
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-20 12:28:27 +02:00
Pablo Natek 143f9cf0bb fix: refs #6404 fix return
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-20 12:17:10 +02:00
Pablo Natek d51c9fc120 fix: refs #6404 fix cancel shipment
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-20 12:14:59 +02:00
Pablo Natek b203d94b27 feat: refs #6021 add new column
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-20 11:37:40 +02:00
Alex Moreno 9cba2be00d Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/pipeline/head This commit looks good Details
2024-05-20 11:31:24 +02:00
Alex Moreno f361a07dd5 Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix into test
gitea/salix/pipeline/pr-dev This commit looks good Details
gitea/salix/pipeline/head This commit looks good Details
2024-05-20 11:31:03 +02:00
Alex Moreno f82b105430 fix: TicketLog res.data
gitea/salix/pipeline/head This commit looks good Details
2024-05-20 11:30:43 +02:00
Carlos Satorres 2291c3ca86 Merge pull request 'master' (!2483) from master into test
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-dev This commit looks good Details
Reviewed-on: #2483
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-05-20 09:24:14 +00:00
Carlos Satorres f9ecc687dd Merge pull request 'hotfix TicketLog filter' (!2481) from hotfix-TicketLogs into master
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-test This commit looks good Details
Reviewed-on: #2481
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-05-20 09:21:16 +00:00
Carlos Satorres 6d66c0f71f hotfix TicketLog filter
gitea/salix/pipeline/pr-master This commit looks good Details
2024-05-20 11:14:30 +02:00
Pako Natek abdacb3627 casting values
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-20 10:33:01 +02:00
Carlos Satorres 7f1210e712 refs #6820 fix back
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-20 10:26:09 +02:00
Pako Natek 44ce998604 Merge pull request 'improved proc' (!2477) from 7420-supplierPackaging_ReportSource into dev
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
Reviewed-on: #2477
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-05-20 08:22:39 +00:00
Pako Natek f1ae4d9f29 Merge branch 'dev' into 7420-supplierPackaging_ReportSource
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-20 08:21:25 +00:00
Guillermo Bonet 7f0f1b9547 refactor: refs #7422 Deleted tables
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-20 09:54:30 +02:00
Robert Ferrús e67981b382 Merge branch 'dev' into 7296-expeditionTruckToRoadmapStop
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-20 06:44:31 +00:00
Carlos Satorres cbbd488674 Merge pull request 'refs #7396 fix worker model' (!2474) from 7396-addBasicDataWorker into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2474
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-05-20 06:27:33 +00:00
Pako Natek 9a5acedd38 improved proc
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-20 08:21:54 +02:00
Guillermo Bonet 9d98ae4a03 Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details
2024-05-20 07:02:00 +02:00
Guillermo Bonet 18ce388944 Merge branch 'test' into dev 2024-05-20 06:59:42 +02:00
Guillermo Bonet 329299d4d9 Merge branch 'master' into test
gitea/salix/pipeline/head This commit looks good Details
2024-05-20 06:58:22 +02:00
Guillermo Bonet ac49daf0f3 Merge pull request 'hotfix: ticket 135539 Unroute tickets' (!2469) from 135539-hotfixCloseAll into master
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2469
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-05-20 04:53:49 +00:00
Sergio De la torre a24c289f63 Merge pull request 'feat: conversion art. A1 a A2 refs #4979' (!2171) from 4979-Conversión-automática-de-producto-A1-a-A2 into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2171
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-05-17 15:24:26 +00:00
Sergio De la torre df08f7a8de Merge branch 'dev' into 4979-Conversión-automática-de-producto-A1-a-A2
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-17 15:10:26 +00:00
Sergio De la torre c822a64dc7 refs #4979 feat:getInfoDetails && item_devalueA2
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-17 16:38:11 +02:00
Carlos Satorres 05f09d0b87 refs #7187 fix workerPda
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-17 14:56:40 +02:00
Pablo Natek 7fb6ecd617 feat: refs #7187 redirect to lilium
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-17 14:46:49 +02:00
Carlos Satorres dd7ee27e9b refs #7396 fix worker model
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-17 14:28:28 +02:00
Pablo Natek 2b0ab1816f Merge pull request '#7187 add pda freelancers' (!2298) from 7187-addPdaFreelancers into dev
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-dev Build started... Details
Reviewed-on: #2298
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-05-17 11:35:18 +00:00
Pablo Natek 4790ae94d1 Merge branch 'dev' into 7187-addPdaFreelancers
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-17 11:33:57 +00:00
Alex Moreno 96b013bbbf Merge pull request 'fix: refs #7033 add es locale' (!2472) from 7033-hotfix-addLocale into master
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2472
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-05-17 11:24:37 +00:00
Alex Moreno 44c4432c67 Merge pull request 'feat: refs #6428 auto-changelog with bash' (!2338) from 6428-auto-changeLog into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2338
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-05-17 11:13:54 +00:00
Jorge Penadés 2694f277d2 fix: refs #6744 add es locale
gitea/salix/pipeline/pr-master This commit looks good Details
2024-05-17 13:03:24 +02:00
Carlos Andrés 6a576e69e1 refs #4979 feat:getInfoDetails && item_devalueA2
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-17 12:50:51 +02:00
Carlos Andrés c8db0a3aa8 refs #4979 feat:getInfoDetails && item_devalueA2
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-17 12:48:16 +02:00
Guillermo Bonet 0b5f05cbed refactor: refs #7375 Refactor clientsDisable
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-17 12:36:54 +02:00
Guillermo Bonet 968effc936 hotfix: ticket 135539 Unroute tickets
gitea/salix/pipeline/pr-master This commit looks good Details
2024-05-17 11:56:04 +02:00
Sergio De la torre 135526e513 refs #4979 feat:getInfoDetails && item_devalueA2
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-17 11:20:26 +02:00
Pablo Natek 47c573a324 fix: refs #6095 filter by refFk null
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-17 10:51:37 +02:00
Robert Ferrús 958f91ca93 Merge branch 'dev' into 7296-expeditionTruckToRoadmapStop
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-17 08:39:43 +00:00
Guillermo Bonet 1154e484e5 Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-17 09:57:35 +02:00
Guillermo Bonet 91784f2253 Merge branch 'master' into test
gitea/salix/pipeline/head This commit looks good Details
2024-05-17 09:57:19 +02:00
Guillermo Bonet a99554c773 fix: Occasionally saleVolume bad index
gitea/salix/pipeline/head This commit looks good Details
2024-05-17 09:50:53 +02:00
Carlos Satorres 481ecfa079 Merge branch 'dev' into 7296-expeditionTruckToRoadmapStop
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-17 07:01:45 +00:00
Guillermo Bonet bddc9a8386 Deleted insert into util.debug (deletedState)
gitea/salix/pipeline/head This commit looks good Details
2024-05-17 07:51:51 +02:00
Sergio De la torre 27110c2abe Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 4979-Conversión-automática-de-producto-A1-a-A2
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-17 06:27:09 +02:00
Carlos Andrés 08ea0d2693 Merge pull request 'refs #7400 feat: book ledger with counters' (!2467) from 7400-Contador-para-los-asientos-contables into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2467
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-05-16 18:13:39 +00:00
Carlos Andrés dab90633db Merge pull request 'test' (!2466) from test into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2466
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-05-16 17:21:54 +00:00
Carlos Andrés 8d8cfa24de refs #7400 feat: book ledger with counters
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-16 19:16:25 +02:00
Carlos Andrés 38c505fb7a refs #7400 feat: book ledger with counters
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-16 19:07:48 +02:00
Carlos Andrés 01d1a2391d refs #7400 feat: book ledger with counters 2024-05-16 18:48:59 +02:00
Carlos Andrés 402506467b Merge pull request 'master' (!2464) from master into test
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-dev This commit looks good Details
Reviewed-on: #2464
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-05-16 14:56:56 +00:00
Carlos Andrés c5f2b3a384 Merge pull request 'fix: invoiceInTax_getFromEntries (referenceRate)' (!2462) from Hotfix-referenceRate-en-invoiceInTax_getFromEntries into master
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-test This commit looks good Details
Reviewed-on: #2462
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-05-16 12:53:27 +00:00
Carlos Andrés 2f4f199fad fix: invoiceInTax_getFromEntries (referenceRate)
gitea/salix/pipeline/pr-master This commit looks good Details
2024-05-16 14:40:02 +02:00
Pablo Natek 1372f817bd fix: refs #7187 model
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-16 14:05:22 +02:00
Pablo Natek b299e842b9 fix: refs #7187 model foreignKey
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-16 14:04:21 +02:00
Pablo Natek 4cf5457690 fix: refs #7187 remove focus on spec
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-16 14:01:41 +02:00
Pablo Natek 1abacdc42b fix: refs #7187 method
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-16 14:00:42 +02:00
Pablo Natek b41104432c Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7187-addPdaFreelancers
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-16 13:57:55 +02:00
Ivan Mas 9b5b269fe6 Merge pull request 'refs #6965 Add Fk vehicleFk firstEditorFk' (!2433) from 6965-AddFkRoute-vehicleFk-firstEditorFk into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2433
Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
2024-05-16 11:41:31 +00:00
Ivan Mas 10d812ae3d Merge branch 'dev' into 6965-AddFkRoute-vehicleFk-firstEditorFk
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-16 11:34:18 +00:00
Ivan Mas 993dd0d8bd refs #6965 Modify firstEditorFk NULL
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-16 13:15:55 +02:00
Pablo Natek bcb3ea4837 feat: refs #7187 new method available pda
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-16 10:23:33 +02:00
Robert Ferrús 11a0b98495 feat: refs #7296 roadmapStop
gitea/salix/pipeline/pr-dev Build queued... Details
2024-05-16 10:20:08 +02:00
Guillermo Bonet 115d1aaf85 Fix version
gitea/salix/pipeline/head This commit looks good Details
2024-05-16 08:10:53 +02:00
Sergio De la torre 9b73cdfa6f refs #4979 feat:getInfoDetails && item_devalueA2
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-15 17:03:33 +02:00
Guillermo Bonet 7e3861a02f Merge branch 'test' into dev
gitea/salix/pipeline/head Build queued... Details
2024-05-15 14:32:48 +02:00
Guillermo Bonet 049e8931ab hotfix: Tmp fix item_getSimilar
gitea/salix/pipeline/head This commit looks good Details
2024-05-15 14:30:04 +02:00
Guillermo Bonet c443872d1f Merge pull request 'feat: refs #7264 Refactor proc itemShelvingRadar and added columns' (!2460) from 7264-itemShelvingRadar into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2460
Reviewed-by: Robert Ferrús <robert@verdnatura.es>
2024-05-15 12:18:10 +00:00
Guillermo Bonet dfe317e78a Merge branch '7264-itemShelvingRadar' of https://gitea.verdnatura.es/verdnatura/salix into 7264-itemShelvingRadar
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-15 14:05:36 +02:00
Guillermo Bonet 9134e0ff65 feat: refs #7264 Minor change 2024-05-15 14:05:35 +02:00
Guillermo Bonet ac2a0c5151 Merge branch 'dev' into 7264-itemShelvingRadar
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-15 11:54:55 +00:00
Guillermo Bonet 53fa78894c feat: refs #7264 Refactor proc itemShelvingRadar and added columns
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-15 13:54:22 +02:00
Alex Moreno 8260016da5 Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/pipeline/head This commit looks good Details
2024-05-15 13:53:07 +02:00
Carlos Satorres 4b8cad9aef hotfix accessScopes
gitea/salix/pipeline/head This commit looks good Details
2024-05-15 13:23:36 +02:00
Ivan Mas c15f9b13f2 Merge branch 'dev' into 6965-AddFkRoute-vehicleFk-firstEditorFk
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-15 11:17:11 +00:00
Ivan Mas 9ed90412de refs #6965 Points to user instead of worker
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-15 13:15:27 +02:00
Carlos Satorres 6387075413 Merge pull request 'hotfix accessScopes' (!2458) from hotfix-accesScopesPdf into master
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2458
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-05-15 10:53:15 +00:00
Carlos Satorres a4e1b1931c hotfix accessScopes
gitea/salix/pipeline/pr-master This commit looks good Details
2024-05-15 12:38:30 +02:00
Alex Moreno 53057863e1 Merge pull request 'testToMaster hotFix' (!2457) from test into master
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2457
Reviewed-by: Carlos Satorres <carlossa@verdnatura.es>
2024-05-15 10:26:13 +00:00
Alex Moreno dcc943e82d hotFix(env): refs #7388 disable webpack nodeEnv
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-master This commit looks good Details
2024-05-15 12:19:01 +02:00
Alex Moreno f442f0dafb hotFix(env): refs #7388 install gettext-base
gitea/salix/pipeline/head This commit looks good Details
2024-05-15 11:52:50 +02:00
Sergio De la torre 9288f08b91 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 4979-Conversión-automática-de-producto-A1-a-A2
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-15 11:30:05 +02:00
Robert Ferrús 23eea27268 Merge pull request 'feat: refs #7296 expeditionTruck to roadmapStop' (!2386) from 7296-expeditionTruck into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2386
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-05-15 09:06:47 +00:00
Robert Ferrús 1ee29036f4 Merge branch 'dev' into 7296-expeditionTruck
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-15 08:22:00 +00:00
Guillermo Bonet 778f368300 Merge pull request 'refactor: refs #7252 Deprecated vn.deliveryNote.farmingFk' (!2429) from 7252-deliveryNoteFarmingFk into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2429
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-05-15 08:19:34 +00:00
Alex Moreno 1c3c5e1423 Merge pull request 'hotFix: fix env' (!2454) from 7388_fix_front_env into test
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2454
Reviewed-by: Juan Ferrer <juan@verdnatura.es>
2024-05-15 08:18:12 +00:00
Alex Moreno a64d41fedb Merge branch 'test' into 7388_fix_front_env
gitea/salix/pipeline/pr-test This commit looks good Details
2024-05-15 07:02:48 +00:00
Alex Moreno f368e00677 hotFix: fix env
gitea/salix/pipeline/pr-test This commit looks good Details
2024-05-15 09:02:23 +02:00
Juan Ferrer e469fb2da4 Merge pull request 'test' (!2456) from test into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2456
2024-05-15 06:57:05 +00:00
Juan Ferrer af198e2832 Merge pull request 'master' (!2455) from master into test
gitea/salix/pipeline/pr-dev Build queued... Details
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2455
2024-05-15 06:56:48 +00:00
Alex Moreno 022d78e76c hotFix: fix env
gitea/salix/pipeline/pr-test This commit looks good Details
2024-05-15 07:53:42 +02:00
Carlos Andrés df15e44442 Merge pull request '6974-sale_add' (!2452) from 6974-sale_add into master
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-test Build queued... Details
Reviewed-on: #2452
Reviewed-by: Jorge Penades <jorgep@verdnatura.es>
2024-05-14 15:06:35 +00:00
Javi Gallego 0894cbd38c Merge pull request 'feat: #7333 ticket with refund' (!2422) from 7333-ClaimRefund into dev
gitea/salix/pipeline/head There was a failure building this commit Details
Reviewed-on: #2422
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-05-14 13:45:11 +00:00
Carlos Andrés adaba6ecfb refs #6974 refactor: optimize sale_add
gitea/salix/pipeline/pr-test This commit looks good Details
gitea/salix/pipeline/pr-master This commit looks good Details
2024-05-14 15:39:28 +02:00
Carlos Andrés d0d710f023 refs #6974 refactorLoop 2024-05-14 15:36:09 +02:00
David Domenech 33ce0f2291 Merge pull request 'fix: refs #7389 pbx.sipConfig: rename incomingLimit to call-limit' (!2450) from 7389-sipConf_callLimit into master
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2450
Reviewed-by: David Domenech <davidd@verdnatura.es>
2024-05-14 12:29:59 +00:00
Juan Ferrer b6f788a8db fix: refs #7389 pbx.sipConfig: rename incomingLimit to call-limit
gitea/salix/pipeline/pr-master This commit looks good Details
2024-05-14 14:21:16 +02:00
Pako Natek 5fd2ef3cff Merge pull request 'done' (!2432) from 7362-VIP into dev
gitea/salix/pipeline/head There was a failure building this commit Details
Reviewed-on: #2432
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-05-14 10:52:11 +00:00
Pako Natek 0adf6bfc45 Merge branch 'dev' into 7362-VIP
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-14 10:50:59 +00:00
Juan Ferrer eadf13b663 fix: Jenkinsfile display BRANCH_NAME
gitea/salix/pipeline/head This commit looks good Details
2024-05-14 12:20:39 +02:00
Carlos Andrés 4254fac6c2 Merge pull request '7213-Pasar-problemas-a-columnas-calculadas' (!2396) from 7213-Pasar-problemas-a-columnas-calculadas into dev
gitea/salix/pipeline/head There was a failure building this commit Details
Reviewed-on: #2396
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-05-14 09:35:51 +00:00
Alex Moreno d487d13cdb 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-05-14 11:26:11 +02:00
Sergio De la torre b3170245d1 Merge pull request 'refs #6106 hotFix: getTickets' (!2449) from 6106_getTickets into master
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2449
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-05-14 09:25:54 +00:00
Sergio De la torre edb024a1f9 refs #6106 hotFix: getTickets
gitea/salix/pipeline/pr-master This commit looks good Details
2024-05-14 10:14:53 +02:00
Robert Ferrús 6ae48790f3 Merge pull request 'feat: refs #7039 country' (!2361) from 7039-country-country into dev
gitea/salix/pipeline/head There was a failure building this commit Details
Reviewed-on: #2361
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
2024-05-14 08:12:13 +00:00
Alex Moreno 43cd0c2ff2 Merge pull request 'deploy: dump' (!2448) from 7383-dump into master
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2448
Reviewed-by: Carlos Satorres <carlossa@verdnatura.es>
2024-05-14 07:44:39 +00:00
Alex Moreno 2ddadcd8a4 deploy: dump
gitea/salix/pipeline/pr-master This commit looks good Details
2024-05-14 09:38:03 +02:00
Pako Natek 53f49531b7 VIP now is Vip
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-14 09:07:43 +02:00
Robert Ferrús eeb36a6810 Merge branch 'dev' into 7039-country-country
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-14 06:32:45 +00:00
Carlos Satorres ebcf8e2927 refs #6428 change file
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-14 08:30:22 +02:00
Alex Moreno 12f36dc825 hotFix: refs #6731 remove CodCOMPRADOR
gitea/salix/pipeline/head This commit looks good Details
2024-05-14 08:24:40 +02:00
Alex Moreno 3798509206 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-05-14 07:51:04 +02:00
Robert Ferrús c6f7a0768a Merge branch 'dev' into 7039-country-country
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-14 05:49:39 +00:00
Robert Ferrús b0da193b4a feat: refs #7039 añadir colum virtual country
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-14 07:48:03 +02:00
Alex Moreno 7b1d931747 Merge pull request '7383-testToMaster' (!2445) from 7383-testToMaster into master
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2445
Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
2024-05-14 05:44:12 +00:00
Carlos Satorres a8299383b9 refs #6428 remove sh
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-13 16:28:29 +02:00
Jorge Penadés b13c7c0db6 Merge pull request '#5919 createLocker' (!2446) from 5919-createLocker into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2446
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-05-13 13:10:39 +00:00
Jorge Penadés 45082f532f Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 5919-createLocker
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-13 15:05:27 +02:00
Alex Moreno 6251493adb Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix into test
gitea/salix/pipeline/pr-master This commit looks good Details
gitea/salix/pipeline/head This commit looks good Details
2024-05-13 14:24:31 +02:00
Carlos Andrés 3ce43909e2 feat: Turn issues into calculated columns refs#7213
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-13 14:21:01 +02:00
Guillermo Bonet bd6ddd681d Merge pull request 'refactor: refs #7373 Deleted proc packageInvoicing' (!2444) from 7373-packageInvoicing_bye into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2444
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-05-13 12:16:51 +00:00
Jorge Penadés b902a1a7f7 Merge branch 'dev' into 5919-locker
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-13 12:02:17 +00:00
Jorge Penadés 1f39330041 fix: refs #5919 drop focus 2024-05-13 14:00:19 +02:00
Carlos Satorres 585a0c68a8 Merge pull request 'refs #7360 fix error weekly' (!2431) from 7360-errorWeeklyHourEmail into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2431
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-05-13 12:00:18 +00:00
Guillermo Bonet 6c325fccef refactor: refs #7373 Deleted proc packageInvoicing
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-13 13:41:47 +02:00
Carlos Andrés f89ca786df eat: Turn issues into calculated columns refs#7213
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-13 13:31:58 +02:00
Jorge Penadés 5d5f1ef7c5 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 5919-locker 2024-05-13 13:20:32 +02:00
Jorge Penadés e16e5e3db3 feat: refs #5919 back test 2024-05-13 13:19:28 +02:00
Robert Ferrús 5e3fa1be8b Merge branch 'dev' into 7296-expeditionTruck
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-13 10:33:37 +00:00
Carlos Andrés b1af625937 feat: Turn issues into calculated columns refs#7213
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-13 12:32:46 +02:00
Pablo Natek db9c20fb22 Merge pull request 'fix: refs #4988 insert into agencyWorkCenter' (!2442) from 4988-fixInsert-into-agencyWorkCenter into test
gitea/salix/pipeline/head There was a failure building this commit Details
Reviewed-on: #2442
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-05-13 10:31:55 +00:00
Pablo Natek bde7fc9972 fix: refs #4988 no task id on table comment
gitea/salix/pipeline/pr-test This commit looks good Details
2024-05-13 12:30:17 +02:00
Carlos Satorres ac4cc1506b Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7360-errorWeeklyHourEmail
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-13 12:18:03 +02:00
Guillermo Bonet 799108f041 fix: refs #7345 Fixed e2e
gitea/salix/pipeline/head This commit looks good Details
2024-05-13 11:23:29 +02:00
Pablo Natek c7eeaf238a fix: refs #4988 add schema
gitea/salix/pipeline/pr-test This commit looks good Details
2024-05-13 11:04:50 +02:00
Pablo Natek 48392879cb fix: refs #4988 insert into agencyWorkCenter
gitea/salix/pipeline/pr-test There was a failure building this commit Details
2024-05-13 10:59:22 +02:00
Carlos Andrés 057121582e feat: Turn issues into calculated columns refs#7213
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-13 10:06:00 +02:00
Carlos Andrés 6d3f00ec95 feat: Turn issues into calculated columns refs#7213
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-13 09:54:27 +02:00
Jorge Penadés 29e3f934af Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 5919-locker 2024-05-13 09:35:08 +02:00
Alex Moreno 6ac664a139 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-05-13 09:06:57 +02:00
Pablo Natek 7301657a3a Merge pull request 'fix: duplicate version' (!2441) from fixTestDeploy into test
gitea/salix/pipeline/head There was a failure building this commit Details
Reviewed-on: #2441
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
Reviewed-by: Pako Natek <pako@verdnatura.es>
2024-05-13 07:03:30 +00:00
Jorge Penadés 562aefecdd Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 5919-locker 2024-05-13 08:56:54 +02:00
Pablo Natek 1e956bb0f8 fix: duplicate version
gitea/salix/pipeline/pr-test This commit looks good Details
2024-05-13 08:53:25 +02:00
Pablo Natek a797fca2dd feat: refs #7187 merge dev
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-13 08:30:20 +02:00
Robert Ferrús c706f1cc2b Merge pull request 'feat: refs #7363 item_getBalance saleTracking no mostrar duplicados' (!2438) from 7363-item_getBalance into dev
gitea/salix/pipeline/head There was a failure building this commit Details
Reviewed-on: #2438
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-05-13 05:05:37 +00:00
Robert Ferrús 56906963de Merge branch 'dev' into 7363-item_getBalance
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-13 05:03:45 +00:00
Jorge Penadés cbb7cb18eb fix: refs #5919 delete locker field 2024-05-10 16:02:50 +02:00
Ivan Mas dfa2d67642 Merge pull request 'refs #7342 Modify decimal item plastic' (!2440) from 7342-IntToDec-Item-Plastic into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2440
Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
2024-05-10 13:50:51 +00:00
Alex Moreno a7910d9894 hotFix(invoiceInPdf): fix accessScopes
gitea/salix/pipeline/head This commit looks good Details
2024-05-10 14:58:52 +02:00
Carlos Andrés 85aa4fae08 Merge pull request 'Ticket 180571 No se ven las ubicaciones' (!2439) from Hotfix-productionConfig-defaultSectorFk-adelantamos-cambio into master
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2439
Reviewed-by: Pako Natek <pako@verdnatura.es>
2024-05-10 12:52:17 +00:00
Ivan Mas 473f261cf1 refs #7342 Modify decimal item plastic
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-10 14:11:29 +02:00
Jorge Penadés 8943bc7115 fix: refs #5919 back tests 2024-05-10 14:04:34 +02:00
Jorge Penadés 1996a00af1 feat: refs #5919 drop version 2024-05-10 13:31:21 +02:00
Carlos Andrés 349c3d71dd Ticket 180571 No se ven las ubicaciones
gitea/salix/pipeline/pr-master This commit looks good Details
2024-05-10 13:14:23 +02:00
Robert Ferrús 32b339ffdf Merge branch 'dev' into 7363-item_getBalance
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-10 11:13:09 +00:00
Robert Ferrús e7df3fefc6 feat: refs #7363
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-10 13:11:41 +02:00
Carlos Andrés 56815e4b1a Ticket 180571 No se ven las ubicaciones
gitea/salix/pipeline/pr-master This commit looks good Details
2024-05-10 13:10:54 +02:00
Robert Ferrús 9163d3db74 feat: refs #7363 changes
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-10 13:05:44 +02:00
Jorge Penadés 8876a7ea8f Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 5919-locker 2024-05-10 13:05:22 +02:00
Jorge Penadés af11bb8663 feat: refs #5919 hook 2024-05-10 13:04:12 +02:00
Guillermo Bonet ba72408e84 refactor: refs #7345 Deprecated isFarmer__
gitea/salix/pipeline/head This commit looks good Details
2024-05-10 12:45:53 +02:00
Guillermo Bonet 365c3fe588 Merge pull request 'refactor: refs #7345 Renamed column of invoiceInConfig' (!2437) from 7345-byeIsFarmer into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2437
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-05-10 10:04:25 +00:00
Robert Ferrús cb9cacc1ea feat: refs #7363 item_getBalance saleTracking no mostrar duplicados
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-10 11:51:54 +02:00
Guillermo Bonet 6b7a529b55 refactor: refs #7345 Renamed column of invoiceInConfig
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-10 11:39:14 +02:00
Robert Ferrús 35f69b8692 Merge branch 'dev' into 7039-country-country
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-10 07:21:05 +00:00
Jorge Penadés 4e7d0e6469 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 5919-locker 2024-05-10 08:28:06 +02:00
Robert Ferrús b03fe4e6d3 Merge branch 'dev' into 7296-expeditionTruck
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-10 05:23:07 +00:00
Pako Natek c048389412 Merge branch 'dev' into 7362-VIP
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-10 05:13:35 +00:00
Jon Elias 6207d79244 Merge pull request 'feat: refs #6739 transferInvoice new functionality' (!2412) from 6739-transferInvoiceOut into dev
gitea/salix/pipeline/head There was a failure building this commit Details
Reviewed-on: #2412
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-05-10 04:51:41 +00:00
Pako Natek 6b10f81add Merge pull request 'done' (!2435) from hotFix-collection_assign into master
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2435
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-05-09 17:06:25 +00:00
Pako Natek ec060209aa done
gitea/salix/pipeline/pr-master This commit looks good Details
2024-05-09 18:53:32 +02:00
Jorge Penadés 7f4965879c fix: refs #5919 get locker by relation 2024-05-09 15:54:34 +02:00
Guillermo Bonet f4229284fa Merge branch 'dev' into 7252-deliveryNoteFarmingFk
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-09 12:56:05 +00:00
Carlos Andrés cc941de606 feat: conversion art. A1 a A2 refs #4979
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-09 14:24:20 +02:00
Ivan Mas b060048d5d Merge pull request 'refs #7161 feat:setVisibleDiscard by itemTrash' (!2424) from 7161-deleteItemTrash into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2424
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-05-09 11:43:18 +00:00
Ivan Mas 9d1dc6b483 Merge branch 'dev' into 7161-deleteItemTrash
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-09 11:41:04 +00:00
Guillermo Bonet 9c5b46b3e2 Merge pull request 'feat: refs #7247 clientSupplier_add' (!2346) from 7247-monacoVies into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2346
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-05-09 11:30:28 +00:00
Robert Ferrús 5460922d12 Merge pull request 'feat: refs #6223 pull master' (!2434) from 6223-ticketCalculateClonMaster into master
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2434
Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
2024-05-09 11:17:16 +00:00
Robert Ferrús f963923645 feat: refs #6223 pull master
gitea/salix/pipeline/pr-master This commit looks good Details
2024-05-09 12:54:57 +02:00
Carlos Satorres fcd1b5e351 Merge pull request 'refs #6877 add attenderFk' (!2427) from 6877-modPeticionesCompra into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2427
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-05-09 10:53:10 +00:00
Robert Ferrús 0498b425b3 Merge branch 'dev' into 7039-country-country
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-09 10:51:18 +00:00
Jorge Penadés 03a8dafe47 Merge pull request '#6202 myt watcher' (!2377) from 6202-mytWatcher into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2377
Reviewed-by: Juan Ferrer <juan@verdnatura.es>
2024-05-09 10:50:57 +00:00
Jorge Penadés 035782414f Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 5919-locker 2024-05-09 12:47:25 +02:00
Jorge Penadés 1450a680ea Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 5919-locker 2024-05-09 12:45:33 +02:00
Ivan Mas 9d7184ed7b refs #6965 Add Fk vehicleFk firstEditorFk
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-09 12:35:26 +02:00
Jorge Penadés 2c826ed838 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 5919-locker 2024-05-09 12:14:43 +02:00
Jorge Penadés bf0db89286 refactor: refs #6202 remove blanks
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-09 12:02:44 +02:00
Jorge Penadés 74399d5ab6 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 6202-mytWatcher 2024-05-09 11:56:48 +02:00
Pako Natek 2203ac478b Merge branch 'dev' into 7362-VIP
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-09 09:56:41 +00:00
Pako Natek 42d17aa7f5 done
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-09 11:52:25 +02:00
Guillermo Bonet faf2d51a43 Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details
2024-05-09 11:36:15 +02:00
Guillermo Bonet 494b46e7ec fix: refs #6493 Fix buy_recalcPricesByBuy & buy_recalcPricesByEntry
gitea/salix/pipeline/head This commit looks good Details
2024-05-09 11:33:57 +02:00
Carlos Satorres 0f52fe65d3 refs #7360 fix error weekly
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-09 09:46:40 +02:00
Pablo Natek 98e28b8d50 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7187-addPdaFreelancers 2024-05-09 09:09:00 +02:00
Jorge Penadés dc45527e1d Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 5919-locker 2024-05-09 08:45:17 +02:00
Jon Elias b9e53df218 Merge branch 'dev' into 6739-transferInvoiceOut
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-09 06:06:40 +00:00
Jon Elias 620dd3d836 Merge branch '6739-transferInvoiceOut' of https://gitea.verdnatura.es/verdnatura/salix into 6739-transferInvoiceOut
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-09 08:05:24 +02:00
Jon Elias 58aedf160b refactor: refs #6739 changed translations' keys 2024-05-09 08:05:23 +02:00
Javi Gallego abd692cbd3 Merge pull request 'fix: #7344 getSupplierDebt agrupa por pago' (!2426) from 7344-getSupplierDebt into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2426
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-05-09 05:49:28 +00:00
Robert Ferrús 7ccd219629 Merge pull request 'feat: refs #7291 sale_getProblems' (!2382) from 7291-sale_getProblems into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2382
Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
2024-05-09 05:35:37 +00:00
Robert Ferrús 833994bd27 Merge branch 'dev' into 7291-sale_getProblems
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-09 05:23:33 +00:00
Robert Ferrús ec89e93adc Merge pull request 'feat: refs #182001 packaging' (!2420) from 182001-packaging into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2420
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-05-09 05:20:12 +00:00
Robert Ferrús e02dfc0456 Merge branch 'dev' into 182001-packaging
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-09 05:18:08 +00:00
Robert Ferrús 3fca9f243d Merge pull request 'fix: refs #5699 clientsDisable' (!2419) from 5699-hoFixClientsDisable into master
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2419
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-05-09 05:16:01 +00:00
Robert Ferrús 0fce8c755b Merge branch 'master' into 5699-hoFixClientsDisable
gitea/salix/pipeline/pr-master This commit looks good Details
2024-05-09 05:14:38 +00:00
Sergio De la torre 7bcabbf51c Merge pull request 'refs #6276 hotFix:itemShelving_add' (!2425) from 6276_itemShelving_Add into master
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2425
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-05-09 05:12:57 +00:00
Sergio De la torre 10513d1991 Merge branch 'master' into 6276_itemShelving_Add
gitea/salix/pipeline/pr-master This commit looks good Details
2024-05-09 05:00:07 +00:00
Carlos Andrés d6451a94e3 feat: conversion art. A1 a A2 refs #4979
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-08 17:38:52 +02:00
Carlos Andrés 710841ba4a Merge branch 'dev' into 4979-Conversión-automática-de-producto-A1-a-A2
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-08 16:31:25 +02:00
Guillermo Bonet c4a66b42bb feat: refs #7247 Minor changes
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-08 14:56:51 +02:00
Guillermo Bonet 3a7d93759c Merge branch 'dev' into 7247-monacoVies
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-08 12:52:32 +00:00
Guillermo Bonet 1a375c0e88 refactor: refs #7252 Deprecated vn.deliveryNote.farmingFk
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-08 14:45:37 +02:00
Jon Elias 0f973baa65 Merge branch 'dev' into 6739-transferInvoiceOut
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-08 12:31:32 +00:00
Jon Elias 77c2f61f47 refs #6739 move petitions
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-08 14:30:20 +02:00
Jon Elias 72da046ead Merge branch '6739-transferInvoiceOut' of https://gitea.verdnatura.es/verdnatura/salix into 6739-transferInvoiceOut
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-08 14:12:11 +02:00
Jon Elias 9d75ba0bc5 refactor: refs #6739 default params 2024-05-08 14:12:10 +02:00
Guillermo Bonet feb36eb911 Merge pull request 'refactor: refs #6230 Revoke item: `size`, longName, name' (!2428) from 6230-revoke into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2428
Reviewed-by: Pablo Natek <pablone@verdnatura.es>
2024-05-08 12:00:25 +00:00
Guillermo Bonet 162c78e392 Merge branch '6230-revoke' of https://gitea.verdnatura.es/verdnatura/salix into 6230-revoke
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-08 13:59:38 +02:00
Guillermo Bonet 7d92b514c5 refactor: refs #6230 Revoke item: `size`, longName, name 2024-05-08 13:59:37 +02:00
Guillermo Bonet a90e83e9e0 Merge branch 'dev' into 6230-revoke
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-08 11:56:31 +00:00
Guillermo Bonet f86d1ded72 Merge pull request 'feat: refs #7335 Added call ticket_afterUpdate' (!2415) from 7335-modifyCmr into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2415
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-05-08 11:54:02 +00:00
Guillermo Bonet 53b58104c7 refactor: refs #6230 Revoke item: `size`, longName, name
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-08 13:52:52 +02:00
Sergio De la torre f7e6901ef6 Merge branch 'dev' into 7161-deleteItemTrash
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-08 11:32:00 +00:00
Carlos Satorres 0d43d9a982 refs #6877 remove restriction
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-08 13:20:45 +02:00
Guillermo Bonet 4df13d900a Merge branch 'dev' into 7335-modifyCmr
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-08 10:55:47 +00:00
Robert Ferrús b0848edff8 feat: refs #5699 quittar de client_afterUpdate desactivar cliente
gitea/salix/pipeline/pr-master This commit looks good Details
2024-05-08 12:52:11 +02:00
Guillermo Bonet 82ac54f0b3 Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details
2024-05-08 12:52:02 +02:00
Guillermo Bonet 90107936b7 Merge branch 'master' into test
gitea/salix/pipeline/head This commit looks good Details
2024-05-08 12:51:36 +02:00
Sergio De la torre 0d42b32611 Merge branch 'dev' into 7161-deleteItemTrash
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-08 10:47:22 +00:00
Robert Ferrús ce42cbf287 Merge branch 'master' into 5699-hoFixClientsDisable
gitea/salix/pipeline/pr-master This commit looks good Details
2024-05-08 10:44:15 +00:00
Guillermo Bonet 84e90bb91b hotfix: rollback tmp item_getSimilar
gitea/salix/pipeline/head This commit looks good Details
2024-05-08 12:43:46 +02:00
Robert Ferrús 50157c932e Merge branch 'dev' into 7296-expeditionTruck
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-08 10:42:54 +00:00
Carlos Satorres f64e899061 Merge pull request 'refs #6882 absence' (!2271) from 6682-notHolidays into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2271
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-05-08 10:27:20 +00:00
Robert Ferrús cc89100d08 Merge branch 'dev' into 182001-packaging
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-08 10:26:53 +00:00
Carlos Satorres 7b298c1baf refs #6882 fix tback
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-08 12:24:05 +02:00
Carlos Satorres fa2c4de562 Merge pull request 'refs #6842 worker' (!2404) from 6842-errorCalendar into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2404
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-05-08 10:21:19 +00:00
Carlos Satorres 8a7d124066 refs #6882 fix traductions
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-08 12:17:44 +02:00
Carlos Satorres 0709a64dca refs #6882 fix back
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-08 12:05:47 +02:00
Carlos Satorres 269c42e5c9 Merge branch '6682-notHolidays' of https://gitea.verdnatura.es/verdnatura/salix into 6682-notHolidays
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-08 11:47:06 +02:00
Carlos Satorres c355595384 refs #6882 fix back, tback te2e 2024-05-08 11:47:04 +02:00
Jorge Penadés 26ff5e8fa9 feat; refs #5919 WIP acls 2024-05-08 11:03:18 +02:00
Javi Gallego 393d57f078 fix: #7344 getSupplierDebt agrupa por pago
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-08 10:51:35 +02:00
Robert Ferrús 2866f231b8 Merge branch 'dev' into 182001-packaging
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-08 08:41:38 +00:00
Jorge Penadés d0c9e83504 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 5919-locker 2024-05-08 10:35:07 +02:00
Guillermo Bonet 16e7fb9662 Merge branch 'dev' into 7335-modifyCmr
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-08 08:29:00 +00:00
Sergio De la torre 5207f07c80 refs #6276 hotFix:itemShelving_add
gitea/salix/pipeline/pr-master This commit looks good Details
2024-05-08 10:03:11 +02:00
Carlos Satorres c0b4a931a6 Merge branch 'dev' into 6682-notHolidays
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-08 07:55:26 +00:00
Guillermo Bonet 71f66085f6 Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details
2024-05-08 09:50:52 +02:00
Guillermo Bonet 854604368a Merge branch 'master' into test
gitea/salix/pipeline/head There was a failure building this commit Details
2024-05-08 09:50:37 +02:00
Sergio De la torre 9a235838d8 refs #7161 feat:setVisibleDiscard by itemTrash
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-08 09:04:08 +02:00
Carlos Satorres 8637488fc1 refs #6882 fix pr
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-08 08:48:19 +02:00
Guillermo Bonet 6cde2e8170 fix: refs #6585 Requested changes
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-08 08:48:08 +02:00
Robert Ferrús f66942ba08 Merge pull request 'hotfix: refs #6777 manaCustomerUpdate' (!2423) from 6777-hotfixManaCustomerUpdate into master
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2423
Reviewed-by: Robert Ferrús <robert@verdnatura.es>
2024-05-08 06:35:00 +00:00
Guillermo Bonet e070906ea6 hotfix: refs #6777 manaCustomerUpdate
gitea/salix/pipeline/pr-master This commit looks good Details
2024-05-08 07:49:32 +02:00
Javi Gallego 8e1c84ec4b feat: #7333 ticket with refund
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-07 15:33:18 +02:00
Carlos Satorres 371df19194 Merge branch '6682-notHolidays' of https://gitea.verdnatura.es/verdnatura/salix into 6682-notHolidays
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-07 14:59:25 +02:00
Carlos Satorres 3eba4a1f69 refs #6882 fix sql 2024-05-07 14:59:23 +02:00
Robert Ferrús e5ba6a8673 Merge pull request 'feat: refs #179881' (!2421) from 179881-deleteProcedureFv_pca into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2421
Reviewed-by: Juanjo Breso <jbreso@verdnatura.es>
2024-05-07 12:39:51 +00:00
Robert Ferrús 43c742938c feat: refs #179881
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-07 14:37:24 +02:00
Robert Ferrús f70f2949ec feat: refs #182001
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-07 14:30:38 +02:00
Robert Ferrús f529a7f5b4 feat : refs #182001
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-07 14:25:26 +02:00
Robert Ferrús 6c6ae412bd feat: refs #182001 packaging
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-07 14:19:11 +02:00
Carlos Satorres 5e8e09cbae refs #6877 add attenderFk
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-07 13:42:58 +02:00
Robert Ferrús 9bd8369469 Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix into 5699-hoFixClientsDisable
gitea/salix/pipeline/pr-master This commit looks good Details
2024-05-07 13:23:49 +02:00
Guillermo Bonet 0e8d2af741 Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details
2024-05-07 13:19:18 +02:00
Guillermo Bonet 6e9ea9665d Merge branch 'master' into test
gitea/salix/pipeline/head This commit looks good Details
2024-05-07 13:18:46 +02:00
Guillermo Bonet 0d7d4917a7 Merge branch 'master' into test 2024-05-07 13:18:28 +02:00
Robert Ferrús 2dcc959488 fix: refs #5699 clientsDisable
gitea/salix/pipeline/pr-master There was a failure building this commit Details
2024-05-07 13:17:56 +02:00
Guillermo Bonet 20414c70ad Merge pull request 'hotfix: #7173 Rollback' (!2418) from 7173-rollbackInvoiceInRestriction into master
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2418
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-05-07 11:12:55 +00:00
Guillermo Bonet cc8873f48a hotfix: #7173 Rollback
gitea/salix/pipeline/pr-master This commit looks good Details
2024-05-07 13:08:44 +02:00
Guillermo Bonet 832db8901e Merge branch '7335-modifyCmr' of https://gitea.verdnatura.es/verdnatura/salix into 7335-modifyCmr
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-07 13:03:51 +02:00
Guillermo Bonet 2adf96cb37 refactor: #6585 Deleted transaction ticket_doCmr 2024-05-07 13:03:50 +02:00
Jorge Penadés 4fb8a19936 Merge pull request '#6938 rollback phone' (!2417) from 6938-hotfix-rollbackHidePhone into master
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2417
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-05-07 10:44:34 +00:00
Jorge Penadés dce754a64b Merge branch 'master' into 6938-hotfix-rollbackHidePhone
gitea/salix/pipeline/pr-master This commit looks good Details
2024-05-07 10:41:50 +00:00
Guillermo Bonet 45f7412b35 Merge branch 'dev' into 7335-modifyCmr
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-07 10:36:28 +00:00
Guillermo Bonet da8378d422 hotfix: refs #7173 Deleted restriction invoiceInDueDay_beforeUpdate
gitea/salix/pipeline/head This commit looks good Details
2024-05-07 12:15:28 +02:00
Jorge Penadés 1d9b6e489c Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix into 6938-hotfix-rollbackHidePhone
gitea/salix/pipeline/pr-master There was a failure building this commit Details
2024-05-07 11:49:31 +02:00
Jorge Penadés 0f5e2dcc54 fix: refs #6938 rollback
gitea/salix/pipeline/pr-master This commit looks good Details
2024-05-07 11:47:22 +02:00
Jon Elias 5e96049e65 Merge branch 'dev' into 6739-transferInvoiceOut
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-07 09:36:26 +00:00
Guillermo Bonet 3ed1c8f6fd hotfix: ticket #181890 duaInvoiceInBooking
gitea/salix/pipeline/head This commit looks good Details
2024-05-07 11:35:07 +02:00
Jon Elias d4f734455d refactor: refs #6739 transferInvoice() refactor
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-07 11:35:05 +02:00
Guillermo Bonet ef567bb167 fix: ticket #181920 catalog_componentCalculate
gitea/salix/pipeline/head This commit looks good Details
2024-05-07 10:03:33 +02:00
Carlos Satorres 19c729d5fd Merge branch 'dev' into 6842-errorCalendar
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-07 06:55:05 +00:00
Alex Moreno 834d58c449 Merge pull request '7336_devToTest' (!2414) from 7336_devToTest into test
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2414
Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
2024-05-07 06:26:51 +00:00
Guillermo Bonet e44568ff4b feat: refs #6585 Added call ticket_afterUpdate
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-07 08:00:26 +02:00
Robert Ferrús 1610b9bd0a Merge branch 'dev' into 7039-country-country
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-07 05:11:02 +00:00
Jon Elias 4e78307a8d feat: refs #6739 transferInvoice new functionality
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-06 14:51:53 +02:00
Robert Ferrús 1eb75599d8 Merge branch 'dev' into 7296-expeditionTruck
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-06 09:38:14 +00:00
Robert Ferrús b57be129e3 Merge branch 'dev' into 7039-country-country
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-06 08:27:21 +00:00
Carlos Satorres bc5f78827c Merge branch 'dev' into 6682-notHolidays
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-06 08:09:21 +00:00
Carlos Satorres fe300f0f24 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 6682-notHolidays
gitea/salix/pipeline/pr-dev Build queued... Details
2024-05-06 09:26:14 +02:00
Robert Ferrús 87e85e4a4e Merge branch 'dev' into 7039-country-country
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-06 05:08:07 +00:00
Carlos Satorres e15b8eee30 refs #6842 worker
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-03 14:54:12 +02:00
Pablo Natek 699684bd65 feat: refs #7187 add sim column to the model and id 2024-05-03 14:22:48 +02:00
Pablo Natek 133b862dc0 fix: refs #7187 move column sim to deviceProductionUser
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-03 14:20:16 +02:00
Carlos Andrés 2659e3b259 feat: Turn issues into calculated columns refs#7213
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-03 14:03:26 +02:00
Carlos Satorres f77cf619db refs #6682 holidays conditional
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-03 12:27:19 +02:00
Robert Ferrús 82ee8d2209 Merge branch 'dev' into 7039-country-country
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-03 09:25:06 +00:00
Carlos Andrés 7659a39b42 feat: Turn issues into calculated columns refs#7213
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-03 10:19:05 +02:00
Robert Ferrús 523735e4fc Merge branch 'dev' into 7296-expeditionTruck
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-03 04:59:01 +00:00
Carlos Andrés 9905d7254d Merge branch 'dev' into 7213-Pasar-problemas-a-columnas-calculadas
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-02 18:17:31 +02:00
Carlos Andrés e28a5eb478 feat: Turn issues into calculated columns refs#7213
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-02 18:13:12 +02:00
Carlos Andrés 27e3ae897a feat: Turn issues into calculated columns refs#7213
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-05-02 17:05:10 +02:00
Jorge Penadés 63655a4dd1 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 5919-locker 2024-05-02 08:58:51 +02:00
Carlos Andrés a67f603990 Merge branch 'dev' into 7213-Pasar-problemas-a-columnas-calculadas
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-04-30 15:50:13 +02:00
Robert Ferrús 5ea57ce728 Merge branch 'dev' into 7296-expeditionTruck
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-04-30 10:04:40 +00:00
Robert Ferrús 83e9756692 fear: refs #7296 expeditionTruck
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-04-30 12:02:19 +02:00
Robert Ferrús e7be1e2efe feat: refs #7296 expeditionTruck to roadmapStop
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-04-30 11:48:18 +02:00
Jorge Penadés 9802f0066c fix: refs #5919 unique key & unassigned locker 2024-04-29 16:05:36 +02:00
Jorge Penadés be69b5e2c4 fix: refs #5919 rollback 2024-04-29 12:04:31 +02:00
Jorge Penadés f6e89c9049 fix: refs #5919 rollback 2024-04-29 11:46:58 +02:00
Jorge Penadés 7240269f5b fix: refs #5919 rollback 2024-04-29 11:45:54 +02:00
Jorge Penadés 50ea41f99a fix: refs #5919 rollback 2024-04-29 11:43:56 +02:00
Jorge Penadés 0003779681 fix: refs 5919 apply version 2024-04-29 11:35:08 +02:00
Robert Ferrús c18c77ab93 Merge branch 'dev' into 7039-country-country
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-04-29 08:08:52 +00:00
Robert Ferrús 9af3c17a1f feat: refs #7291 sale_getProblems
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-04-29 09:58:58 +02:00
Jorge Penadés 8adb52aac4 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 5919-locker 2024-04-29 09:24:10 +02:00
Jorge Penadés 30e927d722 feat: refs #6202 dbWatcher script
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-04-26 12:10:05 +02:00
Robert Ferrús d2c3034ec6 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7039-country-country
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-04-26 12:07:53 +02:00
Robert Ferrús fd7dcf2781 fix: refs #7039 fixpr
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-04-26 10:26:20 +02:00
Robert Ferrús 2d0d4b5643 Merge branch 'dev' into 7039-country-country
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-04-26 06:48:01 +00:00
Robert Ferrús 8153a526ce feat: refs #7039 country-name
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-04-25 12:35:21 +02:00
Pablo Natek f2d4283304 fix: refs #7187 number on de code
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-04-24 14:29:57 +02:00
Pablo Natek e8a32d8e13 fix: refs #7187 db version
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-04-24 14:09:42 +02:00
Pablo Natek 008b6f6f41 fix: refs #7187 unify versions
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-04-24 14:08:26 +02:00
Pablo Natek 88ef12032b feat: refs #7187 serialNumber new column
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-04-24 14:05:18 +02:00
Robert Ferrús 5efe286382 Merge branch 'dev' into 7039-country-country
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-04-24 10:14:49 +00:00
Pablo Natek a15970c95f fix: refs #7187 sql for pdaFreelancer
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-04-24 11:08:57 +02:00
Robert Ferrús ffe56edc9c feat: refs #7039 country
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-04-24 09:24:42 +02:00
Robert Ferrús a27e06e8ff feat: refs #7039 country
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-04-24 09:08:19 +02:00
Robert Ferrús 7899cf230e feat: refs #7039 country
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-04-24 09:05:29 +02:00
Pablo Natek fbc1614132 fix: refs #7187 sql creation for deviceProductionUser
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-04-23 18:50:28 +02:00
Pablo Natek 71a9aed1bb fix: refs #7187 check for multiple device on freelancer 2024-04-22 18:03:17 +02:00
Robert Ferrús 44f2cd4efc feat: refs #7247 clientSupplier_add
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-04-22 14:04:07 +02:00
Alex Moreno bab2ee78c4 feat: refs #6428 auto-changelog with bash
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-04-19 13:13:57 +02:00
Carlos Andrés 9ca1b9f104 feat: Turn issues into calculated columns refs#7213
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-04-17 15:02:58 +02:00
Carlos Andrés c262805d33 feat: Turn issues into calculated columns refs#7213
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-04-16 18:29:14 +02:00
Carlos Andrés 7bbf113ffa feat: Turn issues into calculated columns refs#7213
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-04-16 18:26:57 +02:00
Carlos Andrés d53f19b47d feat: Turn problems into calculated columns
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-04-16 17:01:14 +02:00
Jorge Penadés 976b18203e feat: refs #7187 check if is freelancer on insert & update
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-04-16 10:49:17 +02:00
Carlos Satorres de75d811c3 refs #6682 absence
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-04-09 12:30:25 +02:00
Carlos Satorres e0c0c4dbc0 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 6111-routeList
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-04-05 13:30:14 +02:00
Carlos Satorres 02bee2e07c refs #6111 routeList sql
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-04-04 12:45:43 +02:00
Carlos Andrés bafd4456ef feat: conversion art. A1 a A2 refs #4979
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-03-15 14:46:43 +01:00
Carlos Satorres bf796c445d refs #5919 fix section
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
2024-01-17 13:20:28 +01:00
Carlos Satorres c0c3d913b7 refs #5919 locker
gitea/salix/pipeline/head There was a failure building this commit Details
2024-01-12 09:03:54 +01:00
Carlos Satorres 69739fca9c refs #5919 locker relation
gitea/salix/pipeline/head There was a failure building this commit Details
2024-01-03 08:17:37 +01:00
Carlos Satorres e2eebf96f7 refs #5919 locker insert prod
gitea/salix/pipeline/head There was a failure building this commit Details
2023-12-29 11:29:48 +01:00
Carlos Satorres 3a429a31da refs #5919 locker
gitea/salix/pipeline/head There was a failure building this commit Details
2023-12-29 08:44:42 +01:00
Carlos Satorres 6ceee45b13 refs #5919 fix locker
gitea/salix/pipeline/head There was a failure building this commit Details
2023-12-28 16:40:13 +01:00
Carlos Satorres f35b2a4905 refs #5919 back chooseLocker
gitea/salix/pipeline/head There was a failure building this commit Details
2023-12-26 13:44:52 +01:00
Carlos Satorres aa33c28468 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 5919-locker
gitea/salix/pipeline/head This commit looks good Details
2023-12-26 12:15:43 +01:00
Carlos Satorres c5c314eb43 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 5919-locker
gitea/salix/pipeline/head There was a failure building this commit Details
2023-11-10 11:59:01 +01:00
Carlos Satorres fd64cb7e80 refs #5919 front back
gitea/salix/pipeline/head This commit looks good Details
2023-10-17 13:08:00 +02:00
Carlos Satorres 5a375ebfda refs #5919 front back
gitea/salix/pipeline/head This commit looks good Details
2023-10-16 13:22:36 +02:00
Carlos Satorres 38bf90da66 refs #5919 sql
gitea/salix/pipeline/head There was a failure building this commit Details
2023-10-11 13:26:27 +02:00
Carlos Satorres c061841cac refs #5919 locker and back
gitea/salix/pipeline/head This commit looks good Details
2023-10-10 13:58:33 +02:00
Carlos Satorres 3c58f86c2a refs #5919 locker back y front
gitea/salix/pipeline/head This commit looks good Details
2023-10-10 13:44:22 +02:00
296 changed files with 4667 additions and 4493 deletions

View File

@ -1,3 +1,4 @@
# Changelog # Changelog
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
@ -12,6 +13,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- (InvoiceOut -> Crear factura) Cuando falla al crear una factura, se devuelve un error - (InvoiceOut -> Crear factura) Cuando falla al crear una factura, se devuelve un error
- (Worker -> Ver albarán) Ya no aparece la página en blanco - (Worker -> Ver albarán) Ya no aparece la página en blanco
### Changed
- (InvoiceOut) Las facturas ahora muestran el ticket del cual proviene el abono
## [24.18.01] - 2024-05-07 ## [24.18.01] - 2024-05-07
## [24.16.01] - 2024-04-18 ## [24.16.01] - 2024-04-18

1
Jenkinsfile vendored
View File

@ -24,7 +24,6 @@ node {
FROM_GIT = env.JOB_NAME.startsWith('gitea/') FROM_GIT = env.JOB_NAME.startsWith('gitea/')
RUN_TESTS = !PROTECTED_BRANCH && FROM_GIT RUN_TESTS = !PROTECTED_BRANCH && FROM_GIT
RUN_BUILD = PROTECTED_BRANCH && FROM_GIT RUN_BUILD = PROTECTED_BRANCH && FROM_GIT
// env.DEBUG = 'strong-remoting:shared-method'
// https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#using-environment-variables // https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#using-environment-variables
echo "NODE_NAME: ${env.NODE_NAME}" echo "NODE_NAME: ${env.NODE_NAME}"
echo "WORKSPACE: ${env.WORKSPACE}" echo "WORKSPACE: ${env.WORKSPACE}"

View File

@ -54,6 +54,12 @@ For end-to-end tests run from project's root.
$ npm run test:e2e $ npm run test:e2e
``` ```
## Generate changeLog test → master
```
$ bash changelog.sh
```
## Visual Studio Code extensions ## Visual Studio Code extensions
Open Visual Studio Code, press Ctrl+P and paste the following commands. Open Visual Studio Code, press Ctrl+P and paste the following commands.

View File

@ -1,3 +1,5 @@
const isProduction = require('vn-loopback/server/boot/isProduction');
module.exports = Self => { module.exports = Self => {
Self.remoteMethodCtx('sendCheckingPresence', { Self.remoteMethodCtx('sendCheckingPresence', {
description: 'Creates a message in the chat model checking the user status', description: 'Creates a message in the chat model checking the user status',
@ -37,7 +39,7 @@ module.exports = Self => {
if (!recipient) if (!recipient)
throw new Error(`Could not send message "${message}" to worker id ${recipientId} from user ${userId}`); throw new Error(`Could not send message "${message}" to worker id ${recipientId} from user ${userId}`);
if (process.env.NODE_ENV == 'test') if (!isProduction())
message = `[Test:Environment to user ${userId}] ` + message; message = `[Test:Environment to user ${userId}] ` + message;
const chat = await models.Chat.create({ const chat = await models.Chat.create({

View File

@ -1,4 +1,6 @@
const axios = require('axios'); const axios = require('axios');
const isProduction = require('vn-loopback/server/boot/isProduction');
module.exports = Self => { module.exports = Self => {
Self.remoteMethodCtx('sendQueued', { Self.remoteMethodCtx('sendQueued', {
description: 'Send a RocketChat message', description: 'Send a RocketChat message',
@ -94,7 +96,7 @@ module.exports = Self => {
* @return {Promise} - The request promise * @return {Promise} - The request promise
*/ */
Self.sendMessage = async function sendMessage(senderFk, recipient, message) { Self.sendMessage = async function sendMessage(senderFk, recipient, message) {
if (process.env.NODE_ENV !== 'production') { if (!isProduction(false)) {
return new Promise(resolve => { return new Promise(resolve => {
return resolve({ return resolve({
statusCode: 200, statusCode: 200,
@ -149,7 +151,7 @@ module.exports = Self => {
* @return {Promise} - The request promise * @return {Promise} - The request promise
*/ */
Self.getUserStatus = async function getUserStatus(username) { Self.getUserStatus = async function getUserStatus(username) {
if (process.env.NODE_ENV !== 'production') { if (!isProduction(false)) {
return new Promise(resolve => { return new Promise(resolve => {
return resolve({ return resolve({
data: { data: {

View File

@ -1,6 +1,7 @@
const UserError = require('vn-loopback/util/user-error'); const UserError = require('vn-loopback/util/user-error');
const fs = require('fs-extra'); const fs = require('fs-extra');
const path = require('path'); const path = require('path');
const isProduction = require('vn-loopback/server/boot/isProduction');
module.exports = Self => { module.exports = Self => {
Self.remoteMethod('deleteTrashFiles', { Self.remoteMethod('deleteTrashFiles', {
@ -22,7 +23,7 @@ module.exports = Self => {
if (typeof options == 'object') if (typeof options == 'object')
Object.assign(myOptions, options); Object.assign(myOptions, options);
if (process.env.NODE_ENV == 'test') if (!isProduction())
throw new UserError(`Action not allowed on the test environment`); throw new UserError(`Action not allowed on the test environment`);
const models = Self.app.models; const models = Self.app.models;

View File

@ -1,5 +1,6 @@
const UserError = require('vn-loopback/util/user-error'); const UserError = require('vn-loopback/util/user-error');
const axios = require('axios'); const axios = require('axios');
const isProduction = require('vn-loopback/server/boot/isProduction');
module.exports = Self => { module.exports = Self => {
Self.remoteMethodCtx('upload', { Self.remoteMethodCtx('upload', {
@ -119,7 +120,7 @@ module.exports = Self => {
] ]
}; };
if (process.env.NODE_ENV != 'production') if (!isProduction(false))
throw new UserError('Action not allowed on the test environment'); throw new UserError('Action not allowed on the test environment');
// delete old // delete old

View File

@ -1,6 +1,7 @@
const fs = require('fs-extra'); const fs = require('fs-extra');
const path = require('path'); const path = require('path');
const UserError = require('vn-loopback/util/user-error'); const UserError = require('vn-loopback/util/user-error');
const isProduction = require('vn-loopback/server/boot/isProduction');
module.exports = Self => { module.exports = Self => {
Self.remoteMethod('scrub', { Self.remoteMethod('scrub', {
@ -43,8 +44,7 @@ module.exports = Self => {
Self.scrub = async function(collection, remove, limit, dryRun, skipLock) { Self.scrub = async function(collection, remove, limit, dryRun, skipLock) {
const $ = Self.app.models; const $ = Self.app.models;
const env = process.env.NODE_ENV; dryRun = dryRun || !isProduction(false);
dryRun = dryRun || (env && env !== 'production');
const instance = await $.ImageCollection.findOne({ const instance = await $.ImageCollection.findOne({
fields: ['id'], fields: ['id'],

View File

@ -1,6 +1,7 @@
const UserError = require('vn-loopback/util/user-error'); const UserError = require('vn-loopback/util/user-error');
const fs = require('fs/promises'); const fs = require('fs/promises');
const path = require('path'); const path = require('path');
const isProduction = require('vn-loopback/server/boot/isProduction');
module.exports = Self => { module.exports = Self => {
Self.remoteMethodCtx('upload', { Self.remoteMethodCtx('upload', {
@ -41,7 +42,7 @@ module.exports = Self => {
if (!hasWriteRole) if (!hasWriteRole)
throw new UserError(`You don't have enough privileges`); throw new UserError(`You don't have enough privileges`);
if (process.env.NODE_ENV == 'test') if (!isProduction())
throw new UserError(`Action not allowed on the test environment`); throw new UserError(`Action not allowed on the test environment`);
// Upload file to temporary path // Upload file to temporary path

View File

@ -39,8 +39,6 @@ module.exports = Self => {
const xmlString = response.data; const xmlString = response.data;
const parser = new DOMParser(); const parser = new DOMParser();
const xmlDoc = parser.parseFromString(xmlString, 'text/xml'); const xmlDoc = parser.parseFromString(xmlString, 'text/xml');
const [resultElement] = xmlDoc.getElementsByTagName('Mensaje'); return xmlDoc.getElementsByTagName('Mensaje')[0].textContent;
return resultElement.textContent;
}; };
}; };

View File

@ -42,7 +42,8 @@ module.exports = Self => {
throw new UserError(`Some mrwConfig parameters are not set`); throw new UserError(`Some mrwConfig parameters are not set`);
const query = const query =
`SELECT CASE co.code `SELECT
CASE co.code
WHEN 'ES' THEN a.postalCode WHEN 'ES' THEN a.postalCode
WHEN 'PT' THEN LEFT(a.postalCode, 4) WHEN 'PT' THEN LEFT(a.postalCode, 4)
WHEN 'AD' THEN REPLACE(a.postalCode, 'AD', '00') WHEN 'AD' THEN REPLACE(a.postalCode, 'AD', '00')
@ -89,14 +90,9 @@ module.exports = Self => {
const getLabelResponse = await sendXmlDoc('getLabel', {mrw, shipmentId}, 'text/xml'); const getLabelResponse = await sendXmlDoc('getLabel', {mrw, shipmentId}, 'text/xml');
const file = getTextByTag(getLabelResponse, 'EtiquetaFile'); const file = getTextByTag(getLabelResponse, 'EtiquetaFile');
try {
await models.Expedition.updateAll({id: expeditionFk}, {externalId: shipmentId}, myOptions);
if (tx) await tx.commit(); if (tx) await tx.commit();
} catch (error) {
if (tx) await tx.rollback(); return {shipmentId, file};
throw error;
}
return file;
}; };
function getTextByTag(xmlDoc, tag) { function getTextByTag(xmlDoc, tag) {

View File

@ -81,9 +81,9 @@ describe('MRWConfig createShipment()', () => {
spyOn(axios, 'post').and.callFake(() => Promise.resolve(mockPostResponses.pop())); spyOn(axios, 'post').and.callFake(() => Promise.resolve(mockPostResponses.pop()));
const base64Binary = await models.MrwConfig.createShipment(expedition1.id, options); const {file} = await models.MrwConfig.createShipment(expedition1.id, options);
expect(base64Binary).toEqual(mockBase64Binary); expect(file).toEqual(mockBase64Binary);
}); });
it('should fail if mrwConfig has no data', async() => { it('should fail if mrwConfig has no data', async() => {

View File

@ -1,4 +1,5 @@
const {Email} = require('vn-print'); const {Email} = require('vn-print');
const isProduction = require('vn-loopback/server/boot/isProduction');
module.exports = Self => { module.exports = Self => {
Self.remoteMethod('send', { Self.remoteMethod('send', {
@ -67,7 +68,7 @@ module.exports = Self => {
const newParams = Object.assign({}, queueParams, sendParams); const newParams = Object.assign({}, queueParams, sendParams);
const email = new Email(queueName, newParams); const email = new Email(queueName, newParams);
if (process.env.NODE_ENV != 'test') if (isProduction())
await email.send(); await email.send();
await queue.updateAttribute('status', statusSent); await queue.updateAttribute('status', statusSent);

View File

@ -45,7 +45,7 @@ module.exports = Self => {
{'pc.code': {like: `%${value}%`}}, {'pc.code': {like: `%${value}%`}},
{'t.name': {like: `%${value}%`}}, {'t.name': {like: `%${value}%`}},
{'p.name': {like: `%${value}%`}}, {'p.name': {like: `%${value}%`}},
{'c.country': {like: `%${value}%`}} {'c.name': {like: `%${value}%`}}
] ]
}; };
} }
@ -62,7 +62,7 @@ module.exports = Self => {
pc.code, pc.code,
t.name as town, t.name as town,
p.name as province, p.name as province,
c.country c.name country
FROM FROM
postCode pc postCode pc
JOIN town t on t.id = pc.townFk JOIN town t on t.id = pc.townFk

View File

@ -186,5 +186,8 @@
}, },
"AgencyWorkCenter": { "AgencyWorkCenter": {
"dataSource": "vn" "dataSource": "vn"
},
"RouteConfig": {
"dataSource": "vn"
} }
} }

View File

@ -13,7 +13,7 @@
"id": true, "id": true,
"description": "Identifier" "description": "Identifier"
}, },
"country": { "name": {
"type": "string", "type": "string",
"required": true "required": true
}, },

View File

@ -0,0 +1,18 @@
{
"name": "RouteConfig",
"base": "VnModel",
"options": {
"mysql": {
"table": "routeConfig"
}
},
"properties": {
"id": {
"type": "number",
"description": "Identifier"
},
"kmMax": {
"type": "number"
}
}
}

34
changelog.sh Normal file
View File

@ -0,0 +1,34 @@
features_types=(chore feat style)
changes_types=(refactor perf)
fix_types=(fix revert)
file="CHANGELOG.md"
file_tmp="temp_log.txt"
file_current_tmp="temp_current_log.txt"
setType(){
echo "### $1" >> $file_tmp
arr=("$@")
echo "" > $file_current_tmp
for i in "${arr[@]}"
do
git log --grep="$i" --oneline --no-merges --format="- %s %d by:%an" master..test >> $file_current_tmp
done
# remove duplicates
sort -o $file_current_tmp -u $file_current_tmp
cat $file_current_tmp >> $file_tmp
echo "" >> $file_tmp
# remove tmp current file
[ -e $file_current_tmp ] && rm $file_current_tmp
}
echo "# Version XX.XX - XXXX-XX-XX" >> $file_tmp
echo "" >> $file_tmp
setType "Added 🆕" "${features_types[@]}"
setType "Changed 📦" "${changes_types[@]}"
setType "Fixed 🛠️" "${fix_types[@]}"
cat $file >> $file_tmp
mv $file_tmp $file

View File

@ -9,7 +9,7 @@
}, },
"vn": { "vn": {
"view": { "view": {
"expeditionPallet_Print": "288cbd6e8289df083ed5eb1a2c808f7a82ba4c90c8ad9781104808a7a54471fb" "expeditionPallet_Print": "06613719475fcdba8309607c38cc78efc2e348cca7bc96b48dc3ae3c12426f54"
} }
} }
} }

24
db/dbWatcher.js Normal file
View File

@ -0,0 +1,24 @@
const fs = require('fs');
const {spawn} = require('child_process');
function watchDatabaseChanges() {
console.log('Watching for changes in db/routines and db/versions');
fs.watch('db', {recursive: true}, (eventType, filename) => {
if (filename.endsWith('.sql')) {
let command;
if (filename.startsWith('routines')) command = 'push';
else if (filename.startsWith('versions')) command = 'run';
if (command) {
const process = spawn('myt', [command]);
process.stdout.on('data', data => console.log(data.toString()));
process.stderr.on('data', data => console.error(`stderr: ${data}`));
process.on('error', error => console.error(`error: ${error.message}`));
process.on('close', () => console.log('Watching for changes in db/routines and db/versions'));
}
}
});
}
if (require.main === module) watchDatabaseChanges();
module.exports = watchDatabaseChanges;

View File

@ -3,7 +3,7 @@ USE `util`;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
INSERT INTO `version` VALUES ('vn-database','11018','878ee9e3039dd06ad456fa475f0d646d8bae3d4b','2024-05-07 07:34:42','11032'); INSERT INTO `version` VALUES ('vn-database','11031','12f36dc825b6660062e2c86fde9c6b451cb58f0d','2024-05-14 08:25:58','11048');
INSERT INTO `versionLog` VALUES ('vn-database','10107','00-firstScript.sql','jenkins@10.0.2.69','2022-04-23 10:53:53',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','10107','00-firstScript.sql','jenkins@10.0.2.69','2022-04-23 10:53:53',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','10112','00-firstScript.sql','jenkins@10.0.2.69','2022-05-09 09:14:53',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','10112','00-firstScript.sql','jenkins@10.0.2.69','2022-05-09 09:14:53',NULL,NULL);
@ -651,6 +651,7 @@ INSERT INTO `versionLog` VALUES ('vn-database','10855','00-firstScript.sql','jen
INSERT INTO `versionLog` VALUES ('vn-database','10856','00-cloneAcl.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-02-22 08:32:57',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','10856','00-cloneAcl.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-02-22 08:32:57',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','10857','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-02-22 08:32:57',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','10857','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-02-22 08:32:57',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','10858','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-02-15 09:46:06',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','10858','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-02-15 09:46:06',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','10859','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:25',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','10861','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-02-15 09:46:06',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','10861','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-02-15 09:46:06',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','10862','00-alterAgencyTermConfig.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-03-07 08:12:55',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','10862','00-alterAgencyTermConfig.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-03-07 08:12:55',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','10862','00-alterGastosResumen.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-03-07 08:12:55',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','10862','00-alterGastosResumen.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-03-07 08:12:55',NULL,NULL);
@ -776,16 +777,33 @@ INSERT INTO `versionLog` VALUES ('vn-database','10977','00-firstScript.sql','jen
INSERT INTO `versionLog` VALUES ('vn-database','10984','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:31:59',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','10984','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:31:59',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','10988','00-pbx_prefix.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-04-11 17:00:16',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','10988','00-pbx_prefix.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-04-11 17:00:16',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','10990','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:31:59',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','10990','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:31:59',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','10991','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:26',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','10992','00-acl.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:26',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','10992','00-referenceRate.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:26',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','10994','00-modifyAcls.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:31:59',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','10994','00-modifyAcls.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:31:59',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','10995','01-agencyLogCreate.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:26',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','10995','02-agencyWorkCenterCreate.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:26',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','10995','03-tableAcl.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:26',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','10996','00-dropOrderRecalc.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:31:59',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','10996','00-dropOrderRecalc.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:31:59',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','10996','01-dropTicketRecalc.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:31:59',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','10996','01-dropTicketRecalc.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:31:59',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','10996','02-dropTravelRecalc.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:31:59',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','10996','02-dropTravelRecalc.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:31:59',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','10997','00-groupingMode.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:34:21',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','10997','00-groupingMode.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:34:21',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','11001','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:26',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','11002','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:26',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','11003','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:34:21',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11003','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:34:21',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','11007','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:34:21',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11007','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:34:21',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','11008','00-alter.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:27',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','11012','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:27',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','11014','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:27',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','11016','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-04-27 13:16:09',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11016','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-04-27 13:16:09',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','11018','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:34:21',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11018','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:34:21',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','11021','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-04-30 09:07:56',NULL,NULL); INSERT INTO `versionLog` VALUES ('vn-database','11021','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-04-30 09:07:56',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','11026','00-entryAlter.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:27',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','11026','01-entryUpdate.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:27',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','11026','02-entryInternal.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:27',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','11031','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:27',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','11033','00-rollbackAcls.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-07 12:45:45',NULL,NULL);
INSERT INTO `versionLog` VALUES ('vn-database','11045','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-10 14:53:29',NULL,NULL);
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
@ -1683,9 +1701,9 @@ INSERT INTO `ACL` VALUES (610,'Ticket','deliveryNoteCsv','READ','ALLOW','ROLE','
INSERT INTO `ACL` VALUES (611,'State','find','READ','ALLOW','ROLE','employee'); INSERT INTO `ACL` VALUES (611,'State','find','READ','ALLOW','ROLE','employee');
INSERT INTO `ACL` VALUES (612,'State','findById','READ','ALLOW','ROLE','employee'); INSERT INTO `ACL` VALUES (612,'State','findById','READ','ALLOW','ROLE','employee');
INSERT INTO `ACL` VALUES (613,'State','findOne','READ','ALLOW','ROLE','employee'); INSERT INTO `ACL` VALUES (613,'State','findOne','READ','ALLOW','ROLE','employee');
INSERT INTO `ACL` VALUES (614,'Worker','find','READ','ALLOW','ROLE','hr'); INSERT INTO `ACL` VALUES (614,'Worker','find','READ','ALLOW','ROLE','employee');
INSERT INTO `ACL` VALUES (615,'Worker','findById','READ','ALLOW','ROLE','hr'); INSERT INTO `ACL` VALUES (615,'Worker','findById','READ','ALLOW','ROLE','employee');
INSERT INTO `ACL` VALUES (616,'Worker','findOne','READ','ALLOW','ROLE','hr'); INSERT INTO `ACL` VALUES (616,'Worker','findOne','READ','ALLOW','ROLE','employee');
INSERT INTO `ACL` VALUES (617,'Worker','filter','READ','ALLOW','ROLE','employee'); INSERT INTO `ACL` VALUES (617,'Worker','filter','READ','ALLOW','ROLE','employee');
INSERT INTO `ACL` VALUES (618,'Worker','getWorkedHours','READ','ALLOW','ROLE','employee'); INSERT INTO `ACL` VALUES (618,'Worker','getWorkedHours','READ','ALLOW','ROLE','employee');
INSERT INTO `ACL` VALUES (619,'Worker','active','READ','ALLOW','ROLE','employee'); INSERT INTO `ACL` VALUES (619,'Worker','active','READ','ALLOW','ROLE','employee');
@ -1861,7 +1879,14 @@ INSERT INTO `ACL` VALUES (825,'Application','getEnumValues','*','ALLOW','ROLE','
INSERT INTO `ACL` VALUES (826,'Ticket','editZone','WRITE','ALLOW','ROLE','salesAssistant'); INSERT INTO `ACL` VALUES (826,'Ticket','editZone','WRITE','ALLOW','ROLE','salesAssistant');
INSERT INTO `ACL` VALUES (827,'TicketWeekly','deleteById','WRITE','ALLOW','ROLE','buyerBoss'); INSERT INTO `ACL` VALUES (827,'TicketWeekly','deleteById','WRITE','ALLOW','ROLE','buyerBoss');
INSERT INTO `ACL` VALUES (828,'TicketWeekly','upsert','WRITE','ALLOW','ROLE','buyer'); INSERT INTO `ACL` VALUES (828,'TicketWeekly','upsert','WRITE','ALLOW','ROLE','buyer');
INSERT INTO `ACL` VALUES (829,'Worker','__get__summary','READ','ALLOW','ROLE','employee'); INSERT INTO `ACL` VALUES (830,'InvoiceIn','*','READ','ALLOW','ROLE','deliveryBoss');
INSERT INTO `ACL` VALUES (831,'InvoiceIn','exchangeRateUpdate','*','ALLOW','ROLE','employee');
INSERT INTO `ACL` VALUES (832,'AgencyLog','*','READ','ALLOW','ROLE','employee');
INSERT INTO `ACL` VALUES (833,'AgencyWorkCenter','*','READ','ALLOW','ROLE','employee');
INSERT INTO `ACL` VALUES (834,'AgencyMode','*','READ','ALLOW','ROLE','employee');
INSERT INTO `ACL` VALUES (835,'Agency','*','READ','ALLOW','ROLE','employee');
INSERT INTO `ACL` VALUES (836,'Agency','*','WRITE','ALLOW','ROLE','deliveryAssistant');
INSERT INTO `ACL` VALUES (837,'AgencyWorkCenter','*','WRITE','ALLOW','ROLE','deliveryAssistant');
INSERT INTO `fieldAcl` VALUES (1,'Client','name','update','employee'); INSERT INTO `fieldAcl` VALUES (1,'Client','name','update','employee');
INSERT INTO `fieldAcl` VALUES (2,'Client','contact','update','employee'); INSERT INTO `fieldAcl` VALUES (2,'Client','contact','update','employee');
@ -2007,6 +2032,7 @@ INSERT INTO `businessType` VALUES ('others','Otros');
INSERT INTO `businessType` VALUES ('otherSector','Profesional de otro sector'); INSERT INTO `businessType` VALUES ('otherSector','Profesional de otro sector');
INSERT INTO `businessType` VALUES ('restoration','Restauración'); INSERT INTO `businessType` VALUES ('restoration','Restauración');
INSERT INTO `businessType` VALUES ('trainingCentre','Centro de formación'); INSERT INTO `businessType` VALUES ('trainingCentre','Centro de formación');
INSERT INTO `businessType` VALUES ('VIP','Very important person');
INSERT INTO `businessType` VALUES ('wholesaler','Mayorista'); INSERT INTO `businessType` VALUES ('wholesaler','Mayorista');
INSERT INTO `businessType` VALUES ('worker','Trabajador'); INSERT INTO `businessType` VALUES ('worker','Trabajador');
@ -2180,7 +2206,7 @@ INSERT INTO `continent` VALUES (3,'África','AF');
INSERT INTO `continent` VALUES (4,'Europa','EU'); INSERT INTO `continent` VALUES (4,'Europa','EU');
INSERT INTO `continent` VALUES (5,'Oceanía','OC'); INSERT INTO `continent` VALUES (5,'Oceanía','OC');
INSERT INTO `department` VALUES (1,'VN','VERDNATURA',1,118,763,0,0,0,0,26,NULL,'/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (1,'VN','VERDNATURA',1,110,763,0,0,0,0,26,NULL,'/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (22,'shopping','COMPRAS',2,3,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (22,'shopping','COMPRAS',2,3,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (23,'CMA','CAMARA',13,14,NULL,72,1,1,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,1,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (23,'CMA','CAMARA',13,14,NULL,72,1,1,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,1,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (31,'it','INFORMATICA',4,5,NULL,72,0,0,1,0,1,'/1/','informatica-cau',1,NULL,1,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (31,'it','INFORMATICA',4,5,NULL,72,0,0,1,0,1,'/1/','informatica-cau',1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
@ -2191,54 +2217,50 @@ INSERT INTO `department` VALUES (37,'PROD','PRODUCCION',12,35,NULL,72,1,1,1,11,1
INSERT INTO `department` VALUES (38,'picking','SACADO',15,16,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (38,'picking','SACADO',15,16,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (39,'packing','ENCAJADO',17,18,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (39,'packing','ENCAJADO',17,18,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (41,'administration','ADMINISTRACION',36,37,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (41,'administration','ADMINISTRACION',36,37,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (43,'VT','VENTAS',38,77,NULL,0,0,0,1,19,1,'/1/',NULL,1,'',1,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (43,'VT','VENTAS',38,69,NULL,0,0,0,1,15,1,'/1/',NULL,1,'',1,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (44,'management','GERENCIA',78,79,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (44,'management','GERENCIA',70,71,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (45,'logistic','LOGISTICA',80,81,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (45,'logistic','LOGISTICA',72,73,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (46,'delivery','REPARTO',82,83,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (46,'delivery','REPARTO',74,75,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (48,'storage','ALMACENAJE',84,85,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (48,'storage','ALMACENAJE',76,77,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (49,NULL,'PROPIEDAD',86,87,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (49,NULL,'PROPIEDAD',78,79,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (52,NULL,'CARGA AEREA',88,89,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (52,NULL,'CARGA AEREA',80,81,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (53,'marketing','MARKETING Y COMUNICACIÓN',39,40,NULL,72,0,0,2,0,43,'/1/43/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (53,'marketing','MARKETING Y COMUNICACIÓN',39,40,NULL,72,0,0,2,0,43,'/1/43/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (54,NULL,'ORNAMENTALES',90,91,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (54,NULL,'ORNAMENTALES',82,83,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (55,NULL,'TALLER NATURAL',19,20,14548,72,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,1118,NULL,NULL,NULL); INSERT INTO `department` VALUES (55,NULL,'TALLER NATURAL',19,20,14548,72,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,1118,NULL,NULL,NULL);
INSERT INTO `department` VALUES (56,NULL,'TALLER ARTIFICIAL',21,22,8470,72,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,1927,NULL,NULL,NULL); INSERT INTO `department` VALUES (56,NULL,'TALLER ARTIFICIAL',21,22,8470,72,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,1927,NULL,NULL,NULL);
INSERT INTO `department` VALUES (58,'CMP','CAMPOS',92,95,NULL,72,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (58,'CMP','CAMPOS',84,87,NULL,72,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (59,'maintenance','MANTENIMIENTO',96,97,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (59,'maintenance','MANTENIMIENTO',88,89,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (60,'claims','RECLAMACIONES',41,42,NULL,72,0,0,2,0,43,'/1/43/',NULL,1,NULL,1,1,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (60,'claims','RECLAMACIONES',41,42,NULL,72,0,0,2,0,43,'/1/43/',NULL,1,NULL,1,1,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (61,NULL,'VNH',98,101,NULL,73,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (61,NULL,'VNH',90,93,NULL,73,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (66,NULL,'VERDNAMADRID',102,103,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (66,NULL,'VERDNAMADRID',94,95,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (68,NULL,'COMPLEMENTOS',23,24,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (68,NULL,'COMPLEMENTOS',23,24,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (69,NULL,'VERDNABARNA',104,105,NULL,74,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (69,NULL,'VERDNABARNA',96,97,NULL,74,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (80,'vallesTeam','EQUIPO J VALLES',43,44,4250,72,0,0,2,0,43,'/1/43/','jvp_equipo',1,'equipojvalles@verdnatura.es',0,0,0,0,NULL,NULL,'5300',NULL); INSERT INTO `department` VALUES (80,'vallesTeam','EQUIPO ESPAÑA 5',43,44,4250,72,0,0,2,0,43,'/1/43/','jvp_equipo',1,'equipojvalles@verdnatura.es',0,0,0,0,NULL,NULL,'5300',NULL);
INSERT INTO `department` VALUES (86,NULL,'LIMPIEZA',106,107,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (86,NULL,'LIMPIEZA',98,99,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (89,NULL,'COORDINACION',108,109,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (89,NULL,'COORDINACION',100,101,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (90,NULL,'TRAILER',99,100,NULL,0,0,0,2,0,61,'/1/61/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (90,NULL,'TRAILER',91,92,NULL,0,0,0,2,0,61,'/1/61/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (91,'artificial','ARTIFICIAL',25,26,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (91,'artificial','ARTIFICIAL',25,26,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (92,NULL,'EQUIPO SILVERIO',45,46,1203,0,0,0,2,0,43,'/1/43/','sdc_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (92,NULL,'EQUIPO SILVERIO',45,46,1203,0,0,0,2,0,43,'/1/43/','sdc_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (94,'brocalTeam','EQUIPO J BROCAL',47,48,3797,0,0,0,2,0,43,'/1/43/','jes_equipo',0,'equipojbrocal@verdnatura.es',0,0,0,0,NULL,NULL,'5100',NULL); INSERT INTO `department` VALUES (94,'spainTeam2','EQUIPO ESPAÑA 2',47,48,3797,0,0,0,2,0,43,'/1/43/','es2_equipo',0,'es2@verdnatura.es',0,0,0,0,NULL,NULL,'5100',NULL);
INSERT INTO `department` VALUES (95,'spainTeam1','EQUIPO ESPAÑA 1',49,50,24065,0,0,0,2,0,43,'/1/43/','es1_equipo',0,'españa1@verdnatura.es',0,0,0,0,NULL,NULL,'5000',NULL); INSERT INTO `department` VALUES (95,'spainTeam1','EQUIPO ESPAÑA 1',49,50,24065,0,0,0,2,0,43,'/1/43/','es1_equipo',0,'es1@verdnatura.es',0,0,0,0,NULL,NULL,'5000',NULL);
INSERT INTO `department` VALUES (96,NULL,'EQUIPO C LOPEZ',51,52,4661,0,0,0,2,0,43,'/1/43/','cla_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (96,NULL,'EQUIPO C LOPEZ',51,52,4661,0,0,0,2,0,43,'/1/43/','cla_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (115,NULL,'EQUIPO CLAUDI',53,54,3810,0,0,0,2,0,43,'/1/43/','csr_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (115,NULL,'EQUIPO CLAUDI',53,54,3810,0,0,0,2,0,43,'/1/43/','csr_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (123,NULL,'EQUIPO ELENA BASCUÑANA',55,56,7102,0,0,0,2,0,43,'/1/43/','ebt_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (123,NULL,'EQUIPO ELENA BASCUÑANA',55,56,7102,0,0,0,2,0,43,'/1/43/','ebt_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (124,NULL,'CONTROL INTERNO',110,111,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,1,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (124,NULL,'CONTROL INTERNO',102,103,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (125,'miriamMarTeam','EQUIPO MIRIAM MAR',57,58,1118,0,0,0,2,0,43,'/1/43/','mir_equipo',0,'equipomirgir@verdnatura.es',0,0,0,0,NULL,NULL,'5200',NULL); INSERT INTO `department` VALUES (125,'miriamMarTeam','EQUIPO ESPAÑA 3',57,58,1118,0,0,0,2,0,43,'/1/43/','mir_equipo',0,'equipomirgir@verdnatura.es',0,0,0,0,NULL,NULL,'5200',NULL);
INSERT INTO `department` VALUES (126,NULL,'PRESERVADO',27,28,NULL,0,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (126,NULL,'PRESERVADO',27,28,NULL,0,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (128,NULL,'PALETIZADO',29,30,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (128,NULL,'PALETIZADO',29,30,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (130,NULL,'REVISION',31,32,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (130,NULL,'REVISION',31,32,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (131,'greenhouse','INVERNADERO',93,94,NULL,0,0,0,2,0,58,'/1/58/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (131,'greenhouse','INVERNADERO',85,86,NULL,0,0,0,2,0,58,'/1/58/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (132,NULL,'EQUIPO DC',59,60,1731,0,0,0,2,0,43,'/1/43/','dc_equipo',1,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (132,NULL,'EQUIPO DC',59,60,1731,0,0,0,2,0,43,'/1/43/','dc_equipo',1,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (133,'franceTeam','EQUIPO FRANCIA',61,62,1731,72,0,0,2,0,43,'/1/43/','fr_equipo',1,'gestionfrancia@verdnatura.es',0,0,0,0,NULL,NULL,'3300',NULL); INSERT INTO `department` VALUES (133,'franceTeam','EQUIPO FRANCIA',61,62,1731,72,0,0,2,0,43,'/1/43/','fr_equipo',1,'gestionfrancia@verdnatura.es',0,0,0,0,NULL,NULL,'3300',NULL);
INSERT INTO `department` VALUES (134,'portugalTeam','EQUIPO PORTUGAL',63,64,6264,0,0,0,2,0,43,'/1/43/','pt_equipo',1,'portugal@verdnatura.es',0,0,0,0,NULL,NULL,'3500',NULL); INSERT INTO `department` VALUES (134,'portugalTeam','EQUIPO PORTUGAL',63,64,6264,0,0,0,2,0,43,'/1/43/','pt_equipo',1,'portugal@verdnatura.es',0,0,0,0,NULL,NULL,'3500',NULL);
INSERT INTO `department` VALUES (135,'routers','ENRUTADORES',112,113,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (135,'routers','ENRUTADORES',104,105,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (136,'heavyVehicles','VEHICULOS PESADOS',114,115,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (136,'heavyVehicles','VEHICULOS PESADOS',106,107,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (137,'sorter','SORTER',116,117,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (137,'sorter','SORTER',108,109,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (139,'soriaTeam','EQUIPO J SORIA ',65,66,3803,0,0,0,2,0,43,'/1/43/','jss_equipo',1,'equipojsoria@verdnatura.es',0,0,0,0,NULL,NULL,'5400',NULL); INSERT INTO `department` VALUES (139,'soriaTeam','EQUIPO ESPAÑA 4',65,66,3803,0,0,0,2,0,43,'/1/43/','jss_equipo',1,'equipojsoria@verdnatura.es',0,0,0,0,NULL,NULL,'5400',NULL);
INSERT INTO `department` VALUES (140,'hollandTeam','EQUIPO HOLANDA',67,68,NULL,0,0,0,2,0,43,'/1/43/','nl_equipo',1,NULL,1,0,0,0,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (140,'hollandTeam','EQUIPO HOLANDA',67,68,NULL,0,0,0,2,0,43,'/1/43/','nl_equipo',1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (141,NULL,'PREVIA',33,34,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL); INSERT INTO `department` VALUES (141,NULL,'PREVIA',33,34,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (142,NULL,'EQUIPO ESPAÑA 2',69,70,3797,0,0,0,2,0,43,'/1/43/','jes_equipo',0,'equipojbrocal@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (143,NULL,'EQUIPO ESPAÑA 3',71,72,4379,0,0,0,2,0,43,'/1/43/','mir_equipo',0,'equipomirgir@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (144,NULL,'EQUIPO ESPAÑA 4',73,74,3803,0,0,0,2,0,43,'/1/43/','jss_equipo',0,'equipojsoria@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `department` VALUES (145,NULL,'EQUIPO ESPAÑA 5',75,76,4250,0,0,0,2,0,43,'/1/43/','jvp_equipo',0,'equipojvalles@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
INSERT INTO `docuware` VALUES (1,'deliveryNote','Albaranes cliente','find','find','N__ALBAR_N',NULL); INSERT INTO `docuware` VALUES (1,'deliveryNote','Albaranes cliente','find','find','N__ALBAR_N',NULL);
INSERT INTO `docuware` VALUES (2,'deliveryNote','Albaranes cliente','store','Archivar','N__ALBAR_N',NULL); INSERT INTO `docuware` VALUES (2,'deliveryNote','Albaranes cliente','store','Archivar','N__ALBAR_N',NULL);
@ -2541,7 +2563,7 @@ INSERT INTO `volumeConfig` VALUES (2.67,1.60,0.8,150,0.30,120,57,2.0,50,200,10,1
INSERT INTO `workCenter` VALUES (1,'Silla',20,859,1,'Av espioca 100',552703,NULL); INSERT INTO `workCenter` VALUES (1,'Silla',20,859,1,'Av espioca 100',552703,NULL);
INSERT INTO `workCenter` VALUES (2,'Mercaflor',19,NULL,NULL,NULL,NULL,NULL); INSERT INTO `workCenter` VALUES (2,'Mercaflor',19,NULL,NULL,NULL,NULL,NULL);
INSERT INTO `workCenter` VALUES (3,'Marjales',26,20008,NULL,NULL,NULL,NULL); INSERT INTO `workCenter` VALUES (3,'Marjales',26,20008,NULL,NULL,NULL,NULL);
INSERT INTO `workCenter` VALUES (4,'VNH',NULL,NULL,NULL,NULL,NULL,NULL); INSERT INTO `workCenter` VALUES (4,'VNH',NULL,NULL,7,NULL,NULL,NULL);
INSERT INTO `workCenter` VALUES (5,'Madrid',28,2869,5,'Av constitución 3',554145,2.00); INSERT INTO `workCenter` VALUES (5,'Madrid',28,2869,5,'Av constitución 3',554145,2.00);
INSERT INTO `workCenter` VALUES (6,'Vilassar',88,88038,NULL,'Cami del Crist, 33',556412,NULL); INSERT INTO `workCenter` VALUES (6,'Vilassar',88,88038,NULL,'Cami del Crist, 33',556412,NULL);
INSERT INTO `workCenter` VALUES (7,'Tenerife',NULL,NULL,NULL,NULL,NULL,NULL); INSERT INTO `workCenter` VALUES (7,'Tenerife',NULL,NULL,NULL,NULL,NULL,NULL);

View File

@ -327,20 +327,16 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','price_fixed','
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','printQueue','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','printQueue','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','preservedBoss','travel','alexm@%','0000-00-00 00:00:00','Insert,Delete',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','preservedBoss','travel','alexm@%','0000-00-00 00:00:00','Insert,Delete','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','travel','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','travel','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','Cubos_Retorno','alexm@%','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','Cubos','alexm@%','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','Cubos','alexm@%','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyerAssistant','itemType','jgallego@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyerAssistant','itemType','jgallego@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Cubos','alexm@%','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Cubos','alexm@%','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','Cubos','alexm@%','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','Cubos','alexm@%','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyerBoss','Cubos_Retorno','alexm@%','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','artificialBoss','state','alexm@%','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','artificialBoss','state','alexm@%','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','travel','alexm@%','0000-00-00 00:00:00','Delete',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','travel','alexm@%','0000-00-00 00:00:00','Delete','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','Bancos_poliza','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','Bancos_poliza','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','cmr','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','cmr','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','duaDismissed','alexm@%','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','duaDismissed','alexm@%','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','edi_article','alexm@%','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','edi_article','alexm@%','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','edi_bucket','alexm@%','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','edi_bucket_type','alexm@%','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','time','alexm@%','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','time','alexm@%','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','operator','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','operator','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','payment','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','payment','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert','');
@ -553,7 +549,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','client','alexm@%',
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','saleVolume','alexm@%','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','saleVolume','alexm@%','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','Proveedores_gestdoc','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','Proveedores_gestdoc','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','awb_gestdoc','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','awb_gestdoc','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyerBoss','Cubos','alexm@%','0000-00-00 00:00:00','Insert,Update',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyerAssistant','Cubos','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','routesMonitor','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','Update'); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','routesMonitor','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','Update');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminBoss','sale','alexm@%','0000-00-00 00:00:00','Insert',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminBoss','sale','alexm@%','0000-00-00 00:00:00','Insert','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','sale','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Delete','Update'); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','sale','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Delete','Update');
@ -1379,9 +1375,9 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','zoneIncluded','guil
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','zoneGeo','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','zoneGeo','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','quality','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','quality','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','category','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','category','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyerAssistant','edi_bucket_type','carlosap@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','edi_bucket','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','ektEntryAssign','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Delete',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','ektEntryAssign','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Delete','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyerAssistant','edi_bucket','carlosap@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','edi_bucket_type','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','calendarType','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','calendarType','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','timeSlots','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','timeSlots','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','supplierFreight','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','supplierFreight','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
@ -1395,6 +1391,15 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','deliveryNote','guil
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','invoiceOutExpense','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','invoiceOutExpense','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','delivery','carlosap@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','delivery','carlosap@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','entry','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Update',''); INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','entry','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Update','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Cubos_Retorno','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimDestination','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','entryConfig','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','farmingDeliveryNote','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','sage','grafana','TiposIva','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','bs','buyer','waste','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientObservation','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceInConfig','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerActivity','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
/*!40000 ALTER TABLE `tables_priv` ENABLE KEYS */; /*!40000 ALTER TABLE `tables_priv` ENABLE KEYS */;
/*!40000 ALTER TABLE `columns_priv` DISABLE KEYS */; /*!40000 ALTER TABLE `columns_priv` DISABLE KEYS */;
@ -1719,18 +1724,13 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_afterUpsert','PROC
INSERT IGNORE INTO `procs_priv` VALUES ('','util','grafana','dayend','FUNCTION','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','util','grafana','dayend','FUNCTION','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','srt','production','buffer_settypebyname','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','srt','production','buffer_settypebyname','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buyUltimate','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buyUltimate','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn2008','financialBoss','balance_create','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','buyUltimate','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','buyUltimate','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','barcodeToItem','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','barcodeToItem','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','ticket_splititempackingtype','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','ticket_splititempackingtype','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','entry_getCommission','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','entry_getCommission','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','deliveryAssistant','expeditionstate_addbypallet','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','deliveryAssistant','expeditionstate_addbypallet','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn2008','buyer','buy_tarifas_entry','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn2008','entryEditor','buy_tarifas','PROCEDURE','guillermo@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn2008','claimManager','buy_tarifas_entry','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','mail_insert','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','mail_insert','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','entry_fixMisfit','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','entry_fixMisfit','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn2008','employee','buy_tarifas_entry','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','VN_CURDATE','FUNCTION','juan@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','VN_CURDATE','FUNCTION','juan@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','marketingBoss','clientTaxArea','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','marketingBoss','clientTaxArea','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','clientTaxArea','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','clientTaxArea','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
@ -1766,7 +1766,6 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','productionBoss','saleSplit','P
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','grafana','client_getDebt','FUNCTION','guillermo@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','grafana','client_getDebt','FUNCTION','guillermo@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','client_getDebt','PROCEDURE','guillermo@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','client_getDebt','PROCEDURE','guillermo@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','tx_commit','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','tx_commit','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn2008','hrBoss','balance_create','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','cooler','buyultimate','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','cooler','buyultimate','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','util','grafana','firstdayofyear','FUNCTION','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','util','grafana','firstdayofyear','FUNCTION','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','util','claimManager','dayend','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','util','claimManager','dayend','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
@ -1913,7 +1912,7 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','account','guest','myuser_hasroutine
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','productionAssi','timebusiness_calculateall','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','productionAssi','timebusiness_calculateall','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','timecontrol_geterror','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','timecontrol_geterror','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','logistic','travel_weeklyclone','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','logistic','travel_weeklyclone','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_recalcPricesByBuy','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_recalcPricesByBuy','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','handmadeBoss','confection_controlSource','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','handmadeBoss','confection_controlSource','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','bi','productionAssi','rutasanalyze','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','bi','productionAssi','rutasanalyze','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','productionPlus','workerCreateExternal','PROCEDURE','juan@10.5.1.2','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','productionPlus','workerCreateExternal','PROCEDURE','juan@10.5.1.2','Execute','0000-00-00 00:00:00');
@ -2044,7 +2043,7 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','tx_rollback','PROCED
INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','tx_start','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','tx_start','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_recalcPrices','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_recalcPrices','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_recalcPricesByAwb','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_recalcPricesByAwb','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_recalcPricesByEntry','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_recalcPricesByEntry','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','util','hr','accountNumberToIban','FUNCTION','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','util','hr','accountNumberToIban','FUNCTION','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','util','financial','accountNumberToIban','FUNCTION','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','util','financial','accountNumberToIban','FUNCTION','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','supplier_statement','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','supplier_statement','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
@ -2059,6 +2058,14 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','artificialBoss','confection_co
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financial','remittance_calc','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financial','remittance_calc','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','util','developer','connection_kill','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','util','developer','connection_kill','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financial','client_getRisk','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00'); INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financial','client_getRisk','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','grafana','item_ValuateInventory','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financialBoss','balance_create','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hrBoss','balance_create','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','buy_recalcPricesByEntry','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','buy_recalcPricesByEntry','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','entryEditor','buy_recalcPricesByBuy','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','buy_recalcPricesByBuy','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','buy_recalcPricesByBuy','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
/*!40000 ALTER TABLE `procs_priv` ENABLE KEYS */; /*!40000 ALTER TABLE `procs_priv` ENABLE KEYS */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;

File diff suppressed because it is too large Load Diff

View File

@ -1855,6 +1855,26 @@ DELIMITER ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; /*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;; DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`agency_beforeInsert`
BEFORE INSERT ON `agency`
FOR EACH ROW
BEGIN
SET NEW.editorFk = account.myUser_getId();
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`agency_afterInsert` /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`agency_afterInsert`
AFTER INSERT ON `agency` AFTER INSERT ON `agency`
FOR EACH ROW FOR EACH ROW
@ -3211,12 +3231,6 @@ BEGIN
UPDATE `address` SET isDefaultAddress = TRUE UPDATE `address` SET isDefaultAddress = TRUE
WHERE id = NEW.defaultAddressFk; WHERE id = NEW.defaultAddressFk;
END IF; END IF;
IF NOT NEW.isActive THEN
UPDATE account.`user`
SET active = FALSE
WHERE id = NEW.id;
END IF;
END */;; END */;;
DELIMITER ; DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET sql_mode = @saved_sql_mode */ ;
@ -4577,9 +4591,19 @@ BEGIN
DECLARE vIsVirtual BOOL; DECLARE vIsVirtual BOOL;
DECLARE vPrintedCount INT; DECLARE vPrintedCount INT;
DECLARE vHasDistinctWarehouses BOOL; DECLARE vHasDistinctWarehouses BOOL;
DECLARE vTotalBuy INT;
IF NEW.isBooked = OLD.isBooked THEN IF NEW.isBooked = OLD.isBooked THEN
CALL entry_checkBooked(OLD.id); CALL entry_checkBooked(OLD.id);
ELSE
IF NEW.isBooked THEN
SELECT COUNT(*) INTO vTotalBuy
FROM buy
WHERE entryFk = NEW.id;
IF NOT vTotalBuy THEN
CALL util.throw('Entry must have lines to be marked booked');
END IF;
END IF;
END IF; END IF;
SET NEW.editorFk = account.myUser_getId(); SET NEW.editorFk = account.myUser_getId();
@ -5295,10 +5319,6 @@ DELIMITER ;;
BEGIN BEGIN
DECLARE vWithholdingSageFk INT; DECLARE vWithholdingSageFk INT;
IF NEW.isBooked = OLD.isBooked THEN
CALL invoiceIn_checkBooked(OLD.id);
END IF;
IF NOT (NEW.supplierRef <=> OLD.supplierRef) AND NOT util.checkPrintableChars(NEW.supplierRef) THEN IF NOT (NEW.supplierRef <=> OLD.supplierRef) AND NOT util.checkPrintableChars(NEW.supplierRef) THEN
CALL util.throw('The invoiceIn reference contains invalid characters'); CALL util.throw('The invoiceIn reference contains invalid characters');
END IF; END IF;
@ -5419,74 +5439,12 @@ DELIMITER ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; /*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;; DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceInCorrection_beforeInsert`
BEFORE INSERT ON `invoiceInCorrection`
FOR EACH ROW
BEGIN
CALL invoiceIn_checkBooked(NEW.correctingFk);
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceInCorrection_beforeUpdate`
BEFORE UPDATE ON `invoiceInCorrection`
FOR EACH ROW
BEGIN
CALL invoiceIn_checkBooked(OLD.correctingFk);
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceInCorrection_beforeDelete`
BEFORE DELETE ON `invoiceInCorrection`
FOR EACH ROW
BEGIN
CALL invoiceIn_checkBooked(OLD.correctingFk);
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceInDueDay_beforeInsert` /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceInDueDay_beforeInsert`
BEFORE INSERT ON `invoiceInDueDay` BEFORE INSERT ON `invoiceInDueDay`
FOR EACH ROW FOR EACH ROW
BEGIN BEGIN
DECLARE vIsNotified BOOLEAN; DECLARE vIsNotified BOOLEAN;
CALL invoiceIn_checkBooked(NEW.invoiceInFk);
SET NEW.editorFk = account.myUser_getId(); SET NEW.editorFk = account.myUser_getId();
SELECT isNotified INTO vIsNotified SELECT isNotified INTO vIsNotified
@ -5529,7 +5487,6 @@ DELIMITER ;;
BEGIN BEGIN
DECLARE vIsNotified BOOLEAN; DECLARE vIsNotified BOOLEAN;
CALL invoiceIn_checkBooked(OLD.invoiceInFk);
SET NEW.editorFk = account.myUser_getId(); SET NEW.editorFk = account.myUser_getId();
SELECT isNotified INTO vIsNotified SELECT isNotified INTO vIsNotified
@ -5566,26 +5523,6 @@ DELIMITER ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; /*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;; DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceInDueDay_beforeDelete`
BEFORE DELETE ON `invoiceInDueDay`
FOR EACH ROW
BEGIN
CALL invoiceIn_checkBooked(OLD.invoiceInFk);
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceInDueDay_afterDelete` /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceInDueDay_afterDelete`
AFTER DELETE ON `invoiceInDueDay` AFTER DELETE ON `invoiceInDueDay`
FOR EACH ROW FOR EACH ROW
@ -5610,66 +5547,6 @@ DELIMITER ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; /*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;; DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceInIntrastat_beforeInsert`
BEFORE INSERT ON `invoiceInIntrastat`
FOR EACH ROW
BEGIN
CALL invoiceIn_checkBooked(NEW.invoiceInFk);
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceInIntrastat_beforeUpdate`
BEFORE UPDATE ON `invoiceInIntrastat`
FOR EACH ROW
BEGIN
CALL invoiceIn_checkBooked(OLD.invoiceInFk);
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceInIntrastat_beforeDelete`
BEFORE DELETE ON `invoiceInIntrastat`
FOR EACH ROW
BEGIN
CALL invoiceIn_checkBooked(OLD.invoiceInFk);
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceInTax_beforeInsert` /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceInTax_beforeInsert`
BEFORE INSERT ON `invoiceInTax` BEFORE INSERT ON `invoiceInTax`
FOR EACH ROW FOR EACH ROW
@ -5695,8 +5572,6 @@ DELIMITER ;;
BEFORE UPDATE ON `invoiceInTax` BEFORE UPDATE ON `invoiceInTax`
FOR EACH ROW FOR EACH ROW
BEGIN BEGIN
CALL invoiceIn_checkBooked(OLD.invoiceInFk);
IF NOT (NEW.invoiceInFk <=> OLD.invoiceInFk) THEN IF NOT (NEW.invoiceInFk <=> OLD.invoiceInFk) THEN
CALL invoiceInTax_afterUpsert(NEW.invoiceInFk); CALL invoiceInTax_afterUpsert(NEW.invoiceInFk);
END IF; END IF;
@ -5717,26 +5592,6 @@ DELIMITER ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ; /*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;; DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceInTax_beforeDelete`
BEFORE DELETE ON `invoiceInTax`
FOR EACH ROW
BEGIN
CALL invoiceIn_checkBooked(OLD.invoiceInFk);
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceInTax_afterDelete` /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceInTax_afterDelete`
AFTER DELETE ON `invoiceInTax` AFTER DELETE ON `invoiceInTax`
FOR EACH ROW FOR EACH ROW
@ -8459,8 +8314,8 @@ DELIMITER ;;
AFTER INSERT ON `solunionCAP` AFTER INSERT ON `solunionCAP`
FOR EACH ROW FOR EACH ROW
BEGIN BEGIN
UPDATE vn2008.Clientes c UPDATE client c
JOIN creditClassification cc ON c.Id_Cliente = cc.client JOIN creditClassification cc ON cc.client = c.id
JOIN creditInsurance ci ON ci.creditClassification = cc.id JOIN creditInsurance ci ON ci.creditClassification = cc.id
SET creditInsurance = ci.credit * 2 WHERE ci.id = NEW.creditInsurance; SET creditInsurance = ci.credit * 2 WHERE ci.id = NEW.creditInsurance;
END */;; END */;;
@ -8483,13 +8338,13 @@ DELIMITER ;;
FOR EACH ROW FOR EACH ROW
BEGIN BEGIN
IF NEW.dateLeaving IS NOT NULL THEN IF NEW.dateLeaving IS NOT NULL THEN
UPDATE vn2008.Clientes c UPDATE client c
JOIN creditClassification cc ON c.Id_Cliente = cc.client JOIN creditClassification cc ON cc.client = c.id
JOIN creditInsurance ci ON ci.creditClassification = cc.id JOIN creditInsurance ci ON ci.creditClassification = cc.id
SET creditInsurance = ci.credit WHERE ci.id = OLD.creditInsurance; SET creditInsurance = ci.credit WHERE ci.id = OLD.creditInsurance;
ELSE ELSE
UPDATE vn2008.Clientes c UPDATE client c
JOIN creditClassification cc ON c.Id_Cliente = cc.client JOIN creditClassification cc ON cc.client = c.id
JOIN creditInsurance ci ON ci.creditClassification = cc.id JOIN creditInsurance ci ON ci.creditClassification = cc.id
SET creditInsurance = ci.credit * 2 WHERE ci.id = OLD.creditInsurance; SET creditInsurance = ci.credit * 2 WHERE ci.id = OLD.creditInsurance;
END IF; END IF;
@ -8512,8 +8367,8 @@ DELIMITER ;;
BEFORE DELETE ON `solunionCAP` BEFORE DELETE ON `solunionCAP`
FOR EACH ROW FOR EACH ROW
BEGIN BEGIN
UPDATE vn2008.Clientes c UPDATE client c
JOIN creditClassification cc ON c.Id_Cliente = cc.client JOIN creditClassification cc ON cc.client = c.id
JOIN creditInsurance ci ON ci.creditClassification = cc.id JOIN creditInsurance ci ON ci.creditClassification = cc.id
SET creditInsurance = ci.credit WHERE ci.id = OLD.creditInsurance; SET creditInsurance = ci.credit WHERE ci.id = OLD.creditInsurance;
END */;; END */;;
@ -9539,7 +9394,7 @@ BEGIN
END IF; END IF;
IF NEW.attenderFk IS NULL THEN IF NEW.attenderFk IS NULL THEN
SET NEW.attenderFk = (SELECT w.id FROM worker w WHERE w.code = NEW.buyerCode); SET NEW.attenderFk = (SELECT defaultAttenderFk FROM ticketConfig LIMIT 1);
END IF; END IF;
END */;; END */;;
DELIMITER ; DELIMITER ;
@ -9569,10 +9424,6 @@ BEGIN
IF NEW.salesPersonCode <> OLD.salesPersonCode THEN IF NEW.salesPersonCode <> OLD.salesPersonCode THEN
SET NEW.requesterFk = (SELECT w.id FROM worker w WHERE w.code = NEW.salesPersonCode); SET NEW.requesterFk = (SELECT w.id FROM worker w WHERE w.code = NEW.salesPersonCode);
END IF; END IF;
IF NEW.buyerCode <> OLD.buyerCode THEN
SET NEW.attenderFk = (SELECT w.id FROM worker w WHERE w.code = NEW.buyerCode);
END IF;
END */;; END */;;
DELIMITER ; DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET sql_mode = @saved_sql_mode */ ;
@ -10954,4 +10805,4 @@ USE `vn2008`;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2024-05-07 5:48:41 -- Dump completed on 2024-05-14 6:26:46

View File

@ -162,7 +162,7 @@ INSERT INTO `vn`.`currency`(`id`, `code`, `name`, `ratio`)
(4, 'JPY', 'Yen Japones', 1), (4, 'JPY', 'Yen Japones', 1),
(5, 'CNY', 'Yuan Chino', 1.2); (5, 'CNY', 'Yuan Chino', 1.2);
INSERT INTO `vn`.`country`(`id`, `country`, `isUeeMember`, `code`, `currencyFk`, `ibanLength`, `continentFk`, `hasDailyInvoice`, `CEE`) INSERT INTO `vn`.`country`(`id`, `name`, `isUeeMember`, `code`, `currencyFk`, `ibanLength`, `continentFk`, `hasDailyInvoice`, `CEE`)
VALUES VALUES
(1, 'España', 1, 'ES', 1, 24, 4, 0, 1), (1, 'España', 1, 'ES', 1, 24, 4, 0, 1),
(2, 'Italia', 1, 'IT', 1, 27, 4, 0, 1), (2, 'Italia', 1, 'IT', 1, 27, 4, 0, 1),
@ -2549,20 +2549,20 @@ INSERT INTO `vn`.`duaEntry` (`duaFk`, `entryFk`, `value`, `customsValue`, `euroV
(7, 7, 1.00, 1.00, 1.00), (7, 7, 1.00, 1.00, 1.00),
(8, 8, 1.00, 1.00, 1.00); (8, 8, 1.00, 1.00, 1.00);
REPLACE INTO `vn`.`invoiceIn`(`id`, `serialNumber`,`serial`, `supplierFk`, `issued`, `created`, `supplierRef`, `isBooked`, `companyFk`, `docFk`) REPLACE INTO `vn`.`invoiceIn`(`id`, `serialNumber`,`serial`, `supplierFk`, `issued`, `created`, `supplierRef`, `isBooked`, `companyFk`, `docFk`, `bookEntried`)
VALUES VALUES
(1, 1001, 'R', 1, util.VN_CURDATE(), util.VN_CURDATE(), 1234, 0, 442, 1), (1, 1001, 'R', 1, util.VN_CURDATE(), util.VN_CURDATE(), 1234, 0, 442, 1,util.VN_CURDATE()),
(2, 1002, 'R', 1, util.VN_CURDATE(), util.VN_CURDATE(), 1235, 0, 442, 1), (2, 1002, 'R', 1, util.VN_CURDATE(), util.VN_CURDATE(), 1235, 0, 442, 1,util.VN_CURDATE()),
(3, 1003, 'R', 1, util.VN_CURDATE(), util.VN_CURDATE(), 1236, 0, 442, 1), (3, 1003, 'R', 1, util.VN_CURDATE(), util.VN_CURDATE(), 1236, 0, 442, 1,util.VN_CURDATE()),
(4, 1004, 'R', 1, util.VN_CURDATE(), util.VN_CURDATE(), 1237, 0, 442, 1), (4, 1004, 'R', 1, util.VN_CURDATE(), util.VN_CURDATE(), 1237, 0, 442, 1,util.VN_CURDATE()),
(5, 1005, 'R', 1, util.VN_CURDATE(), util.VN_CURDATE(), 1238, 0, 442, 1), (5, 1005, 'R', 1, util.VN_CURDATE(), util.VN_CURDATE(), 1238, 0, 442, 1,util.VN_CURDATE()),
(6, 1006, 'R', 2, util.VN_CURDATE(), util.VN_CURDATE(), 1239, 0, 442, 1), (6, 1006, 'R', 2, util.VN_CURDATE(), util.VN_CURDATE(), 1239, 0, 442, 1,util.VN_CURDATE()),
(7, 1007, 'R', 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1240, 0, 442, 1), (7, 1007, 'R', 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1240, 0, 442, 1,util.VN_CURDATE()),
(8, 1008, 'R', 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1241, 0, 442, 1), (8, 1008, 'R', 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1241, 0, 442, 1,util.VN_CURDATE()),
(9, 1009, 'R', 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1242, 0, 442, 1), (9, 1009, 'R', 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1242, 0, 442, 1,util.VN_CURDATE()),
(10, 1010, 'R', 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1243, 0, 442, 1); (10, 1010, 'R', 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1243, 0, 442, 1,util.VN_CURDATE());
INSERT INTO `vn`.`invoiceInConfig` (`id`, `retentionRate`, `retentionName`, `sageWithholdingFk`, `daysAgo`) INSERT INTO `vn`.`invoiceInConfig` (`id`, `retentionRate`, `retentionName`, `sageFarmerWithholdingFk`, `daysAgo`)
VALUES VALUES
(1, -2, '2% retention', 2, 45); (1, -2, '2% retention', 2, 45);
@ -3790,3 +3790,12 @@ INSERT INTO vn.workerTeam(id, team, workerFk)
INSERT INTO vn.workCenter (id, name, payrollCenterFk, counter, warehouseFk, street, geoFk, deliveryManAdjustment) INSERT INTO vn.workCenter (id, name, payrollCenterFk, counter, warehouseFk, street, geoFk, deliveryManAdjustment)
VALUES(100, 'workCenterOne', 1, NULL, 1, 'gotham', NULL, NULL); VALUES(100, 'workCenterOne', 1, NULL, 1, 'gotham', NULL, NULL);
UPDATE vn.locker SET workerFk = 1110 WHERE id = 147;
INSERT INTO `vn`.`ledgerCompany` SET
fiscalYear = YEAR(util.VN_CURDATE()),
bookEntry = 2;
INSERT INTO `vn`.`ledgerConfig` SET
maxTolerance = 0.01;

View File

@ -31,50 +31,43 @@ BEGIN
INTO vManaFromDays, vManaToDays INTO vManaFromDays, vManaToDays
FROM vn.salespersonConfig; FROM vn.salespersonConfig;
SELECT MAX(dated) SELECT MAX(dated) INTO vFromDated
INTO vFromDated
FROM vn.clientManaCache; FROM vn.clientManaCache;
DELETE DELETE FROM vn.clientManaCache
FROM vn.clientManaCache
WHERE dated = vFromDated; WHERE dated = vFromDated;
SELECT MAX(dated) SELECT MAX(dated) INTO vFromDated
INTO vFromDated
FROM vn.clientManaCache; FROM vn.clientManaCache;
IF ISNULL(vFromDated) THEN IF vFromDated IS NULL THEN
SELECT manaDateFrom SELECT manaDateFrom
INTO vFromDated INTO vFromDated
FROM vn.salespersonConfig; FROM vn.salespersonConfig;
END IF; END IF;
WHILE vFromDated + INTERVAL vManaToDays DAY < util.VN_CURDATE() DO WHILE vFromDated + INTERVAL vManaToDays DAY < util.VN_CURDATE() DO
SELECT SELECT vFromDated + INTERVAL vManaToDays DAY,
vFromDated + INTERVAL vManaToDays DAY,
vFromDated - INTERVAL vManaFromDays DAY vFromDated - INTERVAL vManaFromDays DAY
INTO INTO vToDated,
vToDated,
vForDeleteDated; vForDeleteDated;
DELETE FROM vn.clientManaCache DELETE FROM vn.clientManaCache
WHERE dated <= vForDeleteDated; WHERE dated <= vForDeleteDated;
INSERT INTO vn.clientManaCache(clientFk, mana, dated) INSERT INTO vn.clientManaCache(clientFk, mana, dated)
SELECT SELECT Id_Cliente,
Id_Cliente,
SUM(mana), SUM(mana),
vToDated vToDated
FROM FROM (
( SELECT a.clientFk Id_Cliente, s.quantity * sc.value mana
SELECT a.clientFk Id_Cliente, s.quantity * sc.value as mana
FROM vn.ticket t FROM vn.ticket t
JOIN vn.address a ON a.id = t.addressFk JOIN vn.address a ON a.id = t.addressFk
JOIN vn.sale s on s.ticketFk = t.id JOIN vn.sale s ON s.ticketFk = t.id
JOIN vn.saleComponent sc on sc.saleFk = s.id JOIN vn.saleComponent sc ON sc.saleFk = s.id
WHERE sc.componentFk IN (vManaAutoId, vManaId, vClaimManaId) WHERE sc.componentFk IN (vManaAutoId, vManaId, vClaimManaId)
AND t.shipped > vFromDated AND t.shipped > vFromDated
AND date(t.shipped) <= vToDated AND DATE(t.shipped) <= vToDated
UNION ALL UNION ALL
SELECT clientFk, - amountPaid SELECT clientFk, - amountPaid
FROM vn.receipt FROM vn.receipt

View File

@ -1,7 +1,8 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`sale_add`( CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`sale_add`(
IN vStarted DATE, IN vStarted DATE,
IN vEnded DATE) IN vEnded DATE
)
BEGIN BEGIN
/** /**
* Añade las ventas que se realizaron entre 2 fechas a la tabla bs.sale * Añade las ventas que se realizaron entre 2 fechas a la tabla bs.sale
@ -10,21 +11,13 @@ BEGIN
* @param vEnded Fecha de fin * @param vEnded Fecha de fin
* *
*/ */
DECLARE vLoopDate DATE;
DECLARE vLoopDateTime DATETIME;
IF vStarted < (util.VN_CURDATE() - INTERVAL 5 YEAR) OR vStarted > vEnded THEN IF vStarted < (util.VN_CURDATE() - INTERVAL 5 YEAR) OR vStarted > vEnded THEN
CALL util.throw('Wrong date'); CALL util.throw('Wrong date');
END IF; END IF;
SET vLoopDate = vStarted;
DELETE FROM sale DELETE FROM sale
WHERE dated BETWEEN vStarted AND vEnded; WHERE dated BETWEEN vStarted AND vEnded;
WHILE vLoopDate <= vEnded DO
SET vLoopDateTime = util.dayEnd(vLoopDate);
REPLACE sale( REPLACE sale(
saleFk, saleFk,
amount, amount,
@ -36,14 +29,14 @@ BEGIN
margin margin
)WITH calculatedSales AS( )WITH calculatedSales AS(
SELECT s.id saleFk, SELECT s.id saleFk,
SUM(IF(ct.isBase, s.quantity * sc.value, 0)) amount, CAST(SUM(IF(ct.isBase, s.quantity * sc.value, 0)) AS DECIMAL(10, 3)) amount,
SUM(IF(ct.isBase, 0, s.quantity * sc.value)) surcharge, CAST(SUM(IF(ct.isBase, 0, s.quantity * sc.value)) AS DECIMAL(10, 3)) surcharge,
s.total pvp, s.total,
DATE(t.shipped) dated, DATE(t.shipped) dated,
i.typeFk, i.typeFk,
t.clientFk, t.clientFk,
t.companyFk, t.companyFk,
SUM(IF(ct.isMargin, s.quantity * sc.value, 0 )) marginComponents CAST(SUM(IF(ct.isMargin, s.quantity * sc.value, 0 )) AS DECIMAL(10, 3)) marginComponents
FROM vn.ticket t FROM vn.ticket t
STRAIGHT_JOIN vn.sale s ON s.ticketFk = t.id STRAIGHT_JOIN vn.sale s ON s.ticketFk = t.id
JOIN vn.item i ON i.id = s.itemFk JOIN vn.item i ON i.id = s.itemFk
@ -52,7 +45,7 @@ BEGIN
JOIN vn.saleComponent sc ON sc.saleFk = s.id JOIN vn.saleComponent sc ON sc.saleFk = s.id
JOIN vn.component c ON c.id = sc.componentFk JOIN vn.component c ON c.id = sc.componentFk
JOIN vn.componentType ct ON ct.id = c.typeFk JOIN vn.componentType ct ON ct.id = c.typeFk
WHERE t.shipped BETWEEN vLoopDate AND vLoopDateTime WHERE t.shipped BETWEEN vStarted AND vEnded
AND s.quantity <> 0 AND s.quantity <> 0
AND ic.merchandise AND ic.merchandise
GROUP BY s.id GROUP BY s.id
@ -63,10 +56,9 @@ BEGIN
typeFk, typeFk,
clientFk, clientFk,
companyFk, companyFk,
marginComponents + amount + surcharge - pvp IF (marginComponents IS NULL,
0,
CAST(marginComponents + amount + surcharge - total AS DECIMAL(10, 3)))
FROM calculatedSales; FROM calculatedSales;
SET vLoopDate = vLoopDate + INTERVAL 1 DAY;
END WHILE;
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -34,7 +34,7 @@ BEGIN
vPrinterFk, vPrinterFk,
IFNULL(right(`t`.`routeFk`, 3),0), IFNULL(right(`t`.`routeFk`, 3),0),
if (@vVolume := vn.ticketTotalVolume(t.id) > 1.5, @vVolume, IFNULL( rm.beachFk, 0)), if (@vVolume := vn.ticketTotalVolume(t.id) > 1.5, @vVolume, IFNULL( rm.beachFk, 0)),
LEFT(IFNULL(et.description ,replace(`z`.`name`, 'ZONA ', 'Z')),14) truckName, LEFT(IFNULL(rs.description ,replace(`z`.`name`, 'ZONA ', 'Z')),14) truckName,
t.clientFk , t.clientFk ,
ifnull(c.mobile, ifnull(a.mobile, ifnull(c.phone, a.phone))), ifnull(c.mobile, ifnull(a.mobile, ifnull(c.phone, a.phone))),
LEFT(p.name, 20), LEFT(p.name, 20),
@ -46,7 +46,7 @@ BEGIN
JOIN vn.address a ON a.id = t.addressFk JOIN vn.address a ON a.id = t.addressFk
JOIN vn.province p ON p.id = a.provinceFk JOIN vn.province p ON p.id = a.provinceFk
LEFT JOIN vn.routesMonitor rm ON rm.routeFk = t.routeFk LEFT JOIN vn.routesMonitor rm ON rm.routeFk = t.routeFk
LEFT JOIN vn.expeditionTruck et ON et.id = rm.expeditionTruckFk LEFT JOIN vn.roadmapStop rs ON rs.id = rm.expeditionTruckFk
LEFT JOIN vn.beach b ON b.code = rm.beachFk LEFT JOIN vn.beach b ON b.code = rm.beachFk
LEFT JOIN vn.`zone`z ON z.id = t.zoneFk LEFT JOIN vn.`zone`z ON z.id = t.zoneFk
JOIN vn.agencyMode am ON t.agencyModeFk = am.id JOIN vn.agencyMode am ON t.agencyModeFk = am.id

View File

@ -23,22 +23,19 @@ BEGIN
DECLARE vXtraLongAgj INT; DECLARE vXtraLongAgj INT;
DECLARE vDefaultKlo INT; DECLARE vDefaultKlo INT;
SELECT SELECT usefulAuctionLeftSegmentLength,
ec.usefulAuctionLeftSegmentLength, standardBarcodeLength,
ec.standardBarcodeLength, floridayBarcodeLength,
ec.floridayBarcodeLength, floramondoBarcodeLength,
ec.floramondoBarcodeLength, defaultKlo
ec.defaultKlo INTO vUsefulAuctionLeftSegmentLength,
INTO
vUsefulAuctionLeftSegmentLength,
vStandardBarcodeLength, vStandardBarcodeLength,
vFloridayBarcodeLength, vFloridayBarcodeLength,
vFloramondoBarcodeLength, vFloramondoBarcodeLength,
vDefaultKlo vDefaultKlo
FROM edi.ektConfig ec; FROM ektConfig;
DROP TEMPORARY TABLE IF EXISTS tmp.ekt; CREATE OR REPLACE TEMPORARY TABLE tmp.ekt
CREATE TEMPORARY TABLE tmp.ekt
ENGINE = MEMORY ENGINE = MEMORY
SELECT id ektFk FROM ekt LIMIT 0; SELECT id ektFk FROM ekt LIMIT 0;
@ -46,14 +43,14 @@ BEGIN
WHEN LENGTH(vBarcode) <= vFloridayBarcodeLength THEN WHEN LENGTH(vBarcode) <= vFloridayBarcodeLength THEN
INSERT INTO tmp.ekt INSERT INTO tmp.ekt
SELECT id SELECT id
FROM edi.ektRecent e FROM ektRecent e
WHERE e.cps = vBarcode WHERE e.cps = vBarcode
OR e.batchNumber = vBarcode; OR e.batchNumber = vBarcode;
WHEN LENGTH(vBarcode) = vFloramondoBarcodeLength THEN WHEN LENGTH(vBarcode) = vFloramondoBarcodeLength THEN
INSERT INTO tmp.ekt INSERT INTO tmp.ekt
SELECT e.id SELECT e.id
FROM edi.ektRecent e FROM ektRecent e
WHERE e.pro = MID(vBarcode,2,6) WHERE e.pro = MID(vBarcode,2,6)
AND CAST(e.ptd AS SIGNED) = MID(vBarcode, 8, 5); AND CAST(e.ptd AS SIGNED) = MID(vBarcode, 8, 5);
@ -74,13 +71,15 @@ BEGIN
SELECT id SELECT id
FROM ekt FROM ekt
WHERE fec >= vFec - INTERVAL 1 DAY WHERE fec >= vFec - INTERVAL 1 DAY
AND (( AND (
vKlo = vDefaultKlo (vKlo = vDefaultKlo
AND (klo = vKlo OR klo IS NULL OR klo = 0) AND (klo = vKlo OR klo IS NULL OR klo = 0)
AND agj IN (vShortAgj, vLongAgj, vXtraLongAgj)) AND agj IN (vShortAgj, vLongAgj, vXtraLongAgj)
OR (klo = vKlo ) OR (
klo = vKlo
AND auction = vAuction AND auction = vAuction
AND agj = vShortAgj) AND agj = vShortAgj
)
) )
ORDER BY agj DESC, fec DESC ORDER BY agj DESC, fec DESC
LIMIT 1; LIMIT 1;
@ -91,9 +90,11 @@ BEGIN
IF NOT vIsFound THEN IF NOT vIsFound THEN
INSERT INTO tmp.ekt INSERT INTO tmp.ekt
SELECT id SELECT id
FROM edi.ektRecent e FROM ektRecent e
WHERE e.batchNumber WHERE e.batchNumber = LEFT(
= LEFT(vBarcode,vUsefulAuctionLeftSegmentLength) vBarcode,
vUsefulAuctionLeftSegmentLength
)
AND e.batchNumber > 0; AND e.batchNumber > 0;
SELECT COUNT(*) FROM tmp.ekt INTO vIsFound; SELECT COUNT(*) FROM tmp.ekt INTO vIsFound;
@ -103,7 +104,7 @@ BEGIN
IF NOT vIsFound THEN IF NOT vIsFound THEN
INSERT INTO tmp.ekt INSERT INTO tmp.ekt
SELECT id SELECT id
FROM edi.ektRecent e FROM ektRecent e
WHERE e.putOrderFk = vBarcode; WHERE e.putOrderFk = vBarcode;
SELECT COUNT(*) FROM tmp.ekt INTO vIsFound; SELECT COUNT(*) FROM tmp.ekt INTO vIsFound;
@ -113,13 +114,23 @@ BEGIN
IF NOT vIsFound THEN IF NOT vIsFound THEN
INSERT INTO tmp.ekt INSERT INTO tmp.ekt
SELECT id SELECT id
FROM edi.ektRecent e FROM ektRecent e
WHERE e.deliveryNumber WHERE e.deliveryNumber = MID(vBarcode, 4, 13)
= MID(vBarcode, 4, 13)
AND e.deliveryNumber > 0; AND e.deliveryNumber > 0;
SELECT COUNT(*) FROM tmp.ekt INTO vIsFound; SELECT COUNT(*) FROM tmp.ekt INTO vIsFound;
END IF; END IF;
-- Solo campo agj
IF NOT vIsFound THEN
INSERT INTO tmp.ekt
SELECT id
FROM ektRecent
WHERE agj = vShortAgj;
SELECT COUNT(*) FROM tmp.ekt INTO vIsFound;
END IF;
END CASE; END CASE;
IF vIsFound THEN IF vIsFound THEN

View File

@ -7,7 +7,7 @@ BEGIN
* *
* @param vJsonData The order data in json format * @param vJsonData The order data in json format
*/ */
INSERT INTO `order` REPLACE `order`
SET catalogueFk = JSON_UNQUOTE(JSON_EXTRACT(vJsonData, '$.customer.customerData.products[0].id')), SET catalogueFk = JSON_UNQUOTE(JSON_EXTRACT(vJsonData, '$.customer.customerData.products[0].id')),
customerName = JSON_UNQUOTE(JSON_EXTRACT(vJsonData, '$.customer.customerData.customerName')), customerName = JSON_UNQUOTE(JSON_EXTRACT(vJsonData, '$.customer.customerData.customerName')),
email = JSON_UNQUOTE(JSON_EXTRACT(vJsonData, '$.customer.customerData.email')), email = JSON_UNQUOTE(JSON_EXTRACT(vJsonData, '$.customer.customerData.email')),
@ -15,7 +15,8 @@ BEGIN
message= JSON_UNQUOTE(JSON_EXTRACT(vJsonData, '$.customer.customerData.message')), message= JSON_UNQUOTE(JSON_EXTRACT(vJsonData, '$.customer.customerData.message')),
deliveryName = JSON_UNQUOTE(JSON_EXTRACT(vJsonData, '$.customer.customerData.deliveryName')), deliveryName = JSON_UNQUOTE(JSON_EXTRACT(vJsonData, '$.customer.customerData.deliveryName')),
address = JSON_UNQUOTE(JSON_EXTRACT(vJsonData, '$.customer.customerData.address')), address = JSON_UNQUOTE(JSON_EXTRACT(vJsonData, '$.customer.customerData.address')),
deliveryPhone = JSON_UNQUOTE(JSON_EXTRACT(vJsonData, '$.customer.customerData.deliveryPhone')); deliveryPhone = JSON_UNQUOTE(JSON_EXTRACT(vJsonData, '$.customer.customerData.deliveryPhone')),
observations = JSON_UNQUOTE(JSON_EXTRACT(vJsonData, '$.customer.customerData.observations'));
SELECT LAST_INSERT_ID() orderFk; SELECT LAST_INSERT_ID() orderFk;
END$$ END$$

View File

@ -81,7 +81,7 @@ BEGIN
-- Código redundante -- Código redundante
DO vn.till_new( CALL vn.till_new(
vCustomer vCustomer
,vBank ,vBank
,vAmount / 100 ,vAmount / 100

View File

@ -12,7 +12,7 @@ AS SELECT `s`.`user_id` AS `id`,
`c`.`permit` AS `permit`, `c`.`permit` AS `permit`,
`c`.`type` AS `type`, `c`.`type` AS `type`,
`c`.`context` AS `context`, `c`.`context` AS `context`,
`c`.`incomingLimit` AS `incominglimit`, `c`.`call-limit` AS `call-limit`,
`c`.`pickupGroup` AS `pickupgroup`, `c`.`pickupGroup` AS `pickupgroup`,
`c`.`directMedia` AS `directmedia`, `c`.`directMedia` AS `directmedia`,
`c`.`insecure` AS `insecure`, `c`.`insecure` AS `insecure`,

View File

@ -53,7 +53,7 @@ BEGIN
IFNULL(c.street, ''), IFNULL(c.street, ''),
c.accountingAccount, c.accountingAccount,
@fi := IF(cu.code = LEFT(TRIM(c.fi), 2) AND c.isVies, MID(TRIM(c.fi), 3, LENGTH(TRIM(c.fi))-1), TRIM(c.fi)), @fi := IF(cu.code = LEFT(TRIM(c.fi), 2) AND c.isVies, MID(TRIM(c.fi), 3, LENGTH(TRIM(c.fi))-1), TRIM(c.fi)),
IF(c.isVies, CONCAT(cu.code, @fi ), TRIM(c.fi)), IF(c.isVies, CONCAT(IFNULL(cu.viesCode,cu.code), @fi ), TRIM(c.fi)),
IFNULL(c.postcode, ''), IFNULL(c.postcode, ''),
IFNULL(c.city, ''), IFNULL(c.city, ''),
IFNULL(pr.CodigoProvincia, ''), IFNULL(pr.CodigoProvincia, ''),
@ -91,7 +91,7 @@ BEGIN
IFNULL(s.street, ''), IFNULL(s.street, ''),
s.account, s.account,
@nif := IF(co.code = LEFT(TRIM(s.nif), 2), MID(TRIM(s.nif), 3, LENGTH(TRIM(s.nif))-1), TRIM(s.nif)), @nif := IF(co.code = LEFT(TRIM(s.nif), 2), MID(TRIM(s.nif), 3, LENGTH(TRIM(s.nif))-1), TRIM(s.nif)),
IF(s.isVies, CONCAT(co.code, @nif), TRIM(s.nif)), IF(s.isVies, CONCAT(IFNULL(co.viesCode,co.code), @nif), TRIM(s.nif)),
IFNULL(s.postCode,''), IFNULL(s.postCode,''),
IFNULL(s.city, ''), IFNULL(s.city, ''),
IFNULL(pr.CodigoProvincia, ''), IFNULL(pr.CodigoProvincia, ''),

View File

@ -15,14 +15,14 @@ BEGIN
DECLARE vDayMinute INT; DECLARE vDayMinute INT;
SELECT HOUR(IFNULL(et.ETD, z.`hour`)) * 60 + MINUTE(IFNULL(et.ETD, z.`hour`)) INTO vDayMinute SELECT HOUR(IFNULL(rs.ETD, z.`hour`)) * 60 + MINUTE(IFNULL(rs.ETD, z.`hour`)) INTO vDayMinute
FROM vn.expedition e FROM vn.expedition e
JOIN vn.ticket t ON e.ticketFk = t.id JOIN vn.ticket t ON e.ticketFk = t.id
JOIN vn.`zone` z ON z.id = t.zoneFk JOIN vn.`zone` z ON z.id = t.zoneFk
LEFT JOIN vn.route r ON r.id = t.routeFk LEFT JOIN vn.route r ON r.id = t.routeFk
LEFT JOIN vn.agencyMode am ON am.id = r.agencyModeFk LEFT JOIN vn.agencyMode am ON am.id = r.agencyModeFk
LEFT JOIN vn.routesMonitor rm ON t.routeFk = rm.routeFk LEFT JOIN vn.routesMonitor rm ON t.routeFk = rm.routeFk
LEFT JOIN vn.expeditionTruck et ON rm.expeditionTruckFk = et.id LEFT JOIN vn.roadmapStop rs ON rm.expeditionTruckFk = rs.id
WHERE e.id = vExpeditionFk; WHERE e.id = vExpeditionFk;
RETURN vDayMinute; RETURN vDayMinute;

View File

@ -296,8 +296,8 @@ BEGIN
SET @dm := (24 * 60) - 10; SET @dm := (24 * 60) - 10;
UPDATE vn.expeditionTruck et UPDATE vn.roadmapStop rs
SET et.eta = timestampadd(MINUTE ,@dm := 1 + @dm,util.VN_CURDATE()) SET rs.eta = timestampadd(MINUTE ,@dm := 1 + @dm,util.VN_CURDATE())
WHERE description LIKE 'PRU%' ; WHERE description LIKE 'PRU%' ;
DELETE FROM srt.movingLog ; DELETE FROM srt.movingLog ;

View File

@ -3,10 +3,10 @@ CREATE OR REPLACE DEFINER=`root`@`localhost`
VIEW `srt`.`bufferDayMinute` VIEW `srt`.`bufferDayMinute`
AS SELECT `b`.`id` AS `bufferFk`, AS SELECT `b`.`id` AS `bufferFk`,
`e`.`id` AS `expeditionFk`, `e`.`id` AS `expeditionFk`,
`srt`.`dayMinute`(IFNULL(`et`.`eta`, `z`.`hour`)) AS `dayMinute`, `srt`.`dayMinute`(IFNULL(`rs`.`eta`, `z`.`hour`)) AS `dayMinute`,
`e`.`position` AS `position`, `e`.`position` AS `position`,
IFNULL( IFNULL(
`et`.`eta`, `rs`.`eta`,
`util`.`VN_CURDATE`() + INTERVAL `srt`.`dayMinute`(`z`.`hour`) MINUTE `util`.`VN_CURDATE`() + INTERVAL `srt`.`dayMinute`(`z`.`hour`) MINUTE
) AS `ETD`, ) AS `ETD`,
`e2`.`ticketFk` AS `ticketFk`, `e2`.`ticketFk` AS `ticketFk`,
@ -34,7 +34,7 @@ FROM (
) )
LEFT JOIN `vn`.`routesMonitor` `rm` ON(`t`.`routeFk` = `rm`.`routeFk`) LEFT JOIN `vn`.`routesMonitor` `rm` ON(`t`.`routeFk` = `rm`.`routeFk`)
) )
LEFT JOIN `vn`.`expeditionTruck` `et` ON(`rm`.`expeditionTruckFk` = `et`.`id`) LEFT JOIN `vn`.`roadmapStop` `rs` ON(`rm`.`expeditionTruckFk` = `rs`.`id`)
) )
LEFT JOIN `vn`.`zone` `z` ON(`z`.`id` = `t`.`zoneFk`) LEFT JOIN `vn`.`zone` `z` ON(`z`.`id` = `t`.`zoneFk`)
) )

View File

@ -4,22 +4,22 @@ CREATE OR REPLACE DEFINER=`root`@`localhost`
AS SELECT `e`.`id` AS `expeditionFk`, AS SELECT `e`.`id` AS `expeditionFk`,
`e`.`bufferFk` AS `bufferFk`, `e`.`bufferFk` AS `bufferFk`,
`e`.`position` AS `position`, `e`.`position` AS `position`,
`srt`.`dayMinute`(IFNULL(`et`.`eta`, `z`.`hour`)) AS `dayMinute`, `srt`.`dayMinute`(IFNULL(`rs`.`eta`, `z`.`hour`)) AS `dayMinute`,
IFNULL( IFNULL(
`et`.`eta`, `rs`.`eta`,
`util`.`VN_CURDATE`() + INTERVAL `srt`.`dayMinute`(`z`.`hour`) + 120 MINUTE `util`.`VN_CURDATE`() + INTERVAL `srt`.`dayMinute`(`z`.`hour`) + 120 MINUTE
) AS `eta`, ) AS `eta`,
`ve`.`ticketFk` AS `ticketFk`, `ve`.`ticketFk` AS `ticketFk`,
IFNULL(`t`.`routeFk`, `t`.`agencyModeFk`) AS `routeFk`, IFNULL(`t`.`routeFk`, `t`.`agencyModeFk`) AS `routeFk`,
`z`.`name` AS `zonaTicket`, `z`.`name` AS `zonaTicket`,
`et`.`description` AS `truck`, `rs`.`description` AS `truck`,
`es`.`description` AS `expeditionState`, `es`.`description` AS `expeditionState`,
`b`.`hasWorkerWaiting` AS `hasWorkerWaiting`, `b`.`hasWorkerWaiting` AS `hasWorkerWaiting`,
`b`.`isActive` AS `isActive`, `b`.`isActive` AS `isActive`,
IF( IF(
`et`.`id` IS NULL, `rs`.`id` IS NULL,
`c`.`bufferDefault`, `c`.`bufferDefault`,
`et`.`bufferFk` `rs`.`bufferFk`
) AS `bufferTruck`, ) AS `bufferTruck`,
`bt`.`typeName` AS `typeName`, `bt`.`typeName` AS `typeName`,
`rm`.`bufferFk` AS `routeBuffer` `rm`.`bufferFk` AS `routeBuffer`
@ -45,7 +45,7 @@ FROM (
) )
LEFT JOIN `vn`.`routesMonitor` `rm` ON(`t`.`routeFk` = `rm`.`routeFk`) LEFT JOIN `vn`.`routesMonitor` `rm` ON(`t`.`routeFk` = `rm`.`routeFk`)
) )
LEFT JOIN `vn`.`expeditionTruck` `et` ON(`rm`.`expeditionTruckFk` = `et`.`id`) LEFT JOIN `vn`.`roadmapStop` `rs` ON(`rm`.`expeditionTruckFk` = `rs`.`id`)
) )
JOIN `srt`.`config` `c` JOIN `srt`.`config` `c`
) )

View File

@ -4,13 +4,13 @@ CREATE OR REPLACE DEFINER=`root`@`localhost`
AS SELECT `e`.`id` AS `expeditionFk`, AS SELECT `e`.`id` AS `expeditionFk`,
`e`.`id` MOD 10000 AS `expedition`, `e`.`id` MOD 10000 AS `expedition`,
IFNULL( IFNULL(
`et`.`eta`, `rs`.`eta`,
`util`.`VN_CURDATE`() + INTERVAL `srt`.`dayMinute`(`z`.`hour`) + 120 MINUTE `util`.`VN_CURDATE`() + INTERVAL `srt`.`dayMinute`(`z`.`hour`) + 120 MINUTE
) AS `ETD`, ) AS `ETD`,
`ve`.`ticketFk` AS `ticketFk`, `ve`.`ticketFk` AS `ticketFk`,
right(IFNULL(`t`.`routeFk`, `t`.`agencyModeFk`), 3) AS `routeFk`, right(IFNULL(`t`.`routeFk`, `t`.`agencyModeFk`), 3) AS `routeFk`,
`z`.`name` AS `zonaTicket`, `z`.`name` AS `zonaTicket`,
`et`.`description` AS `truck`, `rs`.`description` AS `truck`,
`epo`.`workerCode` AS `worker`, `epo`.`workerCode` AS `worker`,
`p`.`name` AS `labeler`, `p`.`name` AS `labeler`,
`ve`.`counter` AS `expeditionCounter`, `ve`.`counter` AS `expeditionCounter`,
@ -32,7 +32,7 @@ FROM (
) )
LEFT JOIN `vn`.`routesMonitor` `rm` ON(`t`.`routeFk` = `rm`.`routeFk`) LEFT JOIN `vn`.`routesMonitor` `rm` ON(`t`.`routeFk` = `rm`.`routeFk`)
) )
LEFT JOIN `vn`.`expeditionTruck` `et` ON(`rm`.`expeditionTruckFk` = `et`.`id`) LEFT JOIN `vn`.`roadmapStop` `rs` ON(`rm`.`expeditionTruckFk` = `rs`.`id`)
) )
JOIN `dipole`.`expedition_PrintOut` `epo` ON(`epo`.`expeditionFk` = `e`.`id`) JOIN `dipole`.`expedition_PrintOut` `epo` ON(`epo`.`expeditionFk` = `e`.`id`)
) )

View File

@ -0,0 +1,8 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`client_userDisable`
ON SCHEDULE EVERY 1 MONTH
STARTS '2023-06-01 00:00:00.000'
ON COMPLETION PRESERVE
ENABLE
DO CALL client_userDisable()$$
DELIMITER ;

View File

@ -1,21 +0,0 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`clientsDisable`
ON SCHEDULE EVERY 1 MONTH
STARTS '2023-06-01 00:00:00.000'
ON COMPLETION PRESERVE
ENABLE
DO BEGIN
UPDATE account.user u
JOIN client c ON c.id = u.id
SET u.active = FALSE
WHERE c.typeFk = 'normal'
AND u.id NOT IN (
SELECT DISTINCT c.id
FROM client c
LEFT JOIN ticket t ON t.clientFk = c.id
WHERE c.salesPersonFk IS NOT NULL
OR t.created > util.VN_CURDATE() - INTERVAL 2 MONTH
OR shipped > util.VN_CURDATE() - INTERVAL 2 MONTH
);
END$$
DELIMITER ;

View File

@ -0,0 +1,28 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`sale_hasComponentLack`(
vSelf INT
)RETURNS tinyint(1)
READS SQL DATA
BEGIN
/**
* Check if a sales line has all the required components.
*
* @param vSelf Id de sale
* @return BOOL
*/
DECLARE vHasComponentLack TINYINT(1);
WITH componentRequired AS(
SELECT COUNT(*) total
FROM vn.component
WHERE isRequired
)SELECT SUM(IF(c.isRequired, TRUE, FALSE)) <> cr.total INTO vHasComponentLack
FROM vn.sale s
JOIN componentRequired cr
LEFT JOIN vn.saleComponent sc ON sc.saleFk = s.id
LEFT JOIN vn.component c ON c.id = sc.componentFk
WHERE s.id = vSelf;
RETURN vHasComponentLack;
END$$
DELIMITER ;

View File

@ -0,0 +1,25 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`ticket_isTooLittle`(
vSelf INT
)
RETURNS tinyint(1)
READS SQL DATA
BEGIN
/**
* Check if the ticket is small based on the volume and amount parameters.
*
* @param vSelf Id ticket
* @return BOOL
*/
DECLARE vIsTooLittle TINYINT(1);
SELECT (SUM(IFNULL(sv.litros, 0)) < vc.minTicketVolume
OR IFNULL(t.totalWithoutVat, 0) < vc.minTicketValue) INTO vIsTooLittle
FROM ticket t
LEFT JOIN saleVolume sv ON sv.ticketFk = t.id
JOIN volumeConfig vc
WHERE t.id = vSelf;
RETURN vIsTooLittle;
END$$
DELIMITER ;

View File

@ -1,79 +1,73 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`till_new`(vClient INT CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`till_new`(
,vBank INT vClient INT,
,vAmount DOUBLE vBank INT,
,vConcept VARCHAR(25) vAmount DOUBLE,
,vDated DATE vConcept VARCHAR(25),
,vSerie CHAR(1) vDated DATE,
,vBatch TINYINT vSerie CHAR(1),
,vNumber INT vBatch TINYINT,
,vCompany SMALLINT vNumber INT,
,vWorker INT vCompany SMALLINT,
vWorker INT
) )
RETURNS int(11)
DETERMINISTIC
BEGIN BEGIN
DECLARE vAccount VARCHAR(12); DECLARE vAccount VARCHAR(12);
DECLARE vSubaccount VARCHAR(12); DECLARE vSubaccount VARCHAR(12);
DECLARE vAsiento INT DEFAULT NULL; DECLARE vAsiento INT DEFAULT NULL;
-- Inserta el registro en cajas -- Inserta el registro en cajas
INSERT INTO till INSERT INTO till
SET SET
workerFk = vWorker workerFk = vWorker,
,bankFk = vBank bankFk = vBank,
,`in` = vAmount `in` = vAmount,
,concept = vConcept concept = vConcept,
,dated = vDated dated = vDated,
,serie = vSerie serie = vSerie,
,isAccountable = vBatch isAccountable = vBatch,
,`number` = vNumber `number` = vNumber,
,companyFk = vCompany; companyFk = vCompany;
-- Inserta los asientos contables -- Inserta los asientos contables
SELECT account INTO vAccount SELECT account INTO vAccount
FROM accounting WHERE id = vBank; FROM accounting WHERE id = vBank;
SELECT accountingAccount INTO vSubaccount SELECT accountingAccount INTO vSubaccount
FROM `client` WHERE id = vClient; FROM `client` WHERE id = vClient;
SET vAsiento = xdiario_new CALL xdiario_new(
( vAsiento,
vAsiento vDated,
,vDated vAccount,
,vAccount vSubaccount,
,vSubaccount vConcept,
,vConcept vAmount,
,vAmount 0,
,0 0,
,0 NULL, -- Serie
,NULL -- Serie NULL, -- Factura
,NULL -- Factura NULL, -- IVA
,NULL -- IVA NULL, -- Recargo
,NULL -- Recargo FALSE, -- Auxiliar
,FALSE -- Auxiliar vCompany,
,vCompany vAsiento);
);
DO xdiario_new
(
vAsiento
,vDated
,vSubaccount
,vAccount
,vConcept
,0
,vAmount
,0
,NULL -- Serie
,NULL -- Factura
,NULL -- IVA
,NULL -- Recargo
,FALSE -- Auxiliar
,vCompany
);
RETURN NULL; CALL xdiario_new(
vAsiento,
vDated,
vSubaccount,
vAccount,
vConcept,
0,
vAmount,
0,
NULL, -- Serie
NULL, -- Factura
NULL, -- IVA
NULL, -- Recargo
FALSE, -- Auxiliar
vCompany,
vAsiento);
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -1,44 +0,0 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`xdiario_new`(vAsiento INT,
vDated DATE,
vSubaccount VARCHAR(12),
vAccount VARCHAR(12),
vConcept VARCHAR(25),
vDebit DOUBLE,
vCredit DOUBLE,
vEuro DOUBLE,
vSerie CHAR(1),
vInvoice VARCHAR(8),
vVat DOUBLE,
vRe DOUBLE,
vAux TINYINT,
vCompany INT
)
RETURNS int(11)
NOT DETERMINISTIC
NO SQL
BEGIN
IF vAsiento IS NULL THEN
CALL vn.ledger_next(vAsiento);
END IF;
INSERT INTO XDiario
SET ASIEN = vAsiento,
FECHA = vDated,
SUBCTA = vSubaccount,
CONTRA = vAccount,
CONCEPTO = vConcept,
EURODEBE = vDebit,
EUROHABER = vCredit,
BASEEURO = vEuro,
SERIE = vSerie,
FACTURA = vInvoice,
IVA = vVat,
RECEQUIV = vRe,
AUXILIAR = IF(vAux = FALSE, NULL, '*'),
MONEDAUSO = 2,
empresa_id = vCompany;
RETURN vAsiento;
END$$
DELIMITER ;

View File

@ -9,7 +9,7 @@ BEGIN
DECLARE vEnded DATETIME DEFAULT util.dayEnd(util.VN_CURDATE()); DECLARE vEnded DATETIME DEFAULT util.dayEnd(util.VN_CURDATE());
SELECT ag.id agency_id, SELECT ag.id agency_id,
CONCAT(RPAD(c.country, 16,' _') ,' ',ag.name) Agencia, CONCAT(RPAD(c.name, 16,' _') ,' ',ag.name) Agencia,
COUNT(*) expediciones, COUNT(*) expediciones,
SUM(t.packages) Bultos, SUM(t.packages) Bultos,
SUM(tpe.boxes) Faltan SUM(tpe.boxes) Faltan

View File

@ -1,10 +1,11 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`balance_create`( CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`balance_create`(
IN vStartingMonth INT, vStartingMonth INT,
IN vEndingMonth INT, vEndingMonth INT,
IN vCompany INT, vCompany INT,
IN vIsConsolidated BOOLEAN, vIsConsolidated BOOLEAN,
IN vInterGroupSalesIncluded BOOLEAN) vInterGroupSalesIncluded BOOLEAN
)
BEGIN BEGIN
/** /**
* Crea un balance financiero para una empresa durante * Crea un balance financiero para una empresa durante

View File

@ -0,0 +1,57 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_clone`(vEntryFk INT)
BEGIN
/**
* Clone buys to an entry
*
* @param vEntryFk The entry id
* @table tmp.buy(id)
*/
INSERT INTO buy(
entryFk,
itemFk,
quantity,
buyingValue,
freightValue,
isIgnored,
stickers,
packagingFk,
packing,
`grouping`,
groupingMode,
comissionValue,
packageValue,
price1,
price2,
price3,
minPrice,
isChecked,
location,
weight,
itemOriginalFk)
SELECT vEntryFk,
b.itemFk,
b.quantity,
b.buyingValue,
b.freightValue,
b.isIgnored,
b.stickers,
b.packagingFk,
b.packing,
b.`grouping`,
b.groupingMode,
b.comissionValue,
b.packageValue,
b.price1,
b.price2,
b.price3,
b.minPrice,
b.isChecked,
b.location,
b.weight,
b.itemOriginalFk
FROM tmp.buy tb
JOIN vn.buy b ON b.id = tb.id;
END$$
DELIMITER ;

View File

@ -1,5 +1,7 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_recalcPricesByBuy`(IN vBuyFk INT(11)) CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_recalcPricesByBuy`(
vBuyFk INT(11)
)
BEGIN BEGIN
/** /**
* Recalcula los precios de una compra * Recalcula los precios de una compra

View File

@ -1,5 +1,7 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_recalcPricesByEntry`(IN vEntryFk INT(11)) CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_recalcPricesByEntry`(
vEntryFk INT(11)
)
BEGIN BEGIN
/** /**
* Recalcula los precios de una entrada * Recalcula los precios de una entrada

View File

@ -259,7 +259,7 @@ BEGIN
JOIN tmp.ticketComponentSum tcs ON tcs.itemFk = tcc.itemFk JOIN tmp.ticketComponentSum tcs ON tcs.itemFk = tcc.itemFk
AND tcs.warehouseFk = tcc.warehouseFk AND tcs.warehouseFk = tcc.warehouseFk
WHERE IFNULL(tcs.classRate, 1) = 1 WHERE IFNULL(tcs.classRate, 1) = 1
AND NOT tcc.groupingMode = 'packing' AND (tcc.groupingMode = 'grouping' OR tcc.groupingMode IS NULL)
AND (tcc.packing > tcc.`grouping` OR tcc.groupingMode IS NULL) AND (tcc.packing > tcc.`grouping` OR tcc.groupingMode IS NULL)
GROUP BY tcs.warehouseFk, tcs.itemFk; GROUP BY tcs.warehouseFk, tcs.itemFk;

View File

@ -86,7 +86,7 @@ BEGIN
WHERE cs.description = 'Anulado' WHERE cs.description = 'Anulado'
AND c.created < v2Months; AND c.created < v2Months;
DELETE FROM expeditionTruck WHERE eta < v3Months; DELETE FROM roadmapStop WHERE eta < v3Months;
DELETE FROM XDiario WHERE FECHA < v3Months OR FECHA IS NULL; DELETE FROM XDiario WHERE FECHA < v3Months OR FECHA IS NULL;
-- Borrar travels sin entradas -- Borrar travels sin entradas

View File

@ -22,7 +22,7 @@ BEGIN
c.credit, c.credit,
CAST(r.risk AS DECIMAL (10,2)) risk, CAST(r.risk AS DECIMAL (10,2)) risk,
CAST(c.credit - r.risk AS DECIMAL (10,2)) difference, CAST(c.credit - r.risk AS DECIMAL (10,2)) difference,
co.country co.name country
FROM client c FROM client c
JOIN tmp.risk r ON r.clientFk = c.id JOIN tmp.risk r ON r.clientFk = c.id
JOIN country co ON co.id = c.countryFk JOIN country co ON co.id = c.countryFk

View File

@ -0,0 +1,33 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`client_userDisable`()
BEGIN
/**
* Desactiva los clientes inactivos en los últimos X meses.
*/
DECLARE vMonths INT;
SELECT monthsToDisableUser INTO vMonths
FROM clientConfig;
IF vMonths IS NULL THEN
CALL util.throw('Config parameter not set');
END IF;
UPDATE account.user u
JOIN client c ON c.id = u.id
LEFT JOIN account.account a ON a.id = u.id
SET u.active = FALSE
WHERE c.typeFk = 'normal'
AND a.id IS NULL
AND u.active
AND c.created < util.VN_CURDATE() - INTERVAL vMonths MONTH
AND u.id NOT IN (
SELECT DISTINCT c.id
FROM client c
LEFT JOIN ticket t ON t.clientFk = c.id
WHERE c.salesPersonFk IS NOT NULL
OR t.created > util.VN_CURDATE() - INTERVAL vMonths MONTH
OR shipped > util.VN_CURDATE() - INTERVAL vMonths MONTH
);
END$$
DELIMITER ;

View File

@ -30,7 +30,10 @@ BEGIN
-- Si hay colecciones sin terminar, sale del proceso -- Si hay colecciones sin terminar, sale del proceso
CALL collection_get(vUserFk); CALL collection_get(vUserFk);
SELECT (pc.maxNotReadyCollections - COUNT(*)) <= 0 INTO vHasTooMuchCollections SELECT (pc.maxNotReadyCollections - COUNT(*)) <= 0,
collection_assign_lockname
INTO vHasTooMuchCollections,
vLockName
FROM productionConfig pc FROM productionConfig pc
LEFT JOIN tCollection ON TRUE; LEFT JOIN tCollection ON TRUE;

View File

@ -192,7 +192,8 @@ BEGIN
AND cr.companyFk = vp.companyFk AND cr.companyFk = vp.companyFk
LEFT JOIN supplierAccount sa ON sa.supplierFk = s.id LEFT JOIN supplierAccount sa ON sa.supplierFk = s.id
LEFT JOIN bankEntity be ON be.id = sa.bankEntityFk LEFT JOIN bankEntity be ON be.id = sa.bankEntityFk
LEFT JOIN country co ON co.id = be.countryFk; LEFT JOIN country co ON co.id = be.countryFk
GROUP BY vp.id;
DROP TEMPORARY TABLE tOpeningBalances; DROP TEMPORARY TABLE tOpeningBalances;
DROP TEMPORARY TABLE tPendingDuedates; DROP TEMPORARY TABLE tPendingDuedates;

View File

@ -24,7 +24,7 @@ BEGIN
10 * p.height as height, 10 * p.height as height,
IFNULL(t.routeFk,am.agencyFk) routeFk, IFNULL(t.routeFk,am.agencyFk) routeFk,
hour(e.created) * 60 + minute(e.created), hour(e.created) * 60 + minute(e.created),
IFNULL(et.description , a.name), IFNULL(rs.description , a.name),
IFNULL(t.routeFk,am.agencyFk) criterion, IFNULL(t.routeFk,am.agencyFk) criterion,
IFNULL(p.conveyorBuildingClassFk , pc.defaultConveyorBuildingClass) IFNULL(p.conveyorBuildingClassFk , pc.defaultConveyorBuildingClass)
FROM vn.expedition e FROM vn.expedition e
@ -34,7 +34,7 @@ BEGIN
LEFT JOIN vn.agencyMode am ON am.id = z.agencyModeFk LEFT JOIN vn.agencyMode am ON am.id = z.agencyModeFk
LEFT JOIN vn.agency a ON a.id = am.agencyFk LEFT JOIN vn.agency a ON a.id = am.agencyFk
LEFT JOIN vn.routesMonitor rm ON rm.routeFk = t.routeFk LEFT JOIN vn.routesMonitor rm ON rm.routeFk = t.routeFk
LEFT JOIN vn.expeditionTruck et ON et.id = rm.expeditionTruckFk LEFT JOIN vn.roadmapStop rs ON rs.id = rm.expeditionTruckFk
JOIN vn.packagingConfig pc JOIN vn.packagingConfig pc
WHERE t.warehouseFk IN (60,1,44) WHERE t.warehouseFk IN (60,1,44)
AND e.created BETWEEN vStarted AND vEnded AND e.created BETWEEN vStarted AND vEnded

View File

@ -27,7 +27,7 @@ BEGIN
cac.invoiced billedAnnually, cac.invoiced billedAnnually,
c.dueDay, c.dueDay,
cgd.grade, cgd.grade,
c2.country c2.name country
FROM tmp.clientGetDebt cgd FROM tmp.clientGetDebt cgd
LEFT JOIN tmp.risk r ON r.clientFk = cgd.clientFk LEFT JOIN tmp.risk r ON r.clientFk = cgd.clientFk
JOIN client c ON c.id = cgd.clientFk JOIN client c ON c.id = cgd.clientFk

View File

@ -28,8 +28,7 @@ BEGIN
JOIN entry e ON e.invoiceInFk = ii.id JOIN entry e ON e.invoiceInFk = ii.id
JOIN duaEntry de ON de.entryFk = e.id JOIN duaEntry de ON de.entryFk = e.id
JOIN dua d ON d.id = de.duaFk JOIN dua d ON d.id = de.duaFk
SET ii.isBooked = TRUE, SET ii.booked = IFNULL(ii.booked, d.booked),
ii.booked = IFNULL(ii.booked,d.booked),
ii.operated = IFNULL(ii.operated, d.operated), ii.operated = IFNULL(ii.operated, d.operated),
ii.issued = IFNULL(ii.issued, d.issued), ii.issued = IFNULL(ii.issued, d.issued),
ii.bookEntried = IFNULL(ii.bookEntried, d.bookEntried), ii.bookEntried = IFNULL(ii.bookEntried, d.bookEntried),
@ -71,5 +70,9 @@ BEGIN
SET ASIEN = vASIEN SET ASIEN = vASIEN
WHERE id = vDuaFk; WHERE id = vDuaFk;
UPDATE invoiceIn ii
JOIN duaInvoiceIn dii ON dii.invoiceInFk = ii.id
SET ii.isBooked = TRUE
WHERE dii.duaFk = vDuaFk;
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -6,16 +6,16 @@ BEGIN
DECLARE vDiff DECIMAL(10,2); DECLARE vDiff DECIMAL(10,2);
DECLARE vApunte BIGINT; DECLARE vApunte BIGINT;
SELECT ASIEN, IFNULL(bookEntried, util.VN_CURDATE()) INTO vBookNumber, vBookDated SELECT ASIEN, IFNULL(bookEntried, util.VN_CURDATE())
INTO vBookNumber, vBookDated
FROM dua FROM dua
WHERE id = vDuaFk; WHERE id = vDuaFk;
IF vBookNumber IS NULL OR NOT vBookNumber THEN IF vBookNumber IS NULL OR NOT vBookNumber THEN
CALL ledger_next(vBookNumber); CALL ledger_next(YEAR(vBookDated), vBookNumber);
END IF; END IF;
-- Apunte de la aduana -- Apunte de la aduana
INSERT INTO XDiario( INSERT INTO XDiario(
ASIEN, ASIEN,
FECHA, FECHA,
@ -26,9 +26,7 @@ BEGIN
empresa_id, empresa_id,
CLAVE, CLAVE,
FACTURA) FACTURA)
SELECT vBookNumber,
SELECT
vBookNumber,
d.bookEntried, d.bookEntried,
'4700000999', '4700000999',
CONCAT('DUA ',d.`code`), CONCAT('DUA ',d.`code`),
@ -42,7 +40,6 @@ BEGIN
WHERE dt.duaFk = vDuaFk; WHERE dt.duaFk = vDuaFk;
-- Apuntes por tipo de IVA y proveedor -- Apuntes por tipo de IVA y proveedor
INSERT INTO XDiario( INSERT INTO XDiario(
ASIEN, ASIEN,
FECHA, FECHA,
@ -70,16 +67,13 @@ BEGIN
TERNIF, TERNIF,
TERNOM, TERNOM,
empresa_id, empresa_id,
FECREGCON FECREGCON)
) SELECT vBookNumber ASIEN,
SELECT
vBookNumber ASIEN,
vBookDated FECHA, vBookDated FECHA,
tr.account SUBCTA, tr.account SUBCTA,
'4330002067' CONTRA, '4330002067' CONTRA,
sum(dt.tax) EURODEBE, SUM(dt.tax) EURODEBE,
sum(dt.base) BASEEURO, SUM(dt.base) BASEEURO,
CONCAT('DUA nº',d.code) CONCEPTO, CONCAT('DUA nº',d.code) CONCEPTO,
d.id FACTURA, d.id FACTURA,
dt.rate IVA, dt.rate IVA,
@ -131,6 +125,5 @@ BEGIN
UPDATE dua UPDATE dua
SET ASIEN = vBookNumber SET ASIEN = vBookNumber
WHERE id = vDuaFk; WHERE id = vDuaFk;
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -9,8 +9,8 @@ BEGIN
* Clones an entry header. * Clones an entry header.
* *
* @param vSelf The entry id * @param vSelf The entry id
* @param OUT vNewEntryFk The new entry id
* @param vTravelFk Travel for the new entry or %NULL to use the source entry travel * @param vTravelFk Travel for the new entry or %NULL to use the source entry travel
* @param vNewEntryFk The new entry id
*/ */
INSERT INTO entry( INSERT INTO entry(
travelFk, travelFk,

View File

@ -1,59 +1,18 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`entry_copyBuys`(vSelf INT, vCopyTo INT) CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`entry_copyBuys`(vSelf INT, vDestinationEntryFk INT)
BEGIN BEGIN
/** /**
* Copies an entry buys to another buy. * Copies all buys from an entry to an entry.
* *
* @param vSelf The entry id * @param vSelf The entry id
* @param vCopyTo The destination entry id * @param vDestinationEntryFk The destination entry id
*/ */
INSERT INTO buy( CREATE OR REPLACE TEMPORARY TABLE tmp.buy
entryFk, SELECT id
itemFk,
quantity,
buyingValue,
freightValue,
isIgnored,
stickers,
packing,
`grouping`,
groupingMode,
containerFk,
comissionValue,
packageValue,
packagingFk,
price1,
price2,
price3,
minPrice,
isChecked,
location,
weight,
itemOriginalFk
)
SELECT vCopyTo,
itemFk,
quantity,
buyingValue,
freightValue,
isIgnored,
stickers,
packing,
`grouping`,
groupingMode,
containerFk,
comissionValue,
packageValue,
packagingFk,
price1,
price2,
price3,
minPrice,
isChecked,
location,
weight,
itemOriginalFk
FROM buy FROM buy
WHERE entryFk = vSelf; WHERE entryFk = vSelf;
CALL buy_clone(vDestinationEntryFk);
DROP TEMPORARY TABLE tmp.buy;
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -26,7 +26,6 @@ BEGIN
packing, packing,
`grouping`, `grouping`,
groupingMode, groupingMode,
containerFk,
comissionValue, comissionValue,
packageValue, packageValue,
location, location,
@ -46,7 +45,6 @@ BEGIN
packing, packing,
`grouping`, `grouping`,
groupingMode, groupingMode,
containerFk,
comissionValue, comissionValue,
packageValue, packageValue,
location, location,

View File

@ -56,7 +56,6 @@ BEGIN
packing, packing,
`grouping`, `grouping`,
groupingMode, groupingMode,
containerFk,
comissionValue, comissionValue,
packageValue, packageValue,
packagingFk, packagingFk,
@ -77,7 +76,6 @@ BEGIN
packing, packing,
`grouping`, `grouping`,
groupingMode, groupingMode,
containerFk,
comissionValue, comissionValue,
packageValue, packageValue,
packagingFk, packagingFk,
@ -114,7 +112,6 @@ BEGIN
packing, packing,
`grouping`, `grouping`,
groupingMode, groupingMode,
containerFk,
comissionValue, comissionValue,
packageValue, packageValue,
location, location,
@ -133,7 +130,6 @@ BEGIN
packing, packing,
`grouping`, `grouping`,
groupingMode, groupingMode,
containerFk,
comissionValue, comissionValue,
packageValue, packageValue,
location, location,

View File

@ -76,7 +76,6 @@ BEGIN
packing, packing,
`grouping`, `grouping`,
groupingMode, groupingMode,
containerFk,
comissionValue, comissionValue,
packageValue, packageValue,
location, location,
@ -103,7 +102,6 @@ BEGIN
packing, packing,
`grouping`, `grouping`,
groupingMode, groupingMode,
containerFk,
comissionValue, comissionValue,
packageValue, packageValue,
location, location,

View File

@ -2,7 +2,7 @@ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expeditionTruck_Add`(vHour VARCHAR(5), vDescription VARCHAR(45)) CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expeditionTruck_Add`(vHour VARCHAR(5), vDescription VARCHAR(45))
BEGIN BEGIN
INSERT INTO vn.expeditionTruck(eta,description) INSERT INTO vn.roadmapStop(eta,description)
VALUES(CONCAT(util.VN_CURDATE(), ' ', vHour), vDescription); VALUES(CONCAT(util.VN_CURDATE(), ' ', vHour), vDescription);
END$$ END$$

View File

@ -5,7 +5,7 @@ BEGIN
SELECT id truckFk, SELECT id truckFk,
eta, eta,
description Destino description Destino
FROM expeditionTruck FROM roadmapStop
WHERE eta BETWEEN util.VN_CURDATE() AND util.dayend(util.VN_CURDATE()) WHERE eta BETWEEN util.VN_CURDATE() AND util.dayend(util.VN_CURDATE())
ORDER BY eta; ORDER BY eta;
END$$ END$$

View File

@ -53,8 +53,8 @@ BEGIN
am.name zonaRuta, am.name zonaRuta,
t.routeFk ruta, t.routeFk ruta,
rm.beachFk ubicacion, rm.beachFk ubicacion,
et.eta , rs.eta ,
et.description camion, rs.description camion,
vTicketsPendientes AS ticketsPendientes, vTicketsPendientes AS ticketsPendientes,
vEtiquetasTotales AS etiquetasTotales, vEtiquetasTotales AS etiquetasTotales,
vEtiquetasEscaneadas AS etiquetasEscaneadas, vEtiquetasEscaneadas AS etiquetasEscaneadas,
@ -67,7 +67,7 @@ BEGIN
LEFT JOIN vn.route r ON r.id = t.routeFk LEFT JOIN vn.route r ON r.id = t.routeFk
LEFT JOIN vn.agencyMode am ON am.id = r.agencyModeFk LEFT JOIN vn.agencyMode am ON am.id = r.agencyModeFk
LEFT JOIN vn.routesMonitor rm ON rm.routeFk = r.id LEFT JOIN vn.routesMonitor rm ON rm.routeFk = r.id
LEFT JOIN vn.expeditionTruck et ON et.id = rm.expeditionTruckFk LEFT JOIN vn.roadmapStop rs ON rs.id = rm.expeditionTruckFk
WHERE e.id = vExpeditionFk; WHERE e.id = vExpeditionFk;
END$$ END$$

View File

@ -37,8 +37,8 @@ BEGIN
am.name zonaRuta, am.name zonaRuta,
t.routeFk ruta, t.routeFk ruta,
rm.beachFk ubicacion, rm.beachFk ubicacion,
et.eta , rs.eta ,
et.description camion, rs.description camion,
vTicketsPendientes AS ticketsPendientes, vTicketsPendientes AS ticketsPendientes,
vEtiquetasTotales AS etiquetasTotales, vEtiquetasTotales AS etiquetasTotales,
vEtiquetasEscaneadas AS etiquetasEscaneadas vEtiquetasEscaneadas AS etiquetasEscaneadas
@ -50,7 +50,7 @@ BEGIN
LEFT JOIN vn.route r ON r.id = t.routeFk LEFT JOIN vn.route r ON r.id = t.routeFk
LEFT JOIN vn.agencyMode am ON am.id = r.agencyModeFk LEFT JOIN vn.agencyMode am ON am.id = r.agencyModeFk
LEFT JOIN vn.routesMonitor rm ON rm.routeFk = r.id LEFT JOIN vn.routesMonitor rm ON rm.routeFk = r.id
LEFT JOIN vn.expeditionTruck et ON et.id = rm.expeditionTruckFk LEFT JOIN vn.roadmapStop rs ON rs.id = rm.expeditionTruckFk
WHERE e.id = vExpeditionFk; WHERE e.id = vExpeditionFk;
END$$ END$$

View File

@ -1,101 +0,0 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`fv_pca`()
BEGIN
DECLARE done INT DEFAULT FALSE;
DECLARE vTicketFk INT;
DECLARE vSaleFk INT;
DECLARE vClonTicket INT DEFAULT 0;
DECLARE cur1 CURSOR FOR
SELECT s.ticketFk, s.id
FROM vn.sale s
JOIN vn.ticket t ON t.id = s.ticketFk
JOIN vn.item i ON i.id = s.itemFk
JOIN vn.itemType it ON it.id = i.typeFk
WHERE t.shipped BETWEEN '2020-10-18' AND '2020-10-31'
AND it.code IN ('ANT','ANS','ORQ','TRO')
and t.warehouseFk = 1;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
OPEN cur1;
FETCH cur1 INTO vTicketFk, vSaleFk;
WHILE done = 0 DO
SELECT t.id INTO vClonTicket
FROM vn.ticket t
JOIN (SELECT addressFk, shipped FROM vn.ticket WHERE id = vTicketFk) sub USING(addressFk, shipped)
WHERE t.warehouseFk = 44
LIMIT 1;
SELECT vTicketFk, vClonTicket;
IF vClonTicket = 0 THEN
INSERT INTO ticket (
clientFk,
shipped,
addressFk,
agencyModeFk,
nickname,
warehouseFk,
companyFk,
landed,
zoneFk,
zonePrice,
zoneBonus,
routeFk
)
SELECT
clientFk,
shipped,
addressFk,
agencyModeFk,
nickname,
44,
companyFk,
landed,
zoneFk,
zonePrice,
zoneBonus,
routeFk
FROM ticket
WHERE id = vTicketFk;
SET vClonTicket = LAST_INSERT_ID();
SELECT 'lstID', vClonTicket;
/*
INSERT INTO ticketObservation(ticketFk, observationTypeFk, description)
SELECT vTicketFk, ao.observationTypeFk, ao.description
FROM addressObservation ao
JOIN ticket t ON t.addressFk = ao.addressFk
WHERE t.id = vClonTicket;
*/
INSERT INTO ticketLog
SET originFk = vTicketFk, userFk = account.myUser_getId(), `action` = 'insert',
description = CONCAT('Ha creado el ticket:', ' ', vClonTicket, ' clonando el ', vTicketFk);
END IF;
UPDATE vn.sale
SET ticketFk = vClonTicket
WHERE id = vSaleFk;
SET vClonTicket = 0;
SET done = 0;
FETCH cur1 INTO vTicketFk, vSaleFk;
END WHILE;
CLOSE cur1;
END$$
DELIMITER ;

View File

@ -10,8 +10,6 @@ BEGIN
DECLARE vLines INT; DECLARE vLines INT;
DECLARE vHasDistinctTransactions INT; DECLARE vHasDistinctTransactions INT;
CALL invoiceIn_checkBooked(vInvoiceInFk);
SELECT taxRowLimit INTO vTaxRowLimit FROM invoiceInConfig; SELECT taxRowLimit INTO vTaxRowLimit FROM invoiceInConfig;
SELECT COUNT(*) INTO vLines SELECT COUNT(*) INTO vLines

View File

@ -1,26 +1,24 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceInTax_getFromEntries`(IN vInvoiceInFk INT) CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceInTax_getFromEntries`(
IN vInvoiceInFk INT
)
BEGIN BEGIN
DECLARE vRate DOUBLE DEFAULT 1; DECLARE vRate DOUBLE DEFAULT 1;
DECLARE vDated DATE;
DECLARE vExpenseFk VARCHAR(10); DECLARE vExpenseFk VARCHAR(10);
CALL invoiceIn_checkBooked(vInvoiceInFk); WITH rate AS(
SELECT MAX(rr.dated) dated, ii.currencyFk
SELECT MAX(rr.dated) INTO vDated FROM vn.invoiceIn ii
FROM referenceRate rr JOIN vn.referenceRate rr ON rr.currencyFk = ii.currencyFk
JOIN invoiceIn ii ON ii.id = vInvoiceInFk WHERE ii.id = vInvoiceInFk
WHERE rr.dated <= ii.issued AND rr.dated <= ii.issued
AND rr.currencyFk = ii.currencyFk ; ) SELECT `value` INTO vRate
FROM vn.referenceRate rr
IF vDated THEN JOIN rate r ON r.dated = rr.dated
SELECT `value` INTO vRate AND r.currencyFk = rr.currencyFk;
FROM referenceRate
WHERE dated = vDated;
END IF;
SELECT id INTO vExpenseFk SELECT id INTO vExpenseFk
FROM vn.expense FROM expense
WHERE `name` = 'Adquisición mercancia Extracomunitaria' WHERE `name` = 'Adquisición mercancia Extracomunitaria'
GROUP BY id GROUP BY id
LIMIT 1; LIMIT 1;
@ -28,19 +26,25 @@ BEGIN
DELETE FROM invoiceInTax DELETE FROM invoiceInTax
WHERE invoiceInFk = vInvoiceInFk; WHERE invoiceInFk = vInvoiceInFk;
INSERT INTO invoiceInTax(invoiceInFk, taxableBase, expenseFk, foreignValue, taxTypeSageFk, transactionTypeSageFk) INSERT INTO invoiceInTax(
SELECT ii.id, invoiceInFk,
SUM(b.buyingValue * b.quantity) / IFNULL(vRate,1) taxableBase, taxableBase,
expenseFk,
foreignValue,
taxTypeSageFk,
transactionTypeSageFk
)SELECT ii.id,
SUM(b.buyingValue * b.quantity) / vRate taxableBase,
vExpenseFk, vExpenseFk,
IF(ii.currencyFk = 1,NULL,SUM(b.buyingValue * b.quantity )) divisa, IF(ii.currencyFk = 1,
NULL,
SUM(b.buyingValue * b.quantity )),
taxTypeSageFk, taxTypeSageFk,
transactionTypeSageFk transactionTypeSageFk
FROM invoiceIn ii FROM invoiceIn ii
JOIN entry e ON e.invoiceInFk = ii.id JOIN entry e ON e.invoiceInFk = ii.id
JOIN supplier s ON s.id = e.supplierFk JOIN supplier s ON s.id = e.supplierFk
JOIN buy b ON b.entryFk = e.id JOIN buy b ON b.entryFk = e.id
LEFT JOIN referenceRate rr ON rr.currencyFk = ii.currencyFk
AND rr.dated = ii.issued
WHERE ii.id = vInvoiceInFk WHERE ii.id = vInvoiceInFk
HAVING taxableBase IS NOT NULL; HAVING taxableBase IS NOT NULL;
END$$ END$$

View File

@ -2,6 +2,7 @@ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceIn_booking`(vSelf INT) CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceIn_booking`(vSelf INT)
BEGIN BEGIN
DECLARE vBookNumber INT; DECLARE vBookNumber INT;
DECLARE vFiscalYear INT;
CREATE OR REPLACE TEMPORARY TABLE tInvoiceIn CREATE OR REPLACE TEMPORARY TABLE tInvoiceIn
ENGINE = MEMORY ENGINE = MEMORY
@ -56,7 +57,8 @@ BEGIN
LEFT JOIN sage.taxType tt ON tt.id = ti.CodigoIva LEFT JOIN sage.taxType tt ON tt.id = ti.CodigoIva
WHERE ii.id = vSelf; WHERE ii.id = vSelf;
CALL vn.ledger_next(vBookNumber); SELECT YEAR(bookEntried) INTO vFiscalYear FROM tInvoiceIn LIMIT 1;
CALL ledger_next(vFiscalYear, vBookNumber);
-- Apunte del proveedor -- Apunte del proveedor
INSERT INTO XDiario( INSERT INTO XDiario(

View File

@ -1,16 +1,18 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceOutBooking`(IN vInvoice INT) CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceOutBooking`(IN vInvoice INT)
BEGIN BEGIN
/* Asienta la factura emitida /**
* Asienta una factura emitida
* *
* param vInvoice factura_id * @param vInvoice Id invoiceOut
*/ */
DECLARE vBookNumber INT; DECLARE vBookNumber INT;
DECLARE vExpenseConcept VARCHAR(50); DECLARE vExpenseConcept VARCHAR(50);
DECLARE vSpainCountryFk INT; DECLARE vSpainCountryFk INT;
DECLARE vOldBookNumber INT; DECLARE vOldBookNumber INT;
DECLARE vFiscalYear INT;
SELECT id INTO vSpainCountryFk FROM country WHERE code = 'ES'; SELECT id INTO vSpainCountryFk FROM country WHERE `code` = 'ES';
SELECT ASIEN SELECT ASIEN
INTO vOldBookNumber INTO vOldBookNumber
@ -26,31 +28,30 @@ BEGIN
DROP TEMPORARY TABLE IF EXISTS rs; DROP TEMPORARY TABLE IF EXISTS rs;
CREATE TEMPORARY TABLE rs CREATE TEMPORARY TABLE rs
SELECT SELECT c.accountingAccount clientBookingAccount,
c.accountingAccount AS clientBookingAccount, io.amount totalAmount,
io.amount as totalAmount, CONCAT('n/fra ', io.ref) simpleConcept,
CONCAT('n/fra ', io.ref) as simpleConcept, CONCAT('n/fra ', io.ref, ' ', c.name) Concept,
CONCAT('n/fra ', io.ref, ' ', c.name) as Concept, io.serial SERIE,
io.serial AS SERIE, io.issued FECHA_EX,
io.issued AS FECHA_EX, io.issued FECHA_OP,
io.issued AS FECHA_OP, io.issued FECHA,
io.issued AS FECHA, 1 NFACTICK,
1 AS NFACTICK, IF(ic.correctingFk,'D','') TIPOOPE,
IF(ic.correctingFk,'D','') AS TIPOOPE, io.siiTrascendencyInvoiceOutFk TIPOCLAVE,
io.siiTrascendencyInvoiceOutFk AS TIPOCLAVE, io.cplusTaxBreakFk TIPOEXENCI,
io.cplusTaxBreakFk AS TIPOEXENCI, io.cplusSubjectOpFk TIPONOSUJE,
io.cplusSubjectOpFk AS TIPONOSUJE, io.siiTypeInvoiceOutFk TIPOFACT,
io.siiTypeInvoiceOutFk AS TIPOFACT, ic.cplusRectificationTypeFk TIPORECTIF,
ic.cplusRectificationTypeFk AS TIPORECTIF,
io.companyFk, io.companyFk,
RIGHT(io.ref, LENGTH(io.ref) - 1) AS invoiceNum, RIGHT(io.ref, LENGTH(io.ref) - 1) invoiceNum,
IF(c.countryFk = vSpainCountryFk, vSpainCountryFk, IF(ct.isUeeMember,2,4)) AS TERIDNIF, IF(c.countryFk = vSpainCountryFk, vSpainCountryFk, IF(ct.isUeeMember,2,4)) TERIDNIF,
CONCAT(IF(ct.isUeeMember AND c.countryFk <> vSpainCountryFk,ct.code,''),c.fi) AS TERNIF, CONCAT(IF(ct.isUeeMember AND c.countryFk <> vSpainCountryFk,ct.code,''),c.fi) TERNIF,
c.socialName AS TERNOM, c.socialName TERNOM,
ior.serial AS SERIE_RT, ior.serial SERIE_RT,
RIGHT(ior.ref, LENGTH(ior.ref) - 1) AS FACTU_RT, RIGHT(ior.ref, LENGTH(ior.ref) - 1) FACTU_RT,
ior.issued AS FECHA_RT, ior.issued FECHA_RT,
IF(ior.id,TRUE,FALSE) AS RECTIFICA IF(ior.id,TRUE,FALSE) RECTIFICA
FROM invoiceOut io FROM invoiceOut io
JOIN invoiceOutSerial ios ON ios.code = io.serial JOIN invoiceOutSerial ios ON ios.code = io.serial
JOIN client c ON c.id = io.clientFk JOIN client c ON c.id = io.clientFk
@ -59,8 +60,8 @@ BEGIN
LEFT JOIN invoiceOut ior ON ior.id = ic.correctedFk LEFT JOIN invoiceOut ior ON ior.id = ic.correctedFk
WHERE io.id = vInvoice; WHERE io.id = vInvoice;
CALL vn.ledger_next(vBookNumber); SELECT YEAR(FECHA) INTO vFiscalYear FROM rs LIMIT 1;
CALL ledger_next(vFiscalYear, vBookNumber);
-- Linea del cliente -- Linea del cliente
INSERT INTO XDiario( INSERT INTO XDiario(
ASIEN, ASIEN,
@ -70,17 +71,15 @@ BEGIN
CONCEPTO, CONCEPTO,
FECHA_EX, FECHA_EX,
FECHA_OP, FECHA_OP,
empresa_id empresa_id)
) SELECT vBookNumber,
SELECT
vBookNumber AS ASIEN,
rs.FECHA, rs.FECHA,
rs.clientBookingAccount AS SUBCTA, rs.clientBookingAccount,
rs.totalAmount AS EURODEBE, rs.totalAmount,
rs.simpleConcept AS CONCEPTO, rs.simpleConcept,
rs.FECHA_EX, rs.FECHA_EX,
rs.FECHA_OP, rs.FECHA_OP,
rs.companyFk AS empresa_id rs.companyFk
FROM rs; FROM rs;
-- Lineas de gasto -- Lineas de gasto
@ -93,18 +92,16 @@ BEGIN
CONCEPTO, CONCEPTO,
FECHA_EX, FECHA_EX,
FECHA_OP, FECHA_OP,
empresa_id empresa_id)
) SELECT vBookNumber,
SELECT
vBookNumber AS ASIEN,
rs.FECHA, rs.FECHA,
ioe.expenseFk AS SUBCTA, ioe.expenseFk,
rs.clientBookingAccount AS CONTRA, rs.clientBookingAccount,
ioe.amount AS EUROHABER, ioe.amount,
rs.Concept AS CONCEPTO, rs.Concept,
rs.FECHA_EX, rs.FECHA_EX,
rs.FECHA_OP, rs.FECHA_OP,
rs.companyFk AS empresa_id rs.companyFk
FROM rs FROM rs
JOIN invoiceOutExpense ioe JOIN invoiceOutExpense ioe
WHERE ioe.invoiceOutFk = vInvoice; WHERE ioe.invoiceOutFk = vInvoice;
@ -146,20 +143,18 @@ BEGIN
TIPONOSUJE, TIPONOSUJE,
TIPOFACT, TIPOFACT,
TIPORECTIF, TIPORECTIF,
empresa_id empresa_id)
) SELECT vBookNumber ASIEN,
SELECT
vBookNumber AS ASIEN,
rs.FECHA, rs.FECHA,
iot.pgcFk AS SUBCTA, iot.pgcFk SUBCTA,
rs.clientBookingAccount AS CONTRA, rs.clientBookingAccount CONTRA,
iot.vat AS EUROHABER, iot.vat EUROHABER,
iot.taxableBase AS BASEEURO, iot.taxableBase BASEEURO,
CONCAT(vExpenseConcept,' : ',rs.Concept) AS CONCEPTO, CONCAT(vExpenseConcept,' : ',rs.Concept) CONCEPTO,
rs.invoiceNum AS FACTURA, rs.invoiceNum FACTURA,
IF(pe2.equFk,0,pgc.rate) AS IVA, IF(pe2.equFk,0,pgc.rate) IVA,
IF(pe2.equFk,0,pgce.rate) AS RECEQUIV, IF(pe2.equFk,0,pgce.rate) RECEQUIV,
IF(pgc.mod347,'','*') AS AUXILIAR, IF(pgc.mod347,'','*') AUXILIAR,
rs.SERIE, rs.SERIE,
rs.SERIE_RT, rs.SERIE_RT,
rs.FACTU_RT, rs.FACTU_RT,
@ -172,13 +167,13 @@ BEGIN
rs.TERIDNIF, rs.TERIDNIF,
rs.TERNIF, rs.TERNIF,
rs.TERNOM, rs.TERNOM,
pgc.mod340 AS L340, pgc.mod340 L340,
pgc.siiTrascendencyInvoiceOutFk AS TIPOCLAVE, pgc.siiTrascendencyInvoiceOutFk TIPOCLAVE,
pgc.cplusTaxBreakFk as TIPOEXENCI, pgc.cplusTaxBreakFk TIPOEXENCI,
rs.TIPONOSUJE, rs.TIPONOSUJE,
rs.TIPOFACT, rs.TIPOFACT,
rs.TIPORECTIF, rs.TIPORECTIF,
rs.companyFk AS empresa_id rs.companyFk
FROM rs FROM rs
JOIN invoiceOutTax iot JOIN invoiceOutTax iot
JOIN pgc ON pgc.code = iot.pgcFk JOIN pgc ON pgc.code = iot.pgcFk

View File

@ -18,11 +18,12 @@ BEGIN
JOIN vn.parking p ON p.id = sh.parkingFk JOIN vn.parking p ON p.id = sh.parkingFk
JOIN vn.sector sc ON sc.id = p.sectorFk JOIN vn.sector sc ON sc.id = p.sectorFk
JOIN vn.warehouse w ON w.id = sc.warehouseFk JOIN vn.warehouse w ON w.id = sc.warehouseFk
WHERE sc.id = vSectorFk WHERE ish.visible > 0
AND ish.visible > 0
AND ish.itemFk = vItemFk AND ish.itemFk = vItemFk
GROUP BY ish.id GROUP BY ish.id
ORDER BY sh.priority DESC, ORDER BY
(sc.id = vSectorFk) DESC,
sh.priority DESC,
ish.created, ish.created,
p.pickingOrder; p.pickingOrder;
END$$ END$$

View File

@ -2,7 +2,7 @@ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelvingRadar`( CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelvingRadar`(
vSectorFk INT vSectorFk INT
) )
proc:BEGIN BEGIN
/** /**
* Calcula la información detallada respecto un sector. * Calcula la información detallada respecto un sector.
* *
@ -16,36 +16,23 @@ proc:BEGIN
DECLARE vSonSectorFk INT; DECLARE vSonSectorFk INT;
DECLARE vWorkerFk INT; DECLARE vWorkerFk INT;
SELECT s.workerFk SELECT s.workerFk INTO vWorkerFk
INTO vWorkerFk FROM sector s
FROM vn.sector s
WHERE s.id = vSectorFk; WHERE s.id = vSectorFk;
SELECT w.id, s.warehouseFk INTO vBuyerFk, vWarehouseFk
FROM vn.worker w
JOIN vn.sector s ON s.code = w.code
WHERE s.id = vSectorFk;
SELECT s.id INTO vSectorFk
FROM vn.sector s
WHERE s.warehouseFk = vWarehouseFk
AND s.isMain;
SELECT COUNT(*) INTO hasFatherSector SELECT COUNT(*) INTO hasFatherSector
FROM vn.sector FROM sector
WHERE sonFk = vSectorFk; WHERE sonFk = vSectorFk;
SELECT warehouseFk, sonFk INTO vWarehouseFk, vSonSectorFk SELECT warehouseFk, sonFk INTO vWarehouseFk, vSonSectorFk
FROM vn.sector FROM sector
WHERE id = vSectorFk; WHERE id = vSectorFk;
CALL cache.visible_refresh(vCalcVisibleFk, TRUE, vWarehouseFk); CALL cache.visible_refresh(vCalcVisibleFk, TRUE, vWarehouseFk);
CALL cache.available_refresh(vCalcAvailableFk, FALSE, vWarehouseFk, util.VN_CURDATE()); CALL cache.available_refresh(vCalcAvailableFk, FALSE, vWarehouseFk, util.VN_CURDATE());
DROP TEMPORARY TABLE IF EXISTS tmp.itemShelvingRadar;
IF hasFatherSector THEN IF hasFatherSector THEN
CREATE TEMPORARY TABLE tmp.itemShelvingRadar CREATE OR REPLACE TEMPORARY TABLE tItemShelvingRadar
(PRIMARY KEY (itemFk)) (PRIMARY KEY (itemFk))
ENGINE = MEMORY ENGINE = MEMORY
SELECT * SELECT *
@ -57,54 +44,74 @@ proc:BEGIN
IFNULL(a.available, 0) available, IFNULL(a.available, 0) available,
SUM(IF(s.sonFk = vSectorFk, IFNULL(iss.visible, 0), 0)) upstairs, SUM(IF(s.sonFk = vSectorFk, IFNULL(iss.visible, 0), 0)) upstairs,
SUM(IF(iss.sectorFk = vSectorFk, IFNULL(iss.visible, 0), 0)) downstairs, SUM(IF(iss.sectorFk = vSectorFk, IFNULL(iss.visible, 0), 0)) downstairs,
IF(it.isPackaging, NULL, IFNULL(v.visible,0)) as visible, IF(it.isPackaging, NULL, IFNULL(v.visible, 0)) visible,
vSectorFk sectorFk vSectorFk sectorFk,
FROM vn.itemShelvingStock iss ish.isChecked,
JOIN vn.sector s ON s.id = iss.sectorFk sub.isAllChecked
JOIN vn.item i on i.id = iss.itemFk FROM itemShelvingStock iss
JOIN vn.itemType it ON it.id = i.typeFk AND vBuyerFk IN (0,it.workerFk) JOIN itemShelving ish ON ish.shelvingFk = iss.shelvingFk
LEFT JOIN cache.available a ON a.item_id = iss.itemFk AND a.calc_id = vCalcAvailableFk LEFT JOIN (
LEFT JOIN cache.visible v ON v.item_id = iss.itemFk AND v.calc_id = vCalcVisibleFk SELECT itemFk,
IF(
COUNT(*) = SUM(IF(isChecked >= 0, 1, 0)),
TRUE,
FALSE
) isAllChecked
FROM itemShelving is2
GROUP BY itemFk
) sub ON sub.itemFk = ish.itemFk
JOIN sector s ON s.id = iss.sectorFk
JOIN item i ON i.id = iss.itemFk
JOIN itemType it ON it.id = i.typeFk
LEFT JOIN cache.available a ON a.item_id = iss.itemFk
AND a.calc_id = vCalcAvailableFk
LEFT JOIN cache.visible v ON v.item_id = iss.itemFk
AND v.calc_id = vCalcVisibleFk
WHERE vSectorFk IN (iss.sectorFk, s.sonFk) WHERE vSectorFk IN (iss.sectorFk, s.sonFk)
GROUP BY iss.itemFk GROUP BY iss.itemFk
UNION ALL UNION ALL
SELECT v.item_id, SELECT v.item_id,
i.longName, i.longName,
i.size, i.size,
i.subName producer, i.subName,
IFNULL(a.available,0) as available, IFNULL(a.available, 0),
0 upstairs, 0,
0 downstairs, 0,
IF(it.isPackaging, NULL, v.visible) visible, IF(it.isPackaging, NULL, v.visible),
vSectorFk as sectorFk vSectorFk,
NULL,
NULL
FROM cache.visible v FROM cache.visible v
JOIN vn.item i on i.id = v.item_id JOIN item i ON i.id = v.item_id
JOIN vn.itemType it ON it.id = i.typeFk AND vBuyerFk IN (0,it.workerFk) JOIN itemType it ON it.id = i.typeFk
LEFT JOIN vn.itemShelvingStock iss ON iss.itemFk = v.item_id AND iss.warehouseFk = vWarehouseFk LEFT JOIN itemShelvingStock iss ON iss.itemFk = v.item_id
LEFT JOIN cache.available a ON a.item_id = v.item_id AND a.calc_id = vCalcAvailableFk AND iss.warehouseFk = vWarehouseFk
LEFT JOIN cache.available a ON a.item_id = v.item_id
AND a.calc_id = vCalcAvailableFk
WHERE v.calc_id = vCalcVisibleFk WHERE v.calc_id = vCalcVisibleFk
AND iss.itemFk IS NULL AND iss.itemFk IS NULL
AND it.isInventory AND it.isInventory
) sub GROUP BY itemFk; ) sub
GROUP BY itemFk;
SELECT ishr.*, SELECT ishr.*,
CAST(visible - upstairs - downstairs AS DECIMAL(10,0)) AS nicho, CAST(visible - upstairs - downstairs AS DECIMAL(10, 0)) nicho,
CAST(downstairs - IFNULL(notPickedYed,0) AS DECIMAL(10,0)) as pendiente CAST(downstairs - IFNULL(notPickedYed, 0) AS DECIMAL(10, 0)) pendiente
FROM tmp.itemShelvingRadar ishr FROM tItemShelvingRadar ishr
JOIN vn.item i ON i.id = ishr.itemFk JOIN item i ON i.id = ishr.itemFk
LEFT JOIN (SELECT s.itemFk, sum(s.quantity) as notPickedYed LEFT JOIN (
FROM vn.ticket t SELECT s.itemFk, SUM(s.quantity) notPickedYed
JOIN vn.ticketStateToday tst ON tst.ticketFk = t.id FROM ticket t
JOIN vn.sale s ON s.ticketFk = t.id JOIN ticketStateToday tst ON tst.ticketFk = t.id
JOIN alertLevel al ON al.id = tst.alertLevel
JOIN sale s ON s.ticketFk = t.id
WHERE t.warehouseFk = vWarehouseFk WHERE t.warehouseFk = vWarehouseFk
AND tst.alertLevel = 0 AND al.code = 'FREE'
GROUP BY s.itemFk GROUP BY s.itemFk
) sub ON sub.itemFk = ishr.itemFk ) sub ON sub.itemFk = ishr.itemFk
ORDER BY i.typeFk, i.longName; ORDER BY i.typeFk, i.longName;
ELSE ELSE
CREATE TEMPORARY TABLE tmp.itemShelvingRadar CREATE OR REPLACE TEMPORARY TABLE tItemShelvingRadar
(PRIMARY KEY (itemFk)) (PRIMARY KEY (itemFk))
ENGINE = MEMORY ENGINE = MEMORY
SELECT iss.itemFk, SELECT iss.itemFk,
@ -125,70 +132,76 @@ proc:BEGIN
IFNULL(v.visible, 0) visible, IFNULL(v.visible, 0) visible,
b.isPickedOff, b.isPickedOff,
iss.sectorFk iss.sectorFk
FROM vn.itemShelvingStock iss FROM itemShelvingStock iss
JOIN vn.item i on i.id = iss.itemFk JOIN item i ON i.id = iss.itemFk
LEFT JOIN cache.last_buy lb ON lb.item_id = iss.itemFk AND lb.warehouse_id = vWarehouseFk LEFT JOIN cache.last_buy lb ON lb.item_id = iss.itemFk
LEFT JOIN vn.buy b ON b.id = lb.buy_id AND lb.warehouse_id = vWarehouseFk
LEFT JOIN cache.available a ON a.item_id = iss.itemFk AND a.calc_id = vCalcAvailableFk LEFT JOIN buy b ON b.id = lb.buy_id
LEFT JOIN cache.visible v ON v.item_id = iss.itemFk AND v.calc_id = vCalcVisibleFk LEFT JOIN cache.available a ON a.item_id = iss.itemFk
LEFT JOIN (SELECT itemFk, sum(saldo) as onTheWay AND a.calc_id = vCalcAvailableFk
FROM vn.itemPlacementSupplyList LEFT JOIN cache.visible v ON v.item_id = iss.itemFk
AND v.calc_id = vCalcVisibleFk
LEFT JOIN (
SELECT itemFk, SUM(saldo) onTheWay
FROM itemPlacementSupplyList
WHERE saldo > 0 WHERE saldo > 0
GROUP BY itemFk GROUP BY itemFk
) ips ON ips.itemFk = i.id ) ips ON ips.itemFk = i.id
WHERE IFNULL(iss.sectorFk,0) IN (0, vSectorFk) WHERE iss.sectorFk = vSectorFk
OR iss.sectorFk = vSectorFk; OR iss.sectorFk IS NULL;
DROP TEMPORARY TABLE IF EXISTS tmp.itemOutTime; CREATE OR REPLACE TEMPORARY TABLE tmp.itemOutTime
CREATE TEMPORARY TABLE tmp.itemOutTime
SELECT *, SUM(amount) quantity SELECT *, SUM(amount) quantity
FROM FROM (
(SELECT io.itemFk, SELECT io.itemFk,
io.quantity amount, io.quantity amount,
IF(HOUR(t.shipped), HOUR(t.shipped), HOUR(z.`hour`)) as hours, IF(HOUR(t.shipped), HOUR(t.shipped), HOUR(z.`hour`)) `hours`,
IF(MINUTE(t.shipped), MINUTE(t.shipped), MINUTE(z.`hour`)) as minutes IF(MINUTE(t.shipped), MINUTE(t.shipped), MINUTE(z.`hour`)) `minutes`
FROM itemTicketOut io FROM itemTicketOut `io`
JOIN tmp.itemShelvingRadar isr ON isr.itemFk = io.itemFk JOIN tItemShelvingRadar isr ON isr.itemFk = io.itemFk
JOIN vn.ticket t on t.id= io.ticketFk JOIN ticket t ON t.id= io.ticketFk
JOIN vn.ticketState ts on ts.ticketFk = io.ticketFk JOIN ticketState ts ON ts.ticketFk = io.ticketFk
JOIN vn.state s ON s.id = ts.stateFk JOIN `state` s ON s.id = ts.stateFk
LEFT JOIN vn.zone z ON z.id = t.zoneFk LEFT JOIN `zone` z ON z.id = t.zoneFk
LEFT JOIN (SELECT DISTINCT saleFk LEFT JOIN (
FROM vn.saleTracking st SELECT DISTINCT saleFk
FROM saleTracking st
WHERE st.created > util.VN_CURDATE() WHERE st.created > util.VN_CURDATE()
AND st.isChecked AND st.isChecked
) stPrevious ON `stPrevious`.`saleFk` = io.saleFk ) stPrevious ON stPrevious.saleFk = io.saleFk
WHERE t.warehouseFk = vWarehouseFk WHERE t.warehouseFk = vWarehouseFk
AND s.isPicked = 0 AND NOT s.isPicked
AND NOT io.reserved AND NOT io.reserved
AND stPrevious.saleFk IS NULL AND stPrevious.saleFk IS NULL
AND io.shipped >= util.VN_CURDATE() AND io.shipped >= util.VN_CURDATE()
AND io.shipped < util.VN_CURDATE() + INTERVAL 1 DAY AND io.shipped < util.VN_CURDATE() + INTERVAL 1 DAY
) sub ) sub
GROUP BY itemFk, hours, minutes; GROUP BY itemFk, `hours`, `minutes`;
INSERT INTO tmp.itemShelvingRadar (itemFk) INSERT INTO tItemShelvingRadar (itemFk)
SELECT itemFk FROM tmp.itemOutTime SELECT itemFk FROM tmp.itemOutTime
ON DUPLICATE KEY UPDATE dayEndVisible = dayEndVisible + quantity, ON DUPLICATE KEY UPDATE dayEndVisible = dayEndVisible + quantity,
firstNegative = if (firstNegative < 0, firstNegative, firstNegative + quantity), firstNegative = IF(firstNegative < 0, firstNegative, firstNegative + quantity),
`hour` = ifnull(if (firstNegative > 0 , `hour`, hours),0), `hour` = IFNULL(IF(firstNegative > 0 , `hour`, `hours`), 0),
`minute` = ifnull(if (firstNegative > 0, `minute`, minutes),0); `minute` = IFNULL(IF(firstNegative > 0, `minute`, `minutes`), 0);
UPDATE tmp.itemShelvingRadar isr UPDATE tItemShelvingRadar isr
JOIN (SELECT s.itemFk, sum(s.quantity) amount JOIN (
SELECT s.itemFk, SUM(s.quantity) amount
FROM sale s FROM sale s
JOIN ticket t ON t.id = s.ticketFk JOIN ticket t ON t.id = s.ticketFk
JOIN ticketLastState tls ON tls.ticketFk = t.id JOIN ticketState ts ON ts.ticketFk = t.id
WHERE t.shipped BETWEEN util.VN_CURDATE() AND util.dayend(util.VN_CURDATE()) WHERE t.shipped BETWEEN util.VN_CURDATE() AND util.dayend(util.VN_CURDATE())
AND tls.name = 'Prep Camara' AND ts.code = 'COOLER_PREPARATION'
GROUP BY s.itemFk) sub ON sub.itemFk = isr.itemFk GROUP BY s.itemFk
) sub ON sub.itemFk = isr.itemFk
SET isr.dayEndVisible = dayEndVisible + sub.amount, SET isr.dayEndVisible = dayEndVisible + sub.amount,
firstNegative = firstNegative + sub.amount; firstNegative = firstNegative + sub.amount;
SELECT * FROM tmp.itemShelvingRadar; SELECT * FROM tItemShelvingRadar;
END IF; END IF;
DROP TEMPORARY TABLE tmp.itemShelvingRadar; DROP TEMPORARY TABLE tItemShelvingRadar;
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -20,8 +20,11 @@ BEGIN
SELECT barcodeToItem(vBarcode) INTO vItemFk; SELECT barcodeToItem(vBarcode) INTO vItemFk;
SET vPacking = COALESCE(vPacking, GREATEST(vn.itemPacking(vBarcode,vWarehouseFk), 1)); IF vPacking IS NULL
THEN
SET vPacking = itemPacking(vBarcode, vWarehouseFk);
SET vQuantity = vQuantity * vPacking; SET vQuantity = vQuantity * vPacking;
END IF;
IF (SELECT COUNT(*) FROM itemShelving IF (SELECT COUNT(*) FROM itemShelving
WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk

View File

@ -0,0 +1,55 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelving_getItemDetails`(
vBarcodeItem INT,
vShelvingFK VARCHAR(10)
)
BEGIN
/**
* Obtiene el precio y visible de un item
*
* @param vBarcodeItem barcode de artículo
* @param vShelvingFK Ubicación actual del artículo
*/
DECLARE vIsItem BOOL;
DECLARE vBuyFk INT;
DECLARE vWarehouseFk INT;
SELECT COUNT(*) > 0 INTO vIsItem
FROM item
WHERE id = vBarcodeItem;
IF vIsItem THEN
SELECT warehouseFk INTO vWarehouseFk
FROM operator
WHERE workerFk = account.myUser_getId();
CALL buyUltimate(vWarehouseFk, util.VN_CURDATE());
SELECT buyFk INTO vBuyFk
FROM tmp.buyUltimate
WHERE itemFk = vBarcodeItem
AND warehouseFk = vWarehouseFk;
DELETE FROM tmp.buyUltimate;
ELSE
SELECT vBarcodeItem INTO vBuyFk;
END IF;
WITH visible AS(
SELECT itemFk,
IFNULL(buyingValue, 0) +
IFNULL(freightValue, 0) +
IFNULL(comissionValue, 0) +
IFNULL(packageValue, 0) itemCost
FROM vn.buy b
WHERE b.id = vBuyFk
) SELECT v.itemFk,
vShelvingFK,
v.itemCost,
SUM(ish.visible) visible
FROM vn.itemShelving ish
JOIN visible v
WHERE ish.shelvingFK = vShelvingFK COLLATE utf8mb3_general_ci
AND ish.itemFk = v.itemFk;
END$$
DELIMITER ;

View File

@ -1,56 +0,0 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemTrash`(
vItemFk INT,
vWarehouseFk INT,
vQuantity INT,
vIsTrash BOOLEAN)
BEGIN
DECLARE vTicketFk INT;
DECLARE vClientFk INT;
DECLARE vCompanyVnlFk INT DEFAULT 442;
DECLARE vCalc INT;
SELECT barcodeToItem(vItemFk) INTO vItemFk;
SELECT IF(vIsTrash, 200, 400) INTO vClientFk;
SELECT t.id INTO vTicketFk
FROM ticket t
JOIN address a ON a.id=t.addressFk
WHERE t.warehouseFk = vWarehouseFk
AND t.clientFk = vClientFk
AND DATE(t.shipped) = util.VN_CURDATE()
AND a.isDefaultAddress
LIMIT 1;
CALL cache.visible_refresh(vCalc, TRUE, vWarehouseFk);
IF vTicketFk IS NULL THEN
CALL ticket_add(
vClientFk,
util.VN_CURDATE(),
vWarehouseFk,
vCompanyVnlFk,
NULL,
NULL,
NULL,
util.VN_CURDATE(),
account.myUser_getId(),
FALSE,
vTicketFk);
END IF;
INSERT INTO sale(ticketFk, itemFk, concept, quantity)
SELECT vTicketFk,
vItemFk,
CONCAT(longName,' ',worker_getCode(), ' ', LEFT(CAST(util.VN_NOW() AS TIME),5)),
vQuantity
FROM item
WHERE id = vItemFk;
UPDATE cache.visible
SET visible = visible - vQuantity
WHERE calc_id = vCalc
AND item_id = vItemFk;
END$$
DELIMITER ;

View File

@ -23,7 +23,6 @@ proc: BEGIN
* @param tmp.comparativeFilterType(filterFk INT ,itemTypeFk INT) * @param tmp.comparativeFilterType(filterFk INT ,itemTypeFk INT)
* @return tmp.comparative * @return tmp.comparative
*/ */
DECLARE vDayRangeStart DATE; DECLARE vDayRangeStart DATE;
DECLARE vDayRangeEnd DATE; DECLARE vDayRangeEnd DATE;
DECLARE w1, w2, w3, w4, w5, w6, w7 INT; DECLARE w1, w2, w3, w4, w5, w6, w7 INT;
@ -59,14 +58,14 @@ proc: BEGIN
END IF; END IF;
SELECT MIN(dated) INTO vDayRangeStart SELECT MIN(dated) INTO vDayRangeStart
FROM vn.time FROM `time`
WHERE dated <= vDate WHERE dated <= vDate
GROUP BY period GROUP BY period
ORDER BY dated desc ORDER BY dated desc
LIMIT 1 OFFSET vWeekRange; LIMIT 1 OFFSET vWeekRange;
SELECT MAX(dated) INTO vDayRangeEnd SELECT MAX(dated) INTO vDayRangeEnd
FROM vn.time FROM `time`
WHERE dated >= vDate WHERE dated >= vDate
GROUP BY period GROUP BY period
ORDER BY dated ASC ORDER BY dated ASC
@ -83,12 +82,11 @@ proc: BEGIN
JOIN itemType t ON t.id = i.typeFk JOIN itemType t ON t.id = i.typeFk
JOIN itemCategory c ON c.id = t.categoryFk JOIN itemCategory c ON c.id = t.categoryFk
LEFT JOIN worker w ON w.id = t.workerFk LEFT JOIN worker w ON w.id = t.workerFk
WHERE (NOT vHasTypeFilter WHERE (NOT vHasTypeFilter OR t.id IN (
OR t.id IN (SELECT itemTypeFk FROM tmp.comparativeFilterType)) SELECT itemTypeFk FROM tmp.comparativeFilterType
AND (vBuyerFk IS NULL ))
OR t.workerFk = vBuyerFk) AND (vBuyerFk IS NULL OR t.workerFk = vBuyerFk)
AND (vIsFloramondo IS NULL AND (vIsFloramondo IS NULL OR i.isFloramondo = vIsFloramondo);
OR i.isFloramondo = vIsFloramondo);
IF vDate < util.VN_CURDATE() THEN IF vDate < util.VN_CURDATE() THEN
ALTER TABLE tmp.itemInventory ALTER TABLE tmp.itemInventory
@ -115,10 +113,11 @@ proc: BEGIN
SET i = i + 1; SET i = i + 1;
SELECT t.period INTO vPeriod SELECT t.period INTO vPeriod
FROM vn.`time` t FROM `time` t
WHERE t.dated = vDayRangeStart + INTERVAL (vWeekCount * (i - 1)) DAY; WHERE t.dated = vDayRangeStart + INTERVAL (vWeekCount * (i - 1)) DAY;
INSERT IGNORE INTO tTable(cy, ly, zy) VALUES(vPeriod, vPeriod - 100, vPeriod - 200); INSERT IGNORE INTO tTable(cy, ly, zy)
VALUES(vPeriod, vPeriod - 100, vPeriod - 200);
UNTIL i = vWeekCount END REPEAT; UNTIL i = vWeekCount END REPEAT;
SELECT cy, ly, zy INTO w1, y1, z1 FROM tTable LIMIT 1; SELECT cy, ly, zy INTO w1, y1, z1 FROM tTable LIMIT 1;
@ -130,7 +129,6 @@ proc: BEGIN
SELECT cy, ly, zy INTO w7, y7, z7 FROM tTable WHERE cy > w6 LIMIT 1; SELECT cy, ly, zy INTO w7, y7, z7 FROM tTable WHERE cy > w6 LIMIT 1;
-- Genera una tabla con los datos del año pasado. -- Genera una tabla con los datos del año pasado.
CREATE OR REPLACE TEMPORARY TABLE tLastYear CREATE OR REPLACE TEMPORARY TABLE tLastYear
(KEY (lItemFk)) (KEY (lItemFk))
ENGINE = MEMORY ENGINE = MEMORY
@ -151,15 +149,14 @@ proc: BEGIN
SUM(IF(c.timePeriod = y7, c.price, 0)) lprice7 SUM(IF(c.timePeriod = y7, c.price, 0)) lprice7
FROM tmp.itemInventory ai FROM tmp.itemInventory ai
JOIN comparative c ON c.itemFk = ai.id JOIN comparative c ON c.itemFk = ai.id
JOIN warehouse w on w.id = c.warehouseFk JOIN warehouse w ON w.id = c.warehouseFk
JOIN tTable wt ON c.timePeriod = wt.ly JOIN tTable wt ON c.timePeriod = wt.ly
WHERE IFNULL(vWarehouseFk, c.warehouseFk) = c.warehouseFk WHERE (vWarehouseFk IS NULL OR vWarehouseFk = c.warehouseFk)
AND w.isComparative AND w.isComparative
AND (vCountryFk IS NULL OR c.countryFk = vCountryFk) AND (vCountryFk IS NULL OR c.countryFk = vCountryFk)
GROUP BY ai.id; GROUP BY ai.id;
-- Genera una tabla con los datos de hace DOS años. -- Genera una tabla con los datos de hace 2 años
CREATE OR REPLACE TEMPORARY TABLE tTwoYearsAgo CREATE OR REPLACE TEMPORARY TABLE tTwoYearsAgo
(KEY (tItemFk)) (KEY (tItemFk))
ENGINE = MEMORY ENGINE = MEMORY
@ -180,59 +177,58 @@ proc: BEGIN
SUM(IF(c.timePeriod = z7, c.price, 0)) vlprice7 SUM(IF(c.timePeriod = z7, c.price, 0)) vlprice7
FROM tmp.itemInventory ai FROM tmp.itemInventory ai
JOIN comparative c ON c.itemFk = ai.id JOIN comparative c ON c.itemFk = ai.id
JOIN warehouse w on w.id = c.warehouseFk JOIN warehouse w ON w.id = c.warehouseFk
JOIN tTable wt ON c.timePeriod = wt.zy JOIN tTable wt ON c.timePeriod = wt.zy
WHERE IFNULL(vWarehouseFk, c.warehouseFk) = c.warehouseFk WHERE (vWarehouseFk IS NULL OR vWarehouseFk = c.warehouseFk)
AND w.isComparative AND w.isComparative
AND (vCountryFk IS NULL OR c.countryFk = vCountryFk) AND (vCountryFk IS NULL OR c.countryFk = vCountryFk)
GROUP BY ai.id; GROUP BY ai.id;
-- Genera una tabla con los datos de este año.ss -- Genera una tabla con los datos de este año
CREATE OR REPLACE TEMPORARY TABLE tCurrentYear CREATE OR REPLACE TEMPORARY TABLE tCurrentYear
(KEY (cItemFk)) (KEY (cItemFk))
ENGINE = MEMORY ENGINE = MEMORY
SELECT t.itemFk cItemFk, SELECT t.itemFk cItemFk,
SUM(IF(week = w1, total, 0)) cweek1, SUM(IF(`week` = w1, total, 0)) cweek1,
SUM(IF(week = w2, total, 0)) cweek2, SUM(IF(`week` = w2, total, 0)) cweek2,
SUM(IF(week = w3, total, 0)) cweek3, SUM(IF(`week` = w3, total, 0)) cweek3,
SUM(IF(week = w4, total, 0)) cweek4, SUM(IF(`week` = w4, total, 0)) cweek4,
SUM(IF(week = w5, total, 0)) cweek5, SUM(IF(`week` = w5, total, 0)) cweek5,
SUM(IF(week = w6, total, 0)) cweek6, SUM(IF(`week` = w6, total, 0)) cweek6,
SUM(IF(week = w7, total, 0)) cweek7, SUM(IF(`week` = w7, total, 0)) cweek7,
SUM(IF(week = w1, price, 0)) cprice1, SUM(IF(`week` = w1, price, 0)) cprice1,
SUM(IF(week = w2, price, 0)) cprice2, SUM(IF(`week` = w2, price, 0)) cprice2,
SUM(IF(week = w3, price, 0)) cprice3, SUM(IF(`week` = w3, price, 0)) cprice3,
SUM(IF(week = w4, price, 0)) cprice4, SUM(IF(`week` = w4, price, 0)) cprice4,
SUM(IF(week = w5, price, 0)) cprice5, SUM(IF(`week` = w5, price, 0)) cprice5,
SUM(IF(week = w6, price, 0)) cprice6, SUM(IF(`week` = w6, price, 0)) cprice6,
SUM(IF(week = w7, price, 0)) cprice7 SUM(IF(`week` = w7, price, 0)) cprice7
FROM ( FROM (
SELECT s.itemFk, SELECT s.itemFk,
ti.period `week`, ti.period `week`,
SUM(s.quantity) total, SUM(s.quantity) total,
TRUNCATE(SUM(s.quantity * s.priceFixed), 0) price TRUNCATE(SUM(s.quantity * s.priceFixed), 0) price
FROM ticket t FROM ticket t FORCE INDEX (Fecha)
JOIN sale s ON t.id = s.ticketFk JOIN sale s ON t.id = s.ticketFk
JOIN tmp.itemInventory it ON it.id = s.itemFk JOIN tmp.itemInventory it ON it.id = s.itemFk
JOIN time ti ON ti.dated = DATE(t.shipped) JOIN `time` ti ON ti.dated = DATE(t.shipped)
JOIN item i ON i.id = s.itemFk JOIN item i ON i.id = s.itemFk
JOIN itemType tp ON tp.id = i.typeFk JOIN itemType tp ON tp.id = i.typeFk
JOIN itemCategory ic ON ic.id = tp.categoryFk JOIN itemCategory ic ON ic.id = tp.categoryFk
JOIN warehouse w ON w.id = t.warehouseFk JOIN warehouse w ON w.id = t.warehouseFk
STRAIGHT_JOIN address ad ON ad.id = t.addressFk JOIN `address` ad ON ad.id = t.addressFk
JOIN province p ON p.id = ad.provinceFk JOIN province p ON p.id = ad.provinceFk
JOIN `client` c ON c.id = ad.clientFk JOIN `client` c ON c.id = ad.clientFk
WHERE t.shipped BETWEEN vDayRangeStart AND util.dayEnd(vDayRangeEnd) WHERE t.shipped BETWEEN vDayRangeStart AND util.dayEnd(vDayRangeEnd)
AND c.typeFk IN ('Normal','handMaking') AND c.typeFk IN ('normal', 'handMaking')
AND w.id = COALESCE(vWarehouseFk, w.id) AND (vWarehouseFk IS NULL OR vWarehouseFk = w.id)
AND w.isComparative
AND (vCountryFk IS NULL OR p.countryFk = vCountryFk) AND (vCountryFk IS NULL OR p.countryFk = vCountryFk)
GROUP BY i.id, week AND w.isComparative
GROUP BY i.id, `week`
) t ) t
GROUP BY t.itemFk; GROUP BY t.itemFk;
-- Genera la tabla con la comparativa. -- Genera la tabla con la comparativa
CREATE OR REPLACE TEMPORARY TABLE tmp.comparative CREATE OR REPLACE TEMPORARY TABLE tmp.comparative
ENGINE = MEMORY ENGINE = MEMORY
SELECT it.subName productor, SELECT it.subName productor,
@ -240,13 +236,13 @@ proc: BEGIN
b.buyingValue costefijo, b.buyingValue costefijo,
b.groupingMode caja, b.groupingMode caja,
it.image ArticleImage, it.image ArticleImage,
IFNULL(it.inkFk,"?") color, IFNULL(it.inkFk, '?') color,
tp.code tipo, tp.code tipo,
it.typeFk tipo_id, it.typeFk tipo_id,
o.code origen, o.code origen,
it.category categoria, it.category categoria,
it.stems tallos, it.stems tallos,
it.size medida, it.`size` medida,
it.name article, it.name article,
w.code codigoTrabajador, w.code codigoTrabajador,
tp.categoryFk reino_id, tp.categoryFk reino_id,
@ -264,17 +260,20 @@ proc: BEGIN
e.id provider_id, e.id provider_id,
it.comment comments, it.comment comments,
it.description itemDescription, it.description itemDescription,
IF(cy.cItemFk IS NULL AND i.visible = 0 AND i.avalaible = 0 IF(cy.cItemFk IS NULL AND i.visible = 0
AND IFNULL(i.sd, 0) = 0, FALSE, TRUE) filtret, AND i.avalaible = 0 AND (i.sd IS NULL OR i.sd = 0),
FALSE,
TRUE
) filtret,
IF(it.hasMinPrice, FORMAT(it.minPrice, 2), "") pvp, IF(it.hasMinPrice, FORMAT(it.minPrice, 2), "") pvp,
s.company_name s.company_name
FROM tmp.itemInventory i FROM tmp.itemInventory i
JOIN item it ON it.id = i.id JOIN item it ON it.id = i.id
LEFT JOIN itemType tp ON tp.id = it.typeFk JOIN itemType tp ON tp.id = it.typeFk
LEFT JOIN worker w ON w.id = tp.workerFk JOIN worker w ON w.id = tp.workerFk
LEFT JOIN buy b ON b.id = i.buy_id LEFT JOIN buy b ON b.id = i.buy_id
LEFT JOIN entry e ON e.id = b.entryFk LEFT JOIN `entry` e ON e.id = b.entryFk
LEFT JOIN origin o ON o.id = it.originFk JOIN origin o ON o.id = it.originFk
LEFT JOIN tLastYear ly ON ly.lItemFk = it.id LEFT JOIN tLastYear ly ON ly.lItemFk = it.id
LEFT JOIN tCurrentYear cy ON cy.cItemFk = it.id LEFT JOIN tCurrentYear cy ON cy.cItemFk = it.id
LEFT JOIN tTwoYearsAgo zy ON zy.tItemFk = it.id LEFT JOIN tTwoYearsAgo zy ON zy.tItemFk = it.id
@ -287,8 +286,8 @@ proc: BEGIN
OR ly.lweek1 OR ly.lweek2 OR ly.lweek3 OR ly.lweek4 OR ly.lweek5 OR ly.lweek6 OR ly.lweek7 OR ly.lweek1 OR ly.lweek2 OR ly.lweek3 OR ly.lweek4 OR ly.lweek5 OR ly.lweek6 OR ly.lweek7
OR zy.vlweek1 OR zy.vlweek2 OR zy.vlweek3 OR zy.vlweek4 OR zy.vlweek5 OR zy.vlweek6 OR zy.vlweek7; OR zy.vlweek1 OR zy.vlweek2 OR zy.vlweek3 OR zy.vlweek4 OR zy.vlweek5 OR zy.vlweek6 OR zy.vlweek7;
-- Elimina las tablas temporales creadas... DROP TEMPORARY TABLE IF EXISTS
DROP TEMPORARY TABLE IF EXISTS tmp.itemInventory, tmp.itemInventory,
tTwoYearsAgo, tTwoYearsAgo,
tLastYear, tLastYear,
tCurrentYear, tCurrentYear,

View File

@ -0,0 +1,408 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_devalueA2`(
vSelf INT,
vShelvingFK VARCHAR(10),
vBuyingValue DECIMAL(10,4),
vQuantity INT
)
BEGIN
/**
* Devalua un item modificando su calidad de A1 a A2.
* Si no existe el item A2 lo crea y genera los movimientos de las entradas
* de almacén y shelvings correspondientes
*
* @param vSelf Id de artículo a devaluar
* @param vShelvingFK Ubicación actual del artículo
* @param vBuyingValue Nuevo precio de coste
* @param vQuantity Cantidad del ítem a pasar a A2
*/
DECLARE vItemA2Fk INT;
DECLARE vLastBuyFk BIGINT;
DECLARE vA1BuyFk INT;
DECLARE vA2BuyFk INT;
DECLARE vTargetEntryFk INT;
DECLARE vTargetEntryDate DATE;
DECLARE vTargetItemShelvingFk BIGINT;
DECLARE vWarehouseFk INT;
DECLARE vCacheFk INT;
DECLARE vLastEntryFk INT;
DECLARE vCurrentVisible INT;
DECLARE vDevalueTravelFk INT;
DECLARE vCurdate DATE;
DECLARE vBuyingValueOriginal DECIMAL(10,4);
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
BEGIN
ROLLBACK;
RESIGNAL;
END;
IF (SELECT TRUE FROM item WHERE id = vSelf AND (category <> 'A1' OR category IS NULL)) THEN
CALL util.throw('Item has not category A1');
END IF;
SELECT warehouseFk INTO vWarehouseFk
FROM userConfig
WHERE userFk = account.myUser_getId();
IF NOT vWarehouseFk OR vWarehouseFk IS NULL THEN
CALL util.throw ('Operator has not a valid warehouse');
END IF;
IF vQuantity <= 0 OR vQuantity IS NULL THEN
CALL util.throw ('The quantity is incorrect');
END IF;
SELECT util.VN_CURDATE() INTO vCurdate;
SELECT t.id INTO vDevalueTravelFk
FROM travel t
JOIN travelConfig tc
WHERE t.shipped = vCurdate
AND t.landed = vCurdate
AND t.warehouseInFk = vWarehouseFk
AND t.warehouseOutFk = tc.devalueWarehouseOutFk
AND t.agencyModeFk = tc.devalueAgencyModeFk
LIMIT 1;
IF NOT vDevalueTravelFk OR vDevalueTravelFk IS NULL THEN
INSERT INTO travel (
shipped,
landed,
warehouseInFk,
warehouseOutFk,
`ref`,
isReceived,
agencyModeFk)
SELECT vCurdate,
vCurdate,
vWarehouseFk,
tc.devalueWarehouseOutFk,
tc.devalueRef,
TRUE,
tc.devalueAgencyModeFk
FROM travelConfig tc;
SET vDevalueTravelFk = LAST_INSERT_ID();
END IF;
SELECT id, DATE(dated) INTO vTargetEntryFk, vTargetEntryDate
FROM `entry` e
WHERE DATE(dated) = vCurdate
AND typeFk = 'devaluation'
AND travelFk = vDevalueTravelFk
ORDER BY created DESC
LIMIT 1;
CALL buyUltimate(vWarehouseFk, vCurdate);
SELECT b.entryFk, bu.buyFk,IFNULL(b.buyingValue, 0) INTO vLastEntryFk, vLastBuyFk, vBuyingValueOriginal
FROM tmp.buyUltimate bu
JOIN vn.buy b ON b.id = bu.buyFk
WHERE bu.itemFk = vSelf
AND bu.warehouseFk = vWarehouseFk;
IF vBuyingValue > vBuyingValueOriginal THEN
CALL util.throw ('Price not valid');
END IF;
IF vLastEntryFk IS NULL OR vLastBuyFk IS NULL THEN
CALL util.throw ('The item has not a buy');
END IF;
SELECT id,visible INTO vTargetItemShelvingFk, vCurrentVisible
FROM itemShelving
WHERE shelvingFk = vShelvingFK COLLATE utf8mb3_general_ci
AND itemFk = vSelf
LIMIT 1;
IF vCurrentVisible IS NULL THEN
CALL util.throw ('The shelving has not a visible for this item');
END IF;
IF vQuantity > vCurrentVisible THEN
CALL util.throw('Quantity is greater than visible');
END IF;
START TRANSACTION;
IF NOT vTargetEntryFk OR vTargetEntryFk IS NULL
OR NOT vTargetEntryDate <=> vCurdate THEN
INSERT INTO entry(
travelFk,
supplierFk,
dated,
commission,
currencyFk,
companyFk,
clonedFrom,
typeFk
)
SELECT vDevalueTravelFk,
supplierFk,
vCurdate,
commission,
currencyFk,
companyFk,
vLastEntryFk,
'devaluation'
FROM entry
WHERE id = vLastEntryFk;
SET vTargetEntryFk = LAST_INSERT_ID();
END IF;
SELECT i.id INTO vItemA2Fk
FROM item i
JOIN (
SELECT i.id,
i.name,
i.subname,
i.value5,
i.value6,
i.value7,
i.value8,
i.value9,
i.value10,
i.NumberOfItemsPerCask,
i.EmbalageCode,
i.quality
FROM item i
WHERE i.id = vSelf
)i2 ON i2.name <=> i.name
AND i2.subname <=> i.subname
AND i2.value5 <=> i.value5
AND i2.value6 <=> i.value6
AND i2.value8 <=> i.value8
AND i2.value9 <=> i.value9
AND i2.value10 <=> i.value10
AND i2.NumberOfItemsPerCask <=> i.NumberOfItemsPerCask
AND i2.EmbalageCode <=> i.EmbalageCode
AND i2.quality <=> i.quality
WHERE i.id <> i2.id
AND i.category = 'A2'
LIMIT 1;
IF vItemA2Fk IS NULL THEN
INSERT INTO item (
equivalent,
name,
`size`,
stems,
minPrice,
isToPrint,
family,
box,
category,
originFk,
doPhoto,
image,
inkFk,
intrastatFk,
hasMinPrice,
created,
comment,
typeFk,
generic,
producerFk,
description,
density,
relevancy,
expenseFk,
isActive,
longName,
subName,
minimum,
upToDown,
supplyResponseFk,
hasKgPrice,
isFloramondo,
isFragile,
numberOfItemsPerCask,
embalageCode,
quality,
stemMultiplier,
itemPackingTypeFk,
packingOut,
genericFk,
isLaid,
lastUsed,
weightByPiece,
editorFk,
recycledPlastic,
nonRecycledPlastic)
SELECT equivalent,
name,
`size`,
stems,
minPrice,
isToPrint,
family,
box,
'A2',
originFk,
doPhoto,
image,
inkFk,
intrastatFk,
hasMinPrice,
created,
comment,
typeFk,
generic,
producerFk,
description,
density,
relevancy,
expenseFk,
isActive,
longName,
subName,
minimum,
upToDown,
supplyResponseFk,
hasKgPrice,
isFloramondo,
isFragile,
numberOfItemsPerCask,
embalageCode,
quality,
stemMultiplier,
itemPackingTypeFk,
packingOut,
genericFk,
isLaid,
lastUsed,
weightByPiece,
editorFk,
recycledPlastic,
nonRecycledPlastic
FROM item
WHERE id = vSelf;
SET vItemA2Fk = LAST_INSERT_ID();
INSERT INTO itemTag (itemFk, tagFk, `value`, intValue, priority, editorFk)
SELECT vItemA2Fk, tagFk, `value`, intValue, priority, editorFk
FROM itemTag
WHERE id = vSelf;
UPDATE itemTaxCountry itc
JOIN itemTaxCountry itc2 ON itc2.itemFk = vSelf
AND itc2.countryFk = itc.countryFk
SET itc2.taxClassFk = itc.taxClassFk
WHERE itc.id = vItemA2Fk;
INSERT INTO itemBotanical (itemFk, genusFk, specieFk)
SELECT vItemA2Fk, genusFk, specieFk
FROM itemBotanical
WHERE itemFk = vSelf;
END IF;
IF vQuantity = vCurrentVisible THEN
DELETE FROM itemShelving
WHERE id = vTargetItemShelvingFk;
ELSE
UPDATE itemShelving
SET visible = vCurrentVisible - vQuantity
WHERE id = vTargetItemShelvingFk;
END IF;
INSERT INTO buy(
entryFk,
itemFk,
quantity,
buyingValue,
freightValue,
isIgnored,
stickers,
packagingFk,
packing,
`grouping`,
groupingMode,
comissionValue,
packageValue,
price1,
price2,
price3,
minPrice,
isChecked,
location,
weight,
itemOriginalFk)
SELECT vTargetEntryFk,
itemFk,
- LEAST(vQuantity, vCurrentVisible),
buyingValue,
freightValue,
TRUE,
stickers,
packagingFk,
packing,
`grouping`,
groupingMode,
comissionValue,
packageValue,
price1,
price2,
price3,
minPrice,
isChecked,
location,
weight,
itemOriginalFk
FROM vn.buy
WHERE id = vLastBuyFk
UNION
SELECT vTargetEntryFk,
vItemA2Fk,
vQuantity,
vBuyingValue,
freightValue,
TRUE,
stickers,
packagingFk,
packing,
`grouping`,
groupingMode,
comissionValue,
packageValue,
price1,
price2,
price3,
minPrice,
isChecked,
location,
weight,
itemOriginalFk
FROM vn.buy
WHERE id = vLastBuyFk;
INSERT IGNORE INTO itemShelving (
itemFk,
shelvingFk,
visible,
`grouping`,
packing,
packagingFk,
userFk,
isChecked)
SELECT vItemA2Fk,
shelvingFk,
vQuantity ,
`grouping`,
packing,
packagingFk,
account.myUser_getId(),
isChecked
FROM itemShelving
WHERE itemFK = vSelf
AND shelvingFk = vShelvingFK COLLATE utf8mb3_general_ci
ON DUPLICATE KEY UPDATE
visible = vQuantity + VALUES(visible);
COMMIT;
CALL cache.visible_refresh(vCacheFk, TRUE, vWarehouseFk);
CALL cache.available_refresh(vCacheFk, TRUE, vWarehouseFk, vCurdate);
CALL buy_recalcPricesByBuy(vA2BuyFk);
END$$
DELIMITER ;

View File

@ -9,7 +9,7 @@ BEGIN
* @vItemFk item a buscar * @vItemFk item a buscar
* @vWarehouseFk almacen donde buscar * @vWarehouseFk almacen donde buscar
* @vDate Si la fecha es null, muestra el histórico desde el inventario. * @vDate Si la fecha es null, muestra el histórico desde el inventario.
* Si la fecha no es null, muestra histórico desde la fecha pasada. * Si la fecha no es null, muestra histórico desde la fecha de vDate.
*/ */
DECLARE vDateInventory DATETIME; DECLARE vDateInventory DATETIME;
@ -41,6 +41,7 @@ BEGIN
); );
INSERT INTO tItemDiary INSERT INTO tItemDiary
WITH entriesIn AS (
SELECT tr.landed shipped, SELECT tr.landed shipped,
b.quantity `in`, b.quantity `in`,
NULL `out`, NULL `out`,
@ -57,89 +58,125 @@ BEGIN
NULL clientType, NULL clientType,
NULL claimFk, NULL claimFk,
ec.inventorySupplierFk ec.inventorySupplierFk
FROM buy b FROM vn.buy b
JOIN entry e ON e.id = b.entryFk JOIN vn.entry e ON e.id = b.entryFk
JOIN travel tr ON tr.id = e.travelFk JOIN vn.travel tr ON tr.id = e.travelFk
JOIN supplier s ON s.id = e.supplierFk JOIN vn.supplier s ON s.id = e.supplierFk
JOIN state st ON st.`code` = IF( tr.landed < util.VN_CURDATE() JOIN vn.state st ON st.`code` = IF( tr.landed < util.VN_CURDATE()
OR (util.VN_CURDATE() AND tr.isReceived), OR (util.VN_CURDATE() AND tr.isReceived),
'DELIVERED', 'DELIVERED',
'FREE') 'FREE')
JOIN entryConfig ec JOIN vn.entryConfig ec
WHERE tr.landed >= vDateInventory WHERE tr.landed >= vDateInventory
AND vWarehouseFk = tr.warehouseInFk AND vWarehouseFk = tr.warehouseInFk
AND (s.id <> ec.inventorySupplierFk OR vDate IS NULL) AND (s.id <> ec.inventorySupplierFk OR vDate IS NULL)
AND b.itemFk = vItemFk AND b.itemFk = vItemFk
AND e.isExcludedFromAvailable = FALSE AND NOT e.isExcludedFromAvailable
AND e.isRaid = FALSE AND NOT e.isRaid
UNION ALL ), entriesOut AS (
SELECT tr.shipped, SELECT tr.shipped,
NULL, NULL,
b.quantity, b.quantity,
st.alertLevel, st.alertLevel,
st.name, st.name stateName,
s.name , s.name ,
e.invoiceNumber, e.invoiceNumber,
e.id, e.id entryFk,
s.id, s.id supplierFk,
IF(st.`code` = 'DELIVERED' , TRUE, FALSE), IF(st.`code` = 'DELIVERED' , TRUE, FALSE),
FALSE, FALSE isTicket,
b.id, b.id,
NULL, NULL `order`,
NULL, NULL clientType,
NULL, NULL claimFk,
ec.inventorySupplierFk ec.inventorySupplierFk
FROM buy b FROM vn.buy b
JOIN entry e ON e.id = b.entryFk JOIN vn.entry e ON e.id = b.entryFk
JOIN travel tr ON tr.id = e.travelFk JOIN vn.travel tr ON tr.id = e.travelFk
JOIN warehouse w ON w.id = tr.warehouseOutFk JOIN vn.warehouse w ON w.id = tr.warehouseOutFk
JOIN supplier s ON s.id = e.supplierFk JOIN vn.supplier s ON s.id = e.supplierFk
JOIN state st ON st.`code` = IF(tr.shipped < util.VN_CURDATE() JOIN vn.state st ON st.`code` = IF(tr.shipped < util.VN_CURDATE()
OR (tr.shipped = util.VN_CURDATE() AND tr.isReceived), OR (tr.shipped = util.VN_CURDATE() AND tr.isReceived),
'DELIVERED', 'DELIVERED',
'FREE') 'FREE')
JOIN entryConfig ec JOIN vn.entryConfig ec
WHERE tr.shipped >= vDateInventory WHERE tr.shipped >= vDateInventory
AND vWarehouseFk = tr.warehouseOutFk AND vWarehouseFk = tr.warehouseOutFk
AND (s.id <> ec.inventorySupplierFk OR vDate IS NULL) AND (s.id <> ec.inventorySupplierFk OR vDate IS NULL)
AND b.itemFk = vItemFk AND b.itemFk = vItemFk
AND e.isExcludedFromAvailable = FALSE AND NOT e.isExcludedFromAvailable
AND w.isFeedStock = FALSE AND NOT w.isFeedStock
AND e.isRaid = FALSE AND NOT e.isRaid
UNION ALL ), sales AS (
SELECT DATE(t.shipped), SELECT DATE(t.shipped) shipped,
NULL,
s.quantity, s.quantity,
st2.alertLevel, st2.alertLevel,
st2.name, st2.name,
t.nickname, t.nickname,
t.refFk, t.refFk,
t.id, t.id ticketFk,
t.clientFk, t.clientFk,
stk.id, s.id saleFk,
TRUE,
s.id,
st.`order`, st.`order`,
c.typeFk, c.typeFk,
cb.claimFk, cb.claimFk
NULL FROM vn.sale s
FROM sale s JOIN vn.ticket t ON t.id = s.ticketFk
JOIN ticket t ON t.id = s.ticketFk LEFT JOIN vn.ticketState ts ON ts.ticketFk = t.id
LEFT JOIN ticketState ts ON ts.ticketFk = t.id LEFT JOIN vn.state st ON st.`code` = ts.`code`
LEFT JOIN state st ON st.`code` = ts.`code` JOIN vn.client c ON c.id = t.clientFk
JOIN client c ON c.id = t.clientFk JOIN vn.state st2 ON st2.`code` = IF(t.shipped < util.VN_CURDATE(),
JOIN state st2 ON st2.`code` = IF(t.shipped < util.VN_CURDATE(),
'DELIVERED', 'DELIVERED',
IF (t.shipped > util.dayEnd(util.VN_CURDATE()), IF (t.shipped > util.dayEnd(util.VN_CURDATE()),
'FREE', 'FREE',
IFNULL(ts.code, 'FREE'))) IFNULL(ts.code, 'FREE')))
LEFT JOIN state stPrep ON stPrep.`code` = 'PREPARED' LEFT JOIN vn.claimBeginning cb ON s.id = cb.saleFk
LEFT JOIN saleTracking stk ON stk.saleFk = s.id
AND stk.stateFk = stPrep.id
LEFT JOIN claimBeginning cb ON s.id = cb.saleFk
WHERE t.shipped >= vDateInventory WHERE t.shipped >= vDateInventory
AND s.itemFk = vItemFk AND s.itemFk = vItemFk
AND vWarehouseFk = t.warehouseFk AND vWarehouseFk = t.warehouseFk
),sale AS (
SELECT s.shipped,
NULL `in`,
s.quantity,
s.alertLevel,
s.name,
s.nickname,
s.refFk,
s.ticketFk,
s.clientFk,
IF(stk.saleFk, TRUE, NULL),
TRUE,
s.saleFk,
s.`order`,
s.typeFk,
s.claimFk,
NULL
FROM sales s
LEFT JOIN vn.state stPrep ON stPrep.`code` = 'PREPARED'
LEFT JOIN vn.saleTracking stk ON stk.saleFk = s.saleFk
AND stk.stateFk = stPrep.id
GROUP BY s.saleFk
) SELECT shipped,
`in`,
`out`,
alertLevel,
stateName,
`name`,
reference,
origin,
clientFk,
isPicked,
isTicket,
lineFk,
`order`,
clientType,
claimFk,
inventorySupplierFk
FROM entriesIn
UNION ALL
SELECT * FROM entriesOut
UNION ALL
SELECT * FROM sale
ORDER BY shipped, ORDER BY shipped,
(inventorySupplierFk = clientFk) DESC, (inventorySupplierFk = clientFk) DESC,
alertLevel DESC, alertLevel DESC,

View File

@ -21,7 +21,7 @@ BEGIN
CALL cache.available_refresh(vCalcFk, FALSE, vWarehouseFk, vDated); CALL cache.available_refresh(vCalcFk, FALSE, vWarehouseFk, vDated);
-- Añadido temporalmente para ver si ya no sucede el cuelgue de db -- Añadido temporalmente para que no se cuelgue la db
SET vShowType = TRUE; SET vShowType = TRUE;
WITH itemTags AS ( WITH itemTags AS (
@ -82,7 +82,7 @@ BEGIN
AND iss.warehouseFk = vWarehouseFk AND iss.warehouseFk = vWarehouseFk
JOIN itemTags its JOIN itemTags its
WHERE a.available > 0 WHERE a.available > 0
AND IF(vShowType, i.typeFk = its.typeFk, TRUE) AND (i.typeFk = its.typeFk OR NOT vShowType)
AND i.id <> vSelf AND i.id <> vSelf
ORDER BY `counter` DESC, ORDER BY `counter` DESC,
(t.name = its.name) DESC, (t.name = its.name) DESC,

View File

@ -1,5 +1,13 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ledger_doCompensation`(vDated DATE, vCompensationAccount VARCHAR(10) , vBankFk VARCHAR(10), vConcept VARCHAR(255), vAmount DECIMAL(10,2), vCompanyFk INT, vOriginalAccount VARCHAR(10)) CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ledger_doCompensation`(
vDated DATE,
vCompensationAccount VARCHAR(10),
vBankFk VARCHAR(10),
vConcept VARCHAR(255),
vAmount DECIMAL(10,2),
vCompanyFk INT,
vOriginalAccount VARCHAR(10)
)
BEGIN BEGIN
/** /**
* Compensa un pago o un recibo insertando en contabilidad * Compensa un pago o un recibo insertando en contabilidad
@ -9,7 +17,7 @@ BEGIN
* @param vBankFk banco de la compensacion * @param vBankFk banco de la compensacion
* @param vConcept descripcion * @param vConcept descripcion
* @param vAmount cantidad que se compensa * @param vAmount cantidad que se compensa
* @param vCompany empresa * @param vCompanyFk empresa
* @param vOriginalAccount cuenta contable desde la cual se compensa * @param vOriginalAccount cuenta contable desde la cual se compensa
* *
*/ */
@ -20,9 +28,11 @@ BEGIN
DECLARE vIsOriginalAClient BOOL; DECLARE vIsOriginalAClient BOOL;
DECLARE vPayMethodCompensation INT; DECLARE vPayMethodCompensation INT;
CALL ledger_next(vNewBookEntry); CALL ledger_next(YEAR(vDated), vNewBookEntry);
SELECT COUNT(id) INTO vIsOriginalAClient FROM client WHERE accountingAccount LIKE vOriginalAccount COLLATE utf8_general_ci; SELECT COUNT(id) INTO vIsOriginalAClient
FROM client
WHERE accountingAccount LIKE vOriginalAccount COLLATE utf8_general_ci;
SELECT id, COUNT(id) INTO vClientFk, vIsClientCompensation SELECT id, COUNT(id) INTO vClientFk, vIsClientCompensation
FROM client FROM client
@ -62,17 +72,38 @@ BEGIN
IF vIsOriginalAClient THEN IF vIsOriginalAClient THEN
SET vAmount = -vAmount; SET vAmount = -vAmount;
END IF; END IF;
INSERT INTO receipt(invoiceFk, amountPaid, payed, bankFk, companyFk, clientFk, isConciliate)
VALUES (vConcept, vAmount, vDated, vBankFk, vCompanyFk, vClientFk, TRUE); INSERT INTO receipt
SET invoiceFk = vConcept,
amountPaid = vAmount,
payed = vDated,
bankFk = vBankFk,
companyFk = vCompanyFk,
clientFk = vClientFk,
isConciliate = TRUE;
ELSE ELSE
IF NOT vIsOriginalAClient THEN IF NOT vIsOriginalAClient THEN
SET vAmount = -vAmount; SET vAmount = -vAmount;
END IF; END IF;
SELECT id INTO vSupplierFk FROM supplier WHERE `account` LIKE vCompensationAccount COLLATE utf8_general_ci;
SELECT id INTO vPayMethodCompensation FROM payMethod WHERE `code` = 'compensation';
INSERT INTO payment (received, dueDated, supplierFk, amount, bankFk, payMethodFk, concept, companyFk, isConciliated) SELECT id INTO vSupplierFk
VALUES(vDated, vDated, vSupplierFk, vAmount, vBankFk, vPayMethodCompensation, vConcept, vCompanyFk, TRUE); FROM supplier
WHERE `account` LIKE vCompensationAccount COLLATE utf8_general_ci;
SELECT id INTO vPayMethodCompensation
FROM payMethod
WHERE `code` = 'compensation';
INSERT INTO payment
SET received = vDated,
dueDated = vDated,
supplierFk = vSupplierFk,
amount = vAmount,
bankFk = vBankFk,
payMethodFk = vPayMethodCompensation,
concept = vConcept,
companyFk = vCompanyFk,
isConciliated = TRUE;
END IF; END IF;
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -1,9 +1,55 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ledger_next`(OUT vNewBookEntry INT) CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ledger_next`(
IN vFiscalYear INT,
OUT vLastBookEntry INT
)
BEGIN
DECLARE vHasStartTransaction BOOLEAN;
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN BEGIN
UPDATE vn.ledgerConfig SET lastBookEntry = LAST_INSERT_ID(lastBookEntry + 1); IF vHasStartTransaction THEN
SET vNewBookEntry = LAST_INSERT_ID(); ROLLBACK TO sp;
RESIGNAL;
ELSE
ROLLBACK;
CALL util.throw ('It has not been possible to generate a new ledger');
END IF;
END;
IF vFiscalYear IS NULL THEN
CALL util.throw('Fiscal year is required');
END IF;
SELECT @@in_transaction INTO vHasStartTransaction;
IF NOT vHasStartTransaction THEN
START TRANSACTION;
ELSE
SAVEPOINT sp;
END IF;
SELECT bookEntry + 1 INTO vLastBookEntry
FROM ledgerCompany
WHERE fiscalYear = vFiscalYear
FOR UPDATE;
IF vLastBookEntry IS NULL THEN
INSERT INTO ledgerCompany
SET fiscalYear = vFiscalYear,
bookEntry = 1;
SET vLastBookEntry = 1;
END IF;
UPDATE ledgerCompany
SET bookEntry = vLastBookEntry
WHERE fiscalYear = vFiscalYear;
IF vHasStartTransaction THEN
RELEASE SAVEPOINT sp;
ELSE
COMMIT;
END IF;
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -1,121 +0,0 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`packageInvoicing`(
IN vClient INT,
IN vDate DATE,
IN vCompany INT,
IN vIsAllInvoiceable BOOLEAN,
OUT vNewTicket INT(11)
)
BEGIN
DECLARE vGraceDays INT;
DECLARE vDateStart DATE DEFAULT '2017-11-21';
DECLARE vIsInvoiceable BOOLEAN;
DECLARE vWarehouse INT DEFAULT 13;
DECLARE vComponentCost INT DEFAULT 28;
DECLARE vGraceDate DATE;
DECLARE vDateEnd DATE;
SET vGraceDays = IF(vIsAllInvoiceable ,0, 30);
SET vGraceDate = TIMESTAMPADD(DAY, - vGraceDays, vDate);
/* Clientes especiales:
3240 MADEFLOR
992 JAVIER FELIU
4 TONI VENDRELL
*/
IF vClient IN (992, 3240, 4) THEN
SET vGraceDays = 365;
END IF;
/* Fin clientes especiales */
SET vDateEnd = DATE_ADD(vDate, INTERVAL 1 DAY);
DROP TEMPORARY TABLE IF EXISTS tmp.packageToInvoice;
CREATE TEMPORARY TABLE tmp.packageToInvoice
SELECT p.itemFk,
tp.packagingFk,
IF(tp.quantity < 0 OR t.shipped < vGraceDate, tp.quantity, 0) quantity,
tp.ticketFk,
p.price
FROM ticketPackaging tp
JOIN packaging p ON p.id = tp.packagingFk
JOIN ticket t ON t.id = tp.ticketFk
WHERE t.shipped BETWEEN vDateStart AND vDateEnd
AND t.clientFk = vClient;
DROP TEMPORARY TABLE IF EXISTS tmp.packageToInvoicePositives;
CREATE TEMPORARY TABLE tmp.packageToInvoicePositives
SELECT itemFk, sum(quantity) as totalQuantity
FROM tmp.packageToInvoice
GROUP BY itemFk
HAVING totalQuantity > 0;
SELECT COUNT(*)
INTO vIsInvoiceable
FROM tmp.packageToInvoicePositives;
IF vIsInvoiceable THEN
CALL ticket_add(vClient,
vDateEnd,
vWarehouse,
vCompany,
NULL,
NULL,
NULL,
vDateEnd,
account.myUser_getId(),
TRUE,
vNewTicket);
INSERT INTO ticketPackaging(
ticketFk,
packagingFk,
quantity,
pvp)
SELECT vNewTicket,
pti.packagingFk,
- SUM(pti.quantity) AS totalQuantity,
pti.price
FROM tmp.packageToInvoice pti
LEFT JOIN tmp.packageToInvoicePositives ptip ON pti.itemFk = ptip.itemFk
WHERE ptip.itemFK IS NOT NULL
OR vIsAllInvoiceable
GROUP BY packagingFk
HAVING totalQuantity;
INSERT INTO sale(
ticketFk,
itemFk,
concept,
quantity,
price
)
SELECT vNewTicket,
pti.itemFk,
i.name as concept,
sum(pti.quantity) as totalQuantity,
pti.price
FROM tmp.packageToInvoice pti
JOIN item i ON i.id = pti.itemFk
LEFT JOIN tmp.packageToInvoicePositives ptip ON pti.itemFk = ptip.itemFk
WHERE ptip.itemFK IS NOT NULL
OR vIsAllInvoiceable
GROUP BY pti.itemFk
HAVING totalQuantity;
INSERT INTO saleComponent(saleFk, componentFk, value)
SELECT id, vComponentCost, price
FROM sale
WHERE ticketFk = vNewTicket;
END IF;
END$$
DELIMITER ;

View File

@ -20,7 +20,7 @@ BEGIN
CONCAT(tc.collectionFk, ' ', LEFT(cc.code, 4)) color, CONCAT(tc.collectionFk, ' ', LEFT(cc.code, 4)) color,
CONCAT(tc.collectionFk, ' ', SUBSTRING('ABCDEFGH',tc.wagon, 1), '-', tc.level) levelV, CONCAT(tc.collectionFk, ' ', SUBSTRING('ABCDEFGH',tc.wagon, 1), '-', tc.level) levelV,
tc.ticketFk, tc.ticketFk,
LEFT(COALESCE(et.description, zo.name, am.name),12) agencyDescription, LEFT(COALESCE(rs.description, zo.name, am.name),12) agencyDescription,
am.name, am.name,
t.clientFk, t.clientFk,
CONCAT(CAST(SUM(sv.volume) AS DECIMAL(5, 2)), '') m3 , CONCAT(CAST(SUM(sv.volume) AS DECIMAL(5, 2)), '') m3 ,
@ -47,7 +47,7 @@ BEGIN
LEFT JOIN ticketTrolley tt ON tt.ticket = t.id LEFT JOIN ticketTrolley tt ON tt.ticket = t.id
LEFT JOIN zone zo ON t.zoneFk = zo.id LEFT JOIN zone zo ON t.zoneFk = zo.id
LEFT JOIN routesMonitor rm ON rm.routeFk = t.routeFk LEFT JOIN routesMonitor rm ON rm.routeFk = t.routeFk
LEFT JOIN expeditionTruck et ON et.id = rm.expeditionTruckFk LEFT JOIN roadmapStop rs ON rs.id = rm.expeditionTruckFk
WHERE IF(vIsCollection, tc.collectionFk = vParam, tc.ticketFk = vParam) WHERE IF(vIsCollection, tc.collectionFk = vParam, tc.ticketFk = vParam)
GROUP BY t.id GROUP BY t.id
ORDER BY cc.code; ORDER BY cc.code;

View File

@ -106,8 +106,8 @@ BEGIN
SET rm.m3boxes = sub.m3boxes; SET rm.m3boxes = sub.m3boxes;
UPDATE routesMonitor rm UPDATE routesMonitor rm
JOIN vn.expeditionTruck et ON et.id = rm.expeditionTruckFk JOIN vn.roadmapStop rs ON rs.id = rm.expeditionTruckFk
SET rm.etd = et.eta; SET rm.etd = rs.eta;
DROP TEMPORARY TABLE tmp.routesMonitor; DROP TEMPORARY TABLE tmp.routesMonitor;
END$$ END$$

View File

@ -34,7 +34,7 @@ BEGIN
ticketFk INT(11), ticketFk INT(11),
saleFk INT(11), saleFk INT(11),
isFreezed INTEGER(1) DEFAULT 0, isFreezed INTEGER(1) DEFAULT 0,
risk DECIMAL(10,2) DEFAULT 0, risk DECIMAL(10,1) DEFAULT 0,
hasHighRisk TINYINT(1) DEFAULT 0, hasHighRisk TINYINT(1) DEFAULT 0,
hasTicketRequest INTEGER(1) DEFAULT 0, hasTicketRequest INTEGER(1) DEFAULT 0,
itemShortage VARCHAR(255), itemShortage VARCHAR(255),
@ -44,6 +44,7 @@ BEGIN
hasComponentLack INTEGER(1), hasComponentLack INTEGER(1),
hasRounding VARCHAR(255), hasRounding VARCHAR(255),
isTooLittle BOOL DEFAULT FALSE, isTooLittle BOOL DEFAULT FALSE,
isVip BOOL DEFAULT FALSE,
PRIMARY KEY (ticketFk, saleFk) PRIMARY KEY (ticketFk, saleFk)
) ENGINE = MEMORY; ) ENGINE = MEMORY;
@ -80,6 +81,14 @@ BEGIN
WHERE sub.litros < vc.minTicketVolume WHERE sub.litros < vc.minTicketVolume
AND sub.totalWithoutVat < vc.minTicketValue; AND sub.totalWithoutVat < vc.minTicketValue;
-- VIP
INSERT INTO tmp.sale_problems(ticketFk, isVip)
SELECT DISTINCT tl.ticketFk, TRUE
FROM tmp.ticket_list tl
JOIN client c ON c.id = tl.clientFk
WHERE c.businessTypeFk = 'VIP'
ON DUPLICATE KEY UPDATE isVip = TRUE;
-- Faltan componentes -- Faltan componentes
INSERT INTO tmp.sale_problems(ticketFk, hasComponentLack, saleFk) INSERT INTO tmp.sale_problems(ticketFk, hasComponentLack, saleFk)
SELECT ticketFk, (vComponentCount > nComp) hasComponentLack, saleFk SELECT ticketFk, (vComponentCount > nComp) hasComponentLack, saleFk

View File

@ -0,0 +1,18 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sale_setProblem`(
vProblemCode VARCHAR(25)
)
BEGIN
/**
* Update column sale.problem with a problem code
* @param vProblemCode Code to set or unset
* @table tmp.sale(saleFk, hasProblem)
*/
UPDATE sale s
JOIN tmp.sale ts ON ts.saleFk = s.id
SET s.problem = CONCAT(
IF(ts.hasProblem,
CONCAT(s.problem, ',', vProblemCode),
REPLACE(s.problem, vProblemCode , '')));
END$$
DELIMITER ;

View File

@ -0,0 +1,21 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sale_setProblemComponentLack`(
vSelf INT
)
BEGIN
/**
* Update the problems for sales lines that have or no longer have problems with components,
* verify whether all mandatory components are present or not
*
* @param vSelf Id del sale
*/
CREATE OR REPLACE TEMPORARY TABLE tmp.sale
(INDEX(saleFk))
ENGINE = MEMORY
SELECT vSelf saleFk, sale_hasComponentLack(vSelf) hasProblem;
CALL sale_setProblem('hasComponentLack');
DROP TEMPORARY TABLE tmp.sale;
END$$
DELIMITER ;

View File

@ -0,0 +1,29 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sale_setProblemComponentLackByComponent`(
vComponentFk INT
)
BEGIN
/**
* Update the issues for sales lines that have or no longer have problems with components, verify
* whether all mandatory components are present or not resulting from changes in the table vn.component
*
* @param vComponentFk Id component
*/
CREATE OR REPLACE TEMPORARY TABLE tmp.sale
(INDEX(saleFk))
ENGINE = MEMORY
SELECT saleFk, sale_hasComponentLack(saleFk)hasProblem
FROM (
SELECT s.id saleFk
FROM ticket t
JOIN sale s ON s.ticketFk = t.id
LEFT JOIN saleComponent sc ON sc.saleFk = s.id
WHERE t.shipped >= util.midnight()
AND (vComponentFk IS NULL OR sc.componentFk = vComponentFk)
GROUP BY s.id) sub;
CALL sale_setProblem('hasComponentLack');
DROP TEMPORARY TABLE tmp.sale;
END$$
DELIMITER ;

View File

@ -0,0 +1,34 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sale_setProblemRounding`(
vSelf INT
)
BEGIN
/**
* Update the rounding problem for a sales line
* @param vSelf Id sale
*/
DECLARE vItemFk INT;
DECLARE vWarehouseFk INT;
DECLARE vShipped DATE;
DECLARE vQuantity INT;
SELECT s.itemFk, t.warehouseFk, t.shipped, s.quantity
INTO vItemFk, vWarehouseFk, vShipped, vQuantity
FROM sale s
JOIN ticket t ON t.id = s.ticketFk
WHERE s.id = vSelf;
CALL buyUltimate(vWarehouseFk, vShipped);
CREATE OR REPLACE TEMPORARY TABLE tmp.sale
SELECT vSelf saleFk, MOD(vQuantity, b.`grouping`) hasProblem
FROM tmp.buyUltimate bu
JOIN buy b ON b.id = bu.buyFk
WHERE bu.itemFk = vItemFk;
CALL sale_setProblem('hasRounding');
DROP TEMPORARY TABLE tmp.sale;
DROP TEMPORARY TABLE tmp.buyUltimate;
END$$
DELIMITER ;

View File

@ -43,7 +43,7 @@ BEGIN
INSERT INTO stockBuyed(buyed, dated, description) INSERT INTO stockBuyed(buyed, dated, description)
SELECT SUM(ic.cm3 * ito.quantity / vc.palletM3 / 1000000), SELECT SUM(ic.cm3 * ito.quantity / vc.palletM3 / 1000000),
vDated, vDated,
IF(c.code = 'ES', p.name, c.country) destiny IF(c.code = 'ES', p.name, c.name) destiny
FROM itemTicketOut ito FROM itemTicketOut ito
JOIN ticket t ON t.id = ito.ticketFk JOIN ticket t ON t.id = ito.ticketFk
JOIN `address` a ON a.id = t.addressFk JOIN `address` a ON a.id = t.addressFk

View File

@ -35,7 +35,7 @@ BEGIN
itemFk, itemFk,
longName, longName,
supplier, supplier,
entryFk, CONCAT('E',entryFk) entryFk,
landed, landed,
`in`, `in`,
`out`, `out`,
@ -49,16 +49,98 @@ BEGIN
itemFk, itemFk,
longName, longName,
supplier, supplier,
'previous', 'E previous',
vFromDated, vFromDated,
SUM(`in`), SUM(`in`),
SUM(`out`), SUM(`out`),
NULL, NULL,
buyingValue AVG(buyingValue)
FROM supplierPackaging FROM supplierPackaging
WHERE supplierFk = vSupplierFk WHERE supplierFk = vSupplierFk
AND landed < vFromDated AND landed < vFromDated
GROUP BY itemFk GROUP BY itemFk
UNION ALL
SELECT vSupplierFk,
s.itemFk,
i.longName,
c.name,
CONCAT('T',s.ticketFk),
DATE(t.shipped),
-LEAST(s.quantity,0) `in`,
GREATEST(s.quantity,0) `out`,
t.warehouseFk,
s.price * (100 - s.discount) / 100
FROM sale s
JOIN item i ON i.id = s.itemFk
JOIN packaging p ON p.itemFk = i.id
JOIN ticket t ON t.id = s.ticketFk
JOIN client c ON c.id = t.clientFk
JOIN supplier su ON su.nif = c.fi
WHERE su.id = vSupplierFk
AND t.shipped >= vFromDated
AND p.isPackageReturnable
UNION ALL
SELECT vSupplierFk,
s.itemFk,
i.longName,
c.name,
'T previous',
vFromDated,
SUM(-LEAST(s.quantity,0)) `in`,
SUM(GREATEST(s.quantity,0)) `out`,
NULL,
AVG(s.price * (100 - s.discount) / 100)
FROM sale s
JOIN item i ON i.id = s.itemFk
JOIN packaging p ON p.itemFk = i.id
JOIN ticket t ON t.id = s.ticketFk
JOIN client c ON c.id = t.clientFk
JOIN supplier su ON su.nif = c.fi
WHERE su.id = vSupplierFk
AND t.shipped < vFromDated
AND p.isPackageReturnable
GROUP BY s.itemFk
UNION ALL
SELECT vSupplierFk,
p.itemFk,
i.longName,
c.name,
CONCAT('TP',tp.ticketFk),
DATE(t.shipped),
-LEAST(tp.quantity,0) `in`,
GREATEST(tp.quantity,0) `out`,
t.warehouseFk,
0
FROM ticketPackaging tp
JOIN packaging p ON p.id = tp.packagingFk
JOIN item i ON i.id = p.itemFk
JOIN ticket t ON t.id = tp.ticketFk
JOIN client c ON c.id = t.clientFk
JOIN supplier su ON su.nif = c.fi
WHERE su.id = vSupplierFk
AND t.shipped >= vFromDated
AND p.isPackageReturnable
UNION ALL
SELECT vSupplierFk,
p.itemFk,
i.longName,
c.name,
'TP previous',
vFromDated,
SUM(-LEAST(tp.quantity,0)) `in`,
SUM(GREATEST(tp.quantity,0)) `out`,
NULL,
0
FROM ticketPackaging tp
JOIN packaging p ON p.id = tp.packagingFk
JOIN item i ON i.id = p.itemFk
JOIN ticket t ON t.id = tp.ticketFk
JOIN client c ON c.id = t.clientFk
JOIN supplier su ON su.nif = c.fi
WHERE su.id = vSupplierFk
AND t.shipped >= vFromDated
AND p.isPackageReturnable
GROUP BY p.itemFk
ORDER BY itemFk, landed, entryFk ORDER BY itemFk, landed, entryFk
) sub ) sub
WHERE `out` OR `in`; WHERE `out` OR `in`;
@ -69,8 +151,8 @@ BEGIN
supplier, supplier,
entryFk, entryFk,
landed, landed,
`in`, CAST(`in` AS DECIMAL(10,0)) `in`,
`out`, CAST(`out` AS DECIMAL(10,0)) `out`,
warehouse, warehouse,
buyingValue, buyingValue,
balance balance

View File

@ -27,7 +27,10 @@ BEGIN
SELECT DISTINCT clientFk SELECT DISTINCT clientFk
FROM ( FROM (
SELECT clientFk, SUM(quantity) totalQuantity SELECT clientFk, SUM(quantity) totalQuantity
FROM tmp.packagingToInvoice FROM tmp.packagingToInvoice tpi
JOIN client c ON c.id = tpi.clientFk
LEFT JOIN supplier s ON s.nif = c.fi
WHERE s.id IS NULL
GROUP BY itemFk, clientFk GROUP BY itemFk, clientFk
HAVING totalQuantity > 0)sub; HAVING totalQuantity > 0)sub;

View File

@ -7,7 +7,7 @@ BEGIN
* *
* @param vSelf El id del ticket * @param vSelf El id del ticket
*/ */
DECLARE vCmrFk, vPreviousCmrFk, vCurrentCmrFk INT; DECLARE vCmrFk INT;
SELECT cmrFk INTO vCmrFk SELECT cmrFk INTO vCmrFk
FROM ticket FROM ticket
WHERE id = vSelf; WHERE id = vSelf;
@ -44,8 +44,6 @@ BEGIN
AND t.id = vSelf AND t.id = vSelf
GROUP BY t.id; GROUP BY t.id;
START TRANSACTION;
IF vCmrFk THEN IF vCmrFk THEN
UPDATE cmr c UPDATE cmr c
JOIN tTicket t JOIN tTicket t
@ -58,8 +56,6 @@ BEGIN
c.ead = t.landed c.ead = t.landed
WHERE id = vCmrFk; WHERE id = vCmrFk;
ELSE ELSE
SELECT MAX(id) INTO vPreviousCmrFk FROM cmr;
INSERT INTO cmr ( INSERT INTO cmr (
senderInstruccions, senderInstruccions,
truckPlate, truckPlate,
@ -71,16 +67,13 @@ BEGIN
) )
SELECT * FROM tTicket; SELECT * FROM tTicket;
SELECT MAX(id) INTO vCurrentCmrFk FROM cmr; IF (SELECT EXISTS(SELECT * FROM tTicket)) THEN
IF vPreviousCmrFk <> vCurrentCmrFk THEN
UPDATE ticket UPDATE ticket
SET cmrFk = vCurrentCmrFk SET cmrFk = LAST_INSERT_ID()
WHERE id = vSelf; WHERE id = vSelf;
END IF; END IF;
END IF; END IF;
COMMIT;
DROP TEMPORARY TABLE tTicket; DROP TEMPORARY TABLE tTicket;
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -25,6 +25,7 @@ BEGIN
MAX(itemDelay) itemDelay, MAX(itemDelay) itemDelay,
MAX(hasRounding) hasRounding, MAX(hasRounding) hasRounding,
MAX(itemLost) itemLost, MAX(itemLost) itemLost,
MAX(isVip) isVip,
0 totalProblems 0 totalProblems
FROM tmp.sale_problems FROM tmp.sale_problems
GROUP BY ticketFk; GROUP BY ticketFk;
@ -40,7 +41,8 @@ BEGIN
(tp.isTooLittle) + (tp.isTooLittle) +
(tp.itemLost) + (tp.itemLost) +
(tp.hasRounding) + (tp.hasRounding) +
(tp.itemShortage) (tp.itemShortage) +
(tp.isVip)
); );
DROP TEMPORARY TABLE tmp.sale_problems; DROP TEMPORARY TABLE tmp.sale_problems;

View File

@ -0,0 +1,19 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_setProblem`(
vProblemCode VARCHAR(25)
)
BEGIN
/**
* Update column ticket.problem with a problem code
*
* @param vProblemCode Code to set or unset
* @table tmp.ticket(ticketFk, hasProblem)
*/
UPDATE ticket t
JOIN tmp.ticket tt ON tt.ticketFk = t.id
SET t.problem = CONCAT(
IF(tt.hasProblem,
CONCAT(problem, ',', vProblemCode),
REPLACE(problem, vProblemCode , '')));
END$$
DELIMITER ;

View File

@ -0,0 +1,29 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_setProblemFreeze`(
vClientFk INT
)
BEGIN
/**
* Update the problem of tickets whose client is frozen or unfrozen
*
* @param vClientFk Id Cliente, if NULL all clients
*/
CREATE OR REPLACE TEMPORARY TABLE tmp.ticket
(INDEX(ticketFk))
ENGINE = MEMORY
SELECT t.id ticketFk, FALSE hasProblem
FROM ticket t
WHERE t.shipped >= util.midnight()
AND (vClientFk IS NULL OR t.clientFk = vClientFk);
UPDATE tmp.ticket t
JOIN ticket ti ON ti.id = t.ticketFk
JOIN client c ON c.id = ti.clientFk
SET t.hasProblem = TRUE
WHERE c.isFreezed;
CALL ticket_setProblem('isFreezed');
DROP TEMPORARY TABLE tmp.ticket;
END$$
DELIMITER ;

View File

@ -0,0 +1,28 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_setProblemRequest`(
vSelf INT
)
BEGIN
/**
* Update the problems of tickets that have a pending ticketRequest or no longer have it
*
* @param vSelf Id ticket, if NULL ALL tickets
*/
CREATE OR REPLACE TEMPORARY TABLE tmp.ticket
(INDEX(ticketFk))
ENGINE = MEMORY
SELECT t.id ticketFk, FALSE hasProblem
FROM ticket t
WHERE t.shipped >= util.midnight()
AND (vSelf IS NULL OR t.id = vSelf);
UPDATE tmp.ticket t
JOIN ticketRequest tr ON tr.ticketFk = t.ticketFk
SET t.hasProblem = TRUE
WHERE tr.isOK IS NULL;
CALL ticket_setProblem('hasTicketRequest');
DROP TEMPORARY TABLE tmp.ticket;
END$$
DELIMITER ;

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