502 |
</trigger> |
</trigger> |
503 |
|
|
504 |
<trigger name="deleteTrigger" type="NAMED"> |
<trigger name="deleteTrigger" type="NAMED"> |
505 |
from gnue.common.GDataObjects import ConnectionError as DBError |
if genericBox("¿ Está seguro que desea borrar ?",['Sí','No']) == 1: |
506 |
try: |
from gnue.common.GDataObjects import ConnectionError as DBError |
507 |
lOwnDocId = str(ownDocumentShowBlock.idEntry) |
try: |
508 |
ownDocumentProceedingShowBlock.initQuery() |
lOwnDocId = str(ownDocumentShowBlock.idEntry) |
509 |
ownDocumentProceedingShowBlock.ownDocumentEntry = lOwnDocId |
ownDocumentProceedingShowBlock.initQuery() |
510 |
ownDocumentProceedingShowBlock.processQuery() |
ownDocumentProceedingShowBlock.ownDocumentEntry = lOwnDocId |
511 |
proceedingId = str(ownDocumentProceedingShowBlock.proceedingEntry) |
ownDocumentProceedingShowBlock.processQuery() |
512 |
ownDocumentProceedingShowBlock.deleteRecord() |
proceedingId = str(ownDocumentProceedingShowBlock.proceedingEntry) |
513 |
postChangeAdvance = 0 |
ownDocumentProceedingShowBlock.deleteRecord() |
514 |
ownDocumentProceedingShowBlock.postChanges() |
postChangeAdvance = 0 |
515 |
|
ownDocumentProceedingShowBlock.postChanges() |
516 |
if proceedingId: |
|
517 |
currencyMovementBlock.initQuery() |
if proceedingId: |
518 |
currencyMovementBlock.proceedingEntry = proceedingId |
currencyMovementBlock.initQuery() |
519 |
currencyMovementBlock.processQuery() |
currencyMovementBlock.proceedingEntry = proceedingId |
520 |
postChangeAdvance = 1 |
currencyMovementBlock.processQuery() |
521 |
rc = currencyMovementBlock.getRecordCount() |
postChangeAdvance = 1 |
522 |
for recNum in range(rc): |
rc = currencyMovementBlock.getRecordCount() |
523 |
currencyMovementBlock.jumpRecord(recNum) |
for recNum in range(rc): |
524 |
currencyMovementBlock.deleteRecord() |
currencyMovementBlock.jumpRecord(recNum) |
525 |
currencyMovementBlock.postChanges() |
currencyMovementBlock.deleteRecord() |
526 |
|
currencyMovementBlock.postChanges() |
527 |
proceedingBlock.initQuery() |
|
528 |
proceedingBlock.idEntry = proceedingId |
proceedingBlock.initQuery() |
529 |
proceedingBlock.processQuery() |
proceedingBlock.idEntry = proceedingId |
530 |
postChangeAdvance = 2 |
proceedingBlock.processQuery() |
531 |
proceedingBlock.deleteRecord() |
postChangeAdvance = 2 |
532 |
proceedingBlock.postChanges() |
proceedingBlock.deleteRecord() |
533 |
|
proceedingBlock.postChanges() |
534 |
postChangeAdvance = 3 |
|
535 |
tmpValuesDataSource.idEntry = str(ownDocumentShowBlock.idEntry) |
postChangeAdvance = 3 |
536 |
if not str(ownPosBlock.stockByInvoice) == "1": |
tmpValuesDataSource.idEntry = str(ownDocumentShowBlock.idEntry) |
537 |
print "llamado al trigger" |
if not str(ownPosBlock.stockByInvoice) == "1": |
538 |
callTrigger('stockAddTrigger') |
print "llamado al trigger" |
539 |
|
callTrigger('stockAddTrigger') |
540 |
lRecordCount = ownItemShowBlock.getRecordCount() |
|
541 |
for recNum in range(lRecordCount): |
lRecordCount = ownItemShowBlock.getRecordCount() |
542 |
ownItemShowBlock.jumpRecord(recNum) |
for recNum in range(lRecordCount): |
543 |
ownItemTaxShowBlock.initQuery() |
ownItemShowBlock.jumpRecord(recNum) |
544 |
ownItemTaxShowBlock.ownItemEntry = str(ownItemShowBlock.idEntry) |
ownItemTaxShowBlock.initQuery() |
545 |
ownItemTaxShowBlock.processQuery() |
ownItemTaxShowBlock.ownItemEntry = str(ownItemShowBlock.idEntry) |
546 |
lTaxRecordCount = ownItemTaxShowBlock.getRecordCount() |
ownItemTaxShowBlock.processQuery() |
547 |
for taxRecNum in range(lTaxRecordCount): |
lTaxRecordCount = ownItemTaxShowBlock.getRecordCount() |
548 |
ownItemTaxShowBlock.jumpRecord(taxRecNum) |
for taxRecNum in range(lTaxRecordCount): |
549 |
ownItemTaxShowBlock.deleteRecord() |
ownItemTaxShowBlock.jumpRecord(taxRecNum) |
550 |
ownItemTaxShowBlock.postChanges() |
ownItemTaxShowBlock.deleteRecord() |
551 |
ownItemDeleteBlock.initQuery() |
ownItemTaxShowBlock.postChanges() |
552 |
ownItemDeleteBlock.idEntry = str(ownItemShowBlock.idEntry) |
ownItemDeleteBlock.initQuery() |
553 |
ownItemDeleteBlock.processQuery() |
ownItemDeleteBlock.idEntry = str(ownItemShowBlock.idEntry) |
554 |
ownItemDeleteBlock.deleteRecord() |
ownItemDeleteBlock.processQuery() |
555 |
ownItemDeleteBlock.postChanges() |
ownItemDeleteBlock.deleteRecord() |
556 |
|
ownItemDeleteBlock.postChanges() |
557 |
ownItemShowBlock.clear() |
|
558 |
|
ownItemShowBlock.clear() |
559 |
|
|
560 |
|
|
561 |
|
postChangeAdvance = 4 |
562 |
postChangeAdvance = 4 |
ownDocumentShowBlock.deleteRecord() |
563 |
ownDocumentShowBlock.deleteRecord() |
ownDocumentShowBlock.postChanges() |
564 |
ownDocumentShowBlock.postChanges() |
|
565 |
|
commitConnection() |
566 |
commitConnection() |
except DBError, err: |
567 |
except DBError, err: |
rollbackConnection() |
568 |
rollbackConnection() |
callTrigger('rollbackTrigger') |
569 |
callTrigger('rollbackTrigger') |
message = ["el procedimiento del Remito", "Los Montos del remito", |
570 |
message = ["el procedimiento del Remito", "Los Montos del remito", |
"el procedimiento","los Items del Remito", "el Remito"] |
571 |
"el procedimiento","los Items del Remito", "el Remito"] |
genericBox("Hay problemas para borrar "+message[postChangeAdvance]+"\n"+str(err),['Aceptar']) |
572 |
genericBox("Hay problemas para borrar "+message[postChangeAdvance]+"\n"+str(err),['Aceptar']) |
|
|
|
|
573 |
</trigger> |
</trigger> |
574 |
|
|
575 |
<trigger name="newSearchTrigger" type="NAMED"> |
<trigger name="newSearchTrigger" type="NAMED"> |
598 |
clientResultBlock.reset() |
clientResultBlock.reset() |
599 |
clientResultBlock.initQuery() |
clientResultBlock.initQuery() |
600 |
if codeToSearch: |
if codeToSearch: |
601 |
clientResultBlock.clientCodeEntry = codeToSearch+"%" |
clientResultBlock.uidEntry = codeToSearch+"%" |
602 |
if nameToSearch: |
if nameToSearch: |
603 |
clientResultBlock.clientNameEntry = nameToSearch+"%" |
clientResultBlock.nameEntry = nameToSearch+"%" |
604 |
clientResultBlock.processQuery() |
clientResultBlock.processQuery() |
605 |
callTrigger('endWaitingModeTrigger') |
callTrigger('endWaitingModeTrigger') |
606 |
|
|