Compare commits

...

111 Commits

Author SHA1 Message Date
Jorge Penadés 508cf2f684 Merge pull request '#8277 createEntryControl' (!1370) from 8277-createEntryControl into dev
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #1370
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2025-04-17 16:45:29 +00:00
Jorge Penadés 23ceaf9c9b fix(itemTax): refs #8277 update tax type from 'General VAT' to 'IVA General' for accuracy
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-04-17 18:10:46 +02:00
Jorge Penadés 200b1ab329 refactor(EntryPreAccount): refs #8277 rename accountType to fiscalCode and update related data fetching
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-17 16:27:00 +02:00
Jorge Penadés 412e04b1ff Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-17 15:53:06 +02:00
Alex Moreno 95bbe04e32 Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix-front into dev
gitea/salix-front/pipeline/head This commit looks good Details
2025-04-17 15:02:45 +02:00
Alex Moreno 7d51465e03 fix(VnSelect): warning and error isLoading
gitea/salix-front/pipeline/head This commit looks good Details
2025-04-17 15:02:35 +02:00
Jorge Penadés 0009ed8fdd Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl 2025-04-17 12:26:26 +02:00
Alex Moreno d4a0939c28 Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix-front into dev
gitea/salix-front/pipeline/head This commit looks good Details
2025-04-17 11:00:00 +02:00
Alex Moreno 99bc6d3b75 fix: add optional chaining to loading state check in VnSelect component
gitea/salix-front/pipeline/head This commit looks good Details
2025-04-17 10:59:57 +02:00
Alex Moreno 6265c44c67 Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix-front into dev
gitea/salix-front/pipeline/head This commit looks good Details
2025-04-17 10:51:42 +02:00
Alex Moreno 5a04aa8e27 Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix-front into test
gitea/salix-front/pipeline/head This commit looks good Details
2025-04-17 10:51:36 +02:00
Alex Moreno c5fb889b75 fix: simplify loading state check in VnSelect component
gitea/salix-front/pipeline/head This commit looks good Details
2025-04-17 10:49:50 +02:00
Jorge Penadés 7e04a794cb chore: refs #8277 rename received
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-04-17 10:49:35 +02:00
Alex Moreno 3815a9772e Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix-front into dev
gitea/salix-front/pipeline/head This commit looks good Details
2025-04-17 10:44:35 +02:00
Alex Moreno 3eacf92404 Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix-front into test
gitea/salix-front/pipeline/head This commit looks good Details
2025-04-17 10:44:30 +02:00
Alex Moreno 6336cf9e24 test: fix warning
gitea/salix-front/pipeline/head This commit looks good Details
2025-04-17 10:44:07 +02:00
Jorge Penadés 785f27fd77 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev Build queued... Details
2025-04-17 10:34:05 +02:00
Alex Moreno 33c421e29f Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix-front into dev
gitea/salix-front/pipeline/head This commit looks good Details
2025-04-17 10:31:28 +02:00
Alex Moreno ae474bf99a Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix-front into test
gitea/salix-front/pipeline/head This commit looks good Details
2025-04-17 10:31:04 +02:00
Jorge Penadés 3d573fc871 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-04-17 10:30:36 +02:00
Javier Segarra 3e06dacb07 Merge pull request 'HOTFIX: #8918 - Ticket Negative descriptor' (!1723) from hotfix_negative_descriptor into master
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #1723
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2025-04-17 07:29:57 +00:00
Javier Segarra 8baa1c4af4 Merge branch 'master' into hotfix_negative_descriptor
gitea/salix-front/pipeline/pr-master This commit looks good Details
2025-04-17 07:09:30 +00:00
Alex Moreno f99271289d chore: remove console.log
gitea/salix-front/pipeline/head This commit looks good Details
2025-04-17 08:51:04 +02:00
Alex Moreno e3adbefc41 test: enable invoiceOutList, invoiceOutSummary and ticketSale skipped
gitea/salix-front/pipeline/head This commit looks good Details
2025-04-17 08:23:18 +02:00
Alex Moreno 9b1eaf949a Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix-front into dev
gitea/salix-front/pipeline/head This commit looks good Details
2025-04-17 08:03:20 +02:00
Alex Moreno 53178d2429 Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix-front into test
gitea/salix-front/pipeline/head This commit looks good Details
2025-04-17 08:01:06 +02:00
Javier Segarra 9d166691fa fix: update route parameter from 'id' to 'itemFk' in TicketLack components
gitea/salix-front/pipeline/pr-master This commit looks good Details
2025-04-16 21:32:58 +02:00
Jorge Penadés 4c8681d124 refactor: refs #8277 update daysAgo logic to use dynamic maxDays and defaultDays from API response
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-16 18:30:04 +02:00
Jorge Penadés b5b69055bd Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-16 17:54:01 +02:00
Jose Antonio Tubau a2991281a7 Merge pull request 'refactor: refs #8413 vnInputDate component and improve date formatting logic' (!1700) from 8413-addDateYearAutofillVnInputDate into dev
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #1700
Reviewed-by: Jorge Penadés <jorgep@verdnatura.es>
2025-04-16 15:03:39 +00:00
Alex Moreno d012c79356 Merge pull request 'fix: refs #8910 ticketList orders' (!1721) from 8910-TicketFilter_fix_order into master
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #1721
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2025-04-16 14:30:09 +00:00
Jorge Penadés 3ff9cdd8fc Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-16 15:45:09 +02:00
Alex Moreno 34c59b9d20 Merge branch 'master' into 8910-TicketFilter_fix_order
gitea/salix-front/pipeline/pr-master This commit looks good Details
2025-04-16 13:43:08 +00:00
Alex Moreno 41f064d2ab Merge branch '8910-TicketFilter_fix_order' of https://gitea.verdnatura.es/verdnatura/salix-front into 8910-TicketFilter_fix_order
gitea/salix-front/pipeline/pr-master This commit looks good Details
2025-04-16 15:00:04 +02:00
Alex Moreno fdf0283e7e test: refs #8910 skip EntryDescriptor 2025-04-16 15:00:03 +02:00
Javier Segarra de50676c65 fix: re-call workerSummary
gitea/salix-front/pipeline/head This commit looks good Details
2025-04-16 14:39:07 +02:00
Alex Moreno 8396c0547c Merge branch 'master' into 8910-TicketFilter_fix_order
gitea/salix-front/pipeline/pr-master This commit is unstable Details
2025-04-16 12:31:22 +00:00
Alex Moreno 7c5fcf78b9 fix: refs #8910 ticketList orders
gitea/salix-front/pipeline/pr-master Something is wrong with the build of this commit Details
2025-04-16 14:30:54 +02:00
Jorge Penadés 6c4c558107 Merge pull request 'fix(SupplierFiscalData): refs #8916 integrate array data fetching on form save' (!1720) from 8916-hotfix-reloadCard into master
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #1720
Reviewed-by: Javier Segarra <jsegarra@verdnatura.es>
2025-04-16 10:24:57 +00:00
Jorge Penadés 5317f2c104 fix(SupplierFiscalData): refs #8916 integrate array data fetching on form save
gitea/salix-front/pipeline/pr-master This commit looks good Details
2025-04-16 12:03:15 +02:00
Alex Moreno 2d21ce3681 Merge pull request 'fix(ItemTags): wait data' (!1718) from hotFix_itemTags_id into master
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #1718
2025-04-16 08:18:45 +00:00
Alex Moreno 0af58c0536 refactor(cloneItem): simplify dialog invocation by removing unnecessary chaining
gitea/salix-front/pipeline/pr-master This commit looks good Details
2025-04-16 09:56:50 +02:00
Alex Moreno 650b205a04 fix(CrudModel, VnSelect): improve loading state handling and condition checks
gitea/salix-front/pipeline/pr-master Something is wrong with the build of this commit Details
2025-04-16 09:52:30 +02:00
Jorge Penadés f02013bc17 Merge branch 'dev' of https: refs #8277//gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-16 09:47:29 +02:00
Alex Moreno 71ae35be26 fix(ItemTags): wait data
gitea/salix-front/pipeline/pr-master This commit looks good Details
refactor: components use real loading
2025-04-16 09:18:53 +02:00
Jorge Penadés d51b03a941 fix: refs #8277 update preAccount function to handle agricultural entries and adjust notification checks
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-15 18:50:13 +02:00
Jorge Penadés 00063ae20a fix: refs #8277 update entry account options to use 'code' for value and sorting
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-15 16:27:25 +02:00
Jorge Penadés 494948cb20 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-15 14:43:30 +02:00
Jorge Penadés 070899b974 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-14 17:08:08 +02:00
Jorge Penadés 3d1da8345c refactor: refs #8277 simplify QBadge usage in invoice creation component
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-14 17:02:39 +02:00
Jorge Penadés a02174af7b refactor: refs #8277 update QBadge styling for company column in invoice creation
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-14 15:07:10 +02:00
Jorge Penadés e680cbc25d refactor: refs #8277 update invoice creation logic and adjust data filtering options
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-14 12:04:13 +02:00
Jorge Penadés 09d88e25ea Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-14 10:47:45 +02:00
Jorge Penadés fb638542bb refactor: refs #8277 remove redundant axios import from helper in EntryPreAccount tests
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-11 17:17:01 +02:00
Jorge Penadés 648d60c81f Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-04-11 16:30:22 +02:00
Jorge Penadés 3fa1f2961d Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-04-11 10:54:45 +02:00
Jorge Penadés 9434cdf851 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-04-10 11:34:09 +02:00
Jorge Penadés a0e3aab4e0 feat(EntryPreAccount): refs #8277 add company color badge to invoice entry table
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-04-10 11:33:19 +02:00
Jorge Penadés be41253d1e Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-04-09 11:25:47 +02:00
Jorge Penadés 35b09c829e fix(EntryPreAccount): refs #8277 remove unused save-url property from table component
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-04-08 18:00:37 +02:00
Jorge Penadés 87d4e02c9d fix(entryPreAccount): refs #8277 update test cases to use correct row ID for document inheritance
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-04-08 11:01:37 +02:00
Jorge Penadés 4151423a1b Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-04-08 10:42:52 +02:00
Jorge Penadés 966f52d3e3 chore: refs #8277 replace end-point name
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-04-07 17:15:52 +02:00
Jorge Penadés e8af2b6a74 test: refs #8277 add unit tests for EntryPreAccount component
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-04-07 16:55:15 +02:00
Jorge Penadés e127c4cec9 fix: refs #8277 improve tests
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-04-07 16:18:30 +02:00
Jorge Penadés 5b80c22bae fix: refs #8277 update tooltip text and add data-cy attributes for Cypress tests
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-04-07 12:49:25 +02:00
Jorge Penadés 5c2c78a894 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-07 12:07:52 +02:00
Jorge Penadés f79d7e0d9f refactor: refs #8277 rename entry control to pre-account in components and localization
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-04 17:14:42 +02:00
Jorge Penadés cd7f9e15fc refactor: refs #8277 rename dmsType to dmsTypeFk in EntryPreAccount.vue
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-04-04 12:55:02 +02:00
Jorge Penadés a1f93a87b2 refactor: refs #8277 rename entry control to pre-account in localization and routing
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-04-04 12:00:32 +02:00
Jorge Penadés ec19ecdc98 refactor: refs #8277 update account type labels and filter fields in EntryControl.vue
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-03 18:09:26 +02:00
Jorge Penadés 304dc7db49 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-03 10:34:09 +02:00
Jorge Penadés e65ad67bd8 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-02 16:26:03 +02:00
Jorge Penadés ce23d6f723 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-04-02 09:31:58 +02:00
Jorge Penadés 758ab77f6c refactor(EntryControl): refs #8277 add hasFile property to upload file data structure
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-04-01 18:04:15 +02:00
Jorge Penadés a92cbeb95d refactor(EntryControl): refs #8277 update dmsFk assignment to undefined for clarity
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-04-01 17:44:49 +02:00
Jorge Penadés 3120ca93e6 refactor(EntryControl): refs #8277 update file handling and improve dialog management
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-04-01 16:31:08 +02:00
Jorge Penadés dd908c49ce Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-01 09:28:33 +02:00
Jorge Penadés ec7a578bbc refactor(EntryControl): refs #8277 clean up supplierRef assignment and update comments
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-01 09:18:33 +02:00
Jorge Penadés 3545d8f5a4 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-03-31 16:45:05 +02:00
Jorge Penadés 61a9676c32 feat: refs #8277 changes
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-03-28 12:14:16 +01:00
Jorge Penadés 1117d3d07a feat: refs #8277 add invoice confirmation dialog and total amount calculation in EntryControl 2025-03-28 09:49:44 +01:00
Jorge Penadés 232cb7b4f4 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl 2025-03-28 09:45:54 +01:00
Jorge Penadés 00e6c79013 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-03-27 14:49:45 +01:00
Jorge Penadés ec328935c0 feat: refs #8277 add isBooked parameter to EntryControl for enhanced filtering
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-03-27 14:48:09 +01:00
Jorge Penadés d69211acaa Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-03-26 16:13:49 +01:00
Jorge Penadés 1badf92b1c feat: refs #8277 enhance pre-accounting process and integrate user warehouse data
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-03-25 17:28:13 +01:00
Jorge Penadés 998cde58a1 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-03-25 16:19:33 +01:00
Jorge Penadés a1840f14df feat: refs #8277 add confirmation dialog for pre-accounting entries and update localization
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-03-25 16:19:16 +01:00
Jorge Penadés 6fd7e6e875 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-03-25 09:40:54 +01:00
Jorge Penadés 06f721ae02 fix: refs #8277 validate supplier and company consistency in preAccount function
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-03-25 09:35:50 +01:00
Jorge Penadés 26e6427277 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-03-24 16:27:35 +01:00
Jorge Penadés 41c2c56013 chore: refs #8277 notes
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-03-24 15:48:24 +01:00
Jorge Penadés 890667c8a6 fix: refs #8277 add 'fit' class to supplier select component in EntryControl
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-03-24 15:24:21 +01:00
Jorge Penadés 18abb3e331 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-03-24 14:39:02 +01:00
Jorge Penadés dbb8d2a115 feat: refs #8277 add pre-account functionality and update daysAgo handling in EntryControl
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-03-21 12:25:14 +01:00
Jorge Penadés b528bb4ed1 fix: refs #8277 update daysAgo handling to use watch for reactive updates and set max limit to 365
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-03-21 10:15:15 +01:00
Jorge Penadés 456eb0a8e4 fix: refs #8277 update daysAgo limit to 365 days in localization files
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-03-21 09:04:39 +01:00
Jorge Penadés 0315b1c8fc Merge branch 'dev' of https: refs #8277//gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-03-21 08:51:50 +01:00
Jorge Penadés 9b3fc52377 feat: refs #8277 add agricultural and account type fields, enhance filtering options, and update localization
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-03-20 18:05:17 +01:00
Jorge Penadés ba38c42140 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-03-20 08:57:29 +01:00
Jorge Penadés 234269bdef feat: refs #8277 add entry type selection and localization to EntryControl
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-03-20 08:57:13 +01:00
Jorge Penadés e00fae2412 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl 2025-03-18 14:26:37 +01:00
Jorge Penadés 7a84e406e9 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-02-13 13:16:25 +01:00
Jorge Penadés 1facb04d7a feat: refs #8277 update EntryControl component with new column definitions and filters
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-02-12 18:24:41 +01:00
Jorge Penadés 0c8e13db8f Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-02-12 14:31:31 +01:00
Jorge Penadés 0c362d336b Merge branch 'dev' of https: refs #8277//gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-02-12 09:54:50 +01:00
Jorge Penadés fa7705d2fc feat: refs #8277 add control labels and update column definitions in EntryControl component 2025-02-12 09:53:43 +01:00
Jorge Penadés b87e4f52cf Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-02-11 14:19:26 +01:00
Jorge Penadés c153352311 Merge branch 'dev' of https: refs #8277//gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-02-11 09:36:00 +01:00
Jorge Penadés 7a1eb9bec6 feat: refs #8277 add Entry Control page and update localization files 2025-02-11 09:28:56 +01:00
28 changed files with 729 additions and 90 deletions

View File

@ -83,7 +83,7 @@ const isLoading = ref(false);
const hasChanges = ref(false);
const originalData = ref();
const vnPaginateRef = ref();
const formData = ref([]);
const formData = ref();
const saveButtonRef = ref(null);
const watchChanges = ref();
const formUrl = computed(() => $props.url);
@ -298,6 +298,10 @@ watch(formUrl, async () => {
});
</script>
<template>
<SkeletonTable
v-if="!formData && ($attrs['auto-load'] === '' || $attrs['auto-load'])"
:columns="$attrs.columns?.length"
/>
<VnPaginate
:url="url"
:limit="limit"
@ -316,10 +320,6 @@ watch(formUrl, async () => {
></slot>
</template>
</VnPaginate>
<SkeletonTable
v-if="!formData && $attrs.autoLoad"
:columns="$attrs.columns?.length"
/>
<Teleport to="#st-actions" v-if="stateStore?.isSubToolbarShown() && hasSubToolbar">
<QBtnGroup push style="column-gap: 10px">
<slot name="moreBeforeActions" />

View File

@ -68,19 +68,19 @@ const formatDate = () => {
if (!value || value === model.value) {
textColor.value = '';
return;
}
}
const regex =
/^([0]?[1-9]|[12][0-9]|3[01])([./-])([0]?[1-9]|1[0-2])([./-](\d{1,4}))?$/;
if (!regex.test(value)){
if (!regex.test(value)) {
textColor.value = errColor;
return;
}
}
value = value.replace(/[.-]/g, '/');
const parts = value.split('/');
if (parts.length < 2) {
textColor.value = errColor;
return;
return;
}
let [day, month, year] = parts;
@ -107,13 +107,13 @@ const formatDate = () => {
let isoCandidate = `${year}/${month}/${day}`;
isoCandidate = date.formatDate(
new Date(isoCandidate).toISOString(),
'YYYY-MM-DDTHH:mm:ss.SSSZ',
);
new Date(isoCandidate).toISOString(),
'YYYY-MM-DDTHH:mm:ss.SSSZ',
);
const [isoYear, isoMonth, isoDay] = isoCandidate.split('-').map((e) => parseInt(e));
const parsedDate = new Date(isoYear, isoMonth - 1, isoDay);
const isValidDate =
const isValidDate =
parsedDate instanceof Date &&
!isNaN(parsedDate) &&
parsedDate.getFullYear() === parseInt(year) &&
@ -158,7 +158,6 @@ const handleEnter = (event) => {
<template>
<div @mouseover="hover = true" @mouseleave="hover = false">
{{ console.log($q) }}
<QInput
ref="vnInputDateRef"
v-model="inputValue"
@ -168,7 +167,7 @@ const handleEnter = (event) => {
:class="{ required: isRequired }"
:rules="mixinRules"
:clearable="false"
:input-style="{color: textColor}"
:input-style="{ color: textColor }"
@click="isPopupOpen = !isPopupOpen"
@keydown="isPopupOpen = false"
@blur="formatDate"

View File

@ -186,6 +186,7 @@ onMounted(() => {
if ($props.focusOnMount) setTimeout(() => vnSelectRef.value.showPopup(), 300);
});
const someIsLoading = computed(() => isLoading.value || !!arrayData?.isLoading?.value);
function findKeyInOptions() {
if (!$props.options) return;
return filter($props.modelValue, $props.options)?.length;
@ -366,7 +367,8 @@ function getCaption(opt) {
virtual-scroll-slice-size="options.length"
hide-bottom-space
:input-debounce="useURL ? '300' : '0'"
:loading="isLoading"
:loading="someIsLoading"
:disable="someIsLoading"
@virtual-scroll="onScroll"
@keydown="handleKeyDown"
:data-cy="$attrs.dataCy ?? $attrs.label + '_select'"
@ -374,7 +376,7 @@ function getCaption(opt) {
>
<template #append>
<QIcon
v-show="isClearable && value"
v-show="isClearable && value != null && value !== ''"
name="close"
@click="
() => {
@ -389,7 +391,7 @@ function getCaption(opt) {
<template v-for="(_, slotName) in $slots" #[slotName]="slotData" :key="slotName">
<div v-if="slotName == 'append'">
<QIcon
v-show="isClearable && value"
v-show="isClearable && value != null && value !== ''"
name="close"
@click.stop="
() => {
@ -414,7 +416,7 @@ function getCaption(opt) {
<QItemLabel>
{{ opt[optionLabel] }}
</QItemLabel>
<QItemLabel caption v-if="getCaption(opt)">
<QItemLabel caption v-if="getCaption(opt) !== false">
{{ `#${getCaption(opt)}` }}
</QItemLabel>
</QItemSection>

View File

@ -44,8 +44,7 @@ onBeforeMount(async () => {
});
// It enables to load data only once if the module is the same as the dataKey
if (!isSameDataKey.value || !route.params.id || $props.id !== route.params.id)
await getData();
if (!isSameDataKey.value || !route.params.id) await getData();
watch(
() => [$props.url, $props.filter],
async () => {

View File

@ -89,24 +89,26 @@ function cancel() {
<slot name="customHTML"></slot>
</QCardSection>
<QCardActions align="right">
<QBtn
:label="t('globals.cancel')"
color="primary"
:disable="isLoading"
flat
@click="cancel()"
data-cy="VnConfirm_cancel"
/>
<QBtn
:label="t('globals.confirm')"
:title="t('globals.confirm')"
color="primary"
:loading="isLoading"
@click="confirm()"
unelevated
autofocus
data-cy="VnConfirm_confirm"
/>
<slot name="actions" :actions="{ confirm, cancel }">
<QBtn
:label="t('globals.cancel')"
color="primary"
:disable="isLoading"
flat
@click="cancel()"
data-cy="VnConfirm_cancel"
/>
<QBtn
:label="t('globals.confirm')"
:title="t('globals.confirm')"
color="primary"
:loading="isLoading"
@click="confirm()"
unelevated
autofocus
data-cy="VnConfirm_confirm"
/>
</slot>
</QCardActions>
</QCard>
</QDialog>

View File

@ -1,4 +1,4 @@
import { onMounted, computed } from 'vue';
import { onMounted, computed, ref } from 'vue';
import { useRouter, useRoute } from 'vue-router';
import axios from 'axios';
import { useArrayDataStore } from 'stores/useArrayDataStore';
@ -346,7 +346,7 @@ export function useArrayData(key, userOptions) {
}
const totalRows = computed(() => (store.data && store.data.length) || 0);
const isLoading = computed(() => store.isLoading || false);
const isLoading = ref(store.isLoading || false);
return {
fetch,

View File

@ -346,6 +346,7 @@ globals:
parking: Parking
vehicleList: Vehicles
vehicle: Vehicle
entryPreAccount: Pre-account
unsavedPopup:
title: Unsaved changes will be lost
subtitle: Are you sure exit without saving?

View File

@ -349,6 +349,7 @@ globals:
parking: Parking
vehicleList: Vehículos
vehicle: Vehículo
entryPreAccount: Precontabilizar
unsavedPopup:
title: Los cambios que no haya guardado se perderán
subtitle: ¿Seguro que quiere salir sin guardar?

View File

@ -0,0 +1,477 @@
<script setup>
import { ref, computed, markRaw, useTemplateRef, onBeforeMount, watch } from 'vue';
import { useI18n } from 'vue-i18n';
import { toDate, toCurrency } from 'src/filters';
import { useArrayData } from 'src/composables/useArrayData';
import VnTable from 'src/components/VnTable/VnTable.vue';
import FetchData from 'src/components/FetchData.vue';
import VnSelectSupplier from 'src/components/common/VnSelectSupplier.vue';
import EntryDescriptorProxy from './Card/EntryDescriptorProxy.vue';
import SupplierDescriptorProxy from '../Supplier/Card/SupplierDescriptorProxy.vue';
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
import axios from 'axios';
import useNotify from 'src/composables/useNotify';
import VnConfirm from 'src/components/ui/VnConfirm.vue';
import VnDms from 'src/components/common/VnDms.vue';
import { useState } from 'src/composables/useState';
import { useQuasar } from 'quasar';
import InvoiceInDescriptorProxy from '../InvoiceIn/Card/InvoiceInDescriptorProxy.vue';
import { useStateStore } from 'src/stores/useStateStore';
import { downloadFile } from 'src/composables/downloadFile';
const { t } = useI18n();
const quasar = useQuasar();
const { notify } = useNotify();
const user = useState().getUser();
const stateStore = useStateStore();
const updateDialog = ref();
const uploadDialog = ref();
let maxDays;
let defaultDays;
const dataKey = 'entryPreaccountingFilter';
const url = 'Entries/preAccountingFilter';
const arrayData = useArrayData(dataKey);
const daysAgo = ref();
const isBooked = ref();
const dmsData = ref();
const table = useTemplateRef('table');
const companies = ref([]);
const countries = ref([]);
const entryTypes = ref([]);
const supplierFiscalTypes = ref([]);
const warehouses = ref([]);
const defaultDmsDescription = ref();
const dmsTypeId = ref();
const selectedRows = ref([]);
const totalAmount = ref();
const totalSelectedAmount = computed(() => {
if (!selectedRows.value.length) return 0;
return selectedRows.value.reduce((acc, entry) => acc + entry.amount, 0);
});
let supplierRef;
let dmsFk;
const columns = computed(() => [
{
name: 'id',
label: t('entry.preAccount.id'),
isId: true,
chip: {
condition: () => true,
},
},
{
name: 'invoiceNumber',
label: t('entry.preAccount.invoiceNumber'),
},
{
name: 'company',
label: t('globals.company'),
columnFilter: {
component: 'select',
name: 'companyFk',
optionLabel: 'code',
options: companies.value,
},
},
{
name: 'warehouse',
label: t('globals.warehouse'),
columnFilter: {
component: 'select',
name: 'warehouseInFk',
options: warehouses.value,
},
},
{
name: 'gestDocFk',
label: t('entry.preAccount.gestDocFk'),
},
{
name: 'dmsType',
label: t('entry.preAccount.dmsType'),
columnFilter: {
component: 'select',
label: null,
name: 'dmsTypeFk',
url: 'DmsTypes',
fields: ['id', 'name'],
},
},
{
name: 'reference',
label: t('entry.preAccount.reference'),
},
{
name: 'shipped',
label: t('entry.preAccount.shipped'),
format: ({ shipped }, dashIfEmpty) => dashIfEmpty(toDate(shipped)),
columnFilter: {
component: 'date',
name: 'shipped',
},
},
{
name: 'landed',
label: t('entry.preAccount.landed'),
format: ({ landed }, dashIfEmpty) => dashIfEmpty(toDate(landed)),
columnFilter: {
component: 'date',
name: 'landed',
},
},
{
name: 'invoiceInFk',
label: t('entry.preAccount.invoiceInFk'),
},
{
name: 'supplier',
label: t('globals.supplier'),
format: (row) => row.supplier,
columnFilter: {
component: markRaw(VnSelectSupplier),
label: null,
name: 'supplierFk',
class: 'fit',
},
},
{
name: 'country',
label: t('globals.country'),
columnFilter: {
component: 'select',
name: 'countryFk',
options: countries.value,
},
},
{
name: 'description',
label: t('entry.preAccount.entryType'),
columnFilter: {
component: 'select',
label: null,
name: 'typeFk',
options: entryTypes.value,
optionLabel: 'description',
optionValue: 'code',
},
},
{
name: 'payDem',
label: t('entry.preAccount.payDem'),
columnFilter: {
component: 'number',
name: 'payDem',
},
},
{
name: 'fiscalCode',
label: t('entry.preAccount.fiscalCode'),
format: ({ fiscalCode }) => t(fiscalCode),
columnFilter: {
component: 'select',
name: 'fiscalCode',
options: supplierFiscalTypes.value,
optionLabel: 'locale',
optionValue: 'code',
sortBy: 'code',
},
},
{
name: 'amount',
label: t('globals.amount'),
format: ({ amount }) => toCurrency(amount),
columnFilter: {
component: 'number',
name: 'amount',
},
},
{
name: 'isAgricultural',
label: t('entry.preAccount.isAgricultural'),
component: 'checkbox',
isEditable: false,
},
{
name: 'isBooked',
label: t('entry.preAccount.isBooked'),
component: 'checkbox',
},
{
name: 'isReceived',
label: t('entry.preAccount.isReceived'),
component: 'checkbox',
isEditable: false,
},
]);
onBeforeMount(async () => {
const { data } = await axios.get('EntryConfigs/findOne', {
params: { filter: JSON.stringify({ fields: ['maxDays', 'defaultDays'] }) },
});
maxDays = data.maxDays;
defaultDays = data.defaultDays;
daysAgo.value = arrayData.store.userParams.daysAgo || defaultDays;
isBooked.value = arrayData.store.userParams.isBooked || false;
stateStore.leftDrawer = false;
});
watch(selectedRows, (nVal, oVal) => {
const lastRow = nVal.at(-1);
if (lastRow?.isBooked) selectedRows.value.pop();
if (nVal.length > oVal.length && lastRow.invoiceInFk)
quasar.dialog({
component: VnConfirm,
componentProps: { title: t('entry.preAccount.hasInvoice') },
});
});
function filterByDaysAgo(val) {
if (!val) val = defaultDays;
else if (val > maxDays) val = maxDays;
daysAgo.value = val;
arrayData.store.userParams.daysAgo = daysAgo.value;
table.value.reload();
}
async function preAccount() {
const entries = selectedRows.value;
const { companyFk, isAgricultural, landed } = entries.at(0);
try {
dmsFk = entries.find(({ gestDocFk }) => gestDocFk)?.gestDocFk;
if (isAgricultural) {
const year = new Date(landed).getFullYear();
supplierRef = (
await axios.get('InvoiceIns/getMaxRef', { params: { companyFk, year } })
).data;
return createInvoice();
} else if (dmsFk) {
supplierRef = (
await axios.get(`Dms/${dmsFk}`, {
params: { filter: JSON.stringify({ fields: ['reference'] }) },
})
).data?.reference;
updateDialog.value.show();
} else {
uploadFile();
}
} catch (e) {
throw e;
}
}
async function updateFile() {
await axios.post(`Dms/${dmsFk}/updateFile`, { dmsTypeId: dmsTypeId.value });
await createInvoice();
}
async function uploadFile() {
const firstSelectedEntry = selectedRows.value.at(0);
const { supplier, companyFk, invoiceNumber } = firstSelectedEntry;
dmsData.value = {
dmsTypeFk: dmsTypeId.value,
warehouseFk: user.value.warehouseFk,
companyFk: companyFk,
description: supplier + defaultDmsDescription.value + invoiceNumber,
hasFile: false,
};
uploadDialog.value.show();
}
async function afterUploadFile({ reference }, res) {
supplierRef = reference;
dmsFk = res.data[0].id;
await createInvoice();
}
async function createInvoice() {
try {
await axios.post(`Entries/addInvoiceIn`, {
ids: selectedRows.value.map((entry) => entry.id),
supplierRef,
dmsFk,
});
notify(t('entry.preAccount.success'), 'positive');
} catch (e) {
throw e;
} finally {
supplierRef = null;
dmsFk = undefined;
selectedRows.value.length = 0;
table.value.reload();
}
}
</script>
<template>
<FetchData
url="Countries"
:filter="{ fields: ['id', 'name'] }"
@on-fetch="(data) => (countries = data)"
auto-load
/>
<FetchData
url="Companies"
:filter="{ fields: ['id', 'code'] }"
@on-fetch="(data) => (companies = data)"
auto-load
/>
<FetchData
url="Warehouses"
:filter="{ fields: ['id', 'name'] }"
@on-fetch="(data) => (warehouses = data)"
auto-load
/>
<FetchData
url="EntryTypes"
:filter="{ fields: ['code', 'description'] }"
@on-fetch="(data) => (entryTypes = data)"
auto-load
/>
<FetchData
url="supplierFiscalTypes"
:filter="{ fields: ['code'] }"
@on-fetch="
(data) =>
(supplierFiscalTypes = data.map((x) => ({ locale: t(x.code), ...x })))
"
auto-load
/>
<FetchData
url="InvoiceInConfigs/findOne"
:filter="{ fields: ['defaultDmsDescription'] }"
@on-fetch="(data) => (defaultDmsDescription = data?.defaultDmsDescription)"
auto-load
/>
<FetchData
url="DmsTypes/findOne"
:filter="{ fields: ['id'] }"
:where="{ code: 'invoiceIn' }"
@on-fetch="(data) => (dmsTypeId = data?.id)"
auto-load
/>
<VnSearchbar
:data-key
:url
:label="t('entry.preAccount.search')"
:info="t('entry.preAccount.searchInfo')"
:search-remove-params="false"
/>
<VnTable
v-model:selected="selectedRows"
:data-key
:columns
:url
:search-url="dataKey"
ref="table"
:disable-option="{ card: true }"
redirect="Entry"
:order="['landed DESC']"
:right-search="false"
:user-params="{ daysAgo, isBooked }"
:row-click="false"
:table="{ selection: 'multiple' }"
:limit="0"
:footer="true"
@on-fetch="
(data) => (totalAmount = data?.reduce((acc, entry) => acc + entry.amount, 0))
"
auto-load
>
<template #top-left>
<QBtn
data-cy="preAccount_btn"
icon="account_balance"
color="primary"
class="q-mr-sm"
:disable="!selectedRows.length"
@click="preAccount"
>
<QTooltip>{{ t('entry.preAccount.btn') }}</QTooltip>
</QBtn>
<VnInputNumber
v-model="daysAgo"
:label="$t('globals.daysAgo')"
dense
:step="1"
:decimal-places="0"
@update:model-value="filterByDaysAgo"
debounce="500"
:title="t('entry.preAccount.daysAgo')"
/>
</template>
<template #column-id="{ row }">
<span class="link" @click.stop>
{{ row.id }}
<EntryDescriptorProxy :id="row.id" />
</span>
</template>
<template #column-company="{ row }">
<QBadge :color="row.color ?? 'transparent'" :label="row.company" />
</template>
<template #column-gestDocFk="{ row }">
<span class="link" @click.stop="downloadFile(row.gestDocFk)">
{{ row.gestDocFk }}
</span>
</template>
<template #column-supplier="{ row }">
<span class="link" @click.stop>
{{ row.supplier }}
<SupplierDescriptorProxy :id="row.supplierFk" />
</span>
</template>
<template #column-invoiceInFk="{ row }">
<span class="link" @click.stop>
{{ row.invoiceInFk }}
<InvoiceInDescriptorProxy :id="row.invoiceInFk" />
</span>
</template>
<template #column-footer-amount>
<div v-text="toCurrency(totalSelectedAmount)" />
<div v-text="toCurrency(totalAmount)" />
</template>
</VnTable>
<VnConfirm
ref="updateDialog"
:title="t('entry.preAccount.dialog.title')"
:message="t('entry.preAccount.dialog.message')"
>
<template #actions>
<QBtn
data-cy="updateFileYes"
:label="t('globals.yes')"
color="primary"
@click="updateFile"
autofocus
v-close-popup
/>
<QBtn
data-cy="updateFileNo"
:label="t('globals.no')"
color="primary"
flat
@click="uploadFile"
v-close-popup
/>
<QBtn :label="t('globals.cancel')" color="primary" flat v-close-popup />
</template>
</VnConfirm>
<QDialog ref="uploadDialog">
<VnDms
model="dms"
:form-initial-data="dmsData"
url="Dms/uploadFile"
@on-data-saved="afterUploadFile"
/>
</QDialog>
</template>
<i18n>
en:
IntraCommunity: Intra-community
NonCommunity: Non-community
CanaryIslands: Canary Islands
es:
IntraCommunity: Intracomunitaria
NonCommunity: Extracomunitaria
CanaryIsland: Islas Canarias
National: Nacional
</i18n>

View File

@ -0,0 +1,63 @@
import { vi, describe, expect, it, beforeAll, afterEach } from 'vitest';
import { createWrapper } from 'app/test/vitest/helper';
import EntryPreAccount from '../EntryPreAccount.vue';
import axios from 'axios';
describe('EntryPreAccount', () => {
let wrapper;
let vm;
beforeAll(() => {
vi.spyOn(axios, 'get').mockImplementation((url) => {
if (url == 'EntryConfigs/findOne')
return { data: { maxDays: 90, defaultDays: 30 } };
return { data: [] };
});
wrapper = createWrapper(EntryPreAccount);
vm = wrapper.vm;
});
afterEach(() => {
vi.clearAllMocks();
});
describe('filterByDaysAgo()', () => {
it('should set daysAgo to defaultDays if no value is provided', () => {
vm.filterByDaysAgo();
expect(vm.daysAgo).toBe(vm.defaultDays);
expect(vm.arrayData.store.userParams.daysAgo).toBe(vm.defaultDays);
});
it('should set daysAgo to maxDays if the value exceeds maxDays', () => {
vm.filterByDaysAgo(500);
expect(vm.daysAgo).toBe(vm.maxDays);
expect(vm.arrayData.store.userParams.daysAgo).toBe(vm.maxDays);
});
it('should set daysAgo to the provided value if it is valid', () => {
vm.filterByDaysAgo(30);
expect(vm.daysAgo).toBe(30);
expect(vm.arrayData.store.userParams.daysAgo).toBe(30);
});
});
describe('Dialog behavior when adding a new row', () => {
it('should open the dialog if the new row has invoiceInFk', async () => {
const dialogSpy = vi.spyOn(vm.quasar, 'dialog');
const selectedRows = [{ id: 1, invoiceInFk: 123 }];
vm.selectedRows = selectedRows;
await vm.$nextTick();
expect(dialogSpy).toHaveBeenCalledWith({
component: vm.VnConfirm,
componentProps: { title: vm.t('entry.preAccount.hasInvoice') },
});
});
it('should not open the dialog if the new row does not have invoiceInFk', async () => {
const dialogSpy = vi.spyOn(vm.quasar, 'dialog');
vm.selectedRows = [{ id: 1, invoiceInFk: null }];
await vm.$nextTick();
expect(dialogSpy).not.toHaveBeenCalled();
});
});
});

View File

@ -118,6 +118,33 @@ entry:
searchInfo: You can search by entry reference
descriptorMenu:
showEntryReport: Show entry report
preAccount:
gestDocFk: Gestdoc
dmsType: Gestdoc type
invoiceNumber: Entry ref.
reference: Gestdoc ref.
shipped: Shipped
landed: Landed
id: Entry
invoiceInFk: Invoice in
supplierFk: Supplier
country: Country
description: Entry type
payDem: Payment term
isBooked: B
isReceived: R
entryType: Entry type
isAgricultural: Agricultural
fiscalCode: Account type
daysAgo: Max 365 days
search: Search
searchInfo: You can search by supplier name or nickname
btn: Pre-account
hasInvoice: This entry has already an invoice in
success: It has been successfully pre-accounted
dialog:
title: Pre-account entries
message: Do you want the invoice to inherit the entry document?
entryFilter:
params:
isExcludedFromAvailable: Excluded from available

View File

@ -69,6 +69,33 @@ entry:
observationType: Tipo de observación
search: Buscar entradas
searchInfo: Puedes buscar por referencia de entrada
preAccount:
gestDocFk: Gestdoc
dmsType: Tipo gestdoc
invoiceNumber: Ref. Entrada
reference: Ref. GestDoc
shipped: F. envío
landed: F. llegada
id: Entrada
invoiceInFk: Recibida
supplierFk: Proveedor
country: País
description: Tipo de Entrada
payDem: Plazo de pago
isBooked: C
isReceived: R
entryType: Tipo de entrada
isAgricultural: Agricultural
fiscalCode: Tipo de cuenta
daysAgo: Máximo 365 días
search: Buscar
searchInfo: Puedes buscar por nombre o alias de proveedor
btn: Precontabilizar
hasInvoice: Esta entrada ya tiene una f. recibida
success: Se ha precontabilizado correctamente
dialog:
title: Precontabilizar entradas
message: ¿Desea que la factura herede el documento de la entrada?
params:
entryFk: Entrada
observationTypeFk: Tipo de observación

View File

@ -89,7 +89,6 @@ const insertTag = (rows) => {
:default-remove="false"
:user-filter="{
fields: ['id', 'itemFk', 'tagFk', 'value', 'priority'],
where: { itemFk: route.params.id },
include: {
relation: 'tag',
scope: {
@ -97,6 +96,7 @@ const insertTag = (rows) => {
},
},
}"
:filter="{ where: { itemFk: route.params.id } }"
order="priority"
auto-load
@on-fetch="onItemTagsFetched"

View File

@ -11,26 +11,19 @@ export function cloneItem() {
const router = useRouter();
const cloneItem = async (entityId) => {
const { id } = entityId;
try {
const { data } = await axios.post(`Items/${id ?? entityId}/clone`);
router.push({ name: 'ItemTags', params: { id: data.id } });
} catch (err) {
console.error('Error cloning item');
}
const { data } = await axios.post(`Items/${id ?? entityId}/clone`);
router.push({ name: 'ItemTags', params: { id: data.id } });
};
const openCloneDialog = async (entityId) => {
quasar
.dialog({
component: VnConfirm,
componentProps: {
title: t('item.descriptor.clone.title'),
message: t('item.descriptor.clone.subTitle'),
},
})
.onOk(async () => {
await cloneItem(entityId);
});
quasar.dialog({
component: VnConfirm,
componentProps: {
title: t('item.descriptor.clone.title'),
message: t('item.descriptor.clone.subTitle'),
promise: () => cloneItem(entityId),
},
});
};
return { openCloneDialog };
}

View File

@ -11,10 +11,10 @@ import VnSelect from 'src/components/common/VnSelect.vue';
import VnLocation from 'src/components/common/VnLocation.vue';
import VnAccountNumber from 'src/components/common/VnAccountNumber.vue';
import VnCheckbox from 'src/components/common/VnCheckbox.vue';
import { useArrayData } from 'src/composables/useArrayData';
const route = useRoute();
const { t } = useI18n();
const arrayData = useArrayData('Supplier');
const sageTaxTypesOptions = ref([]);
const sageWithholdingsOptions = ref([]);
const sageTransactionTypesOptions = ref([]);
@ -89,6 +89,7 @@ function handleLocation(data, location) {
}"
auto-load
:clear-store-on-unmount="false"
@on-data-saved="arrayData.fetch({})"
>
<template #form="{ data, validate }">
<VnRow>

View File

@ -33,7 +33,7 @@ onUnmounted(() => {
stateStore.rightDrawer = true;
});
const entityId = computed(() => route.params.id);
const entityId = computed(() => route.params.itemFk);
const item = ref({});
const itemProposalSelected = ref(null);

View File

@ -7,7 +7,6 @@ import { onBeforeMount } from 'vue';
import { dashIfEmpty, toDate, toHour } from 'src/filters';
import { useRouter } from 'vue-router';
import { useState } from 'src/composables/useState';
import { useRole } from 'src/composables/useRole';
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
import RightMenu from 'src/components/common/RightMenu.vue';
import TicketLackFilter from './TicketLackFilter.vue';
@ -25,10 +24,11 @@ const negativeParams = reactive({
availabled: Date.getCurrentDateTimeFormatted(),
});
const redirectToCreateView = ({ itemFk }) => {
router.push({
const route = {
name: 'NegativeDetail',
params: { id: itemFk },
});
params: { itemFk },
};
router.push(route);
};
const columns = computed(() => [
{

View File

@ -38,7 +38,7 @@ const filterLack = ref({
const selectedRows = ref([]);
const { t } = useI18n();
const { notify } = useNotify();
const entityId = computed(() => route.params.id);
const entityId = computed(() => route.params.itemFk);
const item = ref({});
const route = useRoute();
const columns = computed(() => [

View File

@ -42,11 +42,7 @@ const groupedStates = ref([]);
auto-load
/>
<FetchData url="Warehouses" @on-fetch="(data) => (warehouses = data)" auto-load />
<VnFilterPanel
:data-key="props.dataKey"
:search-button="true"
:unremovableParams="['from', 'to']"
>
<VnFilterPanel :data-key="props.dataKey" :search-button="true">
<template #tags="{ tag, formatFn }">
<div class="q-gutter-x-xs">
<strong>{{ t(`params.${tag.label}`) }}: </strong>
@ -188,16 +184,6 @@ const groupedStates = ref([]);
/>
</QItemSection>
</QItem>
<QItem>
<QItemSection>
<QCheckbox
v-model="params.problems"
@update:model-value="searchFn()"
:label="t('With problems')"
toggle-indeterminate
/>
</QItemSection>
</QItem>
<QItem>
<QItemSection v-if="!provinces">
<QSkeleton type="QInput" class="full-width" />

View File

@ -128,6 +128,7 @@ const columns = computed(() => [
columnFilter: false,
label: t('ticketList.hour'),
format: (row) => toTimeFormat(row.shipped),
orderBy: false,
},
{
align: 'left',
@ -136,6 +137,7 @@ const columns = computed(() => [
columnFilter: false,
label: t('ticketList.closure'),
format: (row, dashIfEmpty) => dashIfEmpty(toTimeFormat(row.zoneLanding)),
orderBy: false,
},
{
align: 'left',
@ -477,7 +479,7 @@ function setReference(data) {
prefix="card"
:array-data-props="{
url: 'Tickets/filter',
order: ['shipped DESC', 'shippedHour ASC', 'zoneLanding ASC', 'id'],
order: ['shipped DESC', 'id DESC'],
exprBuilder,
}"
>

View File

@ -85,6 +85,7 @@ export default {
'EntryLatestBuys',
'EntryStockBought',
'EntryWasteRecalc',
'EntryPreAccount',
],
},
component: RouterView,
@ -94,6 +95,7 @@ export default {
name: 'EntryMain',
path: '',
component: () => import('src/components/common/VnModule.vue'),
props: (route) => ({ leftDrawer: route.name !== 'EntryPreAccount' }),
redirect: { name: 'EntryIndexMain' },
children: [
{
@ -150,6 +152,15 @@ export default {
},
component: () => import('src/pages/Entry/EntryWasteRecalc.vue'),
},
{
path: 'pre-account',
name: 'EntryPreAccount',
meta: {
title: 'entryPreAccount',
icon: 'account_balance',
},
component: () => import('src/pages/Entry/EntryPreAccount.vue'),
},
],
},
],

View File

@ -251,7 +251,7 @@ export default {
},
{
name: 'NegativeDetail',
path: ':id',
path: ':itemFk',
meta: {
title: 'summary',
icon: 'launch',

View File

@ -1,5 +1,5 @@
import '../commands.js';
describe('EntryDescriptor', () => {
describe.skip('EntryDescriptor', () => {
beforeEach(() => {
cy.login('buyer');
cy.visit(`/#/entry/list`);

View File

@ -0,0 +1,48 @@
/// <reference types="cypress" />
describe('Entry PreAccount Functionality', () => {
beforeEach(() => {
cy.login('administrative');
cy.visit('/#/entry/pre-account');
});
it("should pre-account without questions if it's agricultural", () => {
selectRowsByCol('id', [2]);
cy.dataCy('preAccount_btn').click();
cy.checkNotification('It has been successfully pre-accounted');
});
it("should ask to upload a doc. if it's not agricultural and doesn't have doc. ", () => {
selectRowsByCol('id', [3]);
cy.dataCy('preAccount_btn').click();
cy.dataCy('Reference_input').type('{selectall}234343fh', { delay: 0 });
cy.dataCy('VnDms_inputFile').selectFile('test/cypress/fixtures/image.jpg', {
force: true,
});
cy.dataCy('FormModelPopup_save').click();
cy.checkNotification('It has been successfully pre-accounted');
});
it('should ask to inherit the doc. and open VnDms popup if user choose "no"', () => {
selectRowsByCol('id', [101]);
cy.dataCy('preAccount_btn').click();
cy.dataCy('updateFileNo').click();
cy.get('#formModel').should('be.visible');
});
it('should ask to inherit the doc. and open VnDms popup if user choose "yes" and pre-account', () => {
selectRowsByCol('id', [101]);
cy.dataCy('preAccount_btn').click();
cy.dataCy('updateFileYes').click();
cy.checkNotification('It has been successfully pre-accounted');
});
});
function selectRowsByCol(col = 'id', vals = []) {
for (const val of vals) {
const regex = new RegExp(`^\\s*(${val})\\s*$`);
cy.contains(`[data-col-field="${col}"]`, regex)
.parent()
.find('td > .q-checkbox')
.click();
}
}

View File

@ -28,7 +28,7 @@ describe('InvoiceOut list', () => {
cy.dataCy('InvoiceOutDownloadPdfBtn').click();
});
it.skip('should open the invoice descriptor from table icon', () => {
it('should open the invoice descriptor from table icon', () => {
cy.get(firstSummaryIcon).click();
cy.get('.cardSummary').should('be.visible');
cy.get('.summaryHeader > div').should('include.text', 'V10100001');

View File

@ -15,7 +15,7 @@ describe('InvoiceOut summary', () => {
cy.login('developer');
cy.visit(`/#/invoice-out/1/summary`);
});
it.skip('open the descriptors', () => {
it('open the descriptors', () => {
cy.get(firstRowDescriptors(1)).click();
cy.get('.descriptor').should('be.visible');
cy.get('.q-item > .q-item__label').should('include.text', '1');
@ -30,7 +30,7 @@ describe('InvoiceOut summary', () => {
cy.get('.q-item > .q-item__label').should('include.text', '1101');
});
it.skip('should open the ticket list', () => {
it('should open the ticket list', () => {
cy.get(toTicketList).click();
cy.get('[data-col-field="stateFk"]').each(($el) => {
cy.wrap($el).contains('T1111111');

View File

@ -6,7 +6,7 @@ describe('Item tax', () => {
});
it('should modify the tax for Spain', () => {
cy.dataCy('Class_select').eq(1).type('General VAT{enter}');
cy.dataCy('Class_select').eq(1).type('IVA General{enter}');
cy.dataCy('crudModelDefaultSaveBtn').click();
cy.checkNotification('Data saved');
});

View File

@ -2,7 +2,7 @@
const firstRow = 'tbody > :nth-child(1)';
describe('TicketSale', () => {
describe.skip('Ticket #23', () => {
describe('Ticket #23', () => {
beforeEach(() => {
cy.login('claimManager');
cy.viewport(1920, 1080);