/[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.28 by apronotti, Wed Dec 11 22:14:43 2002 UTC revision 1.29 by apronotti, Wed Dec 18 19:35:57 2002 UTC
# Line 182  Line 182 
182    <datasource database="papo" name="ownDocumentDataSource" table="own_document"    <datasource database="papo" name="ownDocumentDataSource" table="own_document"
183      order_by="date" />      order_by="date" />
184    
185      <!-- Origen de datos que contiene el numero de la proxima factura -->
186      <datasource name="branchDocumentDataSource" database="papo"
187        table="branch_document, _branch_document_data" historytable="_branch_document_data" prequery="">
188        <condition>
189          <and>
190            <eq>
191              <cfield name="branch_document.id"/>
192              <cfield name="_branch_document_data._table"/>
193            </eq>
194            <!-- numero para las facturas de servicios -->
195            <eq>
196              <cfield name="_branch_document_data.document_type"/>
197              <cconst value="4"/>
198            </eq>
199            <!-- que este activo -->
200            <null>
201              <cfield name="_branch_document_data._end_t"/>
202            </null>
203          </and>
204        </condition>
205      </datasource>
206    
207  <!--   Origen de datos que sirve para consultar el limite de crédito -->  <!--   Origen de datos que sirve para consultar el limite de crédito -->
208  <!--   asignado al cliente que se le factura -->  <!--   asignado al cliente que se le factura -->
209    
# Line 312  Line 334 
334        genericBox("Esta excedido el Límite de Crédito",["Ok"])        genericBox("Esta excedido el Límite de Crédito",["Ok"])
335    else:    else:
336        if ownItemBlock.getRecordCount() > 0 and len(ownItemBlock.productCNameEntry) > 0:        if ownItemBlock.getRecordCount() > 0 and len(ownItemBlock.productCNameEntry) > 0:
337    
338              ownDocumentBlock.numberEntry= str(branchDocumentBlock.documentNumberEntry)
339              branchDocumentBlock.documentNumberEntry.atomicModify (lambda x: int(x)+1)
340    
341            ownDocumentBlock.dateEntry = str(tmpBlock.tmpDateEntry )            ownDocumentBlock.dateEntry = str(tmpBlock.tmpDateEntry )
342            if len(ownDocumentBlock.dateEntry) == 0:            if len(ownDocumentBlock.dateEntry) == 0:
343                ownDocumentBlock.dateEntry = ownDocumentDataSource.getTimeStamp()                ownDocumentBlock.dateEntry = ownDocumentDataSource.getTimeStamp()
# Line 348  Line 374 
374    
375            setFocus(ownDocumentBlock.clientRecipientBox.clientEntry)            setFocus(ownDocumentBlock.clientRecipientBox.clientEntry)
376    
       callTrigger('rollbackTrigger')  
       ownDocumentBlock.newRecord()  
       tmpBlock.tmpDateEntry = ownDocumentDataSource.getTimeStamp()  
       totalBlock.netoEntry = ""  
       totalBlock.ivaEntry = ""  
       totalBlock.totalEntry = ""  
       payBlock.cashEntry = ""  
       payBlock.ctaCteEntry = ""  
377    </trigger>    </trigger>
378    
379    <trigger name="rollbackTrigger" type="NAMED">    <trigger name="rollbackTrigger" type="NAMED">
380    proceedingBlock.processRollback()    for block in form._object._blockList:
381    ownDocumentBlock.processRollback()      block.processRollback ()
382    priceTypeBlock.processRollback()  
383    tmpProdResultBlock.processRollback()    ownDocumentBlock.newRecord()
384    prodSearchBlock.processRollback()    branchDocumentBlock.initQuery()
385    prodResultBlock.processRollback()    branchDocumentBlock.processQuery()
386    ownItemBlock.processRollback()  
387    ownDocumentProceedingBlock.processRollback()    
   currencyMovementBlock.processRollback()  
   totalBlock.processRollback()  
   ownItemToUpdBlock.processRollback()  
   creditLimit1Block.processRollback()  
   payBlock.processRollback()  
388    tmpBlock.tmpDateEntry = ownDocumentDataSource.getTimeStamp()    tmpBlock.tmpDateEntry = ownDocumentDataSource.getTimeStamp()
389    totalBlock.netoEntry = ""    totalBlock.netoEntry = ""
390    totalBlock.ivaEntry = ""    totalBlock.ivaEntry = ""
# Line 435  Line 448 
448          <entry field="id" hidden="" name="idEntry" x="1" y="1"/>          <entry field="id" hidden="" name="idEntry" x="1" y="1"/>
449          <entry field="own_document_type" hidden="" name="typeEntry" x="1" y="1"/>          <entry field="own_document_type" hidden="" name="typeEntry" x="1" y="1"/>
450          <box height="6" label="Datos del Cliente"          <box height="6" label="Datos del Cliente"
451           name="clientRecipientBox" width="65" x="0" y="1">           name="clientRecipientBox" width="65" x="0" y="2">
452    
453          <label name="clientLbl" text="Cliente" x="1" y="1" />          <label name="clientLbl" text="Cliente" x="1" y="1" />
454    
# Line 636  Line 649 
649  <!--         <button x="65" y="7" trigger="quitTrigger" width="14" label="Salir" -->  <!--         <button x="65" y="7" trigger="quitTrigger" width="14" label="Salir" -->
650  <!--           name="quitBtn" height="1"/> -->  <!--           name="quitBtn" height="1"/> -->
651        </block>        </block>
652    
653        <block name="tmpBlock" datasource="tmpValuesDataSource" transparentBlock="">        <block name="tmpBlock" datasource="tmpValuesDataSource" transparentBlock="">
654          <label name="dateLbl" rows="1" text="Fecha" x="1" y="7" />          <label name="dateLbl" rows="1" text="Fecha" x="1" y="8" />
655          <entry name="tmpDateEntry" style="label" typecast="date"          <entry name="tmpDateEntry" style="label" typecast="date"
656            rows="1" width="24" x="7" y="7"/>            rows="1" width="24" x="7" y="8"/>
657          </block>
658    
659          <!-- # de factura -->
660          <block name="branchDocumentBlock" datasource="branchDocumentDataSource">
661            <label name="dateLabel" text="Número de Factura:"
662              x="32" y="1"/>
663            <entry name="documentNumberEntry" field="_branch_document_data.number" style="label"
664              x="55" y="1" width="15"/>
665            <entry name="documentTypeEntry" field="_branch_document_data.document_type" hidden=""
666              x="50" y="1" width="15"/>
667            <entry name="branchEntry" field="_branch_document_data.branch" hidden=""
668              x="50" y="1" width="15"/>
669    
670    <!--         <button name="fixInvoiceNoButton" label="Corregir" trigger="fixInvoiceNoTrigger" -->
671    <!--           x="66" y="1" width="10" height="1"/> -->
672        </block>        </block>
673    
674      </box>      </box>
675    
676      <!--     ******************************** -->      <!--     ******************************** -->

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29

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