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

Diff of /papo/forms/proposal.neb

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

revision 1.1 by mhepp, Fri May 9 21:16:41 2003 UTC revision 1.2 by mhepp, Mon May 12 22:03:38 2003 UTC
# Line 175  Line 175 
175      order_by="date" />      order_by="date" />
176    
177    
   <!-- Origen de datos que contiene el numero de la proxima presupuesto -->  
   <datasource name="branchDocumentDataSource" database="papo"  
     table="branch_document, _branch_document_data" historytable="_branch_document_data">  
     <condition>  
       <and>  
         <eq>  
           <cfield name="branch_document.id"/>  
           <cfield name="_branch_document_data._table"/>  
         </eq>  
         <null>  
           <cfield name="_branch_document_data._end_t"/>  
         </null>  
       </and>  
     </condition>  
   </datasource>  
   
178    <!--   Origen de datos que contiene los items del presupuesto -->    <!--   Origen de datos que contiene los items del presupuesto -->
179    
180     <datasource  name="ownItemDataSource" database="papo" detaillink="own_item.own_document"       <datasource  name="ownItemDataSource" database="papo" detaillink="own_item.own_document"  
# Line 222  Line 206 
206      runForm('product.gfd')      runForm('product.gfd')
207    ]]></trigger>    ]]></trigger>
208    
   <trigger name="searchNextProposalNumber" type="NAMED"><![CDATA[  
     import gnue.common.GConditions as GConditions  
       
     condProposalNumber = GConditions.GCondition()  
   
     tmpAnd = GConditions.GCand(condProposalNumber)  
     eq = GConditions.GCeq(tmpAnd)  
     GConditions.GCField(eq,"_branch_document_data.document_type")  
     GConditions.GCConst(eq,str(ownDocumentBlock.typeEntry))  
       
     branchDocumentDataSource.createResultSet(condProposalNumber)  
   
   ]]></trigger>  
209    
210    <trigger name="startWaitingModeTrigger" type="NAMED"><![CDATA[    <trigger name="startWaitingModeTrigger" type="NAMED"><![CDATA[
211      setStatusText("Procesando ...")      setStatusText("Procesando ...")
# Line 267  Line 238 
238      if ownItemBlock.getRecordCount() > 0 and len(ownItemBlock.prodNameSEntry) > 0:      if ownItemBlock.getRecordCount() > 0 and len(ownItemBlock.prodNameSEntry) > 0:
239        callTrigger('startWaitingModeTrigger')        callTrigger('startWaitingModeTrigger')
240        callTrigger ('commitTrigger')        callTrigger ('commitTrigger')
241        hack.pleasePrint (self, 'p1', '1', 'productProposal', [ 'id='+str(ownDocumentBlock.idEntry) ],branchDocumentBlock.documentPrintCommand)        #hack.pleasePrint (self, 'p1', '1', 'productProposal', ['id='+str(ownDocumentBlock.idEntry) ],str(ownPosDocumentBlock.documentPrintCommand))
242          hack.pleasePrint (self, '1', 'productProposal', [ 'id='+str(ownDocumentBlock.idEntry) ],str(ownPosDocumentBlock.documentPrintCommand))
243        callTrigger('rollbackTrigger')        callTrigger('rollbackTrigger')
244        callTrigger('endWaitingModeTrigger')                callTrigger('endWaitingModeTrigger')        
245    ]]></trigger>    ]]></trigger>
246        
247    <trigger name="commitTrigger" type="NAMED">    <trigger name="commitTrigger" type="NAMED">
248    
249       ownDocumentBlock.numberEntry= str(branchDocumentBlock.documentNumberEntry)       ownDocumentBlock.numberEntry= str(ownPosDocumentBlock.documentNumberEntry)
250       branchDocumentBlock.documentNumberEntry.atomicModify (lambda x: int(x)+1)       ownPosDocumentBlock.documentNumberEntry.atomicModify (lambda x: int(x)+1)
251    
252       ownDocumentBlock.dateEntry = str(tmpBlock.tmpDateEntry )       ownDocumentBlock.dateEntry = str(tmpBlock.tmpDateEntry )
253       if len(ownDocumentBlock.dateEntry) == 0:       if len(ownDocumentBlock.dateEntry) == 0:
# Line 473  Line 445 
445        <!-- Fecha del presupuesto -->        <!-- Fecha del presupuesto -->
446        <block name="tmpBlock" datasource="tmpValuesDataSource" transparentBlock="">        <block name="tmpBlock" datasource="tmpValuesDataSource" transparentBlock="">
447          <label name="dateLbl" text="Fecha" x="1" y="1" />          <label name="dateLbl" text="Fecha" x="1" y="1" />
448            <label name="dateLabel" text="Número de Presupuesto:" x="32" y="1"/>
449          <entry name="tmpDateEntry" typecast="date"          <entry name="tmpDateEntry" typecast="date"
450            width="14" x="7" y="1"/>            width="14" x="7" y="1"/>
451        </block>        </block>
452    
453        <!-- # del presupuesto -->        <!-- # del presupuesto -->
454        <block name="branchDocumentBlock" datasource="branchDocumentDataSource">        <neb:Sub neb:src="posDocument.nebc" documentType="ownDocumentBlock.typeEntry"
455          <label name="dateLabel" text="Número de Presupuesto:"          ownPosDocumentBlock="ownPosDocumentBlock " documentNumberEntry="documentNumberEntry"
456            x="32" y="1"/>          documentNumberEntryX="55" documentNumberEntryY="1"
457          <entry name="documentNumberEntry" field="_branch_document_data.number" style="label"          searchNextDocumentNumber="searchNextProposalNumber"  >
458            x="55" y="1" width="15"/>        </neb:Sub>
         <entry name="documentTypeEntry" field="_branch_document_data.document_type" hidden=""  
           x="50" y="1" width="15"/>  
         <entry name="branchEntry" field="_branch_document_data.branch" hidden=""  
           x="50" y="1" width="15"/>  
         <entry name="documentPrintCommand" field="_branch_document_data.print_command" hidden=""  
           x="50" y="1" width="15"/>  
       </block>  
   
459      </box>      </box>
460    
461      <!--     ******************************** -->      <!--     ******************************** -->

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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