53 |
for recNum in range(rc): |
for recNum in range(rc): |
54 |
currencyTypeBlock.jumpRecord(recNum) |
currencyTypeBlock.jumpRecord(recNum) |
55 |
if hack.a2f(currencyTypeBlock.currencyBox.payEntry,2) > 0: |
if hack.a2f(currencyTypeBlock.currencyBox.payEntry,2) > 0: |
56 |
total -= round(hack.a2f(currencyTypeBlock.currencyBox.payEntry,2) * hack.a2f(currencyTypeBlock.currencyBox.rateEntry),2) |
total -= round(hack.a2f(currencyTypeBlock.currencyBox.payEntry,2) * hack.a2f(currencyTypeBlock.currencyBox.rateEntry,2),2) |
57 |
|
|
58 |
rc = currencyTypeBlock.getRecordCount() |
rc = currencyTypeBlock.getRecordCount() |
59 |
for recNum in range(rc): |
for recNum in range(rc): |
66 |
|
|
67 |
<trigger type="NAMED" name="endTypeCurrencyTrigger"> |
<trigger type="NAMED" name="endTypeCurrencyTrigger"> |
68 |
<![CDATA[ |
<![CDATA[ |
|
|
|
69 |
import hack |
import hack |
70 |
|
|
71 |
callTrigger('currencyTypeTrigger') |
callTrigger('currencyTypeTrigger') |
76 |
rc = currencyTypeBlock.getRecordCount() |
rc = currencyTypeBlock.getRecordCount() |
77 |
for recNum in range(rc): |
for recNum in range(rc): |
78 |
currencyTypeBlock.jumpRecord(recNum) |
currencyTypeBlock.jumpRecord(recNum) |
79 |
if hack.a2f(currencyTypeBlock.currencyBox.rateEntry) > 0: |
if hack.a2f(currencyTypeBlock.currencyBox.rateEntry,2) > 0: |
80 |
total -= round(hack.a2f(currencyTypeBlock.currencyBox.payEntry) * hack.a2f(currencyTypeBlock.currencyBox.rateEntry),2) |
total -= round(hack.a2f(currencyTypeBlock.currencyBox.payEntry,2) * hack.a2f(currencyTypeBlock.currencyBox.rateEntry,2),2) |
81 |
|
|
82 |
if total != 0: |
if round(total,2) != 0: |
83 |
genericBox("El los montos no completan el total del documento\n",['Aceptar']) |
genericBox("El los montos no completan el total del documento\n",['Aceptar']) |
84 |
else: |
else: |
85 |
currencyMovementBlock = getParameter ('currency') |
currencyMovementBlock = getParameter ('currency') |
86 |
rc = currencyTypeBlock.getRecordCount() |
rc = currencyTypeBlock.getRecordCount() |
87 |
for recNum in range(rc): |
for recNum in range(rc): |
88 |
currencyTypeBlock.jumpRecord(recNum) |
currencyTypeBlock.jumpRecord(recNum) |
89 |
if hack.a2f(currencyTypeBlock.currencyBox.payEntry) > 0: |
if hack.a2f(currencyTypeBlock.currencyBox.payEntry,2) > 0: |
90 |
if not currencyMovementBlock.getCurrentRecord().isEmpty(): |
if not currencyMovementBlock.getCurrentRecord().isEmpty(): |
91 |
currencyMovementBlock.newRecord() |
currencyMovementBlock.newRecord() |
92 |
currencyMovementBlock.currencyTypeEntry = str(currencyTypeBlock.currencyBox.idEntry) |
currencyMovementBlock.currencyTypeEntry = str(currencyTypeBlock.currencyBox.idEntry) |
93 |
currencyMovementBlock.amountEntry = str(round(hack.a2f(currencyTypeBlock.currencyBox.payEntry) * hack.a2f(currencyTypeBlock.currencyBox.rateEntry),2)) |
currencyMovementBlock.amountEntry = str(round(hack.a2f(currencyTypeBlock.currencyBox.payEntry,2) * hack.a2f(currencyTypeBlock.currencyBox.rateEntry,2),2)) |
94 |
tmpBlock.returnEntity = str(1) |
tmpBlock.returnEntity = str(1) |
95 |
exit() |
exit() |
96 |
]]> |
]]> |