v-debjour.w 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  1. &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12 GUI ADM1
  2. &ANALYZE-RESUME
  3. &Scoped-define WINDOW-NAME CURRENT-WINDOW
  4. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS V-table-Win
  5. /*------------------------------------------------------------------------
  6. File:
  7. Description: from VIEWER.W - Template for SmartViewer Objects
  8. Input Parameters:
  9. <none>
  10. Output Parameters:
  11. <none>
  12. ------------------------------------------------------------------------*/
  13. /* This .W file was created with the Progress UIB. */
  14. /*----------------------------------------------------------------------*/
  15. /* Create an unnamed pool to store all the widgets created
  16. by this procedure. This is a good default which assures
  17. that this procedure's triggers and internal procedures
  18. will execute in this procedure's storage, and that proper
  19. cleanup will occur on deletion of the procedure. */
  20. CREATE WIDGET-POOL.
  21. /* *************************** Definitions ************************** */
  22. /* Parameters Definitions --- */
  23. /* Local Variable Definitions --- */
  24. /* _UIB-CODE-BLOCK-END */
  25. &ANALYZE-RESUME
  26. &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
  27. /* ******************** Preprocessor Definitions ******************** */
  28. &Scoped-define PROCEDURE-TYPE SmartViewer
  29. &Scoped-define DB-AWARE no
  30. &Scoped-define ADM-SUPPORTED-LINKS Record-Source,Record-Target,TableIO-Target
  31. /* Name of designated FRAME-NAME and/or first browse and/or first query */
  32. &Scoped-define FRAME-NAME F-Main
  33. /* Standard List Definitions */
  34. &Scoped-Define ENABLED-OBJECTS RECT-18 Btn_Faktura Btn_Zahlung ~
  35. Btn_Mehrwertsteuer Btn_OffenPosten Btn_Faelligkeit
  36. /* Custom List Definitions */
  37. /* ADM-CREATE-FIELDS,ADM-ASSIGN-FIELDS,List-3,List-4,List-5,List-6 */
  38. /* _UIB-PREPROCESSOR-BLOCK-END */
  39. &ANALYZE-RESUME
  40. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _XFTR "Foreign Keys" V-table-Win _INLINE
  41. /* Actions: ? adm/support/keyedit.w ? ? ? */
  42. /* STRUCTURED-DATA
  43. <KEY-OBJECT>
  44. THIS-PROCEDURE
  45. </KEY-OBJECT>
  46. <FOREIGN-KEYS>
  47. </FOREIGN-KEYS>
  48. <EXECUTING-CODE>
  49. **************************
  50. * Set attributes related to FOREIGN KEYS
  51. */
  52. RUN set-attribute-list (
  53. 'Keys-Accepted = "",
  54. Keys-Supplied = ""':U).
  55. /**************************
  56. </EXECUTING-CODE> */
  57. /* _UIB-CODE-BLOCK-END */
  58. &ANALYZE-RESUME
  59. /* *********************** Control Definitions ********************** */
  60. /* Definitions of the field level widgets */
  61. DEFINE BUTTON Btn_Faelligkeit
  62. LABEL "Fälligkeitsübersicht"
  63. SIZE 25.2 BY 1.24.
  64. DEFINE BUTTON Btn_Faktura
  65. LABEL "Fakturajournal"
  66. SIZE 25.2 BY 1.24.
  67. DEFINE BUTTON Btn_Mehrwertsteuer
  68. LABEL "Mehrwertst.journal"
  69. SIZE 25.2 BY 1.24.
  70. DEFINE BUTTON Btn_OffenPosten
  71. LABEL "Offene Posten"
  72. SIZE 25.2 BY 1.24.
  73. DEFINE BUTTON Btn_Zahlung
  74. LABEL "Zahlungsjournal"
  75. SIZE 25.2 BY 1.24.
  76. DEFINE RECTANGLE RECT-18
  77. EDGE-PIXELS 2 GRAPHIC-EDGE NO-FILL
  78. SIZE 90 BY 7.14.
  79. /* ************************ Frame Definitions *********************** */
  80. DEFINE FRAME F-Main
  81. Btn_Faktura AT ROW 1.81 COL 3.8
  82. Btn_Zahlung AT ROW 3.29 COL 3.8
  83. Btn_Mehrwertsteuer AT ROW 4.71 COL 3.8
  84. Btn_OffenPosten AT ROW 6.14 COL 3.8
  85. Btn_Faelligkeit AT ROW 6.14 COL 40 WIDGET-ID 2
  86. RECT-18 AT ROW 1.24 COL 2
  87. WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY
  88. SIDE-LABELS NO-UNDERLINE THREE-D
  89. AT COL 1 ROW 1 SCROLLABLE .
  90. /* *********************** Procedure Settings ************************ */
  91. &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
  92. /* Settings for THIS-PROCEDURE
  93. Type: SmartViewer
  94. Allow: Basic,DB-Fields
  95. Frames: 1
  96. Add Fields to: EXTERNAL-TABLES
  97. Other Settings: PERSISTENT-ONLY COMPILE
  98. */
  99. /* This procedure should always be RUN PERSISTENT. Report the error, */
  100. /* then cleanup and return. */
  101. IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
  102. MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT.":U
  103. VIEW-AS ALERT-BOX ERROR BUTTONS OK.
  104. RETURN.
  105. END.
  106. &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
  107. /* ************************* Create Window ************************** */
  108. &ANALYZE-SUSPEND _CREATE-WINDOW
  109. /* DESIGN Window definition (used by the UIB)
  110. CREATE WINDOW V-table-Win ASSIGN
  111. HEIGHT = 7.62
  112. WIDTH = 92.
  113. /* END WINDOW DEFINITION */
  114. */
  115. &ANALYZE-RESUME
  116. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB V-table-Win
  117. /* ************************* Included-Libraries *********************** */
  118. {src/adm/method/viewer.i}
  119. /* _UIB-CODE-BLOCK-END */
  120. &ANALYZE-RESUME
  121. /* *********** Runtime Attributes and AppBuilder Settings *********** */
  122. &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
  123. /* SETTINGS FOR WINDOW V-table-Win
  124. VISIBLE,,RUN-PERSISTENT */
  125. /* SETTINGS FOR FRAME F-Main
  126. NOT-VISIBLE FRAME-NAME Size-to-Fit */
  127. ASSIGN
  128. FRAME F-Main:SCROLLABLE = FALSE
  129. FRAME F-Main:HIDDEN = TRUE.
  130. /* _RUN-TIME-ATTRIBUTES-END */
  131. &ANALYZE-RESUME
  132. /* Setting information for Queries and Browse Widgets fields */
  133. &ANALYZE-SUSPEND _QUERY-BLOCK FRAME F-Main
  134. /* Query rebuild information for FRAME F-Main
  135. _Options = "NO-LOCK"
  136. _Query is NOT OPENED
  137. */ /* FRAME F-Main */
  138. &ANALYZE-RESUME
  139. /* ************************ Control Triggers ************************ */
  140. &Scoped-define SELF-NAME F-Main
  141. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL F-Main V-table-Win
  142. ON END-ERROR OF FRAME F-Main
  143. DO:
  144. RUN new-state ( INPUT 'ENDE, MAIN':U ).
  145. RETURN NO-APPLY.
  146. END.
  147. /* _UIB-CODE-BLOCK-END */
  148. &ANALYZE-RESUME
  149. &Scoped-define SELF-NAME Btn_Faelligkeit
  150. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Btn_Faelligkeit V-table-Win
  151. ON CHOOSE OF Btn_Faelligkeit IN FRAME F-Main /* Fälligkeitsübersicht */
  152. DO:
  153. RUN "g-p_faelligkeit.w".
  154. END.
  155. /* _UIB-CODE-BLOCK-END */
  156. &ANALYZE-RESUME
  157. &Scoped-define SELF-NAME Btn_Faktura
  158. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Btn_Faktura V-table-Win
  159. ON CHOOSE OF Btn_Faktura IN FRAME F-Main /* Fakturajournal */
  160. DO:
  161. RUN "v8/d-p_debfa.w".
  162. END.
  163. /* _UIB-CODE-BLOCK-END */
  164. &ANALYZE-RESUME
  165. &Scoped-define SELF-NAME Btn_Mehrwertsteuer
  166. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Btn_Mehrwertsteuer V-table-Win
  167. ON CHOOSE OF Btn_Mehrwertsteuer IN FRAME F-Main /* Mehrwertst.journal */
  168. DO:
  169. RUN "v8/d-p_debwu.w".
  170. END.
  171. /* _UIB-CODE-BLOCK-END */
  172. &ANALYZE-RESUME
  173. &Scoped-define SELF-NAME Btn_OffenPosten
  174. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Btn_OffenPosten V-table-Win
  175. ON CHOOSE OF Btn_OffenPosten IN FRAME F-Main /* Offene Posten */
  176. DO:
  177. RUN "v8/d-p_debop.w".
  178. END.
  179. /* _UIB-CODE-BLOCK-END */
  180. &ANALYZE-RESUME
  181. &Scoped-define SELF-NAME Btn_Zahlung
  182. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Btn_Zahlung V-table-Win
  183. ON CHOOSE OF Btn_Zahlung IN FRAME F-Main /* Zahlungsjournal */
  184. DO:
  185. RUN "v8/d-p_debza.w".
  186. END.
  187. /* _UIB-CODE-BLOCK-END */
  188. &ANALYZE-RESUME
  189. &UNDEFINE SELF-NAME
  190. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK V-table-Win
  191. /* *************************** Main Block *************************** */
  192. &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN
  193. RUN dispatch IN THIS-PROCEDURE ('initialize':U).
  194. &ENDIF
  195. /************************ INTERNAL PROCEDURES ********************/
  196. /* _UIB-CODE-BLOCK-END */
  197. &ANALYZE-RESUME
  198. /* ********************** Internal Procedures *********************** */
  199. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-row-available V-table-Win _ADM-ROW-AVAILABLE
  200. PROCEDURE adm-row-available :
  201. /*------------------------------------------------------------------------------
  202. Purpose: Dispatched to this procedure when the Record-
  203. Source has a new row available. This procedure
  204. tries to get the new row (or foriegn keys) from
  205. the Record-Source and process it.
  206. Parameters: <none>
  207. ------------------------------------------------------------------------------*/
  208. /* Define variables needed by this internal procedure. */
  209. {src/adm/template/row-head.i}
  210. /* Process the newly available records (i.e. display fields,
  211. open queries, and/or pass records on to any RECORD-TARGETS). */
  212. {src/adm/template/row-end.i}
  213. END PROCEDURE.
  214. /* _UIB-CODE-BLOCK-END */
  215. &ANALYZE-RESUME
  216. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI V-table-Win _DEFAULT-DISABLE
  217. PROCEDURE disable_UI :
  218. /*------------------------------------------------------------------------------
  219. Purpose: DISABLE the User Interface
  220. Parameters: <none>
  221. Notes: Here we clean-up the user-interface by deleting
  222. dynamic widgets we have created and/or hide
  223. frames. This procedure is usually called when
  224. we are ready to "clean-up" after running.
  225. ------------------------------------------------------------------------------*/
  226. /* Hide all frames. */
  227. HIDE FRAME F-Main.
  228. IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
  229. END PROCEDURE.
  230. /* _UIB-CODE-BLOCK-END */
  231. &ANALYZE-RESUME
  232. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-records V-table-Win _ADM-SEND-RECORDS
  233. PROCEDURE send-records :
  234. /*------------------------------------------------------------------------------
  235. Purpose: Send record ROWID's for all tables used by
  236. this file.
  237. Parameters: see template/snd-head.i
  238. ------------------------------------------------------------------------------*/
  239. /* SEND-RECORDS does nothing because there are no External
  240. Tables specified for this SmartViewer, and there are no
  241. tables specified in any contained Browse, Query, or Frame. */
  242. END PROCEDURE.
  243. /* _UIB-CODE-BLOCK-END */
  244. &ANALYZE-RESUME
  245. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE state-changed V-table-Win
  246. PROCEDURE state-changed :
  247. /* -----------------------------------------------------------
  248. Purpose:
  249. Parameters: <none>
  250. Notes:
  251. -------------------------------------------------------------*/
  252. DEFINE INPUT PARAMETER p-issuer-hdl AS HANDLE NO-UNDO.
  253. DEFINE INPUT PARAMETER p-state AS CHARACTER NO-UNDO.
  254. CASE p-state:
  255. /* Object instance CASEs can go here to replace standard behavior
  256. or add new cases. */
  257. {src/adm/template/vstates.i}
  258. END CASE.
  259. END PROCEDURE.
  260. /* _UIB-CODE-BLOCK-END */
  261. &ANALYZE-RESUME