Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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;
}
43 changes: 43 additions & 0 deletions JobTicket Split Signatures/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# JobTicket Split Signatures

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.

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.

## 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).

39 changes: 39 additions & 0 deletions JobTicket Split Signatures/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"id": "b455cc6f-d5af-4933-81d2-152498b6aa98",
"name": "JobTicketSplit",
"publisher": "PrintVis A/S",
"version": "28.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": "26.0.0.0"
}
],
"screenshots": [],
"platform": "1.0.0.0",
"application": "26.0.0.0",
"idRanges": [
{
"from": 80422,
"to": 80422
}
],
"resourceExposurePolicy": {
"allowDebugging": true,
"allowDownloadingSource": true,
"includeSourceInSymbolFile": true
},
"runtime": "15.0",
"features": [
"NoImplicitWith"
]
}
Loading