From: <tim...@us...> - 2010-07-03 21:44:54
|
Revision: 3548 http://web-erp.svn.sourceforge.net/web-erp/?rev=3548&view=rev Author: tim_schofield Date: 2010-07-03 21:44:46 +0000 (Sat, 03 Jul 2010) Log Message: ----------- Corrections to sql statements and layout changes Modified Paths: -------------- trunk/BankMatching.php trunk/doc/Change.log.html Modified: trunk/BankMatching.php =================================================================== --- trunk/BankMatching.php 2010-07-03 21:44:25 UTC (rev 3547) +++ trunk/BankMatching.php 2010-07-03 21:44:46 UTC (rev 3548) @@ -36,7 +36,7 @@ $sql = 'SELECT amount, exrate FROM banktrans - WHERE banktransid=' . $_POST['BankTrans_' . $Counter]; + WHERE banktransid="' . $_POST['BankTrans_' . $Counter].'"'; $ErrMsg = _('Could not retrieve transaction information'); $result = DB_query($sql,$db,$ErrMsg); $myrow=DB_fetch_array($result); @@ -53,14 +53,14 @@ ($Type=='Receipts' AND (isset($_POST['AmtClear_' . $Counter]) and $_POST['AmtClear_' . $Counter]>0)))){ /*if the amount entered was numeric and negative for a payment or positive for a receipt */ $sql = 'UPDATE banktrans SET amountcleared=' . $_POST['AmtClear_' . $Counter] . ' - WHERE banktransid=' . $_POST['BankTrans_' . $Counter]; + WHERE banktransid="' . $_POST['BankTrans_' . $Counter].'"'; $ErrMsg = _('Could not update the amount matched off this bank transaction because'); $result = DB_query($sql,$db,$ErrMsg); } elseif (isset($_POST['Unclear_' . $Counter]) and $_POST['Unclear_' . $Counter]==True){ $sql = 'UPDATE banktrans SET amountcleared = 0 - WHERE banktransid=' . $_POST['BankTrans_' . $Counter]; + WHERE banktransid="' . $_POST['BankTrans_' . $Counter].'"'; $ErrMsg = _('Could not unclear this bank transaction because'); $result = DB_query($sql,$db,$ErrMsg); } @@ -75,7 +75,7 @@ echo '<input type="hidden" name="Type" Value="' . $Type . '">'; -echo '<table><tr>'; +echo '<table class=selection><tr>'; echo '<td align=left>' . _('Bank Account') . ':</td><td colspan=3><select tabindex="1" name="BankAccount">'; $sql = 'SELECT accountcode, bankaccountname FROM bankaccounts'; @@ -127,7 +127,7 @@ echo '</select></td></tr>'; -echo '</table><div class="centre"><input tabindex="6" type=submit name="ShowTransactions" VALUE="' . _('Show selected') . ' ' . $TypeName . '">'; +echo '</table><br><div class="centre"><input tabindex="6" type=submit name="ShowTransactions" VALUE="' . _('Show selected') . ' ' . $TypeName . '">'; echo "<p><a href='$rootpath/BankReconciliation.php?" . SID . "'>" . _('Show reconciliation') . '</a></div>'; echo '<hr>'; @@ -162,7 +162,7 @@ WHERE amount <0 AND transdate >= '". $SQLAfterDate . "' AND transdate <= '" . $SQLBeforeDate . "' - AND bankact=" .$_POST["BankAccount"] . " + AND bankact='" .$_POST["BankAccount"] . "' ORDER BY transdate"; } else { /* Type must == Receipts */ @@ -176,7 +176,7 @@ WHERE amount >0 AND transdate >= '". $SQLAfterDate . "' AND transdate <= '" . $SQLBeforeDate . "' - AND bankact=" .$_POST['BankAccount'] . " + AND bankact='" .$_POST['BankAccount'] . "' ORDER BY transdate"; } } else { /*it must be only the outstanding bank trans required */ @@ -205,7 +205,7 @@ WHERE amount >0 AND transdate >= '". $SQLAfterDate . "' AND transdate <= '" . $SQLBeforeDate . "' - AND bankact=" .$_POST["BankAccount"] . " + AND bankact='" .$_POST["BankAccount"] . "' AND ABS(amountcleared - (amount / exrate)) > 0.009 ORDER BY transdate"; } @@ -224,7 +224,7 @@ <th>' . _('Outstanding') . '</th> <th colspan=3>' . _('Clear') . ' / ' . _('Unclear') . '</th> </tr>'; - echo '<table cellpadding=2 BORDER=2>' . $TableHeader; + echo '<table cellpadding=2 class=selection>' . $TableHeader; $j = 1; //page length counter @@ -295,10 +295,10 @@ } //end of while loop - echo '</table><div class="centre"><input type=hidden name="RowCounter" value=' . $i . '><input type=submit name="Update" VALUE="' . _('Update Matching') . '"></div>'; + echo '</table><br><div class="centre"><input type=hidden name="RowCounter" value=' . $i . '><input type=submit name="Update" VALUE="' . _('Update Matching') . '"></div>'; } echo '</form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-07-03 21:44:25 UTC (rev 3547) +++ trunk/doc/Change.log.html 2010-07-03 21:44:46 UTC (rev 3548) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>03/07/10 Tim: BankMatching.php - Corrections to sql statements and layout changes</p> <p>03/07/10 Tim: BankAccounts.php - Layout changes</p> <p>03/07/10 Tim: AddCustomerTypeNotes.php - Layout changes and verify Type ID before query</p> <p>03/07/10 Tim: AddCustomerNotes.php - Verify Contact ID before query</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |