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

Diff of /papo/forms/productProviderInvoice.gfd

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

revision 1.26 by styxman, Mon Apr 21 18:19:00 2003 UTC revision 1.27 by apronotti, Tue Apr 22 19:19:26 2003 UTC
# Line 12  Line 12 
12    
13    <datasource name="nil" cache="1"/>    <datasource name="nil" cache="1"/>
14    <datasource name="payDataSource" cache="1"/>    <datasource name="payDataSource" cache="1"/>
15      <datasource name="tmpValuesDataSource" cache="1"/>
16    <datasource name="tmpSearchDataSource" cache="1"/>    <datasource name="tmpSearchDataSource" cache="1"/>
17    <datasource name="currentSearchIdDataSource" cache="1"/>    <datasource name="currentSearchIdDataSource" cache="1"/>
18    
19     <datasource name="ownOrganizationDataSource" database="papo"
20                 table="_entity_data, _own_entity_data, _organization_data, _persona_tax_profile_data, _tax_profile_data">
21        <condition>
22          <and>
23            <!-- uniones del objeto n-1 -->
24            <eq>
25              <cfield name="_own_entity_data._table"/>
26              <cfield name="_organization_data.own_entity"/>
27            </eq>
28            <eq>
29              <cfield name="_entity_data._table"/>
30              <cfield name="_own_entity_data.entity"/>
31            </eq>
32            <eq>
33             <cfield name="_entity_data._table"/>
34             <cfield name="_persona_tax_profile_data.persona"/>
35            </eq>
36            <eq>
37              <cfield name="_tax_profile_data._table"/>
38              <cfield name="_persona_tax_profile_data.tax_profile"/>
39            </eq>
40            <eq>
41              <cfield name="_tax_profile_data.tax"/>
42              <cconst value="1"/> <!-- IVA -->
43            </eq>
44            <!-- history tables = null n -->
45            <null>
46              <cfield name="_entity_data._end_t"/>
47            </null>
48            <null>
49              <cfield name="_own_entity_data._end_t"/>
50            </null>
51            <null>
52              <cfield name="_organization_data._end_t"/>
53            </null>
54            <!--busco el 1 -->
55            <eq>
56              <cfield name="organization.id"/>
57              <cconst value="1"/>
58            </eq>
59          </and>
60        </condition>
61      </datasource>
62    
63    <!-- Origen de datos que sirve para dar de alta procedimientos de pago (en este caso de la factura) -->    <!-- Origen de datos que sirve para dar de alta procedimientos de pago (en este caso de la factura) -->
64    <datasource name="proceedingDataSource" database="papo" table="proceeding"/>    <datasource name="proceedingDataSource" database="papo" table="proceeding"/>
65    
# Line 798  Line 843 
843      </condition>      </condition>
844    </datasource>    </datasource>
845    
846      <trigger name="startUp" type="On-Startup">
847      ownOrganizationBlock.processRollback()
848      ownOrganizationBlock.initQuery()
849      ownOrganizationBlock.processQuery()
850      tmpValuesDataSource.ownIVACond = str(ownOrganizationBlock.condIVAEntry)
851      </trigger>
852    
853    <trigger name="setInvoiceType" type="NAMED"><![CDATA[    <trigger name="setInvoiceType" type="NAMED"><![CDATA[
854      invoiceType = str(alienDocumentBlock.invoiceTypeEntry).strip().lower()      invoiceType = str(alienDocumentBlock.invoiceTypeEntry).strip().lower()
855      if invoiceType == 'a':      if invoiceType == 'a':
# Line 1118  Line 1170 
1170        alienDocumentBlock.providerCodeSEntry = str(providerResultBlock.providerCodeEntry)        alienDocumentBlock.providerCodeSEntry = str(providerResultBlock.providerCodeEntry)
1171        alienDocumentBlock.providerNameSEntry = str(providerResultBlock.providerNameEntry)        alienDocumentBlock.providerNameSEntry = str(providerResultBlock.providerNameEntry)
1172        alienDocumentBlock.providerEntry = str(providerResultBlock.idEntry)        alienDocumentBlock.providerEntry = str(providerResultBlock.idEntry)
1173        clientIvaTaxProfle = 1 # hay que corregir y averiguar la condicion correcta        clientIvaTaxProfle = int(str(tmpValuesDataSource.ownIVACond))
1174        providerIvaTaxProfile = int(str(providerResultBlock.providerIvaTaxProfileEntry))        providerIvaTaxProfile = int(str(providerResultBlock.providerIvaTaxProfileEntry))
1175        alienDocumentBlock.invoiceTypeEntry = hack.calcInvoiceType(clientIvaTaxProfle, providerIvaTaxProfile)        alienDocumentBlock.invoiceTypeEntry = hack.calcInvoiceType(clientIvaTaxProfle, providerIvaTaxProfile)
1176        callTrigger('invoiceTypeValidation')        callTrigger('invoiceTypeValidation')
# Line 1823  Line 1875 
1875       <block name="currentSearchIdBlock" datasource="currentSearchIdDataSource">       <block name="currentSearchIdBlock" datasource="currentSearchIdDataSource">
1876         <entry name="searchId" hidden="" x="1" y="1" width="12"/>         <entry name="searchId" hidden="" x="1" y="1" width="12"/>
1877       </block>       </block>
1878         <block name="ownOrganizationBlock" datasource="ownOrganizationDataSource">
1879           <entry name="condIVAEntry" field="_tax_profile_data._table" hidden="" x="1" y="1" width="10"/>
1880         </block>
1881    </page>    </page>
1882    
1883  </form>  </form>

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

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