/[papo]/papo/forms/branch_document.gfd
ViewVC logotype

Diff of /papo/forms/branch_document.gfd

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by jlenton, Fri Dec 6 12:07:08 2002 UTC revision 1.1.2.1 by anthonyl, Fri Mar 14 22:45:25 2003 UTC
# Line 1  Line 1 
1  <?xml version="1.0" encoding="ISO-8859-1"?>  <?xml version="1.0" encoding="ISO-8859-1"?>
2    
3  <form tabbed="top" title="ABM de Talonarios" height="18" width="84">  <!--  GNUe Forms 0.5.0 Migration Tool
4    <datasource name="focusDataSource" cache="1"/>        Saved on: 2003-02-11 17:42:11  -->
5    <datasource name="searchDataSource" cache="1"/>  
6    <datasource name="resultDataSource" database="papo"  <form title="ABM de Talonarios">
7      table="branch_document, _branch_document_data, _document_type_data"    <datasource name="document_typeDataSource" connection="papo"
8      order_by="document_type"                table="_document_type_data">
9      historytable="_branch_document_data">      <condition>
10          <null>
11            <cfield name="_end_t"/>
12          </null>
13        </condition>
14      </datasource>
15      <datasource name="editDataSource" connection="papo"
16                  historytable="_branch_document_data" table="branch_document, _branch_document_data">
17      <condition>      <condition>
18        <and>        <and>
         <!-- pega branch_document con su _data -->  
19          <eq>          <eq>
20            <cfield name="branch_document.id"/>            <cfield name="branch_document.id"/>
21            <cfield name="_branch_document_data._table"/>            <cfield name="_branch_document_data._table"/>
22          </eq>          </eq>
         <eq>  
           <cfield name="_branch_document_data.document_type"/>  
           <cfield name="_document_type_data._table"/>  
         </eq>  
         <!-- descarta todo branch_document muerto -->  
23          <null>          <null>
24            <cfield name="_branch_document_data._end_t"/>            <cfield name="_branch_document_data._end_t"/>
25          </null>          </null>
26        </and>        </and>
27      </condition>      </condition>
28    </datasource>    </datasource>
29    <datasource name="editDataSource" database="papo"    <datasource name="resultDataSource" connection="papo"
30      table="branch_document, _branch_document_data"                historytable="_branch_document_data" order_by="document_type"
31      historytable="_branch_document_data">                table="branch_document, _branch_document_data, _document_type_data">
32      <condition>      <condition>
33        <and>        <and>
         <!-- pega branch_document con su _data -->  
34          <eq>          <eq>
35            <cfield name="branch_document.id"/>            <cfield name="branch_document.id"/>
36            <cfield name="_branch_document_data._table"/>            <cfield name="_branch_document_data._table"/>
37          </eq>          </eq>
38          <!-- descarta todo branch_document muerto -->          <eq>
39              <cfield name="_branch_document_data.document_type"/>
40              <cfield name="_document_type_data._table"/>
41            </eq>
42          <null>          <null>
43            <cfield name="_branch_document_data._end_t"/>            <cfield name="_branch_document_data._end_t"/>
44          </null>          </null>
45        </and>        </and>
46      </condition>      </condition>
47    </datasource>    </datasource>
48    <datasource name="document_typeDataSource" database="papo" table="_document_type_data">    <datasource name="searchDataSource" cache="1"/>
49      <condition>    <datasource name="focusDataSource" cache="1"/>
50        <null>    <trigger name="searchTrigger" type="NAMED"><![CDATA[
51          <cfield name="_end_t"/>    resultBlock.rollback()
       </null>  
     </condition>  
   </datasource>  
   
   <trigger name="searchTrigger" type="NAMED">  
   resultBlock.processRollback()  
52    resultBlock.initQuery()    resultBlock.initQuery()
53    
54    
55    resultBlock.listEntry0 = str(searchBlock.searchEntry0)+'%'    resultBlock.listEntry00 = str(searchBlock.searchEntry0)+'%'
56    
57    resultBlock.processQuery()    resultBlock.executeQuery()
58    </trigger>    ]]></trigger>
59      <trigger name="commitTrigger" type="NAMED"><![CDATA[
   <trigger name="commitTrigger" type="NAMED">  
60    if editBlock.getCurrentRecord().isInserted():    if editBlock.getCurrentRecord().isInserted():
61        editBlock.commit()        editBlock.commit()
62        editBlock.jumpRecord(2)        editBlock.gotoRecord(2)
63    else:    else:
64        editBlock.commit()        editBlock.commit()
65    </trigger>    ]]></trigger>
66        <trigger name="deleteTrigger" type="NAMED"><![CDATA[
   
   <trigger name="deleteTrigger" type="NAMED">  
67      import hack      import hack
68      hack.deleteCurrentRecord(editBlock)      hack.deleteCurrentRecord(editBlock)
69    </trigger>    ]]></trigger>
70      <trigger name="rollbackTrigger" type="NAMED"><![CDATA[
   <trigger name="rollbackTrigger" type="NAMED">  
71      import hack      import hack
72      hack.rollback(editBlock)      hack.rollback(editBlock)
73    </trigger>    ]]></trigger>
74      <trigger name="askForChangesTrigger" type="NAMED"><![CDATA[
   <trigger name="askForChangesTrigger" type="NAMED">  
75      import hack      import hack
76    
77      hack.confirmPageChanges(self, 'commitTrigger', editBlock)      hack.confirmPageChanges(self, 'commitTrigger', editBlock)
78    </trigger>    ]]></trigger>
79      <logic>
80    <page name="Talonarios">      <block name="searchBlock" datasource="searchDataSource" restrictInsert="">
81      <trigger type="Pre-Focusout">        <field name="searchEntry0"/>
       editBlock.processRollback()  
       if resultBlock.getRecordCount() > 0 and not resultBlock.getCurrentRecord().isEmpty():  
           editBlock.initQuery()  
           editBlock.idEntry = ("%s" % resultBlock.idREntry)  
           editBlock.processQuery()  
     </trigger>  
     <block name="searchBlock" datasource="searchDataSource" transparentBlock="" restrictInsert="">  
       <label x="1" y="1" text="Tipo de documento a buscar"/>  
       <entry x="1" y="2" name="searchEntry0" width="35"/>  
       <button x="37" y="2" trigger="searchTrigger" width="9" label="Buscar"  
         name="searchBtn" height="1"/>  
82      </block>      </block>
83      <block name="resultBlock" datasource="resultDataSource">      <block name="resultBlock" datasource="resultDataSource">
84        <entry x="1" y="3" name="idREntry" field="branch_document.id" hidden="y"/>        <field name="idREntry" field="branch_document.id"/>
85        <label x="1" y="4" text="Nombre del tipo de documento"/>        <field name="listEntry0" field="_document_type_data.name"/>
       <entry x="1" y="5" name="listEntry0"  
         field="_document_type_data.name" width="80" rows="12"/>  
       <scrollbar page="12" x="81" y="5" width="3" height="12"/>  
86      </block>      </block>
   </page>  
   <page name="Datos del talonario">  
     <trigger type="pre-Focusout" src="askForChangesTrigger"/>  
87      <block name="editBlock" datasource="editDataSource">      <block name="editBlock" datasource="editDataSource">
88        <entry x="0" y="0" name="idEntry" field="branch_document.id" hidden="y"/>        <field name="idEntry" field="branch_document.id"/>
89        <label x="1" y="1" text="Nombre del tipo de documento"/>        <field name="_branch_document_dataDocument_type_entry"
90        <entry x="1" y="2"               field="_branch_document_data.document_type" fk_description="name" fk_key="_table"
91          width="40"               fk_source="document_typeDataSource"/>
92          height="1"        <field name="_branch_document_dataNumber_entry"
93          name="_branch_document_dataDocument_type_entry"               field="_branch_document_data.number"/>
         field="_branch_document_data.document_type"  
         foreign_key="document_typeDataSource._table" foreign_key_description="name" style="dropdown"/>  
       <label x="1" y="3" text="número de próxima factura"/>  
       <entry x="1" y="4"  
         width="31"  
         height="1"  
         name="_branch_document_dataNumber_entry"  
         field="_branch_document_data.number"  
         />  
       <button x="1" y="5" trigger="commitTrigger" width="9" label="Aceptar"  
         name="commitBtn" height="1"/>  
       <button x="11" y="5" trigger="deleteTrigger" width="9" label="Borrar"  
         name="deleteBtn" height="1"/>  
       <button x="21" y="5" trigger="rollbackTrigger" width="9" label="Cancelar"  
         name="rollbackBtn" height="1"/>  
94      </block>      </block>
95    </page>    </logic>
96      <layout xmlns:c="GNUe:Layout:Char" c:height="21" tabbed="top" c:width="84">
97        <page name="Talonarios">
98          <trigger type="Pre-Focusout"><![CDATA[
99          editBlock.rollback()
100          if resultBlock.getRecordCount() > 0 and not resultBlock.getCurrentRecord().isEmpty():
101              editBlock.initQuery()
102              editBlock.idEntry = ("%s" % resultBlock.idREntry)
103              editBlock.executeQuery()
104        ]]></trigger>
105          <label text="Tipo de documento a buscar" c:x="1" c:y="1"/>
106          <entry block="searchBlock" field="searchEntry0" c:width="35" c:x="1"
107                 c:y="2"/>
108          <button name="searchBtn" c:height="1" label="Buscar" c:width="9"
109                  c:x="37" c:y="2">
110            <trigger src="searchTrigger" type="On-Action"/>
111          </button>
112          <entry block="resultBlock" field="idREntry" hidden="y" c:x="1" c:y="3"/>
113          <label text="Nombre del tipo de documento" c:x="1" c:y="4"/>
114          <entry block="resultBlock" field="listEntry0" rows="12" c:width="80"
115                 c:x="1" c:y="5"/>
116          <scrollbar block="resultBlock" c:height="12" page="12" c:width="3"
117                     c:x="81" c:y="5"/>
118        </page>
119        <page name="Datos del talonario">
120          <trigger src="askForChangesTrigger" type="pre-Focusout"/>
121          <entry block="editBlock" field="idEntry" hidden="y" c:x="0" c:y="0"/>
122          <label text="Nombre del tipo de documento" c:x="1" c:y="1"/>
123          <entry block="editBlock"
124                 field="_branch_document_dataDocument_type_entry" c:height="1" style="dropdown" c:width="40" c:x="1" c:y="2"/>
125          <label text="número de próxima factura" c:x="1" c:y="3"/>
126          <entry block="editBlock" field="_branch_document_dataNumber_entry"
127                 c:height="1" c:width="31" c:x="1" c:y="4"/>
128          <button name="commitBtn" c:height="1" label="Aceptar" c:width="9"
129                  c:x="1" c:y="5">
130            <trigger src="commitTrigger" type="On-Action"/>
131          </button>
132          <button name="deleteBtn" c:height="1" label="Borrar" c:width="9"
133                  c:x="11" c:y="5">
134            <trigger src="deleteTrigger" type="On-Action"/>
135          </button>
136          <button name="rollbackBtn" c:height="1" label="Cancelar" c:width="9"
137                  c:x="21" c:y="5">
138            <trigger src="rollbackTrigger" type="On-Action"/>
139          </button>
140        </page>
141      </layout>
142  </form>  </form>

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26