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

Diff of /papo/forms/receipt.neb

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

revision 1.11 by apronotti, Wed May 28 15:12:46 2003 UTC revision 1.12 by charlie, Thu May 29 21:33:37 2003 UTC
# Line 385  proceedingBlock.clear() Line 385  proceedingBlock.clear()
385  currencyMovementBlock.clear()  currencyMovementBlock.clear()
386  ownDocumentProceedingBlock.clear()  ownDocumentProceedingBlock.clear()
387    
 ownDocumentBlock.clientRecipientBox.dateEntry = ownDocumentDataSource.getTimeStamp()  
 ownDocumentBlock.idEntry.autofillBySequence('own_document_id_seq')  
   
   
 proceedingBlock.idEntry.autofillBySequence('proceeding_id_seq')  
 proceedingBlock.dateEntry = proceedingDataSource.getTimeStamp()  
   
 rc = currencyTypeBlock.getRecordCount()  
 for recNum in range(rc):  
     currencyTypeBlock.jumpRecord(recNum)  
     if hack.a2f(currencyTypeBlock.currencyBox.payEntry) > 0:  
         if not currencyMovementBlock.getCurrentRecord().isEmpty():  
             currencyMovementBlock.newRecord()  
         currencyMovementBlock.proceedingEntry = str(proceedingBlock.idEntry)  
         currencyMovementBlock.movementTypeEntry = "" # Revisar com queda esto  
         currencyMovementBlock.currencyTypeEntry = str(currencyTypeBlock.currencyBox.idEntry)  
         currencyMovementBlock.amountEntry = str(hack.a2f(currencyTypeBlock.currencyBox.payEntry) * hack.a2f(currencyTypeBlock.currencyBox.rateEntry))  
   
 ownDocumentProceedingBlock.proceedingEntry = str(proceedingBlock.idEntry)  
 ownDocumentProceedingBlock.ownDocumentEntry = str(ownDocumentBlock.idEntry)  
 ownDocumentProceedingBlock.amountEntry = str(invoiceToPayedBlock.invoiceBox.totalEntry)  
   
388  table = []  table = []
389  line = "\n\nRecibos a Clientes\n\n\n"  line = "\n\nRecibos a Clientes\n\n\n"
390  table.append(line)  table.append(line)
# Line 433  rc = invoiceToPayedBlock.getRecordCount( Line 411  rc = invoiceToPayedBlock.getRecordCount(
411  for recNum in range(rc):  for recNum in range(rc):
412      invoiceToPayedBlock.jumpRecord(recNum)      invoiceToPayedBlock.jumpRecord(recNum)
413      if hack.a2f(invoiceToPayedBlock.invoiceBox.payEntry) > 0:      if hack.a2f(invoiceToPayedBlock.invoiceBox.payEntry) > 0:
         ownDocumentProceedingBlock.proceedingEntry = str(proceedingBlock.idEntry)  
         ownDocumentProceedingBlock.ownDocumentEntry = str(invoiceToPayedBlock.invoiceBox.idEntry)  
         ownDocumentProceedingBlock.amountEntry = str(invoiceToPayedBlock.invoiceBox.payEntry)  
414          line = "| "          line = "| "
415          line += printing.printField(invoiceToPayedBlock.invoiceBox.numberEntry,14,'r') + " | "          line += printing.printField(invoiceToPayedBlock.invoiceBox.numberEntry,14,'r') + " | "
416          line += printing.printField(invoiceToPayedBlock.invoiceBox.dateEntry,20,'r') + " | "          line += printing.printField(invoiceToPayedBlock.invoiceBox.dateEntry,20,'r') + " | "
# Line 454  error = 0 Line 429  error = 0
429  try:  try:
430      ownPosDocumentBlock.documentNumberEntry.postAtomicModify (lambda x:int(x)+1)      ownPosDocumentBlock.documentNumberEntry.postAtomicModify (lambda x:int(x)+1)
431      error += 1      error += 1
432        ownDocumentBlock.clientRecipientBox.dateEntry = ownDocumentDataSource.getTimeStamp()
433      ownDocumentBlock.postChanges()      ownDocumentBlock.postChanges()
434      error += 1      error += 1
435        proceedingBlock.dateEntry = proceedingDataSource.getTimeStamp()
436      proceedingBlock.postChanges()      proceedingBlock.postChanges()
437      error += 1      error += 1
438        rc = currencyTypeBlock.getRecordCount()
439        for recNum in range(rc):
440            currencyTypeBlock.jumpRecord(recNum)
441            if hack.a2f(currencyTypeBlock.currencyBox.payEntry) > 0:
442                if not currencyMovementBlock.getCurrentRecord().isEmpty():
443                    currencyMovementBlock.newRecord()
444                currencyMovementBlock.proceedingEntry = str(proceedingBlock.idEntry)
445                currencyMovementBlock.movementTypeEntry = "" # Revisar com queda esto
446                currencyMovementBlock.currencyTypeEntry = str(currencyTypeBlock.currencyBox.idEntry)
447                currencyMovementBlock.amountEntry = str(hack.a2f(currencyTypeBlock.currencyBox.payEntry) * hack.a2f(currencyTypeBlock.currencyBox.rateEntry))
448      currencyMovementBlock.postChanges()      currencyMovementBlock.postChanges()
449      error += 1      error += 1
450        rc = invoiceToPayedBlock.getRecordCount()
451        for recNum in range(rc):
452            invoiceToPayedBlock.jumpRecord(recNum)
453            if hack.a2f(invoiceToPayedBlock.invoiceBox.payEntry) > 0:
454                if not ownDocumentProceedingBlock.getCurrentRecord().isEmpty():
455                    ownDocumentProceedingBlock.newRecord()
456                ownDocumentProceedingBlock.proceedingEntry = str(proceedingBlock.idEntry)
457                ownDocumentProceedingBlock.ownDocumentEntry = str(invoiceToPayedBlock.invoiceBox.idEntry)
458                ownDocumentProceedingBlock.amountEntry = str(invoiceToPayedBlock.invoiceBox.payEntry)
459      ownDocumentProceedingBlock.postChanges()      ownDocumentProceedingBlock.postChanges()
460      error += 1      error += 1
461      commitConnection()      commitConnection()
# Line 505  if hack.a2f(invoiceToPayedBlock.invoiceB Line 501  if hack.a2f(invoiceToPayedBlock.invoiceB
501          currencyTypeBlock.currencyBox.idEntry = rs.current.getField("_table")          currencyTypeBlock.currencyBox.idEntry = rs.current.getField("_table")
502          currencyTypeBlock.currencyBox.nameEntry = rs.current.getField("name")          currencyTypeBlock.currencyBox.nameEntry = rs.current.getField("name")
503          currencyTypeBlock.currencyBox.rateEntry = hack.a2f(rs.current.getField("rate"))          currencyTypeBlock.currencyBox.rateEntry = hack.a2f(rs.current.getField("rate"))
504          monto = hack.a2f(invoiceToPayedBlock.invoiceBox.totalEntry) / hack.a2f(rs.current.getField("rate"))          monto = hack.a2f(hack.a2f(invoiceToPayedBlock.invoiceBox.totalEntry) / hack.a2f(rs.current.getField("rate")),2)
505          currencyTypeBlock.currencyBox.formatEntry = rs.current.getField("format")          currencyTypeBlock.currencyBox.formatEntry = rs.current.getField("format")
506          currencyTypeBlock.currencyBox.amountEntry = str(currencyTypeBlock.currencyBox.formatEntry) % monto          currencyTypeBlock.currencyBox.amountEntry = str(currencyTypeBlock.currencyBox.formatEntry) % monto
507          currencyTypeBlock.currencyBox.payEntry = 0.0          currencyTypeBlock.currencyBox.payEntry = 0.0
# Line 532  rc = currencyTypeBlock.getRecordCount() Line 528  rc = currencyTypeBlock.getRecordCount()
528  for recNum in range(rc):  for recNum in range(rc):
529      currencyTypeBlock.jumpRecord(recNum)      currencyTypeBlock.jumpRecord(recNum)
530      if hack.a2f(currencyTypeBlock.currencyBox.payEntry) > 0:      if hack.a2f(currencyTypeBlock.currencyBox.payEntry) > 0:
531          total -= hack.a2f(currencyTypeBlock.currencyBox.payEntry) * hack.a2f(currencyTypeBlock.currencyBox.rateEntry)          total -= hack.a2f(hack.a2f(currencyTypeBlock.currencyBox.payEntry) * hack.a2f(currencyTypeBlock.currencyBox.rateEntry),2)
532    
533  rc = currencyTypeBlock.getRecordCount()  rc = currencyTypeBlock.getRecordCount()
534  for recNum in range(rc):  for recNum in range(rc):
535      currencyTypeBlock.jumpRecord(recNum)      currencyTypeBlock.jumpRecord(recNum)
536      if hack.a2f(currencyTypeBlock.currencyBox.rateEntry) > 0:      if hack.a2f(currencyTypeBlock.currencyBox.rateEntry) > 0:
537          monto = total / hack.a2f(currencyTypeBlock.currencyBox.rateEntry)          monto = hack.a2f(total / hack.a2f(currencyTypeBlock.currencyBox.rateEntry),2)
538          currencyTypeBlock.currencyBox.amountEntry = str(currencyTypeBlock.currencyBox.formatEntry) % monto          currencyTypeBlock.currencyBox.amountEntry = str(currencyTypeBlock.currencyBox.formatEntry) % monto
539            
540      ]]>      ]]>
# Line 556  rc = currencyTypeBlock.getRecordCount() Line 552  rc = currencyTypeBlock.getRecordCount()
552  for recNum in range(rc):  for recNum in range(rc):
553      currencyTypeBlock.jumpRecord(recNum)      currencyTypeBlock.jumpRecord(recNum)
554      if hack.a2f(currencyTypeBlock.currencyBox.rateEntry) > 0:      if hack.a2f(currencyTypeBlock.currencyBox.rateEntry) > 0:
555          total -= hack.a2f(currencyTypeBlock.currencyBox.payEntry) * hack.a2f(currencyTypeBlock.currencyBox.rateEntry)          total -= hack.a2f(hack.a2f(currencyTypeBlock.currencyBox.payEntry) * hack.a2f(currencyTypeBlock.currencyBox.rateEntry),2)
556    
557  if total > 0:  if total != 0:
558      genericBox("El recibo no esta totalmente pagado\n",['Aceptar'])      genericBox("El recibo no esta totalmente pagado\n",['Aceptar'])
559  else:  else:
560      callTrigger('writeAllTrigger')      callTrigger('writeAllTrigger')

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

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