From cd217a7ac84de57d76b4017b5669c87d97436ab4 Mon Sep 17 00:00:00 2001 From: Kasper Date: Fri, 24 Apr 2026 20:59:19 -0700 Subject: [PATCH 1/2] split signatures on jobticket --- .../JobTicket_SplitSignatures.CodeUnit.al | 38 ++++++++++++++++++ JobTicket Split Signatures/README.md | 9 +++++ JobTicket Split Signatures/app.json | 39 +++++++++++++++++++ 3 files changed, 86 insertions(+) create mode 100644 JobTicket Split Signatures/JobTicket_SplitSignatures.CodeUnit.al create mode 100644 JobTicket Split Signatures/README.md create mode 100644 JobTicket Split Signatures/app.json diff --git a/JobTicket Split Signatures/JobTicket_SplitSignatures.CodeUnit.al b/JobTicket Split Signatures/JobTicket_SplitSignatures.CodeUnit.al new file mode 100644 index 0000000..6295d07 --- /dev/null +++ b/JobTicket Split Signatures/JobTicket_SplitSignatures.CodeUnit.al @@ -0,0 +1,38 @@ +codeunit 80422 "Jobticket Split Signatures" +{ + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"PVS JobTicket Management", 'OnAfterGetReportBuffer', '', true, true)] + local procedure OnAfterGetReportBuffer(var in_JobRec: Record "PVS Job"; var in_VERSION_COUNTER: Integer; var Out_BufferRecTmp: Record "PVS Sorting Buffer" temporary; var Result: Boolean) + var + i, Set : Integer; + New_BufferRecTmp: Record "PVS Sorting Buffer" temporary; + begin + Out_BufferRecTmp.setrange("Report Section", 52); + if Out_BufferRecTmp.findset then + repeat + if Out_BufferRecTmp.Decimal1 > 1 then begin + New_BufferRecTmp := Out_BufferRecTmp; + New_BufferRecTmp.insert; + end; + until Out_BufferRecTmp.next = 0; + Out_BufferRecTmp.reset; + + if new_BufferRecTmp.findset then + repeat + if Out_BufferRecTmp.Get(New_BufferRecTmp.PK1_Integer1, New_BufferRecTmp.PK1_Integer2, New_BufferRecTmp.PK1_Integer3, New_BufferRecTmp.PK1_Integer4, + New_BufferRecTmp.PK2_Code1, New_BufferRecTmp.PK2_Code2, New_BufferRecTmp.PK2_Code3, New_BufferRecTmp.PK2_Code4, + New_BufferRecTmp.PK3_Integer1, New_BufferRecTmp.PK3_Integer2, New_BufferRecTmp.PK3_Integer3, New_BufferRecTmp.PK3_Integer4) then begin + Set := round(Out_BufferRecTmp.Decimal1, 1); + Out_BufferRecTmp.Decimal1 := 1; + Out_BufferRecTmp.Decimal4 := Out_BufferRecTmp.Decimal4 DIV Set; + Out_BufferRecTmp.Decimal5 := Out_BufferRecTmp.Decimal4 DIV Set; + Out_BufferRecTmp.Decimal6 := Out_BufferRecTmp.Decimal4 DIV Set; + Out_BufferRecTmp.modify; + for i := 2 to Set do begin + Out_BufferRecTmp.PK1_Integer2 := i; + Out_BufferRecTmp.insert; + end; + end; + until New_BufferRecTmp.next = 0; + end; +} \ No newline at end of file diff --git a/JobTicket Split Signatures/README.md b/JobTicket Split Signatures/README.md new file mode 100644 index 0000000..cb9ecf4 --- /dev/null +++ b/JobTicket Split Signatures/README.md @@ -0,0 +1,9 @@ +# Split in signatures Job Ticket + +This extension can be used at companies that want to have the sheets wil multiple sets splitted in individual lines +on the press section of the jobticket + +## What this extension includes: + +- Codeunits (80422) to modify the dataset. + diff --git a/JobTicket Split Signatures/app.json b/JobTicket Split Signatures/app.json new file mode 100644 index 0000000..a6a35a6 --- /dev/null +++ b/JobTicket Split Signatures/app.json @@ -0,0 +1,39 @@ +{ + "id": "452fada5-ed14-4c35-bc62-3e9a8d21a072", + "name": "PTE Job Ticket Signatures", + "publisher": "PrintVis", + "version": "1.0.0.0", + "brief": "", + "description": "", + "privacyStatement": "", + "EULA": "", + "help": "", + "url": "", + "logo": "", + "dependencies": [ + { + "id": "5452f323-059e-499a-9753-5d2c07eef904", + "name": "PrintVis", + "publisher": "NovaVision Software A/S", + "version": "24.0.0.0" + } + ], + "screenshots": [], + "platform": "1.0.0.0", + "application": "24.0.0.0", + "idRanges": [ + { + "from": 80422, + "to": 80422 + } + ], + "resourceExposurePolicy": { + "allowDebugging": true, + "allowDownloadingSource": true, + "includeSourceInSymbolFile": true + }, + "runtime": "13.0", + "features": [ + "NoImplicitWith" + ] +} \ No newline at end of file From c28c48c03bfca8a93664fbc183e471117a39495b Mon Sep 17 00:00:00 2001 From: Brandon Steele Date: Sat, 25 Apr 2026 13:40:43 -0400 Subject: [PATCH 2/2] update readme and app.json --- JobTicket Split Signatures/README.md | 44 ++++++++++++++++++++++++---- JobTicket Split Signatures/app.json | 16 +++++----- 2 files changed, 47 insertions(+), 13 deletions(-) diff --git a/JobTicket Split Signatures/README.md b/JobTicket Split Signatures/README.md index cb9ecf4..0ee589f 100644 --- a/JobTicket Split Signatures/README.md +++ b/JobTicket Split Signatures/README.md @@ -1,9 +1,43 @@ -# Split in signatures Job Ticket +# JobTicket Split Signatures -This extension can be used at companies that want to have the sheets wil multiple sets splitted in individual lines -on the press section of the jobticket +This extension adds functionality to the PrintVis job ticket generation process. In standard behavior, press section lines in the job ticket can contain a quantity of signatures greater than 1 on a single line. For companies that want each signature shown as an individual line, this extension modifies the generated dataset before the report is rendered. -## What this extension includes: +When a line in the press section has multiple signatures, the extension splits that line into separate lines with one signature per line and adjusts the related decimal values so each inserted line represents a single signature. This improves readability and makes press output easier to review and process. -- Codeunits (80422) to modify the dataset. +## What this extension includes + +- Codeunit 80422 "Jobticket Split Signatures" +- Event subscriber on `PVS JobTicket Management`, event `OnAfterGetReportBuffer` + +## How it works + +The codeunit subscribes to the `OnAfterGetReportBuffer` event in `PVS JobTicket Management`. When job ticket data is prepared: + +1. It filters the report buffer to the press section (`Report Section = 52`). +2. It identifies lines where `Decimal1 > 1` (multiple signatures). +3. For each matching line, it: + - Sets the signature quantity to 1 on the original line. + - Adjusts decimal values based on the number of signatures. + - Inserts additional lines so each signature is represented as its own line. + +The result is that multi-signature press lines are expanded into individual lines in the final job ticket dataset. + +## How to configure + +Step 1 Install the extension in your Business Central environment. + +Step 2 Run the standard PrintVis job ticket process. + +Step 3 No extra setup is required. The split logic runs automatically during dataset preparation. + +## Prerequisites to run the functionality + +- PrintVis dependency available (minimum version 26.0.0.0). +- Business Central application compatible with version 26.0.0.0. + +## What you will need to do for this extension to work + +- Install the .app extension in your environment. +- Ensure the PrintVis app is installed and meets the dependency version. +- Use the standard PrintVis job ticket generation flow (the subscriber runs automatically). diff --git a/JobTicket Split Signatures/app.json b/JobTicket Split Signatures/app.json index a6a35a6..a58dc07 100644 --- a/JobTicket Split Signatures/app.json +++ b/JobTicket Split Signatures/app.json @@ -1,8 +1,8 @@ { - "id": "452fada5-ed14-4c35-bc62-3e9a8d21a072", - "name": "PTE Job Ticket Signatures", - "publisher": "PrintVis", - "version": "1.0.0.0", + "id": "b455cc6f-d5af-4933-81d2-152498b6aa98", + "name": "JobTicketSplit", + "publisher": "PrintVis A/S", + "version": "28.0.0.0", "brief": "", "description": "", "privacyStatement": "", @@ -11,16 +11,16 @@ "url": "", "logo": "", "dependencies": [ - { + { "id": "5452f323-059e-499a-9753-5d2c07eef904", "name": "PrintVis", "publisher": "NovaVision Software A/S", - "version": "24.0.0.0" + "version": "26.0.0.0" } ], "screenshots": [], "platform": "1.0.0.0", - "application": "24.0.0.0", + "application": "26.0.0.0", "idRanges": [ { "from": 80422, @@ -32,7 +32,7 @@ "allowDownloadingSource": true, "includeSourceInSymbolFile": true }, - "runtime": "13.0", + "runtime": "15.0", "features": [ "NoImplicitWith" ]