Hello Experts. One more issue with posting numbers... in a Purchase order as soon as I create a new order the POSTING NO. SERIES picks the PURCHASE INVOICE NO. but after a select a VENDOR CODE in PURCHASE ORDER this POSTING NO. SERIES fields changes to PURCHASE ORDER NO.
is this normal? We have different number series for Order & invoice & its a big mess when someone post purchase invoice in purchase order form with purchase order number series instead of purchase invoice.
0
Answers
Chn
Buy-from Vendor No. - OnValidate()
TESTFIELD(Status,Status::Open);
IF ("Buy-from Vendor No." <> xRec."Buy-from Vendor No.") AND
(xRec."Buy-from Vendor No." <> '')
THEN BEGIN
IF HideValidationDialog THEN
Confirmed := TRUE
ELSE
Confirmed := CONFIRM(Text004,FALSE,FIELDCAPTION("Buy-from Vendor No."));
IF Confirmed THEN BEGIN
PurchLine.SETRANGE("Document Type","Document Type");
PurchLine.SETRANGE("Document No.","No.");
IF "Buy-from Vendor No." = '' THEN BEGIN
IF NOT PurchLine.ISEMPTY THEN
ERROR(
Text005,
FIELDCAPTION("Buy-from Vendor No."));
INIT;
PurchSetup.GET;
"No. Series" := xRec."No. Series";
InitRecord;
IF xRec."Receiving No." <> '' THEN BEGIN
"Receiving No. Series" := xRec."Receiving No. Series";
"Receiving No." := xRec."Receiving No.";
END;
IF xRec."Posting No." <> '' THEN BEGIN
"Posting No. Series" := xRec."Posting No. Series";
"Posting No." := xRec."Posting No.";
Chn
Exactly, Customization for posting no. series does not seem as it's handled by base system you need to check from where to system taking posting no.(either from purchase setup or location card).
and good news is that I found out the culprit code... it was
Buy-from Vendor No. - OnValidate()
.....
"Posting No. Series" := "No. Series";
Thanks to all you guys...
Chn