-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[E-Documents Core] - E-Invoice Preview FastTab #10
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work! Only a few minor things to address :P
@@ -493,6 +500,7 @@ page 6121 "E-Document" | |||
begin | |||
IsProcessed := Rec.Status = Rec.Status::Processed; | |||
IsIncomingDoc := Rec.Direction = Rec.Direction::Incoming; | |||
ShowPreview := (Rec."Document Type" = Rec."Document Type"::"Purchase Invoice") or (Rec."Document Type" = Rec."Document Type"::"Purchase Credit Memo"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, preference: you could also use "Document Type" in [Invoice, Credit Memo]. But this is really just a preference :P
@@ -597,7 +605,7 @@ page 6121 "E-Document" | |||
EDocumentHelper: Codeunit "E-Document Processing"; | |||
ErrorsAndWarningsNotification: Notification; | |||
RecordLinkTxt, StyleStatusTxt : Text; | |||
ShowRelink, ShowMapToOrder, HasErrorsOrWarnings, HasErrors, IsIncomingDoc, IsProcessed, CopilotVisible : Boolean; | |||
ShowRelink, ShowMapToOrder, HasErrorsOrWarnings, HasErrors, IsIncomingDoc, IsProcessed, CopilotVisible, ShowPreview : Boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: This is getting a bit long...
{ | ||
field("No."; Rec."No.") | ||
{ | ||
ToolTip = 'Specifies what is being purchased.'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move tooltips to the table
@@ -0,0 +1,53 @@ | |||
table 6100 "E-Invoice Line" | |||
{ | |||
DataClassification = CustomerContent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a caption
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
preference: I'd like to also see explicit property for extensible and accessible. Regardless if it's true or false. It means we thought about it and didn't just forget it. Same for pages.
@@ -0,0 +1,43 @@ | |||
page 6100 "E-Invoice Lines" | |||
{ | |||
PageType = ListPart; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
page caption
if not EInvoiceLine.IsEmpty() then | ||
EInvoiceLine.DeleteAll(true); | ||
|
||
if (EDocument."Document Type" <> EDocument."Document Type"::"Purchase Invoice") and (EDocument."Document Type" <> EDocument."Document Type"::"Purchase Credit Memo") then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, preference: not DocType in [Invoice, CrMemo]
OnAfterPrepareReceivedDoc(EDocument, TempBlob, SourceDocumentHeader, SourceDocumentLine, TempEDocMapping); | ||
end; | ||
|
||
local procedure CreateEInvoiceLinesPreview(EDocument: Record "E-Document"; SourceDocumentLine: RecordRef) | ||
var | ||
EDocumentImportHelper: Codeunit "E-Document Import Helper"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused var
OnAfterPrepareReceivedDoc(EDocument, TempBlob, SourceDocumentHeader, SourceDocumentLine, TempEDocMapping); | ||
end; | ||
|
||
local procedure CreateEInvoiceLinesPreview(EDocument: Record "E-Document"; SourceDocumentLine: RecordRef) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Hmm, this naming implies more of the "posting preview" behavior. So, actual lines would be created, but in the end reverted. Maybe CreateEInvoicePreviewLines? Would it be better to name the table accordingly as well?
|
||
if SourceDocumentLine.FindSet() then | ||
repeat | ||
EInvoiceLine.Init(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, preference: extract the content of the repeat loop into a local procedure, to make it cleaner.
TempXMLBuffer.SetRange(Path, '/Invoice/cac:AccountingSupplierParty/cac:Party/cbc:EndpointID'); | ||
TempXMLBuffer.FindFirst(); | ||
TempXMLBuffer.Value := DocumentVendor."VAT Registration No."; | ||
TempXMLBuffer.Modify(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
implicit runtrigger
Implementation This update allows users to preview incoming electronic invoices before creating a purchase document. The preview provides a non-editable view of invoice lines while header information remains in its existing section.
This feature provides users a quick and efficient way to review invoice details before creating purchase documents, ensuring accuracy and reducing manual errors. |
Implementation
This update allows users to preview incoming electronic invoices before creating a purchase document. The preview provides a non-editable view of invoice lines while header information remains in its existing section.
New FastTab "E-Invoice Lines" appears immediately below "Service Status" FastTab and is visible only if:
Direction = Incoming
Document Type = Invoice or Credit Memo
This feature provides users a quick and efficient way to review invoice details before creating purchase documents, ensuring accuracy and reducing manual errors.
MS PR: microsoft#27977