4 |
<neb:Block> |
<neb:Block> |
5 |
use PAPO; |
use PAPO; |
6 |
my $uniqed=0; |
my $uniqed=0; |
7 |
</neb:Block> |
</neb:Block> |
8 |
<datasource name="tmpValuesDataSource" cache="1"/> |
<datasource name="tmpValuesDataSource" cache="1"/> |
9 |
<datasource name="prodSearchDataSource" cache="1"/> |
<datasource name="prodSearchDataSource" cache="1"/> |
10 |
<datasource name="prodResultDataSource" cache="1"/> |
<datasource name="prodResultDataSource" cache="1"/> |
257 |
|
|
258 |
<trigger name="printTrigger" type="NAMED"><![CDATA[ |
<trigger name="printTrigger" type="NAMED"><![CDATA[ |
259 |
import hack |
import hack |
260 |
|
from gnue.common.GDataObjects import ConnectionError as DBError |
261 |
|
|
262 |
if not str(ownDocumentBlock.creditNoteTypeEntry): |
if not str(ownDocumentBlock.creditNoteTypeEntry): |
263 |
genericBox("Falta el tipo de nota de crédito",["Aceptar"]) |
genericBox("Falta el tipo de nota de crédito",["Aceptar"]) |
264 |
else: |
else: |
265 |
if ownItemBlock.getRecordCount() > 0 and len(ownItemBlock.prodNameSEntry) > 0: |
if ownItemBlock.getRecordCount() > 0 and len(ownItemBlock.prodNameSEntry) > 0: |
266 |
callTrigger('startWaitingModeTrigger') |
callTrigger('startWaitingModeTrigger') |
267 |
callTrigger ('commitTrigger') |
try: |
268 |
# it's _such_ a pitty |
callTrigger ('commitTrigger') |
269 |
# pleasePrint ('serviceCreditNote', { 'id': str(ownDocumentBlock.idEntry) }) |
# it's _such_ a pitty |
270 |
# report='productCreditNote-%s' % str(ownDocumentBlock.typeEntry) |
# pleasePrint ('serviceCreditNote', { 'id': str(ownDocumentBlock.idEntry) }) |
271 |
# hack.pleasePrint (self, str(ownDocumentBlock.typeEntry), report, [ 'id='+str(ownDocumentBlock.idEntry) ], |
# report='productCreditNote-%s' % str(ownDocumentBlock.typeEntry) |
272 |
# str (ownPosDocumentBlock.documentPrintCommand)) |
# hack.pleasePrint (self, str(ownDocumentBlock.typeEntry), report, [ 'id='+str(ownDocumentBlock.idEntry) ], |
273 |
callTrigger('rollbackTrigger') |
# str (ownPosDocumentBlock.documentPrintCommand)) |
274 |
|
|
275 |
|
callTrigger('rollbackTrigger') |
276 |
|
except DBError, err: |
277 |
|
# something happened in the way to Heaven |
278 |
|
pass |
279 |
callTrigger('endWaitingModeTrigger') |
callTrigger('endWaitingModeTrigger') |
280 |
]]></trigger> |
]]></trigger> |
281 |
|
|
299 |
proceedingBlock.clear() |
proceedingBlock.clear() |
300 |
|
|
301 |
proceedingBlock.dateEntry = proceedingDataSource.getTimeStamp() |
proceedingBlock.dateEntry = proceedingDataSource.getTimeStamp() |
302 |
|
|
303 |
ownDocumentProceedingBlock.clear() |
ownDocumentProceedingBlock.clear() |
304 |
ownDocumentProceedingBlock.proceedingEntry = str(proceedingBlock.idEntry) |
ownDocumentProceedingBlock.proceedingEntry = str(proceedingBlock.idEntry) |
305 |
ownDocumentProceedingBlock.ownDocumentEntry = str(ownDocumentBlock.idEntry) |
ownDocumentProceedingBlock.ownDocumentEntry = str(ownDocumentBlock.idEntry) |
329 |
elif postChangeAdvance == 5: |
elif postChangeAdvance == 5: |
330 |
message += "el stock" |
message += "el stock" |
331 |
genericBox(message+"\n"+str(err),['Aceptar']) |
genericBox(message+"\n"+str(err),['Aceptar']) |
332 |
|
raise |
333 |
|
|
334 |
</trigger> |
</trigger> |
335 |
|
|
336 |
<trigger name="rollbackTrigger" type="NAMED"> |
<trigger name="rollbackTrigger" type="NAMED"> |
337 |
tmpValuesDataSource.priceTypeId = None |
tmpValuesDataSource.priceTypeId = None |
338 |
|
|
339 |
clear() |
clear() |
340 |
|
|
341 |
tmpBlock.tmpDateEntry = ownDocumentDataSource.getTimeStamp() |
tmpBlock.tmpDateEntry = ownDocumentDataSource.getTimeStamp() |
342 |
#setFocus(ownDocumentBlock.clientCodeEntry) |
#setFocus(ownDocumentBlock.clientCodeEntry) |
343 |
</trigger> |
</trigger> |
344 |
|
|
345 |
<trigger name="startUp" type="On-Startup"> |
<trigger name="startUp" type="On-Startup"> |
346 |
tmpValuesDataSource.priceTypeId = None |
tmpValuesDataSource.priceTypeId = None |
347 |
tmpValuesDataSource.onSwitch = "0" |
tmpValuesDataSource.onSwitch = "0" |
348 |
ownOrganizationBlock.clear() |
ownOrganizationBlock.clear() |
349 |
ownOrganizationBlock.initQuery() |
ownOrganizationBlock.initQuery() |
350 |
ownOrganizationBlock.processQuery() |
ownOrganizationBlock.processQuery() |
351 |
tmpValuesDataSource.ownIVACond = str(ownOrganizationBlock.condIVAEntry) |
tmpValuesDataSource.ownIVACond = str(ownOrganizationBlock.condIVAEntry) |
352 |
tmpBlock.tmpDateEntry = ownDocumentDataSource.getTimeStamp() |
tmpBlock.tmpDateEntry = ownDocumentDataSource.getTimeStamp() |
353 |
</trigger> |
</trigger> |
354 |
|
|
355 |
<trigger name="quitTrigger" type="NAMED"> |
<trigger name="quitTrigger" type="NAMED"> |
356 |
callTrigger('rollbackTrigger') |
callTrigger('rollbackTrigger') |
357 |
exit() |
exit() |
358 |
</trigger> |
</trigger> |
359 |
|
|
360 |
<!-- Este trigger clacula el total de la nota de crédito --> |
<!-- Este trigger clacula el total de la nota de crédito --> |
852 |
default="0.00"/> |
default="0.00"/> |
853 |
</block> |
</block> |
854 |
<neb:Sub neb:src="setStock.nebc" ownDocumentId="ownDocumentBlock.idEntry" storehouseEntityId="ownStorehouseBlock.ownStorehouseIdEntry" |
<neb:Sub neb:src="setStock.nebc" ownDocumentId="ownDocumentBlock.idEntry" storehouseEntityId="ownStorehouseBlock.ownStorehouseIdEntry" |
855 |
stockAddTrigger="stockAddTrigger" stockSubstractTrigger="stockSubstractTrigger"/> |
stockAddTrigger="stockAddTrigger" stockSubstractTrigger="stockSubstractTrigger"/> |
856 |
|
|
857 |
|
|
858 |
<!-- <box height="4" label="Cobro de la Nota de Crédito" name="payBox" --> |
<!-- <box height="4" label="Cobro de la Nota de Crédito" name="payBox" --> |