/[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.50 by apronotti, Tue Apr 15 17:43:40 2003 UTC revision 1.51 by styxman, Tue Apr 15 20:19:09 2003 UTC
# Line 9  Line 9 
9    
10    
11    
12   <datasource name="organizationDataSource" database="papo"   <datasource name="organizationDataSource" database="papo"
13               table="_entity_data, _own_entity_data, _organization_data, _persona_tax_profile_data, _tax_profile_data">               table="_entity_data, _own_entity_data, _organization_data, _persona_tax_profile_data, _tax_profile_data">
14      <condition>      <condition>
15        <and>        <and>
# 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 facturar   -->    <!--   va a facturar   -->
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">
61      <condition>      <condition>
62        <and>        <and>
# 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 201  Line 201 
201    
202    <!-- Origen de datos que srive para calcular el total facturado -->    <!-- Origen de datos que srive para calcular el total facturado -->
203    
204    <datasource name="productInvoiceTotalDataSource" database="papo"    <datasource name="productInvoiceTotalDataSource" database="papo"
205                table="_entity_data, own_document, own_item, own_product_item, own_item_tax"                table="_entity_data, own_document, own_item, own_product_invoice_item, own_item_tax"
206                order_by="own_product_item.id">                order_by="own_product_invoice_item.id">
207      <condition>      <condition>
208        <and>        <and>
209          <eq>          <eq>
210            <!-- Aqui se refiere al cliente  -->            <!-- Aqui se refiere al cliente  -->
# Line 217  Line 217 
217          </eq>          </eq>
218          <eq>          <eq>
219            <cfield name="own_item.id"/>            <cfield name="own_item.id"/>
220            <cfield name="own_product_item.own_item"/>            <cfield name="own_product_invoice_item.own_item"/>
221          </eq>          </eq>
222          <eq>          <eq>
223            <cfield name="own_item.id"/>            <cfield name="own_item.id"/>
# Line 238  Line 238 
238            </eq>            </eq>
239          </or>          </or>
240       </and>       </and>
241      </condition>      </condition>
242    </datasource>    </datasource>
243    
244    <!-- Origen de datos que srive para calcular los impuestos del la factura -->    <!-- Origen de datos que srive para calcular los impuestos del la factura -->
245    
246    <datasource name="invTaxTotDataSource" database="papo"    <datasource name="invTaxTotDataSource" database="papo"
247                table="own_document, own_document_tax">                table="own_document, own_document_tax">
248      <condition>      <condition>
249        <eq>        <eq>
250          <cfield name="own_document.id"/>          <cfield name="own_document.id"/>
251          <cfield name="own_document_tax.own_document"/>          <cfield name="own_document_tax.own_document"/>
252        </eq>        </eq>
253      </condition>      </condition>
254    </datasource>    </datasource>
255    
256    <!-- Origen de datos que srive para calcular el total adeudado -->    <!-- Origen de datos que srive para calcular el total adeudado -->
257    
258    <datasource name="paidTotalDataSource" database="papo" table="_entity_data, own_document, own_document_proceeding">    <datasource name="paidTotalDataSource" database="papo" table="_entity_data, own_document, own_document_proceeding">
259      <condition>      <condition>
260        <and>        <and>
261          <eq>          <eq>
262            <!-- Aqui se refiere al cliente  -->            <!-- Aqui se refiere al cliente  -->
263            <cfield name="_entity_data.id"/>            <cfield name="_entity_data.id"/>
264            <cfield name="own_document.recipient"/>            <cfield name="own_document.recipient"/>
265          </eq>          </eq>
266          <eq>          <eq>
# Line 275  Line 275 
275  <!--             </eq> -->  <!--             </eq> -->
276              <eq>              <eq>
277                <cfield name="own_document.own_document_type"/>                <cfield name="own_document.own_document_type"/>
278                <cconst value="4"/>                <cconst value="4"/>
279              </eq>              </eq>
280              <eq>              <eq>
281                <cfield name="own_document.own_document_type"/>                <cfield name="own_document.own_document_type"/>
282                <cconst value="8"/>                <cconst value="8"/>
283              </eq>              </eq>
284              <eq>              <eq>
285                <cfield name="own_document.own_document_type"/>                <cfield name="own_document.own_document_type"/>
286                <cconst value="9"/>                <cconst value="9"/>
287              </eq>              </eq>
288            </or>            </or>
289          </and>          </and>
290        </and>        </and>
291      </condition>      </condition>
292    </datasource>    </datasource>
293    
294    <datasource name="priceDataSource" database="papo" table="_price_data" />    <datasource name="priceDataSource" database="papo" table="_price_data" />
295    
296    <!--   Origen de datos que contiene el encabezado de la factura   -->    <!--   Origen de datos que contiene el encabezado de la factura   -->
297    
298    <datasource database="papo" name="ownDocumentDataSource" table="own_document"    <datasource database="papo" name="ownDocumentDataSource" table="own_document"
299      order_by="date" />      order_by="date" />
300    
301    <!-- Este lo uso para tomar los datos de al sucursal actual en futuro debera ser compañando por un archide configuración -->    <!-- Este lo uso para tomar los datos de al sucursal actual en futuro debera ser compañando por un archide configuración -->
302    <datasource database="papo" name="ownBranchDataSource"    <datasource database="papo" name="ownBranchDataSource"
303                table="_entity_data, _own_entity_data, _own_branch_data, _persona_tax_profile_data, _tax_profile_data" prequery="">                table="_entity_data, _own_entity_data, _own_branch_data, _persona_tax_profile_data, _tax_profile_data" prequery="">
304      <condition>      <condition>
305        <and>        <and>
# Line 342  Line 342 
342      </condition>      </condition>
343    </datasource>    </datasource>
344    
345    <!-- Origen de datos que contiene el numero de la proxima factura -->    <!-- Origen de datos que contiene el numero de la proxima factura -->
346    <datasource name="branchDocumentDataSource" database="papo"    <datasource name="branchDocumentDataSource" database="papo"
347      table="branch_document, _branch_document_data" historytable="_branch_document_data">      table="branch_document, _branch_document_data" historytable="_branch_document_data">
348      <condition>      <condition>
# Line 364  Line 364 
364      </condition>      </condition>
365    </datasource>    </datasource>
366    
367  <!--   Origen de datos que sirve para consultar el limite de crédito -->  <!--   Origen de datos que sirve para consultar el limite de crédito -->
368  <!--   asignado al cliente que se le factura -->  <!--   asignado al cliente que se le factura -->
369    
370    <datasource name="tlCreditLimit1DataSource" database="papo"    <datasource name="tlCreditLimit1DataSource" database="papo"
371      table="_entity_data, _credit_limit_data">      table="_entity_data, _credit_limit_data">
# Line 401  Line 401 
401      </condition>      </condition>
402    </datasource>    </datasource>
403    
404    <!--   Origen de datos que contiene los items de la factura -->    <!--   Origen de datos que contiene los items de la factura -->
405    
406     <datasource  name="ownItemDataSource" database="papo" detaillink="own_item.own_document"       <datasource  name="ownItemDataSource" database="papo" detaillink="own_item.own_document"
407       master="ownDocumentDataSource" masterlink="id"         master="ownDocumentDataSource" masterlink="id"
408       table="own_item, own_product_item, own_item_tax">       table="own_item, own_product_invoice_item, own_item_tax">
409      <condition>      <condition>
410        <and>        <and>
411          <eq>          <eq>
412            <cfield name="own_item.id"/>            <cfield name="own_item.id"/>
413            <cfield name="own_product_item.own_item"/>            <cfield name="own_product_invoice_item.own_item"/>
414          </eq>          </eq>
415           <eq>           <eq>
416             <cfield name="own_item.id"/>             <cfield name="own_item.id"/>
417             <cfield name="own_item_tax.own_item"/>             <cfield name="own_item_tax.own_item"/>
418          </eq>            </eq>
419          <eq>          <eq>
420             <cfield name="own_item_tax.tax"/>             <cfield name="own_item_tax.tax"/>
421             <cconst value="1"/>             <cconst value="1"/>
422           </eq>             </eq>
423        </and>        </and>
424      </condition>      </condition>
425    </datasource>    </datasource>
426    
427  <!--   Origen de datos que sirve para consultar y asi actualizar el stock -->  <!--   Origen de datos que sirve para consultar y asi actualizar el stock -->
428    
429    <datasource database="papo" name="ownItemToUpdDataSource"    <datasource database="papo" name="ownItemToUpdDataSource"
430      table="own_item, own_product_item, _price_data, _product_store_data">      table="own_item, own_product_invoice_item, _price_data, _product_store_data">
431      <condition>      <condition>
432        <and>        <and>
433          <eq>          <eq>
# Line 436  Line 436 
436          </eq>          </eq>
437          <eq>          <eq>
438            <cfield name="own_item.id"/>            <cfield name="own_item.id"/>
439            <cfield name="own_product_item.own_item"/>            <cfield name="own_product_invoice_item.own_item"/>
440          </eq>          </eq>
441          <eq>          <eq>
442            <cfield name="_price_data.id"/>            <cfield name="_price_data.id"/>
443            <cfield name="own_product_item.price"/>            <cfield name="own_product_invoice_item.price"/>
444          </eq>          </eq>
445          <eq>          <eq>
446            <cfield name="_price_data.product"/>            <cfield name="_price_data.product"/>
# Line 452  Line 452 
452        </and>        </and>
453      </condition>      </condition>
454    </datasource>    </datasource>
455      
456    <!-- Origen de datos que sirve para dar de alta pagos con algun tipo de currency -->    <!-- Origen de datos que sirve para dar de alta pagos con algun tipo de currency -->
457    <datasource name="currencyMovementDataSource" database="papo"    <datasource name="currencyMovementDataSource" database="papo"
458                table="movement, currency_movement">                table="movement, currency_movement">
459      <condition>      <condition>
# Line 464  Line 464 
464      </condition>      </condition>
465    </datasource>    </datasource>
466    
467    <!-- Origen de datos que sirve para dar de alta pagos con cta. cte. -->    <!-- Origen de datos que sirve para dar de alta pagos con cta. cte. -->
468    <datasource name="movementDataSource" database="papo" table="movement"/>    <datasource name="movementDataSource" database="papo" table="movement"/>
469    
470    <!-- 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) -->
471    <datasource name="proceedingDataSource" database="papo" table="proceeding"/>    <datasource name="proceedingDataSource" database="papo" table="proceeding"/>
472    
473    <!-- Origen de datos que sirve para dar de alta pagos con algun tipo de currency -->    <!-- Origen de datos que sirve para dar de alta pagos con algun tipo de currency -->
474    <datasource name="ownDocumentProceedingDataSource" database="papo" table="own_document_proceeding"/>    <datasource name="ownDocumentProceedingDataSource" database="papo" table="own_document_proceeding"/>
475    
476    <trigger name="clientCallFormTrigger" type="NAMED"><![CDATA[    <trigger name="clientCallFormTrigger" type="NAMED"><![CDATA[
# Line 483  Line 483 
483    
484    <trigger name="searchNextInvoiceNumber" type="NAMED"><![CDATA[    <trigger name="searchNextInvoiceNumber" type="NAMED"><![CDATA[
485      import gnue.common.GConditions as GConditions      import gnue.common.GConditions as GConditions
486        
487      condInvoiceNumber = GConditions.GCondition()      condInvoiceNumber = GConditions.GCondition()
488    
489      tmpAnd = GConditions.GCand(condInvoiceNumber)      tmpAnd = GConditions.GCand(condInvoiceNumber)
490      eq = GConditions.GCeq(tmpAnd)      eq = GConditions.GCeq(tmpAnd)
491      GConditions.GCField(eq,"_branch_document_data.document_type")      GConditions.GCField(eq,"_branch_document_data.document_type")
492      GConditions.GCConst(eq,str(ownDocumentBlock.typeEntry))      GConditions.GCConst(eq,str(ownDocumentBlock.typeEntry))
493        
494      branchDocumentDataSource.createResultSet(condInvoiceNumber)      branchDocumentDataSource.createResultSet(condInvoiceNumber)
495    
496    ]]></trigger>    ]]></trigger>
# Line 501  Line 501 
501        ownDocumentBlock.typeEntry = '4'        ownDocumentBlock.typeEntry = '4'
502      elif invoiceType == 'b':      elif invoiceType == 'b':
503        ownDocumentBlock.typeEntry = '8'        ownDocumentBlock.typeEntry = '8'
504      elif invoiceType == 'c':      elif invoiceType == 'c':
505        ownDocumentBlock.typeEntry = '9'        ownDocumentBlock.typeEntry = '9'
506      else:      else:
507        ownDocumentBlock.typeEntry = ''        ownDocumentBlock.typeEntry = ''
# Line 513  Line 513 
513        ownDocumentBlock.invoiceTypeEntry = ""        ownDocumentBlock.invoiceTypeEntry = ""
514      else:      else:
515        ownDocumentBlock.invoiceTypeEntry = str(ownDocumentBlock.invoiceTypeEntry).strip().upper()        ownDocumentBlock.invoiceTypeEntry = str(ownDocumentBlock.invoiceTypeEntry).strip().upper()
516      callTrigger('setInvoiceType')      callTrigger('setInvoiceType')
517      callTrigger('searchNextInvoiceNumber')      callTrigger('searchNextInvoiceNumber')
518    ]]></trigger>    ]]></trigger>
519    
# Line 561  Line 561 
561          # pleasePrint (self, 'p1', '1', 'serviceInvoice-discriminated', [ 'id='+str(ownDocumentBlock.idEntry) ])          # pleasePrint (self, 'p1', '1', 'serviceInvoice-discriminated', [ 'id='+str(ownDocumentBlock.idEntry) ])
562          hack.pleasePrint (self, 'p1', '1', 'productInvoice', [ 'id='+str(ownDocumentBlock.idEntry) ],branchDocumentBlock.documentPrintCommand)          hack.pleasePrint (self, 'p1', '1', 'productInvoice', [ 'id='+str(ownDocumentBlock.idEntry) ],branchDocumentBlock.documentPrintCommand)
563          callTrigger('rollbackTrigger')          callTrigger('rollbackTrigger')
564          callTrigger('endWaitingModeTrigger')                  callTrigger('endWaitingModeTrigger')
565    ]]></trigger>    ]]></trigger>
566      
567    <trigger name="commitTrigger" type="NAMED">    <trigger name="commitTrigger" type="NAMED">
568    
569       ownDocumentBlock.numberEntry= str(branchDocumentBlock.documentNumberEntry)       ownDocumentBlock.numberEntry= str(branchDocumentBlock.documentNumberEntry)
# Line 576  Line 576 
576       proceedingBlock.processRollback()       proceedingBlock.processRollback()
577       proceedingBlock.idEntry.autofillBySequence('proceeding_id_seq')       proceedingBlock.idEntry.autofillBySequence('proceeding_id_seq')
578       proceedingBlock.dateEntry = proceedingDataSource.getTimeStamp()       proceedingBlock.dateEntry = proceedingDataSource.getTimeStamp()
579        
580       ownDocumentBlock.idEntry.autofillBySequence('own_document_id_seq')       ownDocumentBlock.idEntry.autofillBySequence('own_document_id_seq')
581       #typeValue =  str(ownDocumentBlock.invoiceTypeEntry).strip().lower()       #typeValue =  str(ownDocumentBlock.invoiceTypeEntry).strip().lower()
582       #if typeValue == 'a':       #if typeValue == 'a':
# Line 585  Line 585 
585       #  ownDocumentBlock.typeEntry = "8"       #  ownDocumentBlock.typeEntry = "8"
586       #elif typeValue == 'c':       #elif typeValue == 'c':
587       #  ownDocumentBlock.typeEntry = "9"       #  ownDocumentBlock.typeEntry = "9"
588        
589       ownDocumentProceedingBlock.processRollback()       ownDocumentProceedingBlock.processRollback()
590       ownDocumentProceedingBlock.proceedingEntry = str(proceedingBlock.idEntry)       ownDocumentProceedingBlock.proceedingEntry = str(proceedingBlock.idEntry)
591       ownDocumentProceedingBlock.ownDocumentEntry = str(ownDocumentBlock.idEntry)       ownDocumentProceedingBlock.ownDocumentEntry = str(ownDocumentBlock.idEntry)
592       ownDocumentProceedingBlock.amountEntry = str(payBlock.cashEntry)       ownDocumentProceedingBlock.amountEntry = str(payBlock.cashEntry)
593        
594       currencyMovementBlock.processRollback()       currencyMovementBlock.processRollback()
595       currencyMovementBlock.proceedingEntry = str(proceedingBlock.idEntry)       currencyMovementBlock.proceedingEntry = str(proceedingBlock.idEntry)
596       currencyMovementBlock.movementTypeEntry = "" # Revisar com queda esto       currencyMovementBlock.movementTypeEntry = "" # Revisar com queda esto
# Line 611  Line 611 
611    
612       #setFocus(ownDocumentBlock.clientRecipientBox.clientEntry)       #setFocus(ownDocumentBlock.clientRecipientBox.clientEntry)
613    </trigger>    </trigger>
614    
615    <trigger name="rollbackTrigger" type="NAMED">    <trigger name="rollbackTrigger" type="NAMED">
616    tmpValuesDataSource.priceTypeId = None    tmpValuesDataSource.priceTypeId = None
617    for block in form._object._blockList:    for block in form._object._blockList:
# Line 621  Line 621 
621    #branchDocumentBlock.initQuery()    #branchDocumentBlock.initQuery()
622    #branchDocumentBlock.processQuery()    #branchDocumentBlock.processQuery()
623    
624      
625    tmpBlock.tmpDateEntry = ownDocumentDataSource.getTimeStamp()    tmpBlock.tmpDateEntry = ownDocumentDataSource.getTimeStamp()
626    #setFocus(ownDocumentBlock.clientCodeEntry)    #setFocus(ownDocumentBlock.clientCodeEntry)
627    </trigger>    </trigger>
# Line 644  Line 644 
644    <!--  Este trigger clacula el total facturado -->    <!--  Este trigger clacula el total facturado -->
645    <trigger name="totalCalcTrigger" type="NAMED">    <trigger name="totalCalcTrigger" type="NAMED">
646      import hack      import hack
647        
648      lQty = hack.a2f(ownItemBlock.qtyEntry)      lQty = hack.a2f(ownItemBlock.qtyEntry)
649      lBonus = hack.a2f(ownItemBlock.bonusEntry)      lBonus = hack.a2f(ownItemBlock.bonusEntry)
650      lDiscount = hack.a2f(ownItemBlock.discountEntry)      lDiscount = hack.a2f(ownItemBlock.discountEntry)
# Line 665  Line 665 
665    
666      lTNeto = 0      lTNeto = 0
667      lTTax = 0      lTTax = 0
668        
669      lRecords = ownItemDataSource.getRecords()      lRecords = ownItemDataSource.getRecords()
670      for index in range(len(lRecords)):      for index in range(len(lRecords)):
671        lRecord = lRecords[index]        lRecord = lRecords[index]
672        lQty = hack.a2f(lRecord.getField("own_product_item.qty"))        lQty = hack.a2f(lRecord.getField("own_product_invoice_item.qty"))
673        #print "cantidad: ",lQty        #print "cantidad: ",lQty
674        lBonus = hack.a2f(lRecord.getField("own_item.bonus"))        lBonus = hack.a2f(lRecord.getField("own_item.bonus"))
675        lDiscount = hack.a2f(lRecord.getField("own_item.discount"))        lDiscount = hack.a2f(lRecord.getField("own_item.discount"))
676        lUnitPrice = hack.a2f(lRecord.getField("own_product_item.unit_price"))        lUnitPrice = hack.a2f(lRecord.getField("own_product_invoice_item.unit_price"))
677        #lResultSet = priceDataSource.createResultSet({"id":lRecord.getField("own_product_item.price")})        #lResultSet = priceDataSource.createResultSet({"id":lRecord.getField("own_product_invoice_item.price")})
678        #if (lResultSet.firstRecord()):        #if (lResultSet.firstRecord()):
679        #lUnitPrice = hack.a2f(lResultSet.current.getField("unit_price"))        #lUnitPrice = hack.a2f(lResultSet.current.getField("unit_price"))
680        #else:        #else:
681        #  lUnitPrice = 0        #  lUnitPrice = 0
682        #print "lUnitPrice = ",lUnitPrice        #print "lUnitPrice = ",lUnitPrice
683          
684        lItemPrice = (lQty * lUnitPrice) - lBonus - lDiscount        lItemPrice = (lQty * lUnitPrice) - lBonus - lDiscount
685        lTNeto += lItemPrice        lTNeto += lItemPrice
686        lTTax += hack.a2f(lRecord.getField("own_item_tax.amount"))        lTTax += hack.a2f(lRecord.getField("own_item_tax.amount"))
# Line 692  Line 692 
692      payBlock.ctaCteEntry = "0.0"      payBlock.ctaCteEntry = "0.0"
693    </trigger>    </trigger>
694    
695        
696    <page name="Factura a Clientes">    <page name="Factura a Clientes">
697      <box height="9" label="Factura de Productos a Clientes"      <box height="9" label="Factura de Productos a Clientes"
698        name="invoiceHeaderBox" width="105" x="0" y="0">        name="invoiceHeaderBox" width="105" x="0" y="0">
699      <!--     Estos bloques son para la gestion del pago de la factura -->      <!--     Estos bloques son para la gestion del pago de la factura -->
700      <block name="proceedingBlock" datasource="proceedingDataSource" transparentBlock="">      <block name="proceedingBlock" datasource="proceedingDataSource" transparentBlock="">
701          <entry name="idEntry" field="id" hidden="" x="1" y="1" width="12"/>              <entry name="idEntry" field="id" hidden="" x="1" y="1" width="12"/>
702          <entry name="dateEntry" field="date" hidden="" x="1" y="1" width="12"/>              <entry name="dateEntry" field="date" hidden="" x="1" y="1" width="12"/>
703      </block>      </block>
704    
705    
# Line 711  Line 711 
711          ownDocumentBlock.clientRecipientBox.currentClientEntry = rs.current.getField('_entity_data._table')          ownDocumentBlock.clientRecipientBox.currentClientEntry = rs.current.getField('_entity_data._table')
712          tmpValuesDataSource.taxSourceCode = rs.current.getField('_tax_data.graft')          tmpValuesDataSource.taxSourceCode = rs.current.getField('_tax_data.graft')
713          tmpValuesDataSource.alienIVACond = rs.current.getField('_tax_profile_data._table')          tmpValuesDataSource.alienIVACond = rs.current.getField('_tax_profile_data._table')
714            
715      if str(ownDocumentBlock.clientRecipientBox.currentClientEntry):      if str(ownDocumentBlock.clientRecipientBox.currentClientEntry):
716          # Actualiza el puntaje          # Actualiza el puntaje
717          ownDocumentBlock.clientRecipientBox.scoreEntry = str(ownDocumentBlock.clientRecipientBox.clientEntry)          ownDocumentBlock.clientRecipientBox.scoreEntry = str(ownDocumentBlock.clientRecipientBox.clientEntry)
# Line 729  Line 729 
729    
730          import gnue.common.GConditions as GConditions          import gnue.common.GConditions as GConditions
731          import hack          import hack
732        
733          condProductInvoice = GConditions.GCondition()          condProductInvoice = GConditions.GCondition()
734          #condServiceInvoice = GConditions.GCondition()          #condServiceInvoice = GConditions.GCondition()
735          condPay = GConditions.GCondition()          condPay = GConditions.GCondition()
736            
737          balance = 0          balance = 0
738          if str(creditLimit1Block.balanceEntry):          if str(creditLimit1Block.balanceEntry):
739              tmpAnd = GConditions.GCand(condProductInvoice)              tmpAnd = GConditions.GCand(condProductInvoice)
# Line 779  Line 779 
779              invoiceTotal = 0              invoiceTotal = 0
780              currOwnDoc = productInvoiceResultSet.current.getField("own_document.id")              currOwnDoc = productInvoiceResultSet.current.getField("own_document.id")
781              while productInvoiceResultSet.current.getField("own_document.id") == currOwnDoc and more:              while productInvoiceResultSet.current.getField("own_document.id") == currOwnDoc and more:
782                  lQty = hack.a2f(productInvoiceResultSet.current.getField("own_product_item.qty"))                  lQty = hack.a2f(productInvoiceResultSet.current.getField("own_product_invoice_item.qty"))
783                  lUnitPrice = hack.a2f(productInvoiceResultSet.current.getField("own_product_item.unit_price"))                  lUnitPrice = hack.a2f(productInvoiceResultSet.current.getField("own_product_invoice_item.unit_price"))
784                  lBonus = hack.a2f(productInvoiceResultSet.current.getField("own_item.bonus"))                  lBonus = hack.a2f(productInvoiceResultSet.current.getField("own_item.bonus"))
785                  lDiscount = hack.a2f(productInvoiceResultSet.current.getField("own_item.discount"))                  lDiscount = hack.a2f(productInvoiceResultSet.current.getField("own_item.discount"))
786                  item = lQty * lUnitPrice - lBonus - lDiscount                  item = lQty * lUnitPrice - lBonus - lDiscount
# Line 798  Line 798 
798                  invoiceTotal += hack.a2f(odt_rs.current.getField("own_document_tax.amount"))                  invoiceTotal += hack.a2f(odt_rs.current.getField("own_document_tax.amount"))
799                  odt_more = odt_rs.nextRecord()                  odt_more = odt_rs.nextRecord()
800              spentTotal += invoiceTotal              spentTotal += invoiceTotal
801                
802          # Calculo del total facturado          # Calculo del total facturado
803          ## Factura de servicios          ## Factura de servicios
804          #serviceInvoiceResultSet= serviceInvoiceTotalDataSource.createResultSet (condServiceInvoice)          #serviceInvoiceResultSet= serviceInvoiceTotalDataSource.createResultSet (condServiceInvoice)
# Line 826  Line 826 
826          #           # print "calc 7: %d:%d" % (item, itemTaxTotal)          #           # print "calc 7: %d:%d" % (item, itemTaxTotal)
827          #          #
828          #       invoiceTotal+= item + itemTaxTotal          #       invoiceTotal+= item + itemTaxTotal
829          #                #
830          #   spentTotal+= invoiceTotal          #   spentTotal+= invoiceTotal
831    
832    
# Line 869  Line 869 
869    
870      <!-- Bloque para la búsqueda de clientes -->      <!-- Bloque para la búsqueda de clientes -->
871      <block name="clientResultBlock" datasource="clientSearchDataSource">      <block name="clientResultBlock" datasource="clientSearchDataSource">
872          <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"/>
873  <!--         <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"/>             -->
874          <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"/>
875          <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"/>
876      </block>      </block>
877      <trigger name="clientSearchTrigger" type="NAMED"><![CDATA[      <trigger name="clientSearchTrigger" type="NAMED"><![CDATA[
878        tmpValuesDataSource.priceTypeId = None        tmpValuesDataSource.priceTypeId = None
# Line 905  Line 905 
905              callTrigger('startWaitingModeTrigger')              callTrigger('startWaitingModeTrigger')
906              callTrigger('bringClientDataTrigger')              callTrigger('bringClientDataTrigger')
907              callTrigger('endWaitingModeTrigger')              callTrigger('endWaitingModeTrigger')
908                
909          runForm ('clientSelect.gfd', {'data': clientResultBlock, 'callback': callback})          runForm ('clientSelect.gfd', {'data': clientResultBlock, 'callback': callback})
910        elif recordCount == 1:        elif recordCount == 1:
911          clientResultBlock.jumpRecord(0)          clientResultBlock.jumpRecord(0)
# Line 918  Line 918 
918    
919    ]]></trigger>    ]]></trigger>
920    
921      <!--     Fin de bloques destinados a la gestion del pago de la factura -->      <!--     Fin de bloques destinados a la gestion del pago de la factura -->
922      <block datasource="ownDocumentDataSource" name="ownDocumentBlock" restrictInsert="">      <block datasource="ownDocumentDataSource" name="ownDocumentBlock" restrictInsert="">
923          <entry field="id" hidden="" name="idEntry" x="1" y="1"/>          <entry field="id" hidden="" name="idEntry" x="1" y="1"/>
924          <entry field="own_document_type" hidden="" name="typeEntry" x="1" y="1"/>          <entry field="own_document_type" hidden="" name="typeEntry" x="1" y="1"/>
# Line 944  Line 944 
944    
945          <label name="clientLbl" text="Lista de precios:" x="1" y="4" />          <label name="clientLbl" text="Lista de precios:" x="1" y="4" />
946    
947          <entry x="19" y="4" field="recipient" name="priceTypeEntry" readonly=""          <entry x="19" y="4" field="recipient" name="priceTypeEntry" readonly=""
948             width="20" style="textlookup" foreign_key="clientDataSource._entity_data.id"             width="20" style="textlookup" foreign_key="clientDataSource._entity_data.id"
949             foreign_key_description="_price_type_data.name" />             foreign_key_description="_price_type_data.name" />
950    
951  <!--         <label name="scoreLbl" text="Puntaje" x="64" y="1" /> -->  <!--         <label name="scoreLbl" text="Puntaje" x="64" y="1" /> -->
952  <!--         <entry x="64" y="2" readonly="" field="recipient" name="scoreEntry" -->  <!--         <entry x="64" y="2" readonly="" field="recipient" name="scoreEntry" -->
# Line 963  Line 963 
963          <entry name="deudaEntry" style="label" x="52" y="4" width="12" typecast="number" displaymask="%0.2f"/>          <entry name="deudaEntry" style="label" x="52" y="4" width="12" typecast="number" displaymask="%0.2f"/>
964    
965          </box>          </box>
966          <entry field="date" name="dateEntry" style="label" hidden="" typecast="date"          <entry field="date" name="dateEntry" style="label" hidden="" typecast="date"
967            rows="10" width="24" x="7" y="7"/>            rows="10" width="24" x="7" y="7"/>
968          <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"/>
969    
# Line 973  Line 973 
973          </entry>          </entry>
974    
975        </block>        </block>
976          
977        <!-- Fecha de la factura -->        <!-- Fecha de la factura -->
978        <block name="tmpBlock" datasource="tmpValuesDataSource" transparentBlock="">        <block name="tmpBlock" datasource="tmpValuesDataSource" transparentBlock="">
979          <label name="dateLbl" text="Fecha" x="1" y="1" />          <label name="dateLbl" text="Fecha" x="1" y="1" />
980          <entry name="tmpDateEntry" typecast="date"          <entry name="tmpDateEntry" typecast="date"
981            width="14" x="7" y="1"/>            width="14" x="7" y="1"/>
982        </block>        </block>
983    
# Line 1002  Line 1002 
1002      <!--     ******************************** -->      <!--     ******************************** -->
1003    
1004      <!--     Datasource que sirve para la búsqueda del producto  -->      <!--     Datasource que sirve para la búsqueda del producto  -->
1005      <datasource database="papo" name="priceTypeDataSource" table="_price_type_data">      <datasource database="papo" name="priceTypeDataSource" table="_price_type_data">
1006      <condition>      <condition>
1007        <null>          <null>
1008          <cfield name="_price_type_data._end_t"/>          <cfield name="_price_type_data._end_t"/>
1009        </null>        </null>
1010      </condition>      </condition>
# Line 1017  Line 1017 
1017      </block>      </block>
1018      <!--     Datasource que sirve para almacenar el resultado de la búsqueda -->      <!--     Datasource que sirve para almacenar el resultado de la búsqueda -->
1019      <datasource database="papo" name="productResultDataSource"      <datasource database="papo" name="productResultDataSource"
1020        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,
1021               _currency_type_data"               _currency_type_data"
1022        order_by = "_product_data.canonical_name, _price_type_data._table desc" >        order_by = "_product_data.canonical_name, _price_type_data._table desc" >
1023        <condition>        <condition>
1024        <and>        <and>
1025            <null>              <null>
1026             <cfield name="_product_code_type_data._end_t"/>             <cfield name="_product_code_type_data._end_t"/>
1027            </null>            </null>
1028            <null>              <null>
1029              <cfield name="_product_code_data._end_t"/>              <cfield name="_product_code_data._end_t"/>
1030            </null>            </null>
1031            <null>              <null>
1032             <cfield name="_product_data._end_t"/>             <cfield name="_product_data._end_t"/>
1033            </null>            </null>
1034            <null>              <null>
1035             <cfield name="_product_tax_data._end_t"/>             <cfield name="_product_tax_data._end_t"/>
1036            </null>            </null>
1037            <null>              <null>
1038              <cfield name="_price_data._end_t"/>              <cfield name="_price_data._end_t"/>
1039            </null>            </null>
1040            <null>              <null>
1041              <cfield name="_price_type_data._end_t"/>              <cfield name="_price_type_data._end_t"/>
1042            </null>            </null>
1043            <null>            <null>
# Line 1115  Line 1115 
1115        priceListsChain=[]        priceListsChain=[]
1116        while search_id != "" :        while search_id != "" :
1117            priceTypeBlock.initQuery()            priceTypeBlock.initQuery()
1118            priceTypeBlock.priceTypeId = search_id                                    priceTypeBlock.priceTypeId = search_id
1119            priceTypeBlock.processQuery()            priceTypeBlock.processQuery()
1120            search_id = str(priceTypeBlock.priceTypeParentId)            search_id = str(priceTypeBlock.priceTypeParentId)
1121            priceListsChain.append("%s" % priceTypeBlock.priceTypeId)            priceListsChain.append("%s" % priceTypeBlock.priceTypeId)
# Line 1125  Line 1125 
1125        tmpProdResultBlock.prodCodeEntry = ("%s" % ownItemBlock.prodCodeSEntry)+"%"        tmpProdResultBlock.prodCodeEntry = ("%s" % ownItemBlock.prodCodeSEntry)+"%"
1126        tmpProdResultBlock.prodCodeTypeEntry = "1" # Ver como elegimos el código adecuado        tmpProdResultBlock.prodCodeTypeEntry = "1" # Ver como elegimos el código adecuado
1127        tmpProdResultBlock.processQuery()        tmpProdResultBlock.processQuery()
1128        # cargar la parte visible de modificacion de precios        # cargar la parte visible de modificacion de precios
1129        tmpProdResultBlock.firstRecord()        tmpProdResultBlock.firstRecord()
1130        product_id_anterior = None        product_id_anterior = None
1131        prodResultBlock.processRollback()        prodResultBlock.processRollback()
1132        for index in range(tmpProdResultBlock.getRecordCount()):        for index in range(tmpProdResultBlock.getRecordCount()):
1133            product_id=("%s" %tmpProdResultBlock.prodIdEntry)            product_id=("%s" %tmpProdResultBlock.prodIdEntry)
1134            if product_id != product_id_anterior:            if product_id != product_id_anterior:
1135                for pricetype in priceListsChain:                for pricetype in priceListsChain:
1136                    if pricetype == ("%s" %tmpProdResultBlock.prodPriceTypeIdEntry):                              if pricetype == ("%s" %tmpProdResultBlock.prodPriceTypeIdEntry):
1137                        if len(str(prodResultBlock.prodNameEntry)):                        if len(str(prodResultBlock.prodNameEntry)):
1138                          prodResultBlock.newRecord()                          prodResultBlock.newRecord()
1139                        prodResultBlock.prodNameEntry= ("%s" %tmpProdResultBlock.prodNameEntry)                        prodResultBlock.prodNameEntry= ("%s" %tmpProdResultBlock.prodNameEntry)
1140                        prodResultBlock.prodCodeEntry= ("%s" %tmpProdResultBlock.prodCodeEntry)                        prodResultBlock.prodCodeEntry= ("%s" %tmpProdResultBlock.prodCodeEntry)
1141                        prodResultBlock.prodPriceTypeEntry=  ("%s" %tmpProdResultBlock.prodPriceTypeEntry)                        prodResultBlock.prodPriceTypeEntry=  ("%s" %tmpProdResultBlock.prodPriceTypeEntry)
1142                        prodResultBlock.prodUnitPriceEntry= ("%s" %tmpProdResultBlock.prodUnitPriceEntry)                        prodResultBlock.prodUnitPriceEntry= ("%s" %tmpProdResultBlock.prodUnitPriceEntry)
1143                        prodResultBlock.prodPriceEntry = ("%s" %tmpProdResultBlock.prodPriceEntry)                        prodResultBlock.prodPriceEntry = ("%s" %tmpProdResultBlock.prodPriceEntry)
1144                        prodResultBlock.prodPricePreviousEntry= ("%s" %tmpProdResultBlock.prodUnitPriceEntry)                        prodResultBlock.prodPricePreviousEntry= ("%s" %tmpProdResultBlock.prodUnitPriceEntry)
1145                        prodResultBlock.prodProductIdEntry= ("%s" %tmpProdResultBlock.prodIdEntry)                        prodResultBlock.prodProductIdEntry= ("%s" %tmpProdResultBlock.prodIdEntry)
1146                        prodResultBlock.prodPriceListIdEntry= ("%s" %tmpProdResultBlock.prodPriceTypeIdEntry)                        prodResultBlock.prodPriceListIdEntry= ("%s" %tmpProdResultBlock.prodPriceTypeIdEntry)
1147                        prodResultBlock.prodIVATaxEntry= ("%s" %tmpProdResultBlock.prodIVATaxEntry)                        prodResultBlock.prodIVATaxEntry= ("%s" %tmpProdResultBlock.prodIVATaxEntry)
1148                        prodResultBlock.prodCurrencyRateEntry= ("%s" %tmpProdResultBlock.prodCurrencyRateEntry)                        prodResultBlock.prodCurrencyRateEntry= ("%s" %tmpProdResultBlock.prodCurrencyRateEntry)
# Line 1157  Line 1157 
1157            if returnValue >= 0:            if returnValue >= 0:
1158              prodResultBlock.jumpRecord(returnValue)              prodResultBlock.jumpRecord(returnValue)
1159              callTrigger('prodInsertTrigger')              callTrigger('prodInsertTrigger')
1160                
1161          runForm ('productSelect.gfd', {'data': prodResultBlock, 'callback': callback})          runForm ('productSelect.gfd', {'data': prodResultBlock, 'callback': callback})
1162        elif recordCount == 1:        elif recordCount == 1:
1163          prodResultBlock.jumpRecord(0)          prodResultBlock.jumpRecord(0)
# Line 1176  Line 1176 
1176      <entry name="prodPriceEntry" x="1" y="1" width="20" rows="2" hidden=""/>      <entry name="prodPriceEntry" x="1" y="1" width="20" rows="2" hidden=""/>
1177      <entry name="prodPricePreviousEntry"  x="1" y="1" width="10" rows="8" hidden=""/>      <entry name="prodPricePreviousEntry"  x="1" y="1" width="10" rows="8" hidden=""/>
1178      <entry name="prodProductIdEntry"  x="1" y="1" width="5" rows="8" hidden=""/>      <entry name="prodProductIdEntry"  x="1" y="1" width="5" rows="8" hidden=""/>
1179      <entry name="prodPriceListIdEntry"  x="1" y="1" width="5" rows="8" hidden=""/>      <entry name="prodPriceListIdEntry"  x="1" y="1" width="5" rows="8" hidden=""/>
1180      <entry name="prodIVATaxEntry"  x="1" y="1" width="5" rows="8" hidden=""/>      <entry name="prodIVATaxEntry"  x="1" y="1" width="5" rows="8" hidden=""/>
1181      <entry name="prodCurrencyRateEntry"  x="1" y="1" width="10" rows="8" hidden=""/>      <entry name="prodCurrencyRateEntry"  x="1" y="1" width="10" rows="8" hidden=""/>
1182    </block>    </block>
1183    <!--   Insertar el producto seleccionado -->    <!--   Insertar el producto seleccionado -->
1184    <trigger name="prodInsertTrigger" type="NAMED">    <trigger name="prodInsertTrigger" type="NAMED">
# Line 1194  Line 1194 
1194      ownItemBlock.taxAmountEntry = (hack.a2f(prodResultBlock.prodIVATaxEntry)/100) * lItemPrice      ownItemBlock.taxAmountEntry = (hack.a2f(prodResultBlock.prodIVATaxEntry)/100) * lItemPrice
1195      ownItemBlock.ivaEntry = hack.a2f(prodResultBlock.prodIVATaxEntry)      ownItemBlock.ivaEntry = hack.a2f(prodResultBlock.prodIVATaxEntry)
1196      ownItemBlock.unitPriceEntry = str(prodResultBlock.prodUnitPriceEntry)      ownItemBlock.unitPriceEntry = str(prodResultBlock.prodUnitPriceEntry)
1197                                      
1198      callTrigger('totalCalcTrigger')      callTrigger('totalCalcTrigger')
1199    </trigger>    </trigger>
1200    <!--     ****** Fin búsqueda ************ -->    <!--     ****** Fin búsqueda ************ -->
# Line 1218  Line 1218 
1218      <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"/>
1219      <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"/>
1220    
1221      <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"/>
1222    
1223      <label name="qtyLbl" text="Cantidad" x="45" y="10"/>      <label name="qtyLbl" text="Cantidad" x="45" y="10"/>
1224      <!-- mdione's bookmark -->      <!-- mdione's bookmark -->
1225      <entry field="own_product_item.qty" name="qtyEntry" rows="10" typecast="number" displaymask="%0.3f" width="11" x="45" y="11">      <entry field="own_product_invoice_item.qty" name="qtyEntry" rows="10" typecast="number" displaymask="%0.3f" width="11" x="45" y="11">
1226      <trigger name="qtyEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" />      <trigger name="qtyEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" />
1227      </entry>      </entry>
1228    
1229          <label name="priceLbl" text="Precio" x="56" y="10"/>          <label name="priceLbl" text="Precio" x="56" y="10"/>
1230          <entry x="56" y="11" name="unitPriceEntry" field="own_product_item.unit_price" width="10" rows="10" typecast="number" displaymask="%0.2f">          <entry x="56" y="11" name="unitPriceEntry" field="own_product_invoice_item.unit_price" width="10" rows="10" typecast="number" displaymask="%0.2f">
1231            <trigger name="unitPriceEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" />            <trigger name="unitPriceEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" />
1232          </entry>          </entry>
1233          <entry x="1" y="14" readonly="" field="own_product_item.price" name="priceEntry" width="10" rows="5" hidden=""/>          <entry x="1" y="14" readonly="" field="own_product_invoice_item.price" name="priceEntry" width="10" rows="5" hidden=""/>
1234          <entry x="1" y="14" readonly="" field="own_item_tax.tax" name="taxTypeEntry" width="10" rows="5" default="1" hidden="" typecast="number" displaymask="%0.2f"/>          <entry x="1" y="14" readonly="" field="own_item_tax.tax" name="taxTypeEntry" width="10" rows="5" default="1" hidden="" typecast="number" displaymask="%0.2f"/>
1235          <entry x="1" y="14" readonly="" field="own_item_tax.amount" name="taxAmountEntry" width="10" rows="5" hidden="" typecast="number" displaymask="%0.2f"/>          <entry x="1" y="14" readonly="" field="own_item_tax.amount" name="taxAmountEntry" width="10" rows="5" hidden="" typecast="number" displaymask="%0.2f"/>
1236    
1237    
1238          <label name="ivaLbl" text="IVA" x="66" y="10"/>          <label name="ivaLbl" text="IVA" x="66" y="10"/>
1239          <entry name="ivaEntry" displaymask="%0.0f"          <entry name="ivaEntry" displaymask="%0.0f"
1240            rows="10" width="3" x="66" y="11" default="0">            rows="10" width="3" x="66" y="11" default="0">
1241            <trigger name="ivaEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" />            <trigger name="ivaEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" />
1242          </entry>          </entry>
# Line 1246  Line 1246 
1246            <trigger name="discountEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" />            <trigger name="discountEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" />
1247           </entry>           </entry>
1248  <!--         <label name="bonusLbl" text="Bonif." x="79" y="10"/> -->  <!--         <label name="bonusLbl" text="Bonif." x="79" y="10"/> -->
1249          <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"
1250            rows="10" width="10" x="79" y="11" hidden=""/>            rows="10" width="10" x="79" y="11" hidden=""/>
1251          <label name="itemNetolLbl" text="Neto" x="76" y="10"/>          <label name="itemNetolLbl" text="Neto" x="76" y="10"/>
1252          <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"
1253            rows="10" width="10" x="76" y="11"/>            rows="10" width="10" x="76" y="11"/>
1254          <label name="itemTotalLbl" text="Total" x="85" y="10"/>          <label name="itemTotalLbl" text="Total" x="85" y="10"/>
1255          <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"
1256            rows="10" width="10" x="85" y="11">            rows="10" width="10" x="85" y="11">
1257          </entry>          </entry>
1258          <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"/>
1259          <scrollbar page="5" x="103" y="11" width="1" height="10"/>          <scrollbar page="5" x="103" y="11" width="1" height="10"/>
1260        </block>        </block>
1261      <!--     Bloques que sirven para el pago -->          <!--     Bloques que sirven para el pago -->
1262      <block name="ownDocumentProceedingBlock" datasource="ownDocumentProceedingDataSource" transparentBlock="">      <block name="ownDocumentProceedingBlock" datasource="ownDocumentProceedingDataSource" transparentBlock="">
1263          <entry name="proceedingEntry" field="proceeding" hidden="" x="1" y="1" width="12"/>              <entry name="proceedingEntry" field="proceeding" hidden="" x="1" y="1" width="12"/>
1264          <entry name="ownDocumentEntry" field="own_document" hidden="" x="1" y="1" width="12"/>              <entry name="ownDocumentEntry" field="own_document" hidden="" x="1" y="1" width="12"/>
1265          <entry name="amountEntry" field="amount" hidden="" x="1" y="1" width="12"/>              <entry name="amountEntry" field="amount" hidden="" x="1" y="1" width="12"/>
1266      </block>      </block>
1267      <block name="currencyMovementBlock" datasource="currencyMovementDataSource" transparentBlock="">      <block name="currencyMovementBlock" datasource="currencyMovementDataSource" transparentBlock="">
1268          <entry name="proceedingEntry" field="movement.proceeding" hidden="" x="1" y="1" width="12"/>              <entry name="proceedingEntry" field="movement.proceeding" hidden="" x="1" y="1" width="12"/>
1269          <entry name="movementTypeEntry" field="movement.movement_type" hidden="" x="1" y="1" width="12"/>              <entry name="movementTypeEntry" field="movement.movement_type" hidden="" x="1" y="1" width="12"/>
1270          <entry name="amountEntry" field="movement.amount" hidden="" x="1" y="1" width="12"/>              <entry name="amountEntry" field="movement.amount" hidden="" x="1" y="1" width="12"/>
1271          <entry name="currencyTypeEntry" field="currency_movement.currency_type" hidden="" x="1" y="1" width="12"/>              <entry name="currencyTypeEntry" field="currency_movement.currency_type" hidden="" x="1" y="1" width="12"/>
1272      </block>      </block>
1273      <!--     Datasource que sirve para almacenar el resultado de la búsqueda -->      <!--     Datasource que sirve para almacenar el resultado de la búsqueda -->
1274        <block datasource="tmpValuesDataSource" name="totalBlock" restrictInsert="">        <block datasource="tmpValuesDataSource" name="totalBlock" restrictInsert="">
1275          <label text="Neto " x="55" y="21"/>          <label text="Neto " x="55" y="21"/>
1276          <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"
1277            default="0.00"/>            default="0.00"/>
1278          <label text="IVA " x="66" y="21"/>          <label text="IVA " x="66" y="21"/>
1279          <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"
1280            default="0.00"/>            default="0.00"/>
1281          <label text="Total " x="82" y="21"/>          <label text="Total " x="82" y="21"/>
1282          <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"
1283            default="0.00"/>            default="0.00"/>
1284        </block>        </block>
1285        <block datasource="ownItemToUpdDataSource" name="ownItemToUpdBlock">        <block datasource="ownItemToUpdDataSource" name="ownItemToUpdBlock">
1286          <entry name="ownDocumentEntry" field="own_item.own_document" hidden="" x="1" y="109" width="10"/>              <entry name="ownDocumentEntry" field="own_item.own_document" hidden="" x="1" y="109" width="10"/>
1287          <entry name="prodIdEntry" field="_price_data.product" hidden="" x="11" y="109" width="10"/>                  <entry name="prodIdEntry" field="_price_data.product" hidden="" x="11" y="109" width="10"/>
1288          <entry name="qtyEntry" field="own_product_item.qty" hidden="" x="22" y="109" width="10"/>                  <entry name="qtyEntry" field="own_product_invoice_item.qty" hidden="" x="22" y="109" width="10"/>
1289          <entry name="levelEntry" field="_product_store_data.level" hidden="" x="33" y="109" width="10"/>              <entry name="levelEntry" field="_product_store_data.level" hidden="" x="33" y="109" width="10"/>
1290          <entry name="productEntry" field="_product_store_data.product" hidden="" x="33" y="109" width="10"/>              <entry name="productEntry" field="_product_store_data.product" hidden="" x="33" y="109" width="10"/>
1291          <entry name="storehouseEntry" field="_product_store_data.storehouse" hidden="" x="33" y="109" width="10"/>              <entry name="storehouseEntry" field="_product_store_data.storehouse" hidden="" x="33" y="109" width="10"/>
1292          <entry name="hiwaterEntry" field="_product_store_data.hiwater" hidden="" x="33" y="109" width="10"/>              <entry name="hiwaterEntry" field="_product_store_data.hiwater" hidden="" x="33" y="109" width="10"/>
1293          <entry name="lowaterEntry" field="_product_store_data.lowater" hidden="" x="33" y="109" width="10"/>              <entry name="lowaterEntry" field="_product_store_data.lowater" hidden="" x="33" y="109" width="10"/>
1294          <entry name="tableEntry" field="_product_store_data._table" hidden="" x="33" y="109" width="10"/>              <entry name="tableEntry" field="_product_store_data._table" hidden="" x="33" y="109" width="10"/>
1295        </block>        </block>
1296        <block datasource="creditLimit1DataSource" name="creditLimit1Block">        <block datasource="creditLimit1DataSource" name="creditLimit1Block">
1297          <entry name="entityEntry" field="_credit_limit_data.entity" hidden="" x="11" y="109" width="10"/>                  <entry name="entityEntry" field="_credit_limit_data.entity" hidden="" x="11" y="109" width="10"/>
1298          <entry name="movementTypeEntry" field="_credit_limit_data.movement_type" hidden="" x="1" y="109" width="10"/>              <entry name="movementTypeEntry" field="_credit_limit_data.movement_type" hidden="" x="1" y="109" width="10"/>
1299          <entry name="creditLimitAmountEntry" field="_credit_limit_data.credit_limit" hidden="" x="1" y="109" width="10"/>              <entry name="creditLimitAmountEntry" field="_credit_limit_data.credit_limit" hidden="" x="1" y="109" width="10"/>
1300          <entry name="balanceEntry" field="_credit_limit_data.balance" hidden="" x="22" y="109" width="10"/>                  <entry name="balanceEntry" field="_credit_limit_data.balance" hidden="" x="22" y="109" width="10"/>
1301          <entry name="timeStampEntry" field="_credit_limit_data.time_stamp" hidden="" x="33" y="109" width="10"/>              <entry name="timeStampEntry" field="_credit_limit_data.time_stamp" hidden="" x="33" y="109" width="10"/>
1302        </block>        </block>
1303  <!--     </box> -->  <!--     </box> -->
1304      <box height="4" label="Cobro de la factura" name="payBox"      <box height="4" label="Cobro de la factura" name="payBox"
1305        width="82" x="0" y="23">        width="82" x="0" y="23">
1306        <block datasource="payDataSource" name="payBlock">        <block datasource="payDataSource" name="payBlock">
1307        <label text="Efectivo : " x="1" y="1"/>        <label text="Efectivo : " x="1" y="1"/>
1308        <entry name="cashEntry" typecast="number" displaymask="%0.2f" default="0.00"        <entry name="cashEntry" typecast="number" displaymask="%0.2f" default="0.00"
1309          x="11" y="1" width="12">              x="11" y="1" width="12">
1310          <trigger name="cashEntryPreFocusout" type="Pre-Focusout">          <trigger name="cashEntryPreFocusout" type="Pre-Focusout">
1311             import hack             import hack
1312             payBlock.ctaCteEntry = str(hack.a2f(totalBlock.totalEntry) - hack.a2f(payBlock.cashEntry))             payBlock.ctaCteEntry = str(hack.a2f(totalBlock.totalEntry) - hack.a2f(payBlock.cashEntry))
# Line 1314  Line 1314 
1314        </entry>        </entry>
1315        <label text="Cta. Cte. : " x="24" y="1"/>        <label text="Cta. Cte. : " x="24" y="1"/>
1316        <entry name="ctaCteEntry" typecast="number" displaymask="%0.2f" default="0.00"        <entry name="ctaCteEntry" typecast="number" displaymask="%0.2f" default="0.00"
1317          x="36" y="1" width="12">              x="36" y="1" width="12">
1318          <trigger name="ctaCteEntryPreFocusOut" type="Pre-Focusout">          <trigger name="ctaCteEntryPreFocusOut" type="Pre-Focusout">
1319             import hack             import hack
1320             payBlock.cashEntry = str(hack.a2f(totalBlock.totalEntry) - hack.a2f(payBlock.ctaCteEntry))             payBlock.cashEntry = str(hack.a2f(totalBlock.totalEntry) - hack.a2f(payBlock.ctaCteEntry))
# Line 1328  Line 1328 
1328        </block>        </block>
1329      </box>      </box>
1330    <block name="ownBranchBlock" datasource="ownBranchDataSource">    <block name="ownBranchBlock" datasource="ownBranchDataSource">
1331      <entry name="condIVAEntry" field="_tax_profile_data.tax" hidden="" x="1" y="1" width="10"/>                  <entry name="condIVAEntry" field="_tax_profile_data.tax" hidden="" x="1" y="1" width="10"/>
1332    </block>    </block>
1333    </page>    </page>
1334  </form>  </form>

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

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