From 679dd6929bfde285fe1a501f9199dbcd5fd26af2 Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 6 Nov 2024 13:42:36 +0100 Subject: [PATCH 1/5] feat: refs #6583 add new opt in where builder --- modules/ticket/back/methods/ticket/getTicketsAdvance.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/ticket/back/methods/ticket/getTicketsAdvance.js b/modules/ticket/back/methods/ticket/getTicketsAdvance.js index 41f3ee79a..6abac455f 100644 --- a/modules/ticket/back/methods/ticket/getTicketsAdvance.js +++ b/modules/ticket/back/methods/ticket/getTicketsAdvance.js @@ -55,6 +55,11 @@ module.exports = Self => { type: 'number', description: 'Department identifier' }, + { + arg: 'onlyWithDestination', + type: 'Boolean', + description: 'True when only tickets with destination are returned' + }, { arg: 'filter', type: 'object', @@ -103,6 +108,9 @@ module.exports = Self => { return {'f.isFullMovable': value}; case 'departmentFk': return {'f.departmentFk': value}; + case 'onlyWithDestination': + if (!value) return; + return {'f.id': {neq: null}}; } }); -- 2.40.1 From 611cd12392f80e6833c14f4763b956c044a27465 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 7 Nov 2024 16:16:40 +0100 Subject: [PATCH 2/5] feat: refs #6583 retrieve cloned sale --- db/routines/vn/procedures/ticket_canAdvance.sql | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/db/routines/vn/procedures/ticket_canAdvance.sql b/db/routines/vn/procedures/ticket_canAdvance.sql index e8fc70bba..cee706e08 100644 --- a/db/routines/vn/procedures/ticket_canAdvance.sql +++ b/db/routines/vn/procedures/ticket_canAdvance.sql @@ -52,7 +52,8 @@ BEGIN IFNULL(dest.nickname, origin.nickname) nickname, dest.landed, dest.preparation, - origin.departmentFk + origin.departmentFk, + origin.saleClonedFk FROM ( SELECT s.ticketFk, c.salesPersonFk workerFk, @@ -73,11 +74,13 @@ BEGIN t.warehouseFk, t.companyFk, t.agencyModeFk, - wd.departmentFk + wd.departmentFk, + sc.saleClonedFk FROM ticket t JOIN client c ON c.id = t.clientFk JOIN workerDepartment wd ON wd.workerFk = c.salesPersonFk JOIN sale s ON s.ticketFk = t.id + LEFT JOIN saleCloned sc ON sc.saleClonedFk = s.id JOIN saleVolume sv ON sv.saleFk = s.id JOIN item i ON i.id = s.itemFk JOIN ticketState ts ON ts.ticketFk = t.id -- 2.40.1 From 41512a0516294d2709b3836585d5239c2b84c97e Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 11 Nov 2024 16:09:26 +0100 Subject: [PATCH 3/5] refactor: refs #6583 entry report table style --- .../reports/entry-order/assets/css/style.css | 5 +++ .../reports/entry-order/entry-order.html | 44 +++++++++---------- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/print/templates/reports/entry-order/assets/css/style.css b/print/templates/reports/entry-order/assets/css/style.css index 767b1185a..1a5ea3eb6 100644 --- a/print/templates/reports/entry-order/assets/css/style.css +++ b/print/templates/reports/entry-order/assets/css/style.css @@ -17,4 +17,9 @@ h3 { .tags { font-size: 10px; margin: 0; +} + +.column-oriented th, +.column-oriented td{ + padding: 5px } \ No newline at end of file diff --git a/print/templates/reports/entry-order/entry-order.html b/print/templates/reports/entry-order/entry-order.html index e5d3bfb6d..77545ef9b 100644 --- a/print/templates/reports/entry-order/entry-order.html +++ b/print/templates/reports/entry-order/entry-order.html @@ -41,36 +41,36 @@ + - + - - - - - - - - + + + + + + + + - - - - - + + + - - - - - + + + + -- 2.40.1 From 3db6ab07789540c213a2403c7223ea040c6841c6 Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 11 Nov 2024 16:10:49 +0100 Subject: [PATCH 4/5] feat: refs #6583 rollback --- .../reports/entry-order/assets/css/style.css | 5 +++ .../reports/entry-order/entry-order.html | 44 +++++++++---------- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/print/templates/reports/entry-order/assets/css/style.css b/print/templates/reports/entry-order/assets/css/style.css index 767b1185a..1a5ea3eb6 100644 --- a/print/templates/reports/entry-order/assets/css/style.css +++ b/print/templates/reports/entry-order/assets/css/style.css @@ -17,4 +17,9 @@ h3 { .tags { font-size: 10px; margin: 0; +} + +.column-oriented th, +.column-oriented td{ + padding: 5px } \ No newline at end of file diff --git a/print/templates/reports/entry-order/entry-order.html b/print/templates/reports/entry-order/entry-order.html index e5d3bfb6d..77545ef9b 100644 --- a/print/templates/reports/entry-order/entry-order.html +++ b/print/templates/reports/entry-order/entry-order.html @@ -41,36 +41,36 @@
{{$t('reference')}} {{$t('boxes')}} {{$t('packing')}}{{$t('concept')}}{{$t('reference')}}{{$t('tags')}}{{$t('quantity')}}{{$t('price')}}{{$t('amount')}}{{$t('concept')}}{{$t('tags')}}{{$t('quantity')}}{{$t('price')}}{{$t('amount')}}
{{buy.comment}} {{buy.stickers}}x{{buy.packing}}{{buy.name}}{{buy.comment}} - {{buy.tag5}} → {{buy.value5}} - {{buy.tag6}} → {{buy.value6}} - {{buy.tag7}} → {{buy.value7}} + x{{buy.packing}}{{buy.name}} + {{buy.tag5}} → {{buy.value5}} + {{buy.tag6}} → {{buy.value6}} + {{buy.tag7}} → {{buy.value7}} {{buy.quantity | number($i18n.locale)}}x{{buy.buyingValue | currency('EUR', $i18n.locale)}}= + {{buy.quantity | number($i18n.locale)}}x{{buy.buyingValue | currency('EUR', $i18n.locale)}}= {{buy.buyingValue * buy.quantity | currency('EUR', $i18n.locale)}}
+ - + - - - - - - - - + + + + + + + + - - - - - + + + - - - - - + + + + -- 2.40.1 From 2f3efa15ba8e2a832aff010ddc114c39192576b9 Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 11 Nov 2024 16:13:25 +0100 Subject: [PATCH 5/5] feat: refs #6583 rollback --- .../reports/entry-order/assets/css/style.css | 5 --- .../reports/entry-order/entry-order.html | 44 +++++++++---------- 2 files changed, 22 insertions(+), 27 deletions(-) diff --git a/print/templates/reports/entry-order/assets/css/style.css b/print/templates/reports/entry-order/assets/css/style.css index 1a5ea3eb6..767b1185a 100644 --- a/print/templates/reports/entry-order/assets/css/style.css +++ b/print/templates/reports/entry-order/assets/css/style.css @@ -17,9 +17,4 @@ h3 { .tags { font-size: 10px; margin: 0; -} - -.column-oriented th, -.column-oriented td{ - padding: 5px } \ No newline at end of file diff --git a/print/templates/reports/entry-order/entry-order.html b/print/templates/reports/entry-order/entry-order.html index 77545ef9b..e5d3bfb6d 100644 --- a/print/templates/reports/entry-order/entry-order.html +++ b/print/templates/reports/entry-order/entry-order.html @@ -41,36 +41,36 @@
{{$t('reference')}} {{$t('boxes')}} {{$t('packing')}}{{$t('concept')}}{{$t('reference')}}{{$t('tags')}}{{$t('quantity')}}{{$t('price')}}{{$t('amount')}}{{$t('concept')}}{{$t('tags')}}{{$t('quantity')}}{{$t('price')}}{{$t('amount')}}
{{buy.comment}} {{buy.stickers}}x{{buy.packing}}{{buy.name}}{{buy.comment}} - {{buy.tag5}} → {{buy.value5}} - {{buy.tag6}} → {{buy.value6}} - {{buy.tag7}} → {{buy.value7}} + x{{buy.packing}}{{buy.name}} + {{buy.tag5}} → {{buy.value5}} + {{buy.tag6}} → {{buy.value6}} + {{buy.tag7}} → {{buy.value7}} {{buy.quantity | number($i18n.locale)}}x{{buy.buyingValue | currency('EUR', $i18n.locale)}}= + {{buy.quantity | number($i18n.locale)}}x{{buy.buyingValue | currency('EUR', $i18n.locale)}}= {{buy.buyingValue * buy.quantity | currency('EUR', $i18n.locale)}}
- - + - - - - - - - + + + + + + + + - - - - - + + + + - - - - - + + + + -- 2.40.1
{{$t('reference')}} {{$t('boxes')}} {{$t('packing')}}{{$t('concept')}}{{$t('tags')}}{{$t('quantity')}}{{$t('price')}}{{$t('amount')}}{{$t('concept')}}{{$t('reference')}}{{$t('tags')}}{{$t('quantity')}}{{$t('price')}}{{$t('amount')}}
{{buy.comment}} {{buy.stickers}}x{{buy.packing}}{{buy.name}} - {{buy.tag5}} → {{buy.value5}} - {{buy.tag6}} → {{buy.value6}} - {{buy.tag7}} → {{buy.value7}} + x{{buy.packing}}{{buy.name}}{{buy.comment}} + {{buy.tag5}} → {{buy.value5}} + {{buy.tag6}} → {{buy.value6}} + {{buy.tag7}} → {{buy.value7}} {{buy.quantity | number($i18n.locale)}}x{{buy.buyingValue | currency('EUR', $i18n.locale)}}= + {{buy.quantity | number($i18n.locale)}}x{{buy.buyingValue | currency('EUR', $i18n.locale)}}= {{buy.buyingValue * buy.quantity | currency('EUR', $i18n.locale)}}