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

Diff of /papo/forms/voidInvoice.gfd

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

revision 1.3 by jlenton, Mon Dec 9 16:54:11 2002 UTC revision 1.3.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  <form width="80" height="25" title="Anulación de Facturas">  
3    <datasource name="searchDataSource"/>  <!--  GNUe Forms 0.5.0 Migration Tool
4    <datasource name="resultDataSource" database="papo" table="own_document">        Saved on: 2003-02-11 17:42:19  -->
5    
6    <form title="Anulación de Facturas">
7      <datasource name="levelDataSource" connection="papo"
8                  historytable="_product_store_data" table="_product_store_data, product_store">
9      <condition>      <condition>
10        <or>        <and>
11          <eq>          <eq>
12            <cfield name="own_document_type"/>            <cfield name="product_store.id"/>
13            <cconst value="1"/><!-- 'Factura de Servicios' -->            <cfield name="_product_store_data._table"/>
14          </eq>          </eq>
15            <null>
16              <cfield name="_product_store_data._end_t"/>
17            </null>
18          </and>
19        </condition>
20      </datasource>
21      <datasource name="itemDataSource" connection="papo"
22                  table="_price_data, _product_store_data, own_document, own_item, own_product_item">
23        <condition>
24          <and>
25          <eq>          <eq>
26            <cfield name="own_document_type"/>            <cfield name="own_product_item.own_item"/>
27            <cconst value="4"/><!-- 'Factura de Productos' -->            <cfield name="own_item.id"/>
28          </eq>          </eq>
29        </or>          <eq>
30              <cfield name="own_product_item.price"/>
31              <cfield name="_price_data.id"/>
32            </eq>
33            <eq>
34              <cfield name="_price_data.product"/>
35              <cfield name="_product_store_data.product"/>
36            </eq>
37            <eq>
38              <cfield name="own_item.own_document"/>
39              <cfield name="own_document.id"/>
40            </eq>
41            <null>
42              <cfield name="_product_store_data._end_t"/>
43            </null>
44          </and>
45      </condition>      </condition>
46    </datasource>    </datasource>
47    <datasource name="clientDataSource" database="papo" table="_entity_data, _alien_entity_data, _persona_data, _client_data">    <datasource name="clientDataSource" connection="papo"
48                  table="_entity_data, _alien_entity_data, _persona_data, _client_data">
49      <condition>      <condition>
50        <and>        <and>
51          <null>          <null>
# Line 45  Line 75 
75        </and>        </and>
76      </condition>      </condition>
77    </datasource>    </datasource>
78    <datasource name="itemDataSource" database="papo"    <datasource name="resultDataSource" connection="papo" table="own_document">
     table="_price_data, _product_store_data, own_document, own_item, own_product_item">  
79      <condition>      <condition>
80        <and>        <or>
         <eq>  
           <cfield name="own_product_item.own_item"/>  
           <cfield name="own_item.id"/>  
         </eq>  
         <eq>  
           <cfield name="own_product_item.price"/>  
           <cfield name="_price_data.id"/>  
         </eq>  
81          <eq>          <eq>
82            <cfield name="_price_data.product"/>            <cfield name="own_document_type"/>
83            <cfield name="_product_store_data.product"/>            <cconst value="1"/>
84          </eq>          </eq>
85          <eq>          <eq>
86            <cfield name="own_item.own_document"/>            <cfield name="own_document_type"/>
87            <cfield name="own_document.id"/>            <cconst value="4"/>
88          </eq>          </eq>
89          <null>        </or>
           <cfield name="_product_store_data._end_t"/>  
         </null>  
       </and>  
90      </condition>      </condition>
91    </datasource>    </datasource>
92    <datasource name="levelDataSource" database="papo"    <datasource name="searchDataSource"/>
93      table="_product_store_data, product_store"    <trigger name="searchTrigger" type="NAMED"><![CDATA[
94      historytable="_product_store_data">    resultBlock.rollback()
     <condition>  
       <and>  
         <eq>  
           <cfield name="product_store.id"/>  
           <cfield name="_product_store_data._table"/>  
         </eq>  
         <null>  
           <cfield name="_product_store_data._end_t"/>  
         </null>  
       </and>  
     </condition>  
   </datasource>          
   
   <trigger name="searchTrigger" type="NAMED">  
   resultBlock.processRollback()  
95    resultBlock.initQuery()    resultBlock.initQuery()
96    resultBlock.numberEntry = str(searchBlock.numberEntry)+'%'    resultBlock.numberEntry1 = str(searchBlock.numberEntry)+'%'
97    resultBlock.processQuery()    resultBlock.executeQuery()
98    </trigger>    ]]></trigger>
99      <trigger name="commitTrigger" type="NAMED"><![CDATA[
   <trigger name="commitTrigger" type="NAMED">  
100    from __future__ import nested_scopes    from __future__ import nested_scopes
101    global hack    global hack
102    import hack    import hack
# Line 111  Line 113 
113                # remove the stock                # remove the stock
114                f = lambda y: lambda x: x-y                f = lambda y: lambda x: x-y
115    
116            itemBlock.processRollback()            itemBlock.rollback()
117            itemBlock.initQuery()            itemBlock.initQuery()
118            itemBlock.documentEntry = str(document.getField('own_document.id'))            itemBlock.documentEntry = str(document.getField('own_document.id'))
119            itemBlock.processQuery()            itemBlock.executeQuery()
120            
121            for item in itemDataSource.getRecords():            for item in itemDataSource.getRecords():
122                levelBlock.processRollback()                levelBlock.rollback()
123                levelBlock.initQuery()                levelBlock.initQuery()
124                levelBlock.productEntry = str( item.getField('_product_store_data.product') )                levelBlock.productEntry1 = str( item.getField('_product_store_data.product') )
125                levelBlock.processQuery()                levelBlock.executeQuery()
126                levelBlock.levelEntry.atomicModify(f(hack.a2f(item.getField('own_product_item.qty'))))                levelBlock.levelEntry1.atomicModify(f(hack.a2f(item.getField('own_product_item.qty'))))
127            levelBlock.processRollback()            levelBlock.rollback()
128                                                            
129    searchBlock.processRollback()    searchBlock.rollback()
130    itemBlock.processRollback()    itemBlock.rollback()
131    levelBlock.processRollback()    levelBlock.rollback()
132    resultBlock.commit()    resultBlock.commit()
133                
134    </trigger>    ]]></trigger>
135      <trigger name="rollbackTrigger" type="NAMED"><![CDATA[
   <trigger name="rollbackTrigger" type="NAMED">  
136    import hack    import hack
137    hack.rollback(resultBlock)    hack.rollback(resultBlock)
138    </trigger>    ]]></trigger>
139      <trigger name="abortTrigger" type="NAMED"><![CDATA[
   <trigger name="abortTrigger" type="NAMED">  
140    import hack    import hack
141    hack.rollback(resultBlock)    hack.rollback(resultBlock)
142    exit()    exit()
143    </trigger>    ]]></trigger>
144      <logic>
145    <page name="Selección de Factura">      <block name="searchBlock" datasource="searchDataSource" restrictInsert="">
146      <block name="searchBlock" datasource="searchDataSource" transparentBlock="" restrictInsert="">        <field name="numberEntry"/>
       <label x="1" y="1" text="Número de la factura a buscar"/>  
       <entry x="1" y="2" name="numberEntry" width="35"/>  
       <button x="37" y="2" width="9" height="1" name="searchBtn" label="Buscar" trigger="searchTrigger"/>  
147      </block>      </block>
148      <block name="resultBlock" datasource="resultDataSource" transparentBlock="" restrictInsert="">      <block name="resultBlock" datasource="resultDataSource" restrictInsert="">
149        <entry x="0" y="0" name="idREntry" field="own_document.id" hidden="y"/>        <field name="idREntry" field="own_document.id"/>
150        <entry x="0" y="0" name="own_document_typeEntry" field="own_document.own_document_type" hidden="y"/>        <field name="own_document_typeEntry"
151        <label x="1" y="5" text="Número"/>               field="own_document.own_document_type"/>
152        <label x="10" y="5" text="Cliente"/>        <field name="numberEntry1" field="own_document.number" readonly="y"/>
153        <label x="45" y="5" text="Fecha"/>        <field name="clientEntry" field="own_document.recipient"
154        <label x="68" y="4" text="Anulada"/>               fk_description="_entity_data.name" fk_key="_entity_data._table" fk_source="clientDataSource"
155        <label x="69" y="5" text="(1=si)"/>               readonly="y"/>
156        <entry x="1" y="6" width="9" rows="10" name="numberEntry" field="own_document.number" style="label" readonly="y"/>        <field name="dateEntry" field="own_document.date" readonly="y"/>
157        <entry x="10" y="6" width="35" rows="10" name="clientEntry" field="own_document.recipient" style="textlookup" readonly="y"        <field name="is_voidEntry" field="own_document.is_void"/>
         foreign_key="clientDataSource._entity_data._table" foreign_key_description="_entity_data.name"/>  
       <entry x="45" y="6" width="25" rows="10" name="dateEntry" field="own_document.date" style="label" readonly="y"/>  
       <entry x="70" y="6" width="2" rows="10" name="is_voidEntry" field="own_document.is_void" />  
       <scrollbar page="10" x="72" y="6" width="3" height="10"/>  
       <button x="45" y="17" width="9" height="1" name="commitBtn" label="Aceptar" trigger="commitTrigger"/>  
       <button x="55" y="17" width="9" height="1" name="rollbackBtn" label="Deshacer" trigger="rollbackTrigger"/>  
       <button x="65" y="17" width="9" height="1" name="abortBtn" label="Cancelar" trigger="abortTrigger"/>  
158      </block>      </block>
159      <block name="itemBlock" datasource="itemDataSource">      <block name="itemBlock" datasource="itemDataSource">
160        <entry x="0" y="0" field="own_document.id" name="documentEntry" hidden="y"/>        <field name="documentEntry" field="own_document.id"/>
161        <entry x="0" y="0" field="_product_store_data.product" name="productEntry" hidden="y"/>        <field name="productEntry" field="_product_store_data.product"/>
162        <entry x="0" y="0" field="_product_store_data.level" name="levelEntry" hidden="y"/>        <field name="levelEntry" field="_product_store_data.level"/>
163        <entry x="0" y="0" field="own_product_item.qty" name="qtyEntry" hidden="y"/>        <field name="qtyEntry" field="own_product_item.qty"/>
164      </block>      </block>
165      <block name="levelBlock" datasource="levelDataSource">      <block name="levelBlock" datasource="levelDataSource">
166        <entry x="0" y="0" field="_product_store_data.level" name="levelEntry" hidden="y"/>        <field name="levelEntry1" field="_product_store_data.level"/>
167        <entry x="0" y="0" field="_product_store_data.product" name="productEntry" hidden="y"/>        <field name="productEntry1" field="_product_store_data.product"/>
168        <entry x="0" y="0" field="_product_store_data.lowater" name="lowaterEntry" hidden="y"/>        <field name="lowaterEntry" field="_product_store_data.lowater"/>
169        <entry x="0" y="0" field="_product_store_data.hiwater" name="hiwaterEntry" hidden="y"/>        <field name="hiwaterEntry" field="_product_store_data.hiwater"/>
170        <entry x="0" y="0" field="_product_store_data.storehouse" name="storehouseEntry" hidden="y"/>        <field name="storehouseEntry" field="_product_store_data.storehouse"/>
171      </block>      </block>
172    </page>    </logic>
173      <layout xmlns:c="GNUe:Layout:Char" c:height="28" c:width="80">
174        <page name="Selección de Factura">
175          <label text="Número de la factura a buscar" c:x="1" c:y="1"/>
176          <entry block="searchBlock" field="numberEntry" c:width="35" c:x="1"
177                 c:y="2"/>
178          <button name="searchBtn" c:height="1" label="Buscar" c:width="9"
179                  c:x="37" c:y="2">
180            <trigger src="searchTrigger" type="On-Action"/>
181          </button>
182          <entry block="resultBlock" field="idREntry" hidden="y" c:x="0" c:y="0"/>
183          <entry block="resultBlock" field="own_document_typeEntry" hidden="y"
184                 c:x="0" c:y="0"/>
185          <label text="Número" c:x="1" c:y="5"/>
186          <label text="Cliente" c:x="10" c:y="5"/>
187          <label text="Fecha" c:x="45" c:y="5"/>
188          <label text="Anulada" c:x="68" c:y="4"/>
189          <label text="(1=si)" c:x="69" c:y="5"/>
190          <entry block="resultBlock" field="numberEntry1" rows="10" style="label"
191                 c:width="9" c:x="1" c:y="6"/>
192          <entry block="resultBlock" field="clientEntry" rows="10"
193                 style="textlookup" c:width="35" c:x="10" c:y="6"/>
194          <entry block="resultBlock" field="dateEntry" rows="10" style="label"
195                 c:width="25" c:x="45" c:y="6"/>
196          <entry block="resultBlock" field="is_voidEntry" rows="10" c:width="2"
197                 c:x="70" c:y="6"/>
198          <scrollbar block="resultBlock" c:height="10" page="10" c:width="3"
199                     c:x="72" c:y="6"/>
200          <button name="commitBtn" c:height="1" label="Aceptar" c:width="9"
201                  c:x="45" c:y="17">
202            <trigger src="commitTrigger" type="On-Action"/>
203          </button>
204          <button name="rollbackBtn" c:height="1" label="Deshacer" c:width="9"
205                  c:x="55" c:y="17">
206            <trigger src="rollbackTrigger" type="On-Action"/>
207          </button>
208          <button name="abortBtn" c:height="1" label="Cancelar" c:width="9"
209                  c:x="65" c:y="17">
210            <trigger src="abortTrigger" type="On-Action"/>
211          </button>
212          <entry block="itemBlock" field="documentEntry" hidden="y" c:x="0"
213                 c:y="0"/>
214          <entry block="itemBlock" field="productEntry" hidden="y" c:x="0" c:y="0"/>
215          <entry block="itemBlock" field="levelEntry" hidden="y" c:x="0" c:y="0"/>
216          <entry block="itemBlock" field="qtyEntry" hidden="y" c:x="0" c:y="0"/>
217          <entry block="levelBlock" field="levelEntry1" hidden="y" c:x="0" c:y="0"/>
218          <entry block="levelBlock" field="productEntry1" hidden="y" c:x="0"
219                 c:y="0"/>
220          <entry block="levelBlock" field="lowaterEntry" hidden="y" c:x="0"
221                 c:y="0"/>
222          <entry block="levelBlock" field="hiwaterEntry" hidden="y" c:x="0"
223                 c:y="0"/>
224          <entry block="levelBlock" field="storehouseEntry" hidden="y" c:x="0"
225                 c:y="0"/>
226        </page>
227      </layout>
228  </form>  </form>

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.3.2.1

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