-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCodeunit_0000000231.txt
91 lines (81 loc) · 4.72 KB
/
Codeunit_0000000231.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
OBJECT Codeunit 231 Gen. Jnl.-Post
{
OBJECT-PROPERTIES
{
Date=09/07/12;
Time=12:00:00 PM;
Version List=NAVW17.00;
}
PROPERTIES
{
TableNo=81;
OnRun=BEGIN
GenJnlLine.COPY(Rec);
Code;
COPY(GenJnlLine);
END;
}
CODE
{
VAR
Text000@1000 : TextConst 'ENU=cannot be filtered when posting recurring journals;ESM=no puede contener un filtro cuando se registra un diario peri¢dico;FRC=ne peut pas ˆtre filtr‚ lors du report des journaux r‚currents;ENC=cannot be filtered when posting recurring journals';
Text001@1001 : TextConst 'ENU=Do you want to post the journal lines?;ESM=¨Confirma que desea registrar las l¡neas del diario?;FRC=Voulez-vous reporter les lignes du journal?;ENC=Do you want to post the journal lines?';
Text002@1002 : TextConst 'ENU=There is nothing to post.;ESM=No hay nada que registrar.;FRC=Il n''y a rien … reporter.;ENC=There is nothing to post.';
Text003@1003 : TextConst 'ENU=The journal lines were successfully posted.;ESM=Se han registrado correctamente las l¡neas del diario.;FRC=Les lignes de journal ont ‚t‚ report‚es avec succŠs.;ENC=The journal lines were successfully posted.';
Text004@1004 : TextConst 'ENU=The journal lines were successfully posted. You are now in the %1 journal.;ESM=Se registraron correctamente las l¡neas diario. Se encuentra en el diario %1.;FRC=Les lignes du journal ont ‚t‚ report‚es correctement. Vous ˆtes maintenant dans le journal %1.;ENC=The journal lines were successfully posted. You are now in the %1 journal.';
Text005@1009 : TextConst 'ENU=Using %1 for Declining Balance can result in misleading numbers for subsequent years. You should manually check the postings and correct them if necessary. Do you want to continue?;ESM=Utilizar %1 para saldo regresivo puede provocar n£meros enga¤osos en a¤os subsiguientes. Debe comprobar manualmente los registros y corregirlos si es necesario. ¨Desea continuar?;FRC=Si vous utilisez %1 pour le type D‚gressif, les num‚ros risquent d''ˆtre erron‚s pour les ann‚es … venir. Vous devez v‚rifier manuellement les reports et les corriger au besoin. Òtes-vous certain de vouloir continuerÿ?;ENC=Using %1 for Declining Balance can result in misleading numbers for subsequent years. You should manually check the postings and correct them if necessary. Do you want to continue?';
GenJnlTemplate@1005 : Record 80;
GenJnlLine@1006 : Record 81;
GenJnlPostBatch@1007 : Codeunit 13;
TempJnlBatchName@1008 : Code[10];
Text006@1010 : TextConst '@@@=Source Code in Genenral Journal Template must not be equal to Job G/L WIP in Source Code Setup.;ENU=%1 in %2 must not be equal to %3 in %4.;ESM=%1 en %2 no debe ser igual a %3 en %4.;FRC=%1 dans %2 ne doit pas ˆtre ‚gal … %3 dans %4.;ENC=%1 in %2 must not be equal to %3 in %4.';
LOCAL PROCEDURE Code@1();
VAR
FALedgEntry@1000 : Record 5601;
SourceCodeSetup@1001 : Record 242;
BEGIN
WITH GenJnlLine DO BEGIN
GenJnlTemplate.GET("Journal Template Name");
IF GenJnlTemplate.Type = GenJnlTemplate.Type::Jobs THEN BEGIN
SourceCodeSetup.GET;
IF GenJnlTemplate."Source Code" = SourceCodeSetup."Job G/L WIP" THEN
ERROR(Text006,GenJnlTemplate.FIELDCAPTION("Source Code"),GenJnlTemplate.TABLECAPTION,
SourceCodeSetup.FIELDCAPTION("Job G/L WIP"),SourceCodeSetup.TABLECAPTION);
END;
GenJnlTemplate.TESTFIELD("Force Posting Report",FALSE);
IF GenJnlTemplate.Recurring AND (GETFILTER("Posting Date") <> '') THEN
FIELDERROR("Posting Date",Text000);
IF NOT CONFIRM(Text001,FALSE) THEN
EXIT;
IF "Account Type" = "Account Type"::"Fixed Asset" THEN BEGIN
FALedgEntry.SETRANGE("FA No.","Account No.");
FALedgEntry.SETRANGE("FA Posting Type","FA Posting Type"::"Acquisition Cost");
IF FALedgEntry.FINDFIRST AND "Depr. Acquisition Cost" THEN
IF NOT CONFIRM(Text005,FALSE,FIELDCAPTION("Depr. Acquisition Cost")) THEN
EXIT;
END;
TempJnlBatchName := "Journal Batch Name";
GenJnlPostBatch.RUN(GenJnlLine);
IF "Line No." = 0 THEN
MESSAGE(Text002)
ELSE
IF TempJnlBatchName = "Journal Batch Name" THEN
MESSAGE(Text003)
ELSE
MESSAGE(
Text004,
"Journal Batch Name");
IF NOT FIND('=><') OR (TempJnlBatchName <> "Journal Batch Name") THEN BEGIN
RESET;
FILTERGROUP(2);
SETRANGE("Journal Template Name","Journal Template Name");
SETRANGE("Journal Batch Name","Journal Batch Name");
FILTERGROUP(0);
"Line No." := 1;
END;
END;
END;
BEGIN
END.
}
}