629 |
currencyMovementBlock.currencyTypeEntry = "1" |
currencyMovementBlock.currencyTypeEntry = "1" |
630 |
currencyMovementBlock.amountEntry = str(payBlock.cashEntry) |
currencyMovementBlock.amountEntry = str(payBlock.cashEntry) |
631 |
|
|
632 |
#ownDocumentBlock.commit() |
from gnue.common.GDataObjects import ConnectionError as DBError |
|
|
|
633 |
try: |
try: |
634 |
postChangeAdvance = 0 |
postChangeAdvance = 0 |
635 |
ownDocumentBlock.postChanges() |
ownDocumentBlock.postChanges() |
644 |
postChangeAdvance = 5 |
postChangeAdvance = 5 |
645 |
lOwnDocId = str(ownDocumentBlock.idEntry) |
lOwnDocId = str(ownDocumentBlock.idEntry) |
646 |
#if stock by invoice |
#if stock by invoice |
647 |
if str(ownPosBlock.stockByInvoice) == 1: |
if str(ownPosBlock.stockByInvoice) == "1": |
648 |
ownItemToUpdBlock.initQuery() |
ownItemToUpdBlock.initQuery() |
649 |
ownItemToUpdBlock.ownDocumentEntry = lOwnDocId |
ownItemToUpdBlock.ownDocumentEntry = lOwnDocId |
650 |
ownItemToUpdBlock.processQuery() |
ownItemToUpdBlock.processQuery() |
655 |
ownItemToUpdBlock.clear() |
ownItemToUpdBlock.clear() |
656 |
#/if stock by invoice |
#/if stock by invoice |
657 |
commitConnection() |
commitConnection() |
658 |
except : |
except DBError, err: |
659 |
message = "Hay problemas para actualizar " |
rollbackConnection() |
660 |
|
message = "Hay problemas para grabar " |
661 |
if postChangeAdvance == 0: |
if postChangeAdvance == 0: |
662 |
message += "la Factura" |
message += "la Factura" |
663 |
elif postChangeAdvance == 1: |
elif postChangeAdvance == 1: |
670 |
message += "las monedas de pago de la Factura" |
message += "las monedas de pago de la Factura" |
671 |
elif postChangeAdvance == 5: |
elif postChangeAdvance == 5: |
672 |
message += "el stock" |
message += "el stock" |
673 |
|
genericBox(mesagge+"\n"+str(err),['Aceptar']) |
674 |
rollbackConnection() |
|
675 |
</trigger> |
</trigger> |
676 |
|
|
677 |
<trigger name="rollbackTrigger" type="NAMED"> |
<trigger name="rollbackTrigger" type="NAMED"> |