/[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.6 by charlie, Tue Jun 3 20:50:21 2003 UTC revision 1.7 by apronotti, Thu Jun 5 19:51:12 2003 UTC
# Line 53  if hack.a2f(payBlock.cashAmountEntry,2) Line 53  if hack.a2f(payBlock.cashAmountEntry,2)
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):
# Line 66  if hack.a2f(payBlock.cashAmountEntry,2) Line 66  if hack.a2f(payBlock.cashAmountEntry,2)
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')
# Line 77  total = hack.a2f(payBlock.cashAmountEntr Line 76  total = hack.a2f(payBlock.cashAmountEntr
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        ]]>        ]]>

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

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