127 |
<!-- triggers --> |
<!-- triggers --> |
128 |
|
|
129 |
<trigger name="commitTrigger" type="NAMED"><![CDATA[ |
<trigger name="commitTrigger" type="NAMED"><![CDATA[ |
130 |
if not entityUID_CUIT_Block.getCurrentRecord().isInserted(): |
if not str(entityUID_CUIT_Block.uidEntry).strip (): |
131 |
entityUID_CUIT_Block.newRecord() |
genericBox ("El CUIT no debe estar vacío",['Aceptar']) |
132 |
# 1 es CUIT |
elif not str(entityUID_IB_Block.uidEntry).strip (): |
133 |
entityUID_CUIT_Block.uid_CUIT_TypeEntry = 1 |
genericBox ("El número de Ingresos Brutos no debe estar vacío",['Aceptar']) |
134 |
if not entityUID_IB_Block.getCurrentRecord().isInserted(): |
else: |
135 |
entityUID_IB_Block.newRecord() |
if not entityUID_CUIT_Block.getCurrentRecord().isInserted(): |
136 |
# 2 es Ingresos Brutos |
entityUID_CUIT_Block.newRecord() |
137 |
entityUID_IB_Block.uid_IB_TypeEntry = 2 |
# 1 es CUIT |
138 |
|
entityUID_CUIT_Block.uid_CUIT_TypeEntry = 1 |
139 |
|
if not entityUID_IB_Block.getCurrentRecord().isInserted(): |
140 |
|
entityUID_IB_Block.newRecord() |
141 |
|
# 2 es Ingresos Brutos |
142 |
|
entityUID_IB_Block.uid_IB_TypeEntry = 2 |
143 |
|
|
144 |
from gnue.common.GDataObjects import ConnectionError as DBError |
from gnue.common.GDataObjects import ConnectionError as DBError |
145 |
|
|
146 |
try: |
try: |
147 |
organizationBlock.postChanges() |
organizationBlock.postChanges() |
148 |
commitConnection() |
commitConnection() |
149 |
except DBError, err: |
except DBError, err: |
150 |
rollbackConnection() |
rollbackConnection() |
151 |
genericBox("Hay problemas para grabar los datos de la organización\n"+str(err),['Aceptar']) |
genericBox("Hay problemas para grabar los datos de la organización\n"+str(err),['Aceptar']) |
152 |
]]></trigger> |
]]></trigger> |
153 |
<trigger name="organizationRollbackTrigger" type="NAMED"><![CDATA[ |
<trigger name="organizationRollbackTrigger" type="NAMED"><![CDATA[ |
154 |
organizationBlock.reset() |
organizationBlock.reset() |