From: <rc...@us...> - 2016-08-17 13:22:44
|
Revision: 7592 http://sourceforge.net/p/web-erp/reponame/7592 Author: rchacon Date: 2016-08-17 13:22:42 +0000 (Wed, 17 Aug 2016) Log Message: ----------- In CustWhereAlloc.php and SuppWhereAlloc.php, use the ConvertSQLDate() function for the dates. Modified Paths: -------------- trunk/CustWhereAlloc.php trunk/SuppWhereAlloc.php trunk/doc/Change.log Modified: trunk/CustWhereAlloc.php =================================================================== --- trunk/CustWhereAlloc.php 2016-08-16 13:33:08 UTC (rev 7591) +++ trunk/CustWhereAlloc.php 2016-08-17 13:22:42 UTC (rev 7592) @@ -8,7 +8,7 @@ $BookMark = 'WhereAllocated'; include('includes/header.inc'); -if (isset($_GET['TransNo']) AND isset($_GET['TransType'])) { +if(isset($_GET['TransNo']) AND isset($_GET['TransType'])) { $_POST['TransNo'] = (int)$_GET['TransNo']; $_POST['TransType'] = (int)$_GET['TransType']; $_POST['ShowResults'] = true; @@ -26,18 +26,18 @@ <td>' . _('Type') . ':</td> <td><select tabindex="1" name="TransType"> '; -if (!isset($_POST['TransType'])){ +if(!isset($_POST['TransType'])) { $_POST['TransType']='10'; } -if ($_POST['TransType']==10){ +if($_POST['TransType']==10) { echo '<option selected="selected" value="10">' . _('Invoice') . '</option> <option value="12">' . _('Receipt') . '</option> <option value="11">' . _('Credit Note') . '</option>'; -} elseif ($_POST['TransType'] == 12) { +} elseif($_POST['TransType'] == 12) { echo '<option selected="selected" value="12">' . _('Receipt') . '</option> <option value="10">' . _('Invoice') . '</option> <option value="11">' . _('Credit Note') . '</option>'; -} elseif ($_POST['TransType'] == 11) { +} elseif($_POST['TransType'] == 11) { echo '<option selected="selected" value="11">' . _('Credit Note') . '</option> <option value="10">' . _('Invoice') . '</option> <option value="12">' . _('Receipt') . '</option>'; @@ -45,7 +45,7 @@ echo '</select></td>'; -if (!isset($_POST['TransNo'])) {$_POST['TransNo']='';} +if(!isset($_POST['TransNo'])) {$_POST['TransNo']='';} echo '<td>' . _('Transaction Number').':</td> <td><input tabindex="2" type="text" class="number" name="TransNo" required="required" maxlength="10" size="10" value="'. $_POST['TransNo'] . '" /></td> </tr> @@ -55,7 +55,7 @@ <input tabindex="3" type="submit" name="ShowResults" value="' . _('Show How Allocated') . '" /> </div>'; -if (isset($_POST['ShowResults']) AND $_POST['TransNo']==''){ +if(isset($_POST['ShowResults']) AND $_POST['TransNo']=='') { echo '<br />'; prnMsg(_('The transaction number to be queried must be entered first'),'warn'); } @@ -74,12 +74,12 @@ WHERE type='" . $_POST['TransType'] . "' AND transno = '" . $_POST['TransNo']."'"; - if ($_SESSION['SalesmanLogin'] != '') { + if($_SESSION['SalesmanLogin'] != '') { $sql .= " AND debtortrans.salesperson='" . $_SESSION['SalesmanLogin'] . "'"; } $result = DB_query($sql ); - if (DB_num_rows($result)==1){ + if(DB_num_rows($result)==1) { $myrow = DB_fetch_array($result); $AllocToID = $myrow['id']; $CurrCode = $myrow['currcode']; @@ -94,7 +94,7 @@ custallocns.amt FROM debtortrans INNER JOIN custallocns "; - if ($_POST['TransType']==12 OR $_POST['TransType'] == 11){ + if($_POST['TransType']==12 OR $_POST['TransType'] == 11) { $TitleInfo = ($_POST['TransType'] == 12)?_('Receipt'):_('Credit Note'); $sql .= "ON debtortrans.id = custallocns.transid_allocto @@ -109,9 +109,9 @@ $ErrMsg = _('The customer transactions for the selected criteria could not be retrieved because'); $TransResult = DB_query($sql, $ErrMsg); - if (DB_num_rows($TransResult)==0){ + if(DB_num_rows($TransResult)==0) { - if ($myrow['totamt']<0 AND ($_POST['TransType']==12 OR $_POST['TransType'] == 11)){ + if($myrow['totamt']<0 AND ($_POST['TransType']==12 OR $_POST['TransType'] == 11)) { prnMsg(_('This transaction was a receipt of funds and there can be no allocations of receipts or credits to a receipt. This inquiry is meant to be used to see how a payment which is entered as a negative receipt is settled against credit notes or receipts'),'info'); } else { prnMsg(_('There are no allocations made against this transaction'),'info'); @@ -155,14 +155,14 @@ $k++; } - if ($myrow['type']==11){ + if($myrow['type']==11) { $TransType = _('Credit Note'); - } elseif ($myrow['type'] == 10){ + } elseif($myrow['type'] == 10) { $TransType = _('Invoice'); } else { $TransType = _('Receipt'); } - echo ' <td class="centre">' . $myrow['trandate'] . '</td> + echo ' <td class="centre">', ConvertSQLDate($myrow['trandate']), '</td> <td class="text">' . $TransType . '</td> <td class="number">' . $myrow['transno'] . '</td> <td class="text">' . $myrow['reference'] . '</td> @@ -172,7 +172,7 @@ </tr>'; $RowCounter++; - If ($RowCounter == 12){ + if($RowCounter == 12) { $RowCounter=1; echo $TableHeader; } @@ -181,7 +181,7 @@ } //end of while loop echo '<tr> - <td colspan="6" class="number">' . _('Total allocated') . '</td> + <td class="number" colspan="6">' . _('Total allocated') . '</td> <td class="number">' . locale_number_format($AllocsTotal,$CurrDecimalPlaces) . '</td> </tr> @@ -192,7 +192,7 @@ } echo '</div>'; echo '</form>'; -if (isset($Printer)) { +if(isset($Printer)) { echo '<div class="centre noprint"> <button onclick="javascript:window.print()" type="button"><img alt="" src="' . $RootPath . '/css/' . $Theme . '/images/printer.png" /> ' . @@ -201,4 +201,4 @@ </div>';// "Print This" button. } include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/SuppWhereAlloc.php =================================================================== --- trunk/SuppWhereAlloc.php 2016-08-16 13:33:08 UTC (rev 7591) +++ trunk/SuppWhereAlloc.php 2016-08-17 13:22:42 UTC (rev 7592) @@ -8,7 +8,7 @@ $BookMark = 'WhereAllocated'; include('includes/header.inc'); -if (isset($_GET['TransNo']) AND isset($_GET['TransType'])) { +if(isset($_GET['TransNo']) AND isset($_GET['TransType'])) { $_POST['TransNo'] = (int)$_GET['TransNo']; $_POST['TransType'] = (int)$_GET['TransType']; $_POST['ShowResults'] = true; @@ -26,18 +26,18 @@ <td>' . _('Type') . ':</td> <td><select tabindex="1" name="TransType"> '; -if (!isset($_POST['TransType'])){ +if(!isset($_POST['TransType'])) { $_POST['TransType']='20'; } -if ($_POST['TransType']==20){ +if($_POST['TransType']==20) { echo '<option selected="selected" value="20">' . _('Purchase Invoice') . '</option> <option value="22">' . _('Payment') . '</option> <option value="21">' . _('Debit Note') . '</option>'; -} elseif ($_POST['TransType'] == 22) { +} elseif($_POST['TransType'] == 22) { echo '<option selected="selected" value="22">' . _('Payment') . '</option> <option value="20">' . _('Purchase Invoice') . '</option> <option value="21">' . _('Debit Note') . '</option>'; -} elseif ($_POST['TransType'] == 21) { +} elseif($_POST['TransType'] == 21) { echo '<option selected="selected" value="21">' . _('Debit Note') . '</option> <option value="20">' . _('Purchase Invoice') . '</option> <option value="22">' . _('Payment') . '</option>'; @@ -45,7 +45,7 @@ echo '</select></td>'; -if (!isset($_POST['TransNo'])) {$_POST['TransNo']='';} +if(!isset($_POST['TransNo'])) {$_POST['TransNo']='';} echo '<td>' . _('Transaction Number').':</td> <td><input tabindex="2" type="text" class="number" name="TransNo" required="required" maxlength="20" size="20" value="'. $_POST['TransNo'] . '" /></td> </tr> @@ -55,12 +55,12 @@ <input tabindex="3" type="submit" name="ShowResults" value="' . _('Show How Allocated') . '" /> </div>'; -if (isset($_POST['ShowResults']) AND $_POST['TransNo']==''){ +if(isset($_POST['ShowResults']) AND $_POST['TransNo']=='') { echo '<br />'; prnMsg(_('The transaction number to be queried must be entered first'),'warn'); } -if (isset($_POST['ShowResults']) AND $_POST['TransNo']!=''){ +if(isset($_POST['ShowResults']) AND $_POST['TransNo']!='') { /*First off get the DebtorTransID of the transaction (invoice normally) selected */ $sql = "SELECT supptrans.id, @@ -74,12 +74,12 @@ WHERE type='" . $_POST['TransType'] . "' AND transno = '" . $_POST['TransNo']."'"; - if ($_SESSION['SalesmanLogin'] != '') { + if($_SESSION['SalesmanLogin'] != '') { $sql .= " AND supptrans.salesperson='" . $_SESSION['SalesmanLogin'] . "'"; } $result = DB_query($sql); - if (DB_num_rows($result)==1){ + if(DB_num_rows($result)==1) { $myrow = DB_fetch_array($result); $AllocToID = $myrow['id']; $CurrCode = $myrow['currcode']; @@ -94,7 +94,7 @@ suppallocs.amt FROM supptrans INNER JOIN suppallocs "; - if ($_POST['TransType']==22 OR $_POST['TransType'] == 21){ + if($_POST['TransType']==22 OR $_POST['TransType'] == 21) { $TitleInfo = ($_POST['TransType'] == 22)?_('Payment'):_('Debit Note'); $sql .= "ON supptrans.id = suppallocs.transid_allocto @@ -109,9 +109,9 @@ $ErrMsg = _('The customer transactions for the selected criteria could not be retrieved because'); $TransResult = DB_query($sql, $ErrMsg); - if (DB_num_rows($TransResult)==0){ + if(DB_num_rows($TransResult)==0) { - if ($myrow['totamt']>0 AND ($_POST['TransType']==22 OR $_POST['TransType'] == 21)){ + if($myrow['totamt']>0 AND ($_POST['TransType']==22 OR $_POST['TransType'] == 21)) { prnMsg(_('This transaction was a receipt of funds and there can be no allocations of receipts or credits to a receipt. This inquiry is meant to be used to see how a payment which is entered as a negative receipt is settled against credit notes or receipts'),'info'); } else { prnMsg(_('There are no allocations made against this transaction'),'info'); @@ -154,14 +154,14 @@ $k++; } - if ($myrow['type']==21){ + if($myrow['type']==21) { $TransType = _('Debit Note'); - } elseif ($myrow['type'] == 20){ + } elseif($myrow['type'] == 20) { $TransType = _('Purchase Invoice'); } else { $TransType = _('Payment'); } - echo ' <td class="centre">' . $myrow['trandate'] . '</td> + echo ' <td class="centre">', ConvertSQLDate($myrow['trandate']), '</td> <td class="text">' . $TransType . '</td> <td class="number">' . $myrow['transno'] . '</td> <td class="text">' . $myrow['suppreference'] . '</td> @@ -171,7 +171,7 @@ </tr>'; $RowCounter++; - If ($RowCounter == 22){ + if($RowCounter == 22) { $RowCounter=1; echo $TableHeader; } @@ -190,7 +190,7 @@ } echo '</div>'; echo '</form>'; -if (isset($Printer)) { +if(isset($Printer)) { echo '<div class="centre noprint"> <button onclick="javascript:window.print()" type="button"><img alt="" src="' . $RootPath . '/css/' . $Theme . '/images/printer.png" /> ' . @@ -199,4 +199,4 @@ </div>';// "Print This" button. } include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2016-08-16 13:33:08 UTC (rev 7591) +++ trunk/doc/Change.log 2016-08-17 13:22:42 UTC (rev 7592) @@ -1,5 +1,6 @@ webERP Change Log +17/8/16 RChacon committed for Tim: In CustWhereAlloc.php and SuppWhereAlloc.php, use the ConvertSQLDate() function for the dates. 14/8/16 RChacon:In SuppWhereAlloc.php, show transaction date in report. Improvements in HTML code and code documentation. 13/8/16 RChacon:In CustWhereAlloc.php, show transaction date in report. Standardise trandate in debtortrans. Improvements in HTML code and code documentation. 11/8/16 Phil: committed falkoners fix for the upgrade script - was not adding the new field in customercontact required for the customer statements email address |