/[papo]/papo/forms/priceType-new.gfd
ViewVC logotype

Diff of /papo/forms/priceType-new.gfd

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

revision 1.4 by apronotti, Mon Nov 4 21:18:45 2002 UTC revision 1.5 by apronotti, Tue Nov 5 17:37:19 2002 UTC
# Line 196  Line 196 
196   <datasource name="searchProductByCodeDataSource" cache="1"/>   <datasource name="searchProductByCodeDataSource" cache="1"/>
197      <trigger name="searchProductTrigger" type="NAMED">      <trigger name="searchProductTrigger" type="NAMED">
198        #armado de la lista de recorrido del arbol        #armado de la lista de recorrido del arbol
199        search_id= pricePriceTypeBlock.priceTypeId        search_id = str(pricePriceTypeBlock.priceTypeId)
200        priceListsChain=[]        priceListsChain=[]
201        while search_id >= 1 :        while search_id != "" :
202            treePriceTypeBlock.initQuery()            treePriceTypeBlock.initQuery()
203            treePriceTypeBlock.treePriceTypeId= search_id                                    treePriceTypeBlock.treePriceTypeId = search_id                        
204            treePriceTypeBlock.processQuery()            treePriceTypeBlock.processQuery()
205            search_id = treePriceTypeBlock.treePriceTypeParentId            search_id = str(treePriceTypeBlock.treePriceTypeParentId)
206            priceListsChain.append("%s" %treePriceTypeBlock.treePriceTypeId)            priceListsChain.append("%s" % treePriceTypeBlock.treePriceTypeId)
207        resultProductBlock.processRollback()        resultProductBlock.processRollback()
208        resultProductBlock.initQuery()        resultProductBlock.initQuery()
209        resultProductBlock.productNameListEntry = ("%s" % searchProductByNameBlock.searchProductByNameEntry)+"%"        resultProductBlock.productNameListEntry = ("%s" % searchProductByNameBlock.searchProductByNameEntry)+"%"
# Line 212  Line 212 
212        resultProductBlock.processQuery()        resultProductBlock.processQuery()
213        # cargar la parte visible de modificacion de precios        # cargar la parte visible de modificacion de precios
214        resultProductBlock.firstRecord()        resultProductBlock.firstRecord()
215        product_id_anterior=-1;        product_id_anterior = None
216        priceModifyBlock.processRollback()        priceModifyBlock.processRollback()
217        for index in range(resultProductBlock.getRecordCount()):        for index in range(resultProductBlock.getRecordCount()):
218            product_id=("%s" %resultProductBlock.productIdListEntry)            product_id=("%s" %resultProductBlock.productIdListEntry)
# Line 227  Line 227 
227                        priceModifyBlock.priceModifyProductIdListEntry= ("%s" %resultProductBlock.productIdListEntry)                        priceModifyBlock.priceModifyProductIdListEntry= ("%s" %resultProductBlock.productIdListEntry)
228                        priceModifyBlock.priceModifyPriceListIdListEntry= ("%s" %resultProductBlock.productPriceTypeIdListEntry)                          priceModifyBlock.priceModifyPriceListIdListEntry= ("%s" %resultProductBlock.productPriceTypeIdListEntry)  
229                        priceModifyBlock.newRecord()                        priceModifyBlock.newRecord()
230                        product_id_anterior=product_id                        product_id_anterior=product_id
231                          break
232            resultProductBlock.nextRecord()            resultProductBlock.nextRecord()
233      </trigger>      </trigger>
234      <trigger name="priceModifyCommitTrigger" type="NAMED">      <trigger name="priceModifyCommitTrigger" type="NAMED">
# Line 255  Line 256 
256        #esto es una chanchada, proximamente llamar al trigger "searchProductTrigger"        #esto es una chanchada, proximamente llamar al trigger "searchProductTrigger"
257        #armado de la lista de recorrido del arbol        #armado de la lista de recorrido del arbol
258        #armado de la lista de recorrido del arbol        #armado de la lista de recorrido del arbol
259        search_id= pricePriceTypeBlock.priceTypeId        search_id= str(pricePriceTypeBlock.priceTypeId)
260        priceListsChain=[]        priceListsChain=[]
261        while search_id >= 1 :        while search_id != "" :
262            treePriceTypeBlock.initQuery()            treePriceTypeBlock.initQuery()
263            treePriceTypeBlock.treePriceTypeId= search_id                                    treePriceTypeBlock.treePriceTypeId= search_id                        
264            treePriceTypeBlock.processQuery()            treePriceTypeBlock.processQuery()
265            search_id = treePriceTypeBlock.treePriceTypeParentId            search_id = str(treePriceTypeBlock.treePriceTypeParentId)
266            priceListsChain.append("%s" %treePriceTypeBlock.treePriceTypeId)            priceListsChain.append("%s" %treePriceTypeBlock.treePriceTypeId)
267        resultProductBlock.processRollback()        resultProductBlock.processRollback()
268        resultProductBlock.initQuery()        resultProductBlock.initQuery()
# Line 314  Line 315 
315          </entry>          </entry>
316          <button x="37" y="2" trigger="searchProductTrigger" width="9" label="Buscar"          <button x="37" y="2" trigger="searchProductTrigger" width="9" label="Buscar"
317                  name="searchBtn" height="1"/>                  name="searchBtn" height="1"/>
318            <button x="47" y="2" width="5" trigger="callProductTrigger"
319              label=" ... " name="priceTypeBtn" height="1">
320             <trigger type="NAMED" name="callProductTrigger">
321               #runForm('priceType-new.gfd', {'initId': str(clientBlock.priceTypeEntry)})
322               runForm('product.gfd')
323             </trigger>
324            </button>
325    
326       </block>       </block>
327  </box>  </box>
328  <!-- Parte oculta  -->  <!-- Parte oculta  -->
329      <!--búsqueda del arbol de lista de precios  -->      <!--búsqueda del arbol de lista de precios  -->
330      <datasource database="papo" name="treePriceTypeDataSource" table="_price_type_data"/>      <datasource database="papo" name="treePriceTypeDataSource" table="_price_type_data">
331        <condition>
332          <null>  
333            <cfield name="_price_type_data._end_t"/>
334          </null>
335        </condition>
336        </datasource>
337        <block name="treePriceTypeBlock" datasource="treePriceTypeDataSource">        <block name="treePriceTypeBlock" datasource="treePriceTypeDataSource">
338          <entry name="treePriceTypeParentId"  field="parent" x="1"          <entry name="treePriceTypeParentId"  field="parent" x="1"
339          y="2" width="40"  hidden=""/>          y="2" width="40"  hidden=""/>
340          <entry name="treePriceTypeId" field="id"  x="40" y="2" width="10" hidden="" />          <entry name="treePriceTypeId" field="_table"  x="40" y="2" width="10" hidden="" />
341        </block>        </block>
342      <!--/busqueda del arbol de lista de precios raiz -->      <!--/busqueda del arbol de lista de precios raiz -->
343      <datasource database="papo" name="productResultDataSource"      <datasource database="papo" name="productResultDataSource"
# Line 391  Line 406 
406          <entry name="productCodeListEntry" field="_product_code_data.code" x="20" y="1" width="10" rows="2" hidden=""/>          <entry name="productCodeListEntry" field="_product_code_data.code" x="20" y="1" width="10" rows="2" hidden=""/>
407          <entry name="productCodeTypeListEntry" field="_product_code_data.product_code_type" x="30" y="1" width="5" rows="2" hidden=""/>          <entry name="productCodeTypeListEntry" field="_product_code_data.product_code_type" x="30" y="1" width="5" rows="2" hidden=""/>
408          <entry name="productPriceTypeListEntry" field="_price_type_data.name" x="35 " y="1" width="10" rows="2" hidden=""/>          <entry name="productPriceTypeListEntry" field="_price_type_data.name" x="35 " y="1" width="10" rows="2" hidden=""/>
409          <entry name="productPriceTypeIdListEntry" field="_price_type_data.id" x="45" y="1" width="5" rows="2" hidden=""/>          <entry name="productPriceTypeIdListEntry" field="_price_type_data._table" x="45" y="1" width="5" rows="2" hidden=""/>
410          <entry name="productPriceListEntry" field="_price_data.unit_price"          <entry name="productPriceListEntry" field="_price_data.unit_price" x="50" y="1" width="20" rows="2" hidden=""/>
         x="50" y="1" width="20" rows="2" hidden=""/>  
411        </block>        </block>
412     <!-- /parte oculta-->     <!-- /parte oculta-->
413  <!-- ingreso visible -->  <!-- ingreso visible -->

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

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