default.txt 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. OBJECT Codeunit 11 Gen. Jnl.-Check Line
  2. {
  3. OBJECT-PROPERTIES
  4. {
  5. Date=09-09-14;
  6. Time=12:00:00;
  7. Version List=NAVW18.00;
  8. }
  9. PROPERTIES
  10. {
  11. TableNo=81;
  12. Permissions=TableData 252=rimd;
  13. OnRun=BEGIN
  14. GLSetup.GET;
  15. RunCheck(Rec);
  16. END;
  17. }
  18. CODE
  19. {
  20. VAR
  21. Text000@1000 : TextConst 'ENU=can only be a closing date for G/L entries';
  22. Text001@1001 : TextConst 'ENU=is not within your range of allowed posting dates';
  23. Text002@1002 : TextConst 'ENU=%1 or %2 must be G/L Account or Bank Account.';
  24. Text011@1011 : TextConst 'ENU=The combination of dimensions used in %1 %2, %3, %4 is blocked. %5';
  25. Text012@1012 : TextConst 'ENU=A dimension used in %1 %2, %3, %4 has caused an error. %5';
  26. GLSetup@1014 : Record 98;
  27. SalesDocAlreadyExistsErr@1026 : TextConst '@@@="%1 = Document Type; %2 = Document No.";ENU=Sales %1 %2 already exists.';
  28. PurchDocAlreadyExistsErr@1025 : TextConst '@@@="%1 = Document Type; %2 = Document No.";ENU=Purchase %1 %2 already exists.';
  29. PROCEDURE RunCheck@4(VAR GenJnlLine@1000 : Record 81);
  30. VAR
  31. PaymentTerms@1004 : Record 3;
  32. Cust@1005 : Record 18;
  33. Vendor@1006 : Record 23;
  34. ICPartner@1007 : Record 413;
  35. ICGLAcount@1008 : Record 410;
  36. TableID@1002 : ARRAY [10] OF Integer;
  37. No@1003 : ARRAY [10] OF Code[20];
  38. PROCEDURE ErrorIfPositiveAmt@2(GenJnlLine@1000 : Record 81);
  39. BEGIN
  40. IF GenJnlLine.Amount > 0 THEN
  41. GenJnlLine.FIELDERROR(Amount,Text008);
  42. END;
  43. PROCEDURE ErrorIfNegativeAmt@3(GenJnlLine@1000 : Record 81);
  44. BEGIN
  45. IF GenJnlLine.Amount < 0 THEN
  46. GenJnlLine.FIELDERROR(Amount,Text007);
  47. END;
  48. PROCEDURE SetOverDimErr@5();
  49. BEGIN
  50. OverrideDimErr := TRUE;
  51. END;
  52. PROCEDURE CheckSalesDocNoIsNotUsed@115(DocType@1000 : Option;DocNo@1001 : Code[20]);
  53. VAR
  54. OldCustLedgEntry@1002 : Record 21;
  55. BEGIN
  56. OldCustLedgEntry.SETRANGE("Document No.",DocNo);
  57. OldCustLedgEntry.SETRANGE("Document Type",DocType);
  58. IF OldCustLedgEntry.FINDFIRST THEN
  59. ERROR(SalesDocAlreadyExistsErr,OldCustLedgEntry."Document Type",DocNo);
  60. END;
  61. PROCEDURE CheckPurchDocNoIsNotUsed@107(DocType@1000 : Option;DocNo@1002 : Code[20]);
  62. VAR
  63. OldVendLedgEntry@1001 : Record 25;
  64. BEGIN
  65. OldVendLedgEntry.SETRANGE("Document No.",DocNo);
  66. OldVendLedgEntry.SETRANGE("Document Type",DocType);
  67. IF OldVendLedgEntry.FINDFIRST THEN
  68. ERROR(PurchDocAlreadyExistsErr,OldVendLedgEntry."Document Type",DocNo);
  69. END;
  70. LOCAL PROCEDURE CheckGenJnlLineDocType@7(GenJnlLine@1001 : Record 81);
  71. }
  72. }