324 |
<trigger name="commitTrigger" type="NAMED"> |
<trigger name="commitTrigger" type="NAMED"> |
325 |
|
|
326 |
ownDocumentBlock.numberEntry= str(ownPosDocumentBlock.documentNumberEntry) |
ownDocumentBlock.numberEntry= str(ownPosDocumentBlock.documentNumberEntry) |
|
ownPosDocumentBlock.documentNumberEntry.atomicModify (lambda x: int(x)+1) |
|
327 |
|
|
328 |
ownDocumentBlock.dateEntry = str(tmpBlock.tmpDateEntry ) |
ownDocumentBlock.dateEntry = str(tmpBlock.tmpDateEntry ) |
329 |
if len(ownDocumentBlock.dateEntry) == 0: |
if len(ownDocumentBlock.dateEntry) == 0: |
330 |
ownDocumentBlock.dateEntry = ownDocumentDataSource.getTimeStamp() |
ownDocumentBlock.dateEntry = ownDocumentDataSource.getTimeStamp() |
331 |
|
|
332 |
proceedingBlock.processRollback() |
proceedingBlock.clear() |
333 |
proceedingBlock.idEntry.autofillBySequence('proceeding_id_seq') |
proceedingBlock.idEntry.autofillBySequence('proceeding_id_seq') |
334 |
proceedingBlock.dateEntry = proceedingDataSource.getTimeStamp() |
proceedingBlock.dateEntry = proceedingDataSource.getTimeStamp() |
335 |
|
|
336 |
ownDocumentBlock.idEntry.autofillBySequence('own_document_id_seq') |
ownDocumentBlock.idEntry.autofillBySequence('own_document_id_seq') |
337 |
|
|
338 |
ownDocumentProceedingBlock.processRollback() |
ownDocumentProceedingBlock.clear() |
339 |
ownDocumentProceedingBlock.proceedingEntry = str(proceedingBlock.idEntry) |
ownDocumentProceedingBlock.proceedingEntry = str(proceedingBlock.idEntry) |
340 |
ownDocumentProceedingBlock.ownDocumentEntry = str(ownDocumentBlock.idEntry) |
ownDocumentProceedingBlock.ownDocumentEntry = str(ownDocumentBlock.idEntry) |
341 |
ownDocumentProceedingBlock.amountEntry = 0 |
ownDocumentProceedingBlock.amountEntry = 0 |
342 |
|
|
343 |
|
|
344 |
ownDocumentBlock.commit() |
ownDocumentBlock.commit() |
|
lOwnDocId = str(ownDocumentBlock.idEntry) |
|
345 |
|
|
346 |
ownItemToUpdBlock.initQuery() |
from gnue.common.GDataObjects import ConnectionError as DBError |
347 |
ownItemToUpdBlock.ownDocumentEntry = lOwnDocId |
try: |
348 |
ownItemToUpdBlock.processQuery() |
postChangeAdvance = 0 |
349 |
lRecordCount = ownItemToUpdBlock.getRecordCount() |
ownDocumentBlock.postChanges() |
350 |
for recNum in range(lRecordCount): |
postChangeAdvance = 1 |
351 |
ownItemToUpdBlock.jumpRecord(recNum) |
ownPosDocumentBlock.documentNumberEntry.postAtomicModify (lambda x: int(x)+1) |
352 |
ownItemToUpdBlock.levelEntry.atomicModify(lambda x:x+round(float(str(ownItemToUpdBlock.qtyEntry)),4)) |
postChangeAdvance = 2 |
353 |
ownItemToUpdBlock.processRollback() |
proceedingBlock.postChanges() |
354 |
|
postChangeAdvance = 3 |
355 |
|
ownDocumentProceedingBlock.postChanges() |
356 |
|
postChangeAdvance = 4 |
357 |
|
currencyMovementBlock.postChanges() |
358 |
|
postChangeAdvance = 5 |
359 |
|
if str(ownPosBlock.stockByInvoice) == "1": |
360 |
|
lOwnDocId = str(ownDocumentBlock.idEntry) |
361 |
|
|
362 |
|
ownItemToUpdBlock.initQuery() |
363 |
|
ownItemToUpdBlock.ownDocumentEntry = lOwnDocId |
364 |
|
ownItemToUpdBlock.processQuery() |
365 |
|
lRecordCount = ownItemToUpdBlock.getRecordCount() |
366 |
|
for recNum in range(lRecordCount): |
367 |
|
ownItemToUpdBlock.jumpRecord(recNum) |
368 |
|
ownItemToUpdBlock.levelEntry.atomicModify(lambda x:x+round(float(str(ownItemToUpdBlock.qtyEntry)),4)) |
369 |
|
ownItemToUpdBlock.clear() |
370 |
|
#/if stock by invoice |
371 |
|
commitConnection() |
372 |
|
except DBError, err: |
373 |
|
rollbackConnection() |
374 |
|
message = "Hay problemas para grabar " |
375 |
|
if postChangeAdvance == 0: |
376 |
|
message += "la Factura" |
377 |
|
elif postChangeAdvance == 1: |
378 |
|
message += "el número de la Factura" |
379 |
|
elif postChangeAdvance == 2: |
380 |
|
message += "el procedimiento General" |
381 |
|
elif postChangeAdvance == 3: |
382 |
|
message += "el procedimiento de la Factura" |
383 |
|
elif postChangeAdvance == 4: |
384 |
|
message += "las monedas de pago de la Factura" |
385 |
|
elif postChangeAdvance == 5: |
386 |
|
message += "el stock" |
387 |
|
genericBox(mesagge+"\n"+str(err),['Aceptar']) |
388 |
|
|
389 |
</trigger> |
</trigger> |
390 |
|
|
391 |
<trigger name="rollbackTrigger" type="NAMED"> |
<trigger name="rollbackTrigger" type="NAMED"> |
392 |
tmpValuesDataSource.priceTypeId = None |
tmpValuesDataSource.priceTypeId = None |
393 |
for block in form._object._blockList: |
|
394 |
block.processRollback () |
clear() |
395 |
|
|
396 |
ownDocumentBlock.newRecord() |
ownDocumentBlock.newRecord() |
397 |
|
|
401 |
<trigger name="startUp" type="On-Startup"> |
<trigger name="startUp" type="On-Startup"> |
402 |
tmpValuesDataSource.priceTypeId = None |
tmpValuesDataSource.priceTypeId = None |
403 |
tmpValuesDataSource.onSwitch = "0" |
tmpValuesDataSource.onSwitch = "0" |
404 |
ownOrganizationBlock.processRollback() |
ownOrganizationBlock.clear() |
405 |
ownOrganizationBlock.initQuery() |
ownOrganizationBlock.initQuery() |
406 |
ownOrganizationBlock.processQuery() |
ownOrganizationBlock.processQuery() |
407 |
tmpValuesDataSource.ownIVACond = str(ownOrganizationBlock.condIVAEntry) |
tmpValuesDataSource.ownIVACond = str(ownOrganizationBlock.condIVAEntry) |
410 |
|
|
411 |
<trigger name="quitTrigger" type="NAMED"> |
<trigger name="quitTrigger" type="NAMED"> |
412 |
callTrigger('rollbackTrigger') |
callTrigger('rollbackTrigger') |
|
ownDocumentBlock.processRollback() |
|
413 |
exit() |
exit() |
414 |
</trigger> |
</trigger> |
415 |
|
|
603 |
<label name="numberLabel" text="Número de Nota de Crédito:" x="32" y="1"/> |
<label name="numberLabel" text="Número de Nota de Crédito:" x="32" y="1"/> |
604 |
</block> |
</block> |
605 |
<!-- # de la nota de crédito --> |
<!-- # de la nota de crédito --> |
606 |
<neb:Sub neb:src="posDocument.nebc" documentType="ownDocumentBlock.typeEntry" |
<neb:Sub neb:src="posDocument.nebc" documentType="ownDocumentBlock.typeEntry" |
607 |
|
ownPosBlock="ownPosBlock" stockByInvoice="stockByInvoice" |
608 |
ownPosDocumentBlock="ownPosDocumentBlock " documentNumberEntry="documentNumberEntry" |
ownPosDocumentBlock="ownPosDocumentBlock " documentNumberEntry="documentNumberEntry" |
609 |
documentNumberEntryX="65" documentNumberEntryY="1" |
documentNumberEntryX="65" documentNumberEntryY="1" searchNextDocumentNumber="searchNextCreditNoteNumber" > |
|
searchNextDocumentNumber="searchNextCreditNoteNumber" > |
|
610 |
</neb:Sub> |
</neb:Sub> |
|
|
|
611 |
</box> |
</box> |
612 |
|
|
613 |
<!-- ******************************** --> |
<!-- ******************************** --> |
732 |
priceTypeBlock.processQuery() |
priceTypeBlock.processQuery() |
733 |
search_id = str(priceTypeBlock.priceTypeParentId) |
search_id = str(priceTypeBlock.priceTypeParentId) |
734 |
priceListsChain.append("%s" % priceTypeBlock.priceTypeId) |
priceListsChain.append("%s" % priceTypeBlock.priceTypeId) |
735 |
tmpProdResultBlock.processRollback() |
tmpProdResultBlock.clear() |
736 |
tmpProdResultBlock.initQuery() |
tmpProdResultBlock.initQuery() |
737 |
tmpProdResultBlock.prodNameEntry = ("%s" % ownItemBlock.prodNameSEntry)+"%" |
tmpProdResultBlock.prodNameEntry = ("%s" % ownItemBlock.prodNameSEntry)+"%" |
738 |
tmpProdResultBlock.prodCodeEntry = ("%s" % ownItemBlock.prodCodeSEntry)+"%" |
tmpProdResultBlock.prodCodeEntry = ("%s" % ownItemBlock.prodCodeSEntry)+"%" |
741 |
# cargar la parte visible de modificacion de precios |
# cargar la parte visible de modificacion de precios |
742 |
tmpProdResultBlock.firstRecord() |
tmpProdResultBlock.firstRecord() |
743 |
product_id_anterior = None |
product_id_anterior = None |
744 |
prodResultBlock.processRollback() |
prodResultBlock.clear() |
745 |
for index in range(tmpProdResultBlock.getRecordCount()): |
for index in range(tmpProdResultBlock.getRecordCount()): |
746 |
product_id=("%s" %tmpProdResultBlock.prodIdEntry) |
product_id=("%s" %tmpProdResultBlock.prodIdEntry) |
747 |
if product_id != product_id_anterior: |
if product_id != product_id_anterior: |