424 |
|
|
425 |
import time, sys |
import time, sys |
426 |
sys.path.append("../ruff") |
sys.path.append("../ruff") |
427 |
import informe |
from ruff import Report |
428 |
import printing |
import printing |
429 |
|
|
430 |
x = informe.new("ruff/dailyCash.xml") |
x = Report("ruff/dailyCash.xml") |
431 |
x.page_header(fecha=startTime[:11]) |
x.header(fecha=startTime[:11]) |
432 |
|
|
433 |
|
ingresos = {} |
434 |
|
egresos = {} |
435 |
for currency in currencyName.keys() : |
for currency in currencyName.keys() : |
436 |
ingresos = { "contado": contadoAmount.get(currency,0.00), |
ingresos[currency] = { "contado": contadoAmount.get(currency,0.00), |
437 |
"ctacte": ctaCteCancelledAmount.get(currency,0.00), |
"ctacte": ctaCteCancelledAmount.get(currency,0.00), |
438 |
"otros": creditNoteContadoCobradasAmount.get(currency,0.00), |
"otros": creditNoteContadoCobradasAmount.get(currency,0.00), |
439 |
} |
} |
440 |
egresos = { "contado": contadoPayedAmount.get(currency,0.00), |
egresos[currency] = { "contado": contadoPayedAmount.get(currency,0.00), |
441 |
"ctacte": ctaCtePayedAmount.get(currency,0.00), |
"ctacte": ctaCtePayedAmount.get(currency,0.00), |
442 |
"otros": creditNoteContadoPagadasAmount.get(currency,0.00), |
"otros": creditNoteContadoPagadasAmount.get(currency,0.00), |
443 |
} |
} |
444 |
|
|
445 |
x.ingresos.item.add_row(moneda=str(currencyName[currency]), |
x.add_detail('ingresos') |
446 |
contado= printing.printAccount(ingresos['contado'],11), |
for currency in currencyName.keys() : |
447 |
ctacte= printing.printAccount(ingresos['ctacte'],11), |
ing4currency = ingresos[currency] |
448 |
otros= printing.printAccount(ingresos['otros'],11), |
x.add_dentry('item',moneda=str(currencyName[currency]), |
449 |
total= printing.printAccount(ingresos['contado']+ingresos['ctacte']+ingresos['otros'],11), |
contado= printing.printAccount(ing4currency['contado'],11), |
450 |
) |
ctacte= printing.printAccount(ing4currency['ctacte'],11), |
451 |
x.egresos.item.add_row(moneda=str(currencyName[currency]), |
otros= printing.printAccount(ing4currency['otros'],11), |
452 |
contado= printing.printAccount(egresos['contado'],11), |
total= printing.printAccount(ing4currency['contado']+ing4currency['ctacte']+ing4currency['otros'],11), |
|
ctacte= printing.printAccount(egresos['ctacte'],11), |
|
|
otros= printing.printAccount(egresos['otros'],11), |
|
|
total= printing.printAccount(egresos['contado']+egresos['ctacte']+egresos['otros'],11), |
|
453 |
) |
) |
454 |
x.diferencia.item.add_row(moneda=str(currencyName[currency]), |
x.close_detail() |
455 |
contado= printing.printAccount(ingresos['contado']-egresos['contado'],11), |
|
456 |
ctacte= printing.printAccount(ingresos['ctacte']-egresos['ctacte'],11), |
x.add_detail('egresos') |
457 |
otros= printing.printAccount(ingresos['otros']-egresos['otros'],11), |
for currency in currencyName.keys() : |
458 |
total= printing.printAccount(ingresos['contado']+ingresos['ctacte']+ingresos['otros']-egresos['contado']-egresos['ctacte']-egresos['otros'],11), |
eg4currency = egresos[currency] |
459 |
|
x.add_dentry('item',moneda=str(currencyName[currency]), |
460 |
|
contado= printing.printAccount(eg4currency['contado'],11), |
461 |
|
ctacte= printing.printAccount(eg4currency['ctacte'],11), |
462 |
|
otros= printing.printAccount(eg4currency['otros'],11), |
463 |
|
total= printing.printAccount(eg4currency['contado']+eg4currency['ctacte']+eg4currency['otros'],11), |
464 |
) |
) |
465 |
|
x.close_detail() |
466 |
|
|
467 |
|
x.add_detail('diferencia') |
468 |
|
for currency in currencyName.keys() : |
469 |
|
ing4currency = ingresos[currency] |
470 |
|
eg4currency = egresos[currency] |
471 |
|
x.add_dentry('item',moneda=str(currencyName[currency]), |
472 |
|
contado= printing.printAccount(ing4currency['contado']-eg4currency['contado'],11), |
473 |
|
ctacte= printing.printAccount(ing4currency['ctacte']-eg4currency['ctacte'],11), |
474 |
|
otros= printing.printAccount(ing4currency['otros']-eg4currency['otros'],11), |
475 |
|
total= printing.printAccount(ing4currency['contado']+ing4currency['ctacte']+ing4currency['otros']- \ |
476 |
|
eg4currency['contado']-eg4currency['ctacte']-eg4currency['otros'],11),) |
477 |
|
x.close_detail() |
478 |
|
|
479 |
from gnue.common.GParser import GContent |
from gnue.common.GParser import GContent |
480 |
|
|
481 |
printing.previewPrint([x.render()],gConfig('printcommand')) |
printing.previewPrint([str(x)],gConfig('printcommand')) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
482 |
|
|
483 |
</trigger> |
</trigger> |
484 |
|
|