/[papo]/papo/forms/serviceInvoice.gfd
ViewVC logotype

Diff of /papo/forms/serviceInvoice.gfd

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

revision 1.7 by charlie, Fri Nov 29 20:50:34 2002 UTC revision 1.8 by styxman, Mon Dec 2 21:33:25 2002 UTC
# Line 113  Line 113 
113          </eq>          </eq>
114          <eq>          <eq>
115            <cfield name="own_document.own_document_type"/>            <cfield name="own_document.own_document_type"/>
116            <cconst value="1"/>            <cconst value="1"/>
117          </eq>          </eq>
118       </and>       </and>
119      </condition>      </condition>
# Line 257  Line 257 
257    ]]></trigger>    ]]></trigger>
258        
259    <!-- buttons triggers -->    <!-- buttons triggers -->
260      <trigger name="printTrigger" type="NAMED"><![CDATA[
261        from os import system
262        from tempfile import mktemp
263        
264        callTrigger ('commitTrigger')
265        fileName= mktemp (".html")
266        print fileName
267        print "exec'ing grcvs -D file --filter html -d "+fileName+" ../report/serviceInvoice.grd id="+str(ownDocumentBlock.idEntry)
268        system ("grcvs -D file --filter html -d "+fileName+" ../report/serviceInvoice.grd id="+str(ownDocumentBlock.idEntry))
269        system ("galeon "+fileName)
270        callTrigger('rollbackTrigger')
271      ]]></trigger>
272    
273    <trigger name="quitTrigger" type="NAMED"><![CDATA[    <trigger name="quitTrigger" type="NAMED"><![CDATA[
274      callTrigger ('rollbackTrigger')      callTrigger ('rollbackTrigger')
275      ownDocumentBlock.processRollback ()      ownDocumentBlock.processRollback ()
# Line 280  Line 293 
293      # copy the date      # copy the date
294      ownDocumentBlock.dateEntry= dateBlock.dateEntry      ownDocumentBlock.dateEntry= dateBlock.dateEntry
295            
     # print "here 1!"  
296      currentCredit= a2f (calculatedValuesDataSource.creditLimitAmount) - \      currentCredit= a2f (calculatedValuesDataSource.creditLimitAmount) - \
297        a2f (ownDocumentBlock.clientRecipientBox.debtEntry)        a2f (ownDocumentBlock.clientRecipientBox.debtEntry)
298    
299      if a2f (paymentBlock.ctaCteEntry)>currentCredit:      if a2f (paymentBlock.ctaCteEntry)>currentCredit:
300        genericBox ("Está excedido el Límite de Crédito",["Ok"])        genericBox ("Está excedido el Límite de Crédito",["Ok"])
301      else:      else:
       # print "here 2!"  
302        if ownItemBlock.getRecordCount ()>0 and len (ownItemBlock.serviceEntry)>0:        if ownItemBlock.getRecordCount ()>0 and len (ownItemBlock.serviceEntry)>0:
         # print "here 3!"  
303          # el form no esta vacio          # el form no esta vacio
304          if len(ownDocumentBlock.dateEntry)==0:          if len(ownDocumentBlock.dateEntry)==0:
305            ownDocumentBlock.dateEntry= ownDocumentDataSource.getTimeStamp ()            ownDocumentBlock.dateEntry= ownDocumentDataSource.getTimeStamp ()
# Line 324  Line 334 
334    
335          setFocus(ownDocumentBlock.clientRecipientBox.clientEntry)          setFocus(ownDocumentBlock.clientRecipientBox.clientEntry)
336    
337        # print "here 4!"        # this is enough
338        callTrigger('rollbackTrigger')        # and more modularized
       ownDocumentBlock.newRecord ()  
       ownDocumentBlock.dateEntry= ownDocumentDataSource.getTimeStamp()  
       totalBlock.totalEntry= ""  
       paymentBlock.cashEntry= ""  
       paymentBlock.ctaCteEntry= ""  
339    ]]></trigger>    ]]></trigger>
340    
341      <trigger name="commitAndRollBackTrigger" type="NAMED"><![CDATA[
342        callTrigger ('commitTrigger')
343        callTrigger ('rollbackTrigger')
344      ]]></trigger>
345      
346    <!-- the form -->    <!-- the form -->
347    <page name="Factura de Servicios">    <page name="Factura de Servicios">
348      <box name="invoiceHeaderBox" label="Factura de servicios"      <box name="invoiceHeaderBox" label="Factura de servicios"
# Line 521  Line 531 
531          </box>          </box>
532                    
533          <!-- buttons -->          <!-- buttons -->
534          <button name="commitButton" label="Aceptar" trigger="commitTrigger"          <button name="commitButton" label="Aceptar" trigger="commitAndRollBackTrigger"
535            x="65" y="1" width="14" height="1"/>            x="65" y="1" width="14" height="1"/>
536          <button name="rollbackButton" label="Deshacer" trigger="rollbackTrigger"          <button name="rollbackButton" label="Deshacer" trigger="rollbackTrigger"
537            x="65" y="2" width="14" height="1"/>            x="65" y="2" width="14" height="1"/>
538            <button name="printButton" label="Imprimir" trigger="printTrigger"
539              x="65" y="3" width="14" height="1"/>
540          <!-- button name="quitButton" label="Salir" trigger="quitTrigger"          <!-- button name="quitButton" label="Salir" trigger="quitTrigger"
541            x="65" y="5" width="14" height="1"/ -->            x="65" y="5" width="14" height="1"/ -->
542        </block>        </block>

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

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