mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-07 07:36:54 +01:00
Add 4 community knowledge articles: posting-routine pattern, email module, Word report layout, defensive/offensive blast radius
Contributed from Curabis's own BCQuality custom layer, rewritten to the community contribution contract (no fenced code in the .md, AL samples as sibling .good.al/.bad.al files, under 100 lines per article).
This commit is contained in:
parent
19ec6b8c52
commit
17e8856b35
12 changed files with 276 additions and 0 deletions
|
|
@ -0,0 +1,22 @@
|
|||
codeunit 50150 "Contoso Header Field Lookup"
|
||||
{
|
||||
procedure GetVatRegNo(DocumentNo: Code[20]): Text[20]
|
||||
var
|
||||
Header: Record "Contoso Document Header";
|
||||
begin
|
||||
// Low blast radius: informational field, safe to default if missing.
|
||||
if Header.Get(DocumentNo) then
|
||||
exit(Header."VAT Registration No.");
|
||||
exit('');
|
||||
end;
|
||||
|
||||
procedure GetVatProdPostingGroup(DocumentNo: Code[20]): Code[20]
|
||||
var
|
||||
Header: Record "Contoso Document Header";
|
||||
begin
|
||||
// High blast radius: feeds a posted VAT calculation. Fail loud.
|
||||
Header.Get(DocumentNo);
|
||||
Header.TestField("VAT Prod. Posting Group");
|
||||
exit(Header."VAT Prod. Posting Group");
|
||||
end;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue