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

Diff of /papo/forms/dailyCash.neb

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

revision 1.7 by jlenton, Tue Sep 16 19:01:03 2003 UTC revision 1.8 by mhepp, Tue Oct 28 17:50:58 2003 UTC
# Line 85  Line 85 
85      <!--  where conditions -->      <!--  where conditions -->
86      <condition>      <condition>
87          <or>          <or>
88            <!-- OWN DOCUMENTS -->
89            <!--  show invoices -->            <!--  show invoices -->
90            <eq>            <eq>
91              <cfield name="own_document.own_document_type"/>              <cfield name="own_document.own_document_type"/>
# Line 98  Line 99 
99              <cfield name="own_document.own_document_type"/>              <cfield name="own_document.own_document_type"/>
100              <cconst value="4"/>              <cconst value="4"/>
101            </eq>            </eq>
102            <!--  show debit Notes -->
103            <eq>
104              <cfield name="own_document.own_document_type"/>
105              <cconst value="30"/>
106            </eq>
107              <eq>
108                <cfield name="own_document.own_document_type"/>
109                <cconst value="31"/>
110              </eq>
111              <eq>
112                <cfield name="own_document.own_document_type"/>
113                <cconst value="32"/>
114              </eq>
115          </or>          </or>
116       </condition>       </condition>
117    </datasource>    </datasource>
# Line 192  Line 206 
206            <cfield name="alien_document.alien_document_type"/>            <cfield name="alien_document.alien_document_type"/>
207            <cconst value="10"/>            <cconst value="10"/>
208          </eq>          </eq>
209            <!--  show invoices -->
210            <eq>
211              <cfield name="alien_document.alien_document_type"/>
212              <cconst value="33"/>
213            </eq>
214            <eq>
215              <cfield name="alien_document.alien_document_type"/>
216              <cconst value="34"/>
217            </eq>
218            <eq>
219              <cfield name="alien_document.alien_document_type"/>
220              <cconst value="35"/>
221            </eq>
222            <!-- show alien taxes-->
223            <eq>
224              <cfield name="alien_document.alien_document_type"/>
225              <cconst value="36"/>
226            </eq>
227          <!-- show credit notes-->          <!-- show credit notes-->
228          <eq>          <eq>
229            <cfield name="alien_document.alien_document_type"/>            <cfield name="alien_document.alien_document_type"/>
# Line 237  Line 269 
269        currencyName[currencyResultSet.current.getField("_table")]=str(currencyResultSet.current.getField("name"))        currencyName[currencyResultSet.current.getField("_table")]=str(currencyResultSet.current.getField("name"))
270        moreCurrency = currencyResultSet.nextRecord()        moreCurrency = currencyResultSet.nextRecord()
271    
272    print currencyName    #print currencyName
273    
274    #condiciones para la busqueda de fecha    #condiciones para la busqueda de fecha
275        
# Line 258  Line 290 
290    ctaCteCancelledAmount = {}        ctaCteCancelledAmount = {}    
291    prevMovement = 0    prevMovement = 0
292        
293    print "comienzo el recorrido"    #print "comienzo el recorrido"
294    while moreMovement:    while moreMovement:
295          print "proceeding:", movementResultSet.current.getField("proceeding.id"),\          #print "proceeding:", movementResultSet.current.getField("proceeding.id"),\
296                "movement:",  movementResultSet.current.getField("movement.id"),\          #      "movement:",  movementResultSet.current.getField("movement.id"),\
297                "doc typ:", movementResultSet.current.getField("own_document.own_document_type"),\          #      "doc typ:", movementResultSet.current.getField("own_document.own_document_type"),\
298                "receipt:", movementResultSet.current.getField("receipt.own_document_type"),\          #      "receipt:", movementResultSet.current.getField("receipt.own_document_type"),\
299                "tipo :", movementResultSet.current.getField("_currency_type_data._table"),\          #      "tipo :", movementResultSet.current.getField("_currency_type_data._table"),\
300                "$ :", movementResultSet.current.getField("movement.amount")          #      "$ :", movementResultSet.current.getField("movement.amount")
301          currency = movementResultSet.current.getField("_currency_type_data._table")          currency = movementResultSet.current.getField("_currency_type_data._table")
302          if movementResultSet.current.getField("movement.id") != prevMovement :          if movementResultSet.current.getField("movement.id") != prevMovement :
303              if  movementResultSet.current.getField("receipt.own_document_type") == 3:                if  movementResultSet.current.getField("receipt.own_document_type") == 3:  
# Line 279  Line 311 
311                  else:                  else:
312                      contadoAmount[currency] = hack.a2f(movementResultSet.current.getField("movement.amount"))                      contadoAmount[currency] = hack.a2f(movementResultSet.current.getField("movement.amount"))
313              #print "total cobros efectivo",contadoAmount,"total cobros ctacte",ctaCteCancelledAmount              #print "total cobros efectivo",contadoAmount,"total cobros ctacte",ctaCteCancelledAmount
314          else :          #else :
315              print "repetido:",prevMovement                  #print "repetido:",prevMovement    
316          prevMovement = movementResultSet.current.getField("movement.id")          prevMovement = movementResultSet.current.getField("movement.id")
317          moreMovement = movementResultSet.nextRecord()          moreMovement = movementResultSet.nextRecord()
318    
# Line 307  Line 339 
339    creditNoteContadoCobradasAmount = {}    creditNoteContadoCobradasAmount = {}
340        
341    while moreMovement:    while moreMovement:
342          print "proceeding:", movementResultSet.current.getField("proceeding.id"),\          #print "proceeding:", movementResultSet.current.getField("proceeding.id"),\
343                "movement:",  movementResultSet.current.getField("movement.id"),\          #      "movement:",  movementResultSet.current.getField("movement.id"),\
344                "doc typ:", movementResultSet.current.getField("alien_document.alien_document_type"),\          #      "doc typ:", movementResultSet.current.getField("alien_document.alien_document_type"),\
345                "pay_order:", movementResultSet.current.getField("pay_order.own_document_type"),\          #      "pay_order:", movementResultSet.current.getField("pay_order.own_document_type"),\
346                "tipo :", movementResultSet.current.getField("_currency_type_data._table"),\          #      "tipo :", movementResultSet.current.getField("_currency_type_data._table"),\
347                "$ :", movementResultSet.current.getField("movement.amount")          #      "$ :", movementResultSet.current.getField("movement.amount")
348          docType = movementResultSet.current.getField("alien_document.alien_document_type")          docType = movementResultSet.current.getField("alien_document.alien_document_type")
349          currency = movementResultSet.current.getField("_currency_type_data._table")          currency = movementResultSet.current.getField("_currency_type_data._table")
350          if movementResultSet.current.getField("movement.id") != prevMovement :          if movementResultSet.current.getField("movement.id") != prevMovement :
# Line 321  Line 353 
353                     ctaCtePayedAmount[currency] += hack.a2f(movementResultSet.current.getField("movement.amount"))                     ctaCtePayedAmount[currency] += hack.a2f(movementResultSet.current.getField("movement.amount"))
354                  else:                  else:
355                     ctaCtePayedAmount[currency] = hack.a2f(movementResultSet.current.getField("movement.amount"))                     ctaCtePayedAmount[currency] = hack.a2f(movementResultSet.current.getField("movement.amount"))
356              elif (docType == 2 )or(docType == 11 )or(docType == 10) :              elif (docType == 2 )or(docType == 11 )or(docType == 10)or(docType == 33 )or(docType == 34 )or(docType == 35)or(docType == 36) :
357                  if contadoPayedAmount.has_key(currency):                  if contadoPayedAmount.has_key(currency):
358                     contadoPayedAmount[currency] += hack.a2f(movementResultSet.current.getField("movement.amount"))                     contadoPayedAmount[currency] += hack.a2f(movementResultSet.current.getField("movement.amount"))
359                  else:                  else:
# Line 333  Line 365 
365                  else:                  else:
366                      creditNoteContadoCobradasAmount[currency] = hack.a2f(movementResultSet.current.getField("movement.amount"))                      creditNoteContadoCobradasAmount[currency] = hack.a2f(movementResultSet.current.getField("movement.amount"))
367                        
368          else :          #else :
369              print "repetido:",prevMovement              #print "repetido:",prevMovement
370          prevMovement = movementResultSet.current.getField("movement.id")            prevMovement = movementResultSet.current.getField("movement.id")  
371          moreMovement = movementResultSet.nextRecord()          moreMovement = movementResultSet.nextRecord()
372    #muestro el total    #muestro el total
373    print "total de movimientos de cobro"    #print "total de movimientos de cobro"
374    print "total cobros efectivo",contadoAmount,"total cobros ctacte",ctaCteCancelledAmount,"notas de credito cobradas", creditNoteContadoCobradasAmount    #print "total cobros efectivo",contadoAmount,"total cobros ctacte",ctaCteCancelledAmount,"notas de credito cobradas", creditNoteContadoCobradasAmount
375    print "total de movimientos de pago"    #print "total de movimientos de pago"
376    print "total pagos efectivo",contadoPayedAmount,"total pagos ctacte",ctaCtePayedAmount    #print "total pagos efectivo",contadoPayedAmount,"total pagos ctacte",ctaCtePayedAmount
377    
378    
379    import time, sys    import time, sys
# Line 406  Line 438 
438          <label name="startDateLbl" text="Fecha : "  x="1" y="1"/>          <label name="startDateLbl" text="Fecha : "  x="1" y="1"/>
439          <entry name="startDateEntry" typecast="date" x="9" y="1"          <entry name="startDateEntry" typecast="date" x="9" y="1"
440           width="12" />           width="12" />
         <!--  <label  text="sucursal :" x="1" y="3"/> -->  
         <!--  <entry  x="9" y="3" name="ownPosIdSearch"  width="25" style="dropdown" -->  
         <!--     foreign_key="ownPosSearchDataSource._entity_data._table" -->  
         <!--     foreign_key_description="_entity_data.name" /> -->  
441          <button name="printButton" trigger="printTrigger" label="Imprimir" width="20" height="1"          <button name="printButton" trigger="printTrigger" label="Imprimir" width="20" height="1"
442            x="2"  y="5"/>            x="2"  y="5"/>
443        </box>        </box>

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