212 |
<datasource name="proceedingDataSource" database="papo" table="proceeding"/> |
<datasource name="proceedingDataSource" database="papo" table="proceeding"/> |
213 |
|
|
214 |
<datasource name="ownDocumentProceedingDataSource" database="papo" table="own_document_proceeding"/> |
<datasource name="ownDocumentProceedingDataSource" database="papo" table="own_document_proceeding"/> |
|
<datasource name="currencyMovementDataSource" database="papo" |
|
|
table="movement, currency_movement"> |
|
|
<condition> |
|
|
<eq> |
|
|
<cfield name="movement.id"/> |
|
|
<cfield name="currency_movement.movement"/> |
|
|
</eq> |
|
|
</condition> |
|
|
</datasource> |
|
215 |
|
|
216 |
<datasource name="tmpInvToPayedDataSource" cache="1"/> |
<datasource name="tmpInvToPayedDataSource" cache="1"/> |
217 |
|
|
244 |
</condition> |
</condition> |
245 |
</datasource> |
</datasource> |
246 |
|
|
247 |
|
<datasource database="papo" name="currencyTypeResultDataSource" |
248 |
|
table="currency_type, _currency_type_data"> |
249 |
|
<condition> |
250 |
|
<and> |
251 |
|
<null> |
252 |
|
<cfield name="_currency_type_data._end_t"/> |
253 |
|
</null> |
254 |
|
<eq> |
255 |
|
<cfield name="_currency_type_data._table"/> |
256 |
|
<cfield name="currency_type.id"/> |
257 |
|
</eq> |
258 |
|
</and> |
259 |
|
</condition> |
260 |
|
</datasource> |
261 |
|
|
262 |
<trigger name="startUp" type="On-Startup"> |
<trigger name="startUp" type="On-Startup"> |
263 |
ownDocumentBlock.typeEntry = "3" |
ownDocumentBlock.typeEntry = "3" |
264 |
callTrigger('searchNextReceiptNumber') |
callTrigger('searchNextReceiptNumber') |
265 |
tmpBlock.tmpDateEntry = ownDocumentDataSource.getTimeStamp() |
tmpBlock.tmpDateEntry = ownDocumentDataSource.getTimeStamp() |
266 |
</trigger> |
</trigger> |
267 |
|
|
268 |
<trigger type="NAMED" name="showInvoiceToPayTrigger"><![CDATA[ |
<trigger type="NAMED" name="showInvoiceToPayTrigger"><![CDATA[ |
269 |
|
|
270 |
callTrigger('startWaitingModeTrigger') |
callTrigger('startWaitingModeTrigger') |
310 |
lBonus = hack.a2f(productInvoiceResultSet.current.getField("own_item.bonus")) |
lBonus = hack.a2f(productInvoiceResultSet.current.getField("own_item.bonus")) |
311 |
lDiscount = hack.a2f(productInvoiceResultSet.current.getField("own_item.discount")) |
lDiscount = hack.a2f(productInvoiceResultSet.current.getField("own_item.discount")) |
312 |
item = lQty * lUnitPrice - lBonus - lDiscount |
item = lQty * lUnitPrice - lBonus - lDiscount |
|
#print "qty %d * unit_price %d - bonus %d - discount %d = %d " % (lQty, lUnitPrice, lBonus, lDiscount, lQty * lUnitPrice - lBonus - lDiscount) |
|
313 |
itemTaxTotal = 0 |
itemTaxTotal = 0 |
314 |
currItem = productInvoiceResultSet.current.getField("own_item.id") |
currItem = productInvoiceResultSet.current.getField("own_item.id") |
315 |
while productInvoiceResultSet.current.getField("own_item.id") == currItem and more: |
while productInvoiceResultSet.current.getField("own_item.id") == currItem and more: |
389 |
|
|
390 |
<trigger type="NAMED" name="cancelTrigger"><![CDATA[ |
<trigger type="NAMED" name="cancelTrigger"><![CDATA[ |
391 |
import hack |
import hack |
392 |
|
|
393 |
tmpBlock.tmpDateEntry = ownDocumentDataSource.getTimeStamp() |
tmpBlock.tmpDateEntry = ownDocumentDataSource.getTimeStamp() |
394 |
ownDocumentBlock.clear() |
ownDocumentBlock.clear() |
395 |
tmpInvToPayedBlock.clear() |
tmpInvToPayedBlock.clear() |
404 |
import hack |
import hack |
405 |
import string |
import string |
406 |
import printing |
import printing |
407 |
|
from gnue.common.GDataObjects import ConnectionError as DBError |
408 |
|
|
409 |
# nro de documento |
# nro de documento |
410 |
ownDocumentBlock.numberEntry= str(ownPosDocumentBlock.documentNumberEntry) |
ownDocumentBlock.numberEntry= str(ownPosDocumentBlock.documentNumberEntry) |
474 |
line += printing.printField(invoiceToPayedBlock.invoiceBox.totalEntry,20,'r') + " | " |
line += printing.printField(invoiceToPayedBlock.invoiceBox.totalEntry,20,'r') + " | " |
475 |
table.append(line) |
table.append(line) |
476 |
|
|
477 |
ownDocumentBlock.commit() |
errorLevel = 0 |
478 |
|
try: |
479 |
|
ownDocumentBlock.postChanges() |
480 |
|
errorLevel += 1 |
481 |
|
proceedingBlock.postChanges() |
482 |
|
errorLevel += 1 |
483 |
|
currencyMovementBlock.postChanges() |
484 |
|
errorLevel += 1 |
485 |
|
ownDocumentProceedingBlock.postChanges() |
486 |
|
commitConnection() |
487 |
|
except DBError, err: |
488 |
|
rollbackConnection() |
489 |
|
reset() |
490 |
|
if errorLevel == 0: |
491 |
|
errorLabel = "OwnDocument" |
492 |
|
elif errorLevel == 1: |
493 |
|
errorLabel = "ProceedingBlock" |
494 |
|
elif errorLevel == 2: |
495 |
|
errorLabel = "CurrencyMovementBlock" |
496 |
|
elif errorLevel == 3: |
497 |
|
errorLabel = "OwnDocumentProceedingBlock" |
498 |
|
genericBox(str(err)+" En Tabla: "+errorLabel,['Aceptar']) |
499 |
|
|
500 |
callTrigger('cancelTrigger') |
callTrigger('cancelTrigger') |
501 |
printing.previewPrint(table) |
printing.previewPrint(table) |
502 |
|
|