/[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.8 by apronotti, Wed Dec 18 17:54:22 2002 UTC revision 1.9 by styxman, Sat Jan 4 20:00:06 2003 UTC
# Line 264  Line 264 
264      </condition>      </condition>
265    </datasource>    </datasource>
266        
267      <!--HERE TOO-->
268      <datasource name="lookUpTaxDataSource" database="papo"
269        table="product,_product_data,product_tax,_product_tax_data,tax,_tax_data">
270        <condition>
271          <and>
272            <!-- unify historic -->
273            <eq>
274              <cfield name="product.id"/>
275              <cfield name="_product_data._table"/>
276            </eq>
277            <null>
278              <cfield name="_product_data._end_t"/>
279            </null>
280            <eq>
281              <cfield name="product_tax.id"/>
282              <cfield name="_product_tax_data._table"/>
283            </eq>
284            <null>
285              <cfield name="_product_tax_data._end_t"/>
286            </null>
287            <eq>
288              <cfield name="tax.id"/>
289              <cfield name="_tax_data._table"/>
290            </eq>
291            <null>
292              <cfield name="_tax_data._end_t"/>
293            </null>
294            <!-- do the join-man -->
295            <eq>
296              <cfield name="_product_tax_data.product"/>
297              <cfield name="product.id"/>
298            </eq>
299            <eq>
300              <cfield name="_product_tax_data.tax"/>
301              <cfield name="tax.id"/>
302            </eq>
303            <!-- filter out the wanted ones -->
304            <eq>
305              <cfield name="tax.id"/>
306              <!-- IVA -->
307              <cconst value="1"/>
308            </eq>
309          </and>
310        </condition>
311      </datasource>
312      
313    <trigger name="toDayTrigger" type="NAMED">    <trigger name="toDayTrigger" type="NAMED">
314      alienDocumentBlock.dateEntry = alienDocumentDataSource.getTimeStamp()      alienDocumentBlock.dateEntry = alienDocumentDataSource.getTimeStamp()
315    </trigger>    </trigger>
# Line 422  Line 468 
468    <trigger name="productTrigger" type="NAMED">    <trigger name="productTrigger" type="NAMED">
469     runForm('product.gfd')     runForm('product.gfd')
470    </trigger>    </trigger>
471      
472      <trigger name="lookUpTax" type="NAMED"><![CDATA[
473        from hack import search
474        
475        # do the bartman
476        search (lookUpTaxBlock, lookUpTaxBlock.searchThisProductEntry, alienItemBlock.productEntry)
477        alienItemBlock.taxPercentEntry= lookUpTaxBlock.foundTaxEntry
478        # back to normal broadcasting
479        callTrigger ('totalCalcTrigger')
480      ]]></trigger>
481    
482    <page name="Búsqueda de Facturas de Proveedor">    <page name="Búsqueda de Facturas de Proveedor">
483    <trigger type="Pre-Focusout" src="resultFocusOutTrigger"/>    <trigger type="Pre-Focusout" src="resultFocusOutTrigger"/>
# Line 589  Line 645 
645    
646      <box height="11" label="Productos a facturar" name="invoiceItemBox"      <box height="11" label="Productos a facturar" name="invoiceItemBox"
647        width="82" x="0" y="9">        width="82" x="0" y="9">
648          <!-- for looking up taxes -->
649          <block name="lookUpTaxBlock" datasource="lookUpTaxDataSource">
650            <entry name="searchThisProductEntry" field="product.id" hidden=""
651              x="1" y="1"/>
652            <entry name="foundTaxEntry" field="_product_tax_data.amount" hidden=""
653              x="1" y="1"/>
654          </block>
655        <block datasource="alienItemDataSource" name="alienItemBlock">        <block datasource="alienItemDataSource" name="alienItemBlock">
656        
657          <entry field="alien_item.alien_document" name="alienDocumentEntry" hidden="" x="1" y="1"/>            <entry field="alien_item.alien_document" name="alienDocumentEntry" hidden="" x="1" y="1"/>  
# Line 599  Line 662 
662            <trigger type="PRE-FOCUSOUT" src="totalCalcTrigger" />            <trigger type="PRE-FOCUSOUT" src="totalCalcTrigger" />
663          </entry>          </entry>
664    
665         <label name="productLbl" text="Producto" x="15" y="1"/>          <label name="productLbl" text="Producto" x="15" y="1"/>
666          <button x="32" y="1" trigger="productTrigger" width="3" label="..."          <button x="32" y="1" trigger="productTrigger" width="3" label="..."
667            name="productBtn" height="1"/>            name="productBtn" height="1"/>
668    
669         <entry x="15" y="2" field="alien_product_item.product" name="productEntry"          <entry x="15" y="2" field="alien_product_item.product" name="productEntry"
670                 width="20" rows="5" style="dropdown" foreign_key="productDataSource.id"                 width="20" rows="5" style="dropdown" foreign_key="productDataSource.id"
671                 foreign_key_description="canonical_name">                 foreign_key_description="canonical_name">
672            <trigger type="PRE-FOCUSOUT" src="totalCalcTrigger" />            <!-- HERE -->
673              <trigger type="PRE-FOCUSOUT" src="lookUpTax"/>
674          </entry>          </entry>
675          <label name="priceLbl" text="Precio" x="36" y="1"/>          <label name="priceLbl" text="Precio" x="36" y="1"/>
676          <entry x="36" y="2" field="alien_product_item.unit_price" name="unitPriceEntry"          <entry x="36" y="2" field="alien_product_item.unit_price" name="unitPriceEntry"
# Line 615  Line 679 
679          </entry>          </entry>
680          <label name="taxLbl" text="IVA" x="47" y="1" />          <label name="taxLbl" text="IVA" x="47" y="1" />
681          <entry x="47" y="2" readonly="" field="alien_item_tax.amount" name="taxAmountEntry" width="5" rows="5" hidden=""/>          <entry x="47" y="2" readonly="" field="alien_item_tax.amount" name="taxAmountEntry" width="5" rows="5" hidden=""/>
682          <entry x="47" y="2" name="taxPercentEntry" width="5" rows="5" default="21">          <entry x="47" y="2" name="taxPercentEntry" width="5" rows="5">
683          <trigger name="taxPercentEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger"/>            <trigger name="taxPercentEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger"/>
684          </entry>          </entry>
685          <entry x="47" y="2" readonly="" field="alien_item_tax.tax" name="taxTypeEntry" width="5" rows="5" default="1" hidden=""/>          <entry x="47" y="2" readonly="" field="alien_item_tax.tax" name="taxTypeEntry" width="5" rows="5" default="1" hidden=""/>
686          <label name="discountLbl" text="Descuento" x="53" y="1"/>          <label name="discountLbl" text="Descuento" x="53" y="1"/>

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

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