From: <Ex...@us...> - 2012-05-14 02:33:28
|
Revision: 5355 http://web-erp.svn.sourceforge.net/web-erp/?rev=5355&view=rev Author: ExsonQu Date: 2012-05-14 02:33:22 +0000 (Mon, 14 May 2012) Log Message: ----------- 14/5/2012 Exson: Fixed bug that when users input a Exchang Rate manually, when ones changed minds and select another currency, it'll show the suggested rate correctly. Modified Paths: -------------- trunk/Payments.php Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2012-05-14 02:21:45 UTC (rev 5354) +++ trunk/Payments.php 2012-05-14 02:33:22 UTC (rev 5355) @@ -841,7 +841,7 @@ } if ($_POST['ExRate']==1 AND isset($SuggestedExRate)){ $_POST['ExRate'] = locale_number_format($SuggestedExRate,6); - }elseif(isset($_POST['SuggestedExRate1']) and $_POST['ExRate']==locale_number_format($_POST['SuggestedExRate1'],6) and isset($SuggestedExRate)){ + }elseif($_POST['Currency'] != $_POST['PreviousCurrency'] and isset($SuggestedExRate)){ $_POST['ExRate'] = locale_number_format($SuggestedExRate,6); } @@ -903,12 +903,12 @@ echo '<tr> <td>' . _('Reference / Narrative') . ':</td> <td colspan="2"><input type="text" name="Narrative" maxlength="80" size="82" value="' . $_POST['Narrative'] . '" /> ' . _('(Max. length 80 characters)') . '</td> - </tr>'; -echo '<tr>'; - if(isset($SuggestedExRate)){ - echo '<td><input type="hidden" name="SuggestedExRate1" value="'.$SuggestedExRate.'" /></td>'; - } -echo ' + </tr> + + + <td><input type="hidden" name="PreviousCurrency" value="'.$_POST['Currency'].'" /></td> + + <td colspan="3"><div class="centre"><input type="submit" name="UpdateHeader" value="' . _('Update'). '" /></div></td> </tr>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |