|
From: <dai...@us...> - 2011-11-23 09:22:46
|
Revision: 4751
http://web-erp.svn.sourceforge.net/web-erp/?rev=4751&view=rev
Author: daintree
Date: 2011-11-23 09:22:39 +0000 (Wed, 23 Nov 2011)
Log Message:
-----------
number format changes
Modified Paths:
--------------
trunk/SalesCategories.php
trunk/StockCategories.php
trunk/StockSerialItems.php
trunk/doc/Change.log
Modified: trunk/SalesCategories.php
===================================================================
--- trunk/SalesCategories.php 2011-11-21 09:25:54 UTC (rev 4750)
+++ trunk/SalesCategories.php 2011-11-23 09:22:39 UTC (rev 4751)
@@ -21,6 +21,7 @@
} else if (isset($_POST['ParentCategory'])){
$ParentCategory = mb_strtoupper($_POST['ParentCategory']);
}
+
if(isset($ParentCategory) AND $ParentCategory == 0 ) {
unset($ParentCategory);
}
@@ -164,7 +165,7 @@
$CategoryPath = '<a href="'.htmlspecialchars($_SERVER['PHP_SELF']) . '?ParentCategory=0">' . _('Main') . '</a>' . " \\ ";
$TempPath = '';
-if (isset($ParentCategory)){
+if (!isset($ParentCategory)){
$ParentCategory=0;
}
Modified: trunk/StockCategories.php
===================================================================
--- trunk/StockCategories.php 2011-11-21 09:25:54 UTC (rev 4750)
+++ trunk/StockCategories.php 2011-11-23 09:22:39 UTC (rev 4751)
@@ -55,11 +55,11 @@
}
for ($i=0;$i<=$_POST['PropertyCounter'];$i++){
if (isset($_POST['PropNumeric' .$i]) and $_POST['PropNumeric' .$i] == true){
- if (!is_numeric($_POST['PropMinimum' .$i])){
+ if (!is_numeric(filter_number_format($_POST['PropMinimum' .$i]))){
$InputError = 1;
prnMsg(_('The minimum value is expected to be a numeric value'),'error');
}
- if (!is_numeric($_POST['PropMaximum' .$i])){
+ if (!is_numeric(filter_number_format($_POST['PropMaximum' .$i]))){
$InputError = 1;
prnMsg(_('The maximum value is expected to be a numeric value'),'error');
}
@@ -109,8 +109,8 @@
'" . $_POST['PropLabel' . $i] . "',
" . $_POST['PropControlType' . $i] . ",
'" . $_POST['PropDefault' .$i] . "',
- '" . $_POST['PropMinimum' .$i] . "',
- '" . $_POST['PropMaximum' .$i] . "',
+ '" . filter_number_format($_POST['PropMinimum' .$i]) . "',
+ '" . filter_number_format($_POST['PropMaximum' .$i]) . "',
'" . $_POST['PropNumeric' .$i] . "',
" . $_POST['PropReqSO' .$i] . ')';
$ErrMsg = _('Could not insert a new category property for') . $_POST['PropLabel' . $i];
@@ -119,8 +119,8 @@
$sql = "UPDATE stockcatproperties SET label ='" . $_POST['PropLabel' . $i] . "',
controltype = " . $_POST['PropControlType' . $i] . ",
defaultvalue = '" . $_POST['PropDefault' .$i] . "',
- minimumvalue = '" . $_POST['PropMinimum' .$i] . "',
- maximumvalue = '" . $_POST['PropMaximum' .$i] . "',
+ minimumvalue = '" . filter_number_format($_POST['PropMinimum' .$i]) . "',
+ maximumvalue = '" . filter_number_format($_POST['PropMaximum' .$i]) . "',
numericvalue = '" . $_POST['PropNumeric' .$i] . "',
reqatsalesorder = " . $_POST['PropReqSO' .$i] . "
WHERE stkcatpropid =" . $_POST['PropID' .$i];
@@ -181,19 +181,19 @@
'<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('items referring to this stock category code'),'warn');
} else {
- $sql = "SELECT COUNT(*) FROM salesglpostings WHERE stkcat='$SelectedCategory'";
+ $sql = "SELECT COUNT(*) FROM salesglpostings WHERE stkcat='" . $SelectedCategory . "'";
$result = DB_query($sql,$db);
$myrow = DB_fetch_row($result);
if ($myrow[0]>0) {
prnMsg(_('Cannot delete this stock category because it is used by the sales') . ' - ' . _('GL posting interface') . '. ' . _('Delete any records in the Sales GL Interface set up using this stock category first'),'warn');
} else {
- $sql = "SELECT COUNT(*) FROM cogsglpostings WHERE stkcat='$SelectedCategory'";
+ $sql = "SELECT COUNT(*) FROM cogsglpostings WHERE stkcat='" . $SelectedCategory . "'";
$result = DB_query($sql,$db);
$myrow = DB_fetch_row($result);
if ($myrow[0]>0) {
prnMsg(_('Cannot delete this stock category because it is used by the cost of sales') . ' - ' . _('GL posting interface') . '. ' . _('Delete any records in the Cost of Sales GL Interface set up using this stock category first'),'warn');
} else {
- $sql="DELETE FROM stockcategory WHERE categoryid='$SelectedCategory'";
+ $sql="DELETE FROM stockcategory WHERE categoryid='" . $SelectedCategory . "'";
$result = DB_query($sql,$db);
prnMsg(_('The stock category') . ' ' . $SelectedCategory . ' ' . _('has been deleted') . ' !','success');
unset ($SelectedCategory);
@@ -304,8 +304,8 @@
$_POST['MaterialUseageVarAc'] = $myrow['materialuseagevarac'];
$_POST['WIPAct'] = $myrow['wipact'];
}
- echo '<input type=hidden name="SelectedCategory" value="' . $SelectedCategory . '" />';
- echo '<input type=hidden name="CategoryID" value="' . $_POST['CategoryID'] . '" />';
+ echo '<input type="hidden" name="SelectedCategory" value="' . $SelectedCategory . '" />';
+ echo '<input type="hidden" name="CategoryID" value="' . $_POST['CategoryID'] . '" />';
echo '<table class="selection">
<tr>
<td>' . _('Category Code') . ':</td>
@@ -380,7 +380,7 @@
echo '</select></td>
</tr>';
- echo '<input type="submit" name="UpdateTypes" style="visibility:hidden;width:1px" value="Not Seen">';
+ echo '<input type="submit" name="UpdateTypes" style="visibility:hidden;width:1px" value="Not Seen" />';
if (isset($_POST['StockType']) and $_POST['StockType']=='L') {
$Result = $PnLAccountsResult;
echo '<tr><td>' . _('Recovery GL Code');
@@ -484,7 +484,9 @@
label,
controltype,
defaultvalue,
- reqatsalesorder
+ reqatsalesorder,
+ minimumvalue,
+ maximumvalue
FROM stockcatproperties
WHERE categoryid='" . $SelectedCategory . "'
ORDER BY stkcatpropid";
@@ -515,8 +517,9 @@
$HeadingCounter++;
}
echo '<input type="hidden" name="PropID' . $PropertyCounter .'" value="' . $myrow['stkcatpropid'] . '" />';
- echo '<tr><td><input type="textbox" name="PropLabel' . $PropertyCounter . '" size="50" maxlength="100" value="' . $myrow['label'] . '" /></td>
- <td><select name="PropControlType' . $PropertyCounter . '">';
+ echo '<tr>
+ <td><input type="text" name="PropLabel' . $PropertyCounter . '" size="50" maxlength="100" value="' . $myrow['label'] . '" /></td>
+ <td><select name="PropControlType' . $PropertyCounter . '">';
if ($myrow['controltype']==0){
echo '<option selected value="0">' . _('Text Box') . '</option>';
} else {
@@ -540,8 +543,8 @@
echo 'checked';
}
echo '"></td>
- <td><input type="textbox" "name="PropMinimum' . $PropertyCounter . '" value="' . $myrow['minimumvalue'] . '"></td>
- <td><input type="textbox" name="PropMaximum' . $PropertyCounter . '" value="' . $myrow['maximumvalue'] . '"></td>';
+ <td><input type="textbox" class="number" name="PropMinimum' . $PropertyCounter . '" value="' . locale_number_format($myrow['minimumvalue'],'Variable') . '" /></td>
+ <td><input type="textbox" class="number" name="PropMaximum' . $PropertyCounter . '" value="' . locale_number_format($myrow['maximumvalue'],'Variable') . '" /></td>';
echo '<td align="center"><input type="checkbox" name="PropReqSO' . $PropertyCounter .'"';
if ($myrow['reqatsalesorder']==1){
@@ -550,7 +553,7 @@
echo '';
}
- echo '></td>
+ echo ' /></td>
<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?DeleteProperty=' . $myrow['stkcatpropid'] .'&SelectedCategory=' . $SelectedCategory . '" onclick=\'return confirm("' . _('Are you sure you wish to delete this property? All properties of this type set up for stock items will also be deleted.') . '");\'>' . _('Delete') . '</td>
</tr>';
@@ -560,14 +563,14 @@
echo '<tr>
<td><input type="textbox" name="PropLabel' . $PropertyCounter . '" size="50" maxlength="100" /></td>
<td><select name="PropControlType' . $PropertyCounter . '">
- <option selected value=0>' . _('Text Box') . '</option>
- <option value=1>' . _('Select Box') . '</option>
- <option value=2>' . _('Check Box') . '</option>
+ <option selected value="0">' . _('Text Box') . '</option>
+ <option value="1">' . _('Select Box') . '</option>
+ <option value="2">' . _('Check Box') . '</option>
</select></td>
<td><input type="textbox" name="PropDefault' . $PropertyCounter . '" /></td>
<td><input type="checkbox" name="PropNumeric' . $PropertyCounter . '" /></td>
- <td><input type="textbox" "name="PropMinimum' . $PropertyCounter . '" /></td>
- <td><input type="textbox" name="PropMaximum' . $PropertyCounter . '" /></td>
+ <td><input type="textbox" class="number" "name="PropMinimum' . $PropertyCounter . '" /></td>
+ <td><input type="textbox" class="number" name="PropMaximum' . $PropertyCounter . '" /></td>
<td align="center"><input type="checkbox" name="PropReqSO' . $PropertyCounter .'" /></td>
</tr>';
echo '</table>';
@@ -578,7 +581,7 @@
echo '<br />
<div class="centre">
- <input type="submit" name="submit" value="' . _('Enter Information') . '">
+ <input type="submit" name="submit" value="' . _('Enter Information') . '" />
</div>
</form>';
Modified: trunk/StockSerialItems.php
===================================================================
--- trunk/StockSerialItems.php 2011-11-21 09:25:54 UTC (rev 4750)
+++ trunk/StockSerialItems.php 2011-11-23 09:22:39 UTC (rev 4751)
@@ -150,7 +150,7 @@
echo '<th></th>';
} else if ($Serialised == 1 and $Perishable==1) {
echo '<td>'.$myrow['serialno'].'</td>
- echo '<td>' . ConvertSQLDate($myrow['expirationdate']). '</td>';
+ <td>' . ConvertSQLDate($myrow['expirationdate']). '</td>';
} else if ($Serialised == 0 and $Perishable==0) {
echo '<td>'.$myrow['serialno'].'</td>
<td class="number">'.locale_number_format($myrow['quantity'],$DecimalPlaces).'</td>';
@@ -158,8 +158,8 @@
} else if ($Serialised == 0 and $Perishable==1){
echo '<td>'.$myrow['serialno'].'</td>
<td class="number">'.locale_number_format($myrow['quantity'],$DecimalPlaces). '</td>
- <td>' . ConvertSQLDate($myrow['expirationdate']). '</td>';
- echo '<th></th>';
+ <td>' . ConvertSQLDate($myrow['expirationdate']). '</td>
+ <th></th>';
}
$j++;
If ($j == 36){
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2011-11-21 09:25:54 UTC (rev 4750)
+++ trunk/doc/Change.log 2011-11-23 09:22:39 UTC (rev 4751)
@@ -1,6 +1,7 @@
webERP Change Log
-
+23/11/11 Phil: StockCategories number_formatting of minumum and maximum values of stock category properties
+23/11/11 Felix Lim: StockSerialItems.php closing quote typo.
21/11/11 Phil: UserSettings.php now checks for at least 5 character passwords WWW_Users.php CustLoginSetup.php and SupplierLoginSetup.php now also check for 4 character userids
21/11/11 Felix Lim: WWW_users.php malfomed <input type="hidden" - with no closing >
20/11/11 Phil: Shipments.php now only allows purchase order items to be added to a shipment where the shipment is authorised. Completed, rejected, cancelled orders no longer show.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|