/[papo]/papo/forms/proposal.neb
ViewVC logotype

Diff of /papo/forms/proposal.neb

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

revision 1.10 by mhepp, Mon Jun 2 19:05:54 2003 UTC revision 1.11 by styxman, Mon Jun 9 22:13:25 2003 UTC
# Line 53  Line 53 
53      </condition>      </condition>
54    </datasource>    </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 presupuestar   -->    <!--   va a presupuestar   -->
58    <datasource name="clientDataSource" database="papo"    <datasource name="clientDataSource" database="papo"
59                table="_entity_data, _alien_entity_data, _persona_data, _client_data,                table="_entity_data, _alien_entity_data, _persona_data, _client_data,
60                       _price_type_data, _persona_tax_profile_data, _tax_profile_data, _tax_data">                       _price_type_data, _persona_tax_profile_data, _tax_profile_data, _tax_data">
# Line 120  Line 120 
120      </condition>      </condition>
121    </datasource>    </datasource>
122    
123    <datasource name="clientSearchDataSource" database="papo"    <datasource name="clientSearchDataSource" database="papo"
124                table="_entity_data, _alien_entity_data, _persona_data, _client_data, entity_type_uid_conf,                  table="_entity_data, _alien_entity_data, _persona_data, _client_data, entity_type_uid_conf,
125                       _entity_uid_data" order_by="_entity_data.name">                       _entity_uid_data" order_by="_entity_data.name">
126      <condition>      <condition>
127        <and>        <and>
# Line 171  Line 171 
171    
172    <datasource name="priceDataSource" database="papo" table="_price_data" />    <datasource name="priceDataSource" database="papo" table="_price_data" />
173    
174    <!--   Origen de datos que contiene el encabezado de la presupuesto   -->    <!--   Origen de datos que contiene el encabezado de la presupuesto   -->
175    
176    <datasource database="papo" name="ownDocumentDataSource" table="own_document"    <datasource database="papo" name="ownDocumentDataSource" table="own_document"
177      order_by="date" />      order_by="date" />
178    
179    
180    <!--   Origen de datos que contiene los items del presupuesto -->    <!--   Origen de datos que contiene los items del presupuesto -->
181    
182     <datasource  name="ownItemDataSource" database="papo" detaillink="own_item.own_document"       <datasource  name="ownItemDataSource" database="papo" detaillink="own_item.own_document"
183       master="ownDocumentDataSource" masterlink="id"         master="ownDocumentDataSource" masterlink="id"
184       table="own_item, own_product_item, own_item_tax">       table="own_item, own_product_item, own_item_tax">
185      <condition>      <condition>
186        <and>        <and>
187          <eq>          <eq>
188            <cfield name="own_item.id"/>            <cfield name="own_item.id"/>
189            <cfield name="own_product_item.own_item"/>            <cfield name="own_product_item.own_item"/>
190          </eq>          </eq>
191           <eq>           <eq>
192             <cfield name="own_item.id"/>             <cfield name="own_item.id"/>
193             <cfield name="own_item_tax.own_item"/>             <cfield name="own_item_tax.own_item"/>
194          </eq>            </eq>
195          <eq>          <eq>
196             <cfield name="own_item_tax.tax"/>             <cfield name="own_item_tax.tax"/>
197             <cconst value="1"/>             <cconst value="1"/>
198           </eq>             </eq>
199        </and>        </and>
200      </condition>      </condition>
201    </datasource>    </datasource>
202      
203    <trigger name="clientCallFormTrigger" type="NAMED"><![CDATA[    <trigger name="clientCallFormTrigger" type="NAMED"><![CDATA[
204      runForm('client.gfd')      runForm('client.gfd')
205    ]]></trigger>    ]]></trigger>
# Line 212  Line 212 
212    
213    <trigger name="printTrigger" type="NAMED"><![CDATA[    <trigger name="printTrigger" type="NAMED"><![CDATA[
214      import hack      import hack
215        from gnue.common.GDataObjects import ConnectionError as DBError
216    
217      if ownItemBlock.getRecordCount() > 0 and len(ownItemBlock.prodNameSEntry) > 0:      if ownItemBlock.getRecordCount() > 0 and len(ownItemBlock.prodNameSEntry) > 0:
218        callTrigger('startWaitingModeTrigger')        callTrigger('startWaitingModeTrigger')
219        callTrigger ('commitTrigger')        try:
220        report='proposal-%s' % str(ownDocumentBlock.typeEntry)          callTrigger ('commitTrigger')
221        hack.pleasePrint (self, str(ownDocumentBlock.typeEntry), report, [ 'id='+str(ownDocumentBlock.idEntry) ],str(ownPosDocumentBlock.documentPrintCommand))          report='proposal-%s' % str(ownDocumentBlock.typeEntry)
222        callTrigger('rollbackTrigger')          hack.pleasePrint (self, str(ownDocumentBlock.typeEntry), report, [ 'id='+str(ownDocumentBlock.idEntry) ],str(ownPosDocumentBlock.documentPrintCommand))
223        callTrigger('endWaitingModeTrigger')                  callTrigger('rollbackTrigger')
224            callTrigger('endWaitingModeTrigger')
225          except DBError, err:
226            pass
227    ]]></trigger>    ]]></trigger>
228      
229    <trigger name="commitTrigger" type="NAMED">    <trigger name="commitTrigger" type="NAMED">
230         from gnue.common.GDataObjects import ConnectionError as DBError
231       ownDocumentBlock.ownPosEntityIdEntry =   str(ownPosBlock.ownPosEntityIdEntry)       ownDocumentBlock.ownPosEntityIdEntry =   str(ownPosBlock.ownPosEntityIdEntry)
232       ownDocumentBlock.numberEntry= str(ownPosDocumentBlock.documentNumberEntry)       ownDocumentBlock.numberEntry= str(ownPosDocumentBlock.documentNumberEntry)
233       ownPosDocumentBlock.documentNumberEntry.atomicModify (lambda x: int(x)+1)       ownPosDocumentBlock.documentNumberEntry.atomicModify (lambda x: int(x)+1)
# Line 236  Line 241 
241           commitConnection()           commitConnection()
242       except DBError, err:       except DBError, err:
243           rollbackConnection()           rollbackConnection()
244             callTrigger('endWaitingModeTrigger')
245           genericBox("Hay problemas para grabar los datos del presupuesto\n"+str(err),['Aceptar'])           genericBox("Hay problemas para grabar los datos del presupuesto\n"+str(err),['Aceptar'])
246             raise
247    
248    
       
249    </trigger>    </trigger>
250    
251    <trigger name="rollbackTrigger" type="NAMED">    <trigger name="rollbackTrigger" type="NAMED">
252    tmpValuesDataSource.priceTypeId = None    tmpValuesDataSource.priceTypeId = None
253    for block in form._object._blockList:    for block in form._object._blockList:
# Line 270  Line 277 
277    <!--  Este trigger clacula el total presupuestado -->    <!--  Este trigger clacula el total presupuestado -->
278    <trigger name="totalCalcTrigger" type="NAMED">    <trigger name="totalCalcTrigger" type="NAMED">
279      import hack      import hack
280        
281      lQty = hack.a2f(ownItemBlock.qtyEntry)      lQty = hack.a2f(ownItemBlock.qtyEntry)
282      lBonus = hack.a2f(ownItemBlock.bonusEntry)      lBonus = hack.a2f(ownItemBlock.bonusEntry)
283      lDiscount = hack.a2f(ownItemBlock.discountEntry)      lDiscount = hack.a2f(ownItemBlock.discountEntry)
# Line 291  Line 298 
298    
299      lTNeto = 0      lTNeto = 0
300      lTTax = 0      lTTax = 0
301        
302      lRecords = ownItemDataSource.getRecords()      lRecords = ownItemDataSource.getRecords()
303      for index in range(len(lRecords)):      for index in range(len(lRecords)):
304        lRecord = lRecords[index]        lRecord = lRecords[index]
# Line 299  Line 306 
306        lBonus = hack.a2f(lRecord.getField("own_item.bonus"))        lBonus = hack.a2f(lRecord.getField("own_item.bonus"))
307        lDiscount = hack.a2f(lRecord.getField("own_item.discount"))        lDiscount = hack.a2f(lRecord.getField("own_item.discount"))
308        lUnitPrice = hack.a2f(lRecord.getField("own_product_item.unit_price"))        lUnitPrice = hack.a2f(lRecord.getField("own_product_item.unit_price"))
309          
310        lItemPrice = (lQty * lUnitPrice) - lBonus - lDiscount        lItemPrice = (lQty * lUnitPrice) - lBonus - lDiscount
311        lTNeto += lItemPrice        lTNeto += lItemPrice
312        lTTax += hack.a2f(lRecord.getField("own_item_tax.amount"))        lTTax += hack.a2f(lRecord.getField("own_item_tax.amount"))
# Line 311  Line 318 
318      totalBlock.totalEntry = str(lTNeto+lTTax)      totalBlock.totalEntry = str(lTNeto+lTTax)
319    </trigger>    </trigger>
320    
321        
322    <page name="Presupuesto para Clientes">    <page name="Presupuesto para Clientes">
323      <box height="9" label="Presupuesto de Productos a Clientes"      <box height="9" label="Presupuesto de Productos a Clientes"
324        name="proposalHeaderBox" width="105" x="0" y="0">        name="proposalHeaderBox" width="105" x="0" y="0">
325    
326      <!-- Actualiza los datos del cliente -->      <!-- Actualiza los datos del cliente -->
# Line 325  Line 332 
332          tmpValuesDataSource.taxSourceCode = rs.current.getField('_tax_data.graft')          tmpValuesDataSource.taxSourceCode = rs.current.getField('_tax_data.graft')
333    
334          tmpValuesDataSource.alienIVACond = rs.current.getField('_tax_profile_data._table')          tmpValuesDataSource.alienIVACond = rs.current.getField('_tax_profile_data._table')
335            
336      if str(ownDocumentBlock.clientRecipientBox.currentClientEntry):      if str(ownDocumentBlock.clientRecipientBox.currentClientEntry):
337          # Actualiza la Lista de precios asignada al cliente          # Actualiza la Lista de precios asignada al cliente
338          ownDocumentBlock.clientRecipientBox.priceTypeEntry = str(ownDocumentBlock.clientRecipientBox.clientEntry)          ownDocumentBlock.clientRecipientBox.priceTypeEntry = str(ownDocumentBlock.clientRecipientBox.clientEntry)
# Line 340  Line 347 
347    
348      <!-- Bloque para la búsqueda de clientes -->      <!-- Bloque para la búsqueda de clientes -->
349      <block name="clientResultBlock" datasource="clientSearchDataSource">      <block name="clientResultBlock" datasource="clientSearchDataSource">
350          <entry name="idEntry" field="_entity_data.id" hidden="" x="1" y="1" width="12"/>              <entry name="idEntry" field="_entity_data.id" hidden="" x="1" y="1" width="12"/>
351  <!--         <entry name="uidTypeEntry" field="_entity_uid_data.entity_uid_type" hidden="" x="1" y="1" width="12"/>             -->  <!--         <entry name="uidTypeEntry" field="_entity_uid_data.entity_uid_type" hidden="" x="1" y="1" width="12"/>             -->
352          <entry name="uidEntry" field="_entity_uid_data.uid" hidden="" x="1" y="1" width="12"/>                      <entry name="uidEntry" field="_entity_uid_data.uid" hidden="" x="1" y="1" width="12"/>
353          <entry name="nameEntry" field="_entity_data.name" hidden="" x="1" y="1" width="20"/>              <entry name="nameEntry" field="_entity_data.name" hidden="" x="1" y="1" width="20"/>
354      </block>      </block>
355      <trigger name="clientSearchTrigger" type="NAMED"><![CDATA[      <trigger name="clientSearchTrigger" type="NAMED"><![CDATA[
356        tmpValuesDataSource.priceTypeId = None        tmpValuesDataSource.priceTypeId = None
# Line 376  Line 383 
383              callTrigger('startWaitingModeTrigger')              callTrigger('startWaitingModeTrigger')
384              callTrigger('bringClientDataTrigger')              callTrigger('bringClientDataTrigger')
385              callTrigger('endWaitingModeTrigger')              callTrigger('endWaitingModeTrigger')
386                
387          runForm ('clientSelect.gfd', {'data': clientResultBlock, 'callback': callback})          runForm ('clientSelect.gfd', {'data': clientResultBlock, 'callback': callback})
388        elif recordCount == 1:        elif recordCount == 1:
389          clientResultBlock.jumpRecord(0)          clientResultBlock.jumpRecord(0)
# Line 418  Line 425 
425    
426          <label name="clientLbl" text="Lista de precios:" x="1" y="4" />          <label name="clientLbl" text="Lista de precios:" x="1" y="4" />
427    
428          <entry x="19" y="4" field="recipient" name="priceTypeEntry" readonly=""          <entry x="19" y="4" field="recipient" name="priceTypeEntry" readonly=""
429             width="20" style="textlookup" foreign_key="clientDataSource._entity_data.id"             width="20" style="textlookup" foreign_key="clientDataSource._entity_data.id"
430             foreign_key_description="_price_type_data.name" />             foreign_key_description="_price_type_data.name" />
431    
432          </box>          </box>
433          <entry field="date" name="dateEntry" style="label" hidden="" typecast="date"          <entry field="date" name="dateEntry" style="label" hidden="" typecast="date"
434            rows="10" width="24" x="7" y="7"/>            rows="10" width="24" x="7" y="7"/>
435          <entry field="number" name="numberEntry" style="label" hidden="" width="24" x="7" y="7"/>          <entry field="number" name="numberEntry" style="label" hidden="" width="24" x="7" y="7"/>
436    
437        </block>        </block>
438          
439        <!-- Fecha del presupuesto -->        <!-- Fecha del presupuesto -->
440        <block name="tmpBlock" datasource="tmpValuesDataSource" transparentBlock="">        <block name="tmpBlock" datasource="tmpValuesDataSource" transparentBlock="">
441          <label name="dateLbl" text="Fecha" x="1" y="1" />          <label name="dateLbl" text="Fecha" x="1" y="1" />
442          <label name="dateLabel" text="Número de Presupuesto:" x="32" y="1"/>          <label name="dateLabel" text="Número de Presupuesto:" x="32" y="1"/>
443          <entry name="tmpDateEntry" typecast="date"          <entry name="tmpDateEntry" typecast="date"
444            width="14" x="7" y="1"/>            width="14" x="7" y="1"/>
445        </block>        </block>
446    
447        <!-- # del presupuesto -->        <!-- # del presupuesto -->
448        <neb:Sub neb:src="posDocument.nebc" documentType="ownDocumentBlock.typeEntry"        <neb:Sub neb:src="posDocument.nebc" documentType="ownDocumentBlock.typeEntry"
449          ownPosDocumentBlock="ownPosDocumentBlock " documentNumberEntry="documentNumberEntry"          ownPosDocumentBlock="ownPosDocumentBlock " documentNumberEntry="documentNumberEntry"
450          documentNumberEntryX="55" documentNumberEntryY="1"          documentNumberEntryX="55" documentNumberEntryY="1"
451          searchNextDocumentNumber="searchNextProposalNumber"  >          searchNextDocumentNumber="searchNextProposalNumber"  >
452        </neb:Sub>        </neb:Sub>
453      </box>      </box>
454    
455      <!--     ******************************** -->      <!--     ******************************** -->
# Line 450  Line 457 
457      <!--     ******************************** -->      <!--     ******************************** -->
458    
459      <!--     Datasource que sirve para la búsqueda del producto  -->      <!--     Datasource que sirve para la búsqueda del producto  -->
460      <datasource database="papo" name="priceTypeDataSource" table="_price_type_data">      <datasource database="papo" name="priceTypeDataSource" table="_price_type_data">
461      <condition>      <condition>
462        <null>          <null>
463          <cfield name="_price_type_data._end_t"/>          <cfield name="_price_type_data._end_t"/>
464        </null>        </null>
465      </condition>      </condition>
# Line 465  Line 472 
472      </block>      </block>
473      <!--     Datasource que sirve para almacenar el resultado de la búsqueda -->      <!--     Datasource que sirve para almacenar el resultado de la búsqueda -->
474      <datasource database="papo" name="productResultDataSource"      <datasource database="papo" name="productResultDataSource"
475        table="_product_code_type_data, _product_code_data, _product_data, _product_tax_data, _price_data, _price_type_data,        table="_product_code_type_data, _product_code_data, _product_data, _product_tax_data, _price_data, _price_type_data,
476               _currency_type_data"               _currency_type_data"
477        order_by = "_product_data.canonical_name, _price_type_data._table desc" >        order_by = "_product_data.canonical_name, _price_type_data._table desc" >
478        <condition>        <condition>
479        <and>        <and>
480            <null>              <null>
481             <cfield name="_product_code_type_data._end_t"/>             <cfield name="_product_code_type_data._end_t"/>
482            </null>            </null>
483            <null>              <null>
484              <cfield name="_product_code_data._end_t"/>              <cfield name="_product_code_data._end_t"/>
485            </null>            </null>
486            <null>              <null>
487             <cfield name="_product_data._end_t"/>             <cfield name="_product_data._end_t"/>
488            </null>            </null>
489            <null>              <null>
490             <cfield name="_product_tax_data._end_t"/>             <cfield name="_product_tax_data._end_t"/>
491            </null>            </null>
492            <null>              <null>
493              <cfield name="_price_data._end_t"/>              <cfield name="_price_data._end_t"/>
494            </null>            </null>
495            <null>              <null>
496              <cfield name="_price_type_data._end_t"/>              <cfield name="_price_type_data._end_t"/>
497            </null>            </null>
498            <null>            <null>
# Line 563  Line 570 
570        priceListsChain=[]        priceListsChain=[]
571        while search_id != "" :        while search_id != "" :
572            priceTypeBlock.initQuery()            priceTypeBlock.initQuery()
573            priceTypeBlock.priceTypeId = search_id                                    priceTypeBlock.priceTypeId = search_id
574            priceTypeBlock.processQuery()            priceTypeBlock.processQuery()
575            search_id = str(priceTypeBlock.priceTypeParentId)            search_id = str(priceTypeBlock.priceTypeParentId)
576            priceListsChain.append("%s" % priceTypeBlock.priceTypeId)            priceListsChain.append("%s" % priceTypeBlock.priceTypeId)
# Line 573  Line 580 
580        tmpProdResultBlock.prodCodeEntry = ("%s" % ownItemBlock.prodCodeSEntry)+"%"        tmpProdResultBlock.prodCodeEntry = ("%s" % ownItemBlock.prodCodeSEntry)+"%"
581        tmpProdResultBlock.prodCodeTypeEntry = "1" # Ver como elegimos el código adecuado        tmpProdResultBlock.prodCodeTypeEntry = "1" # Ver como elegimos el código adecuado
582        tmpProdResultBlock.processQuery()        tmpProdResultBlock.processQuery()
583        # cargar la parte visible de modificacion de precios        # cargar la parte visible de modificacion de precios
584        tmpProdResultBlock.firstRecord()        tmpProdResultBlock.firstRecord()
585        product_id_anterior = None        product_id_anterior = None
586        prodResultBlock.clear()        prodResultBlock.clear()
587        for index in range(tmpProdResultBlock.getRecordCount()):        for index in range(tmpProdResultBlock.getRecordCount()):
588            product_id=("%s" %tmpProdResultBlock.prodIdEntry)            product_id=("%s" %tmpProdResultBlock.prodIdEntry)
589            if product_id != product_id_anterior:            if product_id != product_id_anterior:
590                for pricetype in priceListsChain:                for pricetype in priceListsChain:
591                    if pricetype == ("%s" %tmpProdResultBlock.prodPriceTypeIdEntry):                              if pricetype == ("%s" %tmpProdResultBlock.prodPriceTypeIdEntry):
592                        if len(str(prodResultBlock.prodNameEntry)):                        if len(str(prodResultBlock.prodNameEntry)):
593                          prodResultBlock.newRecord()                          prodResultBlock.newRecord()
594                        prodResultBlock.prodNameEntry= ("%s" %tmpProdResultBlock.prodNameEntry)                        prodResultBlock.prodNameEntry= ("%s" %tmpProdResultBlock.prodNameEntry)
595                        prodResultBlock.prodCodeEntry= ("%s" %tmpProdResultBlock.prodCodeEntry)                        prodResultBlock.prodCodeEntry= ("%s" %tmpProdResultBlock.prodCodeEntry)
596                        prodResultBlock.prodPriceTypeEntry=  ("%s" %tmpProdResultBlock.prodPriceTypeEntry)                        prodResultBlock.prodPriceTypeEntry=  ("%s" %tmpProdResultBlock.prodPriceTypeEntry)
597                        prodResultBlock.prodUnitPriceEntry= ("%s" %tmpProdResultBlock.prodUnitPriceEntry)                        prodResultBlock.prodUnitPriceEntry= ("%s" %tmpProdResultBlock.prodUnitPriceEntry)
598                        prodResultBlock.prodPriceEntry = ("%s" %tmpProdResultBlock.prodPriceEntry)                        prodResultBlock.prodPriceEntry = ("%s" %tmpProdResultBlock.prodPriceEntry)
599                        prodResultBlock.prodPricePreviousEntry= ("%s" %tmpProdResultBlock.prodUnitPriceEntry)                        prodResultBlock.prodPricePreviousEntry= ("%s" %tmpProdResultBlock.prodUnitPriceEntry)
600                        prodResultBlock.prodProductIdEntry= ("%s" %tmpProdResultBlock.prodIdEntry)                        prodResultBlock.prodProductIdEntry= ("%s" %tmpProdResultBlock.prodIdEntry)
601                        prodResultBlock.prodPriceListIdEntry= ("%s" %tmpProdResultBlock.prodPriceTypeIdEntry)                        prodResultBlock.prodPriceListIdEntry= ("%s" %tmpProdResultBlock.prodPriceTypeIdEntry)
602                        prodResultBlock.prodIVATaxEntry= ("%s" %tmpProdResultBlock.prodIVATaxEntry)                        prodResultBlock.prodIVATaxEntry= ("%s" %tmpProdResultBlock.prodIVATaxEntry)
603                        prodResultBlock.prodCurrencyRateEntry= ("%s" %tmpProdResultBlock.prodCurrencyRateEntry)                        prodResultBlock.prodCurrencyRateEntry= ("%s" %tmpProdResultBlock.prodCurrencyRateEntry)
# Line 605  Line 612 
612            if returnValue >= 0:            if returnValue >= 0:
613              prodResultBlock.jumpRecord(returnValue)              prodResultBlock.jumpRecord(returnValue)
614              callTrigger('prodInsertTrigger')              callTrigger('prodInsertTrigger')
615                
616          runForm ('productSelect.gfd', {'data': prodResultBlock, 'callback': callback})          runForm ('productSelect.gfd', {'data': prodResultBlock, 'callback': callback})
617        elif recordCount == 1:        elif recordCount == 1:
618          prodResultBlock.jumpRecord(0)          prodResultBlock.jumpRecord(0)
# Line 624  Line 631 
631      <entry name="prodPriceEntry" x="1" y="1" width="20" rows="2" hidden=""/>      <entry name="prodPriceEntry" x="1" y="1" width="20" rows="2" hidden=""/>
632      <entry name="prodPricePreviousEntry"  x="1" y="1" width="10" rows="8" hidden=""/>      <entry name="prodPricePreviousEntry"  x="1" y="1" width="10" rows="8" hidden=""/>
633      <entry name="prodProductIdEntry"  x="1" y="1" width="5" rows="8" hidden=""/>      <entry name="prodProductIdEntry"  x="1" y="1" width="5" rows="8" hidden=""/>
634      <entry name="prodPriceListIdEntry"  x="1" y="1" width="5" rows="8" hidden=""/>      <entry name="prodPriceListIdEntry"  x="1" y="1" width="5" rows="8" hidden=""/>
635      <entry name="prodIVATaxEntry"  x="1" y="1" width="5" rows="8" hidden=""/>      <entry name="prodIVATaxEntry"  x="1" y="1" width="5" rows="8" hidden=""/>
636      <entry name="prodCurrencyRateEntry"  x="1" y="1" width="10" rows="8" hidden=""/>      <entry name="prodCurrencyRateEntry"  x="1" y="1" width="10" rows="8" hidden=""/>
637    </block>    </block>
638    <!--   Insertar el producto seleccionado -->    <!--   Insertar el producto seleccionado -->
639    <trigger name="prodInsertTrigger" type="NAMED">    <trigger name="prodInsertTrigger" type="NAMED">
# Line 642  Line 649 
649      ownItemBlock.taxAmountEntry = (hack.a2f(prodResultBlock.prodIVATaxEntry)/100) * lItemPrice      ownItemBlock.taxAmountEntry = (hack.a2f(prodResultBlock.prodIVATaxEntry)/100) * lItemPrice
650      ownItemBlock.ivaEntry = hack.a2f(prodResultBlock.prodIVATaxEntry)      ownItemBlock.ivaEntry = hack.a2f(prodResultBlock.prodIVATaxEntry)
651      ownItemBlock.unitPriceEntry = str(prodResultBlock.prodUnitPriceEntry)      ownItemBlock.unitPriceEntry = str(prodResultBlock.prodUnitPriceEntry)
652                                      
653      callTrigger('totalCalcTrigger')      callTrigger('totalCalcTrigger')
654    </trigger>    </trigger>
655    <!--     ****** Fin búsqueda ************ -->    <!--     ****** Fin búsqueda ************ -->
# Line 666  Line 673 
673      <button name="prodSearchButton" trigger="prodSearchTrigger" label="Buscar" width="7" height="10" x="35" y="11"/>      <button name="prodSearchButton" trigger="prodSearchTrigger" label="Buscar" width="7" height="10" x="35" y="11"/>
674      <button name="prodCallFormButton" trigger="prodCallFormTrigger" label=".." width="3" height="10" x="42" y="11"/>      <button name="prodCallFormButton" trigger="prodCallFormTrigger" label=".." width="3" height="10" x="42" y="11"/>
675    
676      <entry field="own_item.own_document" name="ownDocumentEntry" hidden="" x="1" y="1"/>        <entry field="own_item.own_document" name="ownDocumentEntry" hidden="" x="1" y="1"/>
677    
678      <label name="qtyLbl" text="Cantidad" x="45" y="10"/>      <label name="qtyLbl" text="Cantidad" x="45" y="10"/>
679      <!-- mdione's bookmark -->      <!-- mdione's bookmark -->
# Line 684  Line 691 
691    
692    
693          <label name="ivaLbl" text="IVA" x="66" y="10"/>          <label name="ivaLbl" text="IVA" x="66" y="10"/>
694          <entry name="ivaEntry" displaymask="%0.0f"          <entry name="ivaEntry" displaymask="%0.0f"
695            rows="10" width="3" x="66" y="11" default="0">            rows="10" width="3" x="66" y="11" default="0">
696            <trigger name="ivaEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" />            <trigger name="ivaEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" />
697          </entry>          </entry>
# Line 694  Line 701 
701            <trigger name="discountEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" />            <trigger name="discountEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" />
702           </entry>           </entry>
703  <!--         <label name="bonusLbl" text="Bonif." x="79" y="10"/> -->  <!--         <label name="bonusLbl" text="Bonif." x="79" y="10"/> -->
704          <entry field="own_item.bonus" name="bonusEntry" style="label" default="0.00" typecast="number" displaymask="%0.2f"          <entry field="own_item.bonus" name="bonusEntry" style="label" default="0.00" typecast="number" displaymask="%0.2f"
705            rows="10" width="10" x="79" y="11" hidden=""/>            rows="10" width="10" x="79" y="11" hidden=""/>
706          <label name="itemNetolLbl" text="Neto" x="76" y="10"/>          <label name="itemNetolLbl" text="Neto" x="76" y="10"/>
707          <entry name="itemNetoEntry" style="label" default="0.00" typecast="number" displaymask="%0.2f"          <entry name="itemNetoEntry" style="label" default="0.00" typecast="number" displaymask="%0.2f"
708            rows="10" width="10" x="76" y="11"/>            rows="10" width="10" x="76" y="11"/>
709          <label name="itemTotalLbl" text="Total" x="85" y="10"/>          <label name="itemTotalLbl" text="Total" x="85" y="10"/>
710          <entry name="itemTotalEntry" style="label" default="0.00" typecast="number" displaymask="%0.2f"          <entry name="itemTotalEntry" style="label" default="0.00" typecast="number" displaymask="%0.2f"
711            rows="10" width="10" x="85" y="11">            rows="10" width="10" x="85" y="11">
712          </entry>          </entry>
713          <button name="prodDeleteButton" trigger="prodDeleteTrigger" label="Borrar" width="7" height="10" x="95" y="11"/>          <button name="prodDeleteButton" trigger="prodDeleteTrigger" label="Borrar" width="7" height="10" x="95" y="11"/>
# Line 714  Line 721 
721      <!--     Datasource que sirve para almacenar el resultado de la búsqueda -->      <!--     Datasource que sirve para almacenar el resultado de la búsqueda -->
722        <block datasource="tmpValuesDataSource" name="totalBlock" restrictInsert="">        <block datasource="tmpValuesDataSource" name="totalBlock" restrictInsert="">
723          <label text="Neto " x="55" y="21"/>          <label text="Neto " x="55" y="21"/>
724          <entry name="netoEntry" style="label" readonly="" x="55" y="22" width="12" typecast="number" displaymask="%0.2f"          <entry name="netoEntry" style="label" readonly="" x="55" y="22" width="12" typecast="number" displaymask="%0.2f"
725            default="0.00"/>            default="0.00"/>
726          <label text="IVA " x="66" y="21"/>          <label text="IVA " x="66" y="21"/>
727          <entry name="ivaEntry" style="label" readonly="" x="66" y="22" width="12" typecast="number" displaymask="%0.2f"          <entry name="ivaEntry" style="label" readonly="" x="66" y="22" width="12" typecast="number" displaymask="%0.2f"
728            default="0.00"/>            default="0.00"/>
729          <label text="Total " x="82" y="21"/>          <label text="Total " x="82" y="21"/>
730          <entry name="totalEntry" style="label" readonly="" x="82" y="22" width="12" typecast="number" displaymask="%0.2f"          <entry name="totalEntry" style="label" readonly="" x="82" y="22" width="12" typecast="number" displaymask="%0.2f"
731            default="0.00"/>            default="0.00"/>
732        </block>        </block>
733    <block name="ownOrganizationBlock" datasource="ownOrganizationDataSource">    <block name="ownOrganizationBlock" datasource="ownOrganizationDataSource">

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

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