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

Diff of /papo/forms/productInvoice.neb

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

revision 1.10 by apronotti, Mon May 26 14:56:56 2003 UTC revision 1.11 by charlie, Mon May 26 22:55:38 2003 UTC
# Line 1  Line 1 
1  <?xml version="1.0" encoding="ISO-8859-1"?>  <?xml version="1.0" encoding="ISO-8859-1"?>
2  <!DOCTYPE form SYSTEM "gnue-forms.dtd">  <!DOCTYPE form SYSTEM "gnue-forms.dtd">
3  <form width="107" height="24" title="Facturación a Clientes">  <form width="107" height="21" title="Facturación a Clientes">
4    <neb:Block>    <neb:Block>
5      use PAPO;      use PAPO;
6      my $uniqed=0;      my $uniqed=0;
7    </neb:Block>    </neb:Block>
8    
9    <datasource name="tmpValuesDataSource" cache="1"/>    <datasource name="tmpValuesDataSource" cache="1"/>
10    <datasource name="payDataSource" cache="1"/>    <datasource name="payDataSource" cache="1"/>
11    <datasource name="prodSearchDataSource" cache="1"/>    <datasource name="prodSearchDataSource" cache="1"/>
12    <datasource name="prodResultDataSource" cache="1"/>    <datasource name="prodResultDataSource" cache="1"/>
13      <datasource name="dataCurrencyDataSource" cache="1"/>
14      <datasource name="tmpCurrencyDataSource" cache="1"/>
15    
16    
17    <datasource name="ownOrganizationDataSource" database="papo"    <datasource name="ownOrganizationDataSource" database="papo"
18      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">
19      <condition>      <condition>
# Line 474  Line 479 
479      </condition>      </condition>
480    </datasource>    </datasource>
481    
482      <neb:Sub neb:src="datasource.nebc" zot="../zot/PAPO-ER.zot"
483        search="currency_type" database="papo" name="currencyTypeDataSource" />
484    
485    <!-- 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 -->
486    <datasource name="currencyMovementDataSource" database="papo"    <datasource name="currencyMovementDataSource" database="papo"
487                table="movement, currency_movement">                table="movement, currency_movement">
# Line 560  Line 568 
568    
569    <neb:Sub neb:src="wait.nebc"/>    <neb:Sub neb:src="wait.nebc"/>
570    
571    <trigger name="printTrigger" type="NAMED"><![CDATA[    <trigger name="invoiceOkTrigger" type="NAMED"><![CDATA[
572      import hack    
573      lCurrentCredit = hack.a2f(tmpValuesDataSource.creditLimitAmount) - \    # print "Cantidad de Registros: ", ownItemBlock.getRecordCount()
574                       hack.a2f(ownDocumentBlock.clientRecipientBox.deudaEntry)    # print "Leng Product Name: ", len(ownItemBlock.prodNameSEntry)
575      if ownItemBlock.getRecordCount() > 0 and len(ownItemBlock.prodNameSEntry) > 0:
576          import hack
577          lCurrentCredit = hack.a2f(tmpValuesDataSource.creditLimitAmount) - \
578                           hack.a2f(ownDocumentBlock.clientRecipientBox.deudaEntry)
579    
580          if hack.a2f(payBlock.ctaCteEntry) > lCurrentCredit:
581              genericBox("Esta excedido el Límite de Crédito",["Aceptar"])
582          elif not str(ownDocumentBlock.invoiceTypeEntry):
583              genericBox("Falta el tipo de factura",["Aceptar"])
584          else:
585              setFocus(currencyTypeBlock.currencyBox.payEntry)
586              callTrigger('currencyWorkTrigger')
587    
     if hack.a2f(payBlock.ctaCteEntry) > lCurrentCredit:  
       genericBox("Esta excedido el Límite de Crédito",["Aceptar"])  
     elif not str(ownDocumentBlock.invoiceTypeEntry):  
       genericBox("Falta el tipo de factura",["Aceptar"])  
     else:  
       if ownItemBlock.getRecordCount() > 0 and len(ownItemBlock.prodNameSEntry) > 0:  
         callTrigger('startWaitingModeTrigger')  
         callTrigger ('commitTrigger')  
         # it's _such_ a pitty  
         # pleasePrint ('serviceInvoice', { 'id': str(ownDocumentBlock.idEntry) })  
         report='productInvoice-%s' % str(ownDocumentBlock.typeEntry)  
         hack.pleasePrint (self, str(ownDocumentBlock.typeEntry), report, [ 'id='+str(ownDocumentBlock.idEntry) ],str(ownPosDocumentBlock.documentPrintCommand))  
         callTrigger('rollbackTrigger')  
         callTrigger('endWaitingModeTrigger')  
588    ]]></trigger>    ]]></trigger>
589    
590    <trigger name="commitTrigger" type="NAMED">    <trigger name="commitTrigger" type="NAMED">
591          import hack
592       ownDocumentBlock.numberEntry = str(ownPosDocumentBlock.documentNumberEntry)    
593       #cargo pos    ownDocumentBlock.numberEntry = str(ownPosDocumentBlock.documentNumberEntry)
594       ownDocumentBlock.ownPosEntityIdEntry =   str(ownPosBlock.ownPosEntityIdEntry)    #cargo pos
595       #/cargo pos    ownDocumentBlock.ownPosEntityIdEntry =   str(ownPosBlock.ownPosEntityIdEntry)
596       ownDocumentBlock.dateEntry = str(tmpBlock.tmpDateEntry )    #/cargo pos
597       if len(ownDocumentBlock.dateEntry) == 0:    ownDocumentBlock.dateEntry = str(tmpBlock.tmpDateEntry )
598           ownDocumentBlock.dateEntry = ownDocumentDataSource.getTimeStamp()    if len(ownDocumentBlock.dateEntry) == 0:
599          ownDocumentBlock.dateEntry = ownDocumentDataSource.getTimeStamp()
600       proceedingBlock.clear()  
601       proceedingBlock.idEntry.autofillBySequence('proceeding_id_seq')    proceedingBlock.clear()
602       proceedingBlock.dateEntry = proceedingDataSource.getTimeStamp()    proceedingBlock.idEntry.autofillBySequence('proceeding_id_seq')
603      proceedingBlock.dateEntry = proceedingDataSource.getTimeStamp()
604       ownDocumentBlock.idEntry.autofillBySequence('own_document_id_seq')  
605      ownDocumentBlock.idEntry.autofillBySequence('own_document_id_seq')
606       ownDocumentProceedingBlock.clear()  
607       ownDocumentProceedingBlock.proceedingEntry = str(proceedingBlock.idEntry)    ownDocumentProceedingBlock.clear()
608       ownDocumentProceedingBlock.ownDocumentEntry = str(ownDocumentBlock.idEntry)    ownDocumentProceedingBlock.proceedingEntry = str(proceedingBlock.idEntry)
609       ownDocumentProceedingBlock.amountEntry = str(payBlock.cashEntry)    ownDocumentProceedingBlock.ownDocumentEntry = str(ownDocumentBlock.idEntry)
610      ownDocumentProceedingBlock.amountEntry = str(payBlock.cashEntry)
611       currencyMovementBlock.clear()  
612       currencyMovementBlock.proceedingEntry = str(proceedingBlock.idEntry)    rc = currencyTypeBlock.getRecordCount()
613       currencyMovementBlock.movementTypeEntry = "" # Revisar com queda esto    for recNum in range(rc):
614       currencyMovementBlock.currencyTypeEntry = "1"        currencyTypeBlock.jumpRecord(recNum)
615       currencyMovementBlock.amountEntry = str(payBlock.cashEntry)        if hack.a2f(currencyTypeBlock.currencyBox.payEntry) > 0:
616              if not currencyMovementBlock.getCurrentRecord().isEmpty():
617       from gnue.common.GDataObjects import ConnectionError as DBError                currencyMovementBlock.newRecord()
618       try:            currencyMovementBlock.proceedingEntry = str(proceedingBlock.idEntry)
619         postChangeAdvance = 0            currencyMovementBlock.movementTypeEntry = "" # Revisar com queda esto
620         ownDocumentBlock.postChanges()            currencyMovementBlock.currencyTypeEntry = str(currencyTypeBlock.currencyBox.idEntry)
621         postChangeAdvance = 1            currencyMovementBlock.amountEntry = str(hack.a2f(currencyTypeBlock.currencyBox.payEntry) * hack.a2f(currencyTypeBlock.currencyBox.rateEntry))
622         ownPosDocumentBlock.documentNumberEntry.postAtomicModify (lambda x: int(x)+1)  
623         postChangeAdvance = 2    # Antes de Multimoneda
624         proceedingBlock.postChanges()    #currencyMovementBlock.clear()
625         postChangeAdvance = 3    #currencyMovementBlock.proceedingEntry = str(proceedingBlock.idEntry)
626         ownDocumentProceedingBlock.postChanges()    #currencyMovementBlock.movementTypeEntry = "" # Revisar com queda esto
627         postChangeAdvance = 4    #currencyMovementBlock.currencyTypeEntry = "1"
628         currencyMovementBlock.postChanges()    #currencyMovementBlock.amountEntry = str(payBlock.cashEntry)
629         postChangeAdvance = 5  
630         lOwnDocId = str(ownDocumentBlock.idEntry)    from gnue.common.GDataObjects import ConnectionError as DBError
631         #if stock by invoice    try:
632         if  str(ownPosBlock.stockByInvoice) == "1":        postChangeAdvance = 0
633           ownItemToUpdBlock.initQuery()        ownDocumentBlock.postChanges()
634           ownItemToUpdBlock.ownDocumentEntry = lOwnDocId        postChangeAdvance = 1
635           ownItemToUpdBlock.processQuery()        ownPosDocumentBlock.documentNumberEntry.postAtomicModify (lambda x: int(x)+1)
636           lRecordCount = ownItemToUpdBlock.getRecordCount()        postChangeAdvance = 2
637           for recNum in range(lRecordCount):        proceedingBlock.postChanges()
638              ownItemToUpdBlock.jumpRecord(recNum)        postChangeAdvance = 3
639              ownItemToUpdBlock.levelEntry.postAtomicModify(lambda x:x-round(float(str(ownItemToUpdBlock.qtyEntry)),4))        ownDocumentProceedingBlock.postChanges()
640           ownItemToUpdBlock.clear()        postChangeAdvance = 4
641           #/if stock by invoice        currencyMovementBlock.postChanges()
642         commitConnection()        postChangeAdvance = 5
643       except DBError, err:        lOwnDocId = str(ownDocumentBlock.idEntry)
644         rollbackConnection()        #if stock by invoice
645         message = "Hay problemas para grabar "        if  str(ownPosBlock.stockByInvoice) == "1":
646         if postChangeAdvance == 0:            ownItemToUpdBlock.initQuery()
647           message += "la Factura"            ownItemToUpdBlock.ownDocumentEntry = lOwnDocId
648         elif postChangeAdvance == 1:            ownItemToUpdBlock.processQuery()
649           message += "el número de la Factura"            lRecordCount = ownItemToUpdBlock.getRecordCount()
650         elif postChangeAdvance == 2:            for recNum in range(lRecordCount):
651           message += "el procedimiento General"                ownItemToUpdBlock.jumpRecord(recNum)
652         elif postChangeAdvance == 3:                ownItemToUpdBlock.levelEntry.postAtomicModify(lambda x:x-round(float(str(ownItemToUpdBlock.qtyEntry)),4))
653           message += "el procedimiento de la Factura"            ownItemToUpdBlock.clear()
654         elif postChangeAdvance == 4:            #/if stock by invoice
655           message += "las monedas de pago de la Factura"            commitConnection()
656         elif postChangeAdvance == 5:    except DBError, err:
657           message += "el stock"        rollbackConnection()
658         genericBox(message+"\n"+str(err),['Aceptar'])        message = ["la Factura","el número de la Factura","el procedimiento General",
659                     "el procedimiento de la Factura","las monedas de pago de la Factura",
660                     "el stock" ]
661          genericBox("Hay problemas para grabar "+mesagge[postChangeAdvance]+"\n"+str(err),['Aceptar'])
662          
663      setFocus(ownItemBlock.prodCodeSEntry)
664                
665    </trigger>    </trigger>
666    
# Line 661  Line 672 
672    tmpBlock.tmpDateEntry = ownDocumentDataSource.getTimeStamp()    tmpBlock.tmpDateEntry = ownDocumentDataSource.getTimeStamp()
673    #setFocus(ownDocumentBlock.clientCodeEntry)    #setFocus(ownDocumentBlock.clientCodeEntry)
674    </trigger>    </trigger>
675    
676    <trigger name="startUp" type="On-Startup">    <trigger name="startUp" type="On-Startup">
677    tmpValuesDataSource.priceTypeId = None    tmpValuesDataSource.priceTypeId = None
678    tmpValuesDataSource.onSwitch = "0"    tmpValuesDataSource.onSwitch = "0"
# Line 730  Line 742 
742      payBlock.ctaCteEntry = "0.0"      payBlock.ctaCteEntry = "0.0"
743    </trigger>    </trigger>
744    
745      <trigger type="NAMED" name="currencyWorkTrigger"><![CDATA[
746    import hack
747    
748    if hack.a2f(payBlock.cashEntry) > 0:
749        currencyTypeBlock.clear()
750        currencyDataBlock.clear()
751    
752        rs = currencyTypeDataSource.createResultSet()
753        client = 0
754        more = rs.firstRecord()
755        while more:
756            if not currencyTypeBlock.getCurrentRecord().isEmpty():
757                currencyTypeBlock.newRecord()
758            currencyTypeBlock.currencyBox.idEntry = rs.current.getField("_table")
759            currencyTypeBlock.currencyBox.nameEntry = rs.current.getField("name")
760            currencyTypeBlock.currencyBox.rateEntry = hack.a2f(rs.current.getField("rate"))
761            monto = hack.a2f(payBlock.cashEntry) / hack.a2f(rs.current.getField("rate"))
762            currencyTypeBlock.currencyBox.formatEntry = rs.current.getField("format")
763            currencyTypeBlock.currencyBox.amountEntry = str(currencyTypeBlock.currencyBox.formatEntry) % monto
764            currencyTypeBlock.currencyBox.payEntry = 0.0
765            more = rs.nextRecord()
766    
767        currencyDataBlock.recipientBox.dateEntry = str(tmpBlock.tmpDateEntry)
768        currencyDataBlock.recipientBox.numberEntry = str(ownPosDocumentBlock.documentNumberEntry)
769        
770        currencyDataBlock.clientRecipientBox.clientCodeEntry = str(ownDocumentBlock.clientRecipientBox.clientCodeEntry)
771        currencyDataBlock.clientRecipientBox.clientNameEntry = str(ownDocumentBlock.clientRecipientBox.clientNameEntry)
772        
773        currencyDataBlock.clientRecipientBox.totalEntry = str(payBlock.cashEntry)
774        
775        ]]></trigger>
776    
777      <trigger type="NAMED" name="currencyTypeTrigger"><![CDATA[
778    
779    import hack
780        
781    total = hack.a2f(payBlock.cashEntry)
782    rc = currencyTypeBlock.getRecordCount()
783    for recNum in range(rc):
784        currencyTypeBlock.jumpRecord(recNum)
785        if hack.a2f(currencyTypeBlock.currencyBox.payEntry) > 0:
786            total -= hack.a2f(currencyTypeBlock.currencyBox.payEntry) * hack.a2f(currencyTypeBlock.currencyBox.rateEntry)
787    
788    rc = currencyTypeBlock.getRecordCount()
789    for recNum in range(rc):
790        currencyTypeBlock.jumpRecord(recNum)
791        if hack.a2f(currencyTypeBlock.currencyBox.rateEntry) > 0:
792            monto = total / hack.a2f(currencyTypeBlock.currencyBox.rateEntry)
793            currencyTypeBlock.currencyBox.amountEntry = str(currencyTypeBlock.currencyBox.formatEntry) % monto
794        
795            ]]></trigger>
796    
797      <trigger type="NAMED" name="endTypeCurrencyTrigger">
798        <![CDATA[
799    
800    import hack
801        
802    callTrigger('currencyTypeTrigger')
803    
804    total = hack.a2f(payBlock.cashEntry)
805    rc = currencyTypeBlock.getRecordCount()
806    for recNum in range(rc):
807        currencyTypeBlock.jumpRecord(recNum)
808        if hack.a2f(currencyTypeBlock.currencyBox.rateEntry) > 0:
809            total -= hack.a2f(currencyTypeBlock.currencyBox.payEntry) * hack.a2f(currencyTypeBlock.currencyBox.rateEntry)
810    
811    if total > 0:
812        genericBox("El los montos no completan el total del documento\n",['Aceptar'])
813    else:
814        callTrigger('startWaitingModeTrigger')
815        callTrigger ('commitTrigger')
816        # it's _such_ a pitty
817        # pleasePrint ('serviceInvoice', { 'id': str(ownDocumentBlock.idEntry) })
818        report='productInvoice-%s' % str(ownDocumentBlock.typeEntry)
819        hack.pleasePrint (self, str(ownDocumentBlock.typeEntry), report, [ 'id='+str(ownDocumentBlock.idEntry) ],str(ownPosDocumentBlock.documentPrintCommand))
820        callTrigger('rollbackTrigger')
821        callTrigger('endWaitingModeTrigger')
822        
823          ]]>
824      </trigger>
825    
826      <trigger type="NAMED" name="cancelCurrencyTrigger"><![CDATA[
827    
828        setFocus(ownItemBlock.prodCodeSEntry)
829    
830        ]]></trigger>
831    
832    <page name="Factura a Clientes">    <page name="Factura a Clientes">
833      <box height="9" label="Factura de Productos a Clientes"      <box height="9" label="Factura de Productos a Clientes"
# Line 1181  Line 1279 
1279                for pricetype in priceListsChain:                for pricetype in priceListsChain:
1280                    if pricetype == ("%s" %tmpProdResultBlock.prodPriceTypeIdEntry):                    if pricetype == ("%s" %tmpProdResultBlock.prodPriceTypeIdEntry):
1281                        if len(str(prodResultBlock.prodNameEntry)):                        if len(str(prodResultBlock.prodNameEntry)):
1282                          prodResultBlock.newRecord()                            prodResultBlock.newRecord()
1283                        prodResultBlock.prodNameEntry= ("%s" %tmpProdResultBlock.prodNameEntry)                        prodResultBlock.prodNameEntry= ("%s" %tmpProdResultBlock.prodNameEntry)
1284                        prodResultBlock.prodCodeEntry= ("%s" %tmpProdResultBlock.prodCodeEntry)                        prodResultBlock.prodCodeEntry= ("%s" %tmpProdResultBlock.prodCodeEntry)
1285                        prodResultBlock.prodPriceTypeEntry=  ("%s" %tmpProdResultBlock.prodPriceTypeEntry)                        prodResultBlock.prodPriceTypeEntry=  ("%s" %tmpProdResultBlock.prodPriceTypeEntry)
# Line 1304  Line 1402 
1402          <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"/>
1403          <scrollbar page="5" x="103" y="11" width="1" height="10"/>          <scrollbar page="5" x="103" y="11" width="1" height="10"/>
1404        </block>        </block>
1405      <!--     Bloques que sirven para el pago -->  
1406      <block name="ownDocumentProceedingBlock" datasource="ownDocumentProceedingDataSource" transparentBlock="">      <block name="ownDocumentProceedingBlock" datasource="ownDocumentProceedingDataSource" transparentBlock="">
1407          <entry name="proceedingEntry" field="proceeding" hidden="" x="1" y="1" width="12"/>          <entry name="proceedingEntry" field="proceeding" hidden="" x="1" y="1" width="12"/>
1408          <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"/>
# Line 1345  Line 1443 
1443          <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"/>
1444          <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"/>
1445          <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"/>
1446        </block>  
1447  <!--     </box> -->        <!--     Estos 2 botones estaba antes en el box cobro de facura  -->
1448      <box height="4" label="Cobro de la factura" name="payBox"          <button name="printButton" label="Doc. Terminado" trigger="invoiceOkTrigger"
1449        width="82" x="0" y="23">            x="1" y="22" width="16" height="1"/>
1450        <block datasource="payDataSource" name="payBlock">          <button x="18" y="22" trigger="rollbackTrigger" width="18" label="Cancelar"
       <label text="Efectivo : " x="1" y="1"/>  
       <entry name="cashEntry" typecast="number" displaymask="%0.2f" default="0.00"  
         x="11" y="1" width="12">  
         <trigger name="cashEntryPreFocusout" type="Pre-Focusout">  
            import hack  
            payBlock.ctaCteEntry = str(hack.a2f(totalBlock.totalEntry) - hack.a2f(payBlock.cashEntry))  
         </trigger>  
       </entry>  
       <label text="Cta. Cte. : " x="24" y="1"/>  
       <entry name="ctaCteEntry" typecast="number" displaymask="%0.2f" default="0.00"  
         x="36" y="1" width="12">  
         <trigger name="ctaCteEntryPreFocusOut" type="Pre-Focusout">  
            import hack  
            payBlock.cashEntry = str(hack.a2f(totalBlock.totalEntry) - hack.a2f(payBlock.ctaCteEntry))  
         </trigger>  
       </entry>  
         <button name="printButton" label="Imprimir" trigger="printTrigger"  
           x="50" y="1" width="14" height="1"/>  
         <button x="65" y="1" trigger="rollbackTrigger" width="14" label="Cancelar"  
1451            name="rollbackBtn" height="1"/>            name="rollbackBtn" height="1"/>
1452          <!--     Estos 2 botones estaba antes en el box cobro de facura  -->
1453    
1454        </block>        </block>
1455      </box>  
1456    <block name="ownOrganizationBlock" datasource="ownOrganizationDataSource">      <block name="ownOrganizationBlock" datasource="ownOrganizationDataSource">
1457      <entry name="condIVAEntry" field="_tax_profile_data._table" hidden="" x="1" y="1" width="10"/>        <entry name="condIVAEntry" field="_tax_profile_data._table" hidden="" x="1" y="1" width="10"/>
1458    </block>      </block>
1459      </page>
1460      <page name="Determinacion de Monedas">
1461        <block name="currencyDataBlock" datasource="dataCurrencyDataSource">
1462          <box height="4" label="Factura de Productos a Clientes"
1463              name="recipientBox" width="105" x="0" y="0">
1464            <label  text="Fecha:" x="1" y="1" />
1465            <label  text="Tipo:" x="25" y="1"/>
1466            <label  text="Número:" x="35" y="1"/>
1467            <entry name="dateEntry" style="label" typecast="date" width="14" x="8" y="1"/>
1468            <entry name="typeEntry" style="label"  width="1" x="32" y="1"/>
1469            <entry name="numberEntry" style="label" typecast="number" width="14" x="43" y="1"/>
1470          </box>
1471          <box height="5" label="Datos del Cliente" name="clientRecipientBox" width="105" x="0" y="3">
1472            <label name="codeLbl" text="Codigo" x="1" y="1"/>
1473            <label name="nameLbl" text="Nombre" x="21" y="1"/>
1474            <entry x="1" y="2" name="clientCodeEntry" style="label" width="20"/>
1475            <entry x="21" y="2" name="clientNameEntry" style="label" width="35"/>
1476            <label name="totalLbl" text="Total a Pagar:" x="26" y="3"/>
1477            <entry name="totalEntry" field="total" x="41" y="3" width="10" style="label"
1478              typecast="number" displaymask="%10.2f"/>
1479          </box>
1480        </block>
1481        <block name="currencyTypeBlock" datasource="tmpCurrencyDataSource">
1482          <box label="Monedas de Pago" name="currencyBox"
1483            height="13" width="105" x="0" y="10">
1484    
1485            <label name="nameLbl" text="Moneda" x="1" y="1"/>
1486            <label name="rateLbl" text="Cotización" x="10" y="1"/>
1487            <label name="montoLbl" text="Monto" x="21" y="1"/>
1488            <label name="pagoLbl" text="Pago" x="31" y="1"/>
1489    
1490            <entry name="idEntry" field="id" rows="6" x="1" y="1" hidden=""/>
1491            <entry name="formatEntry" field="format" rows="6" x="1" y="1" hidden=""/>
1492            <entry name="nameEntry" field="name" style="label" rows="6"
1493              x="1" y="2" width="6" readonly=""/>
1494            <entry name="rateEntry" field="rate" style="label" rows="6" typecast="number"
1495              displaymask="%4.2f" x="10" y="2" width="10" readonly=""/>
1496            <entry name="amountEntry" field="amount" style="label" rows="6"
1497              x="21" y="2" width="20" readonly=""/>
1498            <entry name="payEntry" field="pay" rows="6" x="38" y="2" width="20"
1499              typecast="number" displaymask="%10.2f">
1500              <trigger type="PRE-FOCUSOUT" src="currencyTypeTrigger"/>
1501            </entry>
1502            <scrollbar page="2" x="68" y="2" width="1" height="6"/>
1503            <button name="acceptButton" trigger="endTypeCurrencyTrigger" label="Aceptar"
1504              width="10" height="1" x="10" y="10"/>
1505            <button name="cancelButton" trigger="cancelCurrencyTrigger" label="Cancelar"
1506              width="10" height="1" x="20" y="10"/>
1507          </box>
1508          <box height="4" label="Cobro de la factura" name="payBox"
1509            width="105" x="0" y="7">
1510            <block datasource="payDataSource" name="payBlock">
1511              <label text="Efectivo : " x="1" y="1"/>
1512              <entry name="cashEntry" typecast="number" displaymask="%0.2f" default="0.00"
1513                x="11" y="1" width="12">
1514                <trigger name="cashEntryPreFocusout" type="Pre-Focusout">
1515                import hack
1516                payBlock.ctaCteEntry = str(hack.a2f(totalBlock.totalEntry) - hack.a2f(payBlock.cashEntry))
1517                </trigger>
1518                <options>
1519                  <option name="tip" value="Importe al Contado"/>
1520                </options>
1521              </entry>
1522              <label text="Cta. Cte. : " x="24" y="1"/>
1523              <entry name="ctaCteEntry" typecast="number" displaymask="%0.2f" default="0.00"
1524                x="36" y="1" width="12">
1525                <trigger name="ctaCteEntryPreFocusOut" type="Pre-Focusout">
1526                import hack
1527                payBlock.cashEntry = str(hack.a2f(totalBlock.totalEntry) - hack.a2f(payBlock.ctaCteEntry))
1528                </trigger>
1529                <options>
1530                  <option name="tip" value="Importe en Cuenta corriente"/>
1531                </options>
1532              </entry>
1533            </block>
1534          </box>
1535        </block>
1536    </page>    </page>
1537    
1538  </form>  </form>

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