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

Diff of /papo/forms/despatchNote.neb

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

revision 1.19 by jlenton, Tue Sep 16 19:01:03 2003 UTC revision 1.20 by mhepp, Fri Nov 14 20:38:29 2003 UTC
# Line 7  Line 7 
7      my $uniqed=0;      my $uniqed=0;
8    </neb:Block>    </neb:Block>
9    <datasource name="tmpValuesDataSource" cache="1"/>    <datasource name="tmpValuesDataSource" cache="1"/>
10      <datasource name="tmpDespatchNoteDataSource" cache="1"/>
11    <datasource name="payDataSource" cache="1"/>    <datasource name="payDataSource" cache="1"/>
12    <datasource name="prodSearchDataSource" cache="1"/>    <datasource name="prodSearchDataSource" cache="1"/>
13    <datasource name="prodResultDataSource" cache="1"/>    <datasource name="prodResultDataSource" cache="1"/>
# Line 211  Line 212 
212      runForm('product.gfd')      runForm('product.gfd')
213    ]]></trigger>    ]]></trigger>
214    
215    
216    <neb:Sub neb:src="wait.nebc"/>    <neb:Sub neb:src="wait.nebc"/>
217    <!-- este trigger recorre los items y genera un reporte para ser impreso -->
218    <!-- mediante ruff -->
219    <trigger name="ruffPrintTrigger" type="NAMED">
220      import hack
221      import printing
222      import sys
223      if "../ruff" not in sys.path:
224        sys.path.append("../ruff")
225      import informe
226      despatch_note = informe.new("ruff/own_document.xml")
227      #encabezado
228      despatch_note.header(fecha=printing.printField(tmpBlock.tmpDateEntry,10))
229      despatch_note.header(entity_code=str(ownDocumentBlock.clientRecipientBox.clientCodeEntry))
230      despatch_note.header(entity_name=str(ownDocumentBlock.clientRecipientBox.clientNameEntry))
231      #x.page_header(entity_category=str(.))
232    
233      #carga de items
234      ownItemBlock.firstRecord()
235      iva_amount= 0.00
236      iva_rni_amount= 0.00
237      for index in range(ownItemBlock.getRecordCount()):  
238          if (index > 0) and ( not ownItemBlock.isEmpty()):
239              ownItemBlock.nextRecord()
240          document_item = { "descriptive": str(ownItemBlock.prodNameSEntry),
241                            "qtty": str(ownItemBlock.qtyEntry),
242                          }
243    
244          print document_item
245          despatch_note.despatch_note.item.add_row(**document_item)
246      tmpDespatchNoteDataSource.printing_despatch_note = despatch_note      
247     </trigger>
248    
249    <trigger name="printTrigger" type="NAMED"><![CDATA[    <trigger name="printTrigger" type="NAMED"><![CDATA[
250        import hack        import hack
251        from gnue.common.GDataObjects import ConnectionError as DBError        from gnue.common.GDataObjects import ConnectionError as DBError
252        import printing        import printing
253          import sys
254          if "../ruff" not in sys.path:
255              sys.path.append("../ruff")
256          import informe
257        #if ownItemBlock.getRecordCount() > 0 and len(ownItemBlock.prodNameSEntry) > 0:        #if ownItemBlock.getRecordCount() > 0 and len(ownItemBlock.prodNameSEntry) > 0:
258        if ownItemBlock.getRecordCount() > 0 :        if ownItemBlock.getRecordCount() > 0 :
259          callTrigger('startWaitingModeTrigger')          callTrigger('startWaitingModeTrigger')
260          try:          try:
261            callTrigger ('commitTrigger')            callTrigger ('commitTrigger')
262              despatch_note = tmpDespatchNoteDataSource.printing_despatch_note
263            report='despatchNote-%s' % str(ownDocumentBlock.typeEntry)            printing.previewPrint([despatch_note.render()],'xless -fn vga')
           hack.pleasePrint (self, str(ownDocumentBlock.typeEntry), report, [ 'id='+str(ownDocumentBlock.idEntry) ],  
             str(ownPosDocumentBlock.documentPrintCommand))  
   
           # lines= []  
           # lines.append (printing.printDate ())  
           # lines.append ()  
   
             
264            callTrigger('endWaitingModeTrigger')            callTrigger('endWaitingModeTrigger')
265            if getParameter ('invoiceid') :            if getParameter ('invoiceid') :
266               exit()               exit()
# Line 714  Line 742 
742    
743      <label name="qtyLbl" text="Cantidad" x="45" y="10"/>      <label name="qtyLbl" text="Cantidad" x="45" y="10"/>
744      <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_item.qty" name="qtyEntry" rows="10" typecast="number" displaymask="%0.3f" width="11" x="45" y="11">
745    <!--     <trigger name="qtyEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" /> -->      <trigger name="qtyEntryPreFocusout" type="PRE-FOCUSOUT" src="ruffPrintTrigger" />
746      </entry>      </entry>
747    
748         <!--  <label name="priceLbl" text="Precio" x="56" y="10"/> -->         <!--  <label name="priceLbl" text="Precio" x="56" y="10"/> -->

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

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