33 |
currencyTypeBlock.currencyBox.idEntry = rs.current.getField("_table") |
currencyTypeBlock.currencyBox.idEntry = rs.current.getField("_table") |
34 |
currencyTypeBlock.currencyBox.nameEntry = rs.current.getField("name") |
currencyTypeBlock.currencyBox.nameEntry = rs.current.getField("name") |
35 |
currencyTypeBlock.currencyBox.rateEntry = hack.a2f(rs.current.getField("rate")) |
currencyTypeBlock.currencyBox.rateEntry = hack.a2f(rs.current.getField("rate")) |
36 |
monto = hack.a2f(payBlock.cashAmountEntry) / hack.a2f(rs.current.getField("rate")) |
monto = hack.a2f(hack.a2f(payBlock.cashAmountEntry) / hack.a2f(rs.current.getField("rate")),2) |
37 |
currencyTypeBlock.currencyBox.formatEntry = rs.current.getField("format") |
currencyTypeBlock.currencyBox.formatEntry = rs.current.getField("format") |
38 |
currencyTypeBlock.currencyBox.amountEntry = str(currencyTypeBlock.currencyBox.formatEntry) % monto |
currencyTypeBlock.currencyBox.amountEntry = str(currencyTypeBlock.currencyBox.formatEntry) % monto |
39 |
currencyTypeBlock.currencyBox.payEntry = 0.0 |
currencyTypeBlock.currencyBox.payEntry = 0.0 |
52 |
for recNum in range(rc): |
for recNum in range(rc): |
53 |
currencyTypeBlock.jumpRecord(recNum) |
currencyTypeBlock.jumpRecord(recNum) |
54 |
if hack.a2f(currencyTypeBlock.currencyBox.payEntry) > 0: |
if hack.a2f(currencyTypeBlock.currencyBox.payEntry) > 0: |
55 |
total -= hack.a2f(currencyTypeBlock.currencyBox.payEntry) * hack.a2f(currencyTypeBlock.currencyBox.rateEntry) |
total -= hack.a2f(hack.a2f(currencyTypeBlock.currencyBox.payEntry) * hack.a2f(currencyTypeBlock.currencyBox.rateEntry),2) |
56 |
|
|
57 |
rc = currencyTypeBlock.getRecordCount() |
rc = currencyTypeBlock.getRecordCount() |
58 |
for recNum in range(rc): |
for recNum in range(rc): |
59 |
currencyTypeBlock.jumpRecord(recNum) |
currencyTypeBlock.jumpRecord(recNum) |
60 |
if hack.a2f(currencyTypeBlock.currencyBox.rateEntry) > 0: |
if hack.a2f(currencyTypeBlock.currencyBox.rateEntry) > 0: |
61 |
monto = total / hack.a2f(currencyTypeBlock.currencyBox.rateEntry) |
monto = hack.a2f(total / hack.a2f(currencyTypeBlock.currencyBox.rateEntry),2) |
62 |
currencyTypeBlock.currencyBox.amountEntry = str(currencyTypeBlock.currencyBox.formatEntry) % monto |
currencyTypeBlock.currencyBox.amountEntry = str(currencyTypeBlock.currencyBox.formatEntry) % monto |
63 |
|
|
64 |
]]></trigger> |
]]></trigger> |
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) > 0: |
80 |
total -= hack.a2f(currencyTypeBlock.currencyBox.payEntry) * hack.a2f(currencyTypeBlock.currencyBox.rateEntry) |
total -= hack.a2f(hack.a2f(currencyTypeBlock.currencyBox.payEntry) * hack.a2f(currencyTypeBlock.currencyBox.rateEntry),2) |
81 |
|
|
82 |
if total > 0: |
if total != 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') |
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(hack.a2f(currencyTypeBlock.currencyBox.payEntry) * hack.a2f(currencyTypeBlock.currencyBox.rateEntry)) |
currencyMovementBlock.amountEntry = str(hack.a2f(hack.a2f(currencyTypeBlock.currencyBox.payEntry) * hack.a2f(currencyTypeBlock.currencyBox.rateEntry),2)) |
94 |
tmpBlock.returnEntity = str(1) |
tmpBlock.returnEntity = str(1) |
95 |
exit() |
exit() |
96 |
]]> |
]]> |