/[papo]/papo/forms/providerMultiCurrency.neb
ViewVC logotype

Diff of /papo/forms/providerMultiCurrency.neb

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by charlie, Wed May 28 20:02:28 2003 UTC revision 1.3 by charlie, Thu May 29 21:33:37 2003 UTC
# Line 33  if hack.a2f(payBlock.cashAmountEntry) > Line 33  if hack.a2f(payBlock.cashAmountEntry) >
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
# Line 52  rc = currencyTypeBlock.getRecordCount() Line 52  rc = currencyTypeBlock.getRecordCount()
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>
# Line 77  rc = currencyTypeBlock.getRecordCount() Line 77  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) > 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')
# Line 90  else: Line 90  else:
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        ]]>        ]]>

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26