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
39 changes: 39 additions & 0 deletions Copy Price Method/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"id": "44dedef3-c153-4c67-a6a5-66e2ebe14f47",
"name": "CopyPriceMethod",
"publisher": "PrintVis Open Source",
"version": "27.0.0.0",
"brief": "",
"description": "",
"privacyStatement": "",
"EULA": "",
"help": "",
"url": "",
"logo": "",
"dependencies": [
{
"id": "5452f323-059e-499a-9753-5d2c07eef904",
"name": "PrintVis",
"publisher": "PrintVis A/S",
"version": "26.4.1.1"
}
],
"screenshots": [],
"platform": "1.0.0.0",
"application": "26.0.0.0",
"idRanges": [
{
"from": 80279,
"to": 80279
}
],
"resourceExposurePolicy": {
"allowDebugging": true,
"allowDownloadingSource": true,
"includeSourceInSymbolFile": true
},
"runtime": "15.0",
"features": [
"NoImplicitWith"
]
}
9 changes: 9 additions & 0 deletions Copy Price Method/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copy Price Method

PrintVis Copy-To and Copy-From functionality makes an exact copy of the case / job being copied.

This code adjusts this functionality so that the job line price method is automatically set back to Calculated when the copy is completed.

## What this extension includes:

- An event subscriber (codeunit 80279) that extends the normal procedure by changing the price method to calculated after the copy is complete.
9 changes: 9 additions & 0 deletions Copy Price Method/src/OSCopyPriceMethod.Codeunit.al
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
codeunit 80279 "OS Copy Price Method"
{
[EventSubscriber(ObjectType::Codeunit, Codeunit::"PVS Copy Management", 'OnAfterCopyCompleteJob', '', true, true)]
local procedure OnAfterCopyCompleteJob(var in_From_JobRec: Record "PVS Job"; var in_To_JobRec: Record "PVS Job"; in_Is_Template_Copy: Boolean)
begin
in_To_JobRec.Validate("Price Method", in_To_JobRec."Price Method"::Calculated);
in_To_JobRec.Modify(true);
end;
}
Loading