-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCodeunit_0000000091.txt
73 lines (68 loc) · 2.11 KB
/
Codeunit_0000000091.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
OBJECT Codeunit 91 Purch.-Post (Yes/No)
{
OBJECT-PROPERTIES
{
Date=09/07/12;
Time=12:00:00 PM;
Version List=NAVW17.00;
}
PROPERTIES
{
TableNo=38;
OnRun=BEGIN
PurchHeader.COPY(Rec);
Code;
Rec := PurchHeader;
END;
}
CODE
{
VAR
Text000@1000 : TextConst 'ENU=&Receive,&Invoice,Receive &and Invoice;ESM=&Recibir,&Facturar,R&ecibir y facturar;FRC=&R‚ception,&Facture,R‚ception &et Facture;ENC=&Receive,&Invoice,Receive &and Invoice';
Text001@1001 : TextConst 'ENU=Do you want to post the %1?;ESM=¨Confirma que desea registrar el/la %1?;FRC=D‚sirez-vous reporter la %1?;ENC=Do you want to post the %1?';
Text002@1002 : TextConst 'ENU=&Ship,&Invoice,Ship &and Invoice;ESM=&Enviar,&Facturar,E&nviar y facturar;FRC=&Livrer,&Facturer,Livrer &et Facturer;ENC=&Ship,&Invoice,Ship &and Invoice';
PurchHeader@1003 : Record 38;
Selection@1005 : Integer;
LOCAL PROCEDURE Code@1();
VAR
PurchSetup@1000 : Record 312;
PurchPostViaJobQueue@1001 : Codeunit 98;
BEGIN
WITH PurchHeader DO BEGIN
CASE "Document Type" OF
"Document Type"::Order:
BEGIN
Selection := STRMENU(Text000,3);
IF Selection = 0 THEN
EXIT;
Receive := Selection IN [1,3];
Invoice := Selection IN [2,3];
END;
"Document Type"::"Return Order":
BEGIN
Selection := STRMENU(Text002,3);
IF Selection = 0 THEN
EXIT;
Ship := Selection IN [1,3];
Invoice := Selection IN [2,3];
END
ELSE
IF NOT
CONFIRM(
Text001,FALSE,
"Document Type")
THEN
EXIT;
END;
"Print Posted Documents" := FALSE;
PurchSetup.GET;
IF PurchSetup."Post with Job Queue" THEN
PurchPostViaJobQueue.EnqueuePurchDoc(PurchHeader)
ELSE
CODEUNIT.RUN(CODEUNIT::"Purch.-Post",PurchHeader);
END;
END;
BEGIN
END.
}
}