418 |
import gnue.common.GConditions as GConditions |
import gnue.common.GConditions as GConditions |
419 |
import hack |
import hack |
420 |
|
|
421 |
cond = GConditions.GCondition() |
condInvoice = GConditions.GCondition() |
422 |
|
condPay = GConditions.GCondition() |
423 |
|
|
424 |
balance = 0 |
balance = 0 |
425 |
if str(creditLimit1Block.balanceEntry): |
if str(creditLimit1Block.balanceEntry): |
426 |
tmpAnd = GConditions.GCand(cond) |
tmpAnd = GConditions.GCand(condInvoice) |
427 |
|
gt = GConditions.GCgt(tmpAnd) |
428 |
|
GConditions.GCField(gt,"own_document.date") |
429 |
|
GConditions.GCConst(gt,str(creditLimit1Block.timeStampEntry)) |
430 |
|
eq = GConditions.GCeq(tmpAnd) |
431 |
|
GConditions.GCField(eq,"_entity_data._table") |
432 |
|
GConditions.GCConst(eq,str(ownDocumentBlock.clientRecipientBox.currentClientEntry)) |
433 |
|
balance = hack.a2f(creditLimit1Block.balance) |
434 |
|
tmpAnd = GConditions.GCand(condPay) |
435 |
gt = GConditions.GCgt(tmpAnd) |
gt = GConditions.GCgt(tmpAnd) |
436 |
GConditions.GCField(gt,"own_document.date") |
GConditions.GCField(gt,"own_document.date") |
437 |
GConditions.GCConst(gt,str(creditLimit1Block.timeStampEntry)) |
GConditions.GCConst(gt,str(creditLimit1Block.timeStampEntry)) |
440 |
GConditions.GCConst(eq,str(ownDocumentBlock.clientRecipientBox.currentClientEntry)) |
GConditions.GCConst(eq,str(ownDocumentBlock.clientRecipientBox.currentClientEntry)) |
441 |
balance = hack.a2f(creditLimit1Block.balance) |
balance = hack.a2f(creditLimit1Block.balance) |
442 |
else: |
else: |
443 |
eq = GConditions.GCeq(cond) |
eq = GConditions.GCeq(condInvoice) |
444 |
|
GConditions.GCField(eq,"_entity_data._table") |
445 |
|
GConditions.GCConst(eq,str(ownDocumentBlock.clientRecipientBox.currentClientEntry)) |
446 |
|
eq = GConditions.GCeq(condPay) |
447 |
GConditions.GCField(eq,"_entity_data._table") |
GConditions.GCField(eq,"_entity_data._table") |
448 |
GConditions.GCConst(eq,str(ownDocumentBlock.clientRecipientBox.currentClientEntry)) |
GConditions.GCConst(eq,str(ownDocumentBlock.clientRecipientBox.currentClientEntry)) |
449 |
|
|
450 |
# Calculo del total facturado |
# Calculo del total facturado |
451 |
#rs = invTotDataSource.createResultSet(cond) |
rs = invTotDataSource.createResultSet(condInvoice) |
|
rs = invTotDataSource.createResultSet({'_entity_data._table':str(ownDocumentBlock.clientRecipientBox.currentClientEntry)}) |
|
452 |
more = rs.firstRecord() |
more = rs.firstRecord() |
453 |
invTotal = 0 |
invTotal = 0 |
454 |
|
|
478 |
odt_more = odt_rs.nextRecord() |
odt_more = odt_rs.nextRecord() |
479 |
|
|
480 |
# Calculo del total cobrado |
# Calculo del total cobrado |
481 |
#rs = payTotDataSource.createResultSet(cond) |
rs = payTotDataSource.createResultSet(condPay) |
|
rs = payTotDataSource.createResultSet({'_entity_data._table':str(ownDocumentBlock.clientRecipientBox.currentClientEntry)}) |
|
482 |
|
|
483 |
more = rs.firstRecord() |
more = rs.firstRecord() |
484 |
import hack |
import hack |