|
From: <dai...@us...> - 2011-05-28 05:38:49
|
Revision: 4577
http://web-erp.svn.sourceforge.net/web-erp/?rev=4577&view=rev
Author: daintree
Date: 2011-05-28 05:38:42 +0000 (Sat, 28 May 2011)
Log Message:
-----------
bug fixes reported by Ricard/Exson/Daniel Brewer
Modified Paths:
--------------
trunk/PDFPrintLabel.php
trunk/SelectSalesOrder.php
trunk/SystemParameters.php
trunk/doc/Change.log
trunk/includes/session.inc
trunk/sql/mysql/upgrade4.03-4.04.sql
Modified: trunk/PDFPrintLabel.php
===================================================================
--- trunk/PDFPrintLabel.php 2011-05-27 10:59:20 UTC (rev 4576)
+++ trunk/PDFPrintLabel.php 2011-05-28 05:38:42 UTC (rev 4577)
@@ -299,14 +299,18 @@
}
$sql="SELECT stockmaster.stockid,
- stockmaster.description, stockmaster.longdescription, stockmaster.barcode, prices.price
- FROM stockmaster LEFT JOIN prices ON stockmaster.stockid=prices.stockid
- AND prices.currabrev = '" . $CurrCode . "'
- AND prices.typeabbrev= '" . $SalesType . "'
- AND prices.startdate >= '" . Date('Y-m-d') . "'
- AND (prices.enddate <= '" . Date('Y-m-d') . "' OR prices.enddate='0000-00-00')
- AND prices.debtorno=''
- WHERE " . $WhereClause;
+ stockmaster.description,
+ stockmaster.longdescription,
+ stockmaster.barcode,
+ prices.price
+ FROM stockmaster LEFT JOIN prices
+ ON stockmaster.stockid=prices.stockid
+ AND prices.currabrev = '" . $CurrCode . "'
+ AND prices.typeabbrev= '" . $SalesType . "'
+ AND prices.startdate <= '" . Date('Y-m-d') . "'
+ AND (prices.enddate >= '" . Date('Y-m-d') . "' OR prices.enddate='0000-00-00')
+ AND prices.debtorno=''
+ WHERE " . $WhereClause;
// if current prices are those with enddate = 0000-00-00 the following line was wrong
// "AND ('$Today' BETWEEN pr.startdate AND prices.enddate) " .
Modified: trunk/SelectSalesOrder.php
===================================================================
--- trunk/SelectSalesOrder.php 2011-05-27 10:59:20 UTC (rev 4576)
+++ trunk/SelectSalesOrder.php 2011-05-28 05:38:42 UTC (rev 4577)
@@ -237,8 +237,6 @@
quantityord,
suppliersunit,
suppliers_partno,
- kgs,
- cuft,
conversionfactor )
VALUES ('" . $PO_OrderNo . "',
'" . $ItemRow['stockid'] . "',
@@ -249,8 +247,6 @@
'" . $ItemRow['orderqty'] . "',
'" . $ItemRow['suppliersuom'] . "',
'" . $ItemRow['suppliers_partno'] . "',
- '" . $ItemRow['kgs'] . "',
- '" . $ItemRow['volume'] . "',
'" . $ItemRow['conversionfactor'] . "')";
$ErrMsg =_('One of the purchase order detail records could not be inserted into the database because');
$DbgMsg =_('The SQL statement used to insert the purchase order detail record and failed was');
Modified: trunk/SystemParameters.php
===================================================================
--- trunk/SystemParameters.php 2011-05-27 10:59:20 UTC (rev 4576)
+++ trunk/SystemParameters.php 2011-05-28 05:38:42 UTC (rev 4577)
@@ -260,7 +260,11 @@
$sql[] = "UPDATE config SET confvalue='" . $_POST['X_LogPath'] . "' WHERE confname='LogPath'";
}
if ($_SESSION['UpdateCurrencyRatesDaily'] != $_POST['X_UpdateCurrencyRatesDaily']){
- $sql[] = "UPDATE config SET confvalue='".$_POST['X_UpdateCurrencyRatesDaily']."' WHERE confname='UpdateCurrencyRatesDaily'";
+ if ($_POST['X_UpdateCurrencyRatesDaily']==1) {
+ $sql[] = "UPDATE config SET confvalue='".Date('Y-m-d')."' WHERE confname='UpdateCurrencyRatesDaily'";
+ } else {
+ $sql[] = "UPDATE config SET confvalue='0' WHERE confname='UpdateCurrencyRatesDaily'";
+ }
}
if ($_SESSION['FactoryManagerEmail'] != $_POST['X_FactoryManagerEmail']){
$sql[] = "UPDATE config SET confvalue='" . $_POST['X_FactoryManagerEmail'] . "' WHERE confname='FactoryManagerEmail'";
@@ -421,7 +425,7 @@
//UpdateCurrencyRatesDaily
echo '<tr style="outline: 1px solid"><td>' . _('Auto Update Exchange Rates Daily') . ':</td>
<td><select Name="X_UpdateCurrencyRatesDaily">
- <option '.($_SESSION['UpdateCurrencyRatesDaily']!='0'?'selected ':'').'value="1">'._('Automatic').'</option>
+ <option '.($_SESSION['UpdateCurrencyRatesDaily']!='1'?'selected ':'').'value="1">'._('Automatic').'</option>
<option '.($_SESSION['UpdateCurrencyRatesDaily']=='0'?'selected ':'').'value="0">'._('Manual').'</option>
</select></td>
<td>' . _('Automatic updates to exchange rates will retrieve the latest daily rates from the European Central Bank once per day - when the first user logs in for the day. Manual will never update the rates automatically - exchange rates will need to be maintained manually') . '</td>
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2011-05-27 10:59:20 UTC (rev 4576)
+++ trunk/doc/Change.log 2011-05-28 05:38:42 UTC (rev 4577)
@@ -1,5 +1,10 @@
webERP Change Log
+28/5/11 Ricard: Fix sql to take quotes out of literals in upgrade script. PDFPrintLabels fix sql to get current price.
+28/5/11 Reported by Daniel Brewer Fix SelectSalesOrder.php creation of PO with excluding redundant fields in purchorderdetails that were taken out.
+28/5/11 Exson: UpdateCurrencyRateDaily was set to 1 when the option to enable it was clicked - should have been set to today's date in SystemParameters - fixed. Now no error reported bu ConvertSQLDate function when user enables update currencies daily.
+
+
26/5/11 Version 4.04 Release
26/5/11 Ricard: require securitytoken 9 to allow user to see purchasing data in SelectProduct.php
Modified: trunk/includes/session.inc
===================================================================
--- trunk/includes/session.inc 2011-05-27 10:59:20 UTC (rev 4576)
+++ trunk/includes/session.inc 2011-05-28 05:38:42 UTC (rev 4577)
@@ -161,7 +161,7 @@
$CurrencyRates = GetECBCurrencyRates(); // gets rates from ECB see includes/MiscFunctions.php
/*Loop around the defined currencies and get the rate from ECB */
if ($CurrencyRates!=false) {
- $CurrenciesResult = DB_query('SELECT currabrev FROM currencies',$db);
+ $CurrenciesResult = DB_query("SELECT currabrev FROM currencies",$db);
while ($CurrencyRow = DB_fetch_row($CurrenciesResult)){
if ($CurrencyRow[0]!=$_SESSION['CompanyRecord']['currencydefault']){
Modified: trunk/sql/mysql/upgrade4.03-4.04.sql
===================================================================
--- trunk/sql/mysql/upgrade4.03-4.04.sql 2011-05-27 10:59:20 UTC (rev 4576)
+++ trunk/sql/mysql/upgrade4.03-4.04.sql 2011-05-28 05:38:42 UTC (rev 4577)
@@ -1,5 +1,5 @@
INSERT INTO scripts (script, pagesecurity, description) VALUES ('SecurityTokens.php', 15, 'Administration of security tokens');
-INSERT INTO scripts (script , pagesecurity ,description) VALUES ('SalesByTypePeriodInquiry.php', '2', 'Shows sales for a selected date range by sales type/price list');
-INSERT INTO scripts (script , pagesecurity ,description) VALUES ('SalesCategoryPeriodInquiry.php', '2', 'Shows sales for a selected date range by stock category');
-INSERT INTO scripts (script , pagesecurity ,description) VALUES ('SalesTopItemsInquiry.php', '2', 'Shows the top item sales for a selected date range');
+INSERT INTO scripts (script , pagesecurity ,description) VALUES ('SalesByTypePeriodInquiry.php', 2, 'Shows sales for a selected date range by sales type/price list');
+INSERT INTO scripts (script , pagesecurity ,description) VALUES ('SalesCategoryPeriodInquiry.php', 2, 'Shows sales for a selected date range by stock category');
+INSERT INTO scripts (script , pagesecurity ,description) VALUES ('SalesTopItemsInquiry.php', 2, 'Shows the top item sales for a selected date range');
UPDATE config SET confvalue='4.04' WHERE confname='VersionNumber';
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|