756 |
currencyTypeBlock.currencyBox.idEntry = rs.current.getField("_table") |
currencyTypeBlock.currencyBox.idEntry = rs.current.getField("_table") |
757 |
currencyTypeBlock.currencyBox.nameEntry = rs.current.getField("name") |
currencyTypeBlock.currencyBox.nameEntry = rs.current.getField("name") |
758 |
currencyTypeBlock.currencyBox.rateEntry = hack.a2f(rs.current.getField("rate")) |
currencyTypeBlock.currencyBox.rateEntry = hack.a2f(rs.current.getField("rate")) |
759 |
monto = hack.a2f(payBlock.cashEntry) / hack.a2f(rs.current.getField("rate")) |
monto = hack.a2f(hack.a2f(payBlock.cashEntry) / hack.a2f(rs.current.getField("rate")),2) |
760 |
currencyTypeBlock.currencyBox.formatEntry = rs.current.getField("format") |
currencyTypeBlock.currencyBox.formatEntry = rs.current.getField("format") |
761 |
currencyTypeBlock.currencyBox.amountEntry = str(currencyTypeBlock.currencyBox.formatEntry) % monto |
currencyTypeBlock.currencyBox.amountEntry = str(currencyTypeBlock.currencyBox.formatEntry) % monto |
762 |
currencyTypeBlock.currencyBox.payEntry = 0.0 |
currencyTypeBlock.currencyBox.payEntry = 0.0 |
781 |
for recNum in range(rc): |
for recNum in range(rc): |
782 |
currencyTypeBlock.jumpRecord(recNum) |
currencyTypeBlock.jumpRecord(recNum) |
783 |
if hack.a2f(currencyTypeBlock.currencyBox.payEntry) > 0: |
if hack.a2f(currencyTypeBlock.currencyBox.payEntry) > 0: |
784 |
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) |
785 |
|
|
786 |
rc = currencyTypeBlock.getRecordCount() |
rc = currencyTypeBlock.getRecordCount() |
787 |
for recNum in range(rc): |
for recNum in range(rc): |
788 |
currencyTypeBlock.jumpRecord(recNum) |
currencyTypeBlock.jumpRecord(recNum) |
789 |
if hack.a2f(currencyTypeBlock.currencyBox.rateEntry) > 0: |
if hack.a2f(currencyTypeBlock.currencyBox.rateEntry) > 0: |
790 |
monto = total / hack.a2f(currencyTypeBlock.currencyBox.rateEntry) |
monto = hack.a2f(total / hack.a2f(currencyTypeBlock.currencyBox.rateEntry),2) |
791 |
currencyTypeBlock.currencyBox.amountEntry = str(currencyTypeBlock.currencyBox.formatEntry) % monto |
currencyTypeBlock.currencyBox.amountEntry = str(currencyTypeBlock.currencyBox.formatEntry) % monto |
792 |
|
|
793 |
]]></trigger> |
]]></trigger> |
804 |
for recNum in range(rc): |
for recNum in range(rc): |
805 |
currencyTypeBlock.jumpRecord(recNum) |
currencyTypeBlock.jumpRecord(recNum) |
806 |
if hack.a2f(currencyTypeBlock.currencyBox.rateEntry) > 0: |
if hack.a2f(currencyTypeBlock.currencyBox.rateEntry) > 0: |
807 |
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) |
808 |
|
|
809 |
if total > 0: |
if total != 0: |
810 |
genericBox("El los montos no completan el total del documento\n",['Aceptar']) |
genericBox("El los montos no completan el total del documento\n",['Aceptar']) |
811 |
else: |
else: |
812 |
callTrigger('startWaitingModeTrigger') |
callTrigger('startWaitingModeTrigger') |