|
From: <dai...@us...> - 2012-07-12 10:09:59
|
Revision: 5496
http://web-erp.svn.sourceforge.net/web-erp/?rev=5496&view=rev
Author: daintree
Date: 2012-07-12 10:09:49 +0000 (Thu, 12 Jul 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/PO_Header.php
trunk/PO_Items.php
trunk/api/api_webERPsettings.php
trunk/doc/Change.log
trunk/includes/GetConfig.php
trunk/includes/Z_POSDataCreation.php
trunk/includes/session.inc
Modified: trunk/PO_Header.php
===================================================================
--- trunk/PO_Header.php 2012-07-11 07:15:36 UTC (rev 5495)
+++ trunk/PO_Header.php 2012-07-12 10:09:49 UTC (rev 5496)
@@ -179,7 +179,7 @@
/* set the SupplierID we got */
$_SESSION['PO'.$identifier]->SupplierID = $_GET['SelectedSupplier'];
$_SESSION['PO'.$identifier]->DeliveryDate = date($_SESSION['DefaultDateFormat']);
-
+ $_SESSION['PO'.$identifier]->Initiator = $_SESSION['UsersRealName'];
$_SESSION['RequireSupplierSelection'] = 0;
$_POST['Select'] = $_GET['SelectedSupplier'];
@@ -760,7 +760,7 @@
<td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'] .'" name="DeliveryDate" size="11" value="' . $_POST['DeliveryDate'] . '" /></td></tr>';
if (!isset($_POST['Initiator'])) {
- $_POST['Initiator'] = $_SESSION['UserID'];
+ $_POST['Initiator'] = $_SESSION['UsersRealName'];
$_POST['Requisition'] = '';
}
Modified: trunk/PO_Items.php
===================================================================
--- trunk/PO_Items.php 2012-07-11 07:15:36 UTC (rev 5495)
+++ trunk/PO_Items.php 2012-07-12 10:09:49 UTC (rev 5496)
@@ -596,6 +596,13 @@
$SuppliersUnitOfMeasure = $PurchRow['suppliersuom'];
$SuppliersPartNo = $PurchRow['suppliers_partno'];
$LeadTime = $PurchRow['leadtime'];
+ /* Work out the delivery date based on today + lead time
+ * if > header DeliveryDate then set DeliveryDate to today + leadtime
+ */
+ $DeliveryDate = DateAdd(Date($_SESSION['DefaultDateFormat']),'d',$LeadTime);
+ if (! Date1GreaterThanDate2($DeliveryDate,$_SESSION['PO'.$identifier]->DeliveryDate)){
+ $DeliveryDate = $_SESSION['PO'.$identifier]->DeliveryDate;
+ }
} else { // no purchasing data setup
$PurchPrice = 0;
$ConversionFactor = 1;
@@ -603,6 +610,7 @@
$SuppliersUnitOfMeasure = $ItemRow['units'];
$SuppliersPartNo = '';
$LeadTime = 1;
+ $DeliveryDate = $_SESSION['PO'.$identifier]->DeliveryDate;
}
$_SESSION['PO'.$identifier]->add_to_order ($_SESSION['PO'.$identifier]->LinesOnOrder+1,
@@ -614,7 +622,7 @@
$PurchPrice,
$ItemRow['units'],
$ItemRow['stockact'],
- $_SESSION['PO'.$identifier]->DeliveryDate,
+ $DeliveryDate,
0,
0,
0,
Modified: trunk/api/api_webERPsettings.php
===================================================================
--- trunk/api/api_webERPsettings.php 2012-07-11 07:15:36 UTC (rev 5495)
+++ trunk/api/api_webERPsettings.php 2012-07-12 10:09:49 UTC (rev 5496)
@@ -108,6 +108,7 @@
}
return $ReturnValue;
}
+
function DeletePOSData($User, $Password) {
$Errors = array();
$db = db($User, $Password);
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2012-07-11 07:15:36 UTC (rev 5495)
+++ trunk/doc/Change.log 2012-07-12 10:09:49 UTC (rev 5496)
@@ -1,6 +1,7 @@
webERP Change Log
-9/7/12 Tim/Ricard: Add Z_ChangeSupplierCode.php -
+10/7/12 Phil: Made purchase order lines look at the purchasing data lead time and set the delivery date of the line to today + the lead time if this is beyond the delivery date specified in the PO header.
+9/7/12 Tim/Ricard: Add Z_ChangeSupplierCode.php
6/7/12 Phil: Add stable versions to UpgradeDatabase.php script
6/7/12 Phil: Added new Z_DeleteOldPrices.php script to purge prices which are past their end date
30/6/12 Phil: Attempt at quicker price retrieval
Modified: trunk/includes/GetConfig.php
===================================================================
--- trunk/includes/GetConfig.php 2012-07-11 07:15:36 UTC (rev 5495)
+++ trunk/includes/GetConfig.php 2012-07-12 10:09:49 UTC (rev 5496)
@@ -3,7 +3,7 @@
// $ForceConfigReload to true
/* $Id$*/
-if(isset($ForceConfigReload) and $ForceConfigReload==TRUE OR !isset($_SESSION['CompanyDefaultsLoaded'])) {
+if(isset($ForceConfigReload) AND $ForceConfigReload==true OR !isset($_SESSION['CompanyDefaultsLoaded'])) {
global $db; // It is global, we may not be.
$sql = "SELECT confname, confvalue FROM config";
$ErrMsg = _('Could not get the configuration parameters from the database because');
Modified: trunk/includes/Z_POSDataCreation.php
===================================================================
--- trunk/includes/Z_POSDataCreation.php 2012-07-11 07:15:36 UTC (rev 5495)
+++ trunk/includes/Z_POSDataCreation.php 2012-07-12 10:09:49 UTC (rev 5496)
@@ -36,7 +36,7 @@
fwrite($FileHandle,"DELETE FROM salestypes;\n");
- $result = DB_query('SELECT typeabbrev, sales_type FROM salestypes',$db);
+ $result = DB_query("SELECT typeabbrev, sales_type FROM salestypes",$db);
while ($myrow = DB_fetch_array($result)) {
fwrite($FileHandle,"INSERT INTO salestypes VALUES ('" . $myrow['typeabbrev'] . "', '" . SQLite_Escape ($myrow['sales_type']) . "');\n");
@@ -44,7 +44,7 @@
}
fwrite($FileHandle,"DELETE FROM holdreasons;\n");
- $result = DB_query('SELECT reasoncode, reasondescription, dissallowinvoices FROM holdreasons',$db);
+ $result = DB_query("SELECT reasoncode, reasondescription, dissallowinvoices FROM holdreasons",$db);
while ($myrow = DB_fetch_array($result)) {
fwrite($FileHandle,"INSERT INTO holdreasons VALUES ('" . $myrow['reasoncode'] . "', '" . SQLite_Escape ($myrow['reasondescription']) . "', '" . $myrow['dissallowinvoices'] . "');\n");
@@ -52,7 +52,7 @@
}
fwrite($FileHandle,"DELETE FROM paymentterms;\n");
- $result = DB_query('SELECT termsindicator, terms FROM paymentterms',$db);
+ $result = DB_query("SELECT termsindicator, terms FROM paymentterms",$db);
while ($myrow = DB_fetch_array($result)) {
fwrite($FileHandle,"INSERT INTO paymentterms VALUES ('" . $myrow['termsindicator'] . "', '" . SQLite_Escape ($myrow['terms']) . "');\n");
@@ -60,7 +60,7 @@
}
fwrite($FileHandle,"DELETE FROM paymentmethods;\n");
- $result = DB_query('SELECT paymentid, paymentname,opencashdrawer FROM paymentmethods',$db);
+ $result = DB_query("SELECT paymentid, paymentname,opencashdrawer FROM paymentmethods",$db);
while ($myrow = DB_fetch_array($result)) {
fwrite($FileHandle,"INSERT INTO paymentmethods VALUES ('" . $myrow['paymentid'] . "', '" . SQLite_Escape ($myrow['paymentname']) . "', '" . $myrow['opencashdrawer'] . "');\n");
@@ -68,7 +68,7 @@
}
fwrite($FileHandle,"DELETE FROM locations;\n");
- $result = DB_query('SELECT loccode, locationname,taxprovinceid FROM locations',$db);
+ $result = DB_query("SELECT loccode, locationname,taxprovinceid FROM locations",$db);
while ($myrow = DB_fetch_array($result)) {
fwrite($FileHandle,"INSERT INTO locations VALUES ('" . $myrow['loccode'] . "', '" . SQLite_Escape ($myrow['locationname']) . "', '" . $myrow['taxprovinceid'] . "');\n");
@@ -76,14 +76,14 @@
}
fwrite($FileHandle,"DELETE FROM stockcategory;\n");
- $result = DB_query('SELECT categoryid, categorydescription FROM stockcategory',$db);
+ $result = DB_query("SELECT categoryid, categorydescription FROM stockcategory",$db);
while ($myrow = DB_fetch_array($result)) {
fwrite($FileHandle,"INSERT INTO stockcategory VALUES ('" . $myrow['categoryid'] . "', '" . SQLite_Escape ($myrow['categorydescription']) . "');\n");
}
fwrite($FileHandle,"DELETE FROM taxgroups;\n");
- $result = DB_query('SELECT taxgroupid, taxgroupdescription FROM taxgroups',$db);
+ $result = DB_query("SELECT taxgroupid, taxgroupdescription FROM taxgroups",$db);
while ($myrow = DB_fetch_array($result)) {
fwrite($FileHandle,"INSERT INTO taxgroups VALUES ('" . $myrow['taxgroupid'] . "', '" . SQLite_Escape ($myrow['taxgroupdescription']) . "');\n");
@@ -91,21 +91,21 @@
}
fwrite($FileHandle,"DELETE FROM taxgrouptaxes;\n");
- $result = DB_query('SELECT taxgroupid, taxauthid, calculationorder, taxontax FROM taxgrouptaxes',$db);
+ $result = DB_query("SELECT taxgroupid, taxauthid, calculationorder, taxontax FROM taxgrouptaxes",$db);
while ($myrow = DB_fetch_array($result)) {
fwrite($FileHandle,"INSERT INTO taxgrouptaxes VALUES ('" . $myrow['taxgroupid'] . "', '" . $myrow['taxauthid'] . "', '" . $myrow['calculationorder'] . "', '" . $myrow['taxontax'] . "');\n");
}
fwrite($FileHandle,"DELETE FROM taxauthorities;\n");
- $result = DB_query('SELECT taxid, description FROM taxauthorities',$db);
+ $result = DB_query("SELECT taxid, description FROM taxauthorities",$db);
while ($myrow = DB_fetch_array($result)) {
fwrite($FileHandle,"INSERT INTO taxauthorities VALUES ('" . $myrow['taxid'] . "', '" . SQLite_Escape ($myrow['description']) . "');\n");
}
fwrite($FileHandle,"DELETE FROM taxauthrates;\n");
- $result = DB_query('SELECT taxauthority, dispatchtaxprovince, taxcatid, taxrate FROM taxauthrates',$db);
+ $result = DB_query("SELECT taxauthority, dispatchtaxprovince, taxcatid, taxrate FROM taxauthrates",$db);
while ($myrow = DB_fetch_array($result)) {
fwrite($FileHandle,"INSERT INTO taxauthrates VALUES ('" . $myrow['taxauthority'] . "', '" . $myrow['dispatchtaxprovince'] . "', '" . $myrow['taxcatid'] . "', '" . $myrow['taxrate'] . "');\n");
@@ -116,7 +116,10 @@
while ($myrow = DB_fetch_array($result)) {
fwrite($FileHandle,"INSERT INTO stockmaster VALUES ('" . SQLite_Escape ($myrow['stockid']) . "', '" . SQLite_Escape ($myrow['categoryid']) . "', '" . SQLite_Escape ($myrow['description']) . "', '" . SQLite_Escape (str_replace("\n", '', $myrow['longdescription'])) . "', '" . SQLite_Escape ($myrow['units']) . "', '" . SQLite_Escape ($myrow['barcode']) . "', '" . $myrow['taxcatid'] . "', '" . $myrow['decimalplaces'] . "');\n");
- $Price = GetPriceQuick ($myrow['stockid'], $_POST['POSDebtorNo'], $_POST['POSBranchCode'], $DefaultPriceList, $db);
+
+ fwrite($FileHandle,"DELETE FROM prices WHERE stockid='" . $myrow['stockid'] . "';\n");
+
+ $Price = GetPriceQuick ($myrow['stockid'], $POSDebtorNo, $POSBranchCode, $DefaultPriceList, $db);
if ($Price!=0) {
fwrite($FileHandle,"INSERT INTO prices (stockid, currabrev, typeabbrev, price) VALUES('" . $myrow['stockid'] . "', '" . $CurrCode . "', '" . $SalesType . "', '" . $Price . "');\n");
}
@@ -154,7 +157,7 @@
}
function SQLite_Escape($String) {
- $SearchCharacters = array('&', '"', "'",'<', '>',"\n","\r" );
+ $SearchCharacters = array('&', '"', "'",'<', '>',"\n","\r");
$ReplaceWith = array('&', '""', "''", '<', '>', '', ' ');
$String = str_replace($SearchCharacters, $ReplaceWith, $String);
Modified: trunk/includes/session.inc
===================================================================
--- trunk/includes/session.inc 2012-07-11 07:15:36 UTC (rev 5495)
+++ trunk/includes/session.inc 2012-07-12 10:09:49 UTC (rev 5496)
@@ -31,7 +31,7 @@
include($PathPrefix . 'includes/ConnectDB.inc');
include($PathPrefix . 'includes/DateFunctions.inc');
-// Un comment to turn off attempts counter
+// Uncomment to turn off attempts counter
//$_SESSION['AttemptsCounter'] = 0;
if (!isset($_SESSION['AttemptsCounter'])){
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <te...@us...> - 2012-07-13 07:58:25
|
Revision: 5497
http://web-erp.svn.sourceforge.net/web-erp/?rev=5497&view=rev
Author: tehonu
Date: 2012-07-13 07:58:18 +0000 (Fri, 13 Jul 2012)
Log Message:
-----------
Ricard: Restrict the internal use stock categories by user role as described in http://www.weberp.org/forum/showthread.php?tid=171
Modified Paths:
--------------
trunk/InternalStockRequest.php
trunk/includes/MainMenuLinksArray.php
trunk/sql/mysql/upgrade4.08-4.09.sql
Added Paths:
-----------
trunk/InternalStockCategoriesByRole.php
Added: trunk/InternalStockCategoriesByRole.php
===================================================================
--- trunk/InternalStockCategoriesByRole.php (rev 0)
+++ trunk/InternalStockCategoriesByRole.php 2012-07-13 07:58:18 UTC (rev 5497)
@@ -0,0 +1,236 @@
+<?php
+
+/* $Id: InternalStockCategoriesByRole.php 5217 2012-04-03 21:57:50Z tehonu $ */
+/* Functionas as described in http://www.weberp.org/forum/showthread.php?tid=171 */
+
+include('includes/session.inc');
+$title = _('Internal Stock Categories Requests By Security Role Maintenance ');
+
+include('includes/header.inc');
+
+echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Payment Entry')
+ . '" alt="" />' . ' ' . $title . '</p>';
+
+if (isset($_POST['SelectedType'])){
+ $SelectedType = mb_strtoupper($_POST['SelectedType']);
+} elseif (isset($_GET['SelectedType'])){
+ $SelectedType = mb_strtoupper($_GET['SelectedType']);
+} else {
+ $SelectedType='';
+}
+
+if (!isset($_GET['delete']) and (ContainsIllegalCharacters($SelectedType) OR mb_strpos($SelectedType,' ')>0)){
+ $InputError = 1;
+ prnMsg(_('The contain any of the following characters " \' - & or a space'),'error');
+}
+if (isset($_POST['SelectedRole'])){
+ $SelectedRole = mb_strtoupper($_POST['SelectedRole']);
+} elseif (isset($_GET['SelectedRole'])){
+ $SelectedRole = mb_strtoupper($_GET['SelectedRole']);
+}
+
+if (isset($_POST['Cancel'])) {
+ unset($SelectedRole);
+ unset($SelectedType);
+}
+
+if (isset($_POST['Process'])) {
+
+ if ($_POST['SelectedRole'] == '') {
+ echo prnMsg(_('You have not selected a security role to maintain the internal stock categories on'),'error');
+ echo '<br />';
+ unset($SelectedRole);
+ unset($_POST['SelectedRole']);
+ }
+}
+
+if (isset($_POST['submit'])) {
+
+ $InputError=0;
+
+ if ($_POST['SelectedCategory']=='') {
+ $InputError=1;
+ echo prnMsg(_('You have not selected a stock category to be added as internal to this security role'),'error');
+ echo '<br />';
+ unset($SelectedRole);
+ }
+
+ if ( $InputError !=1 ) {
+
+ // First check the type is not being duplicated
+
+ $checkSql = "SELECT count(*)
+ FROM internalstockcatrole
+ WHERE secroleid= '" . $_POST['SelectedRole'] . "'
+ AND categoryid = '" . $_POST['SelectedCategory'] . "'";
+
+ $checkresult = DB_query($checkSql,$db);
+ $checkrow = DB_fetch_row($checkresult);
+
+ if ( $checkrow[0] >0) {
+ $InputError = 1;
+ prnMsg( _('The Stock Category') . ' ' . $_POST['categoryid'] . ' ' ._('already allowed as internal for this security role'),'error');
+ } else {
+ // Add new record on submit
+ $sql = "INSERT INTO internalstockcatrole (secroleid,
+ categoryid)
+ VALUES ('" . $_POST['SelectedRole'] . "',
+ '" . $_POST['SelectedCategory'] . "')";
+
+ $msg = _('Stock Category:') . ' ' . $_POST['SelectedCategory'].' '._('has been allowed to user role') .' '. $_POST['SelectedRole'] . ' ' . _('as internal');
+ $checkSql = "SELECT count(secroleid)
+ FROM securityroles";
+ $result = DB_query($checkSql, $db);
+ $row = DB_fetch_row($result);
+ }
+ }
+
+ if ( $InputError !=1) {
+ //run the SQL from either of the above possibilites
+ $result = DB_query($sql,$db);
+ prnMsg($msg,'success');
+ unset($_POST['SelectedCategory']);
+ }
+
+} elseif ( isset($_GET['delete']) ) {
+ $sql="DELETE FROM internalstockcatrole
+ WHERE secroleid='".$SelectedRole."'
+ AND categoryid='".$SelectedType."'";
+
+ $ErrMsg = _('The Stock Category by Role record could not be deleted because');
+ $result = DB_query($sql,$db,$ErrMsg);
+ prnMsg(_('Internal Stock Category').' '. $SelectedType .' '. _('for user role').' '. $SelectedRole .' '. _('has been deleted') ,'success');
+ unset($_GET['delete']);
+}
+
+if (!isset($SelectedRole)){
+
+ echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">';
+ echo '<div>';
+ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
+ echo '<table class="selection">'; //Main table
+
+ echo '<tr><td>' . _('Select User Role') . ':</td><td><select name="SelectedRole">';
+
+ $SQL = "SELECT secroleid,
+ secrolename
+ FROM securityroles";
+
+ $result = DB_query($SQL,$db);
+ echo '<option value="">' . _('Not Yet Selected') . '</option>';
+ while ($myrow = DB_fetch_array($result)) {
+ if (isset($SelectedRole) and $myrow['secroleid']==$SelectedRole) {
+ echo '<option selected="selected" value="';
+ } else {
+ echo '<option value="';
+ }
+ echo $myrow['secroleid'] . '">' . $myrow['secroleid'] . ' - ' . $myrow['secrolename'] . '</option>';
+
+ } //end while loop
+
+ echo '</select></td></tr>';
+
+ echo '</table>'; // close main table
+ DB_free_result($result);
+
+ echo '<br /><div class="centre"><input type="submit" name="Process" value="' . _('Accept') . '" />
+ <input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>';
+
+ echo '</div>
+ </form>';
+
+}
+
+//end of ifs and buts!
+if (isset($_POST['process'])OR isset($SelectedRole)) {
+
+ echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Stock Categories available as internal for role') . ' ' .$SelectedRole. '</a></div>';
+ echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">';
+ echo '<div>';
+ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
+
+ echo '<input type="hidden" name="SelectedRole" value="' . $SelectedRole . '" />';
+
+ $sql = "SELECT internalstockcatrole.categoryid,
+ stockcategory.categorydescription
+ FROM internalstockcatrole INNER JOIN stockcategory
+ ON internalstockcatrole.categoryid=stockcategory.categoryid
+ WHERE internalstockcatrole.secroleid='".$SelectedRole."'
+ ORDER BY internalstockcatrole.categoryid ASC";
+
+ $result = DB_query($sql,$db);
+
+ echo '<br />
+ <table class="selection">';
+ echo '<tr><th colspan="3"><h3>' . _('Internal Stock Categories Allowed to user role') . ' ' .$SelectedRole. '</h3></th></tr>';
+ echo '<tr>
+ <th>' . _('Category Code') . '</th>
+ <th>' . _('Description') . '</th>
+ </tr>';
+
+$k=0; //row colour counter
+
+while ($myrow = DB_fetch_array($result)) {
+ if ($k==1){
+ echo '<tr class="EvenTableRows">';
+ $k=0;
+ } else {
+ echo '<tr class="OddTableRows">';
+ $k=1;
+ }
+
+ printf('<td>%s</td>
+ <td>%s</td>
+ <td><a href="%s?SelectedType=%s&delete=yes&SelectedRole=' . $SelectedRole . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this internal stock category code?') . '\');">' . _('Delete') . '</a></td>
+ </tr>',
+ $myrow['categoryid'],
+ $myrow['categorydescription'],
+ htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'),
+ $myrow['categoryid'],
+ htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'),
+ $myrow['categoryid']);
+ }
+ //END WHILE LIST LOOP
+ echo '</table>';
+
+ if (! isset($_GET['delete'])) {
+
+
+ echo '<br /><table class="selection">'; //Main table
+
+ echo '<tr><td>' . _('Select Stock Category Code') . ':</td><td><select name="SelectedCategory">';
+
+ $SQL = "SELECT categoryid,
+ categorydescription
+ FROM stockcategory";
+
+ $result = DB_query($SQL,$db);
+ if (!isset($_POST['SelectedCategory'])){
+ echo '<option selected="selected" value="">' . _('Not Yet Selected') . '</option>';
+ }
+ while ($myrow = DB_fetch_array($result)) {
+ if (isset($_POST['SelectedCategory']) AND $myrow['categoryid']==$_POST['SelectedCategory']) {
+ echo '<option selected="selected" value="';
+ } else {
+ echo '<option value="';
+ }
+ echo $myrow['categoryid'] . '">' . $myrow['categoryid'] . ' - ' . $myrow['categorydescription'] . '</option>';
+
+ } //end while loop
+
+ echo '</select></td></tr>';
+
+ echo '</table>'; // close main table
+ DB_free_result($result);
+
+ echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Accept') . '" />
+ <input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>';
+
+ echo '</div>
+ </form>';
+
+ } // end if user wish to delete
+}
+
+include('includes/footer.inc');
+?>
\ No newline at end of file
Modified: trunk/InternalStockRequest.php
===================================================================
--- trunk/InternalStockRequest.php 2012-07-12 10:09:49 UTC (rev 5496)
+++ trunk/InternalStockRequest.php 2012-07-13 07:58:18 UTC (rev 5497)
@@ -279,10 +279,12 @@
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Search for Inventory Items'). '</p>';
-$SQL = "SELECT categoryid,
- categorydescription
- FROM stockcategory
- ORDER BY categorydescription";
+$SQL = "SELECT stockcategory.categoryid,
+ stockcategory.categorydescription
+ FROM stockcategory, internalstockcatrole
+ WHERE stockcategory.categoryid = internalstockcatrole.categoryid
+ AND internalstockcatrole.secroleid= " . $_SESSION['AccessLevel'] . "
+ ORDER BY stockcategory.categorydescription";
$result1 = DB_query($SQL, $db);
if (DB_num_rows($result1) == 0) {
echo '<p class="bad">' . _('Problem Report') . ':<br />' . _('There are no stock categories currently defined please use the link below to set them up').'</p>';
@@ -298,9 +300,9 @@
$_POST['StockCat'] = '';
}
if ($_POST['StockCat'] == 'All') {
- echo '<option selected="True" value="All">' . _('All').'</option>';
+ echo '<option selected="True" value="All">' . _('All Authorized').'</option>';
} else {
- echo '<option value="All">' . _('All').'</option>';
+ echo '<option value="All">' . _('All Authorized').'</option>';
}
while ($myrow1 = DB_fetch_array($result1)) {
if ($myrow1['categoryid'] == $_POST['StockCat']) {
@@ -357,8 +359,11 @@
stockmaster.units as stockunits,
stockmaster.decimalplaces
FROM stockmaster,
- stockcategory
+ stockcategory,
+ internalstockcatrole
WHERE stockmaster.categoryid=stockcategory.categoryid
+ AND stockcategory.categoryid = internalstockcatrole.categoryid
+ AND internalstockcatrole.secroleid= " . $_SESSION['AccessLevel'] . "
AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D')
AND stockmaster.mbflag <>'G'
AND stockmaster.description " . LIKE . " '" . $SearchString . "'
@@ -370,8 +375,11 @@
stockmaster.units as stockunits,
stockmaster.decimalplaces
FROM stockmaster,
- stockcategory
- WHERE stockmaster.categoryid=stockcategory.categoryid
+ stockcategory,
+ internalstockcatrole
+ WHERE stockmaster.categoryid=stockcategory.categoryid
+ AND stockcategory.categoryid = internalstockcatrole.categoryid
+ AND internalstockcatrole.secroleid= " . $_SESSION['AccessLevel'] . "
AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D')
AND stockmaster.mbflag <>'G'
AND stockmaster.discontinued=0
@@ -391,8 +399,11 @@
stockmaster.units as stockunits,
stockmaster.decimalplaces
FROM stockmaster,
- stockcategory
+ stockcategory,
+ internalstockcatrole
WHERE stockmaster.categoryid=stockcategory.categoryid
+ AND stockcategory.categoryid = internalstockcatrole.categoryid
+ AND internalstockcatrole.secroleid= " . $_SESSION['AccessLevel'] . "
AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D')
AND stockmaster.stockid " . LIKE . " '" . $SearchString . "'
AND stockmaster.mbflag <>'G'
@@ -404,8 +415,11 @@
stockmaster.units as stockunits,
stockmaster.decimalplaces
FROM stockmaster,
- stockcategory
+ stockcategory,
+ internalstockcatrole
WHERE stockmaster.categoryid=stockcategory.categoryid
+ AND stockcategory.categoryid = internalstockcatrole.categoryid
+ AND internalstockcatrole.secroleid= " . $_SESSION['AccessLevel'] . "
AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D')
AND stockmaster.stockid " . LIKE . " '" . $SearchString . "'
AND stockmaster.mbflag <>'G'
@@ -421,8 +435,11 @@
stockmaster.units as stockunits,
stockmaster.decimalplaces
FROM stockmaster,
- stockcategory
- WHERE stockmaster.categoryid=stockcategory.categoryid
+ stockcategory,
+ internalstockcatrole
+ WHERE stockmaster.categoryid=stockcategory.categoryid
+ AND stockcategory.categoryid = internalstockcatrole.categoryid
+ AND internalstockcatrole.secroleid= " . $_SESSION['AccessLevel'] . "
AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D')
AND stockmaster.mbflag <>'G'
AND stockmaster.discontinued=0
@@ -433,8 +450,11 @@
stockmaster.units as stockunits,
stockmaster.decimalplaces
FROM stockmaster,
- stockcategory
+ stockcategory,
+ internalstockcatrole
WHERE stockmaster.categoryid=stockcategory.categoryid
+ AND stockcategory.categoryid = internalstockcatrole.categoryid
+ AND internalstockcatrole.secroleid= " . $_SESSION['AccessLevel'] . "
AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D')
AND stockmaster.mbflag <>'G'
AND stockmaster.discontinued=0
Modified: trunk/includes/MainMenuLinksArray.php
===================================================================
--- trunk/includes/MainMenuLinksArray.php 2012-07-12 10:09:49 UTC (rev 5496)
+++ trunk/includes/MainMenuLinksArray.php 2012-07-13 07:58:18 UTC (rev 5497)
@@ -518,7 +518,8 @@
_('Units of Measure'),
_('MRP Available Production Days'),
_('MRP Demand Types'),
- _('Maintain Internal Departments')
+ _('Maintain Internal Departments'),
+ _('Maintain Internal Stock Categories to User Roles')
);
$MenuItems['system']['Maintenance']['URL'] = array ('/StockCategories.php',
@@ -527,7 +528,8 @@
'/UnitsOfMeasure.php',
'/MRPCalendar.php',
'/MRPDemandTypes.php',
- '/Departments.php'
+ '/Departments.php',
+ '/InternalStockCategoriesByRole.php'
);
$MenuItems['Utilities']['Transactions']['Caption'] = array (_('Change A Customer Code'),
Modified: trunk/sql/mysql/upgrade4.08-4.09.sql
===================================================================
--- trunk/sql/mysql/upgrade4.08-4.09.sql 2012-07-12 10:09:49 UTC (rev 5496)
+++ trunk/sql/mysql/upgrade4.08-4.09.sql 2012-07-13 07:58:18 UTC (rev 5497)
@@ -1,4 +1,13 @@
INSERT INTO scripts VALUES ('Z_DeleteOldPrices.php','15','Deletes all old prices');
INSERT INTO scripts VALUES ('Z_ChangeLocationCode.php','15','Change a locations code and in all tables where the old code was used to the new code');
-UPDATE config SET confvalue='4.08.2' WHERE confname='VersionNumber';
+CREATE TABLE IF NOT EXISTS `internalstockcatrole` (
+ `categoryid` varchar(6) NOT NULL,
+ `secroleid` int(11) NOT NULL,
+ KEY `internalstockcatrole_ibfk_1` (`categoryid`),
+ KEY `internalstockcatrole_ibfk_2` (`secroleid`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO scripts VALUES ('InternalStockCategoriesByRole.php','15','Daintains the stock categories to be used as internal for any user security role');
+
+UPDATE config SET confvalue='4.08.2' 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.
|
|
From: <te...@us...> - 2012-07-13 07:58:29
|
Revision: 5497
http://web-erp.svn.sourceforge.net/web-erp/?rev=5497&view=rev
Author: tehonu
Date: 2012-07-13 07:58:18 +0000 (Fri, 13 Jul 2012)
Log Message:
-----------
Ricard: Restrict the internal use stock categories by user role as described in http://www.weberp.org/forum/showthread.php?tid=171
Modified Paths:
--------------
trunk/InternalStockRequest.php
trunk/includes/MainMenuLinksArray.php
trunk/sql/mysql/upgrade4.08-4.09.sql
Added Paths:
-----------
trunk/InternalStockCategoriesByRole.php
Added: trunk/InternalStockCategoriesByRole.php
===================================================================
--- trunk/InternalStockCategoriesByRole.php (rev 0)
+++ trunk/InternalStockCategoriesByRole.php 2012-07-13 07:58:18 UTC (rev 5497)
@@ -0,0 +1,236 @@
+<?php
+
+/* $Id: InternalStockCategoriesByRole.php 5217 2012-04-03 21:57:50Z tehonu $ */
+/* Functionas as described in http://www.weberp.org/forum/showthread.php?tid=171 */
+
+include('includes/session.inc');
+$title = _('Internal Stock Categories Requests By Security Role Maintenance ');
+
+include('includes/header.inc');
+
+echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Payment Entry')
+ . '" alt="" />' . ' ' . $title . '</p>';
+
+if (isset($_POST['SelectedType'])){
+ $SelectedType = mb_strtoupper($_POST['SelectedType']);
+} elseif (isset($_GET['SelectedType'])){
+ $SelectedType = mb_strtoupper($_GET['SelectedType']);
+} else {
+ $SelectedType='';
+}
+
+if (!isset($_GET['delete']) and (ContainsIllegalCharacters($SelectedType) OR mb_strpos($SelectedType,' ')>0)){
+ $InputError = 1;
+ prnMsg(_('The contain any of the following characters " \' - & or a space'),'error');
+}
+if (isset($_POST['SelectedRole'])){
+ $SelectedRole = mb_strtoupper($_POST['SelectedRole']);
+} elseif (isset($_GET['SelectedRole'])){
+ $SelectedRole = mb_strtoupper($_GET['SelectedRole']);
+}
+
+if (isset($_POST['Cancel'])) {
+ unset($SelectedRole);
+ unset($SelectedType);
+}
+
+if (isset($_POST['Process'])) {
+
+ if ($_POST['SelectedRole'] == '') {
+ echo prnMsg(_('You have not selected a security role to maintain the internal stock categories on'),'error');
+ echo '<br />';
+ unset($SelectedRole);
+ unset($_POST['SelectedRole']);
+ }
+}
+
+if (isset($_POST['submit'])) {
+
+ $InputError=0;
+
+ if ($_POST['SelectedCategory']=='') {
+ $InputError=1;
+ echo prnMsg(_('You have not selected a stock category to be added as internal to this security role'),'error');
+ echo '<br />';
+ unset($SelectedRole);
+ }
+
+ if ( $InputError !=1 ) {
+
+ // First check the type is not being duplicated
+
+ $checkSql = "SELECT count(*)
+ FROM internalstockcatrole
+ WHERE secroleid= '" . $_POST['SelectedRole'] . "'
+ AND categoryid = '" . $_POST['SelectedCategory'] . "'";
+
+ $checkresult = DB_query($checkSql,$db);
+ $checkrow = DB_fetch_row($checkresult);
+
+ if ( $checkrow[0] >0) {
+ $InputError = 1;
+ prnMsg( _('The Stock Category') . ' ' . $_POST['categoryid'] . ' ' ._('already allowed as internal for this security role'),'error');
+ } else {
+ // Add new record on submit
+ $sql = "INSERT INTO internalstockcatrole (secroleid,
+ categoryid)
+ VALUES ('" . $_POST['SelectedRole'] . "',
+ '" . $_POST['SelectedCategory'] . "')";
+
+ $msg = _('Stock Category:') . ' ' . $_POST['SelectedCategory'].' '._('has been allowed to user role') .' '. $_POST['SelectedRole'] . ' ' . _('as internal');
+ $checkSql = "SELECT count(secroleid)
+ FROM securityroles";
+ $result = DB_query($checkSql, $db);
+ $row = DB_fetch_row($result);
+ }
+ }
+
+ if ( $InputError !=1) {
+ //run the SQL from either of the above possibilites
+ $result = DB_query($sql,$db);
+ prnMsg($msg,'success');
+ unset($_POST['SelectedCategory']);
+ }
+
+} elseif ( isset($_GET['delete']) ) {
+ $sql="DELETE FROM internalstockcatrole
+ WHERE secroleid='".$SelectedRole."'
+ AND categoryid='".$SelectedType."'";
+
+ $ErrMsg = _('The Stock Category by Role record could not be deleted because');
+ $result = DB_query($sql,$db,$ErrMsg);
+ prnMsg(_('Internal Stock Category').' '. $SelectedType .' '. _('for user role').' '. $SelectedRole .' '. _('has been deleted') ,'success');
+ unset($_GET['delete']);
+}
+
+if (!isset($SelectedRole)){
+
+ echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">';
+ echo '<div>';
+ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
+ echo '<table class="selection">'; //Main table
+
+ echo '<tr><td>' . _('Select User Role') . ':</td><td><select name="SelectedRole">';
+
+ $SQL = "SELECT secroleid,
+ secrolename
+ FROM securityroles";
+
+ $result = DB_query($SQL,$db);
+ echo '<option value="">' . _('Not Yet Selected') . '</option>';
+ while ($myrow = DB_fetch_array($result)) {
+ if (isset($SelectedRole) and $myrow['secroleid']==$SelectedRole) {
+ echo '<option selected="selected" value="';
+ } else {
+ echo '<option value="';
+ }
+ echo $myrow['secroleid'] . '">' . $myrow['secroleid'] . ' - ' . $myrow['secrolename'] . '</option>';
+
+ } //end while loop
+
+ echo '</select></td></tr>';
+
+ echo '</table>'; // close main table
+ DB_free_result($result);
+
+ echo '<br /><div class="centre"><input type="submit" name="Process" value="' . _('Accept') . '" />
+ <input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>';
+
+ echo '</div>
+ </form>';
+
+}
+
+//end of ifs and buts!
+if (isset($_POST['process'])OR isset($SelectedRole)) {
+
+ echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Stock Categories available as internal for role') . ' ' .$SelectedRole. '</a></div>';
+ echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">';
+ echo '<div>';
+ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
+
+ echo '<input type="hidden" name="SelectedRole" value="' . $SelectedRole . '" />';
+
+ $sql = "SELECT internalstockcatrole.categoryid,
+ stockcategory.categorydescription
+ FROM internalstockcatrole INNER JOIN stockcategory
+ ON internalstockcatrole.categoryid=stockcategory.categoryid
+ WHERE internalstockcatrole.secroleid='".$SelectedRole."'
+ ORDER BY internalstockcatrole.categoryid ASC";
+
+ $result = DB_query($sql,$db);
+
+ echo '<br />
+ <table class="selection">';
+ echo '<tr><th colspan="3"><h3>' . _('Internal Stock Categories Allowed to user role') . ' ' .$SelectedRole. '</h3></th></tr>';
+ echo '<tr>
+ <th>' . _('Category Code') . '</th>
+ <th>' . _('Description') . '</th>
+ </tr>';
+
+$k=0; //row colour counter
+
+while ($myrow = DB_fetch_array($result)) {
+ if ($k==1){
+ echo '<tr class="EvenTableRows">';
+ $k=0;
+ } else {
+ echo '<tr class="OddTableRows">';
+ $k=1;
+ }
+
+ printf('<td>%s</td>
+ <td>%s</td>
+ <td><a href="%s?SelectedType=%s&delete=yes&SelectedRole=' . $SelectedRole . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this internal stock category code?') . '\');">' . _('Delete') . '</a></td>
+ </tr>',
+ $myrow['categoryid'],
+ $myrow['categorydescription'],
+ htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'),
+ $myrow['categoryid'],
+ htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'),
+ $myrow['categoryid']);
+ }
+ //END WHILE LIST LOOP
+ echo '</table>';
+
+ if (! isset($_GET['delete'])) {
+
+
+ echo '<br /><table class="selection">'; //Main table
+
+ echo '<tr><td>' . _('Select Stock Category Code') . ':</td><td><select name="SelectedCategory">';
+
+ $SQL = "SELECT categoryid,
+ categorydescription
+ FROM stockcategory";
+
+ $result = DB_query($SQL,$db);
+ if (!isset($_POST['SelectedCategory'])){
+ echo '<option selected="selected" value="">' . _('Not Yet Selected') . '</option>';
+ }
+ while ($myrow = DB_fetch_array($result)) {
+ if (isset($_POST['SelectedCategory']) AND $myrow['categoryid']==$_POST['SelectedCategory']) {
+ echo '<option selected="selected" value="';
+ } else {
+ echo '<option value="';
+ }
+ echo $myrow['categoryid'] . '">' . $myrow['categoryid'] . ' - ' . $myrow['categorydescription'] . '</option>';
+
+ } //end while loop
+
+ echo '</select></td></tr>';
+
+ echo '</table>'; // close main table
+ DB_free_result($result);
+
+ echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Accept') . '" />
+ <input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>';
+
+ echo '</div>
+ </form>';
+
+ } // end if user wish to delete
+}
+
+include('includes/footer.inc');
+?>
\ No newline at end of file
Modified: trunk/InternalStockRequest.php
===================================================================
--- trunk/InternalStockRequest.php 2012-07-12 10:09:49 UTC (rev 5496)
+++ trunk/InternalStockRequest.php 2012-07-13 07:58:18 UTC (rev 5497)
@@ -279,10 +279,12 @@
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Search for Inventory Items'). '</p>';
-$SQL = "SELECT categoryid,
- categorydescription
- FROM stockcategory
- ORDER BY categorydescription";
+$SQL = "SELECT stockcategory.categoryid,
+ stockcategory.categorydescription
+ FROM stockcategory, internalstockcatrole
+ WHERE stockcategory.categoryid = internalstockcatrole.categoryid
+ AND internalstockcatrole.secroleid= " . $_SESSION['AccessLevel'] . "
+ ORDER BY stockcategory.categorydescription";
$result1 = DB_query($SQL, $db);
if (DB_num_rows($result1) == 0) {
echo '<p class="bad">' . _('Problem Report') . ':<br />' . _('There are no stock categories currently defined please use the link below to set them up').'</p>';
@@ -298,9 +300,9 @@
$_POST['StockCat'] = '';
}
if ($_POST['StockCat'] == 'All') {
- echo '<option selected="True" value="All">' . _('All').'</option>';
+ echo '<option selected="True" value="All">' . _('All Authorized').'</option>';
} else {
- echo '<option value="All">' . _('All').'</option>';
+ echo '<option value="All">' . _('All Authorized').'</option>';
}
while ($myrow1 = DB_fetch_array($result1)) {
if ($myrow1['categoryid'] == $_POST['StockCat']) {
@@ -357,8 +359,11 @@
stockmaster.units as stockunits,
stockmaster.decimalplaces
FROM stockmaster,
- stockcategory
+ stockcategory,
+ internalstockcatrole
WHERE stockmaster.categoryid=stockcategory.categoryid
+ AND stockcategory.categoryid = internalstockcatrole.categoryid
+ AND internalstockcatrole.secroleid= " . $_SESSION['AccessLevel'] . "
AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D')
AND stockmaster.mbflag <>'G'
AND stockmaster.description " . LIKE . " '" . $SearchString . "'
@@ -370,8 +375,11 @@
stockmaster.units as stockunits,
stockmaster.decimalplaces
FROM stockmaster,
- stockcategory
- WHERE stockmaster.categoryid=stockcategory.categoryid
+ stockcategory,
+ internalstockcatrole
+ WHERE stockmaster.categoryid=stockcategory.categoryid
+ AND stockcategory.categoryid = internalstockcatrole.categoryid
+ AND internalstockcatrole.secroleid= " . $_SESSION['AccessLevel'] . "
AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D')
AND stockmaster.mbflag <>'G'
AND stockmaster.discontinued=0
@@ -391,8 +399,11 @@
stockmaster.units as stockunits,
stockmaster.decimalplaces
FROM stockmaster,
- stockcategory
+ stockcategory,
+ internalstockcatrole
WHERE stockmaster.categoryid=stockcategory.categoryid
+ AND stockcategory.categoryid = internalstockcatrole.categoryid
+ AND internalstockcatrole.secroleid= " . $_SESSION['AccessLevel'] . "
AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D')
AND stockmaster.stockid " . LIKE . " '" . $SearchString . "'
AND stockmaster.mbflag <>'G'
@@ -404,8 +415,11 @@
stockmaster.units as stockunits,
stockmaster.decimalplaces
FROM stockmaster,
- stockcategory
+ stockcategory,
+ internalstockcatrole
WHERE stockmaster.categoryid=stockcategory.categoryid
+ AND stockcategory.categoryid = internalstockcatrole.categoryid
+ AND internalstockcatrole.secroleid= " . $_SESSION['AccessLevel'] . "
AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D')
AND stockmaster.stockid " . LIKE . " '" . $SearchString . "'
AND stockmaster.mbflag <>'G'
@@ -421,8 +435,11 @@
stockmaster.units as stockunits,
stockmaster.decimalplaces
FROM stockmaster,
- stockcategory
- WHERE stockmaster.categoryid=stockcategory.categoryid
+ stockcategory,
+ internalstockcatrole
+ WHERE stockmaster.categoryid=stockcategory.categoryid
+ AND stockcategory.categoryid = internalstockcatrole.categoryid
+ AND internalstockcatrole.secroleid= " . $_SESSION['AccessLevel'] . "
AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D')
AND stockmaster.mbflag <>'G'
AND stockmaster.discontinued=0
@@ -433,8 +450,11 @@
stockmaster.units as stockunits,
stockmaster.decimalplaces
FROM stockmaster,
- stockcategory
+ stockcategory,
+ internalstockcatrole
WHERE stockmaster.categoryid=stockcategory.categoryid
+ AND stockcategory.categoryid = internalstockcatrole.categoryid
+ AND internalstockcatrole.secroleid= " . $_SESSION['AccessLevel'] . "
AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D')
AND stockmaster.mbflag <>'G'
AND stockmaster.discontinued=0
Modified: trunk/includes/MainMenuLinksArray.php
===================================================================
--- trunk/includes/MainMenuLinksArray.php 2012-07-12 10:09:49 UTC (rev 5496)
+++ trunk/includes/MainMenuLinksArray.php 2012-07-13 07:58:18 UTC (rev 5497)
@@ -518,7 +518,8 @@
_('Units of Measure'),
_('MRP Available Production Days'),
_('MRP Demand Types'),
- _('Maintain Internal Departments')
+ _('Maintain Internal Departments'),
+ _('Maintain Internal Stock Categories to User Roles')
);
$MenuItems['system']['Maintenance']['URL'] = array ('/StockCategories.php',
@@ -527,7 +528,8 @@
'/UnitsOfMeasure.php',
'/MRPCalendar.php',
'/MRPDemandTypes.php',
- '/Departments.php'
+ '/Departments.php',
+ '/InternalStockCategoriesByRole.php'
);
$MenuItems['Utilities']['Transactions']['Caption'] = array (_('Change A Customer Code'),
Modified: trunk/sql/mysql/upgrade4.08-4.09.sql
===================================================================
--- trunk/sql/mysql/upgrade4.08-4.09.sql 2012-07-12 10:09:49 UTC (rev 5496)
+++ trunk/sql/mysql/upgrade4.08-4.09.sql 2012-07-13 07:58:18 UTC (rev 5497)
@@ -1,4 +1,13 @@
INSERT INTO scripts VALUES ('Z_DeleteOldPrices.php','15','Deletes all old prices');
INSERT INTO scripts VALUES ('Z_ChangeLocationCode.php','15','Change a locations code and in all tables where the old code was used to the new code');
-UPDATE config SET confvalue='4.08.2' WHERE confname='VersionNumber';
+CREATE TABLE IF NOT EXISTS `internalstockcatrole` (
+ `categoryid` varchar(6) NOT NULL,
+ `secroleid` int(11) NOT NULL,
+ KEY `internalstockcatrole_ibfk_1` (`categoryid`),
+ KEY `internalstockcatrole_ibfk_2` (`secroleid`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO scripts VALUES ('InternalStockCategoriesByRole.php','15','Daintains the stock categories to be used as internal for any user security role');
+
+UPDATE config SET confvalue='4.08.2' 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.
|
|
From: <te...@us...> - 2012-07-13 08:36:00
|
Revision: 5498
http://web-erp.svn.sourceforge.net/web-erp/?rev=5498&view=rev
Author: tehonu
Date: 2012-07-13 08:35:54 +0000 (Fri, 13 Jul 2012)
Log Message:
-----------
Ricard: Flag on locations to allow (or deny) internal stock requests from that location.
Modified Paths:
--------------
trunk/InternalStockRequest.php
trunk/Locations.php
trunk/sql/mysql/upgrade4.08-4.09.sql
Modified: trunk/InternalStockRequest.php
===================================================================
--- trunk/InternalStockRequest.php 2012-07-13 07:58:18 UTC (rev 5497)
+++ trunk/InternalStockRequest.php 2012-07-13 08:35:54 UTC (rev 5498)
@@ -189,6 +189,7 @@
$sql="SELECT loccode,
locationname
FROM locations
+ WHERE internalrequest = 1
ORDER BY locationname";
$result=DB_query($sql, $db);
Modified: trunk/Locations.php
===================================================================
--- trunk/Locations.php 2012-07-13 07:58:18 UTC (rev 5497)
+++ trunk/Locations.php 2012-07-13 08:35:54 UTC (rev 5498)
@@ -69,7 +69,8 @@
taxprovinceid = '" . $_POST['TaxProvince'] . "',
cashsalecustomer ='" . $_POST['CashSaleCustomer'] . "',
cashsalebranch ='" . $_POST['CashSaleBranch'] . "',
- managed = '" . $_POST['Managed'] . "'
+ managed = '" . $_POST['Managed'] . "',
+ internalrequest = '" . $_POST['InternalRequest'] . "'
WHERE loccode = '" . $SelectedLocation . "'";
$ErrMsg = _('An error occurred updating the') . ' ' . $SelectedLocation . ' ' . _('location record because');
@@ -95,6 +96,7 @@
unset($_POST['CashSaleBranch']);
unset($SelectedLocation);
unset($_POST['Contact']);
+ unset($_POST['InternalRequest']);
} elseif ($InputError !=1) {
@@ -106,6 +108,13 @@
$_POST['Managed'] = 0;
}
+ /* Set the InternalRequest field to 1 if it is checked, otherwise 0 */
+ if($_POST['InternalRequest'] == 'Yes') {
+ $_POST['InternalRequest'] = 1;
+ } else {
+ $_POST['InternalRequest'] = 0;
+ }
+
/*SelectedLocation is null cos no item selected on first time round so must be adding a record must be submitting new entries in the new Location form */
$sql = "INSERT INTO locations (loccode,
@@ -123,7 +132,8 @@
taxprovinceid,
cashsalecustomer,
cashsalebranch,
- managed )
+ managed,
+ internalrequest)
VALUES ('" . $_POST['LocCode'] . "',
'" . $_POST['LocationName'] . "',
'" . $_POST['DelAdd1'] ."',
@@ -139,7 +149,8 @@
'" . $_POST['TaxProvince'] . "',
'" . $_POST['CashSaleCustomer'] . "',
'" . $_POST['CashSaleBranch'] . "',
- '" . $_POST['Managed'] . "')";
+ '" . $_POST['Managed'] . "',
+ '" . $_POST['InternalRequest'] . "')";
$ErrMsg = _('An error occurred inserting the new location record because');
$DbgMsg = _('The SQL used to insert the location record was');
@@ -182,6 +193,7 @@
unset($_POST['Managed']);
unset($SelectedLocation);
unset($_POST['Contact']);
+ unset($_POST['InternalRequest']);
}
@@ -438,7 +450,8 @@
taxprovinceid,
cashsalecustomer,
cashsalebranch,
- managed
+ managed,
+ internalrequest
FROM locations
WHERE loccode='" . $SelectedLocation . "'";
@@ -461,6 +474,7 @@
$_POST['CashSaleCustomer'] = $myrow['cashsalecustomer'];
$_POST['CashSaleBranch'] = $myrow['cashsalebranch'];
$_POST['Managed'] = $myrow['managed'];
+ $_POST['InternalRequest'] = $myrow['internalrequest'];
echo '<input type="hidden" name="SelectedLocation" value="' . $SelectedLocation . '" />';
@@ -596,6 +610,20 @@
<td>' . _('Counter Sales Branch Code') . ':' . '</td>
<td><input type="text" name="CashSaleBranch" value="' . $_POST['CashSaleBranch'] . '" size="11" maxlength="10" /></td>
</tr>';
+ echo '<tr>
+ <td>' . _('Allow internal requests?') . ':</td>
+ <td><select name="InternalRequest">';
+ if ($_POST['InternalRequest']==1){
+ echo '<option selected="selected" value="1">' . _('Yes') . '</option>';
+ } else {
+ echo '<option value="1">' . _('Yes') . '</option>';
+ }
+ if ($_POST['InternalRequest']==0){
+ echo '<option selected="selected" value="0">' . _('No') . '</option>';
+ } else {
+ echo '<option value="0">' . _('No') . '</option>';
+ }
+
/*
This functionality is not written yet ...
<tr><td><?php echo _('Enable Warehouse Management') . ':'; ?></td>
Modified: trunk/sql/mysql/upgrade4.08-4.09.sql
===================================================================
--- trunk/sql/mysql/upgrade4.08-4.09.sql 2012-07-13 07:58:18 UTC (rev 5497)
+++ trunk/sql/mysql/upgrade4.08-4.09.sql 2012-07-13 08:35:54 UTC (rev 5498)
@@ -10,4 +10,6 @@
INSERT INTO scripts VALUES ('InternalStockCategoriesByRole.php','15','Daintains the stock categories to be used as internal for any user security role');
+ALTER TABLE `locations` ADD `internalrequest` TINYINT( 4 ) NOT NULL DEFAULT '1' COMMENT 'Allow (1) or not (0) internal request from this location';
+
UPDATE config SET confvalue='4.08.2' 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.
|
|
From: <te...@us...> - 2012-07-13 08:36:06
|
Revision: 5498
http://web-erp.svn.sourceforge.net/web-erp/?rev=5498&view=rev
Author: tehonu
Date: 2012-07-13 08:35:54 +0000 (Fri, 13 Jul 2012)
Log Message:
-----------
Ricard: Flag on locations to allow (or deny) internal stock requests from that location.
Modified Paths:
--------------
trunk/InternalStockRequest.php
trunk/Locations.php
trunk/sql/mysql/upgrade4.08-4.09.sql
Modified: trunk/InternalStockRequest.php
===================================================================
--- trunk/InternalStockRequest.php 2012-07-13 07:58:18 UTC (rev 5497)
+++ trunk/InternalStockRequest.php 2012-07-13 08:35:54 UTC (rev 5498)
@@ -189,6 +189,7 @@
$sql="SELECT loccode,
locationname
FROM locations
+ WHERE internalrequest = 1
ORDER BY locationname";
$result=DB_query($sql, $db);
Modified: trunk/Locations.php
===================================================================
--- trunk/Locations.php 2012-07-13 07:58:18 UTC (rev 5497)
+++ trunk/Locations.php 2012-07-13 08:35:54 UTC (rev 5498)
@@ -69,7 +69,8 @@
taxprovinceid = '" . $_POST['TaxProvince'] . "',
cashsalecustomer ='" . $_POST['CashSaleCustomer'] . "',
cashsalebranch ='" . $_POST['CashSaleBranch'] . "',
- managed = '" . $_POST['Managed'] . "'
+ managed = '" . $_POST['Managed'] . "',
+ internalrequest = '" . $_POST['InternalRequest'] . "'
WHERE loccode = '" . $SelectedLocation . "'";
$ErrMsg = _('An error occurred updating the') . ' ' . $SelectedLocation . ' ' . _('location record because');
@@ -95,6 +96,7 @@
unset($_POST['CashSaleBranch']);
unset($SelectedLocation);
unset($_POST['Contact']);
+ unset($_POST['InternalRequest']);
} elseif ($InputError !=1) {
@@ -106,6 +108,13 @@
$_POST['Managed'] = 0;
}
+ /* Set the InternalRequest field to 1 if it is checked, otherwise 0 */
+ if($_POST['InternalRequest'] == 'Yes') {
+ $_POST['InternalRequest'] = 1;
+ } else {
+ $_POST['InternalRequest'] = 0;
+ }
+
/*SelectedLocation is null cos no item selected on first time round so must be adding a record must be submitting new entries in the new Location form */
$sql = "INSERT INTO locations (loccode,
@@ -123,7 +132,8 @@
taxprovinceid,
cashsalecustomer,
cashsalebranch,
- managed )
+ managed,
+ internalrequest)
VALUES ('" . $_POST['LocCode'] . "',
'" . $_POST['LocationName'] . "',
'" . $_POST['DelAdd1'] ."',
@@ -139,7 +149,8 @@
'" . $_POST['TaxProvince'] . "',
'" . $_POST['CashSaleCustomer'] . "',
'" . $_POST['CashSaleBranch'] . "',
- '" . $_POST['Managed'] . "')";
+ '" . $_POST['Managed'] . "',
+ '" . $_POST['InternalRequest'] . "')";
$ErrMsg = _('An error occurred inserting the new location record because');
$DbgMsg = _('The SQL used to insert the location record was');
@@ -182,6 +193,7 @@
unset($_POST['Managed']);
unset($SelectedLocation);
unset($_POST['Contact']);
+ unset($_POST['InternalRequest']);
}
@@ -438,7 +450,8 @@
taxprovinceid,
cashsalecustomer,
cashsalebranch,
- managed
+ managed,
+ internalrequest
FROM locations
WHERE loccode='" . $SelectedLocation . "'";
@@ -461,6 +474,7 @@
$_POST['CashSaleCustomer'] = $myrow['cashsalecustomer'];
$_POST['CashSaleBranch'] = $myrow['cashsalebranch'];
$_POST['Managed'] = $myrow['managed'];
+ $_POST['InternalRequest'] = $myrow['internalrequest'];
echo '<input type="hidden" name="SelectedLocation" value="' . $SelectedLocation . '" />';
@@ -596,6 +610,20 @@
<td>' . _('Counter Sales Branch Code') . ':' . '</td>
<td><input type="text" name="CashSaleBranch" value="' . $_POST['CashSaleBranch'] . '" size="11" maxlength="10" /></td>
</tr>';
+ echo '<tr>
+ <td>' . _('Allow internal requests?') . ':</td>
+ <td><select name="InternalRequest">';
+ if ($_POST['InternalRequest']==1){
+ echo '<option selected="selected" value="1">' . _('Yes') . '</option>';
+ } else {
+ echo '<option value="1">' . _('Yes') . '</option>';
+ }
+ if ($_POST['InternalRequest']==0){
+ echo '<option selected="selected" value="0">' . _('No') . '</option>';
+ } else {
+ echo '<option value="0">' . _('No') . '</option>';
+ }
+
/*
This functionality is not written yet ...
<tr><td><?php echo _('Enable Warehouse Management') . ':'; ?></td>
Modified: trunk/sql/mysql/upgrade4.08-4.09.sql
===================================================================
--- trunk/sql/mysql/upgrade4.08-4.09.sql 2012-07-13 07:58:18 UTC (rev 5497)
+++ trunk/sql/mysql/upgrade4.08-4.09.sql 2012-07-13 08:35:54 UTC (rev 5498)
@@ -10,4 +10,6 @@
INSERT INTO scripts VALUES ('InternalStockCategoriesByRole.php','15','Daintains the stock categories to be used as internal for any user security role');
+ALTER TABLE `locations` ADD `internalrequest` TINYINT( 4 ) NOT NULL DEFAULT '1' COMMENT 'Allow (1) or not (0) internal request from this location';
+
UPDATE config SET confvalue='4.08.2' 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.
|
|
From: <tim...@us...> - 2012-07-13 09:49:59
|
Revision: 5499
http://web-erp.svn.sourceforge.net/web-erp/?rev=5499&view=rev
Author: tim_schofield
Date: 2012-07-13 09:49:49 +0000 (Fri, 13 Jul 2012)
Log Message:
-----------
Tim: Fix up the sql where a field was selected twice
Modified Paths:
--------------
trunk/CustomerBranches.php
trunk/doc/Change.log
Modified: trunk/CustomerBranches.php
===================================================================
--- trunk/CustomerBranches.php 2012-07-13 08:35:54 UTC (rev 5498)
+++ trunk/CustomerBranches.php 2012-07-13 09:49:49 UTC (rev 5499)
@@ -104,7 +104,7 @@
if ($map_host=="") {
// check that some sane values are setup already in geocode tables, if not skip the geocoding but add the record anyway.
echo '<div class="warn">' . _('Warning - Geocode Integration is enabled, but no hosts are setup. Go to Geocode Setup') . '</div>';
- } else {
+ } else {
$address = $_POST['BrAddress1'] . ', ' . $_POST['BrAddress2'] . ', ' . $_POST['BrAddress3'] . ', ' . $_POST['BrAddress4'];
$base_url = 'http://' . MAPS_HOST . '/maps/geo?output=xml&key=' . KEY;
$request_url = $base_url . '&q=' . urlencode($address);
@@ -118,7 +118,7 @@
$status = $xml->Response->Status->code;
if (strcmp($status, '200') == 0) {
// Successful geocode
- $geocode_pending = false;
+ $geocode_pending = false;
$coordinates = $xml->Response->Placemark->Point->coordinates;
$coordinatesSplit = explode(",", $coordinates);
// Format: Longitude, Latitude, Altitude
@@ -172,7 +172,7 @@
/*Selected branch is null cos no item selected on first time round so must be adding a record must be submitting new entries in the new Customer Branches form */
- $sql = "INSERT INTO custbranch (branchcode,
+ $sql = "INSERT INTO custbranch (branchcode,
debtorno,
brname,
braddress1,
@@ -274,7 +274,7 @@
unset($_POST['CustBranchCode']);
unset($_POST['DeliverBlind']);
unset($SelectedBranch);
- }
+ }
} else if (isset($_GET['delete'])) {
//the link to delete a selected record was clicked instead of the submit button
@@ -315,12 +315,12 @@
if ($myrow[0]>0) {
prnMsg(_('Cannot delete this branch because users exist that refer to it') . '. ' . _('Purge old users first'),'warn');
- echo '<br />'._('There are').' ' . $myrow[0] . ' '._('users referring to this Branch/customer');
+ echo '<br />'._('There are').' ' . $myrow[0] . ' '._('users referring to this Branch/customer');
} else {
$sql="DELETE FROM custbranch WHERE branchcode='" . $SelectedBranch . "' AND debtorno='" . $DebtorNo . "'";
$ErrMsg = _('The branch record could not be deleted') . ' - ' . _('the SQL server returned the following message');
- $result = DB_query($sql,$db,$ErrMsg);
+ $result = DB_query($sql,$db,$ErrMsg);
if (DB_error_no($db)==0){
prnMsg(_('Branch Deleted'),'success');
}
@@ -335,27 +335,26 @@
/* It could still be the second time the page has been run and a record has been selected for modification - SelectedBranch will exist because it was sent with the new call. If its the first time the page has been displayed with no parameters then none of the above are true and the list of branches will be displayed with links to delete or edit each. These will call the same page again and allow update/input or deletion of the records*/
$sql = "SELECT debtorsmaster.name,
- custbranch.branchcode,
- brname,
- salesman.salesmanname,
- areas.areadescription,
- contactname,
- phoneno,
- faxno,
- custbranch.email,
- taxgroups.taxgroupdescription,
- custbranch.branchcode,
- custbranch.disabletrans
- FROM custbranch,
- debtorsmaster,
- areas,
- salesman,
- taxgroups
- WHERE custbranch.debtorno=debtorsmaster.debtorno
- AND custbranch.area=areas.areacode
- AND custbranch.salesman=salesman.salesmancode
- AND custbranch.taxgroupid=taxgroups.taxgroupid
- AND custbranch.debtorno = '".$DebtorNo."'";
+ custbranch.branchcode,
+ brname,
+ salesman.salesmanname,
+ areas.areadescription,
+ contactname,
+ phoneno,
+ faxno,
+ custbranch.email,
+ taxgroups.taxgroupdescription,
+ custbranch.disabletrans
+ FROM custbranch,
+ debtorsmaster,
+ areas,
+ salesman,
+ taxgroups
+ WHERE custbranch.debtorno=debtorsmaster.debtorno
+ AND custbranch.area=areas.areacode
+ AND custbranch.salesman=salesman.salesmancode
+ AND custbranch.taxgroupid=taxgroups.taxgroupid
+ AND custbranch.debtorno = '".$DebtorNo."'";
$result = DB_query($sql,$db);
$myrow = DB_fetch_row($result);
@@ -363,7 +362,7 @@
$TotalDisable = 0;
if ($myrow) {
echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />
- ' . ' ' . _('Branches defined for'). ' '. $DebtorNo . ' - ' . $myrow[0] . '</p>';
+ ' . ' ' . _('Branches defined for'). ' '. $DebtorNo . ' - ' . $myrow[0] . '</p>';
echo '<table class="selection">
<tr>
<th>'._('Code').'</th>
@@ -400,7 +399,7 @@
<td>%s</td>
<td><a href="%s?DebtorNo=%s&SelectedBranch=%s">%s</a></td>
<td><a href="%s?DebtorNo=%s&SelectedBranch=%s&delete=yes" onclick=\'return confirm("' . _('Are you sure you wish to delete this branch?') . '");\'>%s</a></td></tr>',
- $myrow[10],
+ $myrow[1],
$myrow[2],
$myrow[5],
$myrow[3],
@@ -410,7 +409,7 @@
$myrow[8],
$myrow[8],
$myrow[9],
- ($myrow[11]?_('No'):_('Yes')),
+ ($myrow[10]?_('No'):_('Yes')),
htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'),
$DebtorNo,
urlencode($myrow[1]),
@@ -466,7 +465,7 @@
if (!isset($_GET['delete'])) {
echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">';
- echo '<div>';
+ echo '<div>';
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
if (isset($SelectedBranch)) {
@@ -540,7 +539,7 @@
echo '<input type="hidden" name="BranchCode" value="' . $_POST['BranchCode'] . '" />';
echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />
- ' . ' ' . _('Change Details for Branch'). ' '. $SelectedBranch . '</p>';
+ ' . ' ' . _('Change Details for Branch'). ' '. $SelectedBranch . '</p>';
if (isset($SelectedBranch)) {
echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?DebtorNo=' . $DebtorNo. '">' . _('Show all branches defined for'). ' '. $DebtorNo . '</a></div>';
}
@@ -577,10 +576,10 @@
$_POST['BranchCode'] = $_GET['BranchCode'];
$_POST['BrName'] = $myrow['name'];
$_POST['BrAddress1'] = $myrow['addrsss1'];
- $_POST['BrAddress2'] = $myrow['addrsss2'];
+ $_POST['BrAddress2'] = $myrow['addrsss2'];
$_POST['BrAddress3'] = $myrow['addrsss3'];
$_POST['BrAddress4'] = $myrow['addrsss4'];
- $_POST['BrAddress5'] = $myrow['addrsss5'];
+ $_POST['BrAddress5'] = $myrow['addrsss5'];
$_POST['BrAddress6'] = $myrow['addrsss6'];
}
if (!isset($_POST['BranchCode'])) {
@@ -597,8 +596,8 @@
echo '<tr>
- <td>';
- echo '<input type="hidden" name="DebtorNo" value="'. $DebtorNo . '" />';
+ <td>';
+ echo '<input type="hidden" name="DebtorNo" value="'. $DebtorNo . '" />';
echo _('Branch Name').':</td>';
@@ -783,7 +782,7 @@
}
echo '<tr>
<td>'.(($_POST['Email']) ? '<a href="Mailto:'.$_POST['Email'].'">'._('Email').':</a>' : _('Email').':').'</td>';
- //only display email link if there is an email address
+ //only display email link if there is an email address
echo '<td><input tabindex="18" type="text" name="Email" size="56" maxlength="55" value="'. $_POST['Email'].'" /></td>
</tr>';
@@ -908,7 +907,7 @@
<div class="centre">
<input tabindex="28" type="submit" name="submit" value="' . _('Enter Branch') . '" />
</div>
- </div>
+ </div>
</form>';
} //end if record deleted no point displaying form to add record
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2012-07-13 08:35:54 UTC (rev 5498)
+++ trunk/doc/Change.log 2012-07-13 09:49:49 UTC (rev 5499)
@@ -1,5 +1,6 @@
webERP Change Log
+13/7/12 Tim: Fix up the sql where a field was selected twice
10/7/12 Phil: Made purchase order lines look at the purchasing data lead time and set the delivery date of the line to today + the lead time if this is beyond the delivery date specified in the PO header.
9/7/12 Tim/Ricard: Add Z_ChangeSupplierCode.php
6/7/12 Phil: Add stable versions to UpgradeDatabase.php script
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tim...@us...> - 2012-07-13 09:50:00
|
Revision: 5499
http://web-erp.svn.sourceforge.net/web-erp/?rev=5499&view=rev
Author: tim_schofield
Date: 2012-07-13 09:49:49 +0000 (Fri, 13 Jul 2012)
Log Message:
-----------
Tim: Fix up the sql where a field was selected twice
Modified Paths:
--------------
trunk/CustomerBranches.php
trunk/doc/Change.log
Modified: trunk/CustomerBranches.php
===================================================================
--- trunk/CustomerBranches.php 2012-07-13 08:35:54 UTC (rev 5498)
+++ trunk/CustomerBranches.php 2012-07-13 09:49:49 UTC (rev 5499)
@@ -104,7 +104,7 @@
if ($map_host=="") {
// check that some sane values are setup already in geocode tables, if not skip the geocoding but add the record anyway.
echo '<div class="warn">' . _('Warning - Geocode Integration is enabled, but no hosts are setup. Go to Geocode Setup') . '</div>';
- } else {
+ } else {
$address = $_POST['BrAddress1'] . ', ' . $_POST['BrAddress2'] . ', ' . $_POST['BrAddress3'] . ', ' . $_POST['BrAddress4'];
$base_url = 'http://' . MAPS_HOST . '/maps/geo?output=xml&key=' . KEY;
$request_url = $base_url . '&q=' . urlencode($address);
@@ -118,7 +118,7 @@
$status = $xml->Response->Status->code;
if (strcmp($status, '200') == 0) {
// Successful geocode
- $geocode_pending = false;
+ $geocode_pending = false;
$coordinates = $xml->Response->Placemark->Point->coordinates;
$coordinatesSplit = explode(",", $coordinates);
// Format: Longitude, Latitude, Altitude
@@ -172,7 +172,7 @@
/*Selected branch is null cos no item selected on first time round so must be adding a record must be submitting new entries in the new Customer Branches form */
- $sql = "INSERT INTO custbranch (branchcode,
+ $sql = "INSERT INTO custbranch (branchcode,
debtorno,
brname,
braddress1,
@@ -274,7 +274,7 @@
unset($_POST['CustBranchCode']);
unset($_POST['DeliverBlind']);
unset($SelectedBranch);
- }
+ }
} else if (isset($_GET['delete'])) {
//the link to delete a selected record was clicked instead of the submit button
@@ -315,12 +315,12 @@
if ($myrow[0]>0) {
prnMsg(_('Cannot delete this branch because users exist that refer to it') . '. ' . _('Purge old users first'),'warn');
- echo '<br />'._('There are').' ' . $myrow[0] . ' '._('users referring to this Branch/customer');
+ echo '<br />'._('There are').' ' . $myrow[0] . ' '._('users referring to this Branch/customer');
} else {
$sql="DELETE FROM custbranch WHERE branchcode='" . $SelectedBranch . "' AND debtorno='" . $DebtorNo . "'";
$ErrMsg = _('The branch record could not be deleted') . ' - ' . _('the SQL server returned the following message');
- $result = DB_query($sql,$db,$ErrMsg);
+ $result = DB_query($sql,$db,$ErrMsg);
if (DB_error_no($db)==0){
prnMsg(_('Branch Deleted'),'success');
}
@@ -335,27 +335,26 @@
/* It could still be the second time the page has been run and a record has been selected for modification - SelectedBranch will exist because it was sent with the new call. If its the first time the page has been displayed with no parameters then none of the above are true and the list of branches will be displayed with links to delete or edit each. These will call the same page again and allow update/input or deletion of the records*/
$sql = "SELECT debtorsmaster.name,
- custbranch.branchcode,
- brname,
- salesman.salesmanname,
- areas.areadescription,
- contactname,
- phoneno,
- faxno,
- custbranch.email,
- taxgroups.taxgroupdescription,
- custbranch.branchcode,
- custbranch.disabletrans
- FROM custbranch,
- debtorsmaster,
- areas,
- salesman,
- taxgroups
- WHERE custbranch.debtorno=debtorsmaster.debtorno
- AND custbranch.area=areas.areacode
- AND custbranch.salesman=salesman.salesmancode
- AND custbranch.taxgroupid=taxgroups.taxgroupid
- AND custbranch.debtorno = '".$DebtorNo."'";
+ custbranch.branchcode,
+ brname,
+ salesman.salesmanname,
+ areas.areadescription,
+ contactname,
+ phoneno,
+ faxno,
+ custbranch.email,
+ taxgroups.taxgroupdescription,
+ custbranch.disabletrans
+ FROM custbranch,
+ debtorsmaster,
+ areas,
+ salesman,
+ taxgroups
+ WHERE custbranch.debtorno=debtorsmaster.debtorno
+ AND custbranch.area=areas.areacode
+ AND custbranch.salesman=salesman.salesmancode
+ AND custbranch.taxgroupid=taxgroups.taxgroupid
+ AND custbranch.debtorno = '".$DebtorNo."'";
$result = DB_query($sql,$db);
$myrow = DB_fetch_row($result);
@@ -363,7 +362,7 @@
$TotalDisable = 0;
if ($myrow) {
echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />
- ' . ' ' . _('Branches defined for'). ' '. $DebtorNo . ' - ' . $myrow[0] . '</p>';
+ ' . ' ' . _('Branches defined for'). ' '. $DebtorNo . ' - ' . $myrow[0] . '</p>';
echo '<table class="selection">
<tr>
<th>'._('Code').'</th>
@@ -400,7 +399,7 @@
<td>%s</td>
<td><a href="%s?DebtorNo=%s&SelectedBranch=%s">%s</a></td>
<td><a href="%s?DebtorNo=%s&SelectedBranch=%s&delete=yes" onclick=\'return confirm("' . _('Are you sure you wish to delete this branch?') . '");\'>%s</a></td></tr>',
- $myrow[10],
+ $myrow[1],
$myrow[2],
$myrow[5],
$myrow[3],
@@ -410,7 +409,7 @@
$myrow[8],
$myrow[8],
$myrow[9],
- ($myrow[11]?_('No'):_('Yes')),
+ ($myrow[10]?_('No'):_('Yes')),
htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'),
$DebtorNo,
urlencode($myrow[1]),
@@ -466,7 +465,7 @@
if (!isset($_GET['delete'])) {
echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">';
- echo '<div>';
+ echo '<div>';
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
if (isset($SelectedBranch)) {
@@ -540,7 +539,7 @@
echo '<input type="hidden" name="BranchCode" value="' . $_POST['BranchCode'] . '" />';
echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />
- ' . ' ' . _('Change Details for Branch'). ' '. $SelectedBranch . '</p>';
+ ' . ' ' . _('Change Details for Branch'). ' '. $SelectedBranch . '</p>';
if (isset($SelectedBranch)) {
echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?DebtorNo=' . $DebtorNo. '">' . _('Show all branches defined for'). ' '. $DebtorNo . '</a></div>';
}
@@ -577,10 +576,10 @@
$_POST['BranchCode'] = $_GET['BranchCode'];
$_POST['BrName'] = $myrow['name'];
$_POST['BrAddress1'] = $myrow['addrsss1'];
- $_POST['BrAddress2'] = $myrow['addrsss2'];
+ $_POST['BrAddress2'] = $myrow['addrsss2'];
$_POST['BrAddress3'] = $myrow['addrsss3'];
$_POST['BrAddress4'] = $myrow['addrsss4'];
- $_POST['BrAddress5'] = $myrow['addrsss5'];
+ $_POST['BrAddress5'] = $myrow['addrsss5'];
$_POST['BrAddress6'] = $myrow['addrsss6'];
}
if (!isset($_POST['BranchCode'])) {
@@ -597,8 +596,8 @@
echo '<tr>
- <td>';
- echo '<input type="hidden" name="DebtorNo" value="'. $DebtorNo . '" />';
+ <td>';
+ echo '<input type="hidden" name="DebtorNo" value="'. $DebtorNo . '" />';
echo _('Branch Name').':</td>';
@@ -783,7 +782,7 @@
}
echo '<tr>
<td>'.(($_POST['Email']) ? '<a href="Mailto:'.$_POST['Email'].'">'._('Email').':</a>' : _('Email').':').'</td>';
- //only display email link if there is an email address
+ //only display email link if there is an email address
echo '<td><input tabindex="18" type="text" name="Email" size="56" maxlength="55" value="'. $_POST['Email'].'" /></td>
</tr>';
@@ -908,7 +907,7 @@
<div class="centre">
<input tabindex="28" type="submit" name="submit" value="' . _('Enter Branch') . '" />
</div>
- </div>
+ </div>
</form>';
} //end if record deleted no point displaying form to add record
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2012-07-13 08:35:54 UTC (rev 5498)
+++ trunk/doc/Change.log 2012-07-13 09:49:49 UTC (rev 5499)
@@ -1,5 +1,6 @@
webERP Change Log
+13/7/12 Tim: Fix up the sql where a field was selected twice
10/7/12 Phil: Made purchase order lines look at the purchasing data lead time and set the delivery date of the line to today + the lead time if this is beyond the delivery date specified in the PO header.
9/7/12 Tim/Ricard: Add Z_ChangeSupplierCode.php
6/7/12 Phil: Add stable versions to UpgradeDatabase.php script
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tim...@us...> - 2012-07-16 17:49:28
|
Revision: 5510
http://web-erp.svn.sourceforge.net/web-erp/?rev=5510&view=rev
Author: tim_schofield
Date: 2012-07-16 17:49:22 +0000 (Mon, 16 Jul 2012)
Log Message:
-----------
Allow for full URL to be specified for the wiki, as suggested by Kalmer Piiskop
Modified Paths:
--------------
trunk/SystemParameters.php
trunk/includes/MiscFunctions.php
Modified: trunk/SystemParameters.php
===================================================================
--- trunk/SystemParameters.php 2012-07-16 03:32:07 UTC (rev 5509)
+++ trunk/SystemParameters.php 2012-07-16 17:49:22 UTC (rev 5510)
@@ -338,7 +338,7 @@
<th>' . _('Value') . '</th>
<th>' . _('Notes') . '</th>
</tr>';
-
+
echo '<tr><th colspan="3">' . _('General Settings') . '</th></tr>';
echo $TableHeader;
@@ -389,7 +389,7 @@
// Check Credit Limits
echo '<tr style="outline: 1px solid"><td>' . _('Check Credit Limits') . ':</td>
<td><select name="X_CheckCreditLimits">
- <option '.($_SESSION['CheckCreditLimits']==0?'selected="selected" ':'').'value="0">'._('Do not check').'</option>
+ <option '.($_SESSION['CheckCreditLimits']==0?'selected="selected" ':'').'value="0">'._('Do not check').'</option>
<option '.($_SESSION['CheckCreditLimits']==1?'selected="selected" ':'').'value="1">'._('Warn on breach').'</option>
<option '.($_SESSION['CheckCreditLimits']==2?'selected="selected" ':'').'value="2">'._('Prohibit Sales').'</option>
</select></td>
@@ -473,8 +473,8 @@
//Blind packing note
echo '<tr style="outline: 1px solid"><td>' . _('Show company details on packing slips') . ':</td>
<td><select name="X_DefaultBlindPackNote">
- <option '.($_SESSION['DefaultBlindPackNote']=='1'?'selected="selected" ':'').'value="1">'._('Show Company Details').'</option>
- <option '.($_SESSION['DefaultBlindPackNote']=='2'?'selected="selected" ':'').'value="2">'._('Hide Company Details').'</option>
+ <option '.($_SESSION['DefaultBlindPackNote']=='1'?'selected="selected" ':'').'value="1">'._('Show Company Details').'</option>
+ <option '.($_SESSION['DefaultBlindPackNote']=='2'?'selected="selected" ':'').'value="2">'._('Hide Company Details').'</option>
</select></td>
<td>' . _('Customer branches can be set by default not to print packing slips with the company logo and address. This is useful for companies that ship to customers customers and to show the source of the shipment would be inappropriate. There is an option on the setup of customer branches to ship blind, this setting is the default applied to all new customer branches') . '</td>
</tr>';
@@ -482,9 +482,9 @@
// Working days on a week
echo '<tr style="outline: 1px solid"><td>' . _('Working Days on a Week') . ':</td>
<td><select name="X_WorkingDaysWeek">
- <option '.($_SESSION['WorkingDaysWeek']=='7'?'selected="selected" ':'').'value="7">7 '._('working days').'</option>
- <option '.($_SESSION['WorkingDaysWeek']=='6'?'selected="selected" ':'').'value="6">6 '._('working days').'</option>
- <option '.($_SESSION['WorkingDaysWeek']=='5'?'selected="selected" ':'').'value="5">5 '._('working days').'</option>
+ <option '.($_SESSION['WorkingDaysWeek']=='7'?'selected="selected" ':'').'value="7">7 '._('working days').'</option>
+ <option '.($_SESSION['WorkingDaysWeek']=='6'?'selected="selected" ':'').'value="6">6 '._('working days').'</option>
+ <option '.($_SESSION['WorkingDaysWeek']=='5'?'selected="selected" ':'').'value="5">5 '._('working days').'</option>
</select></td>
<td>' . _('Number of working days on a week') . '</td>
</tr>';
@@ -859,7 +859,7 @@
echo '<tr style="outline: 1px solid"><td>' . _('Wiki Path') . ':</td>
<td><input type="text" name="X_WikiPath" size="40" maxlength="40" value="' . $_SESSION['WikiPath'] . '" /></td>
- <td>' . _('The path to the wiki installation to form the basis of wiki URLs - this should be the directory on the web-server where the wiki is installed. The wiki must be installed on the same web-server as webERP') .'</td></tr>';
+ <td>' . _('The path to the wiki installation to form the basis of wiki URLs - or the full URL of the wiki.') .'</td></tr>';
echo '<tr style="outline: 1px solid"><td>' . _('Geocode Customers and Suppliers') . ':</td>
<td><select name="X_geocode_integration">';
Modified: trunk/includes/MiscFunctions.php
===================================================================
--- trunk/includes/MiscFunctions.php 2012-07-16 03:32:07 UTC (rev 5509)
+++ trunk/includes/MiscFunctions.php 2012-07-16 17:49:22 UTC (rev 5510)
@@ -117,7 +117,7 @@
OR mb_strstr($CheckVariable,'&')
OR mb_strstr($CheckVariable,"\\")
OR mb_strstr($CheckVariable,'"')
- OR mb_strstr($CheckVariable,'>')
+ OR mb_strstr($CheckVariable,'>')
OR mb_strstr($CheckVariable,'<')){
return true;
@@ -230,13 +230,17 @@
function wikiLink($type, $id) {
-
+ if (strstr($_SESSION['WikiPath'], 'http:')) {
+ $WikiPath=$_SESSION['WikiPath'];
+ } else {
+ $WikiPath='../' . $_SESSION['WikiPath'] . '/';
+ }
if ($_SESSION['WikiApp']==_('WackoWiki')){
- echo '<a target="_blank" href="../' . $_SESSION['WikiPath'] . '/' . $type . $id . '">' . _('Wiki ' . $type . ' Knowlege Base') . '</a><br />';
+ echo '<a target="_blank" href="' . $WikiPath . $type . $id . '">' . _('Wiki ' . $type . ' Knowlege Base') . '</a><br />';
} elseif ($_SESSION['WikiApp']==_('MediaWiki')){
- echo '<a target="_blank" href="../' . $_SESSION['WikiPath'] . '/index.php/' . $type . '/' . $id . '">' . _('Wiki ' . $type . ' Knowlege Base') . '</a><br />';
+ echo '<a target="_blank" href="' . $WikiPath . $_SESSION['WikiPath'] . '/index.php/' . $type . '/' . $id . '">' . _('Wiki ' . $type . ' Knowlege Base') . '</a><br />';
} elseif ($_SESSION['WikiApp']==_('DokuWiki')){
- echo ' ../' . $_SESSION['WikiPath'] . '/doku.php?id=' . $type . ':' . $id . ' ' . _('Wiki ' . $type . ' Knowlege Base') . ' <br />';
+ echo $WikiPath . $_SESSION['WikiPath'] . '/doku.php?id=' . $type . ':' . $id . ' ' . _('Wiki ' . $type . ' Knowlege Base') . ' <br />';
}
}//wikiLink
@@ -342,7 +346,7 @@
/*It is possible if the user entered the $DecimalPoint as a thousands separator and the $DecimalPoint is a comma that the result of this could contain several periods "." so need to ditch all but the last "." */
if (mb_substr_count($SQLFormatNumber,'.')>1){
return str_replace('.','',mb_substr($SQLFormatNumber,0,mb_strrpos($SQLFormatNumber,'.'))) . mb_substr($SQLFormatNumber,mb_strrpos($SQLFormatNumber,'.'));
-
+
echo '<br /> Number of periods: ' . $NumberOfPeriods . ' $SQLFormatNumber = ' . $SQLFormatNumber;
} else {
@@ -351,7 +355,7 @@
}
-function indian_number_format($Number,$DecimalPlaces){
+function indian_number_format($Number,$DecimalPlaces){
$IntegerNumber = intval($Number);
$DecimalValue = $Number - $IntegerNumber;
if ($DecimalPlaces !='Variable'){
@@ -372,20 +376,20 @@
$DecimalValue ='';
}
}
- if(strlen($IntegerNumber)>3){
- $LastThreeNumbers = substr($IntegerNumber, strlen($IntegerNumber)-3, strlen($IntegerNumber));
- $RestUnits = substr($IntegerNumber, 0, strlen($IntegerNumber)-3); // extracts the last three digits
- $RestUnits = (strlen($RestUnits)%2 == 1)?'0'.$RestUnits:$RestUnits; // explodes the remaining digits in 2's formats, adds a zero in the beginning to maintain the 2's grouping.
+ if(strlen($IntegerNumber)>3){
+ $LastThreeNumbers = substr($IntegerNumber, strlen($IntegerNumber)-3, strlen($IntegerNumber));
+ $RestUnits = substr($IntegerNumber, 0, strlen($IntegerNumber)-3); // extracts the last three digits
+ $RestUnits = (strlen($RestUnits)%2 == 1)?'0'.$RestUnits:$RestUnits; // explodes the remaining digits in 2's formats, adds a zero in the beginning to maintain the 2's grouping.
$FirstPart ='';
- $ExplodedUnits = str_split($RestUnits, 2);
- for($i=0; $i<sizeof($ExplodedUnits); $i++){
- $FirstPart .= intval($ExplodedUnits[$i]).','; // creates each of the 2's group and adds a comma to the end
- }
-
- return $FirstPart.$LastThreeNumbers.$DecimalValue;
- } else {
+ $ExplodedUnits = str_split($RestUnits, 2);
+ for($i=0; $i<sizeof($ExplodedUnits); $i++){
+ $FirstPart .= intval($ExplodedUnits[$i]).','; // creates each of the 2's group and adds a comma to the end
+ }
+
+ return $FirstPart.$LastThreeNumbers.$DecimalValue;
+ } else {
return $IntegerNumber. $DecimalValue;
- }
-}
+ }
+}
?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tim...@us...> - 2012-07-16 17:49:28
|
Revision: 5510
http://web-erp.svn.sourceforge.net/web-erp/?rev=5510&view=rev
Author: tim_schofield
Date: 2012-07-16 17:49:22 +0000 (Mon, 16 Jul 2012)
Log Message:
-----------
Allow for full URL to be specified for the wiki, as suggested by Kalmer Piiskop
Modified Paths:
--------------
trunk/SystemParameters.php
trunk/includes/MiscFunctions.php
Modified: trunk/SystemParameters.php
===================================================================
--- trunk/SystemParameters.php 2012-07-16 03:32:07 UTC (rev 5509)
+++ trunk/SystemParameters.php 2012-07-16 17:49:22 UTC (rev 5510)
@@ -338,7 +338,7 @@
<th>' . _('Value') . '</th>
<th>' . _('Notes') . '</th>
</tr>';
-
+
echo '<tr><th colspan="3">' . _('General Settings') . '</th></tr>';
echo $TableHeader;
@@ -389,7 +389,7 @@
// Check Credit Limits
echo '<tr style="outline: 1px solid"><td>' . _('Check Credit Limits') . ':</td>
<td><select name="X_CheckCreditLimits">
- <option '.($_SESSION['CheckCreditLimits']==0?'selected="selected" ':'').'value="0">'._('Do not check').'</option>
+ <option '.($_SESSION['CheckCreditLimits']==0?'selected="selected" ':'').'value="0">'._('Do not check').'</option>
<option '.($_SESSION['CheckCreditLimits']==1?'selected="selected" ':'').'value="1">'._('Warn on breach').'</option>
<option '.($_SESSION['CheckCreditLimits']==2?'selected="selected" ':'').'value="2">'._('Prohibit Sales').'</option>
</select></td>
@@ -473,8 +473,8 @@
//Blind packing note
echo '<tr style="outline: 1px solid"><td>' . _('Show company details on packing slips') . ':</td>
<td><select name="X_DefaultBlindPackNote">
- <option '.($_SESSION['DefaultBlindPackNote']=='1'?'selected="selected" ':'').'value="1">'._('Show Company Details').'</option>
- <option '.($_SESSION['DefaultBlindPackNote']=='2'?'selected="selected" ':'').'value="2">'._('Hide Company Details').'</option>
+ <option '.($_SESSION['DefaultBlindPackNote']=='1'?'selected="selected" ':'').'value="1">'._('Show Company Details').'</option>
+ <option '.($_SESSION['DefaultBlindPackNote']=='2'?'selected="selected" ':'').'value="2">'._('Hide Company Details').'</option>
</select></td>
<td>' . _('Customer branches can be set by default not to print packing slips with the company logo and address. This is useful for companies that ship to customers customers and to show the source of the shipment would be inappropriate. There is an option on the setup of customer branches to ship blind, this setting is the default applied to all new customer branches') . '</td>
</tr>';
@@ -482,9 +482,9 @@
// Working days on a week
echo '<tr style="outline: 1px solid"><td>' . _('Working Days on a Week') . ':</td>
<td><select name="X_WorkingDaysWeek">
- <option '.($_SESSION['WorkingDaysWeek']=='7'?'selected="selected" ':'').'value="7">7 '._('working days').'</option>
- <option '.($_SESSION['WorkingDaysWeek']=='6'?'selected="selected" ':'').'value="6">6 '._('working days').'</option>
- <option '.($_SESSION['WorkingDaysWeek']=='5'?'selected="selected" ':'').'value="5">5 '._('working days').'</option>
+ <option '.($_SESSION['WorkingDaysWeek']=='7'?'selected="selected" ':'').'value="7">7 '._('working days').'</option>
+ <option '.($_SESSION['WorkingDaysWeek']=='6'?'selected="selected" ':'').'value="6">6 '._('working days').'</option>
+ <option '.($_SESSION['WorkingDaysWeek']=='5'?'selected="selected" ':'').'value="5">5 '._('working days').'</option>
</select></td>
<td>' . _('Number of working days on a week') . '</td>
</tr>';
@@ -859,7 +859,7 @@
echo '<tr style="outline: 1px solid"><td>' . _('Wiki Path') . ':</td>
<td><input type="text" name="X_WikiPath" size="40" maxlength="40" value="' . $_SESSION['WikiPath'] . '" /></td>
- <td>' . _('The path to the wiki installation to form the basis of wiki URLs - this should be the directory on the web-server where the wiki is installed. The wiki must be installed on the same web-server as webERP') .'</td></tr>';
+ <td>' . _('The path to the wiki installation to form the basis of wiki URLs - or the full URL of the wiki.') .'</td></tr>';
echo '<tr style="outline: 1px solid"><td>' . _('Geocode Customers and Suppliers') . ':</td>
<td><select name="X_geocode_integration">';
Modified: trunk/includes/MiscFunctions.php
===================================================================
--- trunk/includes/MiscFunctions.php 2012-07-16 03:32:07 UTC (rev 5509)
+++ trunk/includes/MiscFunctions.php 2012-07-16 17:49:22 UTC (rev 5510)
@@ -117,7 +117,7 @@
OR mb_strstr($CheckVariable,'&')
OR mb_strstr($CheckVariable,"\\")
OR mb_strstr($CheckVariable,'"')
- OR mb_strstr($CheckVariable,'>')
+ OR mb_strstr($CheckVariable,'>')
OR mb_strstr($CheckVariable,'<')){
return true;
@@ -230,13 +230,17 @@
function wikiLink($type, $id) {
-
+ if (strstr($_SESSION['WikiPath'], 'http:')) {
+ $WikiPath=$_SESSION['WikiPath'];
+ } else {
+ $WikiPath='../' . $_SESSION['WikiPath'] . '/';
+ }
if ($_SESSION['WikiApp']==_('WackoWiki')){
- echo '<a target="_blank" href="../' . $_SESSION['WikiPath'] . '/' . $type . $id . '">' . _('Wiki ' . $type . ' Knowlege Base') . '</a><br />';
+ echo '<a target="_blank" href="' . $WikiPath . $type . $id . '">' . _('Wiki ' . $type . ' Knowlege Base') . '</a><br />';
} elseif ($_SESSION['WikiApp']==_('MediaWiki')){
- echo '<a target="_blank" href="../' . $_SESSION['WikiPath'] . '/index.php/' . $type . '/' . $id . '">' . _('Wiki ' . $type . ' Knowlege Base') . '</a><br />';
+ echo '<a target="_blank" href="' . $WikiPath . $_SESSION['WikiPath'] . '/index.php/' . $type . '/' . $id . '">' . _('Wiki ' . $type . ' Knowlege Base') . '</a><br />';
} elseif ($_SESSION['WikiApp']==_('DokuWiki')){
- echo ' ../' . $_SESSION['WikiPath'] . '/doku.php?id=' . $type . ':' . $id . ' ' . _('Wiki ' . $type . ' Knowlege Base') . ' <br />';
+ echo $WikiPath . $_SESSION['WikiPath'] . '/doku.php?id=' . $type . ':' . $id . ' ' . _('Wiki ' . $type . ' Knowlege Base') . ' <br />';
}
}//wikiLink
@@ -342,7 +346,7 @@
/*It is possible if the user entered the $DecimalPoint as a thousands separator and the $DecimalPoint is a comma that the result of this could contain several periods "." so need to ditch all but the last "." */
if (mb_substr_count($SQLFormatNumber,'.')>1){
return str_replace('.','',mb_substr($SQLFormatNumber,0,mb_strrpos($SQLFormatNumber,'.'))) . mb_substr($SQLFormatNumber,mb_strrpos($SQLFormatNumber,'.'));
-
+
echo '<br /> Number of periods: ' . $NumberOfPeriods . ' $SQLFormatNumber = ' . $SQLFormatNumber;
} else {
@@ -351,7 +355,7 @@
}
-function indian_number_format($Number,$DecimalPlaces){
+function indian_number_format($Number,$DecimalPlaces){
$IntegerNumber = intval($Number);
$DecimalValue = $Number - $IntegerNumber;
if ($DecimalPlaces !='Variable'){
@@ -372,20 +376,20 @@
$DecimalValue ='';
}
}
- if(strlen($IntegerNumber)>3){
- $LastThreeNumbers = substr($IntegerNumber, strlen($IntegerNumber)-3, strlen($IntegerNumber));
- $RestUnits = substr($IntegerNumber, 0, strlen($IntegerNumber)-3); // extracts the last three digits
- $RestUnits = (strlen($RestUnits)%2 == 1)?'0'.$RestUnits:$RestUnits; // explodes the remaining digits in 2's formats, adds a zero in the beginning to maintain the 2's grouping.
+ if(strlen($IntegerNumber)>3){
+ $LastThreeNumbers = substr($IntegerNumber, strlen($IntegerNumber)-3, strlen($IntegerNumber));
+ $RestUnits = substr($IntegerNumber, 0, strlen($IntegerNumber)-3); // extracts the last three digits
+ $RestUnits = (strlen($RestUnits)%2 == 1)?'0'.$RestUnits:$RestUnits; // explodes the remaining digits in 2's formats, adds a zero in the beginning to maintain the 2's grouping.
$FirstPart ='';
- $ExplodedUnits = str_split($RestUnits, 2);
- for($i=0; $i<sizeof($ExplodedUnits); $i++){
- $FirstPart .= intval($ExplodedUnits[$i]).','; // creates each of the 2's group and adds a comma to the end
- }
-
- return $FirstPart.$LastThreeNumbers.$DecimalValue;
- } else {
+ $ExplodedUnits = str_split($RestUnits, 2);
+ for($i=0; $i<sizeof($ExplodedUnits); $i++){
+ $FirstPart .= intval($ExplodedUnits[$i]).','; // creates each of the 2's group and adds a comma to the end
+ }
+
+ return $FirstPart.$LastThreeNumbers.$DecimalValue;
+ } else {
return $IntegerNumber. $DecimalValue;
- }
-}
+ }
+}
?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <te...@us...> - 2012-07-17 06:08:02
|
Revision: 5511
http://web-erp.svn.sourceforge.net/web-erp/?rev=5511&view=rev
Author: tehonu
Date: 2012-07-17 06:07:56 +0000 (Tue, 17 Jul 2012)
Log Message:
-----------
Ricard: Changed loctransfer shipdate and recdate to datetime.
Modified Paths:
--------------
trunk/StockDispatch.php
trunk/StockLocTransfer.php
trunk/StockLocTransferReceive.php
trunk/includes/DateFunctions.inc
trunk/includes/PDFStockLocTransferHeader.inc
Modified: trunk/StockDispatch.php
===================================================================
--- trunk/StockDispatch.php 2012-07-16 17:49:22 UTC (rev 5510)
+++ trunk/StockDispatch.php 2012-07-17 06:07:56 UTC (rev 5511)
@@ -223,7 +223,7 @@
VALUES ('" . $Trf_ID . "',
'" . $myrow['stockid'] . "',
'" . $ShipQty . "',
- '" . Date('Y-m-d') . "',
+ '" . Date('Y-m-d H-i-s') . "',
'" . $_POST['FromLocation'] ."',
'" . $_POST['ToLocation'] . "')";
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('Unable to enter Location Transfer record for'). ' '.$myrow['stockid'];
Modified: trunk/StockLocTransfer.php
===================================================================
--- trunk/StockLocTransfer.php 2012-07-16 17:49:22 UTC (rev 5510)
+++ trunk/StockLocTransfer.php 2012-07-17 06:07:56 UTC (rev 5511)
@@ -207,7 +207,7 @@
VALUES ('" . $_POST['Trf_ID'] . "',
'" . $_POST['StockID' . $i] . "',
'" . round(filter_number_format($_POST['StockQTY' . $i]), $DecimalRow['decimalplaces']) . "',
- '" . Date('Y-m-d') . "',
+ '" . Date('Y-m-d H-i-s'). "',
'" . $_POST['FromStockLocation'] ."',
'" . $_POST['ToStockLocation'] . "')";
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('Unable to enter Location Transfer record for'). ' '.$_POST['StockID' . $i];
Modified: trunk/StockLocTransferReceive.php
===================================================================
--- trunk/StockLocTransferReceive.php 2012-07-16 17:49:22 UTC (rev 5510)
+++ trunk/StockLocTransferReceive.php 2012-07-17 06:07:56 UTC (rev 5511)
@@ -308,12 +308,12 @@
if ($TrfLine->CancelBalance==1){
$sql = "UPDATE loctransfers SET recqty = recqty + '". round($TrfLine->Quantity, $TrfLine->DecimalPlaces) . "',
shipqty = recqty + '". round($TrfLine->Quantity, $TrfLine->DecimalPlaces) . "',
- recdate = '".date('Y-m-d H:i:s'). "'
+ recdate = '".Date('Y-m-d H:i:s'). "'
WHERE reference = '". $_SESSION['Transfer']->TrfID . "'
AND stockid = '". $TrfLine->StockID."'";
} else {
$sql = "UPDATE loctransfers SET recqty = recqty + '". round($TrfLine->Quantity, $TrfLine->DecimalPlaces) . "',
- recdate = '".date('Y-m-d H:i:s'). "'
+ recdate = '".Date('Y-m-d H:i:s'). "'
WHERE reference = '". $_SESSION['Transfer']->TrfID . "'
AND stockid = '". $TrfLine->StockID."'";
}
@@ -562,7 +562,7 @@
}
echo '<td class="number">' . $myrow['reference'] . '</td>
<td>' . $myrow['trffromloc'] . '</td>
- <td>' . ConvertSQLDate($myrow['shipdate']) . '</td>
+ <td>' . ConvertSQLDateTime($myrow['shipdate']) . '</td>
<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Trf_ID=' . $myrow['reference'] . '">'. _('Receive'). '</a></td>
</tr>';
}
Modified: trunk/includes/DateFunctions.inc
===================================================================
--- trunk/includes/DateFunctions.inc 2012-07-16 17:49:22 UTC (rev 5510)
+++ trunk/includes/DateFunctions.inc 2012-07-17 06:07:56 UTC (rev 5511)
@@ -267,6 +267,52 @@
} // end function ConvertSQLDate
+function ConvertSQLDateTime($DateEntry) {
+
+//for MySQL dates are in the format YYYY-mm-dd H:i:s
+
+
+ if (mb_strpos($DateEntry,'/')) {
+ $Date_Array = explode('/',$DateEntry);
+ } elseif (mb_strpos ($DateEntry,'-')) {
+ $Date_Array = explode('-',$DateEntry);
+ } elseif (mb_strpos ($DateEntry,'.')) {
+ $Date_Array = explode('.',$DateEntry);
+ } else {
+ prnMsg(_('The date does not appear to be in a valid format. The date being converted from SQL format was:') . ' ' . $DateEntry,'error');
+ switch ($_SESSION['DefaultDateFormat']) {
+ case 'd/m/Y':
+ return '0/0/000';
+ break;
+ case 'd.m.Y':
+ return '0.0.000';
+ break;
+ case 'm/d/Y':
+ return '0/0/0000';
+ break;
+ case 'Y/m/d':
+ return '0000/0/0';
+ break;
+ }
+ }
+
+ if (mb_strlen($Date_Array[2])>4) {
+ $Time = mb_substr($Date_Array[2],3,8);
+ $Date_Array[2]= mb_substr($Date_Array[2],0,2);
+ }
+
+ if ($_SESSION['DefaultDateFormat']=='d/m/Y'){
+ return $Date_Array[2].'/'.$Date_Array[1].'/'.$Date_Array[0] . ' ' . $Time;
+ } elseif ($_SESSION['DefaultDateFormat']=='d.m.Y'){
+ return $Date_Array[2].'.'.$Date_Array[1].'.'.$Date_Array[0] . ' ' . $Time;
+ } elseif ($_SESSION['DefaultDateFormat']=='m/d/Y'){
+ return $Date_Array[1].'/'.$Date_Array[2].'/'.$Date_Array[0] . ' ' . $Time;
+ } elseif ($_SESSION['DefaultDateFormat']=='Y/m/d'){
+ return $Date_Array[0].'/'.$Date_Array[1].'/'.$Date_Array[2] . ' ' . $Time;
+ }
+
+} // end function ConvertSQLDate
+
function SQLDateToEDI($DateEntry) {
//for MySQL dates are in the format YYYY-mm-dd
Modified: trunk/includes/PDFStockLocTransferHeader.inc
===================================================================
--- trunk/includes/PDFStockLocTransferHeader.inc 2012-07-16 17:49:22 UTC (rev 5510)
+++ trunk/includes/PDFStockLocTransferHeader.inc 2012-07-17 06:07:56 UTC (rev 5511)
@@ -19,7 +19,7 @@
$YPos -=15;
$FontSize=12;
$LeftOvers2 = $pdf->addTextWrap($Left_Margin,$YPos,550,$FontSize,
-_('Shipped'). ' ' . ConvertSQLDate($TransferRow['shipdate']));
+_('Shipped'). ' ' . ConvertSQLDateTime($TransferRow['shipdate']));
$YPos -=15;
$FontSize=12;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <te...@us...> - 2012-07-17 06:08:03
|
Revision: 5511
http://web-erp.svn.sourceforge.net/web-erp/?rev=5511&view=rev
Author: tehonu
Date: 2012-07-17 06:07:56 +0000 (Tue, 17 Jul 2012)
Log Message:
-----------
Ricard: Changed loctransfer shipdate and recdate to datetime.
Modified Paths:
--------------
trunk/StockDispatch.php
trunk/StockLocTransfer.php
trunk/StockLocTransferReceive.php
trunk/includes/DateFunctions.inc
trunk/includes/PDFStockLocTransferHeader.inc
Modified: trunk/StockDispatch.php
===================================================================
--- trunk/StockDispatch.php 2012-07-16 17:49:22 UTC (rev 5510)
+++ trunk/StockDispatch.php 2012-07-17 06:07:56 UTC (rev 5511)
@@ -223,7 +223,7 @@
VALUES ('" . $Trf_ID . "',
'" . $myrow['stockid'] . "',
'" . $ShipQty . "',
- '" . Date('Y-m-d') . "',
+ '" . Date('Y-m-d H-i-s') . "',
'" . $_POST['FromLocation'] ."',
'" . $_POST['ToLocation'] . "')";
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('Unable to enter Location Transfer record for'). ' '.$myrow['stockid'];
Modified: trunk/StockLocTransfer.php
===================================================================
--- trunk/StockLocTransfer.php 2012-07-16 17:49:22 UTC (rev 5510)
+++ trunk/StockLocTransfer.php 2012-07-17 06:07:56 UTC (rev 5511)
@@ -207,7 +207,7 @@
VALUES ('" . $_POST['Trf_ID'] . "',
'" . $_POST['StockID' . $i] . "',
'" . round(filter_number_format($_POST['StockQTY' . $i]), $DecimalRow['decimalplaces']) . "',
- '" . Date('Y-m-d') . "',
+ '" . Date('Y-m-d H-i-s'). "',
'" . $_POST['FromStockLocation'] ."',
'" . $_POST['ToStockLocation'] . "')";
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('Unable to enter Location Transfer record for'). ' '.$_POST['StockID' . $i];
Modified: trunk/StockLocTransferReceive.php
===================================================================
--- trunk/StockLocTransferReceive.php 2012-07-16 17:49:22 UTC (rev 5510)
+++ trunk/StockLocTransferReceive.php 2012-07-17 06:07:56 UTC (rev 5511)
@@ -308,12 +308,12 @@
if ($TrfLine->CancelBalance==1){
$sql = "UPDATE loctransfers SET recqty = recqty + '". round($TrfLine->Quantity, $TrfLine->DecimalPlaces) . "',
shipqty = recqty + '". round($TrfLine->Quantity, $TrfLine->DecimalPlaces) . "',
- recdate = '".date('Y-m-d H:i:s'). "'
+ recdate = '".Date('Y-m-d H:i:s'). "'
WHERE reference = '". $_SESSION['Transfer']->TrfID . "'
AND stockid = '". $TrfLine->StockID."'";
} else {
$sql = "UPDATE loctransfers SET recqty = recqty + '". round($TrfLine->Quantity, $TrfLine->DecimalPlaces) . "',
- recdate = '".date('Y-m-d H:i:s'). "'
+ recdate = '".Date('Y-m-d H:i:s'). "'
WHERE reference = '". $_SESSION['Transfer']->TrfID . "'
AND stockid = '". $TrfLine->StockID."'";
}
@@ -562,7 +562,7 @@
}
echo '<td class="number">' . $myrow['reference'] . '</td>
<td>' . $myrow['trffromloc'] . '</td>
- <td>' . ConvertSQLDate($myrow['shipdate']) . '</td>
+ <td>' . ConvertSQLDateTime($myrow['shipdate']) . '</td>
<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Trf_ID=' . $myrow['reference'] . '">'. _('Receive'). '</a></td>
</tr>';
}
Modified: trunk/includes/DateFunctions.inc
===================================================================
--- trunk/includes/DateFunctions.inc 2012-07-16 17:49:22 UTC (rev 5510)
+++ trunk/includes/DateFunctions.inc 2012-07-17 06:07:56 UTC (rev 5511)
@@ -267,6 +267,52 @@
} // end function ConvertSQLDate
+function ConvertSQLDateTime($DateEntry) {
+
+//for MySQL dates are in the format YYYY-mm-dd H:i:s
+
+
+ if (mb_strpos($DateEntry,'/')) {
+ $Date_Array = explode('/',$DateEntry);
+ } elseif (mb_strpos ($DateEntry,'-')) {
+ $Date_Array = explode('-',$DateEntry);
+ } elseif (mb_strpos ($DateEntry,'.')) {
+ $Date_Array = explode('.',$DateEntry);
+ } else {
+ prnMsg(_('The date does not appear to be in a valid format. The date being converted from SQL format was:') . ' ' . $DateEntry,'error');
+ switch ($_SESSION['DefaultDateFormat']) {
+ case 'd/m/Y':
+ return '0/0/000';
+ break;
+ case 'd.m.Y':
+ return '0.0.000';
+ break;
+ case 'm/d/Y':
+ return '0/0/0000';
+ break;
+ case 'Y/m/d':
+ return '0000/0/0';
+ break;
+ }
+ }
+
+ if (mb_strlen($Date_Array[2])>4) {
+ $Time = mb_substr($Date_Array[2],3,8);
+ $Date_Array[2]= mb_substr($Date_Array[2],0,2);
+ }
+
+ if ($_SESSION['DefaultDateFormat']=='d/m/Y'){
+ return $Date_Array[2].'/'.$Date_Array[1].'/'.$Date_Array[0] . ' ' . $Time;
+ } elseif ($_SESSION['DefaultDateFormat']=='d.m.Y'){
+ return $Date_Array[2].'.'.$Date_Array[1].'.'.$Date_Array[0] . ' ' . $Time;
+ } elseif ($_SESSION['DefaultDateFormat']=='m/d/Y'){
+ return $Date_Array[1].'/'.$Date_Array[2].'/'.$Date_Array[0] . ' ' . $Time;
+ } elseif ($_SESSION['DefaultDateFormat']=='Y/m/d'){
+ return $Date_Array[0].'/'.$Date_Array[1].'/'.$Date_Array[2] . ' ' . $Time;
+ }
+
+} // end function ConvertSQLDate
+
function SQLDateToEDI($DateEntry) {
//for MySQL dates are in the format YYYY-mm-dd
Modified: trunk/includes/PDFStockLocTransferHeader.inc
===================================================================
--- trunk/includes/PDFStockLocTransferHeader.inc 2012-07-16 17:49:22 UTC (rev 5510)
+++ trunk/includes/PDFStockLocTransferHeader.inc 2012-07-17 06:07:56 UTC (rev 5511)
@@ -19,7 +19,7 @@
$YPos -=15;
$FontSize=12;
$LeftOvers2 = $pdf->addTextWrap($Left_Margin,$YPos,550,$FontSize,
-_('Shipped'). ' ' . ConvertSQLDate($TransferRow['shipdate']));
+_('Shipped'). ' ' . ConvertSQLDateTime($TransferRow['shipdate']));
$YPos -=15;
$FontSize=12;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dai...@us...> - 2012-07-18 09:39:19
|
Revision: 5515
http://web-erp.svn.sourceforge.net/web-erp/?rev=5515&view=rev
Author: daintree
Date: 2012-07-18 09:38:51 +0000 (Wed, 18 Jul 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/Z_DeleteCreditNote.php
trunk/Z_DeleteInvoice.php
trunk/includes/Z_POSDataCreation.php
trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo
trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po
trunk/sql/mysql/upgrade4.08-4.09.sql
Modified: trunk/Z_DeleteCreditNote.php
===================================================================
--- trunk/Z_DeleteCreditNote.php 2012-07-17 23:35:48 UTC (rev 5514)
+++ trunk/Z_DeleteCreditNote.php 2012-07-18 09:38:51 UTC (rev 5515)
@@ -22,11 +22,14 @@
}
/*get the order number that was credited */
-$SQL = "SELECT order_ FROM debtortrans WHERE transno='" . $_GET['CreditNoteNo'] . "' AND type='11'";
+$SQL = "SELECT order_, id
+ FROM debtortrans
+ WHERE transno='" . $_GET['CreditNoteNo'] . "' AND type='11'";
$Result = DB_query($SQL, $db);
$myrow = DB_fetch_row($Result);
$OrderNo = $myrow[0];
+$IDDebtorTrans = $myrow[1];
/*Now get the stock movements that were credited into an array */
@@ -51,8 +54,29 @@
$Result = DB_Txn_Begin($db); /* commence a database transaction */
+
+/*Now delete the custallocns */
+
+$SQL = "DELETE custallocns FROM custallocns
+ WHERE transid_allocto ='" . $IDDebtorTrans . "'";
+
+$DbgMsg = _('The SQL that failed was');
+$ErrMsg = _('The custallocns record could not be deleted') . ' - ' . _('the sql server returned the following error');
+$Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true);
+
+prnMsg(_('The custallocns record has been deleted'),'info');
+
+/*Now delete the debtortranstaxes */
+
+$SQL = "DELETE debtortranstaxes FROM debtortranstaxes
+ WHERE debtortransid ='" . $IDDebtorTrans . "'";
+$DbgMsg = _('The SQL that failed was');
+$ErrMsg = _('The debtortranstaxes record could not be deleted') . ' - ' . _('the sql server returned the following error');
+$Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true);
+
+prnMsg(_('The debtortranstaxes record has been deleted'),'info');
+
/*Now delete the DebtorTrans */
-
$SQL = "DELETE FROM debtortrans
WHERE transno ='" . $_GET['CreditNoteNo'] . "' AND Type=11";
$DbgMsg = _('The SQL that failed was');
@@ -80,7 +104,8 @@
$Result = DB_query($SQL, $db,$ErrMsg,$DbgMsg, true);
-/*Delete Sales Analysis records */
+/*Delete Sales Analysis records
+ * This is unreliable as the salesanalysis record contains totals for the item cust custbranch periodno */
$SQL = "DELETE FROM salesanalysis
WHERE periodno = '" . $CreditLine['prd'] . "'
AND cust='" . $CreditLine['debtorno'] . "'
Modified: trunk/Z_DeleteInvoice.php
===================================================================
--- trunk/Z_DeleteInvoice.php 2012-07-17 23:35:48 UTC (rev 5514)
+++ trunk/Z_DeleteInvoice.php 2012-07-18 09:38:51 UTC (rev 5515)
@@ -5,7 +5,7 @@
/* Script to delete an invoice expects and invoice number to delete
not included on any menu for obvious reasons
*
-* STRONGLY RECOMMEND NOT USING THIS -CREDIT THE INVOICE AND RE INVOICE
+* STRONGLY RECOMMEND NOT USING THIS - CREDIT THE INVOICE AND RE INVOICE
* *
*
This page must be called directly using path/Z_DeleteInvoice.php?InvoiceNo=????? !! */
@@ -22,7 +22,7 @@
}
/*Get the order number that was invoiced */
-$SQL = "SELECT order_
+$SQL = "SELECT order_, id
FROM debtortrans
WHERE debtortrans.type = 10
AND transno = '" . $_GET['InvoiceNo'] . "'";
@@ -31,6 +31,7 @@
$myrow = DB_fetch_row($Result);
$ProcessingOrder = $myrow[0];
+$IDDebtorTrans = $myrow[1];
/*Now get the stock movements that were invoiced into an array */
@@ -79,6 +80,28 @@
$Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true);
prnMsg(_('Any order delivery differences records have been deleted'),'info');
+/*Now delete the custallocns */
+
+$SQL = "DELETE custallocns FROM custallocns
+ WHERE transid_allocto ='" . $IDDebtorTrans . "'";
+
+$DbgMsg = _('The SQL that failed was');
+$ErrMsg = _('The custallocns record could not be deleted') . ' - ' . _('the sql server returned the following error');
+$Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true);
+
+prnMsg(_('The custallocns record has been deleted'),'info');
+
+/*Now delete the debtortranstaxes */
+
+$SQL = "DELETE debtortranstaxes FROM debtortranstaxes
+ WHERE debtortransid ='" . $IDDebtorTrans . "'";
+$DbgMsg = _('The SQL that failed was');
+$ErrMsg = _('The debtortranstaxes record could not be deleted') . ' - ' . _('the sql server returned the following error');
+$Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true);
+
+prnMsg(_('The debtortranstaxes record has been deleted'),'info');
+
+
/*Now delete the DebtorTrans */
$SQL = "DELETE FROM debtortrans
Modified: trunk/includes/Z_POSDataCreation.php
===================================================================
--- trunk/includes/Z_POSDataCreation.php 2012-07-17 23:35:48 UTC (rev 5514)
+++ trunk/includes/Z_POSDataCreation.php 2012-07-18 09:38:51 UTC (rev 5515)
@@ -2,6 +2,9 @@
function Create_POS_Data_Full ($POSDebtorNo, $POSBranchCode, $PathPrefix, $db) {
+ set_time_limit(1800);
+ ini_set('max_execution_time',1800);
+
$result = DB_query("SELECT confvalue FROM config WHERE confname='reports_dir'",$db);
$ReportDirRow = DB_fetch_row($result);
$ReportDir = $ReportDirRow[0];
@@ -153,6 +156,8 @@
$ZipFile->close();
//delete the original big sql file as we now have the zip for transferring
unlink($PathPrefix . $ReportDir . '/POS.sql');
+ set_time_limit($MaximumExecutionTime);
+ ini_set('max_execution_time',$MaximumExecutionTime);
return 1;
}
Modified: trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo
===================================================================
(Binary files differ)
Modified: trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po
===================================================================
--- trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po 2012-07-17 23:35:48 UTC (rev 5514)
+++ trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po 2012-07-18 09:38:51 UTC (rev 5515)
@@ -1,40930 +1,41260 @@
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: webERP 3.05\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-06-24 09:40+1200\n"
-"PO-Revision-Date: 2011-04-15 02:56+0000\n"
-"Last-Translator: SilvioBandeira <Unknown>\n"
-"Language-Team: Brazilian Portuguese <jo...@ma...>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-04-17 23:36+0000\n"
-"X-Generator: Launchpad (build 12821)\n"
-"X-Poedit-Country: BRAZIL\n"
-"X-Poedit-Language: Portuguese\n"
-
-#: AccountGroups.php:7 includes/MainMenuLinksArray.php:375
-msgid "Account Groups"
-msgstr "Grupos de contas"
-
-#: AccountGroups.php:17
-msgid ""
-"An error occurred in retrieving the account groups of the parent account "
-"group during the check for recursion"
-msgstr ""
-"Um erro ocorreu ao recuperar os grupos de contas do grupo de conta pai "
-"durante a checagem de recursão"
-
-#: AccountGroups.php:18
-msgid ""
-"The SQL that was used to retrieve the account groups of the parent account "
-"group and that failed in the process was"
-msgstr ""
-
-#: AccountGroups.php:58 AccountGroups.php:95 AccountGroups.php:176
-#: AccountGroups.php:186
-msgid "The SQL that was used to retrieve the information was"
-msgstr "O SQL que foi utilizado para obter a informação foi"
-
-#: AccountGroups.php:59
-msgid "Could not check whether the group exists because"
-msgstr "não foi possível verificar se o grupo existe porque"
-
-#: AccountGroups.php:66
-msgid "The account group name already exists in the database"
-msgstr ""
-
-#: AccountGroups.php:72
-msgid "The account group name cannot contain the character"
-msgstr "O nome do grupo contábel não pode conter o caractere"
-
-#: AccountGroups.php:72 Departments.php:30 TaxCategories.php:31
-msgid "or the character"
-msgstr "ou o caractere"
-
-#: AccountGroups.php:78
-msgid "The account group name must be at least one character long"
-msgstr ""
-
-#: AccountGroups.php:85
-msgid ""
-"The parent account group selected appears to result in a recursive account "
-"structure - select an alternative parent account group or make this group a "
-"top level account group"
-msgstr ""
-
-#: AccountGroups.php:96
-msgid "Could not check whether the group is recursive because"
-msgstr "não foi possível verificar se o grupo é recursivo porque"
-
-#: AccountGroups.php:104
-msgid ""
-"Since this account group is a child group, the sequence in the trial "
-"balance, the section in the accounts and whether or not the account group "
-"appears in the balance sheet or profit and loss account are all properties "
-"inherited from the parent account group. Any changes made to these fields "
-"will have no effect."
-msgstr ""
-
-#: AccountGroups.php:109
-msgid "The section in accounts must be an integer"
-msgstr "A seção nas contas deve ser um inteiro"
-
-#: AccountGroups.php:115
-msgid "The sequence in the trial balance must be an integer"
-msgstr "A sequência no balancete comercial deve ser um inteiro"
-
-#: AccountGroups.php:121
-#, fuzzy
-msgid "The sequence in the TB must be numeric and less than"
-msgstr "A sequência no balancete comercial deve ser um inteiro"
-
-#: AccountGroups.php:137
-msgid "An error occurred in updating the account group"
-msgstr "Ocorreu um erro ao atualizar a conta de grupo"
-
-#: AccountGroups.php:138
-msgid "The SQL that was used to update the account group was"
-msgstr "O SQL que foi utilizado para atualizar a conta de grupo foi"
-
-#: AccountGroups.php:140 AccountSections.php:98 PaymentMethods.php:83
-msgid "Record Updated"
-msgstr "Registro atualizado"
-
-#: AccountGroups.php:156
-msgid "An error occurred in inserting the account group"
-msgstr "Ocorreu um erro ao inserir a conta de grupo"
-
-#: AccountGroups.php:157
-msgid "The SQL that was used to insert the account group was"
-msgstr "O SQL que foi utilizado para inserir a conta de grupo foi"
-
-#: AccountGroups.php:158 AccountSections.php:108
-msgid "Record inserted"
-msgstr "Registro inserido"
-
-#: AccountGroups.php:175
-msgid "An error occurred in retrieving the group information from chartmaster"
-msgstr ""
-
-#: AccountGroups.php:180
-msgid ""
-"Cannot delete this account group because general ledger accounts have been "
-"created using this group"
-msgstr ""
-"não é possível remover este grupo contábil pois contas no livro de "
-"contabilidade foram criados usando este grupo"
-
-#: AccountGroups.php:181 AccountGroups.php:191 AccountSections.php:130
-#: Areas.php:114 Areas.php:123 BankAccounts.php:158 CreditStatus.php:125
-#: Currencies.php:166 Currencies.php:174 Currencies.php:182
-#: CustomerBranches.php:286 CustomerBranches.php:296 CustomerBranches.php:306
-#: CustomerBranches.php:316 Customers.php:289 Customers.php:298
-#: Customers.php:306 Customers.php:314 CustomerTypes.php:147
-#: CustomerTypes.php:157 Departments.php:141 Factors.php:134
-#: FixedAssetCategories.php:134 GLAccounts.php:80 GLAccounts.php:96
-#: Locations.php:237 Locations.php:245 Locations.php:256 Locations.php:265
-#: Locations.php:274 Locations.php:283 Locations.php:292 Locations.php:301
-#: Locations.php:309 MRPDemandTypes.php:87 PaymentMethods.php:142
-#: PaymentTerms.php:146 PaymentTerms.php:153 PcExpenses.php:158
-#: SalesCategories.php:125 SalesCategories.php:132 SalesPeople.php:150
-#: SalesPeople.php:157 SalesPeople.php:163 SalesTypes.php:140
-#: SalesTypes.php:150 Shippers.php:81 Shippers.php:93 StockCategories.php:187
-#: Stocks.php:653 Stocks.php:662 Stocks.php:670 Stocks.php:678 Stocks.php:686
-#: Stocks.php:694 Suppliers.php:612 Suppliers.php:621 Suppliers.php:629
-#: SupplierTypes.php:145 TaxCategories.php:131 TaxGroups.php:132
-#: TaxGroups.php:140 TaxProvinces.php:129 UnitsOfMeasure.php:135
-#: WorkCentres.php:89 WorkCentres.php:95 WWW_Access.php:83
-msgid "There are"
-msgstr "Existem"
-
-#: AccountGroups.php:181
-msgid "general ledger accounts that refer to this account group"
-msgstr "contas no livro de contabilidade que referem a este grupo contábel"
-
-#: AccountGroups.php:185
-msgid "An error occurred in retrieving the parent group information"
-msgstr ""
-
-#: AccountGroups.php:190
-msgid ""
-"Cannot delete this account group because it is a parent account group of "
-"other account group(s)"
-msgstr ""
-
-#: AccountGroups.php:191
-msgid "account groups that have this group as its/there parent account group"
-msgstr ""
-
-#: AccountGroups.php:194
-msgid "An error occurred in deleting the account group"
-msgstr "Um erro ocorreu ao apagar a conta de grupo"
-
-#: AccountGroups.php:195
-msgid "The SQL that was used to delete the account group was"
-msgstr "O SQL que foi utilizado para apagar a conta de grupo foi"
-
-#: AccountGroups.php:197
-msgid "group has been deleted"
-msgstr "grupo foi removido"
-
-#: AccountGroups.php:222
-msgid "The sql that was used to retrieve the account group information was "
-msgstr ""
-
-#: AccountGroups.php:223
-msgid "Could not get account groups because"
-msgstr "não foi possível obter contas de grupos porque"
-
-#: AccountGroups.php:225 AccountSections.php:169 AddCustomerContacts.php:25
-#: AddCustomerContacts.php:27 AddCustomerNotes.php:101
-#: AddCustomerTypeNotes.php:94 AgedDebtors.php:444 AgedSuppliers.php:276
-#: Areas.php:143 AuditTrail.php:11 BankReconciliation.php:14
-#: BOMExtendedQty.php:250 BOMIndented.php:246 BOMIndentedReverse.php:235
-#: BOMInquiry.php:187 BOMListing.php:109 BOMs.php:231 BOMs.php:858
-#: COGSGLPostings.php:18 CompanyPreferences.php:153 CounterSales.php:2037
-#: CounterSales.php:2163 Credit_Invoice.php:255 CreditStatus.php:21
-#: Currencies.php:28 CustEDISetup.php:17 DailyBankTransactions.php:11
-#: DebtorsAtPeriodEnd.php:125 DiscountCategories.php:10
-#: DiscountCategories.php:134 DiscountMatrix.php:16 EDIMessageFormat.php:105
-#: FixedAssetLocations.php:9 FixedAssetRegister.php:13
-#: FixedAssetRegister.php:249 FixedAssetTransfer.php:32 FormDesigner.php:129
-#: GLBalanceSheet.php:378 GLBudgets.php:29 GLJournal.php:247
-#: InternalStockRequest.php:281 InventoryPlanning.php:374
-#: InventoryPlanningPrefSupplier.php:467 MRPReport.php:516 NoSalesItems.php:93
-#: OutstandingGRNs.php:163 PcAssignCashToTab.php:56 PcAssignCashToTab.php:130
-#: PcAssignCashToTab.php:146 PcAssignCashToTab.php:190 PDFPickingList.php:28
-#: PDFStockLocTransfer.php:16 PO_AuthorisationLevels.php:10 POReport.php:60
-#: POReport.php:64 POReport.php:68 PO_SelectOSPurchOrder.php:140
-#: PricesBasedOnMarkUp.php:8 Prices_Customer.php:35 Prices.php:30
-#: PurchData.php:152 PurchData.php:286 PurchData.php:312
-#: RecurringSalesOrders.php:309 SalesAnalReptCols.php:51 SalesAnalRepts.php:11
-#: SalesCategories.php:11 SalesGLPostings.php:17 SalesGraph.php:35
-#: SalesPeople.php:20 SalesTypes.php:20 SelectAsset.php:46
-#: SelectCompletedOrder.php:11 SelectContract.php:65 SelectCreditItems.php:216
-#: SelectCreditItems.php:287 SelectCustomer.php:263 SelectGLAccount.php:17
-#: SelectGLAccount.php:87 SelectOrderItems.php:586 SelectOrderItems.php:1498
-#: SelectOrderItems.php:1620 SelectProduct.php:505 SelectSalesOrder.php:534
-#: SelectSupplier.php:9 SelectSupplier.php:199 SelectWorkOrder.php:9
-#: SelectWorkOrder.php:152 ShipmentCosting.php:11 Shipments.php:17
-#: Shippers.php:123 Shippers.php:160 Shipt_Select.php:8
-#: StockLocMovements.php:14 StockLocStatus.php:28
-#: StockSerialItemResearch.php:30 SupplierPriceList.php:15
-#: SupplierPriceList.php:214 SupplierPriceList.php:384
-#: SupplierPriceList.php:388 SupplierPriceList.php:439
-#: SupplierPriceList.php:489 Suppliers.php:302 SupplierTenderCreate.php:522
-#: SupplierTenderCreate.php:628 SupplierTenders.php:322
-#: SupplierTenders.php:388 SupplierTransInquiry.php:10 TaxGroups.php:15
-#: TaxProvinces.php:11 TopItems.php:114 WhereUsedInquiry.php:18
-#: WorkCentres.php:111 WorkCentres.php:162 WorkOrderCosting.php:13
-#: WorkOrderEntry.php:11 WorkOrderIssue.php:22 WorkOrderReceive.php:17
-#: WorkOrderStatus.php:42 WWW_Access.php:11 WWW_Users.php:33
-#: Z_BottomUpCosts.php:57
-msgid "Search"
-msgstr "Procurar"
-
-#: AccountGroups.php:229
-msgid "Group Name"
-msgstr "Nome do Grupo"
-
-#: AccountGroups.php:230 EDIMessageFormat.php:129 EDIMessageFormat.php:208
-msgid "Section"
-msgstr "Seção"
-
-#: AccountGroups.php:231 AccountGroups.php:410
-msgid "Sequence In TB"
-msgstr "Sequência no BC"
-
-#: AccountGroups.php:232 AccountGroups.php:393 GLProfit_Loss.php:6
-#: GLProfit_Loss.php:126 GLProfit_Loss.php:127 GLProfit_Loss.php:178
-#: SelectGLAccount.php:40 SelectGLAccount.php:54 SelectGLAccount.php:68
-msgid "Profit and Loss"
-msgstr "Lucros e Prejuízos"
-
-#: AccountGroups.php:233 AccountGroups.php:354
-msgid "Parent Group"
-msgstr ""
-
-#: AccountGroups.php:249 AccountGroups.php:252 AccountGroups.php:397
-#: AccountGroups.php:399 BOMs.php:124 BOMs.php:772 BOMs.php:774
-#: CompanyPreferences.php:477 CompanyPreferences.php:479
-#: CompanyPreferences.php:492 CompanyPreferences.php:494
-#: CompanyPreferences.php:507 CompanyPreferences.php:509
-#: ContractCosting.php:198 CustomerBranches.php:411 Customers.php:594
-#: Customers.php:947 Customers.php:956 Customers.php:959
-#: DeliveryDetails.php:1082 DeliveryDetails.php:1125 DeliveryDetails.php:1128
-#: GLTransInquiry.php:69 Labels.php:491 Labels.php:493 Labels.php:518
-#: MRPCalendar.php:224 MRP.php:529 MRP.php:533 MRP.php:537 MRP.php:541
-#: PaymentMethods.php:204 PaymentMethods.php:205 PaymentMethods.php:206
-#: PaymentMethods.php:207 PaymentMethods.php:273 PaymentMethods.php:280
-#: PaymentMethods.php:287 PaymentMethods.php:294 PcAuthorizeExpenses.php:243
-#: PDFChequeListing.php:63 PDFDeliveryDifferences.php:76 PDFDIFOT.php:76
-#: PO_AuthorisationLevels.php:134 PO_AuthorisationLevels.php:139
-#: PO_Header.php:792 PO_PDFPurchOrder.php:392 PO_PDFPurchOrder.php:395
-#: PurchData.php:212 PurchData.php:554 PurchData.php:557
-#: RecurringSalesOrders.php:482 RecurringSalesOrders.php:485
-#: SalesAnalReptCols.php:284 SalesAnalReptCols.php:419
-#: SalesAnalReptCols.php:422 SalesAnalRepts.php:417 SalesAnalRepts.php:420
-#: SalesAnalRepts.php:445 SalesAnalRepts.php:448 SalesAnalRepts.php:473
-#: SalesAnalRepts.php:476 SalesPeople.php:219 SalesPeople.php:356
-#: SalesPeople.php:358 SelectProduct.php:385 ShipmentCosting.php:667
-#: Stocks.php:1051 Stocks.php:1053 Stocks.php:1076 Stocks.php:1078
-#: SuppContractChgs.php:90 SystemParameters.php:401 SystemParameters.php:424
-#: SystemParameters.php:440 SystemParameters.php:503 SystemParameters.php:511
-#: SystemParameters.php:551 SystemParameters.php:631 SystemParameters.php:640
-#: SystemParameters.php:648 SystemParameters.php:666 SystemParameters.php:673
-#: SystemParameters.php:717 SystemParameters.php:813 SystemParameters.php:948
-#: SystemParameters.php:950 SystemParameters.php:960 SystemParameters.php:962
-#: SystemParameters.php:1016 SystemParameters.php:1028
-#: SystemParameters.php:1030 TaxGroups.php:311 TaxGroups.php:314
-#: TaxGroups.php:371 WWW_Users.php:484 WWW_Users.php:486 WWW_Users.php:657
-#: WWW_Users.php:659
-msgid "Yes"
-msgstr "Sim"
-
-#: AccountGroups.php:255 AccountGroups.php:402 AccountGroups.php:404
-#: BankAccounts.php:209 BankAccounts.php:378 BankAccounts.php:380
-#: BankAccounts.php:384 BankAccounts.php:392 BOMs.php:126 BOMs.php:771
-#: BOMs.php:775 CompanyPreferences.php:476 CompanyPreferences.php:480
-#: CompanyPreferences.php:491 CompanyPreferences.php:495
-#: CompanyPreferences.php:506 CompanyPreferences.php:510
-#: ContractCosting.php:196 CustomerBranches.php:411 Customers.php:593
-#: Customers.php:942 Customers.php:955 Customers.php:958
-#: DeliveryDetails.php:1083 DeliveryDetails.php:1126 DeliveryDetails.php:1129
-#: GLTransInquiry.php:86 Labels.php:490 Labels.php:494 Labels.php:519
-#: MRPCalendar.php:226 MRP.php:527 MRP.php:531 MRP.php:535 MRP.php:539
-#: NoSalesItems.php:153 PaymentMethods.php:204 PaymentMethods.php:205
-#: PaymentMethods.php:206 PaymentMethods.php:207 PaymentMethods.php:274
-#: PaymentMethods.php:281 PaymentMethods.php:288 PaymentMethods.php:295
-#: PcAuthorizeExpenses.php:241 PDFChequeListing.php:62
-#: PDFDeliveryDifferences.php:75 PDFDIFOT.php:75
-#: PO_AuthorisationLevels.php:136 PO_AuthorisationLevels.php:141
-#: PO_Header.php:791 PO_PDFPurchOrder.php:393 PO_PDFPurchOrder.php:396
-#: PurchData.php:215 PurchData.php:555 PurchData.php:558
-#: RecurringSalesOrders.php:481 RecurringSalesOrders.php:484
-#: SalesAnalReptCols.php:282 SalesAnalReptCols.php:420
-#: SalesAnalReptCols.php:423 SalesAnalRepts.php:416 SalesAnalRepts.php:419
-#: SalesAnalRepts.php:444 SalesAnalRepts.php:447 SalesAnalRepts.php:472
-#: SalesAnalRepts.php:475 SalesPeople.php:221 SalesPeople.php:361
-#: SalesPeople.php:363 SelectProduct.php:387 ShipmentCosting.php:668
-#: Stocks.php:1046 Stocks.php:1048 Stocks.php:1071 Stocks.php:1073
-#: SuppContractChgs.php:92 SystemParameters.php:402 SystemParameters.php:425
-#: SystemParameters.php:441 SystemParameters.php:504 SystemParameters.php:512
-#: SystemParameters.php:552 SystemParameters.php:632 SystemParameters.php:641
-#: SystemParameters.php:649 SystemParameters.php:667 SystemParameters.php:674
-#: SystemParameters.php:718 SystemParameters.php:814 SystemParameters.php:947
-#: SystemParameters.php:951 SystemParameters.php:959 SystemParameters.php:963
-#: SystemParameters.php:1017 SystemParameters.php:1027
-#: SystemParameters.php:1031 TaxGroups.php:312 TaxGroups.php:315
-#: TaxGroups.php:373 WWW_Users.php:483 WWW_Users.php:487 WWW_Users.php:656
-#: WWW_Users.php:660 includes/PDFLowGPPageHeader.inc:44
-#: includes/PDFTaxPageHeader.inc:35
-msgid "No"
-msgstr "Não"
-
-#: AccountGroups.php:264 AccountSections.php:189 AddCustomerContacts.php:148
-#: AddCustomerNotes.php:137 AddCustomerTypeNotes.php:131 Areas.php:163
-#: BankAccounts.php:222 BOMs.php:151 COGSGLPostings.php:108
-#: COGSGLPostings.php:206 CreditStatus.php:175 Currencies.php:272
-#: CustomerBranches.php:415 Customers.php:1033 Customers.php:1067
-#: CustomerTypes.php:206 Departments.php:186 EDIMessageFormat.php:150
-#: Factors.php:334 FixedAssetCategories.php:187 FixedAssetLocations.php:107
-#: FreightCosts.php:242 GeocodeSetup.php:173 GLAccounts.php:312 GLTags.php:93
-#: InternalStockRequest.php:263 Labels.php:223 Labels.php:248
-#: Locations.php:391 MRPDemands.php:309 MRPDemandTypes.php:120
-#: PaymentMethods.php:208 PaymentTerms.php:205 PcAssignCashToTab.php:273
-#: PcClaimExpensesFromTab.php:265 PcExpenses.php:223 PcTabs.php:233
-#: PcTypeTabs.php:174 PO_AuthorisationLevels.php:151 Prices_Customer.php:278
-#: Prices.php:249 PurchData.php:227 SalesCategories.php:256
-#: SalesGLPostings.php:132 SalesGLPostings.php:245 SalesPeople.php:232
-#: SalesTypes.php:206 SecurityTokens.php:130 SelectCustomer.php:615
-#: SelectCustomer.php:633 SelectCustomer.php:656 SelectCustomer.php:673
-#: SelectCustomer.php:696 SelectCustomer.php:713 Shippers.php:144
-#: StockCategories.php:263 SupplierContacts.php:163
-#: SupplierTenderCreate.php:145 SupplierTypes.php:189
-#: SuppTransGLAnalysis.php:120 TaxAuthorities.php:174 TaxCategories.php:182
-#: TaxGroups.php:188 TaxProvinces.php:180 UnitsOfMeasure.php:185
-#: WorkCentres.php:141 WWW_Access.php:123 WWW_Users.php:325
-#: includes/InputSerialItems.php:90 includes/OutputSerialItems.php:20
-#, php-format
-msgid "Edit"
-msgstr "Editar"
-
-#: AccountGroups.php:265
-#, fuzzy
-msgid "Are you sure you wish to delete this account group?"
-msgstr "contas de clientes que referem a este código de estado de cré©dito"
-
-#: AccountGroups.php:265 AccountSections.php:193 AddCustomerContacts.php:149
-#: AddCustomerNotes.php:138 AddCustomerTypeNotes.php:132 Areas.php:164
-#: BankAccounts.php:223 BOMs.php:153 COGSGLPostings.php:109
-#: COGSGLPostings.php:207 ContractBOM.php:267 ContractOtherReqts.php:120
-#: CounterSales.php:830 Credit_Invoice.php:401 CreditStatus.php:176
-#: Currencies.php:275 CustomerReceipt.php:925 Customers.php:1068
-#: CustomerTypes.php:207 Departments.php:187 DiscountCategories.php:223
-#: DiscountMatrix.php:183 EDIMessageFormat.php:151
-#: FixedAssetCategories.php:188 FreightCosts.php:243 GeocodeSetup.php:174
-#: GLAccounts.php:313 GLJournal.php:426 GLTags.php:94
-#: InternalStockRequest.php:264 Labels.php:224 Labels.php:249 Labels.php:497
-#: Locations.php:392 MRPDemands.php:310 MRPDemandTypes.php:121
-#: PaymentMethods.php:209 Payments.php:1083 PaymentTerms.php:206
-#: PcAssignCashToTab.php:277 PcClaimExpensesFromTab.php:266 PcExpenses.php:224
-#: PcExpensesTypeTab.php:187 PcTabs.php:234 PcTypeTabs.php:175
-#: PO_AuthorisationLevels.php:153 PO_Items.php:712 Prices_Customer.php:279
-#: Prices.php:250 PurchData.php:229 SalesAnalReptCols.php:299
-#: SalesAnalRepts.php:304 SalesCategories.php:257 SalesGLPostings.php:133
-#: SalesGLPostings.php:246 SalesPeople.php:233 SalesTypes.php:207
-#: SecurityTokens.php:131 SelectCreditItems.php:767 SelectCustomer.php:616
-#: SelectCustomer.php:634 SelectCustomer.php:657 SelectCustomer.php:674
-#: SelectCustomer.php:697 SelectCustomer.php:714 SelectOrderItems.php:1417
-#: Shipments.php:440 Shippers.php:145 SpecialOrder.php:667
-#: StockCategories.php:264 StockCategories.php:586 StockLocTransfer.php:332
-#: SuppContractChgs.php:99 SuppCreditGRNs.php:112 SuppFixedAssetChgs.php:87
-#: SuppInvGRNs.php:147 SupplierContacts.php:164 SupplierTenderCreate.php:401
-#: SupplierTenderCreate.php:429 SupplierTypes.php:191 SuppShiptChgs.php:90
-#: SuppTransGLAnalysis.php:121 TaxAuthorities.php:175 TaxCategories.php:183
-#: TaxGroups.php:189 TaxProvinces.php:181 UnitsOfMeasure.php:186
-#: WorkCentres.php:142 WOSerialNos.php:321 WWW_Access.php:124
-#: WWW_Users.php:326 includes/InputSerialItemsKeyed.php:58
-#: includes/OutputSerialItems.php:99
-#, php-format
-msgid "Delete"
-msgstr "Remover"
-
-#: AccountGroups.php:273
-msgid "Review Account Groups"
-msgstr "Rever Grupos Contábeis"
-
-#: AccountGroups.php:293
-msgid "An error occurred in retrieving the account group information"
-msgstr ""
-
-#: AccountGroups.php:294
-msgid ""
-"The SQL that was used to retrieve the account group and that failed in the "
-"process was"
-msgstr ""
-
-#: AccountGroups.php:297
-msgid "The account group name does not exist in the database"
-msgstr "O nome da conta de grupo não existe no banco de dados"
-
-#: AccountGroups.php:311
-#, fuzzy
-msgid "Edit Account Group Details"
-msgstr "Grupos de contas"
-
-#: AccountGroups.php:319 GLAccounts.php:244 GLAccounts.php:292
-#: Z_ImportGLAccountGroups.php:26
-msgid "Account Group"
-msgstr "Grupo Contábil"
-
-#: AccountGroups.php:343
-#, fuzzy
-msgid "New Account Group Details"
-msgstr "Rever Grupos Contábeis"
-
-#: AccountGroups.php:349
-msgid "Account Group Name"
-msgstr "Nome da Conta de Grupo"
-
-#: AccountGroups.php:360 AccountGroups.php:362
-msgid "Top Level Group"
-msgstr ""
-
-#: AccountGroups.php:377
-msgid "Section In Accounts"
-msgstr "Seção nas Contas"
-
-#: AccountGroups.php:415 AccountSections.php:259 AddCustomerContacts.php:260
-#: AddCustomerNotes.php:242 AddCustomerTypeNotes.php:221 Areas.php:228
-#: BankAccounts.php:398 BOMs.php:785 COGSGLPostings.php:355
-#: CreditStatus.php:259 Currencies.php:402 CustLoginSetup.php:273
-#: Departments.php:255 DiscountMatrix.php:142 EDIMessageFormat.php:248
-#: FixedAssetCategories.php:347 FixedAssetLocations.php:157
-#: FreightCosts.php:342 GeocodeSetup.php:271 GLAccounts.php:262 Labels.php:531
-#: Locations.php:607 MRPDemands.php:424 MRPDemandTypes.php:188
-#: OffersReceived.php:57 OffersReceived.php:146 PaymentMethods.php:300
-#: PaymentTerms.php:310 PO_AuthorisationLevels.php:262 Prices_Customer.php:361
-#: SalesAnalReptCols.php:552 SalesAnalRepts.php:516 SalesGLPostings.php:417
-#: SalesPeople.php:370 Shippers.php:203 StockCategories.php:613
-#: SupplierContacts.php:282 SuppLoginSetup.php:295 TaxAuthorities.php:329
-#: TaxCategories.php:238 TaxProvinces.php:235 UnitsOfMeasure.php:241
-#: WorkCentres.php:280 WWW_Users.php:699
-msgid "Enter Information"
-msgstr "Salvar as informações"
-
-#: AccountSections.php:7 includes/MainMenuLinksArray.php:376
-msgid "Account Sections"
-msgstr ""
-
-#: AccountSections.php:61
-msgid "The account section already exists in the database"
-msgstr ""
-
-#: AccountSections.php:68
-#, fuzzy
-msgid "The account section name cannot contain any illegal characters"
-msgstr "O código do fornecedor não pode conter algum dos seguintes caracteres"
-
-#: AccountSections.php:74
-msgid "The account section name must contain at least one character"
-msgstr ""
-
-#: AccountSections.php:80 AccountSections.php:86
-msgid "The section number must be an integer"
-msgstr ""
-
-#: AccountSections.php:128
-msgid ""
-"Cannot delete this account section because general ledger accounts groups "
-"have been created using this section"
-msgstr ""
-
-#: AccountSections.php:130
-msgid "general ledger accounts groups that refer to this account section"
-msgstr ""
-
-#: AccountSections.php:142
-msgid "section has been deleted"
-msgstr ""
-
-#: AccountSections.php:167
-msgid "Could not get account group sections because"
-msgstr ""
-
-#: AccountSections.php:173 AccountSections.php:232 AccountSections.php:250
-msgid "Section Number"
-msgstr ""
-
-#: AccountSections.php:174 AccountSections.php:254
-msgid "Section Description"
-msgstr ""
-
-#: AccountSections.php:191
-msgid "Restricted"
-msgstr ""
-
-#: AccountSections.php:202
-msgid "Review Account Sections"
-msgstr ""
-
-#: AccountSections.php:221
-msgid "Could not retrieve the requested section please try again."
-msgstr ""
-
-#: AddCustomerContacts.php:6 AddCustomerContacts.php:59 SelectCustomer.php:607
-#: SelectCustomer.php:640
-msgid "Customer Contacts"
-msgstr ""
-
-#: AddCustomerContacts.php:20 CustEDISetup.php:9 CustLoginSetup.php:21
-#: Z_CheckDebtorsControl.php:14
-msgid "Back to Customers"
-msgstr ""
-
-#: AddCustomerContacts.php:25
-#, fuzzy
-msgid "Contacts for Customer"
-msgstr "e para o cliente"
-
-#: AddCustomerContacts.php:27
-#, fuzzy
-msgid "Edit contact for"
-msgstr "Editar conta"
-
-#: AddCustomerContacts.php:39
-#, fuzzy
-msgid "The Contact ID must be an integer."
-msgstr "O código da conta deve ser um inteiro"
-
-#: AddCustomerContacts.php:42
-#, fuzzy
-msgid "The contact name must be forty characters or less long"
-msgstr "O nome da conta deve ter...
[truncated message content] |
|
From: <dai...@us...> - 2012-07-18 09:39:33
|
Revision: 5515
http://web-erp.svn.sourceforge.net/web-erp/?rev=5515&view=rev
Author: daintree
Date: 2012-07-18 09:38:51 +0000 (Wed, 18 Jul 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/Z_DeleteCreditNote.php
trunk/Z_DeleteInvoice.php
trunk/includes/Z_POSDataCreation.php
trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo
trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po
trunk/sql/mysql/upgrade4.08-4.09.sql
Modified: trunk/Z_DeleteCreditNote.php
===================================================================
--- trunk/Z_DeleteCreditNote.php 2012-07-17 23:35:48 UTC (rev 5514)
+++ trunk/Z_DeleteCreditNote.php 2012-07-18 09:38:51 UTC (rev 5515)
@@ -22,11 +22,14 @@
}
/*get the order number that was credited */
-$SQL = "SELECT order_ FROM debtortrans WHERE transno='" . $_GET['CreditNoteNo'] . "' AND type='11'";
+$SQL = "SELECT order_, id
+ FROM debtortrans
+ WHERE transno='" . $_GET['CreditNoteNo'] . "' AND type='11'";
$Result = DB_query($SQL, $db);
$myrow = DB_fetch_row($Result);
$OrderNo = $myrow[0];
+$IDDebtorTrans = $myrow[1];
/*Now get the stock movements that were credited into an array */
@@ -51,8 +54,29 @@
$Result = DB_Txn_Begin($db); /* commence a database transaction */
+
+/*Now delete the custallocns */
+
+$SQL = "DELETE custallocns FROM custallocns
+ WHERE transid_allocto ='" . $IDDebtorTrans . "'";
+
+$DbgMsg = _('The SQL that failed was');
+$ErrMsg = _('The custallocns record could not be deleted') . ' - ' . _('the sql server returned the following error');
+$Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true);
+
+prnMsg(_('The custallocns record has been deleted'),'info');
+
+/*Now delete the debtortranstaxes */
+
+$SQL = "DELETE debtortranstaxes FROM debtortranstaxes
+ WHERE debtortransid ='" . $IDDebtorTrans . "'";
+$DbgMsg = _('The SQL that failed was');
+$ErrMsg = _('The debtortranstaxes record could not be deleted') . ' - ' . _('the sql server returned the following error');
+$Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true);
+
+prnMsg(_('The debtortranstaxes record has been deleted'),'info');
+
/*Now delete the DebtorTrans */
-
$SQL = "DELETE FROM debtortrans
WHERE transno ='" . $_GET['CreditNoteNo'] . "' AND Type=11";
$DbgMsg = _('The SQL that failed was');
@@ -80,7 +104,8 @@
$Result = DB_query($SQL, $db,$ErrMsg,$DbgMsg, true);
-/*Delete Sales Analysis records */
+/*Delete Sales Analysis records
+ * This is unreliable as the salesanalysis record contains totals for the item cust custbranch periodno */
$SQL = "DELETE FROM salesanalysis
WHERE periodno = '" . $CreditLine['prd'] . "'
AND cust='" . $CreditLine['debtorno'] . "'
Modified: trunk/Z_DeleteInvoice.php
===================================================================
--- trunk/Z_DeleteInvoice.php 2012-07-17 23:35:48 UTC (rev 5514)
+++ trunk/Z_DeleteInvoice.php 2012-07-18 09:38:51 UTC (rev 5515)
@@ -5,7 +5,7 @@
/* Script to delete an invoice expects and invoice number to delete
not included on any menu for obvious reasons
*
-* STRONGLY RECOMMEND NOT USING THIS -CREDIT THE INVOICE AND RE INVOICE
+* STRONGLY RECOMMEND NOT USING THIS - CREDIT THE INVOICE AND RE INVOICE
* *
*
This page must be called directly using path/Z_DeleteInvoice.php?InvoiceNo=????? !! */
@@ -22,7 +22,7 @@
}
/*Get the order number that was invoiced */
-$SQL = "SELECT order_
+$SQL = "SELECT order_, id
FROM debtortrans
WHERE debtortrans.type = 10
AND transno = '" . $_GET['InvoiceNo'] . "'";
@@ -31,6 +31,7 @@
$myrow = DB_fetch_row($Result);
$ProcessingOrder = $myrow[0];
+$IDDebtorTrans = $myrow[1];
/*Now get the stock movements that were invoiced into an array */
@@ -79,6 +80,28 @@
$Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true);
prnMsg(_('Any order delivery differences records have been deleted'),'info');
+/*Now delete the custallocns */
+
+$SQL = "DELETE custallocns FROM custallocns
+ WHERE transid_allocto ='" . $IDDebtorTrans . "'";
+
+$DbgMsg = _('The SQL that failed was');
+$ErrMsg = _('The custallocns record could not be deleted') . ' - ' . _('the sql server returned the following error');
+$Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true);
+
+prnMsg(_('The custallocns record has been deleted'),'info');
+
+/*Now delete the debtortranstaxes */
+
+$SQL = "DELETE debtortranstaxes FROM debtortranstaxes
+ WHERE debtortransid ='" . $IDDebtorTrans . "'";
+$DbgMsg = _('The SQL that failed was');
+$ErrMsg = _('The debtortranstaxes record could not be deleted') . ' - ' . _('the sql server returned the following error');
+$Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true);
+
+prnMsg(_('The debtortranstaxes record has been deleted'),'info');
+
+
/*Now delete the DebtorTrans */
$SQL = "DELETE FROM debtortrans
Modified: trunk/includes/Z_POSDataCreation.php
===================================================================
--- trunk/includes/Z_POSDataCreation.php 2012-07-17 23:35:48 UTC (rev 5514)
+++ trunk/includes/Z_POSDataCreation.php 2012-07-18 09:38:51 UTC (rev 5515)
@@ -2,6 +2,9 @@
function Create_POS_Data_Full ($POSDebtorNo, $POSBranchCode, $PathPrefix, $db) {
+ set_time_limit(1800);
+ ini_set('max_execution_time',1800);
+
$result = DB_query("SELECT confvalue FROM config WHERE confname='reports_dir'",$db);
$ReportDirRow = DB_fetch_row($result);
$ReportDir = $ReportDirRow[0];
@@ -153,6 +156,8 @@
$ZipFile->close();
//delete the original big sql file as we now have the zip for transferring
unlink($PathPrefix . $ReportDir . '/POS.sql');
+ set_time_limit($MaximumExecutionTime);
+ ini_set('max_execution_time',$MaximumExecutionTime);
return 1;
}
Modified: trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo
===================================================================
(Binary files differ)
Modified: trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po
===================================================================
--- trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po 2012-07-17 23:35:48 UTC (rev 5514)
+++ trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po 2012-07-18 09:38:51 UTC (rev 5515)
@@ -1,40930 +1,41260 @@
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: webERP 3.05\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-06-24 09:40+1200\n"
-"PO-Revision-Date: 2011-04-15 02:56+0000\n"
-"Last-Translator: SilvioBandeira <Unknown>\n"
-"Language-Team: Brazilian Portuguese <jo...@ma...>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-04-17 23:36+0000\n"
-"X-Generator: Launchpad (build 12821)\n"
-"X-Poedit-Country: BRAZIL\n"
-"X-Poedit-Language: Portuguese\n"
-
-#: AccountGroups.php:7 includes/MainMenuLinksArray.php:375
-msgid "Account Groups"
-msgstr "Grupos de contas"
-
-#: AccountGroups.php:17
-msgid ""
-"An error occurred in retrieving the account groups of the parent account "
-"group during the check for recursion"
-msgstr ""
-"Um erro ocorreu ao recuperar os grupos de contas do grupo de conta pai "
-"durante a checagem de recursão"
-
-#: AccountGroups.php:18
-msgid ""
-"The SQL that was used to retrieve the account groups of the parent account "
-"group and that failed in the process was"
-msgstr ""
-
-#: AccountGroups.php:58 AccountGroups.php:95 AccountGroups.php:176
-#: AccountGroups.php:186
-msgid "The SQL that was used to retrieve the information was"
-msgstr "O SQL que foi utilizado para obter a informação foi"
-
-#: AccountGroups.php:59
-msgid "Could not check whether the group exists because"
-msgstr "não foi possível verificar se o grupo existe porque"
-
-#: AccountGroups.php:66
-msgid "The account group name already exists in the database"
-msgstr ""
-
-#: AccountGroups.php:72
-msgid "The account group name cannot contain the character"
-msgstr "O nome do grupo contábel não pode conter o caractere"
-
-#: AccountGroups.php:72 Departments.php:30 TaxCategories.php:31
-msgid "or the character"
-msgstr "ou o caractere"
-
-#: AccountGroups.php:78
-msgid "The account group name must be at least one character long"
-msgstr ""
-
-#: AccountGroups.php:85
-msgid ""
-"The parent account group selected appears to result in a recursive account "
-"structure - select an alternative parent account group or make this group a "
-"top level account group"
-msgstr ""
-
-#: AccountGroups.php:96
-msgid "Could not check whether the group is recursive because"
-msgstr "não foi possível verificar se o grupo é recursivo porque"
-
-#: AccountGroups.php:104
-msgid ""
-"Since this account group is a child group, the sequence in the trial "
-"balance, the section in the accounts and whether or not the account group "
-"appears in the balance sheet or profit and loss account are all properties "
-"inherited from the parent account group. Any changes made to these fields "
-"will have no effect."
-msgstr ""
-
-#: AccountGroups.php:109
-msgid "The section in accounts must be an integer"
-msgstr "A seção nas contas deve ser um inteiro"
-
-#: AccountGroups.php:115
-msgid "The sequence in the trial balance must be an integer"
-msgstr "A sequência no balancete comercial deve ser um inteiro"
-
-#: AccountGroups.php:121
-#, fuzzy
-msgid "The sequence in the TB must be numeric and less than"
-msgstr "A sequência no balancete comercial deve ser um inteiro"
-
-#: AccountGroups.php:137
-msgid "An error occurred in updating the account group"
-msgstr "Ocorreu um erro ao atualizar a conta de grupo"
-
-#: AccountGroups.php:138
-msgid "The SQL that was used to update the account group was"
-msgstr "O SQL que foi utilizado para atualizar a conta de grupo foi"
-
-#: AccountGroups.php:140 AccountSections.php:98 PaymentMethods.php:83
-msgid "Record Updated"
-msgstr "Registro atualizado"
-
-#: AccountGroups.php:156
-msgid "An error occurred in inserting the account group"
-msgstr "Ocorreu um erro ao inserir a conta de grupo"
-
-#: AccountGroups.php:157
-msgid "The SQL that was used to insert the account group was"
-msgstr "O SQL que foi utilizado para inserir a conta de grupo foi"
-
-#: AccountGroups.php:158 AccountSections.php:108
-msgid "Record inserted"
-msgstr "Registro inserido"
-
-#: AccountGroups.php:175
-msgid "An error occurred in retrieving the group information from chartmaster"
-msgstr ""
-
-#: AccountGroups.php:180
-msgid ""
-"Cannot delete this account group because general ledger accounts have been "
-"created using this group"
-msgstr ""
-"não é possível remover este grupo contábil pois contas no livro de "
-"contabilidade foram criados usando este grupo"
-
-#: AccountGroups.php:181 AccountGroups.php:191 AccountSections.php:130
-#: Areas.php:114 Areas.php:123 BankAccounts.php:158 CreditStatus.php:125
-#: Currencies.php:166 Currencies.php:174 Currencies.php:182
-#: CustomerBranches.php:286 CustomerBranches.php:296 CustomerBranches.php:306
-#: CustomerBranches.php:316 Customers.php:289 Customers.php:298
-#: Customers.php:306 Customers.php:314 CustomerTypes.php:147
-#: CustomerTypes.php:157 Departments.php:141 Factors.php:134
-#: FixedAssetCategories.php:134 GLAccounts.php:80 GLAccounts.php:96
-#: Locations.php:237 Locations.php:245 Locations.php:256 Locations.php:265
-#: Locations.php:274 Locations.php:283 Locations.php:292 Locations.php:301
-#: Locations.php:309 MRPDemandTypes.php:87 PaymentMethods.php:142
-#: PaymentTerms.php:146 PaymentTerms.php:153 PcExpenses.php:158
-#: SalesCategories.php:125 SalesCategories.php:132 SalesPeople.php:150
-#: SalesPeople.php:157 SalesPeople.php:163 SalesTypes.php:140
-#: SalesTypes.php:150 Shippers.php:81 Shippers.php:93 StockCategories.php:187
-#: Stocks.php:653 Stocks.php:662 Stocks.php:670 Stocks.php:678 Stocks.php:686
-#: Stocks.php:694 Suppliers.php:612 Suppliers.php:621 Suppliers.php:629
-#: SupplierTypes.php:145 TaxCategories.php:131 TaxGroups.php:132
-#: TaxGroups.php:140 TaxProvinces.php:129 UnitsOfMeasure.php:135
-#: WorkCentres.php:89 WorkCentres.php:95 WWW_Access.php:83
-msgid "There are"
-msgstr "Existem"
-
-#: AccountGroups.php:181
-msgid "general ledger accounts that refer to this account group"
-msgstr "contas no livro de contabilidade que referem a este grupo contábel"
-
-#: AccountGroups.php:185
-msgid "An error occurred in retrieving the parent group information"
-msgstr ""
-
-#: AccountGroups.php:190
-msgid ""
-"Cannot delete this account group because it is a parent account group of "
-"other account group(s)"
-msgstr ""
-
-#: AccountGroups.php:191
-msgid "account groups that have this group as its/there parent account group"
-msgstr ""
-
-#: AccountGroups.php:194
-msgid "An error occurred in deleting the account group"
-msgstr "Um erro ocorreu ao apagar a conta de grupo"
-
-#: AccountGroups.php:195
-msgid "The SQL that was used to delete the account group was"
-msgstr "O SQL que foi utilizado para apagar a conta de grupo foi"
-
-#: AccountGroups.php:197
-msgid "group has been deleted"
-msgstr "grupo foi removido"
-
-#: AccountGroups.php:222
-msgid "The sql that was used to retrieve the account group information was "
-msgstr ""
-
-#: AccountGroups.php:223
-msgid "Could not get account groups because"
-msgstr "não foi possível obter contas de grupos porque"
-
-#: AccountGroups.php:225 AccountSections.php:169 AddCustomerContacts.php:25
-#: AddCustomerContacts.php:27 AddCustomerNotes.php:101
-#: AddCustomerTypeNotes.php:94 AgedDebtors.php:444 AgedSuppliers.php:276
-#: Areas.php:143 AuditTrail.php:11 BankReconciliation.php:14
-#: BOMExtendedQty.php:250 BOMIndented.php:246 BOMIndentedReverse.php:235
-#: BOMInquiry.php:187 BOMListing.php:109 BOMs.php:231 BOMs.php:858
-#: COGSGLPostings.php:18 CompanyPreferences.php:153 CounterSales.php:2037
-#: CounterSales.php:2163 Credit_Invoice.php:255 CreditStatus.php:21
-#: Currencies.php:28 CustEDISetup.php:17 DailyBankTransactions.php:11
-#: DebtorsAtPeriodEnd.php:125 DiscountCategories.php:10
-#: DiscountCategories.php:134 DiscountMatrix.php:16 EDIMessageFormat.php:105
-#: FixedAssetLocations.php:9 FixedAssetRegister.php:13
-#: FixedAssetRegister.php:249 FixedAssetTransfer.php:32 FormDesigner.php:129
-#: GLBalanceSheet.php:378 GLBudgets.php:29 GLJournal.php:247
-#: InternalStockRequest.php:281 InventoryPlanning.php:374
-#: InventoryPlanningPrefSupplier.php:467 MRPReport.php:516 NoSalesItems.php:93
-#: OutstandingGRNs.php:163 PcAssignCashToTab.php:56 PcAssignCashToTab.php:130
-#: PcAssignCashToTab.php:146 PcAssignCashToTab.php:190 PDFPickingList.php:28
-#: PDFStockLocTransfer.php:16 PO_AuthorisationLevels.php:10 POReport.php:60
-#: POReport.php:64 POReport.php:68 PO_SelectOSPurchOrder.php:140
-#: PricesBasedOnMarkUp.php:8 Prices_Customer.php:35 Prices.php:30
-#: PurchData.php:152 PurchData.php:286 PurchData.php:312
-#: RecurringSalesOrders.php:309 SalesAnalReptCols.php:51 SalesAnalRepts.php:11
-#: SalesCategories.php:11 SalesGLPostings.php:17 SalesGraph.php:35
-#: SalesPeople.php:20 SalesTypes.php:20 SelectAsset.php:46
-#: SelectCompletedOrder.php:11 SelectContract.php:65 SelectCreditItems.php:216
-#: SelectCreditItems.php:287 SelectCustomer.php:263 SelectGLAccount.php:17
-#: SelectGLAccount.php:87 SelectOrderItems.php:586 SelectOrderItems.php:1498
-#: SelectOrderItems.php:1620 SelectProduct.php:505 SelectSalesOrder.php:534
-#: SelectSupplier.php:9 SelectSupplier.php:199 SelectWorkOrder.php:9
-#: SelectWorkOrder.php:152 ShipmentCosting.php:11 Shipments.php:17
-#: Shippers.php:123 Shippers.php:160 Shipt_Select.php:8
-#: StockLocMovements.php:14 StockLocStatus.php:28
-#: StockSerialItemResearch.php:30 SupplierPriceList.php:15
-#: SupplierPriceList.php:214 SupplierPriceList.php:384
-#: SupplierPriceList.php:388 SupplierPriceList.php:439
-#: SupplierPriceList.php:489 Suppliers.php:302 SupplierTenderCreate.php:522
-#: SupplierTenderCreate.php:628 SupplierTenders.php:322
-#: SupplierTenders.php:388 SupplierTransInquiry.php:10 TaxGroups.php:15
-#: TaxProvinces.php:11 TopItems.php:114 WhereUsedInquiry.php:18
-#: WorkCentres.php:111 WorkCentres.php:162 WorkOrderCosting.php:13
-#: WorkOrderEntry.php:11 WorkOrderIssue.php:22 WorkOrderReceive.php:17
-#: WorkOrderStatus.php:42 WWW_Access.php:11 WWW_Users.php:33
-#: Z_BottomUpCosts.php:57
-msgid "Search"
-msgstr "Procurar"
-
-#: AccountGroups.php:229
-msgid "Group Name"
-msgstr "Nome do Grupo"
-
-#: AccountGroups.php:230 EDIMessageFormat.php:129 EDIMessageFormat.php:208
-msgid "Section"
-msgstr "Seção"
-
-#: AccountGroups.php:231 AccountGroups.php:410
-msgid "Sequence In TB"
-msgstr "Sequência no BC"
-
-#: AccountGroups.php:232 AccountGroups.php:393 GLProfit_Loss.php:6
-#: GLProfit_Loss.php:126 GLProfit_Loss.php:127 GLProfit_Loss.php:178
-#: SelectGLAccount.php:40 SelectGLAccount.php:54 SelectGLAccount.php:68
-msgid "Profit and Loss"
-msgstr "Lucros e Prejuízos"
-
-#: AccountGroups.php:233 AccountGroups.php:354
-msgid "Parent Group"
-msgstr ""
-
-#: AccountGroups.php:249 AccountGroups.php:252 AccountGroups.php:397
-#: AccountGroups.php:399 BOMs.php:124 BOMs.php:772 BOMs.php:774
-#: CompanyPreferences.php:477 CompanyPreferences.php:479
-#: CompanyPreferences.php:492 CompanyPreferences.php:494
-#: CompanyPreferences.php:507 CompanyPreferences.php:509
-#: ContractCosting.php:198 CustomerBranches.php:411 Customers.php:594
-#: Customers.php:947 Customers.php:956 Customers.php:959
-#: DeliveryDetails.php:1082 DeliveryDetails.php:1125 DeliveryDetails.php:1128
-#: GLTransInquiry.php:69 Labels.php:491 Labels.php:493 Labels.php:518
-#: MRPCalendar.php:224 MRP.php:529 MRP.php:533 MRP.php:537 MRP.php:541
-#: PaymentMethods.php:204 PaymentMethods.php:205 PaymentMethods.php:206
-#: PaymentMethods.php:207 PaymentMethods.php:273 PaymentMethods.php:280
-#: PaymentMethods.php:287 PaymentMethods.php:294 PcAuthorizeExpenses.php:243
-#: PDFChequeListing.php:63 PDFDeliveryDifferences.php:76 PDFDIFOT.php:76
-#: PO_AuthorisationLevels.php:134 PO_AuthorisationLevels.php:139
-#: PO_Header.php:792 PO_PDFPurchOrder.php:392 PO_PDFPurchOrder.php:395
-#: PurchData.php:212 PurchData.php:554 PurchData.php:557
-#: RecurringSalesOrders.php:482 RecurringSalesOrders.php:485
-#: SalesAnalReptCols.php:284 SalesAnalReptCols.php:419
-#: SalesAnalReptCols.php:422 SalesAnalRepts.php:417 SalesAnalRepts.php:420
-#: SalesAnalRepts.php:445 SalesAnalRepts.php:448 SalesAnalRepts.php:473
-#: SalesAnalRepts.php:476 SalesPeople.php:219 SalesPeople.php:356
-#: SalesPeople.php:358 SelectProduct.php:385 ShipmentCosting.php:667
-#: Stocks.php:1051 Stocks.php:1053 Stocks.php:1076 Stocks.php:1078
-#: SuppContractChgs.php:90 SystemParameters.php:401 SystemParameters.php:424
-#: SystemParameters.php:440 SystemParameters.php:503 SystemParameters.php:511
-#: SystemParameters.php:551 SystemParameters.php:631 SystemParameters.php:640
-#: SystemParameters.php:648 SystemParameters.php:666 SystemParameters.php:673
-#: SystemParameters.php:717 SystemParameters.php:813 SystemParameters.php:948
-#: SystemParameters.php:950 SystemParameters.php:960 SystemParameters.php:962
-#: SystemParameters.php:1016 SystemParameters.php:1028
-#: SystemParameters.php:1030 TaxGroups.php:311 TaxGroups.php:314
-#: TaxGroups.php:371 WWW_Users.php:484 WWW_Users.php:486 WWW_Users.php:657
-#: WWW_Users.php:659
-msgid "Yes"
-msgstr "Sim"
-
-#: AccountGroups.php:255 AccountGroups.php:402 AccountGroups.php:404
-#: BankAccounts.php:209 BankAccounts.php:378 BankAccounts.php:380
-#: BankAccounts.php:384 BankAccounts.php:392 BOMs.php:126 BOMs.php:771
-#: BOMs.php:775 CompanyPreferences.php:476 CompanyPreferences.php:480
-#: CompanyPreferences.php:491 CompanyPreferences.php:495
-#: CompanyPreferences.php:506 CompanyPreferences.php:510
-#: ContractCosting.php:196 CustomerBranches.php:411 Customers.php:593
-#: Customers.php:942 Customers.php:955 Customers.php:958
-#: DeliveryDetails.php:1083 DeliveryDetails.php:1126 DeliveryDetails.php:1129
-#: GLTransInquiry.php:86 Labels.php:490 Labels.php:494 Labels.php:519
-#: MRPCalendar.php:226 MRP.php:527 MRP.php:531 MRP.php:535 MRP.php:539
-#: NoSalesItems.php:153 PaymentMethods.php:204 PaymentMethods.php:205
-#: PaymentMethods.php:206 PaymentMethods.php:207 PaymentMethods.php:274
-#: PaymentMethods.php:281 PaymentMethods.php:288 PaymentMethods.php:295
-#: PcAuthorizeExpenses.php:241 PDFChequeListing.php:62
-#: PDFDeliveryDifferences.php:75 PDFDIFOT.php:75
-#: PO_AuthorisationLevels.php:136 PO_AuthorisationLevels.php:141
-#: PO_Header.php:791 PO_PDFPurchOrder.php:393 PO_PDFPurchOrder.php:396
-#: PurchData.php:215 PurchData.php:555 PurchData.php:558
-#: RecurringSalesOrders.php:481 RecurringSalesOrders.php:484
-#: SalesAnalReptCols.php:282 SalesAnalReptCols.php:420
-#: SalesAnalReptCols.php:423 SalesAnalRepts.php:416 SalesAnalRepts.php:419
-#: SalesAnalRepts.php:444 SalesAnalRepts.php:447 SalesAnalRepts.php:472
-#: SalesAnalRepts.php:475 SalesPeople.php:221 SalesPeople.php:361
-#: SalesPeople.php:363 SelectProduct.php:387 ShipmentCosting.php:668
-#: Stocks.php:1046 Stocks.php:1048 Stocks.php:1071 Stocks.php:1073
-#: SuppContractChgs.php:92 SystemParameters.php:402 SystemParameters.php:425
-#: SystemParameters.php:441 SystemParameters.php:504 SystemParameters.php:512
-#: SystemParameters.php:552 SystemParameters.php:632 SystemParameters.php:641
-#: SystemParameters.php:649 SystemParameters.php:667 SystemParameters.php:674
-#: SystemParameters.php:718 SystemParameters.php:814 SystemParameters.php:947
-#: SystemParameters.php:951 SystemParameters.php:959 SystemParameters.php:963
-#: SystemParameters.php:1017 SystemParameters.php:1027
-#: SystemParameters.php:1031 TaxGroups.php:312 TaxGroups.php:315
-#: TaxGroups.php:373 WWW_Users.php:483 WWW_Users.php:487 WWW_Users.php:656
-#: WWW_Users.php:660 includes/PDFLowGPPageHeader.inc:44
-#: includes/PDFTaxPageHeader.inc:35
-msgid "No"
-msgstr "Não"
-
-#: AccountGroups.php:264 AccountSections.php:189 AddCustomerContacts.php:148
-#: AddCustomerNotes.php:137 AddCustomerTypeNotes.php:131 Areas.php:163
-#: BankAccounts.php:222 BOMs.php:151 COGSGLPostings.php:108
-#: COGSGLPostings.php:206 CreditStatus.php:175 Currencies.php:272
-#: CustomerBranches.php:415 Customers.php:1033 Customers.php:1067
-#: CustomerTypes.php:206 Departments.php:186 EDIMessageFormat.php:150
-#: Factors.php:334 FixedAssetCategories.php:187 FixedAssetLocations.php:107
-#: FreightCosts.php:242 GeocodeSetup.php:173 GLAccounts.php:312 GLTags.php:93
-#: InternalStockRequest.php:263 Labels.php:223 Labels.php:248
-#: Locations.php:391 MRPDemands.php:309 MRPDemandTypes.php:120
-#: PaymentMethods.php:208 PaymentTerms.php:205 PcAssignCashToTab.php:273
-#: PcClaimExpensesFromTab.php:265 PcExpenses.php:223 PcTabs.php:233
-#: PcTypeTabs.php:174 PO_AuthorisationLevels.php:151 Prices_Customer.php:278
-#: Prices.php:249 PurchData.php:227 SalesCategories.php:256
-#: SalesGLPostings.php:132 SalesGLPostings.php:245 SalesPeople.php:232
-#: SalesTypes.php:206 SecurityTokens.php:130 SelectCustomer.php:615
-#: SelectCustomer.php:633 SelectCustomer.php:656 SelectCustomer.php:673
-#: SelectCustomer.php:696 SelectCustomer.php:713 Shippers.php:144
-#: StockCategories.php:263 SupplierContacts.php:163
-#: SupplierTenderCreate.php:145 SupplierTypes.php:189
-#: SuppTransGLAnalysis.php:120 TaxAuthorities.php:174 TaxCategories.php:182
-#: TaxGroups.php:188 TaxProvinces.php:180 UnitsOfMeasure.php:185
-#: WorkCentres.php:141 WWW_Access.php:123 WWW_Users.php:325
-#: includes/InputSerialItems.php:90 includes/OutputSerialItems.php:20
-#, php-format
-msgid "Edit"
-msgstr "Editar"
-
-#: AccountGroups.php:265
-#, fuzzy
-msgid "Are you sure you wish to delete this account group?"
-msgstr "contas de clientes que referem a este código de estado de cré©dito"
-
-#: AccountGroups.php:265 AccountSections.php:193 AddCustomerContacts.php:149
-#: AddCustomerNotes.php:138 AddCustomerTypeNotes.php:132 Areas.php:164
-#: BankAccounts.php:223 BOMs.php:153 COGSGLPostings.php:109
-#: COGSGLPostings.php:207 ContractBOM.php:267 ContractOtherReqts.php:120
-#: CounterSales.php:830 Credit_Invoice.php:401 CreditStatus.php:176
-#: Currencies.php:275 CustomerReceipt.php:925 Customers.php:1068
-#: CustomerTypes.php:207 Departments.php:187 DiscountCategories.php:223
-#: DiscountMatrix.php:183 EDIMessageFormat.php:151
-#: FixedAssetCategories.php:188 FreightCosts.php:243 GeocodeSetup.php:174
-#: GLAccounts.php:313 GLJournal.php:426 GLTags.php:94
-#: InternalStockRequest.php:264 Labels.php:224 Labels.php:249 Labels.php:497
-#: Locations.php:392 MRPDemands.php:310 MRPDemandTypes.php:121
-#: PaymentMethods.php:209 Payments.php:1083 PaymentTerms.php:206
-#: PcAssignCashToTab.php:277 PcClaimExpensesFromTab.php:266 PcExpenses.php:224
-#: PcExpensesTypeTab.php:187 PcTabs.php:234 PcTypeTabs.php:175
-#: PO_AuthorisationLevels.php:153 PO_Items.php:712 Prices_Customer.php:279
-#: Prices.php:250 PurchData.php:229 SalesAnalReptCols.php:299
-#: SalesAnalRepts.php:304 SalesCategories.php:257 SalesGLPostings.php:133
-#: SalesGLPostings.php:246 SalesPeople.php:233 SalesTypes.php:207
-#: SecurityTokens.php:131 SelectCreditItems.php:767 SelectCustomer.php:616
-#: SelectCustomer.php:634 SelectCustomer.php:657 SelectCustomer.php:674
-#: SelectCustomer.php:697 SelectCustomer.php:714 SelectOrderItems.php:1417
-#: Shipments.php:440 Shippers.php:145 SpecialOrder.php:667
-#: StockCategories.php:264 StockCategories.php:586 StockLocTransfer.php:332
-#: SuppContractChgs.php:99 SuppCreditGRNs.php:112 SuppFixedAssetChgs.php:87
-#: SuppInvGRNs.php:147 SupplierContacts.php:164 SupplierTenderCreate.php:401
-#: SupplierTenderCreate.php:429 SupplierTypes.php:191 SuppShiptChgs.php:90
-#: SuppTransGLAnalysis.php:121 TaxAuthorities.php:175 TaxCategories.php:183
-#: TaxGroups.php:189 TaxProvinces.php:181 UnitsOfMeasure.php:186
-#: WorkCentres.php:142 WOSerialNos.php:321 WWW_Access.php:124
-#: WWW_Users.php:326 includes/InputSerialItemsKeyed.php:58
-#: includes/OutputSerialItems.php:99
-#, php-format
-msgid "Delete"
-msgstr "Remover"
-
-#: AccountGroups.php:273
-msgid "Review Account Groups"
-msgstr "Rever Grupos Contábeis"
-
-#: AccountGroups.php:293
-msgid "An error occurred in retrieving the account group information"
-msgstr ""
-
-#: AccountGroups.php:294
-msgid ""
-"The SQL that was used to retrieve the account group and that failed in the "
-"process was"
-msgstr ""
-
-#: AccountGroups.php:297
-msgid "The account group name does not exist in the database"
-msgstr "O nome da conta de grupo não existe no banco de dados"
-
-#: AccountGroups.php:311
-#, fuzzy
-msgid "Edit Account Group Details"
-msgstr "Grupos de contas"
-
-#: AccountGroups.php:319 GLAccounts.php:244 GLAccounts.php:292
-#: Z_ImportGLAccountGroups.php:26
-msgid "Account Group"
-msgstr "Grupo Contábil"
-
-#: AccountGroups.php:343
-#, fuzzy
-msgid "New Account Group Details"
-msgstr "Rever Grupos Contábeis"
-
-#: AccountGroups.php:349
-msgid "Account Group Name"
-msgstr "Nome da Conta de Grupo"
-
-#: AccountGroups.php:360 AccountGroups.php:362
-msgid "Top Level Group"
-msgstr ""
-
-#: AccountGroups.php:377
-msgid "Section In Accounts"
-msgstr "Seção nas Contas"
-
-#: AccountGroups.php:415 AccountSections.php:259 AddCustomerContacts.php:260
-#: AddCustomerNotes.php:242 AddCustomerTypeNotes.php:221 Areas.php:228
-#: BankAccounts.php:398 BOMs.php:785 COGSGLPostings.php:355
-#: CreditStatus.php:259 Currencies.php:402 CustLoginSetup.php:273
-#: Departments.php:255 DiscountMatrix.php:142 EDIMessageFormat.php:248
-#: FixedAssetCategories.php:347 FixedAssetLocations.php:157
-#: FreightCosts.php:342 GeocodeSetup.php:271 GLAccounts.php:262 Labels.php:531
-#: Locations.php:607 MRPDemands.php:424 MRPDemandTypes.php:188
-#: OffersReceived.php:57 OffersReceived.php:146 PaymentMethods.php:300
-#: PaymentTerms.php:310 PO_AuthorisationLevels.php:262 Prices_Customer.php:361
-#: SalesAnalReptCols.php:552 SalesAnalRepts.php:516 SalesGLPostings.php:417
-#: SalesPeople.php:370 Shippers.php:203 StockCategories.php:613
-#: SupplierContacts.php:282 SuppLoginSetup.php:295 TaxAuthorities.php:329
-#: TaxCategories.php:238 TaxProvinces.php:235 UnitsOfMeasure.php:241
-#: WorkCentres.php:280 WWW_Users.php:699
-msgid "Enter Information"
-msgstr "Salvar as informações"
-
-#: AccountSections.php:7 includes/MainMenuLinksArray.php:376
-msgid "Account Sections"
-msgstr ""
-
-#: AccountSections.php:61
-msgid "The account section already exists in the database"
-msgstr ""
-
-#: AccountSections.php:68
-#, fuzzy
-msgid "The account section name cannot contain any illegal characters"
-msgstr "O código do fornecedor não pode conter algum dos seguintes caracteres"
-
-#: AccountSections.php:74
-msgid "The account section name must contain at least one character"
-msgstr ""
-
-#: AccountSections.php:80 AccountSections.php:86
-msgid "The section number must be an integer"
-msgstr ""
-
-#: AccountSections.php:128
-msgid ""
-"Cannot delete this account section because general ledger accounts groups "
-"have been created using this section"
-msgstr ""
-
-#: AccountSections.php:130
-msgid "general ledger accounts groups that refer to this account section"
-msgstr ""
-
-#: AccountSections.php:142
-msgid "section has been deleted"
-msgstr ""
-
-#: AccountSections.php:167
-msgid "Could not get account group sections because"
-msgstr ""
-
-#: AccountSections.php:173 AccountSections.php:232 AccountSections.php:250
-msgid "Section Number"
-msgstr ""
-
-#: AccountSections.php:174 AccountSections.php:254
-msgid "Section Description"
-msgstr ""
-
-#: AccountSections.php:191
-msgid "Restricted"
-msgstr ""
-
-#: AccountSections.php:202
-msgid "Review Account Sections"
-msgstr ""
-
-#: AccountSections.php:221
-msgid "Could not retrieve the requested section please try again."
-msgstr ""
-
-#: AddCustomerContacts.php:6 AddCustomerContacts.php:59 SelectCustomer.php:607
-#: SelectCustomer.php:640
-msgid "Customer Contacts"
-msgstr ""
-
-#: AddCustomerContacts.php:20 CustEDISetup.php:9 CustLoginSetup.php:21
-#: Z_CheckDebtorsControl.php:14
-msgid "Back to Customers"
-msgstr ""
-
-#: AddCustomerContacts.php:25
-#, fuzzy
-msgid "Contacts for Customer"
-msgstr "e para o cliente"
-
-#: AddCustomerContacts.php:27
-#, fuzzy
-msgid "Edit contact for"
-msgstr "Editar conta"
-
-#: AddCustomerContacts.php:39
-#, fuzzy
-msgid "The Contact ID must be an integer."
-msgstr "O código da conta deve ser um inteiro"
-
-#: AddCustomerContacts.php:42
-#, fuzzy
-msgid "The contact name must be forty characters or less long"
-msgstr "O nome da conta deve ter...
[truncated message content] |
|
From: <tim...@us...> - 2012-07-20 09:38:09
|
Revision: 5521
http://web-erp.svn.sourceforge.net/web-erp/?rev=5521&view=rev
Author: tim_schofield
Date: 2012-07-20 09:37:59 +0000 (Fri, 20 Jul 2012)
Log Message:
-----------
Added scripts to inquire on and to print General Ledger Journals
Modified Paths:
--------------
trunk/doc/Change.log
trunk/includes/MainMenuLinksArray.php
trunk/index.php
trunk/sql/mysql/upgrade4.08-4.09.sql
Added Paths:
-----------
trunk/GLJournalInquiry.php
trunk/PDFGLJournal.php
trunk/companies/weberpdemo/FormDesigns/Journal.xml
trunk/includes/PDFGLJournalHeader.inc
Added: trunk/GLJournalInquiry.php
===================================================================
--- trunk/GLJournalInquiry.php (rev 0)
+++ trunk/GLJournalInquiry.php 2012-07-20 09:37:59 UTC (rev 5521)
@@ -0,0 +1,127 @@
+<?php
+
+include ('includes/session.inc');
+$title = _('General Ledger Journal Inquiry');
+include('includes/header.inc');
+
+echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p>';
+
+if (!isset($_POST['Show'])) {
+ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">';
+ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
+
+ echo '<table class="selection">';
+ echo '<tr><th colspan="3">' . _('Selection Criteria') . '</th></tr>';
+
+ $sql = "SELECT typeno FROM systypes WHERE typeid=0";
+ $result = DB_query($sql, $db);
+ $myrow = DB_fetch_array($result);
+ $MaxJournalNumberUsed = $myrow['typeno'];
+
+ echo '<tr>
+ <td>' . _('Journal Number Range') . ' (' . _('Between') . ' 1 ' . _('and') . ' ' . $MaxJournalNumberUsed . ')</td>
+ <td>' . _('From') . ':'. '<input type="text" class="number" name="NumberFrom" size="10" maxlength="11" value="1" />'.'</td>
+ <td>' . _('To') . ':'. '<input type="text" class="number" name="NumberTo" size="10" maxlength="11" value="' . $MaxJournalNumberUsed . '" />'.'</td>
+ </tr>';
+
+ $sql = "SELECT MIN(trandate) AS fromdate,
+ MAX(trandate) AS todate FROM gltrans WHERE type=0";
+ $result = DB_query($sql, $db);
+ $myrow = DB_fetch_array($result);
+ if (isset($myrow['fromdate']) and $myrow['fromdate'] != '') {
+ $FromDate = $myrow['fromdate'];
+ $ToDate = $myrow['todate'];
+ } else {
+ $FromDate=date('Y-m-d');
+ $ToDate=date('Y-m-d');
+ }
+
+ echo '<tr><td>' . _('Journals Dated Between') . ':</td>
+ <td>' . _('From') . ':'. '<input type="text" name="FromTransDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" maxlength="10" size="11" value="' . ConvertSQLDate($FromDate) . '" /></td>
+ <td>' . _('To') . ':'. '<input type="text" name="ToTransDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" maxlength="10" size="11" value="' . ConvertSQLDate($ToDate) . '" /></td>
+ </tr>';
+
+ echo '</table>';
+ echo '<br /><div class="centre"><input type="submit" name="Show" value"' . _('Show transactions'). '" /></div>';
+ echo '</form>';
+} else {
+
+ $sql="SELECT gltrans.typeno,
+ gltrans.trandate,
+ gltrans.account,
+ chartmaster.accountname,
+ gltrans.narrative,
+ gltrans.amount,
+ gltrans.tag,
+ tags.tagdescription,
+ gltrans.jobref
+ FROM gltrans
+ INNER JOIN chartmaster
+ ON gltrans.account=chartmaster.accountcode
+ LEFT JOIN tags
+ ON gltrans.tag=tags.tagref
+ WHERE gltrans.type='0'
+ AND gltrans.trandate>='" . FormatDateForSQL($_POST['FromTransDate']) . "'
+ AND gltrans.trandate<='" . FormatDateForSQL($_POST['ToTransDate']) . "'
+ AND gltrans.typeno>='" . $_POST['NumberFrom'] . "'
+ AND gltrans.typeno<='" . $_POST['NumberTo'] . "'
+ ORDER BY gltrans.typeno";
+
+ $result = DB_query($sql, $db);
+ if (DB_num_rows($result)==0) {
+ prnMsg(_('There are no transactions for this account in the date range selected'), 'info');
+ } else {
+ echo '<table class="selection">';
+ echo '<tr>
+ <th>' . ('Date') . '</th>
+ <th>'._('Journal Number').'</th>
+ <th>'._('Account Code').'</th>
+ <th>'._('Account Description').'</th>
+ <th>'._('Narrative').'</th>
+ <th>'._('Amount').' '.$_SESSION['CompanyRecord']['currencydefault'].'</th>
+ <th>'._('Tag').'</th>
+ </tr>';
+
+ $LastJournal = 0;
+
+ while ($myrow = DB_fetch_array($result)){
+
+ if ($myrow['tag']==0) {
+ $myrow['tagdescription']='None';
+ }
+
+ if ($myrow['typeno']!=$LastJournal) {
+ echo '<tr><td colspan="8"</td></tr><tr>
+ <td>'. ConvertSQLDate($myrow['trandate']) . '</td>
+ <td class="number">'.$myrow['typeno'].'</td>';
+
+ } else {
+ echo '<tr><td colspan="2"></td>';
+ }
+
+ echo '<td>'.$myrow['account'].'</td>
+ <td>'.$myrow['accountname'].'</td>
+ <td>'.$myrow['narrative'] .'</td>
+ <td class="number">'.locale_number_format($myrow['amount'],$_SESSION['CompanyRecord']['decimalplaces']).'</td>
+ <td class="number">'.$myrow['tag'] . ' - ' . $myrow['tagdescription'].'</td>';
+
+ if ($myrow['typeno']!=$LastJournal) {
+ echo '<td class="number"><a href="PDFGLJournal.php?JournalNo='.$myrow['typeno'].'">'._('Print') .'</a></td></tr>';
+
+ $LastJournal = $myrow['typeno'];
+ } else {
+ echo '<td colspan="1"></td></tr>';
+ }
+
+ }
+ echo '</table>';
+ } //end if no bank trans in the range to show
+
+ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">';
+ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
+ echo '<br /><div class="centre"><input type="submit" name="Return" value="' . _('Select Another Date'). '" /></div>';
+ echo '</form>';
+}
+include('includes/footer.inc');
+
+?>
\ No newline at end of file
Added: trunk/PDFGLJournal.php
===================================================================
--- trunk/PDFGLJournal.php (rev 0)
+++ trunk/PDFGLJournal.php 2012-07-20 09:37:59 UTC (rev 5521)
@@ -0,0 +1,107 @@
+<?php
+
+/* $Id$*/
+
+/* $Revision: 1.5 $ */
+
+include('includes/session.inc');
+
+if (isset($_POST['JournalNo'])) {
+ $JournalNo=$_POST['JournalNo'];
+} else if (isset($_GET['JournalNo'])) {
+ $JournalNo=$_GET['JournalNo'];
+} else {
+ $JournalNo='';
+}
+
+if ($JournalNo=='Preview') {
+ $FormDesign = simplexml_load_file(sys_get_temp_dir().'/Journal.xml');
+} else {
+ $FormDesign = simplexml_load_file($PathPrefix.'companies/'.$_SESSION['DatabaseName'].'/FormDesigns/Journal.xml');
+}
+
+// Set the paper size/orintation
+$PaperSize = $FormDesign->PaperSize;
+$PageNumber=1;
+$line_height=$FormDesign->LineHeight;
+include('includes/PDFStarter.php');
+$pdf->addInfo('Title', _('General Ledger Journal') );
+
+if ($JournalNo=='Preview') {
+ $LineCount = 2; // UldisN
+} else {
+ $sql="SELECT gltrans.typeno,
+ gltrans.trandate,
+ gltrans.account,
+ chartmaster.accountname,
+ gltrans.narrative,
+ gltrans.amount,
+ gltrans.tag,
+ tags.tagdescription,
+ gltrans.jobref
+ FROM gltrans
+ INNER JOIN chartmaster
+ ON gltrans.account=chartmaster.accountcode
+ LEFT JOIN tags
+ ON gltrans.tag=tags.tagref
+ WHERE gltrans.type='0'
+ AND gltrans.typeno='" . $JournalNo . "'";
+ $result=DB_query($sql, $db);
+ $LineCount = DB_num_rows($result); // UldisN
+ $myrow=DB_fetch_array($result);
+ $JournalDate=$myrow['trandate'];
+ DB_data_seek($result, 0);
+ include('includes/PDFGLJournalHeader.inc');
+}
+$counter=1;
+$YPos=$FormDesign->Data->y;
+while ($counter<=$LineCount) {
+ if ($JournalNo=='Preview') {
+ $AccountCode=str_pad('',10,'x');
+ $Date='1/1/1900';
+ $Description=str_pad('',30,'x');
+ $Narrative=str_pad('',30,'x');
+ $Amount='XXXX.XX';
+ $Tag=str_pad('',25,'x');
+ $JobRef=str_pad('',25,'x');
+ } else {
+ $myrow=DB_fetch_array($result);
+ if ($myrow['tag']==0) {
+ $myrow['tagdescription']='None';
+ }
+ $AccountCode = $myrow['account'];
+ $Description = $myrow['accountname'];
+ $Date = $myrow['trandate'];
+ $Narrative = $myrow['narrative'];
+ $Amount = $myrow['amount'];
+ $Tag = $myrow['tag'].' - '.$myrow['tagdescription'];
+ $JobRef = $myrow['jobref'];
+ }
+ $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column1->x,$Page_Height-$YPos,$FormDesign->Data->Column1->Length,$FormDesign->Data->Column1->FontSize, $AccountCode);
+ $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column2->x,$Page_Height-$YPos,$FormDesign->Data->Column2->Length,$FormDesign->Data->Column2->FontSize, $Description);
+ $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column3->x,$Page_Height-$YPos,$FormDesign->Data->Column3->Length,$FormDesign->Data->Column3->FontSize, $Narrative);
+ $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column4->x,$Page_Height-$YPos,$FormDesign->Data->Column4->Length,$FormDesign->Data->Column4->FontSize, locale_number_format($Amount,$_SESSION['CompanyRecord']['decimalplaces']), 'right');
+ $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column5->x,$Page_Height-$YPos,$FormDesign->Data->Column5->Length,$FormDesign->Data->Column5->FontSize, $Tag);
+ $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column6->x,$Page_Height-$YPos,$FormDesign->Data->Column6->Length,$FormDesign->Data->Column6->FontSize, $JobRef, 'left');
+ $YPos += $line_height;
+ $counter++;
+ if ($YPos >= $FormDesign->LineAboveFooter->starty){
+ /* We reached the end of the page so finsih off the page and start a newy */
+ $PageNumber++;
+ $YPos=$FormDesign->Data->y;
+ include ('includes/PDFGrnHeader.inc');
+ } //end if need a new page headed up
+}
+
+if ($LineCount == 0) { //UldisN
+ $title = _('Printing Error');
+ include('includes/header.inc');
+ prnMsg(_('There were no Journals to print'),'warn');
+ echo '<br /><a href="'.$rootpath.'/index.php">'. _('Back to the menu').'</a>';
+ include('includes/footer.inc');
+ exit;
+} else {
+ $pdf->OutputD($_SESSION['DatabaseName'] . '_Journal_' . date('Y-m-d').'.pdf');//UldisN
+ $pdf->__destruct(); //UldisN
+}
+?>
\ No newline at end of file
Added: trunk/companies/weberpdemo/FormDesigns/Journal.xml
===================================================================
--- trunk/companies/weberpdemo/FormDesigns/Journal.xml (rev 0)
+++ trunk/companies/weberpdemo/FormDesigns/Journal.xml 2012-07-20 09:37:59 UTC (rev 5521)
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<form name="Goods Received Note">
+ <PaperSize name="Paper size">A4_Landscape</PaperSize>
+ <LineHeight name="Line height">12</LineHeight>
+ <logo type="image" name="Logo" id="Logo">
+ <x>20</x>
+ <y>80</y>
+ <width>0</width>
+ <height>60</height>
+ </logo>
+ <CompanyName type="SimpleText" name="Company name" id="CompanyName">
+ <FontSize>10</FontSize>
+ <x>625</x>
+ <y>30</y>
+ </CompanyName>
+ <GRNNumber type="SimpleText" name="GRN Number" id="GRNNumber">
+ <FontSize>10</FontSize>
+ <x>625</x>
+ <y>48</y>
+ </GRNNumber>
+ <OrderNumber type="SimpleText" name="Order Number" id="OrderNumber">
+ <FontSize>10</FontSize>
+ <x>625</x>
+ <y>66</y>
+ </OrderNumber>
+ <PrintDate type="SimpleText" name="Date Printed" id="PrintDate">
+ <FontSize>10</FontSize>
+ <x>625</x>
+ <y>84</y>
+ </PrintDate>
+ <HeaderRectangle type="Rectangle" name="Header rectangle" id="HeaderRectangle">
+ <x>40</x>
+ <y>114</y>
+ <width>772</width>
+ <height>24</height>
+ </HeaderRectangle>
+ <Headings type="ElementArray" name="Column headings">
+ <Column1 type="SimpleText" name="Heading 1" id="Heading1">
+ <FontSize>10</FontSize>
+ <x>41</x>
+ <y>126</y>
+ </Column1>
+ <Column2 type="SimpleText" name="Heading 2" id="Heading2">
+ <FontSize>10</FontSize>
+ <x>116</x>
+ <y>126</y>
+ </Column2>
+ <Column3 type="SimpleText" name="Heading 3" id="Heading3">
+ <FontSize>10</FontSize>
+ <x>256</x>
+ <y>126</y>
+ </Column3>
+ <Column4 type="MultiLineText" name="Heading 4" id="Heading4">
+ <FontSize>10</FontSize>
+ <x>486</x>
+ <y>136</y>
+ <Length>100</Length>
+ </Column4>
+ <Column5 type="MultiLineText" name="Heading 5" id="Heading5">
+ <FontSize>10</FontSize>
+ <x>616</x>
+ <y>136</y>
+ <Length>100</Length>
+ </Column5>
+ </Headings>
+ <DataRectangle type="Rectangle" name="Data rectangle" id="DataRectangle">
+ <x>40</x>
+ <y>138</y>
+ <width>772</width>
+ <height>430</height>
+ </DataRectangle>
+ <LineAboveFooter type="Line" name="Line Above Footer" id="LineAboveFooter">
+ <startx>40</startx>
+ <starty>530</starty>
+ <endx>812</endx>
+ <endy>530</endy>
+ </LineAboveFooter>
+ <Column1 type="Line" name="Column 1" id="Column1">
+ <startx>114</startx>
+ <starty>114</starty>
+ <endx>114</endx>
+ <endy>530</endy>
+ </Column1>
+ <Column3 type="Line" name="Column 3" id="Column3">
+ <startx>254</startx>
+ <starty>114</starty>
+ <endx>254</endx>
+ <endy>530</endy>
+ </Column3>
+ <Column4 type="Line" name="Column 4" id="Column4">
+ <startx>489</startx>
+ <starty>114</starty>
+ <endx>489</endx>
+ <endy>530</endy>
+ </Column4>
+ <Column5 type="Line" name="Column 5" id="Column5">
+ <startx>616</startx>
+ <starty>114</starty>
+ <endx>616</endx>
+ <endy>530</endy>
+ </Column5>
+ <Data type="ElementArray" name="Column Data">
+ <y type="StartLine" name="Y co-ordinate of first data line" id="DataStartLine">156</y>
+ <Column1 type="DataText" name="Column 1" id="Data1">
+ <FontSize>10</FontSize>
+ <x>41</x>
+ <Length>94</Length>
+ </Column1>
+ <Column2 type="DataText" name="Column 2" id="Data2">
+ <FontSize>10</FontSize>
+ <x>116</x>
+ <Length>270</Length>
+ </Column2>
+ <Column3 type="DataText" name="Column 3" id="Data3">
+ <FontSize>10</FontSize>
+ <x>256</x>
+ <Length>85</Length>
+ </Column3>
+ <Column4 type="DataText" name="Column 5" id="Data5">
+ <FontSize>10</FontSize>
+ <x>568</x>
+ <Length>30</Length>
+ </Column4>
+ <Column5 type="DataText" name="Column 6" id="Data6">
+ <FontSize>10</FontSize>
+ <x>638</x>
+ <Length>60</Length>
+ </Column5>
+ <Column6 type="DataText" name="Column 7" id="Data7">
+ <FontSize>10</FontSize>
+ <x>700</x>
+ <Length>30</Length>
+ </Column6>
+ </Data>
+ <ReceiptDate type="SimpleText" name="Date Received" id="ReceiptDate">
+ <FontSize>10</FontSize>
+ <x>300</x>
+ <y>550</y>
+ </ReceiptDate>
+ <SignedFor type="SimpleText" name="Signed Fror" id="SignedFor">
+ <FontSize>10</FontSize>
+ <x>50</x>
+ <y>550</y>
+ </SignedFor>
+</form>
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2012-07-20 09:06:03 UTC (rev 5520)
+++ trunk/doc/Change.log 2012-07-20 09:37:59 UTC (rev 5521)
@@ -1,4 +1,5 @@
webERP Change Log
+20/7/2012 Tim: Added scripts to inquire on and to print General Ledger Journals
20/7/2012 Exson: Fixed that delete or editing new serial items will lead to hyper-link changed as select credit items instead of back to credit invoice in scripts InputSerialItemsKeyed.php. Report by UK-Steven from webERP Chinese Community QQ group
15/7/12 Gilberto Dos Santos Alves: updated pt_BR.utf8 translation
13/7/12 Tim: Fix up the sql where a field was selected twice
Modified: trunk/includes/MainMenuLinksArray.php
===================================================================
--- trunk/includes/MainMenuLinksArray.php 2012-07-20 09:06:03 UTC (rev 5520)
+++ trunk/includes/MainMenuLinksArray.php 2012-07-20 09:37:59 UTC (rev 5521)
@@ -348,6 +348,7 @@
_('Account Inquiry'),
_('Account Listing'),
_('Account Listing to CSV File'),
+ _('General Ledger Journal Inquiry'),
_('Bank Account Reconciliation Statement'),
_('Cheque Payments Listing'),
_('Daily Bank Transactions'),
@@ -361,6 +362,7 @@
'/SelectGLAccount.php',
'/GLAccountReport.php',
'/GLAccountCSV.php',
+ '/GLJournalInquiry.php',
'/BankReconciliation.php',
'/PDFChequeListing.php',
'/DailyBankTransactions.php',
Added: trunk/includes/PDFGLJournalHeader.inc
===================================================================
--- trunk/includes/PDFGLJournalHeader.inc (rev 0)
+++ trunk/includes/PDFGLJournalHeader.inc 2012-07-20 09:37:59 UTC (rev 5521)
@@ -0,0 +1,36 @@
+<?php
+/* $Id$*/
+/*PDF page header for price list report */
+if ($PageNumber>1){
+ $pdf->newPage();
+}
+
+$pdf->addJpegFromFile($_SESSION['LogoFile'] ,$FormDesign->logo->x,$Page_Height-$FormDesign->logo->y,$FormDesign->logo->width,$FormDesign->logo->height);
+
+$LeftOvers = $pdf->addText($FormDesign->CompanyName->x,$Page_Height-$FormDesign->CompanyName->y,$FormDesign->CompanyName->FontSize,$_SESSION['CompanyRecord']['coyname']);
+$LeftOvers = $pdf->addText($FormDesign->GRNNumber->x,$Page_Height-$FormDesign->GRNNumber->y,$FormDesign->GRNNumber->FontSize, _('Journal number ').' ' . $JournalNo );
+$LeftOvers = $pdf->addText($FormDesign->OrderNumber->x,$Page_Height-$FormDesign->OrderNumber->y,$FormDesign->OrderNumber->FontSize, _('Journal Date ').' ' . ConvertSQLDate($JournalDate) );
+$LeftOvers = $pdf->addText($FormDesign->PrintDate->x,$Page_Height-$FormDesign->PrintDate->y,$FormDesign->PrintDate->FontSize, _('Printed').': ' . Date($_SESSION['DefaultDateFormat']) . ' '. _('Page'). ' ' . $PageNumber);
+
+/*Draw a rectangle to put the headings in */
+$pdf->Rectangle($FormDesign->HeaderRectangle->x, $Page_Height - $FormDesign->HeaderRectangle->y, $FormDesign->HeaderRectangle->width,$FormDesign->HeaderRectangle->height);
+
+/*set up the headings */
+$LeftOvers = $pdf->addText($FormDesign->Headings->Column1->x,$Page_Height - $FormDesign->Headings->Column1->y, $FormDesign->Headings->Column1->FontSize, _('Account Code'));
+$LeftOvers = $pdf->addText($FormDesign->Headings->Column2->x,$Page_Height - $FormDesign->Headings->Column2->y, $FormDesign->Headings->Column2->FontSize, _('Account Description'));
+$LeftOvers = $pdf->addText($FormDesign->Headings->Column3->x,$Page_Height - $FormDesign->Headings->Column3->y, $FormDesign->Headings->Column3->FontSize, _('Narrative'));
+$LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column4->x,$Page_Height - $FormDesign->Headings->Column4->y, $FormDesign->Headings->Column4->Length, $FormDesign->Headings->Column4->FontSize, _('Amount'), 'right');
+$LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column5->x,$Page_Height - $FormDesign->Headings->Column5->y, $FormDesign->Headings->Column5->Length, $FormDesign->Headings->Column5->FontSize, _('Tag Details'), 'right');
+
+/*Draw a rectangle to put the data in */
+$pdf->Rectangle($FormDesign->DataRectangle->x, $Page_Height - $FormDesign->DataRectangle->y, $FormDesign->DataRectangle->width,$FormDesign->DataRectangle->height);
+
+$pdf->Line($FormDesign->LineAboveFooter->startx, $Page_Height - $FormDesign->LineAboveFooter->starty, $FormDesign->LineAboveFooter->endx,$Page_Height - $FormDesign->LineAboveFooter->endy);
+
+$pdf->Line($FormDesign->Column1->startx, $Page_Height - $FormDesign->Column1->starty, $FormDesign->Column1->endx,$Page_Height - $FormDesign->Column1->endy);
+$pdf->Line($FormDesign->Column3->startx, $Page_Height - $FormDesign->Column3->starty, $FormDesign->Column3->endx,$Page_Height - $FormDesign->Column3->endy);
+$pdf->Line($FormDesign->Column4->startx, $Page_Height - $FormDesign->Column4->starty, $FormDesign->Column4->endx,$Page_Height - $FormDesign->Column4->endy);
+$pdf->Line($FormDesign->Column5->startx, $Page_Height - $FormDesign->Column5->starty, $FormDesign->Column5->endx,$Page_Height - $FormDesign->Column5->endy);
+
+$PageNumber++;
+?>
\ No newline at end of file
Modified: trunk/index.php
===================================================================
--- trunk/index.php 2012-07-20 09:06:03 UTC (rev 5520)
+++ trunk/index.php 2012-07-20 09:37:59 UTC (rev 5521)
@@ -49,7 +49,7 @@
include('includes/footer.inc');
exit;
}
-
+echo 'x'.$PathPrefix.'x';
if (isset($_GET['Application'])){ /*This is sent by this page (to itself) when the user clicks on a tab */
$_SESSION['Module'] = $_GET['Application'];
}
Modified: trunk/sql/mysql/upgrade4.08-4.09.sql
===================================================================
--- trunk/sql/mysql/upgrade4.08-4.09.sql 2012-07-20 09:06:03 UTC (rev 5520)
+++ trunk/sql/mysql/upgrade4.08-4.09.sql 2012-07-20 09:37:59 UTC (rev 5521)
@@ -14,4 +14,7 @@
ALTER TABLE `loctransfers` CHANGE `shipdate` `shipdate` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00';
ALTER TABLE `loctransfers` CHANGE `recdate` `recdate` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00';
+INSERT INTO scripts VALUES ('GLJournalInquiry.php','15','General Ledger Journal Inquiry');
+INSERT INTO scripts VALUES ('PDFGLJournal.php','15','General Ledger Journal Print');
+
UPDATE config SET confvalue='4.08.2' 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.
|
|
From: <tim...@us...> - 2012-07-20 09:38:09
|
Revision: 5521
http://web-erp.svn.sourceforge.net/web-erp/?rev=5521&view=rev
Author: tim_schofield
Date: 2012-07-20 09:37:59 +0000 (Fri, 20 Jul 2012)
Log Message:
-----------
Added scripts to inquire on and to print General Ledger Journals
Modified Paths:
--------------
trunk/doc/Change.log
trunk/includes/MainMenuLinksArray.php
trunk/index.php
trunk/sql/mysql/upgrade4.08-4.09.sql
Added Paths:
-----------
trunk/GLJournalInquiry.php
trunk/PDFGLJournal.php
trunk/companies/weberpdemo/FormDesigns/Journal.xml
trunk/includes/PDFGLJournalHeader.inc
Added: trunk/GLJournalInquiry.php
===================================================================
--- trunk/GLJournalInquiry.php (rev 0)
+++ trunk/GLJournalInquiry.php 2012-07-20 09:37:59 UTC (rev 5521)
@@ -0,0 +1,127 @@
+<?php
+
+include ('includes/session.inc');
+$title = _('General Ledger Journal Inquiry');
+include('includes/header.inc');
+
+echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p>';
+
+if (!isset($_POST['Show'])) {
+ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">';
+ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
+
+ echo '<table class="selection">';
+ echo '<tr><th colspan="3">' . _('Selection Criteria') . '</th></tr>';
+
+ $sql = "SELECT typeno FROM systypes WHERE typeid=0";
+ $result = DB_query($sql, $db);
+ $myrow = DB_fetch_array($result);
+ $MaxJournalNumberUsed = $myrow['typeno'];
+
+ echo '<tr>
+ <td>' . _('Journal Number Range') . ' (' . _('Between') . ' 1 ' . _('and') . ' ' . $MaxJournalNumberUsed . ')</td>
+ <td>' . _('From') . ':'. '<input type="text" class="number" name="NumberFrom" size="10" maxlength="11" value="1" />'.'</td>
+ <td>' . _('To') . ':'. '<input type="text" class="number" name="NumberTo" size="10" maxlength="11" value="' . $MaxJournalNumberUsed . '" />'.'</td>
+ </tr>';
+
+ $sql = "SELECT MIN(trandate) AS fromdate,
+ MAX(trandate) AS todate FROM gltrans WHERE type=0";
+ $result = DB_query($sql, $db);
+ $myrow = DB_fetch_array($result);
+ if (isset($myrow['fromdate']) and $myrow['fromdate'] != '') {
+ $FromDate = $myrow['fromdate'];
+ $ToDate = $myrow['todate'];
+ } else {
+ $FromDate=date('Y-m-d');
+ $ToDate=date('Y-m-d');
+ }
+
+ echo '<tr><td>' . _('Journals Dated Between') . ':</td>
+ <td>' . _('From') . ':'. '<input type="text" name="FromTransDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" maxlength="10" size="11" value="' . ConvertSQLDate($FromDate) . '" /></td>
+ <td>' . _('To') . ':'. '<input type="text" name="ToTransDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" maxlength="10" size="11" value="' . ConvertSQLDate($ToDate) . '" /></td>
+ </tr>';
+
+ echo '</table>';
+ echo '<br /><div class="centre"><input type="submit" name="Show" value"' . _('Show transactions'). '" /></div>';
+ echo '</form>';
+} else {
+
+ $sql="SELECT gltrans.typeno,
+ gltrans.trandate,
+ gltrans.account,
+ chartmaster.accountname,
+ gltrans.narrative,
+ gltrans.amount,
+ gltrans.tag,
+ tags.tagdescription,
+ gltrans.jobref
+ FROM gltrans
+ INNER JOIN chartmaster
+ ON gltrans.account=chartmaster.accountcode
+ LEFT JOIN tags
+ ON gltrans.tag=tags.tagref
+ WHERE gltrans.type='0'
+ AND gltrans.trandate>='" . FormatDateForSQL($_POST['FromTransDate']) . "'
+ AND gltrans.trandate<='" . FormatDateForSQL($_POST['ToTransDate']) . "'
+ AND gltrans.typeno>='" . $_POST['NumberFrom'] . "'
+ AND gltrans.typeno<='" . $_POST['NumberTo'] . "'
+ ORDER BY gltrans.typeno";
+
+ $result = DB_query($sql, $db);
+ if (DB_num_rows($result)==0) {
+ prnMsg(_('There are no transactions for this account in the date range selected'), 'info');
+ } else {
+ echo '<table class="selection">';
+ echo '<tr>
+ <th>' . ('Date') . '</th>
+ <th>'._('Journal Number').'</th>
+ <th>'._('Account Code').'</th>
+ <th>'._('Account Description').'</th>
+ <th>'._('Narrative').'</th>
+ <th>'._('Amount').' '.$_SESSION['CompanyRecord']['currencydefault'].'</th>
+ <th>'._('Tag').'</th>
+ </tr>';
+
+ $LastJournal = 0;
+
+ while ($myrow = DB_fetch_array($result)){
+
+ if ($myrow['tag']==0) {
+ $myrow['tagdescription']='None';
+ }
+
+ if ($myrow['typeno']!=$LastJournal) {
+ echo '<tr><td colspan="8"</td></tr><tr>
+ <td>'. ConvertSQLDate($myrow['trandate']) . '</td>
+ <td class="number">'.$myrow['typeno'].'</td>';
+
+ } else {
+ echo '<tr><td colspan="2"></td>';
+ }
+
+ echo '<td>'.$myrow['account'].'</td>
+ <td>'.$myrow['accountname'].'</td>
+ <td>'.$myrow['narrative'] .'</td>
+ <td class="number">'.locale_number_format($myrow['amount'],$_SESSION['CompanyRecord']['decimalplaces']).'</td>
+ <td class="number">'.$myrow['tag'] . ' - ' . $myrow['tagdescription'].'</td>';
+
+ if ($myrow['typeno']!=$LastJournal) {
+ echo '<td class="number"><a href="PDFGLJournal.php?JournalNo='.$myrow['typeno'].'">'._('Print') .'</a></td></tr>';
+
+ $LastJournal = $myrow['typeno'];
+ } else {
+ echo '<td colspan="1"></td></tr>';
+ }
+
+ }
+ echo '</table>';
+ } //end if no bank trans in the range to show
+
+ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">';
+ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
+ echo '<br /><div class="centre"><input type="submit" name="Return" value="' . _('Select Another Date'). '" /></div>';
+ echo '</form>';
+}
+include('includes/footer.inc');
+
+?>
\ No newline at end of file
Added: trunk/PDFGLJournal.php
===================================================================
--- trunk/PDFGLJournal.php (rev 0)
+++ trunk/PDFGLJournal.php 2012-07-20 09:37:59 UTC (rev 5521)
@@ -0,0 +1,107 @@
+<?php
+
+/* $Id$*/
+
+/* $Revision: 1.5 $ */
+
+include('includes/session.inc');
+
+if (isset($_POST['JournalNo'])) {
+ $JournalNo=$_POST['JournalNo'];
+} else if (isset($_GET['JournalNo'])) {
+ $JournalNo=$_GET['JournalNo'];
+} else {
+ $JournalNo='';
+}
+
+if ($JournalNo=='Preview') {
+ $FormDesign = simplexml_load_file(sys_get_temp_dir().'/Journal.xml');
+} else {
+ $FormDesign = simplexml_load_file($PathPrefix.'companies/'.$_SESSION['DatabaseName'].'/FormDesigns/Journal.xml');
+}
+
+// Set the paper size/orintation
+$PaperSize = $FormDesign->PaperSize;
+$PageNumber=1;
+$line_height=$FormDesign->LineHeight;
+include('includes/PDFStarter.php');
+$pdf->addInfo('Title', _('General Ledger Journal') );
+
+if ($JournalNo=='Preview') {
+ $LineCount = 2; // UldisN
+} else {
+ $sql="SELECT gltrans.typeno,
+ gltrans.trandate,
+ gltrans.account,
+ chartmaster.accountname,
+ gltrans.narrative,
+ gltrans.amount,
+ gltrans.tag,
+ tags.tagdescription,
+ gltrans.jobref
+ FROM gltrans
+ INNER JOIN chartmaster
+ ON gltrans.account=chartmaster.accountcode
+ LEFT JOIN tags
+ ON gltrans.tag=tags.tagref
+ WHERE gltrans.type='0'
+ AND gltrans.typeno='" . $JournalNo . "'";
+ $result=DB_query($sql, $db);
+ $LineCount = DB_num_rows($result); // UldisN
+ $myrow=DB_fetch_array($result);
+ $JournalDate=$myrow['trandate'];
+ DB_data_seek($result, 0);
+ include('includes/PDFGLJournalHeader.inc');
+}
+$counter=1;
+$YPos=$FormDesign->Data->y;
+while ($counter<=$LineCount) {
+ if ($JournalNo=='Preview') {
+ $AccountCode=str_pad('',10,'x');
+ $Date='1/1/1900';
+ $Description=str_pad('',30,'x');
+ $Narrative=str_pad('',30,'x');
+ $Amount='XXXX.XX';
+ $Tag=str_pad('',25,'x');
+ $JobRef=str_pad('',25,'x');
+ } else {
+ $myrow=DB_fetch_array($result);
+ if ($myrow['tag']==0) {
+ $myrow['tagdescription']='None';
+ }
+ $AccountCode = $myrow['account'];
+ $Description = $myrow['accountname'];
+ $Date = $myrow['trandate'];
+ $Narrative = $myrow['narrative'];
+ $Amount = $myrow['amount'];
+ $Tag = $myrow['tag'].' - '.$myrow['tagdescription'];
+ $JobRef = $myrow['jobref'];
+ }
+ $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column1->x,$Page_Height-$YPos,$FormDesign->Data->Column1->Length,$FormDesign->Data->Column1->FontSize, $AccountCode);
+ $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column2->x,$Page_Height-$YPos,$FormDesign->Data->Column2->Length,$FormDesign->Data->Column2->FontSize, $Description);
+ $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column3->x,$Page_Height-$YPos,$FormDesign->Data->Column3->Length,$FormDesign->Data->Column3->FontSize, $Narrative);
+ $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column4->x,$Page_Height-$YPos,$FormDesign->Data->Column4->Length,$FormDesign->Data->Column4->FontSize, locale_number_format($Amount,$_SESSION['CompanyRecord']['decimalplaces']), 'right');
+ $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column5->x,$Page_Height-$YPos,$FormDesign->Data->Column5->Length,$FormDesign->Data->Column5->FontSize, $Tag);
+ $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column6->x,$Page_Height-$YPos,$FormDesign->Data->Column6->Length,$FormDesign->Data->Column6->FontSize, $JobRef, 'left');
+ $YPos += $line_height;
+ $counter++;
+ if ($YPos >= $FormDesign->LineAboveFooter->starty){
+ /* We reached the end of the page so finsih off the page and start a newy */
+ $PageNumber++;
+ $YPos=$FormDesign->Data->y;
+ include ('includes/PDFGrnHeader.inc');
+ } //end if need a new page headed up
+}
+
+if ($LineCount == 0) { //UldisN
+ $title = _('Printing Error');
+ include('includes/header.inc');
+ prnMsg(_('There were no Journals to print'),'warn');
+ echo '<br /><a href="'.$rootpath.'/index.php">'. _('Back to the menu').'</a>';
+ include('includes/footer.inc');
+ exit;
+} else {
+ $pdf->OutputD($_SESSION['DatabaseName'] . '_Journal_' . date('Y-m-d').'.pdf');//UldisN
+ $pdf->__destruct(); //UldisN
+}
+?>
\ No newline at end of file
Added: trunk/companies/weberpdemo/FormDesigns/Journal.xml
===================================================================
--- trunk/companies/weberpdemo/FormDesigns/Journal.xml (rev 0)
+++ trunk/companies/weberpdemo/FormDesigns/Journal.xml 2012-07-20 09:37:59 UTC (rev 5521)
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<form name="Goods Received Note">
+ <PaperSize name="Paper size">A4_Landscape</PaperSize>
+ <LineHeight name="Line height">12</LineHeight>
+ <logo type="image" name="Logo" id="Logo">
+ <x>20</x>
+ <y>80</y>
+ <width>0</width>
+ <height>60</height>
+ </logo>
+ <CompanyName type="SimpleText" name="Company name" id="CompanyName">
+ <FontSize>10</FontSize>
+ <x>625</x>
+ <y>30</y>
+ </CompanyName>
+ <GRNNumber type="SimpleText" name="GRN Number" id="GRNNumber">
+ <FontSize>10</FontSize>
+ <x>625</x>
+ <y>48</y>
+ </GRNNumber>
+ <OrderNumber type="SimpleText" name="Order Number" id="OrderNumber">
+ <FontSize>10</FontSize>
+ <x>625</x>
+ <y>66</y>
+ </OrderNumber>
+ <PrintDate type="SimpleText" name="Date Printed" id="PrintDate">
+ <FontSize>10</FontSize>
+ <x>625</x>
+ <y>84</y>
+ </PrintDate>
+ <HeaderRectangle type="Rectangle" name="Header rectangle" id="HeaderRectangle">
+ <x>40</x>
+ <y>114</y>
+ <width>772</width>
+ <height>24</height>
+ </HeaderRectangle>
+ <Headings type="ElementArray" name="Column headings">
+ <Column1 type="SimpleText" name="Heading 1" id="Heading1">
+ <FontSize>10</FontSize>
+ <x>41</x>
+ <y>126</y>
+ </Column1>
+ <Column2 type="SimpleText" name="Heading 2" id="Heading2">
+ <FontSize>10</FontSize>
+ <x>116</x>
+ <y>126</y>
+ </Column2>
+ <Column3 type="SimpleText" name="Heading 3" id="Heading3">
+ <FontSize>10</FontSize>
+ <x>256</x>
+ <y>126</y>
+ </Column3>
+ <Column4 type="MultiLineText" name="Heading 4" id="Heading4">
+ <FontSize>10</FontSize>
+ <x>486</x>
+ <y>136</y>
+ <Length>100</Length>
+ </Column4>
+ <Column5 type="MultiLineText" name="Heading 5" id="Heading5">
+ <FontSize>10</FontSize>
+ <x>616</x>
+ <y>136</y>
+ <Length>100</Length>
+ </Column5>
+ </Headings>
+ <DataRectangle type="Rectangle" name="Data rectangle" id="DataRectangle">
+ <x>40</x>
+ <y>138</y>
+ <width>772</width>
+ <height>430</height>
+ </DataRectangle>
+ <LineAboveFooter type="Line" name="Line Above Footer" id="LineAboveFooter">
+ <startx>40</startx>
+ <starty>530</starty>
+ <endx>812</endx>
+ <endy>530</endy>
+ </LineAboveFooter>
+ <Column1 type="Line" name="Column 1" id="Column1">
+ <startx>114</startx>
+ <starty>114</starty>
+ <endx>114</endx>
+ <endy>530</endy>
+ </Column1>
+ <Column3 type="Line" name="Column 3" id="Column3">
+ <startx>254</startx>
+ <starty>114</starty>
+ <endx>254</endx>
+ <endy>530</endy>
+ </Column3>
+ <Column4 type="Line" name="Column 4" id="Column4">
+ <startx>489</startx>
+ <starty>114</starty>
+ <endx>489</endx>
+ <endy>530</endy>
+ </Column4>
+ <Column5 type="Line" name="Column 5" id="Column5">
+ <startx>616</startx>
+ <starty>114</starty>
+ <endx>616</endx>
+ <endy>530</endy>
+ </Column5>
+ <Data type="ElementArray" name="Column Data">
+ <y type="StartLine" name="Y co-ordinate of first data line" id="DataStartLine">156</y>
+ <Column1 type="DataText" name="Column 1" id="Data1">
+ <FontSize>10</FontSize>
+ <x>41</x>
+ <Length>94</Length>
+ </Column1>
+ <Column2 type="DataText" name="Column 2" id="Data2">
+ <FontSize>10</FontSize>
+ <x>116</x>
+ <Length>270</Length>
+ </Column2>
+ <Column3 type="DataText" name="Column 3" id="Data3">
+ <FontSize>10</FontSize>
+ <x>256</x>
+ <Length>85</Length>
+ </Column3>
+ <Column4 type="DataText" name="Column 5" id="Data5">
+ <FontSize>10</FontSize>
+ <x>568</x>
+ <Length>30</Length>
+ </Column4>
+ <Column5 type="DataText" name="Column 6" id="Data6">
+ <FontSize>10</FontSize>
+ <x>638</x>
+ <Length>60</Length>
+ </Column5>
+ <Column6 type="DataText" name="Column 7" id="Data7">
+ <FontSize>10</FontSize>
+ <x>700</x>
+ <Length>30</Length>
+ </Column6>
+ </Data>
+ <ReceiptDate type="SimpleText" name="Date Received" id="ReceiptDate">
+ <FontSize>10</FontSize>
+ <x>300</x>
+ <y>550</y>
+ </ReceiptDate>
+ <SignedFor type="SimpleText" name="Signed Fror" id="SignedFor">
+ <FontSize>10</FontSize>
+ <x>50</x>
+ <y>550</y>
+ </SignedFor>
+</form>
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2012-07-20 09:06:03 UTC (rev 5520)
+++ trunk/doc/Change.log 2012-07-20 09:37:59 UTC (rev 5521)
@@ -1,4 +1,5 @@
webERP Change Log
+20/7/2012 Tim: Added scripts to inquire on and to print General Ledger Journals
20/7/2012 Exson: Fixed that delete or editing new serial items will lead to hyper-link changed as select credit items instead of back to credit invoice in scripts InputSerialItemsKeyed.php. Report by UK-Steven from webERP Chinese Community QQ group
15/7/12 Gilberto Dos Santos Alves: updated pt_BR.utf8 translation
13/7/12 Tim: Fix up the sql where a field was selected twice
Modified: trunk/includes/MainMenuLinksArray.php
===================================================================
--- trunk/includes/MainMenuLinksArray.php 2012-07-20 09:06:03 UTC (rev 5520)
+++ trunk/includes/MainMenuLinksArray.php 2012-07-20 09:37:59 UTC (rev 5521)
@@ -348,6 +348,7 @@
_('Account Inquiry'),
_('Account Listing'),
_('Account Listing to CSV File'),
+ _('General Ledger Journal Inquiry'),
_('Bank Account Reconciliation Statement'),
_('Cheque Payments Listing'),
_('Daily Bank Transactions'),
@@ -361,6 +362,7 @@
'/SelectGLAccount.php',
'/GLAccountReport.php',
'/GLAccountCSV.php',
+ '/GLJournalInquiry.php',
'/BankReconciliation.php',
'/PDFChequeListing.php',
'/DailyBankTransactions.php',
Added: trunk/includes/PDFGLJournalHeader.inc
===================================================================
--- trunk/includes/PDFGLJournalHeader.inc (rev 0)
+++ trunk/includes/PDFGLJournalHeader.inc 2012-07-20 09:37:59 UTC (rev 5521)
@@ -0,0 +1,36 @@
+<?php
+/* $Id$*/
+/*PDF page header for price list report */
+if ($PageNumber>1){
+ $pdf->newPage();
+}
+
+$pdf->addJpegFromFile($_SESSION['LogoFile'] ,$FormDesign->logo->x,$Page_Height-$FormDesign->logo->y,$FormDesign->logo->width,$FormDesign->logo->height);
+
+$LeftOvers = $pdf->addText($FormDesign->CompanyName->x,$Page_Height-$FormDesign->CompanyName->y,$FormDesign->CompanyName->FontSize,$_SESSION['CompanyRecord']['coyname']);
+$LeftOvers = $pdf->addText($FormDesign->GRNNumber->x,$Page_Height-$FormDesign->GRNNumber->y,$FormDesign->GRNNumber->FontSize, _('Journal number ').' ' . $JournalNo );
+$LeftOvers = $pdf->addText($FormDesign->OrderNumber->x,$Page_Height-$FormDesign->OrderNumber->y,$FormDesign->OrderNumber->FontSize, _('Journal Date ').' ' . ConvertSQLDate($JournalDate) );
+$LeftOvers = $pdf->addText($FormDesign->PrintDate->x,$Page_Height-$FormDesign->PrintDate->y,$FormDesign->PrintDate->FontSize, _('Printed').': ' . Date($_SESSION['DefaultDateFormat']) . ' '. _('Page'). ' ' . $PageNumber);
+
+/*Draw a rectangle to put the headings in */
+$pdf->Rectangle($FormDesign->HeaderRectangle->x, $Page_Height - $FormDesign->HeaderRectangle->y, $FormDesign->HeaderRectangle->width,$FormDesign->HeaderRectangle->height);
+
+/*set up the headings */
+$LeftOvers = $pdf->addText($FormDesign->Headings->Column1->x,$Page_Height - $FormDesign->Headings->Column1->y, $FormDesign->Headings->Column1->FontSize, _('Account Code'));
+$LeftOvers = $pdf->addText($FormDesign->Headings->Column2->x,$Page_Height - $FormDesign->Headings->Column2->y, $FormDesign->Headings->Column2->FontSize, _('Account Description'));
+$LeftOvers = $pdf->addText($FormDesign->Headings->Column3->x,$Page_Height - $FormDesign->Headings->Column3->y, $FormDesign->Headings->Column3->FontSize, _('Narrative'));
+$LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column4->x,$Page_Height - $FormDesign->Headings->Column4->y, $FormDesign->Headings->Column4->Length, $FormDesign->Headings->Column4->FontSize, _('Amount'), 'right');
+$LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column5->x,$Page_Height - $FormDesign->Headings->Column5->y, $FormDesign->Headings->Column5->Length, $FormDesign->Headings->Column5->FontSize, _('Tag Details'), 'right');
+
+/*Draw a rectangle to put the data in */
+$pdf->Rectangle($FormDesign->DataRectangle->x, $Page_Height - $FormDesign->DataRectangle->y, $FormDesign->DataRectangle->width,$FormDesign->DataRectangle->height);
+
+$pdf->Line($FormDesign->LineAboveFooter->startx, $Page_Height - $FormDesign->LineAboveFooter->starty, $FormDesign->LineAboveFooter->endx,$Page_Height - $FormDesign->LineAboveFooter->endy);
+
+$pdf->Line($FormDesign->Column1->startx, $Page_Height - $FormDesign->Column1->starty, $FormDesign->Column1->endx,$Page_Height - $FormDesign->Column1->endy);
+$pdf->Line($FormDesign->Column3->startx, $Page_Height - $FormDesign->Column3->starty, $FormDesign->Column3->endx,$Page_Height - $FormDesign->Column3->endy);
+$pdf->Line($FormDesign->Column4->startx, $Page_Height - $FormDesign->Column4->starty, $FormDesign->Column4->endx,$Page_Height - $FormDesign->Column4->endy);
+$pdf->Line($FormDesign->Column5->startx, $Page_Height - $FormDesign->Column5->starty, $FormDesign->Column5->endx,$Page_Height - $FormDesign->Column5->endy);
+
+$PageNumber++;
+?>
\ No newline at end of file
Modified: trunk/index.php
===================================================================
--- trunk/index.php 2012-07-20 09:06:03 UTC (rev 5520)
+++ trunk/index.php 2012-07-20 09:37:59 UTC (rev 5521)
@@ -49,7 +49,7 @@
include('includes/footer.inc');
exit;
}
-
+echo 'x'.$PathPrefix.'x';
if (isset($_GET['Application'])){ /*This is sent by this page (to itself) when the user clicks on a tab */
$_SESSION['Module'] = $_GET['Application'];
}
Modified: trunk/sql/mysql/upgrade4.08-4.09.sql
===================================================================
--- trunk/sql/mysql/upgrade4.08-4.09.sql 2012-07-20 09:06:03 UTC (rev 5520)
+++ trunk/sql/mysql/upgrade4.08-4.09.sql 2012-07-20 09:37:59 UTC (rev 5521)
@@ -14,4 +14,7 @@
ALTER TABLE `loctransfers` CHANGE `shipdate` `shipdate` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00';
ALTER TABLE `loctransfers` CHANGE `recdate` `recdate` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00';
+INSERT INTO scripts VALUES ('GLJournalInquiry.php','15','General Ledger Journal Inquiry');
+INSERT INTO scripts VALUES ('PDFGLJournal.php','15','General Ledger Journal Print');
+
UPDATE config SET confvalue='4.08.2' 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.
|
|
From: <dai...@us...> - 2012-07-21 05:53:15
|
Revision: 5523
http://web-erp.svn.sourceforge.net/web-erp/?rev=5523&view=rev
Author: daintree
Date: 2012-07-21 05:53:07 +0000 (Sat, 21 Jul 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/css/aguapop/default.css
trunk/css/aguapop/images/body_bg.png
trunk/css/aguapop/images/top_bg.png
trunk/css/default/default.css
trunk/css/fresh/default.css
trunk/css/gel/default.css
trunk/css/jelly/default.css
trunk/css/professional/default.css
trunk/css/professional-rtl/default.css
trunk/css/silverwolf/default.css
trunk/doc/Change.log
trunk/includes/Z_POSDataCreation.php
trunk/includes/footer.inc
trunk/includes/header.inc
trunk/index.php
Modified: trunk/css/aguapop/default.css
===================================================================
--- trunk/css/aguapop/default.css 2012-07-21 03:41:52 UTC (rev 5522)
+++ trunk/css/aguapop/default.css 2012-07-21 05:53:07 UTC (rev 5523)
@@ -1,714 +1,692 @@
-/*--------------------------------------------------\
-| | | default.css |
-|---------------------------------------------------|
-| For use with: |
-| Web-ERP - http://web-erp.sourceforge.net |
-| by Logic Works Ltd |
-|---------------------------------------------------|
-| Developer: |
-| Shane Barnaby |
-| Steve Kaill |
-| Modified by: |
-| Fred Schuettler Sept.17, 2011 |
-|---------------------------------------------------|
-| Note: |
-| Changes can be made to this CSS that will be |
-| reflected throughout Web-ERP. |
-|
-\--------------------------------------------------*/
-
-/* $Id: default.css 4218 2010-12-22 14:34:48Z tim_schofield $*/
-
-body {
- background: url(images/top_bg.png) top left no-repeat silver;
- width: 960px;
- position: absolute;
- left: 0px;
- top: 0px;
- margin: 0px auto;
- padding: 36px 0px 0px 0px;/*fred: limiting the body will keep the elements from wandering on full page views and distorting the looks. It should still work on netbooks with 1024x600 resolution.*/
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 9px;
-
-
-}
-
-img {
- border: none;
-}
-
-/*links before selection */
-a {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 9px;
- font-weight: bold;
- text-decoration: none;
- color: black;
-}
-
-/*links on any screen when mouse is hovering over them */
-a:hover {
- color: seagreen;
- text-decoration: none;
-}
-
-table {
- background-color: steelblue;
- margin: 0 auto;
-}
-
-.dpTbl {
- border: solid navy 1px;
-}
-
-div.centre {
- background: lightsteelblue;
- max-width: 932px;
- margin: 0 auto;
- margin-bottom: 0px;
- padding: 6px 0px 6px 0px;
- text-align: center;
-}
-
-/*table detail items default format */
-td {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- text-align: left;
-}
-
-td.select {
- background-color: whitesmoke;
-}
-
-table.selection {
- background-color: whitesmoke;
- width: 90%;/*fred: this keeps the table from growing to full size*/
- outline: 1px solid;
- margin-bottom: 5px;
-}
-
-.dpTD {
- border: 0;
- width: 20px;
- background-color: whitesmoke;
- text-align: right;
- cursor: pointer;
-}
-
-.dpDayHighlight {
- border: 0;
- width: 20px;
- background-color: yellow;
- text-align: right;
- cursor: pointer;
-}
-
-.dpTDHover {
- border: 0;
- width: 20px;
- background-color: gainsboro;
- text-align: right;
- cursor: pointer;
-}
-
-td.number {
- text-align: right;
-}
-
-.EvenTableRows {
- background-color: gainsboro;
-}
-
-.OddTableRows {
- background-color: whitesmoke;
-}
-
-th {
- font-weight: normal;
- background-color: skyblue;
- color: white;
-}
-
-th.number {
- text-align: right;
- font-weight: normal;
- background-color: skyblue;
- color: white;
-}
-
-div.error {
- background-color: mistyrose;
- width: 98%;
- margin: 5px auto;
- color: red;
- border: 1px solid red;
-}
-
-div.warn {
- background-color: pink;
- width: 98%;
- margin: 5px auto;
- color: maroon;
- border: 1px solid maroon;
-}
-
-div.success {
- background-color: aquamarine;
- width: 98%;
- margin: 5px auto;
- color: green;
- border: 1px solid green;
-}
-
-div.info {
- background-color: lightskyblue;
- width: 98%;
- margin: 5px auto;
- color:navy;
- border: 1px solid navy;
-}
-
-input { /*specifies the input field text characteristics*/
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 9px;
- font-style: italic;
-}
-
-input.number{
- text-align: right;
-}
-
-input.image {
- border-width: 0px;
- background-color: transparent;
-}
-
-input:hover{
-}
-
-select {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 11px;
-}
-
-p.good {
- font-weight: bold;
- color: green;
-}
-
-p.bad {
- font-weight: bold;
- color:red;
-}
-
-#topMenu {
- width: 100%;
- color: black;
- background-color: whitesmoke;
- border: none;
- border-bottom: 1px solid gray;
-}
-
-#trim {
- background: gainsboro;
-}
-
-#page {
- width: 100%;
- color: black;
- font-size: 10px;
- white-space: nowrap;
- border: 0px;
-}
-
-#menuImg {
- vertical-align: top;
- text-align: center;
- margin: 0px;
- padding: 10px;
-}
-
-#mainMenu {
- width: 100%;
- color: white;
- background-color: whitesmoke;
- border: none;
- margin: 0px;
- padding: 0px;
-}
-
-.header {
- background-image: url("");
- background-repeat: no-repeat;
- background-attachment: fixed;
- border: none;
- margin: 0px;
- padding: 0px;
-}
-
-.login {
- background-color: white;
- border: none;
-}
-
-textarea {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 10px;
-}
-
-textarea:hover {
-}
-/* Table type is used for UI tables type 1 */
-.table1 {
- width:90%;
- background: whitesmoke;
- border: 1px solid darkslategray;
- margin: 0 auto;
-}
-
-input.address3 {
- text-transform: uppercase;
-}
-
-div.csv {
- background: silver;
- color: black;
- border: 1px solid black;
- padding-left: 3px;
- z-index: 1;
- width: 50%;
- float: none;
- visibility: visible;
- margin: 0 auto;
- position: static;
- font-family: Arial, Verdana, Helvetica, sans-serif;
- padding-top: 1px;
- padding-bottom: 1px;
- font-weight: normal;
- font-size: 10px;
- text-align: center;
-}
-
-.callout_main {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- background: url(images/body_bg.png)left silver;
- width: 960px;
- margin: 0 auto;
- padding: 0px;
-}
-
-.main_page {
- background: lightsteelblue;
- border: none;
- width: 932px;
- margin: 0 auto;
- padding: 0px;
- font-size: 10px;
-}
-
-/* Main page heading with quick menu within */
-.quick_menu {
- width: 100%;
- background: transparent;
- margin-top: -20px;
- border: 0px;
- padding: 0 0 0 6px;
-}
-
-#quick_menu{
-}
-
-/*The main page heading left part before quick menu */
-.quick_menu_left {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 9px;
- color: white;
- white-space: nowrap;
- border: 0px;
- margin: 0px;
- padding: 5px;
- padding-bottom: 1px;
- text-align: left;
- vertical-align: bottom;
-}
-
-/*the Select Customer / Item / Supplier Menu tabs */
-.quick_menu_tabs {
- background-color: transparent;
- white-space: nowrap;
- border: 0px;
- margin: 0px;
- padding-right: 4px;
- padding-bottom: 1px;
- vertical-align: bottom;
-}
-
-.quick_menu_tab{/*borders will work here*/
- background: url(images/tab_bg.png) top left no-repeat steelblue;
- white-space: nowrap;
- padding: 6px;
- padding-top: 4px;
- padding-bottom: 0px;
-}
-
-.quick_menu_tab a{
- color: white;
- font-size: 12px;
- text-decoration: none;
-}
-
-.quick_menu_left a{
- color: white;
-}
-
-.quick_menu_tab a:hover{
- color: lightsteelblue;
- text-decoration: none;
- font-weight: bold;
-}
-
-.quick_menu_left a:hover{
- color: lightsteelblue;
- text-decoration: none;
-}
-
-.quick_menu_tab:hover{
- color: red;
-}
-/*the Select Customer / Item / Supplier Menu tabs */
-.system_menu_tabs {
- background-color: white;
- white-space: nowrap;
- border: none;
- margin:0 6px 0 6px;
- padding: 0px;
- text-align: center;
-}
-
-.system_menu_tabs a {
- font-size: 10px;
- color: black;
-}
-
-.system_menu_tabs a:hover {
- font-size: 10px;
- color: black;
-}
-
-.main_area {
- width: 100%;
- background-color: white;
-}
-
-.main_menu {
- background-color: white;
- margin: 2px 0 0 6px;
- font-weight: normal;
- width: 110px;
-}
-
-.main_menu table {
- border-top: 0px;
- width: 100%;
- margin: 2px;
-}
-
-.main_menu_unselected {
- background-color: steelblue;
- padding: 2px;
- border-bottom: 2px;
- font-weight: normal;
- position: relative;
- top: 0px;
- text-align: left;
- white-space: nowrap;
-
-}
-
-.main_menu_unselected:hover{
-}
-.main_menu_selected:hover{
-}
-
-.main_menu_unselected a{
-}
-
-.main_menu_unselected a:hover{
-}
-
-.main_menu_selected {
- background: url(images/tab_bg.png)right no-repeat steelblue;
- padding: 3px;
- padding-right: 0px;
- font-weight: normal;
- position: relative;
- text-align: right;
- white-space: nowrap;
-}
-
-.main_menu_selected a{
-
-}
-
-.main_menu_selected a:hover{
-
-}
-
-span.main_menu_nolink {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 10px;
- font-weight: bold;
- color: gray;
- text-decoration: none;
- white-space: nowrap;
-}
-
-.main_menu a {
- color: white;
- font-weight: bold;
- font-size: 11px;
- text-decoration: none;
- white-space: nowrap;
-}
-
-.main_menu a:hover {
- color: lightsteelblue;
-}
-
-.menu_group_img {
- background-color: gainsboro;
- text-align: center;
- width: 90px;
- position: relative;
- left: 3px;
-}
-
-.menu_group_img img{
- position: relative;
- top: 10px;
-}
-
-.menu_group_area {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 11px;
- font-weight: bold;
- border-top: 0px;
- margin-top: 0px;
- padding-top: 0px; /*this creates the border*/
- color: seagreen;
-}
-
-.blank_area table {
- border: 0px;
- width: 100%;
-}
-
-.menu_group_headers {
- border: 2px outset lightsteelblue;
- width: 25%;
- margin-top: 0px;
-}
-
-.menu_group_headers table{
- }
-
-.menu_group_headers_text {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 12px;
- font-weight: bold;
- color: white;
-}
-
-.menu_group_items {
- vertical-align: top;
- background-color: white;
- font-weight: bold;
- padding: 15px;
- border: 1px inset steelblue;
-}
-
-.menu_group_item {
- background-color: white;
- padding-top: 2px;
- padding-bottom: 2px;
-}
-
-.menu_group_item p {
- color: steelblue; /* This is the color for bullets, I like it to be the same as the anchor color, but it's up to you */
- text-indent: -12px; /* this makes the bullet to appear as the li tag previously used */
- margin: 0 0 0 12px; /* One thing that I didn´t like of the li was that it had no left margin applied */
-}
-
-.page_title_text {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- width: 90%;
- margin: 0 auto;
- padding: 2px;
- font-weight: bold;
- font-size: 10px;
- color: black;
- text-align:center;
-}
-
-DIV.page_help_text {
- background: lightgrey url(images/help.png) top left no-repeat;
- border: maroon 1px solid;
- padding-top:2px;
- padding-bottom: 2px;
- padding-left: 10px;
- z-index: 1;
- width: 80%;
- float: none;
- visibility: visible;
- margin: 0 auto;
- position: static;
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-weight: normal;
- font-size: 10px;
- color: black;
- text-align:center;
-}
-
-DIV.system_check {
- border: 1px solid maroon;
- padding-left: 3px;
- z-index: 1;
- width: 40%;
- float: none;
- visibility: visible;
- margin: 0 auto;
- position: static;
- background: silver;
- font-family: Arial, Verdana, Helvetica, sans-serif;
- padding-top: 1px;
- padding-bottom: 1px;
- font-weight: normal;
- font-size: 10px;
- color: black;
- text-align:left;
-}
-
-span.menu_group_nolink {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 10px;
- font-weight: normal;
- color: gray;
- text-decoration: none;
-}
-
-.menu_group_item a {
- font-size: 11px;
- font-weight: normal;
-}
-
-.menu_group_items a:hover {
- color: navy;
- text-decoration: underline;
-}
-
-#footer {
- background: url(images/footer.png) bottom no-repeat;
- width: 960px;
- margin-left: 0px;
- padding-bottom: 13px;
-}
-
-a.footer {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- color: black;
- font-weight: normal;
- font-size: 8px;
-}
-
-.footer {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- color: gainsboro;
- font-weight: normal;
- font-size: 9px;
- text-align: center;
-}
-
-.legal {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 9px;
- color: dimgray;
-}
-
-.box1 {
- border-color: gainsboro dimgray dimgray gainsboro;
- border-width: medium;
- border-style: ridge;
-}
-
-.promo {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- color: red;
-}
-
-.titlebar {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 9px;
- color: white;
- background-color: silver;
-}
-
-.dingbat {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- background-color: darkseagreen;
- color: seagreen;
- font-weight: bolder;
- font-size: medium;
-}
-
-input.big {
- width: 100px;
-}
-
-input.small {
- width: 50px;
-}
-
-input.inputerror {
- background-color: mistyrose;
-}
-
-textarea.texterror {
- background-color: mistyrose;
-}
-
-select.selecterror {
- background-color: mistyrose;
-}
-
-.tableheader {
- font-weight: normal;
- background-color: skyblue;
- color: white;
-}
-
-.notavailable {
- font-weight: lighter;
- font-style: italic;
- color: gray;
-}
-
-.label {
- font-weight: bold;
- font-style: normal;
- font-size: 11px;
- color: black;
- background-color: gainsboro;
-}
-
-.OsRow {
- background-color: midnightblue;
- color: white;
-}
-
-.table_index {
- background-color: aliceblue;
-}
-
-li {
- list-style-image: url(bullet.gif);
-}
+/*** hj aquapop new ***/
+body {
+ background: silver;
+}
+#CanvasDiv {
+ background: none;
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-size: 9px;
+ margin-left: auto;
+ margin-right: auto;
+ width: 960px;
+}
+/*** HEADER ************************************************************/
+#HeaderDiv {
+ background: url(images/top_bg.png) top no-repeat silver;
+}
+.HeaderTbl {
+ padding-top:12px;
+ width:99%;
+}
+/*** BODY **************************************************************/
+#BodyDiv {
+ background:url("images/body_bg.png") repeat-y scroll center center silver;
+ text-align:center;
+}
+
+.BodyTbl {
+ background:none repeat scroll 0 0 steelblue;
+ width:932px;
+}
+/*** eof BodyDiv ***
+
+/*** FOOTER ************************************************************/
+#FooterDiv {
+ background: url(images/footer.png) bottom no-repeat silver;
+ padding-top: 10px;
+ padding-bottom: 18px;
+}
+
+.FooterTbl {
+ width:838px;
+}
+/************************************************************************/
+
+img {
+ border: none;
+ vertical-align:middle;
+}
+
+/*links before selection */
+a {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-size: 9px;
+ font-weight: bold;
+ text-decoration: none;
+ color: black;
+}
+
+/*links on any screen when mouse is hovering over them */
+a:hover {
+ color: seagreen;
+ text-decoration: none;
+}
+
+table {
+ background-color: none;
+ margin: 0 auto;
+ width:90%
+}
+
+.dpTbl {
+ border: solid navy 1px;
+}
+
+div.centre {
+ /*padding-bottom:10px;*/
+ text-align:center;
+}
+
+/*table detail items default format */
+td {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ text-align: left;
+}
+
+td.select {
+ background-color: whitesmoke;
+ padding:3px;
+}
+
+table.selection {
+ background:none repeat scroll 0 0 lightsteelblue;
+ border:2px outset steelblue;
+ padding:0;
+ width:90%;
+}
+
+.dpTD {
+ border: 0;
+ width: 20px;
+ background-color: whitesmoke;
+ text-align: right;
+ cursor: pointer;
+}
+
+.dpDayHighlight {
+ border: 0;
+ width: 20px;
+ background-color: yellow;
+ text-align: right;
+ cursor: pointer;
+}
+
+.dpTDHover {
+ border: 0;
+ width: 20px;
+ background-color: gainsboro;
+ text-align: right;
+ cursor: pointer;
+}
+
+td.number {
+ text-align: right;
+}
+
+.EvenTableRows {
+ background-color: gainsboro;
+}
+
+.OddTableRows {
+ background-color: whitesmoke;
+}
+
+th {
+ background-color:skyblue;
+ color:black;
+ font-weight:normal;
+ padding:3px;
+}
+
+th.number {
+ text-align: right;
+ font-weight: normal;
+ background-color: skyblue;
+ color: white;
+}
+
+div.error {
+ background-color: mistyrose;
+ width: 98%;
+ margin: 5px auto;
+ color: red;
+ border: 1px solid red;
+}
+
+div.warn {
+ background-color: pink;
+ width: 98%;
+ margin: 5px auto;
+ color: maroon;
+ border: 1px solid maroon;
+}
+
+div.success {
+ background-color: aquamarine;
+ width: 98%;
+ margin: 5px auto;
+ color: green;
+ border: 1px solid green;
+}
+
+div.info {
+ background-color: lightskyblue;
+ width: 98%;
+ margin: 5px auto;
+ color:navy;
+ border: 1px solid navy;
+}
+
+input { /*specifies the input field text characteristics*/
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-size: 9px;
+ font-style: italic;
+}
+
+input.number{
+ text-align: right;
+}
+
+input.image {
+ border-width: 0px;
+ background-color: transparent;
+}
+
+input:hover{
+}
+
+select {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-size: 11px;
+}
+
+p.good {
+ font-weight: bold;
+ color: green;
+}
+
+p.bad {
+ font-weight: bold;
+ color:red;
+}
+
+#topMenu {
+ width: 100%;
+ color: black;
+ background-color: whitesmoke;
+ border: none;
+ border-bottom: 1px solid gray;
+}
+
+#trim {
+ background: gainsboro;
+}
+
+#page {
+ width: 100%;
+ color: black;
+ font-size: 10px;
+ white-space: nowrap;
+ border: 0px;
+}
+
+#menuImg {
+ vertical-align: top;
+ text-align: center;
+ margin: 0px;
+ padding: 10px;
+}
+
+#mainMenu {
+ width: 100%;
+ color: white;
+ background-color: whitesmoke;
+ border: none;
+ margin: 0px;
+ padding: 0px;
+}
+
+.header {
+ background-image: url("");
+ background-repeat: no-repeat;
+ background-attachment: fixed;
+ border: none;
+ margin: 0px;
+ padding: 0px;
+}
+
+.login {
+ background-color: white;
+ border: none;
+}
+
+textarea {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-size: 10px;
+}
+
+textarea:hover {
+}
+/* Table type is used for UI tables type 1 */
+.table1 {
+ width:90%;
+ background: whitesmoke;
+ border: 1px solid darkslategray;
+ margin: 0 auto;
+}
+
+input.address3 {
+ text-transform: uppercase;
+}
+
+div.csv {
+ background: silver;
+ color: black;
+ border: 1px solid black;
+ padding-left: 3px;
+ z-index: 1;
+ width: 50%;
+ float: none;
+ visibility: visible;
+ margin: 0 auto;
+ position: static;
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ padding-top: 1px;
+ padding-bottom: 1px;
+ font-weight: normal;
+ font-size: 10px;
+ text-align: center;
+}
+
+.callout_main {
+}
+
+.main_page {
+ background: lightsteelblue;
+ border: none;
+ width: 932px;
+ margin: 0 auto;
+ padding: 0px;
+ font-size: 10px;
+}
+
+/* Main page heading with quick menu within */
+.quick_menu {
+ width:930px;
+}
+
+#quick_menu{
+}
+
+/*The main page heading left part before quick menu */
+.quick_menu_left {
+ color: white;
+ white-space: nowrap;
+}
+
+/*the Select Customer / Item / Supplier Menu tabs */
+.quick_menu_tabs {
+ white-space: nowrap;
+ vertical-align: bottom;
+}
+
+.quick_menu_tab{/*borders will work here*/
+ background: url(images/tab_bg.png) top left no-repeat steelblue;
+ white-space: nowrap;
+ padding: 6px;
+ padding-top: 4px;
+ padding-bottom: 0px;
+}
+
+.quick_menu_tab a{
+ color: white;
+ font-size: 12px;
+ text-decoration: none;
+}
+
+.quick_menu_left a{
+ color: white;
+}
+
+.quick_menu_tab a:hover{
+ color: lightsteelblue;
+ text-decoration: none;
+ font-weight: bold;
+}
+
+.quick_menu_left a:hover{
+ color: lightsteelblue;
+ text-decoration: none;
+}
+
+.quick_menu_tab:hover{
+ color: red;
+}
+/*the Select Customer / Item / Supplier Menu tabs */
+.system_menu_tabs {
+ background-color: white;
+ white-space: nowrap;
+ border: none;
+ margin:0 6px 0 6px;
+ padding: 0px;
+ text-align: center;
+}
+
+.system_menu_tabs a {
+ font-size: 10px;
+ color: black;
+}
+
+.system_menu_tabs a:hover {
+ font-size: 10px;
+ color: black;
+}
+
+.main_area {
+ width: 100%;
+ background-color: white;
+}
+
+.main_menu {
+ background-color: white;
+ margin: 2px 0 0 6px;
+ font-weight: normal;
+ width: 110px;
+}
+
+.main_menu table {
+ border-top: 0px;
+ width: 100%;
+ margin: 2px;
+}
+
+.main_menu_unselected {
+ background-color: steelblue;
+ padding: 2px;
+ border-bottom: 2px;
+ font-weight: normal;
+ position: relative;
+ top: 0px;
+ text-align: left;
+ white-space: nowrap;
+
+}
+
+.main_menu_unselected:hover{
+}
+.main_menu_selected:hover{
+}
+
+.main_menu_unselected a{
+}
+
+.main_menu_unselected a:hover{
+}
+
+.main_menu_selected {
+ background: url(images/tab_bg.png)right no-repeat steelblue;
+ padding: 3px;
+ padding-right: 0px;
+ font-weight: normal;
+ position: relative;
+ text-align: right;
+ white-space: nowrap;
+}
+
+.main_menu_selected a{
+
+}
+
+.main_menu_selected a:hover{
+
+}
+
+span.main_menu_nolink {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-size: 10px;
+ font-weight: bold;
+ color: gray;
+ text-decoration: none;
+ white-space: nowrap;
+}
+
+.main_menu a {
+ color: white;
+ font-weight: bold;
+ font-size: 11px;
+ text-decoration: none;
+ white-space: nowrap;
+}
+
+.main_menu a:hover {
+ color: lightsteelblue;
+}
+
+.menu_group_img {
+ background-color: gainsboro;
+ text-align: center;
+ width: 90px;
+ position: relative;
+ left: 3px;
+}
+
+.menu_group_img img{
+ position: relative;
+ top: 10px;
+}
+
+.menu_group_area {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-size: 11px;
+ font-weight: bold;
+ border-top: 0px;
+ margin-top: 0px;
+ padding-top: 0px; /*this creates the border*/
+ color: seagreen;
+}
+
+.blank_area table {
+ border: 0px;
+ width: 100%;
+}
+
+.menu_group_headers {
+ background:lightsteelblue;
+}
+
+.menu_group_headers table{
+ }
+
+.menu_group_headers_text {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-size: 12px;
+ font-weight: bold;
+ color: white;
+}
+
+.menu_group_items {
+ vertical-align: top;
+ background-color: white;
+ font-weight: bold;
+ padding: 15px;
+ border: 1px inset steelblue;
+}
+
+.menu_group_item {
+ background-color: white;
+ padding-top: 2px;
+ padding-bottom: 2px;
+}
+
+.menu_group_item p {
+ color: steelblue; /* This is the color for bullets, I like it to be the same as the anchor color, but it's up to you */
+ text-indent: -12px; /* this makes the bullet to appear as the li tag previously used */
+ margin: 0 0 0 12px;
+}
+
+.page_title_text {
+ font-weight:bold;
+ margin-top:0;
+ padding-bottom:5px;
+ padding-top:5px;
+}
+
+DIV.page_help_text {
+ background: lightgrey url(images/help.png) top left no-repeat;
+ border: maroon 1px solid;
+ padding-top:2px;
+ padding-bottom: 2px;
+ padding-left: 10px;
+ z-index: 1;
+ width: 80%;
+ float: none;
+ visibility: visible;
+ margin: 0 auto;
+ position: static;
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-weight: normal;
+ font-size: 10px;
+ color: black;
+ text-align:center;
+}
+
+DIV.system_check {
+ border: 1px solid maroon;
+ padding-left: 3px;
+ z-index: 1;
+ width: 40%;
+ float: none;
+ visibility: visible;
+ margin: 0 auto;
+ position: static;
+ background: silver;
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ padding-top: 1px;
+ padding-bottom: 1px;
+ font-weight: normal;
+ font-size: 10px;
+ color: black;
+ text-align:left;
+}
+
+span.menu_group_nolink {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-size: 10px;
+ font-weight: normal;
+ color: gray;
+ text-decoration: none;
+}
+
+.menu_group_item a {
+ font-size: 11px;
+ font-weight: normal;
+}
+
+.menu_group_items a:hover {
+ color: navy;
+ text-decoration: underline;
+}
+
+#footer {
+
+}
+
+a.footer {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ color: black;
+ font-weight: normal;
+ font-size: 8px;
+}
+
+.footer {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ color: gainsboro;
+ font-weight: normal;
+ font-size: 9px;
+ text-align: center;
+}
+
+.legal {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-size: 9px;
+ color: dimgray;
+}
+
+.box1 {
+ border-color: gainsboro dimgray dimgray gainsboro;
+ border-width: medium;
+ border-style: ridge;
+}
+
+.promo {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ color: red;
+}
+
+.titlebar {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-size: 9px;
+ color: white;
+ background-color: silver;
+}
+
+.dingbat {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ background-color: darkseagreen;
+ color: seagreen;
+ font-weight: bolder;
+ font-size: medium;
+}
+
+input.big {
+ width: 100px;
+}
+
+input.small {
+ width: 50px;
+}
+
+input.inputerror {
+ background-color: mistyrose;
+}
+
+textarea.texterror {
+ background-color: mistyrose;
+}
+
+select.selecterror {
+ background-color: mistyrose;
+}
+
+.tableheader {
+ font-weight: normal;
+ background-color: skyblue;
+ color: white;
+}
+
+.notavailable {
+ font-weight: lighter;
+ font-style: italic;
+ color: gray;
+}
+
+.label {
+ font-weight: bold;
+ font-style: normal;
+ font-size: 11px;
+ color: black;
+ background-color: gainsboro;
+}
+
+.OsRow {
+ background-color: midnightblue;
+ color: white;
+}
+
+.table_index {
+ background-color: aliceblue;
+}
+
+li {
+ list-style-image: url(bullet.gif);
+}
Modified: trunk/css/aguapop/images/body_bg.png
===================================================================
(Binary files differ)
Modified: trunk/css/aguapop/images/top_bg.png
===================================================================
(Binary files differ)
Modified: trunk/css/default/default.css
===================================================================
--- trunk/css/default/default.css 2012-07-21 03:41:52 UTC (rev 5522)
+++ trunk/css/default/default.css 2012-07-21 05:53:07 UTC (rev 5523)
@@ -41,6 +41,7 @@
table {
background-color: #587BA6;
margin: 0 auto;
+ width: 100%;
}
.dpTbl {
Modified: trunk/css/fresh/default.css
===================================================================
--- trunk/css/fresh/default.css 2012-07-21 03:41:52 UTC (rev 5522)
+++ trunk/css/fresh/default.css 2012-07-21 05:53:07 UTC (rev 5523)
@@ -49,6 +49,7 @@
table {
background-color: #ffffff;
margin: 0 auto;
+ width: 95%;
}
.dpTbl {
Modified: trunk/css/gel/default.css
===================================================================
--- trunk/css/gel/default.css 2012-07-21 03:41:52 UTC (rev 5522)
+++ trunk/css/gel/default.css 2012-07-21 05:53:07 UTC (rev 5523)
@@ -70,6 +70,7 @@
border: 0px 0px 2px 2px #222 solid;
background: #eee;
margin: 0 auto;
+ width: 95%;
}
.dpTbl {
Modified: trunk/css/jelly/default.css
===================================================================
--- trunk/css/jelly/default.css 2012-07-21 03:41:52 UTC (rev 5522)
+++ trunk/css/jelly/default.css 2012-07-21 05:53:07 UTC (rev 5523)
@@ -52,6 +52,7 @@
background: #eee;
border: 0px 0px 2px 2px #222 solid;
margin: 0 auto;
+ width: 95%;
}
.dpTbl {
Modified: trunk/css/professional/default.css
===================================================================
--- trunk/css/professional/default.css 2012-07-21 03:41:52 UTC (rev 5522)
+++ trunk/css/professional/default.css 2012-07-21 05:53:07 UTC (rev 5523)
@@ -49,6 +49,7 @@
table {
background-color: #EEEEFF;
margin: 0 auto;
+ width: 95%;
}
.dpTbl {
Modified: trunk/css/professional-rtl/default.css
===================================================================
--- trunk/css/professional-rtl/default.css 2012-07-21 03:41:52 UTC (rev 5522)
+++ trunk/css/professional-rtl/default.css 2012-07-21 05:53:07 UTC (rev 5523)
@@ -51,6 +51,7 @@
table {
background-color: #EEEEFF;
margin: 0 auto;
+ width: 95%;
}
.dpTbl {
Modified: trunk/css/silverwolf/default.css
===================================================================
--- trunk/css/silverwolf/default.css 2012-07-21 03:41:52 UTC (rev 5522)
+++ trunk/css/silverwolf/default.css 2012-07-21 05:53:07 UTC (rev 5523)
@@ -55,7 +55,7 @@
table {
background-color: #fff;
- margin: 0 auto;
+ width: 100%;
}
th {
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2012-07-21 03:41:52 UTC (rev 5522)
+++ trunk/doc/Change.log 2012-07-21 05:53:07 UTC (rev 5523)
@@ -1,4 +1,8 @@
webERP Change Log
+
+21/7/2012 Hindra: Fix Aguapop theme and table and div nesting of index.php header.inc and footer.inc - and other themes table style width: 95%;
+21/7/2012 Phil: Fix api function for POS prices includes/Z_POSDataCreation.php
+21/7/2012 Ricard: sorting products by discontinued then stockid to ensure obsolete items at the end of the list
20/7/2012 Tim: Added scripts to inquire on and to print General Ledger Journals
20/7/2012 Exson: Fixed that delete or editing new serial items will lead to hyper-link changed as select credit items instead of back to credit invoice in scripts InputSerialItemsKeyed.php. Report by UK-Steven from webERP Chinese Community QQ group
15/7/12 Gilberto Dos Santos Alves: updated pt_BR.utf8 translation
Modified: trunk/includes/Z_POSDataCreation.php
===================================================================
--- trunk/includes/Z_POSDataCreation.php 2012-07-21 03:41:52 UTC (rev 5522)
+++ trunk/includes/Z_POSDataCreation.php 2012-07-21 05:53:07 UTC (rev 5523)
@@ -1,7 +1,7 @@
<?php
function Create_POS_Data_Full ($POSDebtorNo, $POSBranchCode, $PathPrefix, $db) {
-
+
set_time_limit(1800);
ini_set('max_execution_time',1800);
@@ -21,12 +21,12 @@
}
$CurrCode = $CustomerRow['currcode'];
$SalesType = $CustomerRow['salestype'];
-
-
+
+
$FileHandle = fopen($PathPrefix . $ReportDir . '/POS.sql','w');
if ($FileHandle == false){
- return 'cant open file ' . $PathPrefix . $ReportDir . '/POS.sql';
+ return 'Cannot open file ' . $PathPrefix . $ReportDir . '/POS.sql';
}
fwrite($FileHandle,"DELETE FROM currencies;\n");
@@ -110,7 +110,6 @@
fwrite($FileHandle,"DELETE FROM taxauthrates;\n");
$result = DB_query("SELECT taxauthorit...
[truncated message content] |
|
From: <dai...@us...> - 2012-07-21 05:53:15
|
Revision: 5523
http://web-erp.svn.sourceforge.net/web-erp/?rev=5523&view=rev
Author: daintree
Date: 2012-07-21 05:53:07 +0000 (Sat, 21 Jul 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/css/aguapop/default.css
trunk/css/aguapop/images/body_bg.png
trunk/css/aguapop/images/top_bg.png
trunk/css/default/default.css
trunk/css/fresh/default.css
trunk/css/gel/default.css
trunk/css/jelly/default.css
trunk/css/professional/default.css
trunk/css/professional-rtl/default.css
trunk/css/silverwolf/default.css
trunk/doc/Change.log
trunk/includes/Z_POSDataCreation.php
trunk/includes/footer.inc
trunk/includes/header.inc
trunk/index.php
Modified: trunk/css/aguapop/default.css
===================================================================
--- trunk/css/aguapop/default.css 2012-07-21 03:41:52 UTC (rev 5522)
+++ trunk/css/aguapop/default.css 2012-07-21 05:53:07 UTC (rev 5523)
@@ -1,714 +1,692 @@
-/*--------------------------------------------------\
-| | | default.css |
-|---------------------------------------------------|
-| For use with: |
-| Web-ERP - http://web-erp.sourceforge.net |
-| by Logic Works Ltd |
-|---------------------------------------------------|
-| Developer: |
-| Shane Barnaby |
-| Steve Kaill |
-| Modified by: |
-| Fred Schuettler Sept.17, 2011 |
-|---------------------------------------------------|
-| Note: |
-| Changes can be made to this CSS that will be |
-| reflected throughout Web-ERP. |
-|
-\--------------------------------------------------*/
-
-/* $Id: default.css 4218 2010-12-22 14:34:48Z tim_schofield $*/
-
-body {
- background: url(images/top_bg.png) top left no-repeat silver;
- width: 960px;
- position: absolute;
- left: 0px;
- top: 0px;
- margin: 0px auto;
- padding: 36px 0px 0px 0px;/*fred: limiting the body will keep the elements from wandering on full page views and distorting the looks. It should still work on netbooks with 1024x600 resolution.*/
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 9px;
-
-
-}
-
-img {
- border: none;
-}
-
-/*links before selection */
-a {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 9px;
- font-weight: bold;
- text-decoration: none;
- color: black;
-}
-
-/*links on any screen when mouse is hovering over them */
-a:hover {
- color: seagreen;
- text-decoration: none;
-}
-
-table {
- background-color: steelblue;
- margin: 0 auto;
-}
-
-.dpTbl {
- border: solid navy 1px;
-}
-
-div.centre {
- background: lightsteelblue;
- max-width: 932px;
- margin: 0 auto;
- margin-bottom: 0px;
- padding: 6px 0px 6px 0px;
- text-align: center;
-}
-
-/*table detail items default format */
-td {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- text-align: left;
-}
-
-td.select {
- background-color: whitesmoke;
-}
-
-table.selection {
- background-color: whitesmoke;
- width: 90%;/*fred: this keeps the table from growing to full size*/
- outline: 1px solid;
- margin-bottom: 5px;
-}
-
-.dpTD {
- border: 0;
- width: 20px;
- background-color: whitesmoke;
- text-align: right;
- cursor: pointer;
-}
-
-.dpDayHighlight {
- border: 0;
- width: 20px;
- background-color: yellow;
- text-align: right;
- cursor: pointer;
-}
-
-.dpTDHover {
- border: 0;
- width: 20px;
- background-color: gainsboro;
- text-align: right;
- cursor: pointer;
-}
-
-td.number {
- text-align: right;
-}
-
-.EvenTableRows {
- background-color: gainsboro;
-}
-
-.OddTableRows {
- background-color: whitesmoke;
-}
-
-th {
- font-weight: normal;
- background-color: skyblue;
- color: white;
-}
-
-th.number {
- text-align: right;
- font-weight: normal;
- background-color: skyblue;
- color: white;
-}
-
-div.error {
- background-color: mistyrose;
- width: 98%;
- margin: 5px auto;
- color: red;
- border: 1px solid red;
-}
-
-div.warn {
- background-color: pink;
- width: 98%;
- margin: 5px auto;
- color: maroon;
- border: 1px solid maroon;
-}
-
-div.success {
- background-color: aquamarine;
- width: 98%;
- margin: 5px auto;
- color: green;
- border: 1px solid green;
-}
-
-div.info {
- background-color: lightskyblue;
- width: 98%;
- margin: 5px auto;
- color:navy;
- border: 1px solid navy;
-}
-
-input { /*specifies the input field text characteristics*/
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 9px;
- font-style: italic;
-}
-
-input.number{
- text-align: right;
-}
-
-input.image {
- border-width: 0px;
- background-color: transparent;
-}
-
-input:hover{
-}
-
-select {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 11px;
-}
-
-p.good {
- font-weight: bold;
- color: green;
-}
-
-p.bad {
- font-weight: bold;
- color:red;
-}
-
-#topMenu {
- width: 100%;
- color: black;
- background-color: whitesmoke;
- border: none;
- border-bottom: 1px solid gray;
-}
-
-#trim {
- background: gainsboro;
-}
-
-#page {
- width: 100%;
- color: black;
- font-size: 10px;
- white-space: nowrap;
- border: 0px;
-}
-
-#menuImg {
- vertical-align: top;
- text-align: center;
- margin: 0px;
- padding: 10px;
-}
-
-#mainMenu {
- width: 100%;
- color: white;
- background-color: whitesmoke;
- border: none;
- margin: 0px;
- padding: 0px;
-}
-
-.header {
- background-image: url("");
- background-repeat: no-repeat;
- background-attachment: fixed;
- border: none;
- margin: 0px;
- padding: 0px;
-}
-
-.login {
- background-color: white;
- border: none;
-}
-
-textarea {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 10px;
-}
-
-textarea:hover {
-}
-/* Table type is used for UI tables type 1 */
-.table1 {
- width:90%;
- background: whitesmoke;
- border: 1px solid darkslategray;
- margin: 0 auto;
-}
-
-input.address3 {
- text-transform: uppercase;
-}
-
-div.csv {
- background: silver;
- color: black;
- border: 1px solid black;
- padding-left: 3px;
- z-index: 1;
- width: 50%;
- float: none;
- visibility: visible;
- margin: 0 auto;
- position: static;
- font-family: Arial, Verdana, Helvetica, sans-serif;
- padding-top: 1px;
- padding-bottom: 1px;
- font-weight: normal;
- font-size: 10px;
- text-align: center;
-}
-
-.callout_main {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- background: url(images/body_bg.png)left silver;
- width: 960px;
- margin: 0 auto;
- padding: 0px;
-}
-
-.main_page {
- background: lightsteelblue;
- border: none;
- width: 932px;
- margin: 0 auto;
- padding: 0px;
- font-size: 10px;
-}
-
-/* Main page heading with quick menu within */
-.quick_menu {
- width: 100%;
- background: transparent;
- margin-top: -20px;
- border: 0px;
- padding: 0 0 0 6px;
-}
-
-#quick_menu{
-}
-
-/*The main page heading left part before quick menu */
-.quick_menu_left {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 9px;
- color: white;
- white-space: nowrap;
- border: 0px;
- margin: 0px;
- padding: 5px;
- padding-bottom: 1px;
- text-align: left;
- vertical-align: bottom;
-}
-
-/*the Select Customer / Item / Supplier Menu tabs */
-.quick_menu_tabs {
- background-color: transparent;
- white-space: nowrap;
- border: 0px;
- margin: 0px;
- padding-right: 4px;
- padding-bottom: 1px;
- vertical-align: bottom;
-}
-
-.quick_menu_tab{/*borders will work here*/
- background: url(images/tab_bg.png) top left no-repeat steelblue;
- white-space: nowrap;
- padding: 6px;
- padding-top: 4px;
- padding-bottom: 0px;
-}
-
-.quick_menu_tab a{
- color: white;
- font-size: 12px;
- text-decoration: none;
-}
-
-.quick_menu_left a{
- color: white;
-}
-
-.quick_menu_tab a:hover{
- color: lightsteelblue;
- text-decoration: none;
- font-weight: bold;
-}
-
-.quick_menu_left a:hover{
- color: lightsteelblue;
- text-decoration: none;
-}
-
-.quick_menu_tab:hover{
- color: red;
-}
-/*the Select Customer / Item / Supplier Menu tabs */
-.system_menu_tabs {
- background-color: white;
- white-space: nowrap;
- border: none;
- margin:0 6px 0 6px;
- padding: 0px;
- text-align: center;
-}
-
-.system_menu_tabs a {
- font-size: 10px;
- color: black;
-}
-
-.system_menu_tabs a:hover {
- font-size: 10px;
- color: black;
-}
-
-.main_area {
- width: 100%;
- background-color: white;
-}
-
-.main_menu {
- background-color: white;
- margin: 2px 0 0 6px;
- font-weight: normal;
- width: 110px;
-}
-
-.main_menu table {
- border-top: 0px;
- width: 100%;
- margin: 2px;
-}
-
-.main_menu_unselected {
- background-color: steelblue;
- padding: 2px;
- border-bottom: 2px;
- font-weight: normal;
- position: relative;
- top: 0px;
- text-align: left;
- white-space: nowrap;
-
-}
-
-.main_menu_unselected:hover{
-}
-.main_menu_selected:hover{
-}
-
-.main_menu_unselected a{
-}
-
-.main_menu_unselected a:hover{
-}
-
-.main_menu_selected {
- background: url(images/tab_bg.png)right no-repeat steelblue;
- padding: 3px;
- padding-right: 0px;
- font-weight: normal;
- position: relative;
- text-align: right;
- white-space: nowrap;
-}
-
-.main_menu_selected a{
-
-}
-
-.main_menu_selected a:hover{
-
-}
-
-span.main_menu_nolink {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 10px;
- font-weight: bold;
- color: gray;
- text-decoration: none;
- white-space: nowrap;
-}
-
-.main_menu a {
- color: white;
- font-weight: bold;
- font-size: 11px;
- text-decoration: none;
- white-space: nowrap;
-}
-
-.main_menu a:hover {
- color: lightsteelblue;
-}
-
-.menu_group_img {
- background-color: gainsboro;
- text-align: center;
- width: 90px;
- position: relative;
- left: 3px;
-}
-
-.menu_group_img img{
- position: relative;
- top: 10px;
-}
-
-.menu_group_area {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 11px;
- font-weight: bold;
- border-top: 0px;
- margin-top: 0px;
- padding-top: 0px; /*this creates the border*/
- color: seagreen;
-}
-
-.blank_area table {
- border: 0px;
- width: 100%;
-}
-
-.menu_group_headers {
- border: 2px outset lightsteelblue;
- width: 25%;
- margin-top: 0px;
-}
-
-.menu_group_headers table{
- }
-
-.menu_group_headers_text {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 12px;
- font-weight: bold;
- color: white;
-}
-
-.menu_group_items {
- vertical-align: top;
- background-color: white;
- font-weight: bold;
- padding: 15px;
- border: 1px inset steelblue;
-}
-
-.menu_group_item {
- background-color: white;
- padding-top: 2px;
- padding-bottom: 2px;
-}
-
-.menu_group_item p {
- color: steelblue; /* This is the color for bullets, I like it to be the same as the anchor color, but it's up to you */
- text-indent: -12px; /* this makes the bullet to appear as the li tag previously used */
- margin: 0 0 0 12px; /* One thing that I didn´t like of the li was that it had no left margin applied */
-}
-
-.page_title_text {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- width: 90%;
- margin: 0 auto;
- padding: 2px;
- font-weight: bold;
- font-size: 10px;
- color: black;
- text-align:center;
-}
-
-DIV.page_help_text {
- background: lightgrey url(images/help.png) top left no-repeat;
- border: maroon 1px solid;
- padding-top:2px;
- padding-bottom: 2px;
- padding-left: 10px;
- z-index: 1;
- width: 80%;
- float: none;
- visibility: visible;
- margin: 0 auto;
- position: static;
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-weight: normal;
- font-size: 10px;
- color: black;
- text-align:center;
-}
-
-DIV.system_check {
- border: 1px solid maroon;
- padding-left: 3px;
- z-index: 1;
- width: 40%;
- float: none;
- visibility: visible;
- margin: 0 auto;
- position: static;
- background: silver;
- font-family: Arial, Verdana, Helvetica, sans-serif;
- padding-top: 1px;
- padding-bottom: 1px;
- font-weight: normal;
- font-size: 10px;
- color: black;
- text-align:left;
-}
-
-span.menu_group_nolink {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 10px;
- font-weight: normal;
- color: gray;
- text-decoration: none;
-}
-
-.menu_group_item a {
- font-size: 11px;
- font-weight: normal;
-}
-
-.menu_group_items a:hover {
- color: navy;
- text-decoration: underline;
-}
-
-#footer {
- background: url(images/footer.png) bottom no-repeat;
- width: 960px;
- margin-left: 0px;
- padding-bottom: 13px;
-}
-
-a.footer {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- color: black;
- font-weight: normal;
- font-size: 8px;
-}
-
-.footer {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- color: gainsboro;
- font-weight: normal;
- font-size: 9px;
- text-align: center;
-}
-
-.legal {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 9px;
- color: dimgray;
-}
-
-.box1 {
- border-color: gainsboro dimgray dimgray gainsboro;
- border-width: medium;
- border-style: ridge;
-}
-
-.promo {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- color: red;
-}
-
-.titlebar {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 9px;
- color: white;
- background-color: silver;
-}
-
-.dingbat {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- background-color: darkseagreen;
- color: seagreen;
- font-weight: bolder;
- font-size: medium;
-}
-
-input.big {
- width: 100px;
-}
-
-input.small {
- width: 50px;
-}
-
-input.inputerror {
- background-color: mistyrose;
-}
-
-textarea.texterror {
- background-color: mistyrose;
-}
-
-select.selecterror {
- background-color: mistyrose;
-}
-
-.tableheader {
- font-weight: normal;
- background-color: skyblue;
- color: white;
-}
-
-.notavailable {
- font-weight: lighter;
- font-style: italic;
- color: gray;
-}
-
-.label {
- font-weight: bold;
- font-style: normal;
- font-size: 11px;
- color: black;
- background-color: gainsboro;
-}
-
-.OsRow {
- background-color: midnightblue;
- color: white;
-}
-
-.table_index {
- background-color: aliceblue;
-}
-
-li {
- list-style-image: url(bullet.gif);
-}
+/*** hj aquapop new ***/
+body {
+ background: silver;
+}
+#CanvasDiv {
+ background: none;
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-size: 9px;
+ margin-left: auto;
+ margin-right: auto;
+ width: 960px;
+}
+/*** HEADER ************************************************************/
+#HeaderDiv {
+ background: url(images/top_bg.png) top no-repeat silver;
+}
+.HeaderTbl {
+ padding-top:12px;
+ width:99%;
+}
+/*** BODY **************************************************************/
+#BodyDiv {
+ background:url("images/body_bg.png") repeat-y scroll center center silver;
+ text-align:center;
+}
+
+.BodyTbl {
+ background:none repeat scroll 0 0 steelblue;
+ width:932px;
+}
+/*** eof BodyDiv ***
+
+/*** FOOTER ************************************************************/
+#FooterDiv {
+ background: url(images/footer.png) bottom no-repeat silver;
+ padding-top: 10px;
+ padding-bottom: 18px;
+}
+
+.FooterTbl {
+ width:838px;
+}
+/************************************************************************/
+
+img {
+ border: none;
+ vertical-align:middle;
+}
+
+/*links before selection */
+a {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-size: 9px;
+ font-weight: bold;
+ text-decoration: none;
+ color: black;
+}
+
+/*links on any screen when mouse is hovering over them */
+a:hover {
+ color: seagreen;
+ text-decoration: none;
+}
+
+table {
+ background-color: none;
+ margin: 0 auto;
+ width:90%
+}
+
+.dpTbl {
+ border: solid navy 1px;
+}
+
+div.centre {
+ /*padding-bottom:10px;*/
+ text-align:center;
+}
+
+/*table detail items default format */
+td {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ text-align: left;
+}
+
+td.select {
+ background-color: whitesmoke;
+ padding:3px;
+}
+
+table.selection {
+ background:none repeat scroll 0 0 lightsteelblue;
+ border:2px outset steelblue;
+ padding:0;
+ width:90%;
+}
+
+.dpTD {
+ border: 0;
+ width: 20px;
+ background-color: whitesmoke;
+ text-align: right;
+ cursor: pointer;
+}
+
+.dpDayHighlight {
+ border: 0;
+ width: 20px;
+ background-color: yellow;
+ text-align: right;
+ cursor: pointer;
+}
+
+.dpTDHover {
+ border: 0;
+ width: 20px;
+ background-color: gainsboro;
+ text-align: right;
+ cursor: pointer;
+}
+
+td.number {
+ text-align: right;
+}
+
+.EvenTableRows {
+ background-color: gainsboro;
+}
+
+.OddTableRows {
+ background-color: whitesmoke;
+}
+
+th {
+ background-color:skyblue;
+ color:black;
+ font-weight:normal;
+ padding:3px;
+}
+
+th.number {
+ text-align: right;
+ font-weight: normal;
+ background-color: skyblue;
+ color: white;
+}
+
+div.error {
+ background-color: mistyrose;
+ width: 98%;
+ margin: 5px auto;
+ color: red;
+ border: 1px solid red;
+}
+
+div.warn {
+ background-color: pink;
+ width: 98%;
+ margin: 5px auto;
+ color: maroon;
+ border: 1px solid maroon;
+}
+
+div.success {
+ background-color: aquamarine;
+ width: 98%;
+ margin: 5px auto;
+ color: green;
+ border: 1px solid green;
+}
+
+div.info {
+ background-color: lightskyblue;
+ width: 98%;
+ margin: 5px auto;
+ color:navy;
+ border: 1px solid navy;
+}
+
+input { /*specifies the input field text characteristics*/
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-size: 9px;
+ font-style: italic;
+}
+
+input.number{
+ text-align: right;
+}
+
+input.image {
+ border-width: 0px;
+ background-color: transparent;
+}
+
+input:hover{
+}
+
+select {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-size: 11px;
+}
+
+p.good {
+ font-weight: bold;
+ color: green;
+}
+
+p.bad {
+ font-weight: bold;
+ color:red;
+}
+
+#topMenu {
+ width: 100%;
+ color: black;
+ background-color: whitesmoke;
+ border: none;
+ border-bottom: 1px solid gray;
+}
+
+#trim {
+ background: gainsboro;
+}
+
+#page {
+ width: 100%;
+ color: black;
+ font-size: 10px;
+ white-space: nowrap;
+ border: 0px;
+}
+
+#menuImg {
+ vertical-align: top;
+ text-align: center;
+ margin: 0px;
+ padding: 10px;
+}
+
+#mainMenu {
+ width: 100%;
+ color: white;
+ background-color: whitesmoke;
+ border: none;
+ margin: 0px;
+ padding: 0px;
+}
+
+.header {
+ background-image: url("");
+ background-repeat: no-repeat;
+ background-attachment: fixed;
+ border: none;
+ margin: 0px;
+ padding: 0px;
+}
+
+.login {
+ background-color: white;
+ border: none;
+}
+
+textarea {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-size: 10px;
+}
+
+textarea:hover {
+}
+/* Table type is used for UI tables type 1 */
+.table1 {
+ width:90%;
+ background: whitesmoke;
+ border: 1px solid darkslategray;
+ margin: 0 auto;
+}
+
+input.address3 {
+ text-transform: uppercase;
+}
+
+div.csv {
+ background: silver;
+ color: black;
+ border: 1px solid black;
+ padding-left: 3px;
+ z-index: 1;
+ width: 50%;
+ float: none;
+ visibility: visible;
+ margin: 0 auto;
+ position: static;
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ padding-top: 1px;
+ padding-bottom: 1px;
+ font-weight: normal;
+ font-size: 10px;
+ text-align: center;
+}
+
+.callout_main {
+}
+
+.main_page {
+ background: lightsteelblue;
+ border: none;
+ width: 932px;
+ margin: 0 auto;
+ padding: 0px;
+ font-size: 10px;
+}
+
+/* Main page heading with quick menu within */
+.quick_menu {
+ width:930px;
+}
+
+#quick_menu{
+}
+
+/*The main page heading left part before quick menu */
+.quick_menu_left {
+ color: white;
+ white-space: nowrap;
+}
+
+/*the Select Customer / Item / Supplier Menu tabs */
+.quick_menu_tabs {
+ white-space: nowrap;
+ vertical-align: bottom;
+}
+
+.quick_menu_tab{/*borders will work here*/
+ background: url(images/tab_bg.png) top left no-repeat steelblue;
+ white-space: nowrap;
+ padding: 6px;
+ padding-top: 4px;
+ padding-bottom: 0px;
+}
+
+.quick_menu_tab a{
+ color: white;
+ font-size: 12px;
+ text-decoration: none;
+}
+
+.quick_menu_left a{
+ color: white;
+}
+
+.quick_menu_tab a:hover{
+ color: lightsteelblue;
+ text-decoration: none;
+ font-weight: bold;
+}
+
+.quick_menu_left a:hover{
+ color: lightsteelblue;
+ text-decoration: none;
+}
+
+.quick_menu_tab:hover{
+ color: red;
+}
+/*the Select Customer / Item / Supplier Menu tabs */
+.system_menu_tabs {
+ background-color: white;
+ white-space: nowrap;
+ border: none;
+ margin:0 6px 0 6px;
+ padding: 0px;
+ text-align: center;
+}
+
+.system_menu_tabs a {
+ font-size: 10px;
+ color: black;
+}
+
+.system_menu_tabs a:hover {
+ font-size: 10px;
+ color: black;
+}
+
+.main_area {
+ width: 100%;
+ background-color: white;
+}
+
+.main_menu {
+ background-color: white;
+ margin: 2px 0 0 6px;
+ font-weight: normal;
+ width: 110px;
+}
+
+.main_menu table {
+ border-top: 0px;
+ width: 100%;
+ margin: 2px;
+}
+
+.main_menu_unselected {
+ background-color: steelblue;
+ padding: 2px;
+ border-bottom: 2px;
+ font-weight: normal;
+ position: relative;
+ top: 0px;
+ text-align: left;
+ white-space: nowrap;
+
+}
+
+.main_menu_unselected:hover{
+}
+.main_menu_selected:hover{
+}
+
+.main_menu_unselected a{
+}
+
+.main_menu_unselected a:hover{
+}
+
+.main_menu_selected {
+ background: url(images/tab_bg.png)right no-repeat steelblue;
+ padding: 3px;
+ padding-right: 0px;
+ font-weight: normal;
+ position: relative;
+ text-align: right;
+ white-space: nowrap;
+}
+
+.main_menu_selected a{
+
+}
+
+.main_menu_selected a:hover{
+
+}
+
+span.main_menu_nolink {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-size: 10px;
+ font-weight: bold;
+ color: gray;
+ text-decoration: none;
+ white-space: nowrap;
+}
+
+.main_menu a {
+ color: white;
+ font-weight: bold;
+ font-size: 11px;
+ text-decoration: none;
+ white-space: nowrap;
+}
+
+.main_menu a:hover {
+ color: lightsteelblue;
+}
+
+.menu_group_img {
+ background-color: gainsboro;
+ text-align: center;
+ width: 90px;
+ position: relative;
+ left: 3px;
+}
+
+.menu_group_img img{
+ position: relative;
+ top: 10px;
+}
+
+.menu_group_area {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-size: 11px;
+ font-weight: bold;
+ border-top: 0px;
+ margin-top: 0px;
+ padding-top: 0px; /*this creates the border*/
+ color: seagreen;
+}
+
+.blank_area table {
+ border: 0px;
+ width: 100%;
+}
+
+.menu_group_headers {
+ background:lightsteelblue;
+}
+
+.menu_group_headers table{
+ }
+
+.menu_group_headers_text {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-size: 12px;
+ font-weight: bold;
+ color: white;
+}
+
+.menu_group_items {
+ vertical-align: top;
+ background-color: white;
+ font-weight: bold;
+ padding: 15px;
+ border: 1px inset steelblue;
+}
+
+.menu_group_item {
+ background-color: white;
+ padding-top: 2px;
+ padding-bottom: 2px;
+}
+
+.menu_group_item p {
+ color: steelblue; /* This is the color for bullets, I like it to be the same as the anchor color, but it's up to you */
+ text-indent: -12px; /* this makes the bullet to appear as the li tag previously used */
+ margin: 0 0 0 12px;
+}
+
+.page_title_text {
+ font-weight:bold;
+ margin-top:0;
+ padding-bottom:5px;
+ padding-top:5px;
+}
+
+DIV.page_help_text {
+ background: lightgrey url(images/help.png) top left no-repeat;
+ border: maroon 1px solid;
+ padding-top:2px;
+ padding-bottom: 2px;
+ padding-left: 10px;
+ z-index: 1;
+ width: 80%;
+ float: none;
+ visibility: visible;
+ margin: 0 auto;
+ position: static;
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-weight: normal;
+ font-size: 10px;
+ color: black;
+ text-align:center;
+}
+
+DIV.system_check {
+ border: 1px solid maroon;
+ padding-left: 3px;
+ z-index: 1;
+ width: 40%;
+ float: none;
+ visibility: visible;
+ margin: 0 auto;
+ position: static;
+ background: silver;
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ padding-top: 1px;
+ padding-bottom: 1px;
+ font-weight: normal;
+ font-size: 10px;
+ color: black;
+ text-align:left;
+}
+
+span.menu_group_nolink {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-size: 10px;
+ font-weight: normal;
+ color: gray;
+ text-decoration: none;
+}
+
+.menu_group_item a {
+ font-size: 11px;
+ font-weight: normal;
+}
+
+.menu_group_items a:hover {
+ color: navy;
+ text-decoration: underline;
+}
+
+#footer {
+
+}
+
+a.footer {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ color: black;
+ font-weight: normal;
+ font-size: 8px;
+}
+
+.footer {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ color: gainsboro;
+ font-weight: normal;
+ font-size: 9px;
+ text-align: center;
+}
+
+.legal {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-size: 9px;
+ color: dimgray;
+}
+
+.box1 {
+ border-color: gainsboro dimgray dimgray gainsboro;
+ border-width: medium;
+ border-style: ridge;
+}
+
+.promo {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ color: red;
+}
+
+.titlebar {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-size: 9px;
+ color: white;
+ background-color: silver;
+}
+
+.dingbat {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ background-color: darkseagreen;
+ color: seagreen;
+ font-weight: bolder;
+ font-size: medium;
+}
+
+input.big {
+ width: 100px;
+}
+
+input.small {
+ width: 50px;
+}
+
+input.inputerror {
+ background-color: mistyrose;
+}
+
+textarea.texterror {
+ background-color: mistyrose;
+}
+
+select.selecterror {
+ background-color: mistyrose;
+}
+
+.tableheader {
+ font-weight: normal;
+ background-color: skyblue;
+ color: white;
+}
+
+.notavailable {
+ font-weight: lighter;
+ font-style: italic;
+ color: gray;
+}
+
+.label {
+ font-weight: bold;
+ font-style: normal;
+ font-size: 11px;
+ color: black;
+ background-color: gainsboro;
+}
+
+.OsRow {
+ background-color: midnightblue;
+ color: white;
+}
+
+.table_index {
+ background-color: aliceblue;
+}
+
+li {
+ list-style-image: url(bullet.gif);
+}
Modified: trunk/css/aguapop/images/body_bg.png
===================================================================
(Binary files differ)
Modified: trunk/css/aguapop/images/top_bg.png
===================================================================
(Binary files differ)
Modified: trunk/css/default/default.css
===================================================================
--- trunk/css/default/default.css 2012-07-21 03:41:52 UTC (rev 5522)
+++ trunk/css/default/default.css 2012-07-21 05:53:07 UTC (rev 5523)
@@ -41,6 +41,7 @@
table {
background-color: #587BA6;
margin: 0 auto;
+ width: 100%;
}
.dpTbl {
Modified: trunk/css/fresh/default.css
===================================================================
--- trunk/css/fresh/default.css 2012-07-21 03:41:52 UTC (rev 5522)
+++ trunk/css/fresh/default.css 2012-07-21 05:53:07 UTC (rev 5523)
@@ -49,6 +49,7 @@
table {
background-color: #ffffff;
margin: 0 auto;
+ width: 95%;
}
.dpTbl {
Modified: trunk/css/gel/default.css
===================================================================
--- trunk/css/gel/default.css 2012-07-21 03:41:52 UTC (rev 5522)
+++ trunk/css/gel/default.css 2012-07-21 05:53:07 UTC (rev 5523)
@@ -70,6 +70,7 @@
border: 0px 0px 2px 2px #222 solid;
background: #eee;
margin: 0 auto;
+ width: 95%;
}
.dpTbl {
Modified: trunk/css/jelly/default.css
===================================================================
--- trunk/css/jelly/default.css 2012-07-21 03:41:52 UTC (rev 5522)
+++ trunk/css/jelly/default.css 2012-07-21 05:53:07 UTC (rev 5523)
@@ -52,6 +52,7 @@
background: #eee;
border: 0px 0px 2px 2px #222 solid;
margin: 0 auto;
+ width: 95%;
}
.dpTbl {
Modified: trunk/css/professional/default.css
===================================================================
--- trunk/css/professional/default.css 2012-07-21 03:41:52 UTC (rev 5522)
+++ trunk/css/professional/default.css 2012-07-21 05:53:07 UTC (rev 5523)
@@ -49,6 +49,7 @@
table {
background-color: #EEEEFF;
margin: 0 auto;
+ width: 95%;
}
.dpTbl {
Modified: trunk/css/professional-rtl/default.css
===================================================================
--- trunk/css/professional-rtl/default.css 2012-07-21 03:41:52 UTC (rev 5522)
+++ trunk/css/professional-rtl/default.css 2012-07-21 05:53:07 UTC (rev 5523)
@@ -51,6 +51,7 @@
table {
background-color: #EEEEFF;
margin: 0 auto;
+ width: 95%;
}
.dpTbl {
Modified: trunk/css/silverwolf/default.css
===================================================================
--- trunk/css/silverwolf/default.css 2012-07-21 03:41:52 UTC (rev 5522)
+++ trunk/css/silverwolf/default.css 2012-07-21 05:53:07 UTC (rev 5523)
@@ -55,7 +55,7 @@
table {
background-color: #fff;
- margin: 0 auto;
+ width: 100%;
}
th {
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2012-07-21 03:41:52 UTC (rev 5522)
+++ trunk/doc/Change.log 2012-07-21 05:53:07 UTC (rev 5523)
@@ -1,4 +1,8 @@
webERP Change Log
+
+21/7/2012 Hindra: Fix Aguapop theme and table and div nesting of index.php header.inc and footer.inc - and other themes table style width: 95%;
+21/7/2012 Phil: Fix api function for POS prices includes/Z_POSDataCreation.php
+21/7/2012 Ricard: sorting products by discontinued then stockid to ensure obsolete items at the end of the list
20/7/2012 Tim: Added scripts to inquire on and to print General Ledger Journals
20/7/2012 Exson: Fixed that delete or editing new serial items will lead to hyper-link changed as select credit items instead of back to credit invoice in scripts InputSerialItemsKeyed.php. Report by UK-Steven from webERP Chinese Community QQ group
15/7/12 Gilberto Dos Santos Alves: updated pt_BR.utf8 translation
Modified: trunk/includes/Z_POSDataCreation.php
===================================================================
--- trunk/includes/Z_POSDataCreation.php 2012-07-21 03:41:52 UTC (rev 5522)
+++ trunk/includes/Z_POSDataCreation.php 2012-07-21 05:53:07 UTC (rev 5523)
@@ -1,7 +1,7 @@
<?php
function Create_POS_Data_Full ($POSDebtorNo, $POSBranchCode, $PathPrefix, $db) {
-
+
set_time_limit(1800);
ini_set('max_execution_time',1800);
@@ -21,12 +21,12 @@
}
$CurrCode = $CustomerRow['currcode'];
$SalesType = $CustomerRow['salestype'];
-
-
+
+
$FileHandle = fopen($PathPrefix . $ReportDir . '/POS.sql','w');
if ($FileHandle == false){
- return 'cant open file ' . $PathPrefix . $ReportDir . '/POS.sql';
+ return 'Cannot open file ' . $PathPrefix . $ReportDir . '/POS.sql';
}
fwrite($FileHandle,"DELETE FROM currencies;\n");
@@ -110,7 +110,6 @@
fwrite($FileHandle,"DELETE FROM taxauthrates;\n");
$result = DB_query("SELECT taxauthorit...
[truncated message content] |
|
From: <dai...@us...> - 2012-07-21 23:37:47
|
Revision: 5525
http://web-erp.svn.sourceforge.net/web-erp/?rev=5525&view=rev
Author: daintree
Date: 2012-07-21 23:37:38 +0000 (Sat, 21 Jul 2012)
Log Message:
-----------
make sure qty demand calculated without quotations
Modified Paths:
--------------
trunk/CounterSales.php
trunk/DeliveryDetails.php
trunk/InternalStockRequest.php
trunk/InventoryPlanning.php
trunk/InventoryPlanningPrefSupplier.php
trunk/MRP.php
trunk/MRPCreateDemands.php
trunk/SelectOrderItems.php
trunk/SelectProduct.php
trunk/StockCheck.php
trunk/StockLocStatus.php
trunk/StockStatus.php
trunk/doc/Change.log
Modified: trunk/CounterSales.php
===================================================================
--- trunk/CounterSales.php 2012-07-21 22:15:38 UTC (rev 5524)
+++ trunk/CounterSales.php 2012-07-21 23:37:38 UTC (rev 5525)
@@ -93,7 +93,7 @@
$_SESSION['Items'.$identifier]->Branch = $myrow['cashsalebranch'];
$_SESSION['Items'.$identifier]->DebtorNo = $myrow['cashsalecustomer'];
}
-
+
$_SESSION['Items'.$identifier]->LocationName = $myrow['locationname'];
$_SESSION['Items'.$identifier]->Location = $_SESSION['UserStockLocation'];
$_SESSION['Items'.$identifier]->DispatchTaxProvince = $myrow['taxprovinceid'];
@@ -109,14 +109,14 @@
currencies.decimalplaces
FROM debtorsmaster INNER JOIN holdreasons
ON debtorsmaster.holdreason=holdreasons.reasoncode
- INNER JOIN salestypes
+ INNER JOIN salestypes
ON debtorsmaster.salestype=salestypes.typeabbrev
- INNER JOIN paymentterms
- ON debtorsmaster.paymentterms=paymentterms.termsindicator
- INNER JOIN currencies
+ INNER JOIN paymentterms
+ ON debtorsmaster.paymentterms=paymentterms.termsindicator
+ INNER JOIN currencies
ON debtorsmaster.currcode=currencies.currabrev
WHERE debtorsmaster.debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "'";
-
+
$ErrMsg = _('The details of the customer selected') . ': ' . $_SESSION['Items'.$identifier]->DebtorNo . ' ' . _('cannot be retrieved because');
$DbgMsg = _('The SQL used to retrieve the customer details and failed was') . ':';
// echo $sql;
@@ -241,7 +241,7 @@
$SQL = "SELECT stockmaster.stockid,
stockmaster.description,
stockmaster.units,
- stockmaster.decimalplaces
+ stockmaster.decimalplaces
FROM stockmaster INNER JOIN stockcategory
ON stockmaster.categoryid=stockcategory.categoryid
WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D')
@@ -254,7 +254,7 @@
$SQL = "SELECT stockmaster.stockid,
stockmaster.description,
stockmaster.units,
- stockmaster.decimalplaces
+ stockmaster.decimalplaces
FROM stockmaster INNER JOIN stockcategory
ON stockmaster.categoryid=stockcategory.categoryid
WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D')
@@ -317,7 +317,7 @@
$SQL = "SELECT stockmaster.stockid,
stockmaster.description,
stockmaster.units,
- stockmaster.decimalplaces
+ stockmaster.decimalplaces
FROM stockmaster INNER JOIN stockcategory
ON stockmaster.categoryid=stockcategory.categoryid
WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D')
@@ -390,10 +390,10 @@
$Discount = 0;
$AlreadyWarnedAboutCredit = false;
$i=1;
- while ($i<=$_SESSION['QuickEntries']
- AND isset($_POST['part_' . $i])
+ while ($i<=$_SESSION['QuickEntries']
+ AND isset($_POST['part_' . $i])
AND $_POST['part_' . $i]!='') {
-
+
$QuickEntryCode = 'part_' . $i;
$QuickEntryQty = 'qty_' . $i;
$QuickEntryPOLine = 'poline_' . $i;
@@ -429,7 +429,7 @@
$NewItemDue = DateAdd (Date($_SESSION['DefaultDateFormat']),'d', $_SESSION['Items'.$identifier]->DeliveryDays);
}
/*Now figure out if the item is a kit set - the field MBFlag='K'*/
- $sql = "SELECT stockmaster.mbflag,
+ $sql = "SELECT stockmaster.mbflag,
stockmaster.controlled
FROM stockmaster
WHERE stockmaster.stockid='". $NewItem ."'";
@@ -488,22 +488,22 @@
foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine) {
if (isset($_POST['Quantity_' . $OrderLine->LineNumber])){
-
+
$Quantity = round(filter_number_format($_POST['Quantity_' . $OrderLine->LineNumber]),$OrderLine->DecimalPlaces);
if (ABS($OrderLine->Price - filter_number_format($_POST['Price_' . $OrderLine->LineNumber]))>0.01){
/*There is a new price being input for the line item */
-
+
$Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]);
$_POST['GPPercent_' . $OrderLine->LineNumber] = (($Price*(1-(filter_number_format($_POST['Discount_' . $OrderLine->LineNumber])/100))) - $OrderLine->StandardCost*$ExRate)/($Price *(1-filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100);
-
+
} elseif (ABS($OrderLine->GPPercent - filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]))>=0.01) {
/* A GP % has been input so need to do a recalculation of the price at this new GP Percentage */
-
-
+
+
prnMsg(_('Recalculated the price from the GP % entered - the GP % was') . ' ' . $OrderLine->GPPercent . ' the new GP % is ' . filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]),'info');
-
-
+
+
$Price = ($OrderLine->StandardCost*$ExRate)/(1 -((filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]) + filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100));
} else {
$Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]);
@@ -546,7 +546,7 @@
if (isset($_POST['Recalculate'])) {
foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine) {
$NewItem=$OrderLine->StockID;
- $sql = "SELECT stockmaster.mbflag,
+ $sql = "SELECT stockmaster.mbflag,
stockmaster.controlled
FROM stockmaster
WHERE stockmaster.stockid='". $OrderLine->StockID."'";
@@ -562,7 +562,7 @@
WHERE bom.parent='" . $OrderLine->StockID. "'
AND bom.effectiveto > '" . Date('Y-m-d') . "'
AND bom.effectiveafter < '" . Date('Y-m-d') . "'";
-
+
$ErrMsg = _('Could not retrieve kitset components from the database because');
$KitResult = DB_query($sql,$db,$ErrMsg);
@@ -591,7 +591,7 @@
* controlled items and ghost/phantom items cannot be selected because the SQL to show items to select doesn't show 'em
* */
$AlreadyWarnedAboutCredit = false;
-
+
$sql = "SELECT stockmaster.mbflag,
stockmaster.taxcatid
FROM stockmaster
@@ -612,7 +612,7 @@
WHERE bom.parent='" . $NewItem . "'
AND bom.effectiveto > '" . Date('Y-m-d') . "'
AND bom.effectiveafter < '" . Date('Y-m-d') . "'";
-
+
$ErrMsg = _('Could not retrieve kitset components from the database because');
$KitResult = DB_query($sql,$db,$ErrMsg);
@@ -642,7 +642,7 @@
/* get the item details from the database and hold them in the cart object make the quantity 1 by default then add it to the cart */
/*Now figure out if the item is a kit set - the field MBFlag='K'*/
$AlreadyWarnedAboutCredit = false;
-
+
foreach($NewItemArray as $NewItem => $NewItemQty) {
if($NewItemQty > 0) {
$sql = "SELECT stockmaster.mbflag
@@ -727,7 +727,7 @@
} /* end of discount matrix lookup code */
-if (count($_SESSION['Items'.$identifier]->LineItems)>0
+if (count($_SESSION['Items'.$identifier]->LineItems)>0
AND !isset($_POST['ProcessSale'])){ /*only show order lines if there are any */
/*
// *************************************************************************
@@ -1107,22 +1107,26 @@
$QOH = $QOHRow[0];
$SQL = "SELECT SUM(salesorderdetails.quantity - salesorderdetails.qtyinvoiced) AS qtydemand
- FROM salesorderdetails
- WHERE salesorderdetails.stkcode = '" . $StockItem->StockID . "'
- AND salesorderdetails.completed = 0";
+ FROM salesorderdetails INNER JOIN salesorders
+ ON salesorderfetails.orderno=salesorders.orderno
+ WHERE salesorderdetails.stkcode = '" . $StockItem->StockID . "'
+ AND salesorderdetails.completed = 0
+ AND salesorders.quotation = 0";
$DemandResult = DB_query($SQL,$db);
$DemandRow = DB_fetch_row($DemandResult);
$QuantityDemand = $DemandRow[0];
$SQL = "SELECT SUM((salesorderdetails.quantity-salesorderdetails.qtyinvoiced)*bom.quantity) AS dem
- FROM salesorderdetails,
- bom,
- stockmaster
- WHERE salesorderdetails.stkcode=bom.parent
- AND salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0
+ FROM salesorderdetails INNER JOIN salesorders
+ ON salesorderdetails.orderno=salesorders.orderno
+ INNER JOIN bom
+ ON salesorderdetails.stkcode=bom.parent
+ INNER JOIN stockmaster
+ stockmaster.stockid=bom.parent
+ WHERE salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0
AND bom.component='" . $StockItem->StockID . "'
- AND stockmaster.stockid=bom.parent
- AND salesorderdetails.completed=0";
+ AND salesorderdetails.completed=0
+ AND salesorders.quotation=0";
$AssemblyDemandResult = DB_query($SQL,$db);
$AssemblyDemandRow = DB_fetch_row($AssemblyDemandResult);
$QuantityAssemblyDemand = $AssemblyDemandRow[0];
@@ -1132,6 +1136,7 @@
ON purchorderdetails.orderno = purchorders.orderno
WHERE purchorderdetails.itemcode = '" . $StockItem->StockID . "'
AND purchorderdetails.completed = 0
+ AND purchorders.status<>'Cancelled'
AND purchorders.status<>'Rejected'
AND purchorders.status<>'Pending'
AND purchorders.status<>'Completed'";
@@ -1823,7 +1828,7 @@
$Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true);
}
}
-
+
EnsureGLEntriesBalance(10,$InvoiceNo,$db);
/*Also if GL is linked to debtors need to process the debit to bank and credit to debtors for the payment */
@@ -1868,9 +1873,9 @@
$ErrMsg = _('Cannot insert a GL transaction for the debtors account credit');
$result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true);
}//amount paid we not zero
-
+
EnsureGLEntriesBalance(12,$ReceiptNumber,$db);
-
+
} /*end of if Sales and GL integrated */
if ($_POST['AmountPaid']!=0){
if (!isset($ReceiptNumber)){
@@ -1879,7 +1884,7 @@
//Now need to add the receipt banktrans record
//First get the account currency that it has been banked into
$result = DB_query("SELECT rate FROM currencies
- INNER JOIN bankaccounts
+ INNER JOIN bankaccounts
ON currencies.currabrev=bankaccounts.currcode
WHERE bankaccounts.accountcode='" . $_POST['BankAccount'] . "'",$db);
$myrow = DB_fetch_row($result);
@@ -2056,22 +2061,21 @@
$ImageSource = _('No Image');
// Find the quantity in stock at location
$QohSql = "SELECT sum(quantity)
- FROM locstock
- WHERE stockid='" .$myrow['stockid'] . "' AND
- loccode = '" . $_SESSION['Items'.$identifier]->Location . "'";
+ FROM locstock
+ WHERE stockid='" .$myrow['stockid'] . "' AND
+ loccode = '" . $_SESSION['Items'.$identifier]->Location . "'";
$QohResult = DB_query($QohSql,$db);
$QohRow = DB_fetch_row($QohResult);
$QOH = $QohRow[0];
// Find the quantity on outstanding sales orders
$sql = "SELECT SUM(salesorderdetails.quantity-salesorderdetails.qtyinvoiced) AS dem
- FROM salesorderdetails,
- salesorders
- WHERE salesorders.orderno = salesorderdetails.orderno AND
- salesorders.fromstkloc='" . $_SESSION['Items'.$identifier]->Location . "' AND
- salesorderdetails.completed=0 AND
- salesorders.quotation=0 AND
- salesorderdetails.stkcode='" . $myrow['stockid'] . "'";
+ FROM salesorderdetails INNER JOIN salesorders
+ ON salesorders.orderno = salesorderdetails.orderno
+ WHERE salesorders.fromstkloc='" . $_SESSION['Items'.$identifier]->Location . "'
+ AND salesorderdetails.completed=0
+ AND salesorders.quotation=0
+ AND salesorderdetails.stkcode='" . $myrow['stockid'] . "'";
$ErrMsg = _('The demand for this product from') . ' ' . $_SESSION['Items'.$identifier]->Location . ' ' .
_('cannot be retrieved because');
@@ -2085,11 +2089,11 @@
}
// Find the quantity on purchase orders
$sql = "SELECT SUM(purchorderdetails.quantityord-purchorderdetails.quantityrecd) AS QOO
- FROM purchorderdetails INNER JOIN purchorders
- WHERE purchorderdetails.completed=0
- AND purchorders.status<>'Cancelled'
- AND purchorders.status<>'Rejected'
- AND purchorderdetails.itemcode='" . $myrow['stockid'] . "'";
+ FROM purchorderdetails INNER JOIN purchorders
+ WHERE purchorderdetails.completed=0
+ AND purchorders.status<>'Cancelled'
+ AND purchorders.status<>'Rejected'
+ AND purchorderdetails.itemcode='" . $myrow['stockid'] . "'";
$ErrMsg = _('The order details for this product cannot be retrieved because');
$PurchResult = DB_query($sql,$db,$ErrMsg);
@@ -2103,8 +2107,8 @@
// Find the quantity on works orders
$sql = "SELECT SUM(woitems.qtyreqd - woitems.qtyrecd) AS dedm
- FROM woitems
- WHERE stockid='" . $myrow['stockid'] ."'";
+ FROM woitems
+ WHERE stockid='" . $myrow['stockid'] ."'";
$ErrMsg = _('The order details for this product cannot be retrieved because');
$WoResult = DB_query($sql,$db,$ErrMsg);
$WoRow = DB_fetch_row($WoResult);
@@ -2124,7 +2128,7 @@
$OnOrder = $PurchQty + $WoQty;
$Available = $QOH - $DemandQty + $OnOrder;
-
+
printf('<td>%s</td>
<td>%s</td>
<td>%s</td>
@@ -2188,7 +2192,7 @@
echo '</select></td>
<td><b>' . _('Enter partial Description') . ':</b>
<input tabindex="2" type="text" name="Keywords" size="20" maxlength="25" value="';
- if (isset($_POST['Keywords'])) echo $_POST['Keywords'];
+ if (isset($_POST['Keywords'])) echo $_POST['Keywords'];
echo '" /></td>
<td align="right"><b> ' . _('OR') . ' </b><b>' . _('Enter extract of the Stock Code') . ':</b>
@@ -2271,11 +2275,12 @@
// Find the quantity on purchase orders
$sql = "SELECT SUM(purchorderdetails.quantityord-purchorderdetails.quantityrecd) AS QOO
- FROM purchorderdetails INNER JOIN purchorders
- WHERE purchorderdetails.completed=0
- AND purchorders.status <>'Cancelled'
- AND purchorders.status <>'Rejected'
- AND purchorderdetails.itemcode='" . $myrow['stockid'] . "'";
+ FROM purchorderdetails INNER JOIN purchorders
+ WHERE purchorderdetails.completed=0
+ AND purchorders.status <>'Cancelled'
+ AND purchorders.status <>'Rejected'
+ AND purchorders.status <>'Completed'
+ AND purchorderdetails.itemcode='" . $myrow['stockid'] . "'";
$ErrMsg = _('The order details for this product cannot be retrieved because');
$PurchResult = DB_query($sql,$db,$ErrMsg);
Modified: trunk/DeliveryDetails.php
===================================================================
--- trunk/DeliveryDetails.php 2012-07-21 22:15:38 UTC (rev 5524)
+++ trunk/DeliveryDetails.php 2012-07-21 23:37:38 UTC (rev 5525)
@@ -423,21 +423,23 @@
$QOH = $QOHRow[0];
$SQL = "SELECT SUM(salesorderdetails.quantity - salesorderdetails.qtyinvoiced) AS qtydemand
- FROM salesorderdetails
+ FROM salesorderdetails INNER JOIN salesorders
+ ON salesorderdetails.orderno=salesorders.orderno
WHERE salesorderdetails.stkcode = '" . $StockItem->StockID . "'
- AND salesorderdetails.completed = 0";
+ AND salesorderdetails.completed = 0
+ AND salesorders.quotation=0";
$DemandResult = DB_query($SQL,$db);
$DemandRow = DB_fetch_row($DemandResult);
$QuantityDemand = $DemandRow[0];
$SQL = "SELECT SUM((salesorderdetails.quantity-salesorderdetails.qtyinvoiced)*bom.quantity) AS dem
- FROM salesorderdetails,
- bom,
- stockmaster
- WHERE salesorderdetails.stkcode=bom.parent
- AND salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0
+ FROM salesorderdetails INNER JOIN salesorders
+ ON salesorderdetails.orderno=salesorders.orderno
+ INNER JOIN bom ON salesorderdetails.stkcode=bom.parent
+ INNER JOIN stockmaster ON stockmaster.stockid=bom.parent
+ WHERE salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0
AND bom.component='" . $StockItem->StockID . "'
- AND stockmaster.stockid=bom.parent
+ AND salesorders.quotation=0
AND stockmaster.mbflag='A'
AND salesorderdetails.completed=0";
$AssemblyDemandResult = DB_query($SQL,$db);
Modified: trunk/InternalStockRequest.php
===================================================================
--- trunk/InternalStockRequest.php 2012-07-21 22:15:38 UTC (rev 5524)
+++ trunk/InternalStockRequest.php 2012-07-21 23:37:38 UTC (rev 5525)
@@ -296,7 +296,7 @@
echo '<table class="selection">
<tr>
<td>' . _('In Stock Category') . ':<select name="StockCat">';
-
+
if (!isset($_POST['StockCat'])) {
$_POST['StockCat'] = '';
}
@@ -636,13 +636,12 @@
// Find the quantity on outstanding sales orders
$sql = "SELECT SUM(salesorderdetails.quantity-salesorderdetails.qtyinvoiced) AS dem
- FROM salesorderdetails,
- salesorders
- WHERE salesorders.orderno = salesorderdetails.orderno AND
- salesorders.fromstkloc='" . $_SESSION['Request']->Location . "' AND
- salesorderdetails.completed=0 AND
- salesorders.quotation=0 AND
- salesorderdetails.stkcode='" . $myrow['stockid'] . "'";
+ FROM salesorderdetails INNER JOIN salesorders
+ ON salesorders.orderno = salesorderdetails.orderno
+ WHERE salesorders.fromstkloc='" . $_SESSION['Request']->Location . "'
+ AND salesorderdetails.completed=0
+ AND salesorders.quotation=0
+ AND salesorderdetails.stkcode='" . $myrow['stockid'] . "'";
$ErrMsg = _('The demand for this product from') . ' ' . $_SESSION['Request']->Location . ' ' . _('cannot be retrieved because');
$DemandResult = DB_query($sql,$db,$ErrMsg);
@@ -655,12 +654,13 @@
// Find the quantity on purchase orders
$sql = "SELECT SUM(purchorderdetails.quantityord-purchorderdetails.quantityrecd)*purchorderdetails.conversionfactor AS dem
- FROM purchorderdetails LEFT JOIN purchorders
- ON purchorderdetails.orderno=purchorders.orderno
- WHERE purchorderdetails.completed=0
- AND purchorders.status<>'Cancelled'
- AND purchorders.status<>'Rejected'
- AND purchorderdetails.itemcode='" . $myrow['stockid'] . "'";
+ FROM purchorderdetails LEFT JOIN purchorders
+ ON purchorderdetails.orderno=purchorders.orderno
+ WHERE purchorderdetails.completed=0
+ AND purchorders.status<>'Cancelled'
+ AND purchorders.status<>'Rejected'
+ AND purchorders.status<>'Completed'
+ AND purchorderdetails.itemcode='" . $myrow['stockid'] . "'";
$ErrMsg = _('The order details for this product cannot be retrieved because');
$PurchResult = DB_query($sql,$db,$ErrMsg);
Modified: trunk/InventoryPlanning.php
===================================================================
--- trunk/InventoryPlanning.php 2012-07-21 22:15:38 UTC (rev 5524)
+++ trunk/InventoryPlanning.php 2012-07-21 23:37:38 UTC (rev 5525)
@@ -275,7 +275,8 @@
AND purchorderdetails.completed = 0
AND purchorders.status <> 'Cancelled'
AND purchorders.status <> 'Rejected'
- AND purchorders.status <> 'Pending'";
+ AND purchorders.status <> 'Pending'
+ AND purchorders.status <> 'Completed'";
} else {
$SQL = "SELECT SUM(purchorderdetails.quantityord - purchorderdetails.quantityrecd) as qtyonorder
FROM purchorderdetails INNER JOIN purchorders
@@ -285,7 +286,8 @@
AND purchorders.intostocklocation= '" . $_POST['Location'] . "'
AND purchorders.status <> 'Cancelled'
AND purchorders.status <> 'Rejected'
- AND purchorders.status <> 'Pending'";
+ AND purchorders.status <> 'Pending'
+ AND purchorders.status <> 'Completed'";
}
$DemandRow = DB_fetch_array($DemandResult);
Modified: trunk/InventoryPlanningPrefSupplier.php
===================================================================
--- trunk/InventoryPlanningPrefSupplier.php 2012-07-21 22:15:38 UTC (rev 5524)
+++ trunk/InventoryPlanningPrefSupplier.php 2012-07-21 23:37:38 UTC (rev 5525)
@@ -368,7 +368,8 @@
AND purchorderdetails.completed = 0
AND purchorders.status <> 'Cancelled'
AND purchorders.status <> 'Rejected'
- AND purchorders.status <> 'Pending'";
+ AND purchorders.status <> 'Pending'
+ AND purchorders.status <> 'Completed'";
} else {
$SQL = "SELECT SUM(purchorderdetails.quantityord - purchorderdetails.quantityrecd) as qtyonorder
FROM purchorderdetails
@@ -382,7 +383,8 @@
AND purchorders.intostocklocation= '" . $_POST['Location'] . "'
AND purchorders.status <> 'Cancelled'
AND purchorders.status <> 'Rejected'
- AND purchorders.status <> 'Pending'";
+ AND purchorders.status <> 'Pending'
+ AND purchorders.status <> 'Completed'";
}
$DemandRow = DB_fetch_array($DemandResult);
Modified: trunk/MRP.php
===================================================================
--- trunk/MRP.php 2012-07-21 22:15:38 UTC (rev 5524)
+++ trunk/MRP.php 2012-07-21 23:37:38 UTC (rev 5525)
@@ -45,7 +45,7 @@
$sql = "INSERT INTO passbom (part, sortpart)
SELECT bom.component AS part,
CONCAT(bom.parent,'%',bom.component) AS sortpart
- FROM bom LEFT JOIN bom as bom2
+ FROM bom LEFT JOIN bom as bom2
ON bom.parent = bom2.component
WHERE bom2.component IS NULL";
$result = DB_query($sql,$db);
@@ -247,9 +247,9 @@
stkcode
FROM salesorders, salesorderdetails
WHERE salesorders.orderno = salesorderdetails.orderno
- AND (quantity - qtyinvoiced) > 0
- AND salesorderdetails.completed = 0
- AND salesorders.quotation = 0";
+ AND (quantity - qtyinvoiced) > 0
+ AND salesorderdetails.completed = 0
+ AND salesorders.quotation = 0";
$result = DB_query($sql,$db);
prnMsg(_('Loading requirements from work orders'),'info');
@@ -435,7 +435,7 @@
prnMsg(_('Creating planned orders table'),'info');
flush();
$result = DB_query("DROP TABLE IF EXISTS mrpplannedorders",$db);
- $sql = "CREATE TABLE mrpplannedorders (id int(11) NOT NULL auto_increment,
+ $sql = "CREATE TABLE mrpplannedorders (id int(11) NOT NULL auto_increment,
part char(20),
duedate date,
supplyquantity double,
@@ -754,8 +754,8 @@
// Calculate required date by subtracting leadtime from top part's required date
$PartRequiredDate=$Requirement['daterequired'];
- if ((int)$LeadTime>0) {
-
+ if ((int)$LeadTime>0) {
+
$CalendarSQL = "SELECT COUNT(*),cal2.calendardate
FROM mrpcalendar
LEFT JOIN mrpcalendar as cal2
Modified: trunk/MRPCreateDemands.php
===================================================================
--- trunk/MRPCreateDemands.php 2012-07-21 22:15:38 UTC (rev 5524)
+++ trunk/MRPCreateDemands.php 2012-07-21 23:37:38 UTC (rev 5525)
@@ -8,9 +8,9 @@
if (isset($_POST['submit'])) {
// Create mrpdemands based on sales order history
-
+
$InputError=0;
-
+
if (isset($_POST['FromDate']) AND !Is_Date($_POST['FromDate'])){
$msg = _('The date from must be specified in the format') . ' ' . $_SESSION['DefaultDateFormat'];
$InputError=1;
@@ -41,11 +41,11 @@
$msg = _('The multiplier is expected to be a positive number');
$InputError=1;
}
-
+
if ($InputError==1){
prnMsg($msg,'error');
}
-
+
$WhereCategory = " ";
if ($_POST['CategoryID']!='All') {
$WhereCategory = " AND stockmaster.categoryid ='" . $_POST['CategoryID'] . "' ";
@@ -54,21 +54,21 @@
if ($_POST['Location']!='All') {
$WhereLocation = " AND salesorders.fromstkloc ='" . $_POST['Location'] . "' ";
}
-
+
$sql= "SELECT salesorderdetails.stkcode,
- SUM(salesorderdetails.quantity) AS totqty,
- SUM(salesorderdetails.qtyinvoiced) AS totqtyinvoiced,
- SUM(salesorderdetails.quantity * salesorderdetails.unitprice ) AS totextqty
- FROM salesorders
- INNER JOIN salesorderdetails
- ON salesorders.orderno = salesorderdetails.orderno
- INNER JOIN stockmaster
- ON salesorderdetails.stkcode = stockmaster.stockid
- WHERE orddate >='" . FormatDateForSQL($_POST['FromDate']) ."'
- AND orddate <='" . FormatDateForSQL($_POST['ToDate']) . "'
- " . $WhereLocation . "
- " . $WhereCategory . "
- GROUP BY salesorderdetails.stkcode";
+ SUM(salesorderdetails.quantity) AS totqty,
+ SUM(salesorderdetails.qtyinvoiced) AS totqtyinvoiced,
+ SUM(salesorderdetails.quantity * salesorderdetails.unitprice ) AS totextqty
+ FROM salesorders INNER JOIN salesorderdetails
+ ON salesorders.orderno = salesorderdetails.orderno
+ INNER JOIN stockmaster
+ ON salesorderdetails.stkcode = stockmaster.stockid
+ WHERE orddate >='" . FormatDateForSQL($_POST['FromDate']) ."'
+ AND orddate <='" . FormatDateForSQL($_POST['ToDate']) . "'
+ " . $WhereLocation . "
+ " . $WhereCategory . "
+ AND salesorders.quotation=0
+ GROUP BY salesorderdetails.stkcode";
//echo "<br />$sql<br />";
$result = DB_query($sql,$db);
// To get the quantity per period, get the whole number amount of the total quantity divided
@@ -76,25 +76,25 @@
// number quantity into each entry of the periodqty array, and add 1 to the periodqty array
// until the remainder number is used up. Then create an mrpdemands records for everything
// in the array
-
+
if (filter_number_format($_POST['Multiplier']) < 1) {
$Multiplier = 1;
} else {
$Multiplier = filter_number_format($_POST['Multiplier']);
}
-
+
if ($_POST['ExcludeQuantity'] < 1) {
$ExcludeQty = 1;
} else {
$ExcludeQty = filter_number_format($_POST['ExcludeQuantity']);
}
-
+
if ($_POST['ExcludeAmount'] < 1) {
$ExcludeAmount = 0;
} else {
$ExcludeAmount = filter_number_format($_POST['ExcludeAmount']);
}
-
+
// Create array of dates based on DistDate and adding either weeks or months
$FormatedDistdate = FormatDateForSQL($_POST['DistDate']);
if (mb_strpos($FormatedDistdate,"/")) {
@@ -104,7 +104,7 @@
} else if (mb_strpos($FormatedDistdate,".")) {
list($yyyy,$mm,$dd) = explode(".",$FormatedDistdate);
}
-
+
$datearray[0] = $FormatedDistdate;
// Set first date to valid manufacturing date
$calendarsql = "SELECT COUNT(*),cal2.calendardate
@@ -120,7 +120,7 @@
if ($myrowdate[0] != 0){
$datearray[0] = $myrowdate[1];
}
-
+
$date = date('Y-m-d',mktime(0,0,0,$mm,$dd,$yyyy));
for ($i = 1; $i <= ( $_POST['PeriodNumber'] - 1); $i++) {
if ($_POST['Period'] == 'weekly') {
@@ -148,7 +148,7 @@
}
$date = date('Y-m-d',$date);
}
-
+
$TotalRecords = 0;
while ($myrow = DB_fetch_array($result)) {
if (($myrow['totqty'] >= $ExcludeQty) AND ($myrow['totextqty'] >= $ExcludeAmount)) {
@@ -167,7 +167,7 @@
$PeriodQty[$i] += 1;
}
}
-
+
$i = 0;
foreach ($PeriodQty as $demandqty) {
$sql = "INSERT INTO mrpdemands (stockid,
@@ -181,12 +181,12 @@
$insertresult = DB_query($sql,$db);
$i++;
$TotalRecords++;
-
+
} // end of foreach for INSERT
} // end of if that checks exludeqty, ExcludeAmount
-
+
} //end while loop
-
+
prnMsg( $TotalRecords . ' ' . _('records have been created'),'success');
} // end if submit has been pressed
Modified: trunk/SelectOrderItems.php
===================================================================
--- trunk/SelectOrderItems.php 2012-07-21 22:15:38 UTC (rev 5524)
+++ trunk/SelectOrderItems.php 2012-07-21 23:37:38 UTC (rev 5525)
@@ -211,12 +211,12 @@
stockmaster.decimalplaces,
stockmaster.materialcost+stockmaster.labourcost+stockmaster.overheadcost AS standardcost,
salesorderdetails.completed
- FROM salesorderdetails INNER JOIN stockmaster
- ON salesorderdetails.stkcode = stockmaster.stockid
- INNER JOIN locstock ON locstock.stockid = stockmaster.stockid
- WHERE locstock.loccode = '" . $myrow['fromstkloc'] . "'
- AND salesorderdetails.orderno ='" . $_GET['ModifyOrderNumber'] . "'
- ORDER BY salesorderdetails.orderlineno";
+ FROM salesorderdetails INNER JOIN stockmaster
+ ON salesorderdetails.stkcode = stockmaster.stockid
+ INNER JOIN locstock ON locstock.stockid = stockmaster.stockid
+ WHERE locstock.loccode = '" . $myrow['fromstkloc'] . "'
+ AND salesorderdetails.orderno ='" . $_GET['ModifyOrderNumber'] . "'
+ ORDER BY salesorderdetails.orderlineno";
$ErrMsg = _('The line items of the order cannot be retrieved because');
$LineItemsResult = DB_query($LineItemsSQL,$db,$ErrMsg);
@@ -671,9 +671,9 @@
if($_SESSION['ExistingOrder' . $identifier]!=0) { //need to check that not already dispatched
$sql = "SELECT qtyinvoiced
- FROM salesorderdetails
- WHERE orderno='" . $_SESSION['ExistingOrder' . $identifier] . "'
- AND qtyinvoiced>0";
+ FROM salesorderdetails
+ WHERE orderno='" . $_SESSION['ExistingOrder' . $identifier] . "'
+ AND qtyinvoiced>0";
$InvQties = DB_query($sql,$db);
@@ -1528,8 +1528,8 @@
$ImageSource = _('No Image');
// Find the quantity in stock at location
$QOHSQL = "SELECT sum(locstock.quantity) AS qoh
- FROM locstock
- WHERE stockid='" .$myrow['stockid'] . "'
+ FROM locstock
+ WHERE stockid='" .$myrow['stockid'] . "'
AND loccode = '" . $_SESSION['Items'.$identifier]->Location . "'";
$QOHResult = DB_query($QOHSQL,$db);
$QOHRow = DB_fetch_array($QOHResult);
@@ -1560,6 +1560,7 @@
WHERE purchorderdetails.completed=0
AND purchorders.status<> 'Completed'
AND purchorders.status<> 'Rejected'
+ AND purchorders.status<> 'Cancelled'
AND purchorderdetails.itemcode='" . $myrow['stockid'] . "'";
$ErrMsg = _('The order details for this product cannot be retrieved because');
@@ -1748,6 +1749,7 @@
AND purcho...
[truncated message content] |
|
From: <dai...@us...> - 2012-07-21 23:37:47
|
Revision: 5525
http://web-erp.svn.sourceforge.net/web-erp/?rev=5525&view=rev
Author: daintree
Date: 2012-07-21 23:37:38 +0000 (Sat, 21 Jul 2012)
Log Message:
-----------
make sure qty demand calculated without quotations
Modified Paths:
--------------
trunk/CounterSales.php
trunk/DeliveryDetails.php
trunk/InternalStockRequest.php
trunk/InventoryPlanning.php
trunk/InventoryPlanningPrefSupplier.php
trunk/MRP.php
trunk/MRPCreateDemands.php
trunk/SelectOrderItems.php
trunk/SelectProduct.php
trunk/StockCheck.php
trunk/StockLocStatus.php
trunk/StockStatus.php
trunk/doc/Change.log
Modified: trunk/CounterSales.php
===================================================================
--- trunk/CounterSales.php 2012-07-21 22:15:38 UTC (rev 5524)
+++ trunk/CounterSales.php 2012-07-21 23:37:38 UTC (rev 5525)
@@ -93,7 +93,7 @@
$_SESSION['Items'.$identifier]->Branch = $myrow['cashsalebranch'];
$_SESSION['Items'.$identifier]->DebtorNo = $myrow['cashsalecustomer'];
}
-
+
$_SESSION['Items'.$identifier]->LocationName = $myrow['locationname'];
$_SESSION['Items'.$identifier]->Location = $_SESSION['UserStockLocation'];
$_SESSION['Items'.$identifier]->DispatchTaxProvince = $myrow['taxprovinceid'];
@@ -109,14 +109,14 @@
currencies.decimalplaces
FROM debtorsmaster INNER JOIN holdreasons
ON debtorsmaster.holdreason=holdreasons.reasoncode
- INNER JOIN salestypes
+ INNER JOIN salestypes
ON debtorsmaster.salestype=salestypes.typeabbrev
- INNER JOIN paymentterms
- ON debtorsmaster.paymentterms=paymentterms.termsindicator
- INNER JOIN currencies
+ INNER JOIN paymentterms
+ ON debtorsmaster.paymentterms=paymentterms.termsindicator
+ INNER JOIN currencies
ON debtorsmaster.currcode=currencies.currabrev
WHERE debtorsmaster.debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "'";
-
+
$ErrMsg = _('The details of the customer selected') . ': ' . $_SESSION['Items'.$identifier]->DebtorNo . ' ' . _('cannot be retrieved because');
$DbgMsg = _('The SQL used to retrieve the customer details and failed was') . ':';
// echo $sql;
@@ -241,7 +241,7 @@
$SQL = "SELECT stockmaster.stockid,
stockmaster.description,
stockmaster.units,
- stockmaster.decimalplaces
+ stockmaster.decimalplaces
FROM stockmaster INNER JOIN stockcategory
ON stockmaster.categoryid=stockcategory.categoryid
WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D')
@@ -254,7 +254,7 @@
$SQL = "SELECT stockmaster.stockid,
stockmaster.description,
stockmaster.units,
- stockmaster.decimalplaces
+ stockmaster.decimalplaces
FROM stockmaster INNER JOIN stockcategory
ON stockmaster.categoryid=stockcategory.categoryid
WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D')
@@ -317,7 +317,7 @@
$SQL = "SELECT stockmaster.stockid,
stockmaster.description,
stockmaster.units,
- stockmaster.decimalplaces
+ stockmaster.decimalplaces
FROM stockmaster INNER JOIN stockcategory
ON stockmaster.categoryid=stockcategory.categoryid
WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D')
@@ -390,10 +390,10 @@
$Discount = 0;
$AlreadyWarnedAboutCredit = false;
$i=1;
- while ($i<=$_SESSION['QuickEntries']
- AND isset($_POST['part_' . $i])
+ while ($i<=$_SESSION['QuickEntries']
+ AND isset($_POST['part_' . $i])
AND $_POST['part_' . $i]!='') {
-
+
$QuickEntryCode = 'part_' . $i;
$QuickEntryQty = 'qty_' . $i;
$QuickEntryPOLine = 'poline_' . $i;
@@ -429,7 +429,7 @@
$NewItemDue = DateAdd (Date($_SESSION['DefaultDateFormat']),'d', $_SESSION['Items'.$identifier]->DeliveryDays);
}
/*Now figure out if the item is a kit set - the field MBFlag='K'*/
- $sql = "SELECT stockmaster.mbflag,
+ $sql = "SELECT stockmaster.mbflag,
stockmaster.controlled
FROM stockmaster
WHERE stockmaster.stockid='". $NewItem ."'";
@@ -488,22 +488,22 @@
foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine) {
if (isset($_POST['Quantity_' . $OrderLine->LineNumber])){
-
+
$Quantity = round(filter_number_format($_POST['Quantity_' . $OrderLine->LineNumber]),$OrderLine->DecimalPlaces);
if (ABS($OrderLine->Price - filter_number_format($_POST['Price_' . $OrderLine->LineNumber]))>0.01){
/*There is a new price being input for the line item */
-
+
$Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]);
$_POST['GPPercent_' . $OrderLine->LineNumber] = (($Price*(1-(filter_number_format($_POST['Discount_' . $OrderLine->LineNumber])/100))) - $OrderLine->StandardCost*$ExRate)/($Price *(1-filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100);
-
+
} elseif (ABS($OrderLine->GPPercent - filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]))>=0.01) {
/* A GP % has been input so need to do a recalculation of the price at this new GP Percentage */
-
-
+
+
prnMsg(_('Recalculated the price from the GP % entered - the GP % was') . ' ' . $OrderLine->GPPercent . ' the new GP % is ' . filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]),'info');
-
-
+
+
$Price = ($OrderLine->StandardCost*$ExRate)/(1 -((filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]) + filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100));
} else {
$Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]);
@@ -546,7 +546,7 @@
if (isset($_POST['Recalculate'])) {
foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine) {
$NewItem=$OrderLine->StockID;
- $sql = "SELECT stockmaster.mbflag,
+ $sql = "SELECT stockmaster.mbflag,
stockmaster.controlled
FROM stockmaster
WHERE stockmaster.stockid='". $OrderLine->StockID."'";
@@ -562,7 +562,7 @@
WHERE bom.parent='" . $OrderLine->StockID. "'
AND bom.effectiveto > '" . Date('Y-m-d') . "'
AND bom.effectiveafter < '" . Date('Y-m-d') . "'";
-
+
$ErrMsg = _('Could not retrieve kitset components from the database because');
$KitResult = DB_query($sql,$db,$ErrMsg);
@@ -591,7 +591,7 @@
* controlled items and ghost/phantom items cannot be selected because the SQL to show items to select doesn't show 'em
* */
$AlreadyWarnedAboutCredit = false;
-
+
$sql = "SELECT stockmaster.mbflag,
stockmaster.taxcatid
FROM stockmaster
@@ -612,7 +612,7 @@
WHERE bom.parent='" . $NewItem . "'
AND bom.effectiveto > '" . Date('Y-m-d') . "'
AND bom.effectiveafter < '" . Date('Y-m-d') . "'";
-
+
$ErrMsg = _('Could not retrieve kitset components from the database because');
$KitResult = DB_query($sql,$db,$ErrMsg);
@@ -642,7 +642,7 @@
/* get the item details from the database and hold them in the cart object make the quantity 1 by default then add it to the cart */
/*Now figure out if the item is a kit set - the field MBFlag='K'*/
$AlreadyWarnedAboutCredit = false;
-
+
foreach($NewItemArray as $NewItem => $NewItemQty) {
if($NewItemQty > 0) {
$sql = "SELECT stockmaster.mbflag
@@ -727,7 +727,7 @@
} /* end of discount matrix lookup code */
-if (count($_SESSION['Items'.$identifier]->LineItems)>0
+if (count($_SESSION['Items'.$identifier]->LineItems)>0
AND !isset($_POST['ProcessSale'])){ /*only show order lines if there are any */
/*
// *************************************************************************
@@ -1107,22 +1107,26 @@
$QOH = $QOHRow[0];
$SQL = "SELECT SUM(salesorderdetails.quantity - salesorderdetails.qtyinvoiced) AS qtydemand
- FROM salesorderdetails
- WHERE salesorderdetails.stkcode = '" . $StockItem->StockID . "'
- AND salesorderdetails.completed = 0";
+ FROM salesorderdetails INNER JOIN salesorders
+ ON salesorderfetails.orderno=salesorders.orderno
+ WHERE salesorderdetails.stkcode = '" . $StockItem->StockID . "'
+ AND salesorderdetails.completed = 0
+ AND salesorders.quotation = 0";
$DemandResult = DB_query($SQL,$db);
$DemandRow = DB_fetch_row($DemandResult);
$QuantityDemand = $DemandRow[0];
$SQL = "SELECT SUM((salesorderdetails.quantity-salesorderdetails.qtyinvoiced)*bom.quantity) AS dem
- FROM salesorderdetails,
- bom,
- stockmaster
- WHERE salesorderdetails.stkcode=bom.parent
- AND salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0
+ FROM salesorderdetails INNER JOIN salesorders
+ ON salesorderdetails.orderno=salesorders.orderno
+ INNER JOIN bom
+ ON salesorderdetails.stkcode=bom.parent
+ INNER JOIN stockmaster
+ stockmaster.stockid=bom.parent
+ WHERE salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0
AND bom.component='" . $StockItem->StockID . "'
- AND stockmaster.stockid=bom.parent
- AND salesorderdetails.completed=0";
+ AND salesorderdetails.completed=0
+ AND salesorders.quotation=0";
$AssemblyDemandResult = DB_query($SQL,$db);
$AssemblyDemandRow = DB_fetch_row($AssemblyDemandResult);
$QuantityAssemblyDemand = $AssemblyDemandRow[0];
@@ -1132,6 +1136,7 @@
ON purchorderdetails.orderno = purchorders.orderno
WHERE purchorderdetails.itemcode = '" . $StockItem->StockID . "'
AND purchorderdetails.completed = 0
+ AND purchorders.status<>'Cancelled'
AND purchorders.status<>'Rejected'
AND purchorders.status<>'Pending'
AND purchorders.status<>'Completed'";
@@ -1823,7 +1828,7 @@
$Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true);
}
}
-
+
EnsureGLEntriesBalance(10,$InvoiceNo,$db);
/*Also if GL is linked to debtors need to process the debit to bank and credit to debtors for the payment */
@@ -1868,9 +1873,9 @@
$ErrMsg = _('Cannot insert a GL transaction for the debtors account credit');
$result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true);
}//amount paid we not zero
-
+
EnsureGLEntriesBalance(12,$ReceiptNumber,$db);
-
+
} /*end of if Sales and GL integrated */
if ($_POST['AmountPaid']!=0){
if (!isset($ReceiptNumber)){
@@ -1879,7 +1884,7 @@
//Now need to add the receipt banktrans record
//First get the account currency that it has been banked into
$result = DB_query("SELECT rate FROM currencies
- INNER JOIN bankaccounts
+ INNER JOIN bankaccounts
ON currencies.currabrev=bankaccounts.currcode
WHERE bankaccounts.accountcode='" . $_POST['BankAccount'] . "'",$db);
$myrow = DB_fetch_row($result);
@@ -2056,22 +2061,21 @@
$ImageSource = _('No Image');
// Find the quantity in stock at location
$QohSql = "SELECT sum(quantity)
- FROM locstock
- WHERE stockid='" .$myrow['stockid'] . "' AND
- loccode = '" . $_SESSION['Items'.$identifier]->Location . "'";
+ FROM locstock
+ WHERE stockid='" .$myrow['stockid'] . "' AND
+ loccode = '" . $_SESSION['Items'.$identifier]->Location . "'";
$QohResult = DB_query($QohSql,$db);
$QohRow = DB_fetch_row($QohResult);
$QOH = $QohRow[0];
// Find the quantity on outstanding sales orders
$sql = "SELECT SUM(salesorderdetails.quantity-salesorderdetails.qtyinvoiced) AS dem
- FROM salesorderdetails,
- salesorders
- WHERE salesorders.orderno = salesorderdetails.orderno AND
- salesorders.fromstkloc='" . $_SESSION['Items'.$identifier]->Location . "' AND
- salesorderdetails.completed=0 AND
- salesorders.quotation=0 AND
- salesorderdetails.stkcode='" . $myrow['stockid'] . "'";
+ FROM salesorderdetails INNER JOIN salesorders
+ ON salesorders.orderno = salesorderdetails.orderno
+ WHERE salesorders.fromstkloc='" . $_SESSION['Items'.$identifier]->Location . "'
+ AND salesorderdetails.completed=0
+ AND salesorders.quotation=0
+ AND salesorderdetails.stkcode='" . $myrow['stockid'] . "'";
$ErrMsg = _('The demand for this product from') . ' ' . $_SESSION['Items'.$identifier]->Location . ' ' .
_('cannot be retrieved because');
@@ -2085,11 +2089,11 @@
}
// Find the quantity on purchase orders
$sql = "SELECT SUM(purchorderdetails.quantityord-purchorderdetails.quantityrecd) AS QOO
- FROM purchorderdetails INNER JOIN purchorders
- WHERE purchorderdetails.completed=0
- AND purchorders.status<>'Cancelled'
- AND purchorders.status<>'Rejected'
- AND purchorderdetails.itemcode='" . $myrow['stockid'] . "'";
+ FROM purchorderdetails INNER JOIN purchorders
+ WHERE purchorderdetails.completed=0
+ AND purchorders.status<>'Cancelled'
+ AND purchorders.status<>'Rejected'
+ AND purchorderdetails.itemcode='" . $myrow['stockid'] . "'";
$ErrMsg = _('The order details for this product cannot be retrieved because');
$PurchResult = DB_query($sql,$db,$ErrMsg);
@@ -2103,8 +2107,8 @@
// Find the quantity on works orders
$sql = "SELECT SUM(woitems.qtyreqd - woitems.qtyrecd) AS dedm
- FROM woitems
- WHERE stockid='" . $myrow['stockid'] ."'";
+ FROM woitems
+ WHERE stockid='" . $myrow['stockid'] ."'";
$ErrMsg = _('The order details for this product cannot be retrieved because');
$WoResult = DB_query($sql,$db,$ErrMsg);
$WoRow = DB_fetch_row($WoResult);
@@ -2124,7 +2128,7 @@
$OnOrder = $PurchQty + $WoQty;
$Available = $QOH - $DemandQty + $OnOrder;
-
+
printf('<td>%s</td>
<td>%s</td>
<td>%s</td>
@@ -2188,7 +2192,7 @@
echo '</select></td>
<td><b>' . _('Enter partial Description') . ':</b>
<input tabindex="2" type="text" name="Keywords" size="20" maxlength="25" value="';
- if (isset($_POST['Keywords'])) echo $_POST['Keywords'];
+ if (isset($_POST['Keywords'])) echo $_POST['Keywords'];
echo '" /></td>
<td align="right"><b> ' . _('OR') . ' </b><b>' . _('Enter extract of the Stock Code') . ':</b>
@@ -2271,11 +2275,12 @@
// Find the quantity on purchase orders
$sql = "SELECT SUM(purchorderdetails.quantityord-purchorderdetails.quantityrecd) AS QOO
- FROM purchorderdetails INNER JOIN purchorders
- WHERE purchorderdetails.completed=0
- AND purchorders.status <>'Cancelled'
- AND purchorders.status <>'Rejected'
- AND purchorderdetails.itemcode='" . $myrow['stockid'] . "'";
+ FROM purchorderdetails INNER JOIN purchorders
+ WHERE purchorderdetails.completed=0
+ AND purchorders.status <>'Cancelled'
+ AND purchorders.status <>'Rejected'
+ AND purchorders.status <>'Completed'
+ AND purchorderdetails.itemcode='" . $myrow['stockid'] . "'";
$ErrMsg = _('The order details for this product cannot be retrieved because');
$PurchResult = DB_query($sql,$db,$ErrMsg);
Modified: trunk/DeliveryDetails.php
===================================================================
--- trunk/DeliveryDetails.php 2012-07-21 22:15:38 UTC (rev 5524)
+++ trunk/DeliveryDetails.php 2012-07-21 23:37:38 UTC (rev 5525)
@@ -423,21 +423,23 @@
$QOH = $QOHRow[0];
$SQL = "SELECT SUM(salesorderdetails.quantity - salesorderdetails.qtyinvoiced) AS qtydemand
- FROM salesorderdetails
+ FROM salesorderdetails INNER JOIN salesorders
+ ON salesorderdetails.orderno=salesorders.orderno
WHERE salesorderdetails.stkcode = '" . $StockItem->StockID . "'
- AND salesorderdetails.completed = 0";
+ AND salesorderdetails.completed = 0
+ AND salesorders.quotation=0";
$DemandResult = DB_query($SQL,$db);
$DemandRow = DB_fetch_row($DemandResult);
$QuantityDemand = $DemandRow[0];
$SQL = "SELECT SUM((salesorderdetails.quantity-salesorderdetails.qtyinvoiced)*bom.quantity) AS dem
- FROM salesorderdetails,
- bom,
- stockmaster
- WHERE salesorderdetails.stkcode=bom.parent
- AND salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0
+ FROM salesorderdetails INNER JOIN salesorders
+ ON salesorderdetails.orderno=salesorders.orderno
+ INNER JOIN bom ON salesorderdetails.stkcode=bom.parent
+ INNER JOIN stockmaster ON stockmaster.stockid=bom.parent
+ WHERE salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0
AND bom.component='" . $StockItem->StockID . "'
- AND stockmaster.stockid=bom.parent
+ AND salesorders.quotation=0
AND stockmaster.mbflag='A'
AND salesorderdetails.completed=0";
$AssemblyDemandResult = DB_query($SQL,$db);
Modified: trunk/InternalStockRequest.php
===================================================================
--- trunk/InternalStockRequest.php 2012-07-21 22:15:38 UTC (rev 5524)
+++ trunk/InternalStockRequest.php 2012-07-21 23:37:38 UTC (rev 5525)
@@ -296,7 +296,7 @@
echo '<table class="selection">
<tr>
<td>' . _('In Stock Category') . ':<select name="StockCat">';
-
+
if (!isset($_POST['StockCat'])) {
$_POST['StockCat'] = '';
}
@@ -636,13 +636,12 @@
// Find the quantity on outstanding sales orders
$sql = "SELECT SUM(salesorderdetails.quantity-salesorderdetails.qtyinvoiced) AS dem
- FROM salesorderdetails,
- salesorders
- WHERE salesorders.orderno = salesorderdetails.orderno AND
- salesorders.fromstkloc='" . $_SESSION['Request']->Location . "' AND
- salesorderdetails.completed=0 AND
- salesorders.quotation=0 AND
- salesorderdetails.stkcode='" . $myrow['stockid'] . "'";
+ FROM salesorderdetails INNER JOIN salesorders
+ ON salesorders.orderno = salesorderdetails.orderno
+ WHERE salesorders.fromstkloc='" . $_SESSION['Request']->Location . "'
+ AND salesorderdetails.completed=0
+ AND salesorders.quotation=0
+ AND salesorderdetails.stkcode='" . $myrow['stockid'] . "'";
$ErrMsg = _('The demand for this product from') . ' ' . $_SESSION['Request']->Location . ' ' . _('cannot be retrieved because');
$DemandResult = DB_query($sql,$db,$ErrMsg);
@@ -655,12 +654,13 @@
// Find the quantity on purchase orders
$sql = "SELECT SUM(purchorderdetails.quantityord-purchorderdetails.quantityrecd)*purchorderdetails.conversionfactor AS dem
- FROM purchorderdetails LEFT JOIN purchorders
- ON purchorderdetails.orderno=purchorders.orderno
- WHERE purchorderdetails.completed=0
- AND purchorders.status<>'Cancelled'
- AND purchorders.status<>'Rejected'
- AND purchorderdetails.itemcode='" . $myrow['stockid'] . "'";
+ FROM purchorderdetails LEFT JOIN purchorders
+ ON purchorderdetails.orderno=purchorders.orderno
+ WHERE purchorderdetails.completed=0
+ AND purchorders.status<>'Cancelled'
+ AND purchorders.status<>'Rejected'
+ AND purchorders.status<>'Completed'
+ AND purchorderdetails.itemcode='" . $myrow['stockid'] . "'";
$ErrMsg = _('The order details for this product cannot be retrieved because');
$PurchResult = DB_query($sql,$db,$ErrMsg);
Modified: trunk/InventoryPlanning.php
===================================================================
--- trunk/InventoryPlanning.php 2012-07-21 22:15:38 UTC (rev 5524)
+++ trunk/InventoryPlanning.php 2012-07-21 23:37:38 UTC (rev 5525)
@@ -275,7 +275,8 @@
AND purchorderdetails.completed = 0
AND purchorders.status <> 'Cancelled'
AND purchorders.status <> 'Rejected'
- AND purchorders.status <> 'Pending'";
+ AND purchorders.status <> 'Pending'
+ AND purchorders.status <> 'Completed'";
} else {
$SQL = "SELECT SUM(purchorderdetails.quantityord - purchorderdetails.quantityrecd) as qtyonorder
FROM purchorderdetails INNER JOIN purchorders
@@ -285,7 +286,8 @@
AND purchorders.intostocklocation= '" . $_POST['Location'] . "'
AND purchorders.status <> 'Cancelled'
AND purchorders.status <> 'Rejected'
- AND purchorders.status <> 'Pending'";
+ AND purchorders.status <> 'Pending'
+ AND purchorders.status <> 'Completed'";
}
$DemandRow = DB_fetch_array($DemandResult);
Modified: trunk/InventoryPlanningPrefSupplier.php
===================================================================
--- trunk/InventoryPlanningPrefSupplier.php 2012-07-21 22:15:38 UTC (rev 5524)
+++ trunk/InventoryPlanningPrefSupplier.php 2012-07-21 23:37:38 UTC (rev 5525)
@@ -368,7 +368,8 @@
AND purchorderdetails.completed = 0
AND purchorders.status <> 'Cancelled'
AND purchorders.status <> 'Rejected'
- AND purchorders.status <> 'Pending'";
+ AND purchorders.status <> 'Pending'
+ AND purchorders.status <> 'Completed'";
} else {
$SQL = "SELECT SUM(purchorderdetails.quantityord - purchorderdetails.quantityrecd) as qtyonorder
FROM purchorderdetails
@@ -382,7 +383,8 @@
AND purchorders.intostocklocation= '" . $_POST['Location'] . "'
AND purchorders.status <> 'Cancelled'
AND purchorders.status <> 'Rejected'
- AND purchorders.status <> 'Pending'";
+ AND purchorders.status <> 'Pending'
+ AND purchorders.status <> 'Completed'";
}
$DemandRow = DB_fetch_array($DemandResult);
Modified: trunk/MRP.php
===================================================================
--- trunk/MRP.php 2012-07-21 22:15:38 UTC (rev 5524)
+++ trunk/MRP.php 2012-07-21 23:37:38 UTC (rev 5525)
@@ -45,7 +45,7 @@
$sql = "INSERT INTO passbom (part, sortpart)
SELECT bom.component AS part,
CONCAT(bom.parent,'%',bom.component) AS sortpart
- FROM bom LEFT JOIN bom as bom2
+ FROM bom LEFT JOIN bom as bom2
ON bom.parent = bom2.component
WHERE bom2.component IS NULL";
$result = DB_query($sql,$db);
@@ -247,9 +247,9 @@
stkcode
FROM salesorders, salesorderdetails
WHERE salesorders.orderno = salesorderdetails.orderno
- AND (quantity - qtyinvoiced) > 0
- AND salesorderdetails.completed = 0
- AND salesorders.quotation = 0";
+ AND (quantity - qtyinvoiced) > 0
+ AND salesorderdetails.completed = 0
+ AND salesorders.quotation = 0";
$result = DB_query($sql,$db);
prnMsg(_('Loading requirements from work orders'),'info');
@@ -435,7 +435,7 @@
prnMsg(_('Creating planned orders table'),'info');
flush();
$result = DB_query("DROP TABLE IF EXISTS mrpplannedorders",$db);
- $sql = "CREATE TABLE mrpplannedorders (id int(11) NOT NULL auto_increment,
+ $sql = "CREATE TABLE mrpplannedorders (id int(11) NOT NULL auto_increment,
part char(20),
duedate date,
supplyquantity double,
@@ -754,8 +754,8 @@
// Calculate required date by subtracting leadtime from top part's required date
$PartRequiredDate=$Requirement['daterequired'];
- if ((int)$LeadTime>0) {
-
+ if ((int)$LeadTime>0) {
+
$CalendarSQL = "SELECT COUNT(*),cal2.calendardate
FROM mrpcalendar
LEFT JOIN mrpcalendar as cal2
Modified: trunk/MRPCreateDemands.php
===================================================================
--- trunk/MRPCreateDemands.php 2012-07-21 22:15:38 UTC (rev 5524)
+++ trunk/MRPCreateDemands.php 2012-07-21 23:37:38 UTC (rev 5525)
@@ -8,9 +8,9 @@
if (isset($_POST['submit'])) {
// Create mrpdemands based on sales order history
-
+
$InputError=0;
-
+
if (isset($_POST['FromDate']) AND !Is_Date($_POST['FromDate'])){
$msg = _('The date from must be specified in the format') . ' ' . $_SESSION['DefaultDateFormat'];
$InputError=1;
@@ -41,11 +41,11 @@
$msg = _('The multiplier is expected to be a positive number');
$InputError=1;
}
-
+
if ($InputError==1){
prnMsg($msg,'error');
}
-
+
$WhereCategory = " ";
if ($_POST['CategoryID']!='All') {
$WhereCategory = " AND stockmaster.categoryid ='" . $_POST['CategoryID'] . "' ";
@@ -54,21 +54,21 @@
if ($_POST['Location']!='All') {
$WhereLocation = " AND salesorders.fromstkloc ='" . $_POST['Location'] . "' ";
}
-
+
$sql= "SELECT salesorderdetails.stkcode,
- SUM(salesorderdetails.quantity) AS totqty,
- SUM(salesorderdetails.qtyinvoiced) AS totqtyinvoiced,
- SUM(salesorderdetails.quantity * salesorderdetails.unitprice ) AS totextqty
- FROM salesorders
- INNER JOIN salesorderdetails
- ON salesorders.orderno = salesorderdetails.orderno
- INNER JOIN stockmaster
- ON salesorderdetails.stkcode = stockmaster.stockid
- WHERE orddate >='" . FormatDateForSQL($_POST['FromDate']) ."'
- AND orddate <='" . FormatDateForSQL($_POST['ToDate']) . "'
- " . $WhereLocation . "
- " . $WhereCategory . "
- GROUP BY salesorderdetails.stkcode";
+ SUM(salesorderdetails.quantity) AS totqty,
+ SUM(salesorderdetails.qtyinvoiced) AS totqtyinvoiced,
+ SUM(salesorderdetails.quantity * salesorderdetails.unitprice ) AS totextqty
+ FROM salesorders INNER JOIN salesorderdetails
+ ON salesorders.orderno = salesorderdetails.orderno
+ INNER JOIN stockmaster
+ ON salesorderdetails.stkcode = stockmaster.stockid
+ WHERE orddate >='" . FormatDateForSQL($_POST['FromDate']) ."'
+ AND orddate <='" . FormatDateForSQL($_POST['ToDate']) . "'
+ " . $WhereLocation . "
+ " . $WhereCategory . "
+ AND salesorders.quotation=0
+ GROUP BY salesorderdetails.stkcode";
//echo "<br />$sql<br />";
$result = DB_query($sql,$db);
// To get the quantity per period, get the whole number amount of the total quantity divided
@@ -76,25 +76,25 @@
// number quantity into each entry of the periodqty array, and add 1 to the periodqty array
// until the remainder number is used up. Then create an mrpdemands records for everything
// in the array
-
+
if (filter_number_format($_POST['Multiplier']) < 1) {
$Multiplier = 1;
} else {
$Multiplier = filter_number_format($_POST['Multiplier']);
}
-
+
if ($_POST['ExcludeQuantity'] < 1) {
$ExcludeQty = 1;
} else {
$ExcludeQty = filter_number_format($_POST['ExcludeQuantity']);
}
-
+
if ($_POST['ExcludeAmount'] < 1) {
$ExcludeAmount = 0;
} else {
$ExcludeAmount = filter_number_format($_POST['ExcludeAmount']);
}
-
+
// Create array of dates based on DistDate and adding either weeks or months
$FormatedDistdate = FormatDateForSQL($_POST['DistDate']);
if (mb_strpos($FormatedDistdate,"/")) {
@@ -104,7 +104,7 @@
} else if (mb_strpos($FormatedDistdate,".")) {
list($yyyy,$mm,$dd) = explode(".",$FormatedDistdate);
}
-
+
$datearray[0] = $FormatedDistdate;
// Set first date to valid manufacturing date
$calendarsql = "SELECT COUNT(*),cal2.calendardate
@@ -120,7 +120,7 @@
if ($myrowdate[0] != 0){
$datearray[0] = $myrowdate[1];
}
-
+
$date = date('Y-m-d',mktime(0,0,0,$mm,$dd,$yyyy));
for ($i = 1; $i <= ( $_POST['PeriodNumber'] - 1); $i++) {
if ($_POST['Period'] == 'weekly') {
@@ -148,7 +148,7 @@
}
$date = date('Y-m-d',$date);
}
-
+
$TotalRecords = 0;
while ($myrow = DB_fetch_array($result)) {
if (($myrow['totqty'] >= $ExcludeQty) AND ($myrow['totextqty'] >= $ExcludeAmount)) {
@@ -167,7 +167,7 @@
$PeriodQty[$i] += 1;
}
}
-
+
$i = 0;
foreach ($PeriodQty as $demandqty) {
$sql = "INSERT INTO mrpdemands (stockid,
@@ -181,12 +181,12 @@
$insertresult = DB_query($sql,$db);
$i++;
$TotalRecords++;
-
+
} // end of foreach for INSERT
} // end of if that checks exludeqty, ExcludeAmount
-
+
} //end while loop
-
+
prnMsg( $TotalRecords . ' ' . _('records have been created'),'success');
} // end if submit has been pressed
Modified: trunk/SelectOrderItems.php
===================================================================
--- trunk/SelectOrderItems.php 2012-07-21 22:15:38 UTC (rev 5524)
+++ trunk/SelectOrderItems.php 2012-07-21 23:37:38 UTC (rev 5525)
@@ -211,12 +211,12 @@
stockmaster.decimalplaces,
stockmaster.materialcost+stockmaster.labourcost+stockmaster.overheadcost AS standardcost,
salesorderdetails.completed
- FROM salesorderdetails INNER JOIN stockmaster
- ON salesorderdetails.stkcode = stockmaster.stockid
- INNER JOIN locstock ON locstock.stockid = stockmaster.stockid
- WHERE locstock.loccode = '" . $myrow['fromstkloc'] . "'
- AND salesorderdetails.orderno ='" . $_GET['ModifyOrderNumber'] . "'
- ORDER BY salesorderdetails.orderlineno";
+ FROM salesorderdetails INNER JOIN stockmaster
+ ON salesorderdetails.stkcode = stockmaster.stockid
+ INNER JOIN locstock ON locstock.stockid = stockmaster.stockid
+ WHERE locstock.loccode = '" . $myrow['fromstkloc'] . "'
+ AND salesorderdetails.orderno ='" . $_GET['ModifyOrderNumber'] . "'
+ ORDER BY salesorderdetails.orderlineno";
$ErrMsg = _('The line items of the order cannot be retrieved because');
$LineItemsResult = DB_query($LineItemsSQL,$db,$ErrMsg);
@@ -671,9 +671,9 @@
if($_SESSION['ExistingOrder' . $identifier]!=0) { //need to check that not already dispatched
$sql = "SELECT qtyinvoiced
- FROM salesorderdetails
- WHERE orderno='" . $_SESSION['ExistingOrder' . $identifier] . "'
- AND qtyinvoiced>0";
+ FROM salesorderdetails
+ WHERE orderno='" . $_SESSION['ExistingOrder' . $identifier] . "'
+ AND qtyinvoiced>0";
$InvQties = DB_query($sql,$db);
@@ -1528,8 +1528,8 @@
$ImageSource = _('No Image');
// Find the quantity in stock at location
$QOHSQL = "SELECT sum(locstock.quantity) AS qoh
- FROM locstock
- WHERE stockid='" .$myrow['stockid'] . "'
+ FROM locstock
+ WHERE stockid='" .$myrow['stockid'] . "'
AND loccode = '" . $_SESSION['Items'.$identifier]->Location . "'";
$QOHResult = DB_query($QOHSQL,$db);
$QOHRow = DB_fetch_array($QOHResult);
@@ -1560,6 +1560,7 @@
WHERE purchorderdetails.completed=0
AND purchorders.status<> 'Completed'
AND purchorders.status<> 'Rejected'
+ AND purchorders.status<> 'Cancelled'
AND purchorderdetails.itemcode='" . $myrow['stockid'] . "'";
$ErrMsg = _('The order details for this product cannot be retrieved because');
@@ -1748,6 +1749,7 @@
AND purcho...
[truncated message content] |
|
From: <te...@us...> - 2012-07-23 08:29:33
|
Revision: 5530
http://web-erp.svn.sourceforge.net/web-erp/?rev=5530&view=rev
Author: tehonu
Date: 2012-07-23 08:29:23 +0000 (Mon, 23 Jul 2012)
Log Message:
-----------
Ricard: Restrict internal departments to users as described in http://www.weberp.org/forum/showthread.php?tid=171&pid=1029#pid1029
Modified Paths:
--------------
trunk/InternalStockRequest.php
trunk/WWW_Users.php
trunk/includes/UserLogin.php
trunk/sql/mysql/upgrade4.08-4.09.sql
Modified: trunk/InternalStockRequest.php
===================================================================
--- trunk/InternalStockRequest.php 2012-07-23 06:50:11 UTC (rev 5529)
+++ trunk/InternalStockRequest.php 2012-07-23 08:29:23 UTC (rev 5530)
@@ -166,20 +166,27 @@
</tr>
<tr>
<td>' . _('Department') . ':</td>';
-
-$sql="SELECT departmentid,
- description
- FROM departments
- ORDER BY description";
-
+if($_SESSION['AllowedDepartment'] == 0){
+ // any internal department allowed
+ $sql="SELECT departmentid,
+ description
+ FROM departments
+ ORDER BY description";
+}else{
+ // just 1 internal department allowed
+ $sql="SELECT departmentid,
+ description
+ FROM departments
+ WHERE departmentid = '". $_SESSION['AllowedDepartment'] ."'
+ ORDER BY description";
+}
$result=DB_query($sql, $db);
-echo '<td><select name="Department">
- <option value="">' . _('Select your department') . '</option>';
+echo '<td><select name="Department">';
while ($myrow=DB_fetch_array($result)){
if (isset($_SESSION['Request']->Department) AND $_SESSION['Request']->Department==$myrow['departmentid']){
- echo '<option selected="True" value="' . $myrow['departmentid'] . '">' . $myrow['departmentid'].' - ' .htmlspecialchars($myrow['description'], ENT_QUOTES,'UTF-8') . '</option>';
+ echo '<option selected="True" value="' . $myrow['departmentid'] . '">' . htmlspecialchars($myrow['description'], ENT_QUOTES,'UTF-8') . '</option>';
} else {
- echo '<option value="' . $myrow['departmentid'] . '">' . $myrow['departmentid'].' - ' .htmlspecialchars($myrow['description'], ENT_QUOTES,'UTF-8') . '</option>';
+ echo '<option value="' . $myrow['departmentid'] . '">' . htmlspecialchars($myrow['description'], ENT_QUOTES,'UTF-8') . '</option>';
}
}
echo '</select></td>
Modified: trunk/WWW_Users.php
===================================================================
--- trunk/WWW_Users.php 2012-07-23 06:50:11 UTC (rev 5529)
+++ trunk/WWW_Users.php 2012-07-23 08:29:23 UTC (rev 5530)
@@ -156,7 +156,8 @@
defaultlocation='" . $_POST['DefaultLocation'] ."',
modulesallowed='" . $ModulesAllowed . "',
blocked='" . $_POST['Blocked'] . "',
- pdflanguage='" . $_POST['PDFLanguage'] . "'
+ pdflanguage='" . $_POST['PDFLanguage'] . "',
+ department='" . $_POST['Department'] . "'
WHERE userid = '". $SelectedUser . "'";
prnMsg( _('The selected user record has been updated'), 'success' );
@@ -179,7 +180,8 @@
displayrecordsmax,
theme,
language,
- pdflanguage)
+ pdflanguage,
+ department)
VALUES ('" . $_POST['UserID'] . "',
'" . $_POST['RealName'] ."',
'" . $_POST['Cust'] ."',
@@ -197,7 +199,8 @@
'" . $_SESSION['DefaultDisplayRecordsMax'] . "',
'" . $_POST['Theme'] . "',
'". $_POST['UserLanguage'] ."',
- '" . $_POST['PDFLanguage'] . "')";
+ '" . $_POST['PDFLanguage'] . "',
+ '" . $_POST['Department'] . "')";
prnMsg( _('A new user record has been inserted'), 'success' );
}
@@ -225,6 +228,7 @@
unset($_POST['Theme']);
unset($_POST['UserLanguage']);
unset($_POST['PDFLanguage']);
+ unset($_POST['Department']);
unset($SelectedUser);
}
@@ -376,7 +380,8 @@
blocked,
theme,
language,
- pdflanguage
+ pdflanguage,
+ department
FROM www_users
WHERE userid='" . $SelectedUser . "'";
@@ -400,6 +405,7 @@
$_POST['UserLanguage'] = $myrow['language'];
$_POST['Blocked'] = $myrow['blocked'];
$_POST['PDFLanguage'] = $myrow['pdflanguage'];
+ $_POST['Department'] = $myrow['department'];
echo '<input type="hidden" name="SelectedUser" value="' . $SelectedUser . '" />';
echo '<input type="hidden" name="UserID" value="' . $_POST['UserID'] . '" />';
@@ -680,7 +686,36 @@
echo '</select></td>
</tr>';
+/* Allowed Department for Internal Requests */
+
echo '<tr>
+ <td>' . _('Allowed Department for Internal Requests') . ':</td>';
+
+$sql="SELECT departmentid,
+ description
+ FROM departments
+ ORDER BY description";
+
+$result=DB_query($sql, $db);
+echo '<td><select name="Department">';
+if ((isset($_POST['Department']) AND $_POST['Department']=='0') OR !isset($_POST['Department'])){
+ echo '<option selected="selected" value="0">' . _('Any Internal Department') . '</option>';
+} else {
+ echo '<option value="">' . _('Any Internal Department') . '</option>';
+}
+while ($myrow=DB_fetch_array($result)){
+ if (isset($_POST['Department']) AND $myrow['departmentid'] == $_POST['Department']){
+ echo '<option selected="selected" value="' . $myrow['departmentid'] . '">' . $myrow['description'] . '</option>';
+ } else {
+ echo '<option value="' . $myrow['departmentid'] . '">' . $myrow['description'] . '</option>';
+ }
+}
+echo '</select></td>
+ </tr>';
+
+/* Account status */
+
+echo '<tr>
<td>' . _('Account Status') . ':</td>
<td><select name="Blocked">';
if ($_POST['Blocked']==0){
Modified: trunk/includes/UserLogin.php
===================================================================
--- trunk/includes/UserLogin.php 2012-07-23 06:50:11 UTC (rev 5529)
+++ trunk/includes/UserLogin.php 2012-07-23 08:29:23 UTC (rev 5530)
@@ -66,6 +66,8 @@
$_SESSION['Language'] = $myrow['language'];
$_SESSION['SalesmanLogin'] = $myrow['salesman'];
$_SESSION['CanCreateTender'] = $myrow['cancreatetender'];
+ $_SESSION['AllowedDepartment'] = $myrow['department'];
+
if (isset($myrow['pdflanguage'])) {
$_SESSION['PDFLanguage'] = $myrow['pdflanguage'];
} else {
Modified: trunk/sql/mysql/upgrade4.08-4.09.sql
===================================================================
--- trunk/sql/mysql/upgrade4.08-4.09.sql 2012-07-23 06:50:11 UTC (rev 5529)
+++ trunk/sql/mysql/upgrade4.08-4.09.sql 2012-07-23 08:29:23 UTC (rev 5530)
@@ -17,4 +17,6 @@
INSERT INTO scripts VALUES ('GLJournalInquiry.php','15','General Ledger Journal Inquiry');
INSERT INTO scripts VALUES ('PDFGLJournal.php','15','General Ledger Journal Print');
+ALTER TABLE `www_users` ADD `department` INT( 11 ) NOT NULL DEFAULT '0';
+
UPDATE config SET confvalue='4.08.2' 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.
|
|
From: <te...@us...> - 2012-07-23 08:29:34
|
Revision: 5530
http://web-erp.svn.sourceforge.net/web-erp/?rev=5530&view=rev
Author: tehonu
Date: 2012-07-23 08:29:23 +0000 (Mon, 23 Jul 2012)
Log Message:
-----------
Ricard: Restrict internal departments to users as described in http://www.weberp.org/forum/showthread.php?tid=171&pid=1029#pid1029
Modified Paths:
--------------
trunk/InternalStockRequest.php
trunk/WWW_Users.php
trunk/includes/UserLogin.php
trunk/sql/mysql/upgrade4.08-4.09.sql
Modified: trunk/InternalStockRequest.php
===================================================================
--- trunk/InternalStockRequest.php 2012-07-23 06:50:11 UTC (rev 5529)
+++ trunk/InternalStockRequest.php 2012-07-23 08:29:23 UTC (rev 5530)
@@ -166,20 +166,27 @@
</tr>
<tr>
<td>' . _('Department') . ':</td>';
-
-$sql="SELECT departmentid,
- description
- FROM departments
- ORDER BY description";
-
+if($_SESSION['AllowedDepartment'] == 0){
+ // any internal department allowed
+ $sql="SELECT departmentid,
+ description
+ FROM departments
+ ORDER BY description";
+}else{
+ // just 1 internal department allowed
+ $sql="SELECT departmentid,
+ description
+ FROM departments
+ WHERE departmentid = '". $_SESSION['AllowedDepartment'] ."'
+ ORDER BY description";
+}
$result=DB_query($sql, $db);
-echo '<td><select name="Department">
- <option value="">' . _('Select your department') . '</option>';
+echo '<td><select name="Department">';
while ($myrow=DB_fetch_array($result)){
if (isset($_SESSION['Request']->Department) AND $_SESSION['Request']->Department==$myrow['departmentid']){
- echo '<option selected="True" value="' . $myrow['departmentid'] . '">' . $myrow['departmentid'].' - ' .htmlspecialchars($myrow['description'], ENT_QUOTES,'UTF-8') . '</option>';
+ echo '<option selected="True" value="' . $myrow['departmentid'] . '">' . htmlspecialchars($myrow['description'], ENT_QUOTES,'UTF-8') . '</option>';
} else {
- echo '<option value="' . $myrow['departmentid'] . '">' . $myrow['departmentid'].' - ' .htmlspecialchars($myrow['description'], ENT_QUOTES,'UTF-8') . '</option>';
+ echo '<option value="' . $myrow['departmentid'] . '">' . htmlspecialchars($myrow['description'], ENT_QUOTES,'UTF-8') . '</option>';
}
}
echo '</select></td>
Modified: trunk/WWW_Users.php
===================================================================
--- trunk/WWW_Users.php 2012-07-23 06:50:11 UTC (rev 5529)
+++ trunk/WWW_Users.php 2012-07-23 08:29:23 UTC (rev 5530)
@@ -156,7 +156,8 @@
defaultlocation='" . $_POST['DefaultLocation'] ."',
modulesallowed='" . $ModulesAllowed . "',
blocked='" . $_POST['Blocked'] . "',
- pdflanguage='" . $_POST['PDFLanguage'] . "'
+ pdflanguage='" . $_POST['PDFLanguage'] . "',
+ department='" . $_POST['Department'] . "'
WHERE userid = '". $SelectedUser . "'";
prnMsg( _('The selected user record has been updated'), 'success' );
@@ -179,7 +180,8 @@
displayrecordsmax,
theme,
language,
- pdflanguage)
+ pdflanguage,
+ department)
VALUES ('" . $_POST['UserID'] . "',
'" . $_POST['RealName'] ."',
'" . $_POST['Cust'] ."',
@@ -197,7 +199,8 @@
'" . $_SESSION['DefaultDisplayRecordsMax'] . "',
'" . $_POST['Theme'] . "',
'". $_POST['UserLanguage'] ."',
- '" . $_POST['PDFLanguage'] . "')";
+ '" . $_POST['PDFLanguage'] . "',
+ '" . $_POST['Department'] . "')";
prnMsg( _('A new user record has been inserted'), 'success' );
}
@@ -225,6 +228,7 @@
unset($_POST['Theme']);
unset($_POST['UserLanguage']);
unset($_POST['PDFLanguage']);
+ unset($_POST['Department']);
unset($SelectedUser);
}
@@ -376,7 +380,8 @@
blocked,
theme,
language,
- pdflanguage
+ pdflanguage,
+ department
FROM www_users
WHERE userid='" . $SelectedUser . "'";
@@ -400,6 +405,7 @@
$_POST['UserLanguage'] = $myrow['language'];
$_POST['Blocked'] = $myrow['blocked'];
$_POST['PDFLanguage'] = $myrow['pdflanguage'];
+ $_POST['Department'] = $myrow['department'];
echo '<input type="hidden" name="SelectedUser" value="' . $SelectedUser . '" />';
echo '<input type="hidden" name="UserID" value="' . $_POST['UserID'] . '" />';
@@ -680,7 +686,36 @@
echo '</select></td>
</tr>';
+/* Allowed Department for Internal Requests */
+
echo '<tr>
+ <td>' . _('Allowed Department for Internal Requests') . ':</td>';
+
+$sql="SELECT departmentid,
+ description
+ FROM departments
+ ORDER BY description";
+
+$result=DB_query($sql, $db);
+echo '<td><select name="Department">';
+if ((isset($_POST['Department']) AND $_POST['Department']=='0') OR !isset($_POST['Department'])){
+ echo '<option selected="selected" value="0">' . _('Any Internal Department') . '</option>';
+} else {
+ echo '<option value="">' . _('Any Internal Department') . '</option>';
+}
+while ($myrow=DB_fetch_array($result)){
+ if (isset($_POST['Department']) AND $myrow['departmentid'] == $_POST['Department']){
+ echo '<option selected="selected" value="' . $myrow['departmentid'] . '">' . $myrow['description'] . '</option>';
+ } else {
+ echo '<option value="' . $myrow['departmentid'] . '">' . $myrow['description'] . '</option>';
+ }
+}
+echo '</select></td>
+ </tr>';
+
+/* Account status */
+
+echo '<tr>
<td>' . _('Account Status') . ':</td>
<td><select name="Blocked">';
if ($_POST['Blocked']==0){
Modified: trunk/includes/UserLogin.php
===================================================================
--- trunk/includes/UserLogin.php 2012-07-23 06:50:11 UTC (rev 5529)
+++ trunk/includes/UserLogin.php 2012-07-23 08:29:23 UTC (rev 5530)
@@ -66,6 +66,8 @@
$_SESSION['Language'] = $myrow['language'];
$_SESSION['SalesmanLogin'] = $myrow['salesman'];
$_SESSION['CanCreateTender'] = $myrow['cancreatetender'];
+ $_SESSION['AllowedDepartment'] = $myrow['department'];
+
if (isset($myrow['pdflanguage'])) {
$_SESSION['PDFLanguage'] = $myrow['pdflanguage'];
} else {
Modified: trunk/sql/mysql/upgrade4.08-4.09.sql
===================================================================
--- trunk/sql/mysql/upgrade4.08-4.09.sql 2012-07-23 06:50:11 UTC (rev 5529)
+++ trunk/sql/mysql/upgrade4.08-4.09.sql 2012-07-23 08:29:23 UTC (rev 5530)
@@ -17,4 +17,6 @@
INSERT INTO scripts VALUES ('GLJournalInquiry.php','15','General Ledger Journal Inquiry');
INSERT INTO scripts VALUES ('PDFGLJournal.php','15','General Ledger Journal Print');
+ALTER TABLE `www_users` ADD `department` INT( 11 ) NOT NULL DEFAULT '0';
+
UPDATE config SET confvalue='4.08.2' 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.
|
|
From: <dai...@us...> - 2012-07-24 09:26:08
|
Revision: 5534
http://web-erp.svn.sourceforge.net/web-erp/?rev=5534&view=rev
Author: daintree
Date: 2012-07-24 09:26:01 +0000 (Tue, 24 Jul 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/SelectProduct.php
trunk/SupplierInvoice.php
trunk/css/default/default.css
trunk/css/fresh/default.css
trunk/css/gel/default.css
trunk/css/jelly/default.css
trunk/css/professional/default.css
trunk/css/professional-rtl/default.css
trunk/css/silverwolf/default.css
trunk/doc/Change.log
trunk/includes/footer.inc
trunk/includes/header.inc
trunk/index.php
Modified: trunk/SelectProduct.php
===================================================================
--- trunk/SelectProduct.php 2012-07-24 09:21:47 UTC (rev 5533)
+++ trunk/SelectProduct.php 2012-07-24 09:26:01 UTC (rev 5534)
@@ -317,7 +317,7 @@
FROM salesorderdetails INNER JOIN salesorders
ON salesorders.orderno = salesorderdetails.orderno
INNER JOIN bom ON salesorderdetails.stkcode=bom.parent
- INNER JOIN stockmaster stockmaster.stockid=bom.parent
+ INNER JOIN stockmaster ON stockmaster.stockid=bom.parent
WHERE salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0
AND bom.component='" . $StockID . "'
AND stockmaster.mbflag='A'
Modified: trunk/SupplierInvoice.php
===================================================================
--- trunk/SupplierInvoice.php 2012-07-24 09:21:47 UTC (rev 5533)
+++ trunk/SupplierInvoice.php 2012-07-24 09:26:01 UTC (rev 5534)
@@ -1235,8 +1235,7 @@
$sql ="SELECT quantity
FROM locstock
- WHERE loccode='" . $LocCode . "'
- AND stockid='" . $EnteredGRN->ItemCode . "'";
+ WHERE stockid='" . $EnteredGRN->ItemCode . "'";
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The quantity on hand could not be retrieved from the database');
$DbgMsg = _('The following SQL to retrieve the total stock quantity was used');
$Result = DB_query($sql, $db, $ErrMsg, $DbgMsg);
Modified: trunk/css/default/default.css
===================================================================
--- trunk/css/default/default.css 2012-07-24 09:21:47 UTC (rev 5533)
+++ trunk/css/default/default.css 2012-07-24 09:26:01 UTC (rev 5534)
@@ -41,7 +41,6 @@
table {
background-color: #587BA6;
margin: 0 auto;
- width: 100%;
}
.dpTbl {
Modified: trunk/css/fresh/default.css
===================================================================
--- trunk/css/fresh/default.css 2012-07-24 09:21:47 UTC (rev 5533)
+++ trunk/css/fresh/default.css 2012-07-24 09:26:01 UTC (rev 5534)
@@ -49,7 +49,6 @@
table {
background-color: #ffffff;
margin: 0 auto;
- width: 95%;
}
.dpTbl {
Modified: trunk/css/gel/default.css
===================================================================
--- trunk/css/gel/default.css 2012-07-24 09:21:47 UTC (rev 5533)
+++ trunk/css/gel/default.css 2012-07-24 09:26:01 UTC (rev 5534)
@@ -70,7 +70,6 @@
border: 0px 0px 2px 2px #222 solid;
background: #eee;
margin: 0 auto;
- width: 95%;
}
.dpTbl {
Modified: trunk/css/jelly/default.css
===================================================================
--- trunk/css/jelly/default.css 2012-07-24 09:21:47 UTC (rev 5533)
+++ trunk/css/jelly/default.css 2012-07-24 09:26:01 UTC (rev 5534)
@@ -52,7 +52,6 @@
background: #eee;
border: 0px 0px 2px 2px #222 solid;
margin: 0 auto;
- width: 95%;
}
.dpTbl {
Modified: trunk/css/professional/default.css
===================================================================
--- trunk/css/professional/default.css 2012-07-24 09:21:47 UTC (rev 5533)
+++ trunk/css/professional/default.css 2012-07-24 09:26:01 UTC (rev 5534)
@@ -49,7 +49,6 @@
table {
background-color: #EEEEFF;
margin: 0 auto;
- width: 95%;
}
.dpTbl {
Modified: trunk/css/professional-rtl/default.css
===================================================================
--- trunk/css/professional-rtl/default.css 2012-07-24 09:21:47 UTC (rev 5533)
+++ trunk/css/professional-rtl/default.css 2012-07-24 09:26:01 UTC (rev 5534)
@@ -51,7 +51,6 @@
table {
background-color: #EEEEFF;
margin: 0 auto;
- width: 95%;
}
.dpTbl {
Modified: trunk/css/silverwolf/default.css
===================================================================
--- trunk/css/silverwolf/default.css 2012-07-24 09:21:47 UTC (rev 5533)
+++ trunk/css/silverwolf/default.css 2012-07-24 09:26:01 UTC (rev 5534)
@@ -55,7 +55,7 @@
table {
background-color: #fff;
- width: 100%;
+ margin: 0 auto;
}
th {
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2012-07-24 09:21:47 UTC (rev 5533)
+++ trunk/doc/Change.log 2012-07-24 09:26:01 UTC (rev 5534)
@@ -1,5 +1,7 @@
webERP Change Log
+24/7/2012 Exson/Phil: SupplierInvoice.php incorrect calculation of weighted average cost just using the stock quantity at a single location, now corrected
+24/7/2012 Phil: includes/Z_POSDataCreation.php - added system default date format config to POS data upload file
22/7/2012 Phil/Bob Thomas: Fix all scripts where demand was calculated including salesorder quotations (to exclude quotations). CounterSales.php DeliveryDetails.php SelectOrderItems.php StockCheck.php StockLocStatus.php
22/7/2012 Phil: Fixed on order quantities to exclude purchase orders with status completed and cancelled CounterSales.php SelectOrderItems.php DeliveryDetails.php StockLocStatus.php
21/7/2012 Hindra: Fix Aguapop theme and table and div nesting of index.php header.inc and footer.inc - and other themes table style width: 95%;
Modified: trunk/includes/footer.inc
===================================================================
--- trunk/includes/footer.inc 2012-07-24 09:21:47 UTC (rev 5533)
+++ trunk/includes/footer.inc 2012-07-24 09:26:01 UTC (rev 5534)
@@ -1,29 +1,20 @@
<?php
/* $Id$*/
-echo '</div>'; //end of BODY div
-echo '<div id="FooterDiv">'; //start of FOOTER div
-echo '<table class="FooterTbl">';
-echo '<tr>';
-echo '<td style="width:33%"></td><td class="footer">';
-echo '<img src="'. $rootpath . '/' . $_SESSION['LogoFile'] . '" width="120" alt="webERP" title="webERP ' . _('Copyright') . ' © weberp.org - ' . date('Y') . '" /></td>';
-echo '<td class="footer" style="text-align: right;width:33%">'. DisplayDateTime() .'</td>';
-
-echo '</tr>';
-echo '<tr><td colspan="3" class="footer">webERP ' ._('version') .' ' . $_SESSION['VersionNumber'] . '</td></tr>';
-
-// if(http_file_exists('http://sflogo.sourceforge.net/sflogo.php')) {
-// echo '<tr><td class="footer"><a href="https://sourceforge.net/projects/web-erp"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=391629&type=12" width="120" height="30" border="0" alt="Get webERP web-based ERP Accounting at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a></td></tr>';
-// }
-
-echo '</table>';
-
-echo '</div>'; //end of FOOTER div
-
-echo '</div>'; //end of CANVAS div
-
-echo '</body>
+echo '<table width="100%" id="footer">
+ <tr>
+ <td style="width:33%"></td><td class="footer">
+ <img src="'. $rootpath . '/' . $_SESSION['LogoFile'] . '" width="120" alt="webERP" title="webERP ' . _('Copyright') . ' © weberp.org - ' . date('Y') . '" />
+ </td>
+ <td class="footer" style="text-align: right;width:33%">'. DisplayDateTime() .'</td>
+ </tr>
+ <tr>
+ <td colspan="3" class="footer">webERP ' ._('version') .' ' . $_SESSION['VersionNumber'] . '</td>
+ </tr>
+ </table>
+ </div>
+ </body>
</html>';
?>
Modified: trunk/includes/header.inc
===================================================================
--- trunk/includes/header.inc 2012-07-24 09:21:47 UTC (rev 5533)
+++ trunk/includes/header.inc 2012-07-24 09:26:01 UTC (rev 5534)
@@ -42,10 +42,8 @@
echo '<body>';
- echo '<div id="CanvasDiv">'; //start of CANVAS div
- echo '<div id="HeaderDiv">'; //start of HEADER div
-
- echo '<table class="HeaderTbl">';
+ echo '<div id="canvas">';
+ echo '<table class="callout_main" cellpadding="0" cellspacing="0">';
echo '<tr>';
echo '<td colspan="2" rowspan="2">';
@@ -93,6 +91,5 @@
echo '</td>';
echo '</tr>';
echo '</table>';
-echo '</div>'; //end of HEADER div
-echo '<div id="BodyDiv">'; //start of BODY div - contains left menu, three columns menu, forms, data, etc
-?>
+
+?>
\ No newline at end of file
Modified: trunk/index.php
===================================================================
--- trunk/index.php 2012-07-24 09:21:47 UTC (rev 5533)
+++ trunk/index.php 2012-07-24 09:26:01 UTC (rev 5534)
@@ -49,12 +49,12 @@
include('includes/footer.inc');
exit;
}
-echo 'x'.$PathPrefix.'x';
+
if (isset($_GET['Application'])){ /*This is sent by this page (to itself) when the user clicks on a tab */
$_SESSION['Module'] = $_GET['Application'];
}
-echo '<table class="BodyTbl">
+echo '<table width="99%">
<tr>
<td style="width:10%" valign="top">';
echo '<table class="main_menu" width="100%" cellspacing="0" cellpadding="0" border="0">';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dai...@us...> - 2012-07-24 09:26:11
|
Revision: 5534
http://web-erp.svn.sourceforge.net/web-erp/?rev=5534&view=rev
Author: daintree
Date: 2012-07-24 09:26:01 +0000 (Tue, 24 Jul 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/SelectProduct.php
trunk/SupplierInvoice.php
trunk/css/default/default.css
trunk/css/fresh/default.css
trunk/css/gel/default.css
trunk/css/jelly/default.css
trunk/css/professional/default.css
trunk/css/professional-rtl/default.css
trunk/css/silverwolf/default.css
trunk/doc/Change.log
trunk/includes/footer.inc
trunk/includes/header.inc
trunk/index.php
Modified: trunk/SelectProduct.php
===================================================================
--- trunk/SelectProduct.php 2012-07-24 09:21:47 UTC (rev 5533)
+++ trunk/SelectProduct.php 2012-07-24 09:26:01 UTC (rev 5534)
@@ -317,7 +317,7 @@
FROM salesorderdetails INNER JOIN salesorders
ON salesorders.orderno = salesorderdetails.orderno
INNER JOIN bom ON salesorderdetails.stkcode=bom.parent
- INNER JOIN stockmaster stockmaster.stockid=bom.parent
+ INNER JOIN stockmaster ON stockmaster.stockid=bom.parent
WHERE salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0
AND bom.component='" . $StockID . "'
AND stockmaster.mbflag='A'
Modified: trunk/SupplierInvoice.php
===================================================================
--- trunk/SupplierInvoice.php 2012-07-24 09:21:47 UTC (rev 5533)
+++ trunk/SupplierInvoice.php 2012-07-24 09:26:01 UTC (rev 5534)
@@ -1235,8 +1235,7 @@
$sql ="SELECT quantity
FROM locstock
- WHERE loccode='" . $LocCode . "'
- AND stockid='" . $EnteredGRN->ItemCode . "'";
+ WHERE stockid='" . $EnteredGRN->ItemCode . "'";
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The quantity on hand could not be retrieved from the database');
$DbgMsg = _('The following SQL to retrieve the total stock quantity was used');
$Result = DB_query($sql, $db, $ErrMsg, $DbgMsg);
Modified: trunk/css/default/default.css
===================================================================
--- trunk/css/default/default.css 2012-07-24 09:21:47 UTC (rev 5533)
+++ trunk/css/default/default.css 2012-07-24 09:26:01 UTC (rev 5534)
@@ -41,7 +41,6 @@
table {
background-color: #587BA6;
margin: 0 auto;
- width: 100%;
}
.dpTbl {
Modified: trunk/css/fresh/default.css
===================================================================
--- trunk/css/fresh/default.css 2012-07-24 09:21:47 UTC (rev 5533)
+++ trunk/css/fresh/default.css 2012-07-24 09:26:01 UTC (rev 5534)
@@ -49,7 +49,6 @@
table {
background-color: #ffffff;
margin: 0 auto;
- width: 95%;
}
.dpTbl {
Modified: trunk/css/gel/default.css
===================================================================
--- trunk/css/gel/default.css 2012-07-24 09:21:47 UTC (rev 5533)
+++ trunk/css/gel/default.css 2012-07-24 09:26:01 UTC (rev 5534)
@@ -70,7 +70,6 @@
border: 0px 0px 2px 2px #222 solid;
background: #eee;
margin: 0 auto;
- width: 95%;
}
.dpTbl {
Modified: trunk/css/jelly/default.css
===================================================================
--- trunk/css/jelly/default.css 2012-07-24 09:21:47 UTC (rev 5533)
+++ trunk/css/jelly/default.css 2012-07-24 09:26:01 UTC (rev 5534)
@@ -52,7 +52,6 @@
background: #eee;
border: 0px 0px 2px 2px #222 solid;
margin: 0 auto;
- width: 95%;
}
.dpTbl {
Modified: trunk/css/professional/default.css
===================================================================
--- trunk/css/professional/default.css 2012-07-24 09:21:47 UTC (rev 5533)
+++ trunk/css/professional/default.css 2012-07-24 09:26:01 UTC (rev 5534)
@@ -49,7 +49,6 @@
table {
background-color: #EEEEFF;
margin: 0 auto;
- width: 95%;
}
.dpTbl {
Modified: trunk/css/professional-rtl/default.css
===================================================================
--- trunk/css/professional-rtl/default.css 2012-07-24 09:21:47 UTC (rev 5533)
+++ trunk/css/professional-rtl/default.css 2012-07-24 09:26:01 UTC (rev 5534)
@@ -51,7 +51,6 @@
table {
background-color: #EEEEFF;
margin: 0 auto;
- width: 95%;
}
.dpTbl {
Modified: trunk/css/silverwolf/default.css
===================================================================
--- trunk/css/silverwolf/default.css 2012-07-24 09:21:47 UTC (rev 5533)
+++ trunk/css/silverwolf/default.css 2012-07-24 09:26:01 UTC (rev 5534)
@@ -55,7 +55,7 @@
table {
background-color: #fff;
- width: 100%;
+ margin: 0 auto;
}
th {
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2012-07-24 09:21:47 UTC (rev 5533)
+++ trunk/doc/Change.log 2012-07-24 09:26:01 UTC (rev 5534)
@@ -1,5 +1,7 @@
webERP Change Log
+24/7/2012 Exson/Phil: SupplierInvoice.php incorrect calculation of weighted average cost just using the stock quantity at a single location, now corrected
+24/7/2012 Phil: includes/Z_POSDataCreation.php - added system default date format config to POS data upload file
22/7/2012 Phil/Bob Thomas: Fix all scripts where demand was calculated including salesorder quotations (to exclude quotations). CounterSales.php DeliveryDetails.php SelectOrderItems.php StockCheck.php StockLocStatus.php
22/7/2012 Phil: Fixed on order quantities to exclude purchase orders with status completed and cancelled CounterSales.php SelectOrderItems.php DeliveryDetails.php StockLocStatus.php
21/7/2012 Hindra: Fix Aguapop theme and table and div nesting of index.php header.inc and footer.inc - and other themes table style width: 95%;
Modified: trunk/includes/footer.inc
===================================================================
--- trunk/includes/footer.inc 2012-07-24 09:21:47 UTC (rev 5533)
+++ trunk/includes/footer.inc 2012-07-24 09:26:01 UTC (rev 5534)
@@ -1,29 +1,20 @@
<?php
/* $Id$*/
-echo '</div>'; //end of BODY div
-echo '<div id="FooterDiv">'; //start of FOOTER div
-echo '<table class="FooterTbl">';
-echo '<tr>';
-echo '<td style="width:33%"></td><td class="footer">';
-echo '<img src="'. $rootpath . '/' . $_SESSION['LogoFile'] . '" width="120" alt="webERP" title="webERP ' . _('Copyright') . ' © weberp.org - ' . date('Y') . '" /></td>';
-echo '<td class="footer" style="text-align: right;width:33%">'. DisplayDateTime() .'</td>';
-
-echo '</tr>';
-echo '<tr><td colspan="3" class="footer">webERP ' ._('version') .' ' . $_SESSION['VersionNumber'] . '</td></tr>';
-
-// if(http_file_exists('http://sflogo.sourceforge.net/sflogo.php')) {
-// echo '<tr><td class="footer"><a href="https://sourceforge.net/projects/web-erp"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=391629&type=12" width="120" height="30" border="0" alt="Get webERP web-based ERP Accounting at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a></td></tr>';
-// }
-
-echo '</table>';
-
-echo '</div>'; //end of FOOTER div
-
-echo '</div>'; //end of CANVAS div
-
-echo '</body>
+echo '<table width="100%" id="footer">
+ <tr>
+ <td style="width:33%"></td><td class="footer">
+ <img src="'. $rootpath . '/' . $_SESSION['LogoFile'] . '" width="120" alt="webERP" title="webERP ' . _('Copyright') . ' © weberp.org - ' . date('Y') . '" />
+ </td>
+ <td class="footer" style="text-align: right;width:33%">'. DisplayDateTime() .'</td>
+ </tr>
+ <tr>
+ <td colspan="3" class="footer">webERP ' ._('version') .' ' . $_SESSION['VersionNumber'] . '</td>
+ </tr>
+ </table>
+ </div>
+ </body>
</html>';
?>
Modified: trunk/includes/header.inc
===================================================================
--- trunk/includes/header.inc 2012-07-24 09:21:47 UTC (rev 5533)
+++ trunk/includes/header.inc 2012-07-24 09:26:01 UTC (rev 5534)
@@ -42,10 +42,8 @@
echo '<body>';
- echo '<div id="CanvasDiv">'; //start of CANVAS div
- echo '<div id="HeaderDiv">'; //start of HEADER div
-
- echo '<table class="HeaderTbl">';
+ echo '<div id="canvas">';
+ echo '<table class="callout_main" cellpadding="0" cellspacing="0">';
echo '<tr>';
echo '<td colspan="2" rowspan="2">';
@@ -93,6 +91,5 @@
echo '</td>';
echo '</tr>';
echo '</table>';
-echo '</div>'; //end of HEADER div
-echo '<div id="BodyDiv">'; //start of BODY div - contains left menu, three columns menu, forms, data, etc
-?>
+
+?>
\ No newline at end of file
Modified: trunk/index.php
===================================================================
--- trunk/index.php 2012-07-24 09:21:47 UTC (rev 5533)
+++ trunk/index.php 2012-07-24 09:26:01 UTC (rev 5534)
@@ -49,12 +49,12 @@
include('includes/footer.inc');
exit;
}
-echo 'x'.$PathPrefix.'x';
+
if (isset($_GET['Application'])){ /*This is sent by this page (to itself) when the user clicks on a tab */
$_SESSION['Module'] = $_GET['Application'];
}
-echo '<table class="BodyTbl">
+echo '<table width="99%">
<tr>
<td style="width:10%" valign="top">';
echo '<table class="main_menu" width="100%" cellspacing="0" cellpadding="0" border="0">';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dai...@us...> - 2012-07-26 08:28:05
|
Revision: 5559
http://web-erp.svn.sourceforge.net/web-erp/?rev=5559&view=rev
Author: daintree
Date: 2012-07-26 08:27:54 +0000 (Thu, 26 Jul 2012)
Log Message:
-----------
Hindra's theming work
Modified Paths:
--------------
trunk/css/aguapop/default.css
trunk/css/default/default.css
trunk/includes/footer.inc
trunk/includes/header.inc
trunk/index.php
Modified: trunk/css/aguapop/default.css
===================================================================
--- trunk/css/aguapop/default.css 2012-07-25 09:31:43 UTC (rev 5558)
+++ trunk/css/aguapop/default.css 2012-07-26 08:27:54 UTC (rev 5559)
@@ -1,79 +1,311 @@
-/*** hj aquapop new ***/
+/***
+
+New AguaPop theme for WebERP by Hindra Joshua
+
+Using new theming support any without background images
+
+****/
+
body {
- background: silver;
-}
-#CanvasDiv {
- background: none;
font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 9px;
- margin-left: auto;
- margin-right: auto;
- width: 960px;
+ font-size: 8pt;
+/* color:white;*/
+ background: silver;
+ margin:0;
+ padding:0;
}
+
+img {
+ vertical-align:middle;
+}
+/*a {
+ color: blue;
+ text-decoration: none;
+}
+a:hover {
+ color: lightblue;
+ text-decoration: none;
+}*/
+table {
+ background-color: none;
+ margin: 0 auto;
+ width:90%
+}
+
+
+/*** CANVAS ************************************************************/
+
+#CanvasDiv {
+ background:steelblue;
+ margin:10px;
+ border:thick outset steelblue;
+ border-radius:20px;
+}
+
/*** HEADER ************************************************************/
+
#HeaderDiv {
- background: url(images/top_bg.png) top no-repeat silver;
+ padding:2px;
+ color:white;
}
-.HeaderTbl {
- padding-top:12px;
- width:99%;
+#HeaderDiv a{
+ color:white;
+ text-decoration:none;
+ border:2px inset transparent;
+ border-radius:10px;
+ padding:3px;
}
+#HeaderDiv a:hover{
+ color:cyan;
+ border:2px inset steelblue;
+ border-radius:10px;
+ padding:3px;
+}
+#HeaderWrapDiv{
+}
+#AppInfoDiv{
+ float:left;
+}
+#AppInfoCompanyDiv{
+ float:left;
+}
+#AppInfoUserDiv{
+ float:left;
+}
+#AppInfoModuleDiv{
+ font-weight:bold;
+ font-size:10pt;
+}
+
+/*** Quick Menu ***/
+
+#QuickMenuDiv{
+ float:right;
+}
+#QuickMenuDiv ul{
+ list-style:none;
+ float:right;
+}
+#QuickMenuDiv ul li{
+ display:inline;
+ margin: 0px 3px;
+ float: left;
+}
+
/*** BODY **************************************************************/
+
#BodyDiv {
- background:url("images/body_bg.png") repeat-y scroll center center silver;
- text-align:center;
+ clear:both;
}
-.BodyTbl {
- background:none repeat scroll 0 0 steelblue;
- width:932px;
+#BodyWrapDiv{
+ background:lightsteelblue;
+ margin:5px;
}
-/*** eof BodyDiv ***
-/*** FOOTER ************************************************************/
-#FooterDiv {
- background: url(images/footer.png) bottom no-repeat silver;
- padding-top: 10px;
- padding-bottom: 18px;
+/*** MAIN MENU ***/
+
+#MainMenuDiv{
+ float:left;
+ width:10%;
+ white-space:nowrap;
+ text-align:center;
+ padding:3px;
}
+#MainMenuDiv ul{
+ margin:0;
+ padding:0;
+}
+#MainMenuDiv li{
+ list-style:none;
+}
+#MainMenuDiv li a:link, a:visited{
+ color:white;
+ text-decoration:none;
+}
+#MainMenuDiv li a:hover{
+ color:cyan;
+}
-.FooterTbl {
- width:838px;
+.main_menu_unselected {
+ border:2px inset transparent;
+ border-radius:10px;
+ padding:3px;
}
-/************************************************************************/
+.main_menu_unselected:hover{
+ border:2px inset steelblue;
+ border-radius:10px;
+ padding:3px;
+}
+.main_menu_unselected a{
+}
+.main_menu_unselected a:hover{
+}
-img {
- border: none;
- vertical-align:middle;
+.main_menu_selected {
+ border:2px inset steelblue;
+ border-radius:10px;
+ padding:3px;
}
+.main_menu_selected:hover{
+ border:2px inset steelblue;
+ border-radius:10px;
+ padding:3px;
+}
+.main_menu_selected a{
+}
+.main_menu_selected a:hover{
+}
-/*links before selection */
-a {
+/*********************************************/
+#SubMenuDiv{
+ float:right;
+ margin:0;
+ padding:0;
+ overflow: hidden;
+ width: 87%;
+}
+#SubMenuDiv ul{
+ margin:0;
+ padding:0;
+}
+#SubMenuDiv li{
+ list-style:none;
+}
+#SubMenuDiv a{
+ color:black;
+ text-decoration:none;
+}
+#SubMenuDiv a:hover{
+ color:blue;
+ text-decoration:none;
+}
+#TransactionsDiv{
+ background:whitesmoke;
+ border:thin inset whitesmoke;
+ float:left;
+ list-style:none;
+ width:32%;
+ padding:0px;
+}
+#InquiriesDiv{
+ background:whitesmoke;
+ border:thin inset whitesmoke;
+ float:left;
+ list-style:none;
+ width:32%;
+ padding:0px;
+}
+#MaintenanceDiv{
+ background:whitesmoke;
+ border:thin inset whitesmoke;
+ float:left;
+ list-style:none;
+ width:32%;
+ padding:0px;
+}
+.menu_group_headers {
+ background:steelblue;
+ border:thin outset steelblue;
+ padding:3px;
+ text-align:center;
+ color:white;
+}
+.menu_group_headers table{
+}
+.menu_group_img {
+ background-color: gainsboro;
+ text-align: center;
+ width: 90px;
+ position: relative;
+ left: 3px;
+}
+
+.menu_group_img img{
+ position: relative;
+ top: 10px;
+}
+
+.menu_group_area {
font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 9px;
+ font-size: 11px;
font-weight: bold;
- text-decoration: none;
- color: black;
+ border-top: 0px;
+ margin-top: 0px;
+ padding-top: 0px; /*this creates the border*/
+ color: seagreen;
}
-/*links on any screen when mouse is hovering over them */
-a:hover {
- color: seagreen;
- text-decoration: none;
+.blank_area table {
+ border: 0px;
+ width: 100%;
}
-table {
- background-color: none;
- margin: 0 auto;
- width:90%
+
+
+.menu_group_headers_text {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-size: 12px;
+ font-weight: bold;
+ color: white;
}
+.menu_group_items {
+ vertical-align: top;
+ background-color: white;
+ font-weight: bold;
+ padding: 15px;
+ border: 1px inset steelblue;
+}
+
+.menu_group_item {
+ padding:3px;
+}
+.menu_group_item:hover{
+ background:lightblue;
+}
+
+.menu_group_item p {
+ color: steelblue; /* This is the color for bullets, I like it to be the same as the anchor color, but it's up to you */
+ text-indent: -12px; /* this makes the bullet to appear as the li tag previously used */
+ margin: 0 0 0 12px;
+}
+/*** FOOTER ************************************************************/
+#FooterDiv{
+ clear:both;
+ color:black;
+ height:52px;
+}
+#FooterWrapDiv{
+ padding:5px;
+}
+#FooterLogoDiv{
+ background:white;
+ border:2px outset sandybrown;
+ border-radius:8px 8px 8px 8px;
+ float:left;
+ padding:5px;
+}
+#FooterVersionDiv{
+ float:left;
+ margin-left:10px;
+ margin-top:15px;
+
+}
+#FooterTimeDiv{
+ float:right;
+ margin-top:15px;
+}
+
+/************************************************************************/
+
+
.dpTbl {
border: solid navy 1px;
}
div.centre {
- /*padding-bottom:10px;*/
+ padding-bottom:5px;
text-align:center;
}
@@ -89,8 +321,8 @@
}
table.selection {
- background:none repeat scroll 0 0 lightsteelblue;
- border:2px outset steelblue;
+ background:whitesmoke;
+ border:2px inset whitesmoke;
padding:0;
width:90%;
}
@@ -400,47 +632,6 @@
margin: 2px;
}
-.main_menu_unselected {
- background-color: steelblue;
- padding: 2px;
- border-bottom: 2px;
- font-weight: normal;
- position: relative;
- top: 0px;
- text-align: left;
- white-space: nowrap;
-
-}
-
-.main_menu_unselected:hover{
-}
-.main_menu_selected:hover{
-}
-
-.main_menu_unselected a{
-}
-
-.main_menu_unselected a:hover{
-}
-
-.main_menu_selected {
- background: url(images/tab_bg.png)right no-repeat steelblue;
- padding: 3px;
- padding-right: 0px;
- font-weight: normal;
- position: relative;
- text-align: right;
- white-space: nowrap;
-}
-
-.main_menu_selected a{
-
-}
-
-.main_menu_selected a:hover{
-
-}
-
span.main_menu_nolink {
font-family: Arial, Verdana, Helvetica, sans-serif;
font-size: 10px;
@@ -462,73 +653,12 @@
color: lightsteelblue;
}
-.menu_group_img {
- background-color: gainsboro;
- text-align: center;
- width: 90px;
- position: relative;
- left: 3px;
-}
-.menu_group_img img{
- position: relative;
- top: 10px;
-}
-.menu_group_area {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 11px;
- font-weight: bold;
- border-top: 0px;
- margin-top: 0px;
- padding-top: 0px; /*this creates the border*/
- color: seagreen;
-}
-
-.blank_area table {
- border: 0px;
- width: 100%;
-}
-
-.menu_group_headers {
- background:lightsteelblue;
-}
-
-.menu_group_headers table{
- }
-
-.menu_group_headers_text {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 12px;
- font-weight: bold;
- color: white;
-}
-
-.menu_group_items {
- vertical-align: top;
- background-color: white;
- font-weight: bold;
- padding: 15px;
- border: 1px inset steelblue;
-}
-
-.menu_group_item {
- background-color: white;
- padding-top: 2px;
- padding-bottom: 2px;
-}
-
-.menu_group_item p {
- color: steelblue; /* This is the color for bullets, I like it to be the same as the anchor color, but it's up to you */
- text-indent: -12px; /* this makes the bullet to appear as the li tag previously used */
- margin: 0 0 0 12px;
-}
-
.page_title_text {
font-weight:bold;
- margin-top:0;
- padding-bottom:5px;
- padding-top:5px;
+ text-align:center;
+ padding-top:5px;
}
DIV.page_help_text {
Modified: trunk/css/default/default.css
===================================================================
--- trunk/css/default/default.css 2012-07-25 09:31:43 UTC (rev 5558)
+++ trunk/css/default/default.css 2012-07-26 08:27:54 UTC (rev 5559)
@@ -1,25 +1,20 @@
-/*--------------------------------------------------\
-| | | default.css |
-|---------------------------------------------------|
-| For use with: |
-| Web-ERP - http://web-erp.sourceforge.net |
-\--------------------------------------------------*/
+/***
-/* $Id$*/
+New Default Theme for WebERP
+***/
+
body {
font-family: Arial, Verdana, Helvetica, sans-serif;
font-size: 10px;
background-color: #CCCCDD;
- margin-left: 0px;
- margin-top: 0px;
- margin-bottom: 0px;
- margin-right: 0px;
- padding: 0px;
+ margin:0;
+ padding:0
}
img {
border:none;
+ vertical-align:middle;
}
/*links before selection */
@@ -41,17 +36,259 @@
table {
background-color: #587BA6;
margin: 0 auto;
+ width:100%;
}
-.dpTbl {
- border: solid navy 1px;
+
+/*** CANVAS ***/
+
+#CanvasDiv {
}
+/*** HEADER ***/
+
+#HeaderDiv {
+ color:white;
+ background:#588BB6;
+ overflow:hidden;
+}
+#HeaderDiv a{
+ color:white;
+}
+#HeaderDiv a:hover{
+ color:black;
+ background:white;
+ text-decoration:underline;
+}
+#HeaderWrapDiv{
+}
+
+/*** HEADER - APP INFO ***/
+
+#AppInfoDiv{
+ display:table;
+ float:left;
+ padding:
+}
+#AppInfoDiv img{
+ vertical-align:middle;
+}
+#AppInfoCompanyDiv{
+ display:table-cell;
+}
+#AppInfoUserDiv{
+ display:table-cell;
+}
+#AppInfoModuleDiv{
+ display:table-row-group;
+}
+
+/*** HEADER - QUICK MENU ***/
+
+#QuickMenuDiv{
+ float:right;
+}
+#QuickMenuDiv ul{
+}
+#QuickMenuDiv ul li{
+ display:inline;
+ border-left:thin ridge #588BB6;
+ padding:10px;
+}
+
+/*** BODY ***/
+
+#BodyDiv {
+ clear:both;
+/* margin-left:5px;
+ margin-right:5px;*/
+ color:black;
+ background:#588BB6;
+ overflow:hidden;
+}
+#BodyDiv table {
+ width:90%;
+ text-align:center;
+}
+
+#BodyWrapDiv{
+ background:#CCCCCC;
+}
+
+/*** BODY - MAIN MENU ***/
+
+#MainMenuDiv{
+ float:left;
+ width:11%;
+ white-space:nowrap;
+ text-align:center;
+ border:thin solid gray;
+}
+#MainMenuDiv ul{
+ margin:0;
+ padding:0;
+}
+#MainMenuDiv li{
+ list-style:none;
+}
+#MainMenuDiv li a:link, a:visited{
+/* color:black;
+ font-weight:bold;*/
+}
+#MainMenuDiv li a:hover{
+ color:black;
+ background:white;
+ text-decoration:underline;
+}
+
+.main_menu_unselected{
+ background:#40FC40;
+ padding:2px;
+}
+.main_menu_unselected:hover{
+ background:white;
+}
+.main_menu_unselected a{
+}
+.main_menu_unselected a:hover{
+}
+.main_menu_selected {
+ background-color: white;
+ border:thin solid gray;
+ font-weight: normal;
+ text-align: center;
+ white-space: nowrap;
+ padding:2px;
+}
+.main_menu_selected:hover{
+}
+.main_menu_selected a{
+}
+.main_menu_selected a:hover{
+}
+
+/*** BODY - SUB MENU ***/
+
+#SubMenuDiv{
+ display:table;
+ float:right;
+ overflow: hidden;
+ min-width: 88%;
+}
+#SubMenuDiv ul{
+ margin:0;
+ padding:0;
+}
+#SubMenuDiv li{
+ list-style:none;
+}
+#SubMenuDiv a{
+}
+#SubMenuDiv a:hover{
+ color:green;
+ text-decoration:underline;
+}
+#TransactionsDiv{
+ float:left;
+ list-style:none;
+ width:33%;
+ border:thin solid black;
+ background:#EEEEEE;
+/* display:table-cell; */
+}
+#InquiriesDiv{
+ float:left;
+ list-style:none;
+ width:33%;
+ border:thin solid black;
+ background:#EEEEEE;
+/* display:table-cell; */
+}
+#MaintenanceDiv{
+ float:left;
+ list-style:none;
+ width:33%;
+ border:thin solid black;
+ background:#EEEEEE;
+/* display:table-cell; */
+}
+.menu_group_headers {
+ text-align:center;
+ color:black;
+ background:#EEEEEE;
+ border: thin outset #EEEEEE;
+}
+/*.menu_group_headers table{
+}*/
+/*.menu_group_headers_text {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-size: 10px;
+ font-weight: normal;
+ color: white;
+}
+*/
+/*.menu_group_items {
+ background-color: white;
+ font-weight: normal;
+ padding: 15px;
+ border-top: 0px #AAAAAA solid;
+ border-left: 0px #AAAAAA solid;
+ border-right: 0px white solid;
+ border-bottom: 0px white solid;
+}*/
+.menu_group_item {
+ background-color: white;
+ padding:2px;
+}
+.menu_group_item p {
+ color: #00f; /* This is the color for bullets, I like it to be the same as the anchor color, but it's up to you */
+ text-indent: -12px; /* this makes the bullet to appear as the li tag previously used */
+ margin: 0 0 0 12px; /* One thing that I didn´t like of the li was that it had no left margin applied */
+}
+
+/*** FOOTER ***/
+
+#FooterDiv{
+ clear:both;
+ color:#CCCCCC;
+ background:#588BB6;
+ overflow:hidden;
+}
+#FooterWrapDiv{
+ overflow:hidden;
+ padding:5px;
+}
+#FooterLogoDiv{
+ background:white;
+ border-radius:8px 8px 8px 8px;
+ float:left;
+ padding:5px;
+}
+#FooterVersionDiv{
+ float:left;
+ margin-left:10px;
+ margin-top:15px;
+
+}
+#FooterTimeDiv{
+ float:right;
+ margin-top:15px;
+}
+
+/*** MISC ***/
+
div.centre {
margin: 0 auto;
text-align:center;
}
+
+
+/*
+.dpTbl {
+ border: solid navy 1px;
+}
+
/*table detail items default format */
td {
font-family: Arial, Verdana, Helvetica, sans-serif;
@@ -410,55 +647,8 @@
margin-bottom: 2px;
}
-.main_menu_unselected {
- background-color: #40fc40;
- border-left: 1px #AAAAAA solid;
- border-right: 1px #AAAAAA solid;
- border-bottom: 0px;
- font-weight: normal;
- height: 16pt;
- position: relative;
- top: 3px;
- text-align: center;
- white-space: nowrap;
-}
-.main_menu_unselected:hover{
-}
-.main_menu_selected:hover{
-}
-
-.main_menu_unselected a{
-}
-
-.main_menu_unselected a:hover{
-}
-
-.main_menu_selected {
- background-color: white;
- border-top: 1px #AAAAAA solid;
- border-left: 1px #AAAAAA solid;
- border-right: 1px #AAAAAA solid;
- border-bottom: 0px;
- font-weight: normal;
- height: 16pt;
- position: relative;
- top: 3px;
- text-align: center;
- white-space: nowrap;
-}
-
-.main_menu_selected a{
- color: #eee;
- font-weight:bold;
-}
-
-.main_menu_selected a:hover{
- color: #fff;
- text-decoration: none;
-}
-
span.main_menu_nolink {
font-family: Arial, Verdana, Helvetica, sans-serif;
font-size: 10px;
@@ -507,43 +697,8 @@
width: 100%;
}
-.menu_group_headers {
- border: 0px outset #AAAAAA;
- width: 25%;
-}
-.menu_group_headers table{
- }
-.menu_group_headers_text {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 10px;
- font-weight: normal;
- color: white;
-}
-
-.menu_group_items {
- background-color: white;
- font-weight: normal;
- padding: 15px;
- border-top: 0px #AAAAAA solid;
- border-left: 0px #AAAAAA solid;
- border-right: 0px white solid;
- border-bottom: 0px white solid;
-}
-
-.menu_group_item {
- background-color: white;
- padding-top: 2px;
- padding-bottom: 2px;
-}
-
-.menu_group_item p {
- color: #00f; /* This is the color for bullets, I like it to be the same as the anchor color, but it's up to you */
- text-indent: -12px; /* this makes the bullet to appear as the li tag previously used */
- margin: 0 0 0 12px; /* One thing that I didn´t like of the li was that it had no left margin applied */
-}
-
.page_title_text {
font-family: Arial, Verdana, Helvetica, sans-serif;
padding-top: 2px;
Modified: trunk/includes/footer.inc
===================================================================
--- trunk/includes/footer.inc 2012-07-25 09:31:43 UTC (rev 5558)
+++ trunk/includes/footer.inc 2012-07-26 08:27:54 UTC (rev 5559)
@@ -2,19 +2,32 @@
/* $Id$*/
-echo '<table width="100%" id="footer">
- <tr>
- <td style="width:33%"></td><td class="footer">
- <img src="'. $rootpath . '/' . $_SESSION['LogoFile'] . '" width="120" alt="webERP" title="webERP ' . _('Copyright') . ' © weberp.org - ' . date('Y') . '" />
- </td>
- <td class="footer" style="text-align: right;width:33%">'. DisplayDateTime() .'</td>
- </tr>
- <tr>
- <td colspan="3" class="footer">webERP ' ._('version') .' ' . $_SESSION['VersionNumber'] . '</td>
- </tr>
- </table>
- </div>
- </body>
- </html>';
+echo '</div>'; // BodyWrapDiv ===HJ===
+echo '</div>'; // BodyDiv ===HJ===
+echo '<div id="FooterDiv">'; //===HJ===
+echo '<div id="FooterWrapDiv">'; //===HJ===
+
+echo '<div id="FooterLogoDiv">'; //===HJ===
+ echo '<img src="'. $rootpath . '/' . $_SESSION['LogoFile'] . '" width="120" alt="webERP" title="webERP ' . _('Copyright') . ' © weberp.org - ' . date('Y') . '" /></td>';
+echo '</div>';
+
+echo '<div id="FooterVersionDiv">'; //===HJ===
+ echo 'webERP ' ._('version') .' ' . $_SESSION['VersionNumber'];
+echo '</div>';
+
+echo '<div id="FooterTimeDiv">'; //===HJ===
+ echo DisplayDateTime();
+echo '</div>';
+
+// if(http_file_exists('http://sflogo.sourceforge.net/sflogo.php')) {
+// echo '<tr><td class="footer"><a href="https://sourceforge.net/projects/web-erp"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=391629&type=12" width="120" height="30" border="0" alt="Get webERP web-based ERP Accounting at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a></td></tr>';
+// }
+
+echo '</div>'; // FooterWrapDiv ===HJ===
+echo '</div>'; // FooterDiv ===HJ===
+
+echo '</body>';
+echo '</html>';
+
?>
Modified: trunk/includes/header.inc
===================================================================
--- trunk/includes/header.inc 2012-07-25 09:31:43 UTC (rev 5558)
+++ trunk/includes/header.inc 2012-07-26 08:27:54 UTC (rev 5559)
@@ -11,9 +11,11 @@
$rootpath = '';
}
}
+
+ $ViewTopic = isset($ViewTopic)?'?ViewTopic=' . $ViewTopic : '';
+ $BookMark = isset($BookMark)? '#' . $BookMark : '';
$StrictXHTML=False;
- $ViewTopic = isset($ViewTopic)?"?ViewTopic=$ViewTopic":'';
- $BookMark = isset($BookMark)? "#$BookMark":'';
+
if (!headers_sent()){
if ($StrictXHTML) {
header('Content-type: application/xhtml+xml; charset=utf-8');
@@ -27,7 +29,6 @@
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
-
echo '<html xmlns="http://www.w3.org/1999/xhtml"><head><title>' . $title . '</title>';
echo '<link rel="shortcut icon" href="'. $rootpath.'/favicon.ico" />';
echo '<link rel="icon" href="' . $rootpath.'/favicon.ico" />';
@@ -39,40 +40,45 @@
echo '<link href="' . $rootpath . '/css/'. $_SESSION['Theme'] .'/default.css" rel="stylesheet" type="text/css" />';
echo '<script type="text/javascript" src = "'.$rootpath.'/javascripts/MiscFunctions.js"></script>';
echo '</head>';
-
echo '<body>';
- echo '<div id="canvas">';
- echo '<table class="callout_main" cellpadding="0" cellspacing="0">';
- echo '<tr>';
- echo '<td colspan="2" rowspan="2">';
+ echo '<div id="CanvasDiv">';
+ echo '<div id="HeaderDiv">';
+ echo '<div id="HeaderWrapDiv">';
+
+
if (isset($title)) {
- echo '<table cellpadding="0" cellspacing="0" border="0" id="quick_menu" class="quick_menu">';
- echo '<tr>';
- echo '<td align="left" style="width:100%;" class="quick_menu_left">';
-// Use icons for company and user data, saves screen realestate, use alt tag in case theme icon not avail.
- echo '<img src="'.$rootpath.'/css/'.$theme.'/images/company.png" title="' . _('Company') . '" alt="' . _('Company') . '" />';
- echo ' ' . stripslashes($_SESSION['CompanyRecord']['coyname']) . ' <a href="' . $rootpath . '/UserSettings.php"><img src="'.$rootpath.'/css/'.$theme.'/images/user.png" title="User" alt="' . _('User') . '" />' . stripslashes($_SESSION['UsersRealName']) . '</a>';
-// Make the title text a class, can be set to display:none is some themes
- echo '<br />' . $title . '</td>';
- echo '<td class="quick_menu_tabs">';
- echo '<table cellpadding="0" cellspacing="0" class="quick_menu_tabs"><tr>';
- echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/index.php"><span style="text-decoration:underline;">1</span> ' . _('Main Menu') . '</a></td>';
- if (count($_SESSION['AllowedPageSecurityTokens'])>1){
+
+ echo '<div id="AppInfoDiv">'; //===HJ===
+ echo '<div id="AppInfoCompanyDiv">';
+ echo '<img src="'.$rootpath.'/css/'.$theme.'/images/company.png" title="'._('Company').'" alt="'._('Company').'"/>'.stripslashes($_SESSION['CompanyRecord']['coyname']);
+ echo '</div>';
+ echo '<div id="AppInfoUserDiv">';
+ echo '<a href="'. $rootpath.'/UserSettings.php"><img src="'.$rootpath.'/css/'.$theme.'/images/user.png" title="User" alt="'._('User').'"/>'.stripslashes($_SESSION['UsersRealName']).'</a>';
+ echo '</div>';
+ echo '<div id="AppInfoModuleDiv">';
+ // Make the title text a class, can be set to display:none is some themes
+ echo $title;
+ echo '</div>';
+ echo '</div>'; // AppInfoDiv
- echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/SelectCustomer.php"><span style="text-decoration:underline;">2</span> ' . _('Customers') . '</a></td>';
- echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/SelectProduct.php"><span style="text-decoration:underline;">3</span> ' . _('Items') . '</a></td>';
+ echo '<div id="QuickMenuDiv"><ul>';
+
+ echo '<li><a href="'.$rootpath.'/index.php">'._('Main Menu').'</a></li>'; //take off inline formatting, use CSS instead ===HJ===
- echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/SelectSupplier.php"><span style="text-decoration:underline;">4</span> ' . _('Suppliers') . '</a></td>';
+ if (count($_SESSION['AllowedPageSecurityTokens'])>1){
+ echo '<li><a href="'.$rootpath.'/SelectCustomer.php">'._('Customers').'</a></li>';
+ echo '<li><a href="'.$rootpath.'/SelectProduct.php">' ._('Items') .'</a></li>';
+ echo '<li><a href="'.$rootpath.'/SelectSupplier.php">'._('Suppliers').'</a></li>';
+
+ $DefaultManualLink = '<li><a rel="external" accesskey="8" href="' . $rootpath . '/doc/Manual/ManualContents.php'. $ViewTopic . $BookMark. '">'._('Manual').'</a></li>';
- $DefaultManualLink = '<td class="quick_menu_tab" align="center"><a rel="external" accesskey="8" href="' . $rootpath . '/doc/Manual/ManualContents.php'. $ViewTopic . $BookMark. '"><span style="text-decoration:underline;">8</span> ' . _('Manual') . '</a></td>';
-
- if (mb_substr($_SESSION['Language'],0,2) !='en'){
- if (file_exists('locale/' . $_SESSION['Language'] . '/Manual/ManualContents.php')){
- echo '<td class="quick_menu_tab" align="center"><a target="_blank" href="' . $rootpath . '/locale/' . $_SESSION['Language'] . '/Manual/ManualContents.php'.$ViewTopic . $BookMark.'"><span style="text-decoration:underline;">8</span> ' . _('Manual') . '</a></td>';
+ if (mb_substr($_SESSION['Language'],0,2) != 'en'){
+ if (file_exists('locale/'.$_SESSION['Language'].'/Manual/ManualContents.php')){
+ echo '<li><a target="_blank" href="'.$rootpath.'/locale/'.$_SESSION['Language'].'/Manual/ManualContents.php'. $ViewTopic . $BookMark. '">'._('Manual').'</a></li>';
} else {
echo $DefaultManualLink;
}
@@ -81,15 +87,13 @@
}
}
- echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/Logout.php" onclick="return confirm(\'' . _('Are you sure you wish to logout?') . '\');"><span style="text-decoration:underline;">0</span> ' . _('Logout') . '</a></td>';
+ echo '<li><a href="'.$rootpath.'/Logout.php" onclick="return confirm(\''._('Are you sure you wish to logout?').'\');">'._('Logout').'</a></l>';
- echo '</tr></table>';
- echo '</td></tr></table>';
-
+ echo '</ul></div>'; // QuickMenuDiv
}
+ echo '</div>'; // HeaderWrapDiv
+ echo '</div>'; // Headerdiv
+ echo '<div id="BodyDiv">';
+ echo '<div id="BodyWrapDiv">';
-echo '</td>';
-echo '</tr>';
-echo '</table>';
-
-?>
\ No newline at end of file
+?>
Modified: trunk/index.php
===================================================================
--- trunk/index.php 2012-07-25 09:31:43 UTC (rev 5558)
+++ trunk/index.php 2012-07-26 08:27:54 UTC (rev 5559)
@@ -5,6 +5,7 @@
$title=_('Main Menu');
include('includes/header.inc');
+
/*The module link codes are hard coded in a switch statement below to determine the options to show for each tab */
include('includes/MainMenuLinksArray.php');
@@ -46,6 +47,7 @@
</td>
</tr>
</table>';
+
include('includes/footer.inc');
exit;
}
@@ -54,15 +56,10 @@
$_SESSION['Module'] = $_GET['Application'];
}
-echo '<table width="99%">
- <tr>
- <td style="width:10%" valign="top">';
-echo '<table class="main_menu" width="100%" cellspacing="0" cellpadding="0" border="0">';
-
+//=== MainMenuDiv =======================================================================
+echo '<div id="MainMenuDiv"><ul>'; //===HJ===
$i=0;
-
while ($i < count($ModuleLink)){
-
// This determines if the user has display access to the module see config.php and header.inc
// for the authorisation and security code
if ($_SESSION['ModulesEnabled'][$i]==1) {
@@ -72,121 +69,103 @@
$_SESSION['Module']=$ModuleLink[$i];
}
if ($ModuleLink[$i] == $_SESSION['Module']){
- echo '<tr>
- <td class="main_menu_selected"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></td>
- </tr>';
+ echo '<li class="main_menu_selected">';
} else {
- echo '<tr>
- <td class="main_menu_unselected"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></td>
- </tr>';
+ echo '<li class="main_menu_unselected">';
+
}
+ echo '<a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></li>';
}
$i++;
}
+echo '</ul></div>'; // MainMenuDiv ===HJ===
-echo '</table>';
-echo '</td>';
-echo '<td style="width:30%" valign="top">';
+//=== SubMenuDiv (wrapper) ==============================================================================
+echo '<div id="SubMenuDiv">'; //===HJ===
+
+
+echo '<div id="TransactionsDiv"><ul>'; //=== TransactionsDiv ===
+
+echo '<li class="menu_group_headers">'; //=== SubMenuHeader ===
if ($_SESSION['Module']=='system') {
$Header='<img src="' . $rootpath . '/css/' . $theme . '/images/company.png" title="' . _('General Setup Options') . '" alt="' . _('General Setup Options') . '" /><b>' . _('General Setup Options') . '</b>';
} else {
$Header='<img src="' . $rootpath . '/css/' . $theme . '/images/transactions.png" title="' . _('Transactions') . '" alt="' . _('Transactions') . '" /><b>'. _('Transactions') . '</b>';
}
-echo ' <table width="100%" class="selection">
- <tr>
- <td class="menu_group_headers">
- <div class="centre">
- ' . $Header . '
- </div>
- </td>
- </tr>';
+echo $Header;
+echo '</li>'; // SubMenuHeader
+//=== SubMenu Items ===
$i=0;
foreach ($MenuItems[$_SESSION['Module']]['Transactions']['Caption'] as $Caption) {
/* Transactions Menu Item */
$ScriptNameArray = explode('?', substr($MenuItems[$_SESSION['Module']]['Transactions']['URL'][$i],1));
$PageSecurity = $_SESSION['PageSecurityArray'][$ScriptNameArray[0]];
if ((in_array($PageSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PageSecurity))) {
- echo '<tr>
- <td class="menu_group_item">
- <p>• <a href="' . $rootpath . $MenuItems[$_SESSION['Module']]['Transactions']['URL'][$i] .'">' . $Caption . '</a></p>
- </td>
- </tr>';
+ echo '<li class="menu_group_item">
+ <p>• <a href="' . $rootpath . $MenuItems[$_SESSION['Module']]['Transactions']['URL'][$i] .'">' . $Caption . '</a></p>
+ </li>';
}
$i++;
}
-echo '</table>';
-echo '</td>';
+echo '</ul></div>'; //=== TransactionsDiv ===
-echo '<td style="width:30%" valign="top">';
+echo '<div id="InquiriesDiv"><ul>'; //=== InquiriesDiv ===
+
+echo '<li class="menu_group_headers">';
if ($_SESSION['Module']=='system') {
$Header='<img src="' . $rootpath . '/css/' . $theme . '/images/ar.png" title="' . _('Receivables/Payables Setup') . '" alt="' . _('Receivables/Payables Setup') . '" /><b>' . _('Receivables/Payables Setup') . '</b>';
} else {
$Header='<img src="' . $rootpath . '/css/' . $theme . '/images/reports.png" title="' . _('Inquiries and Reports') . '" alt="' . _('Inquiries and Reports') . '" /><b>'. _('Inquiries and Reports') . '</b>';
}
-echo ' <table width="100%" class="selection">
- <tr>
- <td class="menu_group_headers">
- <div class="centre">
- ' . $Header . '
- </div>
- </td>
- </tr>';
+echo $Header;
+echo '</li>';
+
+
$i=0;
foreach ($MenuItems[$_SESSION['Module']]['Reports']['Caption'] as $Caption) {
/* Transactions Menu Item */
$ScriptNameArray = explode('?', substr($MenuItems[$_SESSION['Module']]['Reports']['URL'][$i],1));
$PageSecurity = $_SESSION['PageSecurityArray'][$ScriptNameArray[0]];
if ((in_array($PageSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PageSecurity))) {
- echo '...
[truncated message content] |
|
From: <dai...@us...> - 2012-07-26 08:28:06
|
Revision: 5559
http://web-erp.svn.sourceforge.net/web-erp/?rev=5559&view=rev
Author: daintree
Date: 2012-07-26 08:27:54 +0000 (Thu, 26 Jul 2012)
Log Message:
-----------
Hindra's theming work
Modified Paths:
--------------
trunk/css/aguapop/default.css
trunk/css/default/default.css
trunk/includes/footer.inc
trunk/includes/header.inc
trunk/index.php
Modified: trunk/css/aguapop/default.css
===================================================================
--- trunk/css/aguapop/default.css 2012-07-25 09:31:43 UTC (rev 5558)
+++ trunk/css/aguapop/default.css 2012-07-26 08:27:54 UTC (rev 5559)
@@ -1,79 +1,311 @@
-/*** hj aquapop new ***/
+/***
+
+New AguaPop theme for WebERP by Hindra Joshua
+
+Using new theming support any without background images
+
+****/
+
body {
- background: silver;
-}
-#CanvasDiv {
- background: none;
font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 9px;
- margin-left: auto;
- margin-right: auto;
- width: 960px;
+ font-size: 8pt;
+/* color:white;*/
+ background: silver;
+ margin:0;
+ padding:0;
}
+
+img {
+ vertical-align:middle;
+}
+/*a {
+ color: blue;
+ text-decoration: none;
+}
+a:hover {
+ color: lightblue;
+ text-decoration: none;
+}*/
+table {
+ background-color: none;
+ margin: 0 auto;
+ width:90%
+}
+
+
+/*** CANVAS ************************************************************/
+
+#CanvasDiv {
+ background:steelblue;
+ margin:10px;
+ border:thick outset steelblue;
+ border-radius:20px;
+}
+
/*** HEADER ************************************************************/
+
#HeaderDiv {
- background: url(images/top_bg.png) top no-repeat silver;
+ padding:2px;
+ color:white;
}
-.HeaderTbl {
- padding-top:12px;
- width:99%;
+#HeaderDiv a{
+ color:white;
+ text-decoration:none;
+ border:2px inset transparent;
+ border-radius:10px;
+ padding:3px;
}
+#HeaderDiv a:hover{
+ color:cyan;
+ border:2px inset steelblue;
+ border-radius:10px;
+ padding:3px;
+}
+#HeaderWrapDiv{
+}
+#AppInfoDiv{
+ float:left;
+}
+#AppInfoCompanyDiv{
+ float:left;
+}
+#AppInfoUserDiv{
+ float:left;
+}
+#AppInfoModuleDiv{
+ font-weight:bold;
+ font-size:10pt;
+}
+
+/*** Quick Menu ***/
+
+#QuickMenuDiv{
+ float:right;
+}
+#QuickMenuDiv ul{
+ list-style:none;
+ float:right;
+}
+#QuickMenuDiv ul li{
+ display:inline;
+ margin: 0px 3px;
+ float: left;
+}
+
/*** BODY **************************************************************/
+
#BodyDiv {
- background:url("images/body_bg.png") repeat-y scroll center center silver;
- text-align:center;
+ clear:both;
}
-.BodyTbl {
- background:none repeat scroll 0 0 steelblue;
- width:932px;
+#BodyWrapDiv{
+ background:lightsteelblue;
+ margin:5px;
}
-/*** eof BodyDiv ***
-/*** FOOTER ************************************************************/
-#FooterDiv {
- background: url(images/footer.png) bottom no-repeat silver;
- padding-top: 10px;
- padding-bottom: 18px;
+/*** MAIN MENU ***/
+
+#MainMenuDiv{
+ float:left;
+ width:10%;
+ white-space:nowrap;
+ text-align:center;
+ padding:3px;
}
+#MainMenuDiv ul{
+ margin:0;
+ padding:0;
+}
+#MainMenuDiv li{
+ list-style:none;
+}
+#MainMenuDiv li a:link, a:visited{
+ color:white;
+ text-decoration:none;
+}
+#MainMenuDiv li a:hover{
+ color:cyan;
+}
-.FooterTbl {
- width:838px;
+.main_menu_unselected {
+ border:2px inset transparent;
+ border-radius:10px;
+ padding:3px;
}
-/************************************************************************/
+.main_menu_unselected:hover{
+ border:2px inset steelblue;
+ border-radius:10px;
+ padding:3px;
+}
+.main_menu_unselected a{
+}
+.main_menu_unselected a:hover{
+}
-img {
- border: none;
- vertical-align:middle;
+.main_menu_selected {
+ border:2px inset steelblue;
+ border-radius:10px;
+ padding:3px;
}
+.main_menu_selected:hover{
+ border:2px inset steelblue;
+ border-radius:10px;
+ padding:3px;
+}
+.main_menu_selected a{
+}
+.main_menu_selected a:hover{
+}
-/*links before selection */
-a {
+/*********************************************/
+#SubMenuDiv{
+ float:right;
+ margin:0;
+ padding:0;
+ overflow: hidden;
+ width: 87%;
+}
+#SubMenuDiv ul{
+ margin:0;
+ padding:0;
+}
+#SubMenuDiv li{
+ list-style:none;
+}
+#SubMenuDiv a{
+ color:black;
+ text-decoration:none;
+}
+#SubMenuDiv a:hover{
+ color:blue;
+ text-decoration:none;
+}
+#TransactionsDiv{
+ background:whitesmoke;
+ border:thin inset whitesmoke;
+ float:left;
+ list-style:none;
+ width:32%;
+ padding:0px;
+}
+#InquiriesDiv{
+ background:whitesmoke;
+ border:thin inset whitesmoke;
+ float:left;
+ list-style:none;
+ width:32%;
+ padding:0px;
+}
+#MaintenanceDiv{
+ background:whitesmoke;
+ border:thin inset whitesmoke;
+ float:left;
+ list-style:none;
+ width:32%;
+ padding:0px;
+}
+.menu_group_headers {
+ background:steelblue;
+ border:thin outset steelblue;
+ padding:3px;
+ text-align:center;
+ color:white;
+}
+.menu_group_headers table{
+}
+.menu_group_img {
+ background-color: gainsboro;
+ text-align: center;
+ width: 90px;
+ position: relative;
+ left: 3px;
+}
+
+.menu_group_img img{
+ position: relative;
+ top: 10px;
+}
+
+.menu_group_area {
font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 9px;
+ font-size: 11px;
font-weight: bold;
- text-decoration: none;
- color: black;
+ border-top: 0px;
+ margin-top: 0px;
+ padding-top: 0px; /*this creates the border*/
+ color: seagreen;
}
-/*links on any screen when mouse is hovering over them */
-a:hover {
- color: seagreen;
- text-decoration: none;
+.blank_area table {
+ border: 0px;
+ width: 100%;
}
-table {
- background-color: none;
- margin: 0 auto;
- width:90%
+
+
+.menu_group_headers_text {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-size: 12px;
+ font-weight: bold;
+ color: white;
}
+.menu_group_items {
+ vertical-align: top;
+ background-color: white;
+ font-weight: bold;
+ padding: 15px;
+ border: 1px inset steelblue;
+}
+
+.menu_group_item {
+ padding:3px;
+}
+.menu_group_item:hover{
+ background:lightblue;
+}
+
+.menu_group_item p {
+ color: steelblue; /* This is the color for bullets, I like it to be the same as the anchor color, but it's up to you */
+ text-indent: -12px; /* this makes the bullet to appear as the li tag previously used */
+ margin: 0 0 0 12px;
+}
+/*** FOOTER ************************************************************/
+#FooterDiv{
+ clear:both;
+ color:black;
+ height:52px;
+}
+#FooterWrapDiv{
+ padding:5px;
+}
+#FooterLogoDiv{
+ background:white;
+ border:2px outset sandybrown;
+ border-radius:8px 8px 8px 8px;
+ float:left;
+ padding:5px;
+}
+#FooterVersionDiv{
+ float:left;
+ margin-left:10px;
+ margin-top:15px;
+
+}
+#FooterTimeDiv{
+ float:right;
+ margin-top:15px;
+}
+
+/************************************************************************/
+
+
.dpTbl {
border: solid navy 1px;
}
div.centre {
- /*padding-bottom:10px;*/
+ padding-bottom:5px;
text-align:center;
}
@@ -89,8 +321,8 @@
}
table.selection {
- background:none repeat scroll 0 0 lightsteelblue;
- border:2px outset steelblue;
+ background:whitesmoke;
+ border:2px inset whitesmoke;
padding:0;
width:90%;
}
@@ -400,47 +632,6 @@
margin: 2px;
}
-.main_menu_unselected {
- background-color: steelblue;
- padding: 2px;
- border-bottom: 2px;
- font-weight: normal;
- position: relative;
- top: 0px;
- text-align: left;
- white-space: nowrap;
-
-}
-
-.main_menu_unselected:hover{
-}
-.main_menu_selected:hover{
-}
-
-.main_menu_unselected a{
-}
-
-.main_menu_unselected a:hover{
-}
-
-.main_menu_selected {
- background: url(images/tab_bg.png)right no-repeat steelblue;
- padding: 3px;
- padding-right: 0px;
- font-weight: normal;
- position: relative;
- text-align: right;
- white-space: nowrap;
-}
-
-.main_menu_selected a{
-
-}
-
-.main_menu_selected a:hover{
-
-}
-
span.main_menu_nolink {
font-family: Arial, Verdana, Helvetica, sans-serif;
font-size: 10px;
@@ -462,73 +653,12 @@
color: lightsteelblue;
}
-.menu_group_img {
- background-color: gainsboro;
- text-align: center;
- width: 90px;
- position: relative;
- left: 3px;
-}
-.menu_group_img img{
- position: relative;
- top: 10px;
-}
-.menu_group_area {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 11px;
- font-weight: bold;
- border-top: 0px;
- margin-top: 0px;
- padding-top: 0px; /*this creates the border*/
- color: seagreen;
-}
-
-.blank_area table {
- border: 0px;
- width: 100%;
-}
-
-.menu_group_headers {
- background:lightsteelblue;
-}
-
-.menu_group_headers table{
- }
-
-.menu_group_headers_text {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 12px;
- font-weight: bold;
- color: white;
-}
-
-.menu_group_items {
- vertical-align: top;
- background-color: white;
- font-weight: bold;
- padding: 15px;
- border: 1px inset steelblue;
-}
-
-.menu_group_item {
- background-color: white;
- padding-top: 2px;
- padding-bottom: 2px;
-}
-
-.menu_group_item p {
- color: steelblue; /* This is the color for bullets, I like it to be the same as the anchor color, but it's up to you */
- text-indent: -12px; /* this makes the bullet to appear as the li tag previously used */
- margin: 0 0 0 12px;
-}
-
.page_title_text {
font-weight:bold;
- margin-top:0;
- padding-bottom:5px;
- padding-top:5px;
+ text-align:center;
+ padding-top:5px;
}
DIV.page_help_text {
Modified: trunk/css/default/default.css
===================================================================
--- trunk/css/default/default.css 2012-07-25 09:31:43 UTC (rev 5558)
+++ trunk/css/default/default.css 2012-07-26 08:27:54 UTC (rev 5559)
@@ -1,25 +1,20 @@
-/*--------------------------------------------------\
-| | | default.css |
-|---------------------------------------------------|
-| For use with: |
-| Web-ERP - http://web-erp.sourceforge.net |
-\--------------------------------------------------*/
+/***
-/* $Id$*/
+New Default Theme for WebERP
+***/
+
body {
font-family: Arial, Verdana, Helvetica, sans-serif;
font-size: 10px;
background-color: #CCCCDD;
- margin-left: 0px;
- margin-top: 0px;
- margin-bottom: 0px;
- margin-right: 0px;
- padding: 0px;
+ margin:0;
+ padding:0
}
img {
border:none;
+ vertical-align:middle;
}
/*links before selection */
@@ -41,17 +36,259 @@
table {
background-color: #587BA6;
margin: 0 auto;
+ width:100%;
}
-.dpTbl {
- border: solid navy 1px;
+
+/*** CANVAS ***/
+
+#CanvasDiv {
}
+/*** HEADER ***/
+
+#HeaderDiv {
+ color:white;
+ background:#588BB6;
+ overflow:hidden;
+}
+#HeaderDiv a{
+ color:white;
+}
+#HeaderDiv a:hover{
+ color:black;
+ background:white;
+ text-decoration:underline;
+}
+#HeaderWrapDiv{
+}
+
+/*** HEADER - APP INFO ***/
+
+#AppInfoDiv{
+ display:table;
+ float:left;
+ padding:
+}
+#AppInfoDiv img{
+ vertical-align:middle;
+}
+#AppInfoCompanyDiv{
+ display:table-cell;
+}
+#AppInfoUserDiv{
+ display:table-cell;
+}
+#AppInfoModuleDiv{
+ display:table-row-group;
+}
+
+/*** HEADER - QUICK MENU ***/
+
+#QuickMenuDiv{
+ float:right;
+}
+#QuickMenuDiv ul{
+}
+#QuickMenuDiv ul li{
+ display:inline;
+ border-left:thin ridge #588BB6;
+ padding:10px;
+}
+
+/*** BODY ***/
+
+#BodyDiv {
+ clear:both;
+/* margin-left:5px;
+ margin-right:5px;*/
+ color:black;
+ background:#588BB6;
+ overflow:hidden;
+}
+#BodyDiv table {
+ width:90%;
+ text-align:center;
+}
+
+#BodyWrapDiv{
+ background:#CCCCCC;
+}
+
+/*** BODY - MAIN MENU ***/
+
+#MainMenuDiv{
+ float:left;
+ width:11%;
+ white-space:nowrap;
+ text-align:center;
+ border:thin solid gray;
+}
+#MainMenuDiv ul{
+ margin:0;
+ padding:0;
+}
+#MainMenuDiv li{
+ list-style:none;
+}
+#MainMenuDiv li a:link, a:visited{
+/* color:black;
+ font-weight:bold;*/
+}
+#MainMenuDiv li a:hover{
+ color:black;
+ background:white;
+ text-decoration:underline;
+}
+
+.main_menu_unselected{
+ background:#40FC40;
+ padding:2px;
+}
+.main_menu_unselected:hover{
+ background:white;
+}
+.main_menu_unselected a{
+}
+.main_menu_unselected a:hover{
+}
+.main_menu_selected {
+ background-color: white;
+ border:thin solid gray;
+ font-weight: normal;
+ text-align: center;
+ white-space: nowrap;
+ padding:2px;
+}
+.main_menu_selected:hover{
+}
+.main_menu_selected a{
+}
+.main_menu_selected a:hover{
+}
+
+/*** BODY - SUB MENU ***/
+
+#SubMenuDiv{
+ display:table;
+ float:right;
+ overflow: hidden;
+ min-width: 88%;
+}
+#SubMenuDiv ul{
+ margin:0;
+ padding:0;
+}
+#SubMenuDiv li{
+ list-style:none;
+}
+#SubMenuDiv a{
+}
+#SubMenuDiv a:hover{
+ color:green;
+ text-decoration:underline;
+}
+#TransactionsDiv{
+ float:left;
+ list-style:none;
+ width:33%;
+ border:thin solid black;
+ background:#EEEEEE;
+/* display:table-cell; */
+}
+#InquiriesDiv{
+ float:left;
+ list-style:none;
+ width:33%;
+ border:thin solid black;
+ background:#EEEEEE;
+/* display:table-cell; */
+}
+#MaintenanceDiv{
+ float:left;
+ list-style:none;
+ width:33%;
+ border:thin solid black;
+ background:#EEEEEE;
+/* display:table-cell; */
+}
+.menu_group_headers {
+ text-align:center;
+ color:black;
+ background:#EEEEEE;
+ border: thin outset #EEEEEE;
+}
+/*.menu_group_headers table{
+}*/
+/*.menu_group_headers_text {
+ font-family: Arial, Verdana, Helvetica, sans-serif;
+ font-size: 10px;
+ font-weight: normal;
+ color: white;
+}
+*/
+/*.menu_group_items {
+ background-color: white;
+ font-weight: normal;
+ padding: 15px;
+ border-top: 0px #AAAAAA solid;
+ border-left: 0px #AAAAAA solid;
+ border-right: 0px white solid;
+ border-bottom: 0px white solid;
+}*/
+.menu_group_item {
+ background-color: white;
+ padding:2px;
+}
+.menu_group_item p {
+ color: #00f; /* This is the color for bullets, I like it to be the same as the anchor color, but it's up to you */
+ text-indent: -12px; /* this makes the bullet to appear as the li tag previously used */
+ margin: 0 0 0 12px; /* One thing that I didn´t like of the li was that it had no left margin applied */
+}
+
+/*** FOOTER ***/
+
+#FooterDiv{
+ clear:both;
+ color:#CCCCCC;
+ background:#588BB6;
+ overflow:hidden;
+}
+#FooterWrapDiv{
+ overflow:hidden;
+ padding:5px;
+}
+#FooterLogoDiv{
+ background:white;
+ border-radius:8px 8px 8px 8px;
+ float:left;
+ padding:5px;
+}
+#FooterVersionDiv{
+ float:left;
+ margin-left:10px;
+ margin-top:15px;
+
+}
+#FooterTimeDiv{
+ float:right;
+ margin-top:15px;
+}
+
+/*** MISC ***/
+
div.centre {
margin: 0 auto;
text-align:center;
}
+
+
+/*
+.dpTbl {
+ border: solid navy 1px;
+}
+
/*table detail items default format */
td {
font-family: Arial, Verdana, Helvetica, sans-serif;
@@ -410,55 +647,8 @@
margin-bottom: 2px;
}
-.main_menu_unselected {
- background-color: #40fc40;
- border-left: 1px #AAAAAA solid;
- border-right: 1px #AAAAAA solid;
- border-bottom: 0px;
- font-weight: normal;
- height: 16pt;
- position: relative;
- top: 3px;
- text-align: center;
- white-space: nowrap;
-}
-.main_menu_unselected:hover{
-}
-.main_menu_selected:hover{
-}
-
-.main_menu_unselected a{
-}
-
-.main_menu_unselected a:hover{
-}
-
-.main_menu_selected {
- background-color: white;
- border-top: 1px #AAAAAA solid;
- border-left: 1px #AAAAAA solid;
- border-right: 1px #AAAAAA solid;
- border-bottom: 0px;
- font-weight: normal;
- height: 16pt;
- position: relative;
- top: 3px;
- text-align: center;
- white-space: nowrap;
-}
-
-.main_menu_selected a{
- color: #eee;
- font-weight:bold;
-}
-
-.main_menu_selected a:hover{
- color: #fff;
- text-decoration: none;
-}
-
span.main_menu_nolink {
font-family: Arial, Verdana, Helvetica, sans-serif;
font-size: 10px;
@@ -507,43 +697,8 @@
width: 100%;
}
-.menu_group_headers {
- border: 0px outset #AAAAAA;
- width: 25%;
-}
-.menu_group_headers table{
- }
-.menu_group_headers_text {
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 10px;
- font-weight: normal;
- color: white;
-}
-
-.menu_group_items {
- background-color: white;
- font-weight: normal;
- padding: 15px;
- border-top: 0px #AAAAAA solid;
- border-left: 0px #AAAAAA solid;
- border-right: 0px white solid;
- border-bottom: 0px white solid;
-}
-
-.menu_group_item {
- background-color: white;
- padding-top: 2px;
- padding-bottom: 2px;
-}
-
-.menu_group_item p {
- color: #00f; /* This is the color for bullets, I like it to be the same as the anchor color, but it's up to you */
- text-indent: -12px; /* this makes the bullet to appear as the li tag previously used */
- margin: 0 0 0 12px; /* One thing that I didn´t like of the li was that it had no left margin applied */
-}
-
.page_title_text {
font-family: Arial, Verdana, Helvetica, sans-serif;
padding-top: 2px;
Modified: trunk/includes/footer.inc
===================================================================
--- trunk/includes/footer.inc 2012-07-25 09:31:43 UTC (rev 5558)
+++ trunk/includes/footer.inc 2012-07-26 08:27:54 UTC (rev 5559)
@@ -2,19 +2,32 @@
/* $Id$*/
-echo '<table width="100%" id="footer">
- <tr>
- <td style="width:33%"></td><td class="footer">
- <img src="'. $rootpath . '/' . $_SESSION['LogoFile'] . '" width="120" alt="webERP" title="webERP ' . _('Copyright') . ' © weberp.org - ' . date('Y') . '" />
- </td>
- <td class="footer" style="text-align: right;width:33%">'. DisplayDateTime() .'</td>
- </tr>
- <tr>
- <td colspan="3" class="footer">webERP ' ._('version') .' ' . $_SESSION['VersionNumber'] . '</td>
- </tr>
- </table>
- </div>
- </body>
- </html>';
+echo '</div>'; // BodyWrapDiv ===HJ===
+echo '</div>'; // BodyDiv ===HJ===
+echo '<div id="FooterDiv">'; //===HJ===
+echo '<div id="FooterWrapDiv">'; //===HJ===
+
+echo '<div id="FooterLogoDiv">'; //===HJ===
+ echo '<img src="'. $rootpath . '/' . $_SESSION['LogoFile'] . '" width="120" alt="webERP" title="webERP ' . _('Copyright') . ' © weberp.org - ' . date('Y') . '" /></td>';
+echo '</div>';
+
+echo '<div id="FooterVersionDiv">'; //===HJ===
+ echo 'webERP ' ._('version') .' ' . $_SESSION['VersionNumber'];
+echo '</div>';
+
+echo '<div id="FooterTimeDiv">'; //===HJ===
+ echo DisplayDateTime();
+echo '</div>';
+
+// if(http_file_exists('http://sflogo.sourceforge.net/sflogo.php')) {
+// echo '<tr><td class="footer"><a href="https://sourceforge.net/projects/web-erp"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=391629&type=12" width="120" height="30" border="0" alt="Get webERP web-based ERP Accounting at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a></td></tr>';
+// }
+
+echo '</div>'; // FooterWrapDiv ===HJ===
+echo '</div>'; // FooterDiv ===HJ===
+
+echo '</body>';
+echo '</html>';
+
?>
Modified: trunk/includes/header.inc
===================================================================
--- trunk/includes/header.inc 2012-07-25 09:31:43 UTC (rev 5558)
+++ trunk/includes/header.inc 2012-07-26 08:27:54 UTC (rev 5559)
@@ -11,9 +11,11 @@
$rootpath = '';
}
}
+
+ $ViewTopic = isset($ViewTopic)?'?ViewTopic=' . $ViewTopic : '';
+ $BookMark = isset($BookMark)? '#' . $BookMark : '';
$StrictXHTML=False;
- $ViewTopic = isset($ViewTopic)?"?ViewTopic=$ViewTopic":'';
- $BookMark = isset($BookMark)? "#$BookMark":'';
+
if (!headers_sent()){
if ($StrictXHTML) {
header('Content-type: application/xhtml+xml; charset=utf-8');
@@ -27,7 +29,6 @@
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
-
echo '<html xmlns="http://www.w3.org/1999/xhtml"><head><title>' . $title . '</title>';
echo '<link rel="shortcut icon" href="'. $rootpath.'/favicon.ico" />';
echo '<link rel="icon" href="' . $rootpath.'/favicon.ico" />';
@@ -39,40 +40,45 @@
echo '<link href="' . $rootpath . '/css/'. $_SESSION['Theme'] .'/default.css" rel="stylesheet" type="text/css" />';
echo '<script type="text/javascript" src = "'.$rootpath.'/javascripts/MiscFunctions.js"></script>';
echo '</head>';
-
echo '<body>';
- echo '<div id="canvas">';
- echo '<table class="callout_main" cellpadding="0" cellspacing="0">';
- echo '<tr>';
- echo '<td colspan="2" rowspan="2">';
+ echo '<div id="CanvasDiv">';
+ echo '<div id="HeaderDiv">';
+ echo '<div id="HeaderWrapDiv">';
+
+
if (isset($title)) {
- echo '<table cellpadding="0" cellspacing="0" border="0" id="quick_menu" class="quick_menu">';
- echo '<tr>';
- echo '<td align="left" style="width:100%;" class="quick_menu_left">';
-// Use icons for company and user data, saves screen realestate, use alt tag in case theme icon not avail.
- echo '<img src="'.$rootpath.'/css/'.$theme.'/images/company.png" title="' . _('Company') . '" alt="' . _('Company') . '" />';
- echo ' ' . stripslashes($_SESSION['CompanyRecord']['coyname']) . ' <a href="' . $rootpath . '/UserSettings.php"><img src="'.$rootpath.'/css/'.$theme.'/images/user.png" title="User" alt="' . _('User') . '" />' . stripslashes($_SESSION['UsersRealName']) . '</a>';
-// Make the title text a class, can be set to display:none is some themes
- echo '<br />' . $title . '</td>';
- echo '<td class="quick_menu_tabs">';
- echo '<table cellpadding="0" cellspacing="0" class="quick_menu_tabs"><tr>';
- echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/index.php"><span style="text-decoration:underline;">1</span> ' . _('Main Menu') . '</a></td>';
- if (count($_SESSION['AllowedPageSecurityTokens'])>1){
+
+ echo '<div id="AppInfoDiv">'; //===HJ===
+ echo '<div id="AppInfoCompanyDiv">';
+ echo '<img src="'.$rootpath.'/css/'.$theme.'/images/company.png" title="'._('Company').'" alt="'._('Company').'"/>'.stripslashes($_SESSION['CompanyRecord']['coyname']);
+ echo '</div>';
+ echo '<div id="AppInfoUserDiv">';
+ echo '<a href="'. $rootpath.'/UserSettings.php"><img src="'.$rootpath.'/css/'.$theme.'/images/user.png" title="User" alt="'._('User').'"/>'.stripslashes($_SESSION['UsersRealName']).'</a>';
+ echo '</div>';
+ echo '<div id="AppInfoModuleDiv">';
+ // Make the title text a class, can be set to display:none is some themes
+ echo $title;
+ echo '</div>';
+ echo '</div>'; // AppInfoDiv
- echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/SelectCustomer.php"><span style="text-decoration:underline;">2</span> ' . _('Customers') . '</a></td>';
- echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/SelectProduct.php"><span style="text-decoration:underline;">3</span> ' . _('Items') . '</a></td>';
+ echo '<div id="QuickMenuDiv"><ul>';
+
+ echo '<li><a href="'.$rootpath.'/index.php">'._('Main Menu').'</a></li>'; //take off inline formatting, use CSS instead ===HJ===
- echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/SelectSupplier.php"><span style="text-decoration:underline;">4</span> ' . _('Suppliers') . '</a></td>';
+ if (count($_SESSION['AllowedPageSecurityTokens'])>1){
+ echo '<li><a href="'.$rootpath.'/SelectCustomer.php">'._('Customers').'</a></li>';
+ echo '<li><a href="'.$rootpath.'/SelectProduct.php">' ._('Items') .'</a></li>';
+ echo '<li><a href="'.$rootpath.'/SelectSupplier.php">'._('Suppliers').'</a></li>';
+
+ $DefaultManualLink = '<li><a rel="external" accesskey="8" href="' . $rootpath . '/doc/Manual/ManualContents.php'. $ViewTopic . $BookMark. '">'._('Manual').'</a></li>';
- $DefaultManualLink = '<td class="quick_menu_tab" align="center"><a rel="external" accesskey="8" href="' . $rootpath . '/doc/Manual/ManualContents.php'. $ViewTopic . $BookMark. '"><span style="text-decoration:underline;">8</span> ' . _('Manual') . '</a></td>';
-
- if (mb_substr($_SESSION['Language'],0,2) !='en'){
- if (file_exists('locale/' . $_SESSION['Language'] . '/Manual/ManualContents.php')){
- echo '<td class="quick_menu_tab" align="center"><a target="_blank" href="' . $rootpath . '/locale/' . $_SESSION['Language'] . '/Manual/ManualContents.php'.$ViewTopic . $BookMark.'"><span style="text-decoration:underline;">8</span> ' . _('Manual') . '</a></td>';
+ if (mb_substr($_SESSION['Language'],0,2) != 'en'){
+ if (file_exists('locale/'.$_SESSION['Language'].'/Manual/ManualContents.php')){
+ echo '<li><a target="_blank" href="'.$rootpath.'/locale/'.$_SESSION['Language'].'/Manual/ManualContents.php'. $ViewTopic . $BookMark. '">'._('Manual').'</a></li>';
} else {
echo $DefaultManualLink;
}
@@ -81,15 +87,13 @@
}
}
- echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/Logout.php" onclick="return confirm(\'' . _('Are you sure you wish to logout?') . '\');"><span style="text-decoration:underline;">0</span> ' . _('Logout') . '</a></td>';
+ echo '<li><a href="'.$rootpath.'/Logout.php" onclick="return confirm(\''._('Are you sure you wish to logout?').'\');">'._('Logout').'</a></l>';
- echo '</tr></table>';
- echo '</td></tr></table>';
-
+ echo '</ul></div>'; // QuickMenuDiv
}
+ echo '</div>'; // HeaderWrapDiv
+ echo '</div>'; // Headerdiv
+ echo '<div id="BodyDiv">';
+ echo '<div id="BodyWrapDiv">';
-echo '</td>';
-echo '</tr>';
-echo '</table>';
-
-?>
\ No newline at end of file
+?>
Modified: trunk/index.php
===================================================================
--- trunk/index.php 2012-07-25 09:31:43 UTC (rev 5558)
+++ trunk/index.php 2012-07-26 08:27:54 UTC (rev 5559)
@@ -5,6 +5,7 @@
$title=_('Main Menu');
include('includes/header.inc');
+
/*The module link codes are hard coded in a switch statement below to determine the options to show for each tab */
include('includes/MainMenuLinksArray.php');
@@ -46,6 +47,7 @@
</td>
</tr>
</table>';
+
include('includes/footer.inc');
exit;
}
@@ -54,15 +56,10 @@
$_SESSION['Module'] = $_GET['Application'];
}
-echo '<table width="99%">
- <tr>
- <td style="width:10%" valign="top">';
-echo '<table class="main_menu" width="100%" cellspacing="0" cellpadding="0" border="0">';
-
+//=== MainMenuDiv =======================================================================
+echo '<div id="MainMenuDiv"><ul>'; //===HJ===
$i=0;
-
while ($i < count($ModuleLink)){
-
// This determines if the user has display access to the module see config.php and header.inc
// for the authorisation and security code
if ($_SESSION['ModulesEnabled'][$i]==1) {
@@ -72,121 +69,103 @@
$_SESSION['Module']=$ModuleLink[$i];
}
if ($ModuleLink[$i] == $_SESSION['Module']){
- echo '<tr>
- <td class="main_menu_selected"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></td>
- </tr>';
+ echo '<li class="main_menu_selected">';
} else {
- echo '<tr>
- <td class="main_menu_unselected"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></td>
- </tr>';
+ echo '<li class="main_menu_unselected">';
+
}
+ echo '<a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></li>';
}
$i++;
}
+echo '</ul></div>'; // MainMenuDiv ===HJ===
-echo '</table>';
-echo '</td>';
-echo '<td style="width:30%" valign="top">';
+//=== SubMenuDiv (wrapper) ==============================================================================
+echo '<div id="SubMenuDiv">'; //===HJ===
+
+
+echo '<div id="TransactionsDiv"><ul>'; //=== TransactionsDiv ===
+
+echo '<li class="menu_group_headers">'; //=== SubMenuHeader ===
if ($_SESSION['Module']=='system') {
$Header='<img src="' . $rootpath . '/css/' . $theme . '/images/company.png" title="' . _('General Setup Options') . '" alt="' . _('General Setup Options') . '" /><b>' . _('General Setup Options') . '</b>';
} else {
$Header='<img src="' . $rootpath . '/css/' . $theme . '/images/transactions.png" title="' . _('Transactions') . '" alt="' . _('Transactions') . '" /><b>'. _('Transactions') . '</b>';
}
-echo ' <table width="100%" class="selection">
- <tr>
- <td class="menu_group_headers">
- <div class="centre">
- ' . $Header . '
- </div>
- </td>
- </tr>';
+echo $Header;
+echo '</li>'; // SubMenuHeader
+//=== SubMenu Items ===
$i=0;
foreach ($MenuItems[$_SESSION['Module']]['Transactions']['Caption'] as $Caption) {
/* Transactions Menu Item */
$ScriptNameArray = explode('?', substr($MenuItems[$_SESSION['Module']]['Transactions']['URL'][$i],1));
$PageSecurity = $_SESSION['PageSecurityArray'][$ScriptNameArray[0]];
if ((in_array($PageSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PageSecurity))) {
- echo '<tr>
- <td class="menu_group_item">
- <p>• <a href="' . $rootpath . $MenuItems[$_SESSION['Module']]['Transactions']['URL'][$i] .'">' . $Caption . '</a></p>
- </td>
- </tr>';
+ echo '<li class="menu_group_item">
+ <p>• <a href="' . $rootpath . $MenuItems[$_SESSION['Module']]['Transactions']['URL'][$i] .'">' . $Caption . '</a></p>
+ </li>';
}
$i++;
}
-echo '</table>';
-echo '</td>';
+echo '</ul></div>'; //=== TransactionsDiv ===
-echo '<td style="width:30%" valign="top">';
+echo '<div id="InquiriesDiv"><ul>'; //=== InquiriesDiv ===
+
+echo '<li class="menu_group_headers">';
if ($_SESSION['Module']=='system') {
$Header='<img src="' . $rootpath . '/css/' . $theme . '/images/ar.png" title="' . _('Receivables/Payables Setup') . '" alt="' . _('Receivables/Payables Setup') . '" /><b>' . _('Receivables/Payables Setup') . '</b>';
} else {
$Header='<img src="' . $rootpath . '/css/' . $theme . '/images/reports.png" title="' . _('Inquiries and Reports') . '" alt="' . _('Inquiries and Reports') . '" /><b>'. _('Inquiries and Reports') . '</b>';
}
-echo ' <table width="100%" class="selection">
- <tr>
- <td class="menu_group_headers">
- <div class="centre">
- ' . $Header . '
- </div>
- </td>
- </tr>';
+echo $Header;
+echo '</li>';
+
+
$i=0;
foreach ($MenuItems[$_SESSION['Module']]['Reports']['Caption'] as $Caption) {
/* Transactions Menu Item */
$ScriptNameArray = explode('?', substr($MenuItems[$_SESSION['Module']]['Reports']['URL'][$i],1));
$PageSecurity = $_SESSION['PageSecurityArray'][$ScriptNameArray[0]];
if ((in_array($PageSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PageSecurity))) {
- echo '...
[truncated message content] |