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

Diff of /papo/forms/productInvoice.gfd

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

revision 1.49 by charlie, Mon Apr 14 23:26:54 2003 UTC revision 1.50 by apronotti, Tue Apr 15 17:43:40 2003 UTC
# Line 8  Line 8 
8    <datasource name="prodResultDataSource" cache="1"/>    <datasource name="prodResultDataSource" cache="1"/>
9    
10    
11    
12     <datasource name="organizationDataSource" database="papo"
13                 table="_entity_data, _own_entity_data, _organization_data, _persona_tax_profile_data, _tax_profile_data">
14        <condition>
15          <and>
16            <!-- uniones del objeto n-1 -->
17            <eq>
18              <cfield name="_own_entity_data._table"/>
19              <cfield name="_organization_data.own_entity"/>
20            </eq>
21            <eq>
22              <cfield name="_entity_data._table"/>
23              <cfield name="_own_entity_data.entity"/>
24            </eq>
25            <eq>
26             <cfield name="_entity_data._table"/>
27             <cfield name="_persona_tax_profile_data.persona"/>
28            </eq>
29            <eq>
30              <cfield name="_tax_profile_data._table"/>
31              <cfield name="_persona_tax_profile_data.tax_profile"/>
32            </eq>
33            <eq>
34              <cfield name="_tax_profile_data.tax"/>
35              <cconst value="1"/> <!-- IVA -->
36            </eq>
37            <!-- history tables = null n -->
38            <null>
39              <cfield name="_entity_data._end_t"/>
40            </null>
41            <null>
42              <cfield name="_own_entity_data._end_t"/>
43            </null>
44            <null>
45              <cfield name="_organization_data._end_t"/>
46            </null>
47            <!--busco el 1 -->
48            <eq>
49              <cfield name="organization.id"/>
50              <cconst value="1"/>
51            </eq>
52          </and>
53        </condition>
54      </datasource>
55    
56    <!--   Origen de datos que sirve para seleccionar el cleinte al que se le -->    <!--   Origen de datos que sirve para seleccionar el cleinte al que se le -->
57    <!--   va a facturar   -->    <!--   va a facturar   -->
58    <datasource name="clientDataSource" database="papo"    <datasource name="clientDataSource" database="papo"
# Line 813  Line 858 
858          tmpValuesDataSource.priceTypeId = clientResultSet.current.getField("_price_type_data._table")          tmpValuesDataSource.priceTypeId = clientResultSet.current.getField("_price_type_data._table")
859          # Calcula el tipo de factura qeu corresponde en funcion de la condicion ante el IVA de la empresa y la del cliente          # Calcula el tipo de factura qeu corresponde en funcion de la condicion ante el IVA de la empresa y la del cliente
860          clientIvaTaxProfle = int(str(tmpValuesDataSource.alienIVACond))          clientIvaTaxProfle = int(str(tmpValuesDataSource.alienIVACond))
861          providerIvaTaxProfile = 1 # hay que corregir y averiguar la condicion correcta          lOrgResult = organizationDataSource.createResultSet()
862            if lOrgResult.firstRecord():
863              providerIvaTaxProfile = lOrgResult.current.getField('_tax_profile_data._table')
864            else:
865              providerIvaTaxProfile = 1
866          ownDocumentBlock.invoiceTypeEntry = hack.calcInvoiceType(clientIvaTaxProfle, providerIvaTaxProfile)          ownDocumentBlock.invoiceTypeEntry = hack.calcInvoiceType(clientIvaTaxProfle, providerIvaTaxProfile)
867          callTrigger('invoiceTypeValidation')          callTrigger('invoiceTypeValidation')
868    ]]></trigger>    ]]></trigger>

Legend:
Removed from v.1.49  
changed lines
  Added in v.1.50

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