229 |
while more: |
while more: |
230 |
invoiceTotal = 0 |
invoiceTotal = 0 |
231 |
currAlienDoc = productInvoiceResultSet.current.getField("alien_document.id") |
currAlienDoc = productInvoiceResultSet.current.getField("alien_document.id") |
232 |
|
if not tmpInvToPayedBlock.getCurrentRecord().isEmpty(): |
233 |
|
tmpInvToPayedBlock.newRecord() |
234 |
|
|
235 |
tmpInvToPayedBlock.idEntry = str(productInvoiceResultSet.current.getField("alien_document.id")) |
tmpInvToPayedBlock.idEntry = str(productInvoiceResultSet.current.getField("alien_document.id")) |
236 |
tmpInvToPayedBlock.numberEntry = str(productInvoiceResultSet.current.getField("alien_document.number")) |
tmpInvToPayedBlock.numberEntry = str(productInvoiceResultSet.current.getField("alien_document.number")) |
237 |
tmpInvToPayedBlock.dateEntry = str(productInvoiceResultSet.current.getField("alien_document.date")) |
tmpInvToPayedBlock.dateEntry = str(productInvoiceResultSet.current.getField("alien_document.date")) |
255 |
|
|
256 |
tmpInvToPayedBlock.amountEntry = str(invoiceTotal) |
tmpInvToPayedBlock.amountEntry = str(invoiceTotal) |
257 |
tmpInvToPayedBlock.payedEntry = "0.0" |
tmpInvToPayedBlock.payedEntry = "0.0" |
|
tmpInvToPayedBlock.newRecord() |
|
258 |
|
|
259 |
# Busco las que ya han sido pagadas |
# Busco las que ya han sido pagadas |
260 |
rs = payTotDataSource.createResultSet(condPay) |
rs = payTotDataSource.createResultSet(condPay) |
273 |
for recNum in range(rc): |
for recNum in range(rc): |
274 |
tmpInvToPayedBlock.jumpRecord(recNum) |
tmpInvToPayedBlock.jumpRecord(recNum) |
275 |
if hack.a2f(tmpInvToPayedBlock.payedEntry) < hack.a2f(tmpInvToPayedBlock.amountEntry): |
if hack.a2f(tmpInvToPayedBlock.payedEntry) < hack.a2f(tmpInvToPayedBlock.amountEntry): |
276 |
|
if not invoiceToPayBlock.getCurrentRecord().isEmpty(): |
277 |
|
invoiceToPayBlock.newRecord() |
278 |
invoiceToPayBlock.invoiceBox.idEntry = str(tmpInvToPayedBlock.idEntry) |
invoiceToPayBlock.invoiceBox.idEntry = str(tmpInvToPayedBlock.idEntry) |
279 |
invoiceToPayBlock.invoiceBox.numberEntry = str(tmpInvToPayedBlock.numberEntry) |
invoiceToPayBlock.invoiceBox.numberEntry = str(tmpInvToPayedBlock.numberEntry) |
280 |
invoiceToPayBlock.invoiceBox.dateEntry = str(tmpInvToPayedBlock.dateEntry) |
invoiceToPayBlock.invoiceBox.dateEntry = str(tmpInvToPayedBlock.dateEntry) |
284 |
hack.a2f(tmpInvToPayedBlock.amountEntry) - \ |
hack.a2f(tmpInvToPayedBlock.amountEntry) - \ |
285 |
hack.a2f(tmpInvToPayedBlock.payedEntry)) |
hack.a2f(tmpInvToPayedBlock.payedEntry)) |
286 |
total += hack.a2f(invoiceToPayBlock.invoiceBox.payEntry) |
total += hack.a2f(invoiceToPayBlock.invoiceBox.payEntry) |
|
invoiceToPayBlock.newRecord() |
|
287 |
|
|
288 |
invoiceToPayBlock.invoiceBox.totalEntry = str(total) |
invoiceToPayBlock.invoiceBox.totalEntry = str(total) |
289 |
|
|
325 |
for recNum in range(rc): |
for recNum in range(rc): |
326 |
currencyTypeBlock.jumpRecord(recNum) |
currencyTypeBlock.jumpRecord(recNum) |
327 |
if hack.a2f(currencyTypeBlock.currencyBox.payEntry) > 0: |
if hack.a2f(currencyTypeBlock.currencyBox.payEntry) > 0: |
328 |
currencyMovementBlock.newRecord() |
if not currencyMovementBlock.getCurrentRecord().isEmpty(): |
329 |
|
currencyMovementBlock.newRecord() |
330 |
currencyMovementBlock.proceedingEntry = str(proceedingBlock.idEntry) |
currencyMovementBlock.proceedingEntry = str(proceedingBlock.idEntry) |
331 |
currencyMovementBlock.movementTypeEntry = "" # Revisar com queda esto |
currencyMovementBlock.movementTypeEntry = "" # Revisar com queda esto |
332 |
currencyMovementBlock.currencyTypeEntry = str(currencyTypeBlock.currencyBox.idEntry) |
currencyMovementBlock.currencyTypeEntry = str(currencyTypeBlock.currencyBox.idEntry) |
363 |
for recNum in range(rc): |
for recNum in range(rc): |
364 |
invoiceToPayBlock.jumpRecord(recNum) |
invoiceToPayBlock.jumpRecord(recNum) |
365 |
if hack.a2f(invoiceToPayBlock.invoiceBox.payEntry) > 0: |
if hack.a2f(invoiceToPayBlock.invoiceBox.payEntry) > 0: |
366 |
alienDocumentProceedingBlock.newRecord() |
if not alienDocumentProceedingBlock.getCurrentRecord().isEmpty(): |
367 |
|
alienDocumentProceedingBlock.newRecord() |
368 |
alienDocumentProceedingBlock.proceedingEntry = str(proceedingBlock.idEntry) |
alienDocumentProceedingBlock.proceedingEntry = str(proceedingBlock.idEntry) |
369 |
alienDocumentProceedingBlock.alienDocumentEntry = str(invoiceToPayBlock.invoiceBox.idEntry) |
alienDocumentProceedingBlock.alienDocumentEntry = str(invoiceToPayBlock.invoiceBox.idEntry) |
370 |
alienDocumentProceedingBlock.amountEntry = str(invoiceToPayBlock.invoiceBox.payEntry) |
alienDocumentProceedingBlock.amountEntry = str(invoiceToPayBlock.invoiceBox.payEntry) |
454 |
client = 0 |
client = 0 |
455 |
more = rs.firstRecord() |
more = rs.firstRecord() |
456 |
while more: |
while more: |
457 |
|
if not currencyTypeBlock.getCurrentRecord().isEmpty(): |
458 |
|
currencyTypeBlock.newRecord() |
459 |
currencyTypeBlock.currencyBox.idEntry = rs.current.getField("_table") |
currencyTypeBlock.currencyBox.idEntry = rs.current.getField("_table") |
460 |
currencyTypeBlock.currencyBox.nameEntry = rs.current.getField("name") |
currencyTypeBlock.currencyBox.nameEntry = rs.current.getField("name") |
461 |
currencyTypeBlock.currencyBox.rateEntry = hack.a2f(rs.current.getField("rate")) |
currencyTypeBlock.currencyBox.rateEntry = hack.a2f(rs.current.getField("rate")) |
463 |
currencyTypeBlock.currencyBox.formatEntry = rs.current.getField("format") |
currencyTypeBlock.currencyBox.formatEntry = rs.current.getField("format") |
464 |
currencyTypeBlock.currencyBox.amountEntry = str(currencyTypeBlock.currencyBox.formatEntry) % monto |
currencyTypeBlock.currencyBox.amountEntry = str(currencyTypeBlock.currencyBox.formatEntry) % monto |
465 |
currencyTypeBlock.currencyBox.payEntry = 0.0 |
currencyTypeBlock.currencyBox.payEntry = 0.0 |
|
currencyTypeBlock.newRecord() |
|
466 |
more = rs.nextRecord() |
more = rs.nextRecord() |
467 |
|
|
468 |
currencyDataBlock.payOrderBox.dateEntry = str(tmpBlock.tmpDateEntry) |
currencyDataBlock.payOrderBox.dateEntry = str(tmpBlock.tmpDateEntry) |