|
From: <dai...@us...> - 2011-02-04 22:50:28
|
Revision: 4481
http://web-erp.svn.sourceforge.net/web-erp/?rev=4481&view=rev
Author: daintree
Date: 2011-02-04 22:50:18 +0000 (Fri, 04 Feb 2011)
Log Message:
-----------
various
Modified Paths:
--------------
trunk/PDFTopItems.php
trunk/SelectCustomer.php
trunk/StockAdjustments.php
trunk/StockAdjustmentsControlled.php
trunk/StockCostUpdate.php
trunk/TopItems.php
trunk/WorkOrderEntry.php
trunk/Z_MakeNewCompany.php
trunk/doc/Change.log.html
trunk/index.php
trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo
trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po
Modified: trunk/PDFTopItems.php
===================================================================
--- trunk/PDFTopItems.php 2011-02-02 07:52:17 UTC (rev 4480)
+++ trunk/PDFTopItems.php 2011-02-04 22:50:18 UTC (rev 4481)
@@ -10,6 +10,8 @@
$line_height = 12;
include ('includes/PDFTopItemsHeader.inc');
$FontSize = 10;
+$FromDate = FormatDateForSQL(DateAdd(Date($_SESSION['DefaultDateFormat']),'d', -$_POST['NumberOfDays']));
+
//the situation if the location and customer type selected "All"
if (($_GET["location"] == "All") and ($_GET["customers"] == "All")) {
$SQL = "SELECT salesorderdetails.stkcode,
@@ -21,7 +23,7 @@
WHERE salesorderdetails.orderno = salesorders.orderno
AND salesorderdetails.stkcode = stockmaster.stockid
AND salesorders.debtorno = debtorsmaster.debtorno
- AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY)
+ AND salesorderdetails.ActualDispatchDate >='" . $FromDate . "'
GROUP BY salesorderdetails.stkcode
ORDER BY '" . $_GET['order'] . "' DESC
LIMIT 0," . $_GET['NumberOfTopItems'] ;
@@ -37,7 +39,7 @@
AND salesorderdetails.stkcode = stockmaster.stockid
AND salesorders.debtorno = debtorsmaster.debtorno
AND debtorsmaster.typeid = '" . $_GET["customers"] . "'
- AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY)
+ AND salesorderdetails.ActualDispatchDate >= '" . $FromDate . "'
GROUP BY salesorderdetails.stkcode
ORDER BY '" . $_GET['order'] . "' DESC
LIMIT 0," . $_GET['NumberOfTopItems'];
@@ -54,8 +56,8 @@
WHERE salesorderdetails.orderno = salesorders.orderno
AND salesorderdetails.stkcode = stockmaster.stockid
AND salesorders.debtorno = debtorsmaster.debtorno
- AND salesorders.fromstkloc = '" . $_GET["location"] . "'
- AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY)
+ AND salesorders.fromstkloc = '" . $_GET['location'] . "'
+ AND salesorderdetails.ActualDispatchDate >= '" . $FromDate . "'
GROUP BY salesorderdetails.stkcode
ORDER BY '" . $_GET['order'] . "' DESC
LIMIT 0," . $_GET['NumberOfTopItems'];
@@ -71,9 +73,9 @@
WHERE salesorderdetails.orderno = salesorders.orderno
AND salesorderdetails.stkcode = stockmaster.stockid
AND salesorders.debtorno = debtorsmaster.debtorno
- AND salesorders.fromstkloc = '" . $_GET["location"] . "'
- AND debtorsmaster.typeid = '" . $_GET["customers"] . "'
- AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY)
+ AND salesorders.fromstkloc = '" . $_GET['location'] . "'
+ AND debtorsmaster.typeid = '" . $_GET['customers'] . "'
+ AND salesorderdetails.ActualDispatchDate >= '" . $FromDate . "'
GROUP BY salesorderdetails.stkcode
ORDER BY '" . $_GET['order'] . "' DESC
LIMIT 0," . $_GET['NumberOfTopItems'];
Modified: trunk/SelectCustomer.php
===================================================================
--- trunk/SelectCustomer.php 2011-02-02 07:52:17 UTC (rev 4480)
+++ trunk/SelectCustomer.php 2011-02-04 22:50:18 UTC (rev 4481)
@@ -90,29 +90,28 @@
if (isset($_POST['Search'])) {
$_POST['PageOffset'] = 1;
}
- if ($_POST['Keywords'] AND (($_POST['CustCode']) OR ($_POST['CustPhone']) OR ($_POST['CustType']))) {
- $msg = _('Search Result: Customer Name has been used in search') . '<br>';
+ if (strlen($_POST['Keywords'])>0) {
+ $msg = _('Search Result: Customer Name has been used in search') . '<br />';
$_POST['Keywords'] = strtoupper($_POST['Keywords']);
+ } elseif (strlen($_POST['CustCode'])>0) {
+ $msg = _('Search Result: Customer Code has been used in search') . '<br />';
+ } elseif (strlen($_POST['CustPhone'])>0) {
+ $msg = _('Search Result: Customer Phone has been used in search') . '<br />';
+ }elseif (($_POST['CustAdd'])) {
+ $msg = _('Search Result: Customer Address has been used in search') . '<br />';
+ } elseif (isset($_POST['CustType']) AND $_POST['CustType']!='ALL') {
+ $msg = _('Search Result: Customer Type has been used in search') . '<br />';
+ } elseif (isset($_POST['Area']) AND $_POST['Area']!='ALL') {
+ $msg = _('Search Result: Customer branch area has been used in search') . '<br />';
}
- if ($_POST['CustCode'] AND $_POST['CustPhone'] == "" AND isset($_POST['CustType']) AND $_POST['Keywords'] == "") {
- $msg = _('Search Result: Customer Code has been used in search') . '<br>';
- }
- if (($_POST['CustPhone']) AND ($_POST['CustType'])) {
- $msg = _('Search Result: Customer Phone has been used in search') . '<br>';
- }
- if (($_POST['CustAdd']) AND ($_POST['CustType'])) {
- $msg = _('Search Result: Customer Address has been used in search') . '<br>';
- }
- if ($_POST['CustType'] AND $_POST['CustPhone'] == "" AND $_POST['CustCode'] == "" AND $_POST['Keywords'] == "" AND $_POST['CustAdd'] == "") {
- $msg = _('Search Result: Customer Type has been used in search') . '<br>';
- }
- if (($_POST['Keywords'] == "") AND ($_POST['CustCode'] == "") AND ($_POST['CustPhone'] == "") AND ($_POST['CustType'] == "") AND ($_POST['Area'] == "")) {
+ if (($_POST['Keywords'] == '') AND ($_POST['CustCode'] == '') AND ($_POST['CustPhone'] == '') AND ($_POST['CustType'] == 'ALL') AND ($_POST['Area'] == 'ALL') AND ($_POST['CustAdd'] == '')) {
+ //no criteria set then default to all customers
$SQL = "SELECT debtorsmaster.debtorno,
debtorsmaster.name,
debtorsmaster.address1,
- debtorsmaster.address2,
- debtorsmaster.address3,
- debtorsmaster.address4,
+ debtorsmaster.address2,
+ debtorsmaster.address3,
+ debtorsmaster.address4,
custbranch.branchcode,
custbranch.brname,
custbranch.contactname,
@@ -124,15 +123,16 @@
WHERE debtorsmaster.typeid = debtortype.typeid";
} else {
if (strlen($_POST['Keywords']) > 0) {
+ //using the customer name
$_POST['Keywords'] = strtoupper(trim($_POST['Keywords']));
//insert wildcard characters in spaces
$SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%';
$SQL = "SELECT debtorsmaster.debtorno,
debtorsmaster.name,
debtorsmaster.address1,
- debtorsmaster.address2,
- debtorsmaster.address3,
- debtorsmaster.address4,
+ debtorsmaster.address2,
+ debtorsmaster.address3,
+ debtorsmaster.address4,
custbranch.branchcode,
custbranch.brname,
custbranch.contactname,
@@ -148,9 +148,9 @@
$SQL = "SELECT debtorsmaster.debtorno,
debtorsmaster.name,
debtorsmaster.address1,
- debtorsmaster.address2,
- debtorsmaster.address3,
- debtorsmaster.address4,
+ debtorsmaster.address2,
+ debtorsmaster.address3,
+ debtorsmaster.address4,
custbranch.branchcode,
custbranch.brname,
custbranch.contactname,
@@ -196,10 +196,13 @@
FROM debtorsmaster LEFT JOIN custbranch
ON debtorsmaster.debtorno = custbranch.debtorno, debtortype
WHERE debtorsmaster.address1 " . LIKE . " '%" . $_POST['CustAdd'] . "%'
+ OR debtorsmaster.address2 " . LIKE . " '%" . $_POST['CustAdd'] . "%'
+ OR debtorsmaster.address3 " . LIKE . " '%" . $_POST['CustAdd'] . "%'
+ OR debtorsmaster.address4 " . LIKE . " '%" . $_POST['CustAdd'] . "%'
AND debtorsmaster.typeid = debtortype.typeid";
// End added search feature. Gilles Deacur
- } elseif (strlen($_POST['CustType']) > 0) {
+ } elseif (strlen($_POST['CustType']) > 0 AND $_POST['CustType']!='ALL') {
$SQL = "SELECT debtorsmaster.debtorno,
debtorsmaster.name,
debtorsmaster.address1,
@@ -216,7 +219,7 @@
ON debtorsmaster.debtorno = custbranch.debtorno, debtortype
WHERE debtorsmaster.typeid LIKE debtortype.typeid
AND debtortype.typename = '" . $_POST['CustType'] . "'";
- } elseif (strlen($_POST['Area']) > 0) {
+ } elseif (strlen($_POST['Area']) > 0 AND $_POST['Area']!='ALL') {
$SQL = "SELECT debtorsmaster.debtorno,
debtorsmaster.name,
debtorsmaster.address1,
@@ -240,6 +243,8 @@
}
$SQL.= ' ORDER BY debtorsmaster.name';
$ErrMsg = _('The searched customer records requested cannot be retrieved because');
+
+
$result = DB_query($SQL, $db, $ErrMsg);
if (DB_num_rows($result) == 1) {
$myrow = DB_fetch_array($result);
@@ -247,15 +252,15 @@
unset($result);
} elseif (DB_num_rows($result) == 0) {
prnMsg(_('No customer records contain the selected text') . ' - ' . _('please alter your search criteria and try again'), 'info');
- echo '<br>';
+ echo '<br />';
}
} //end of if search
if (!isset($_POST['Select'])) {
$_POST['Select'] = "";
}
$Debtor=explode(' ', $_POST['Select']);
-if ($_POST['Select'] != "" or ($_SESSION['CustomerID'] != "" and !isset($_POST['Keywords']) and !isset($_POST['CustCode']) and !isset($_POST['CustType']) and !isset($_POST['CustPhone']))) {
- if ($_POST['Select'] != "") {
+if ($_POST['Select'] != '' OR ($_SESSION['CustomerID'] != '' AND !isset($_POST['Keywords']) AND !isset($_POST['CustCode']) AND !isset($_POST['CustType']) AND !isset($_POST['CustPhone']))) {
+ if ($_POST['Select'] != '') {
$SQL = "SELECT brname, phoneno FROM custbranch WHERE debtorno='" . $Debtor[0] . "'";
$_SESSION['CustomerID'] = $Debtor[0];
} else {
@@ -273,30 +278,30 @@
unset($result);
// Adding customer encoding. Not needed for general use. This is not a recommended upgrade submission. Gilles Deacur
echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Customer') . ' : ' . $_SESSION['CustomerID'] . ' - ' . $CustomerName . ' - ' . $phone . _(' has been selected') . '</p>';
- echo '<div class="page_help_text">' . _('Select a menu option to operate using this customer') . '.</div><br>';
+ echo '<div class="page_help_text">' . _('Select a menu option to operate using this customer') . '.</div><br />';
$_POST['Select'] = NULL;
echo '<table cellpadding=4 width=90% class=selection><tr><th width=33%>' . _('Customer Inquiries') . '</th>
<th width=33%>' . _('Customer Transactions') . '</th>
<th width=33%>' . _('Customer Maintenance') . '</th></tr>';
echo '<tr><td valign=top class="select">';
/* Customer Inquiry Options */
- echo '<a href="' . $rootpath . '/CustomerInquiry.php?CustomerID=' . $_SESSION['CustomerID'] . '">' . _('Customer Transaction Inquiries') . '</a><br>';
- echo '<a href="' . $rootpath . '/Customers.php?DebtorNo=' . $_SESSION['CustomerID'] . '&Modify=No">' . _('View Customer Details') . '</a><br>';
- echo '<a href="' . $rootpath . '/PrintCustStatements.php?FromCust=' . $_SESSION['CustomerID'] . '&ToCust=' . $_SESSION['CustomerID'] . '&PrintPDF=Yes">' . _('Print Customer Statement') . '</a><br>';
- echo '<a href="' . $rootpath . '/SelectCompletedOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'] . '">' . _('Order Inquiries') . '</a><br>';
+ echo '<a href="' . $rootpath . '/CustomerInquiry.php?CustomerID=' . $_SESSION['CustomerID'] . '">' . _('Customer Transaction Inquiries') . '</a><br />';
+ echo '<a href="' . $rootpath . '/Customers.php?DebtorNo=' . $_SESSION['CustomerID'] . '&Modify=No">' . _('View Customer Details') . '</a><br />';
+ echo '<a href="' . $rootpath . '/PrintCustStatements.php?FromCust=' . $_SESSION['CustomerID'] . '&ToCust=' . $_SESSION['CustomerID'] . '&PrintPDF=Yes">' . _('Print Customer Statement') . '</a><br />';
+ echo '<a href="' . $rootpath . '/SelectCompletedOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'] . '">' . _('Order Inquiries') . '</a><br />';
wikiLink('Customer', $_SESSION['CustomerID']);
echo '</td><td valign=top class="select">';
- echo '<a href="' . $rootpath . '/SelectSalesOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'] . '">' . _('Modify Outstanding Sales Orders') . '</a><br>';
- echo '<a href="' . $rootpath . '/CustomerAllocations.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Allocate Receipts or Credit Notes') . '</a><br>';
+ echo '<a href="' . $rootpath . '/SelectSalesOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'] . '">' . _('Modify Outstanding Sales Orders') . '</a><br />';
+ echo '<a href="' . $rootpath . '/CustomerAllocations.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Allocate Receipts or Credit Notes') . '</a><br />';
echo '</td><td valign=top class=select>';
- echo '<a href="' . $rootpath . '/Customers.php?">' . _('Add a New Customer') . '</a><br>';
- echo '<a href="' . $rootpath . '/Customers.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Modify Customer Details') . '</a><br>';
- echo '<a href="' . $rootpath . '/CustomerBranches.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Add/Modify/Delete Customer Branches') . '</a><br>';
- echo '<a href="' . $rootpath . '/SelectProduct.php">' . _('Special Customer Prices') . '</a><br>';
- echo '<a href="' . $rootpath . '/CustEDISetup.php">' . _('Customer EDI Configuration') . '</a><br>';
+ echo '<a href="' . $rootpath . '/Customers.php?">' . _('Add a New Customer') . '</a><br />';
+ echo '<a href="' . $rootpath . '/Customers.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Modify Customer Details') . '</a><br />';
+ echo '<a href="' . $rootpath . '/CustomerBranches.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Add/Modify/Delete Customer Branches') . '</a><br />';
+ echo '<a href="' . $rootpath . '/SelectProduct.php">' . _('Special Customer Prices') . '</a><br />';
+ echo '<a href="' . $rootpath . '/CustEDISetup.php">' . _('Customer EDI Configuration') . '</a><br />';
echo '<a href="' . $rootpath . '/CustLoginSetup.php">' . _('Customer Login Configuration') . '</a>';
echo '</td>';
- echo '</tr></table><br>';
+ echo '</tr></table><br />';
} else {
echo "<table width=90%><tr><th width=33%>" . _('Customer Inquiries') . "</th>
<th width=33%>" . _('Customer Transactions') . "</th>
@@ -305,13 +310,13 @@
echo '</td><td class="select">';
echo '</td><td class="select">';
if (!isset($_SESSION['SalesmanLogin']) or $_SESSION['SalesmanLogin'] == '') {
- echo '<a href="' . $rootpath . '/Customers.php?">' . _('Add a New Customer') . '</a><br>';
+ echo '<a href="' . $rootpath . '/Customers.php?">' . _('Add a New Customer') . '</a><br />';
}
echo '</td></tr></table>';
}
echo '<form action="' . $_SERVER['PHP_SELF'] . '?' . SID . '" method=post>';
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
-echo "<b><div class='centre'>" . $msg . "</div></b>";
+prnMsg($msg,'info');
echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Search for Customers').'</p>';
echo "<table cellpadding=3 colspan=4 class=selection>";
echo "<tr><td colspan=2>" . _('Enter a partial Name') . ":</td><td>";
@@ -333,11 +338,6 @@
echo '<input type="Text" name="CustPhone" size=15 maxlength=18>';
}
echo '</td>';
-/* Added an option to search by address. This will work okay if you select the CSV Format then you can search though the
-* address1 field. I would like to extend this to all 4 address fields. This needs implementation into the warnings and
-* other scripts in this page for full effect. I don't plan on doing this but hope somebody else can take over from here
-* . Gilles Deacur
-*/
echo '<td><font size=3><b>' . _('OR') . '</b></font></td><td>' . _('Enter part of the Address') . ':</td><td>';
if (isset($_POST['CustAdd'])) {
echo '<input type="Text" name="CustAdd" value="' . $_POST['CustAdd'] . '" size=20 maxlength=25>';
@@ -358,12 +358,12 @@
} else {
// If OK show select box with option selected
echo '<select name="CustType">';
- echo "<option value=''>" . _('Any');
+ echo '<option value="ALL">' . _('Any') . '</option>';
while ($myrow = DB_fetch_array($result2)) {
if ($_POST['CustType'] == $myrow['typename']) {
- echo "<option selected value='" . $myrow['typename'] . "'>" . $myrow['typename'];
+ echo '<option selected value="' . $myrow['typename'] . '">' . $myrow['typename'] . '</option>';
} else {
- echo "<option value='" . $myrow['typename'] . "'>" . $myrow['typename'];
+ echo '<option value="' . $myrow['typename'] . '">' . $myrow['typename'] . '</option>';
}
} //end while loop
DB_data_seek($result2, 0);
@@ -380,9 +380,9 @@
} else {
// if OK show select box with available options to choose
echo '<select name="CustType">';
- echo "<option value=''>" . _('Any');
+ echo '<option value="ALL">' . _('Any'). '</option>';
while ($myrow = DB_fetch_array($result2)) {
- echo "<option value='" . $myrow['typename'] . "'>" . $myrow['typename'];
+ echo '<option value="' . $myrow['typename'] . '">' . $myrow['typename'] . '</option>';
} //end while loop
DB_data_seek($result2, 0);
echo '</select></td>';
@@ -400,19 +400,19 @@
} else {
// if OK show select box with available options to choose
echo '<select name="Area">';
- echo "<option value=''>" . _('Any');
+ echo '<option value="ALL">' . _('Any') . '</option>';
while ($myrow = DB_fetch_array($result2)) {
if (isset($_POST['Area']) and $_POST['Area']==$myrow['areacode']) {
- echo "<option selected value='" . $myrow['areacode'] . "'>" . $myrow['areadescription'];
+ echo '<option selected value="' . $myrow['areacode'] . '">' . $myrow['areadescription'] . '</option>';
} else {
- echo "<option value='" . $myrow['areacode'] . "'>" . $myrow['areadescription'];
+ echo '<option value="' . $myrow['areacode'] . '">' . $myrow['areadescription'] . '</option>';
}
} //end while loop
DB_data_seek($result2, 0);
echo '</select></td></tr>';
}
-echo "</td></tr></table><br />";
+echo '</td></tr></table><br />';
echo '<div class="centre"><input type=submit name="Search" value="' . _('Search Now') . '"><input type=submit name="CSV" value="' . _('CSV Format') . '"></div>';
if (isset($_SESSION['SalesmanLogin']) and $_SESSION['SalesmanLogin'] != '') {
prnMsg(_('Your account enables you to see only customers allocated to you'), 'warn', _('Note: Sales-person Login'));
@@ -451,7 +451,7 @@
<input type=submit name="Next" value="' . _('Next') . '">';
echo '</div>';
}
- echo '<br><table cellpadding=2 colspan=7 class=selection>';
+ echo '<br /><table cellpadding=2 colspan=7 class=selection>';
$TableHeader = '<tr>
<th>' . _('Code') . '</th>
<th>' . _('Customer Name') . '</th>
@@ -469,7 +469,7 @@
if (DB_num_rows($result) <> 0) {
if (isset($_POST['CSV'])) {
$FileName = $_SESSION['reports_dir'] . '/Customer_Listing_' . Date('Y-m-d') . '.csv';
- echo '<br><p class="page_title_text"><a href="' . $FileName . '">' . _('Click to view the csv Search Result') . '</p>';
+ echo '<br /><p class="page_title_text"><a href="' . $FileName . '">' . _('Click to view the csv Search Result') . '</p>';
$fp = fopen($FileName, 'w');
while ($myrow2 = DB_fetch_array($result)) {
fwrite($fp, $myrow2['debtorno'] . ',' . str_replace(',', '', $myrow2['name']) . ',' . str_replace(',', '', $myrow2['address1']) . ',' . str_replace(',', '', $myrow2['address2']) . ',' . str_replace(',', '', $myrow2['address3']) . ',' . str_replace(',', '', $myrow2['address4']) . ',' . str_replace(',', '', $myrow2['contactname']) . ',' . str_replace(',', '', $myrow2['typename']) . ',' . $myrow2['phoneno'] . ',' . $myrow2['faxno'] . "\n");
@@ -532,7 +532,7 @@
// Only display the geocode map if the integration is turned on, and there is a latitude/longitude to display
if (isset($_SESSION['CustomerID']) and $_SESSION['CustomerID'] != "") {
if ($_SESSION['geocode_integration'] == 1) {
- echo '<br>';
+ echo '<br />';
if ($lat == 0) {
echo '<div class="centre">' . _('Mapping is enabled, but no Mapping data to display for this Customer.') . '</div>';
} else {
@@ -541,7 +541,7 @@
echo "<tr><th width=33%>" . _('Customer Mapping') . "</th></tr>";
echo '</td><td valign=TOp>'; /* Mapping */
echo '<div class="centre"' . _('Mapping is enabled, Map will display below.') . '</div>';
- echo '<div align="center" id="map" style="width: ' . $map_width . 'px; height: ' . $map_height . 'px"></div><br>';
+ echo '<div align="center" id="map" style="width: ' . $map_width . 'px; height: ' . $map_height . 'px"></div><br />';
echo "</th></tr></table>";
}
}
@@ -558,7 +558,7 @@
$CustomerType = $myrow['typeid'];
$CustomerTypeName = $myrow['typename'];
// Customer Data
- echo '<br>';
+ echo '<br />';
// Select some basic data about the Customer
$SQL = "SELECT debtorsmaster.clientsince,
(TO_DAYS(date(now())) - TO_DAYS(date(debtorsmaster.clientsince))) as customersincedays,
@@ -576,7 +576,7 @@
echo '<table width=45% colspan=2 cellpadding=4>';
echo "<tr><th width=33% colspan=3>" . _('Customer Data') . "</th></tr>";
echo '<tr><td valign=top class=select>'; /* Customer Data */
- //echo _('Distance to this customer:') . '<b>TBA</b><br>';
+ //echo _('Distance to this customer:') . '<b>TBA</b><br />';
if ($myrow['lastpaiddate'] == 0) {
echo _('No receipts from this customer.') . '</td><td class=select></td><td class=select></td></tr>';
} else {
@@ -598,7 +598,7 @@
$result = DB_query($sql, $db);
if (DB_num_rows($result) <> 0) {
echo '<table width=45%>';
- echo '<br><th colspan=7><img src="' . $rootpath . '/css/' . $theme . '/images/group_add.png" title="' . _('Customer Contacts') . '" alt="">' . ' ' . _('Customer Contacts') . '</th>';
+ echo '<br /><th colspan=7><img src="' . $rootpath . '/css/' . $theme . '/images/group_add.png" title="' . _('Customer Contacts') . '" alt="">' . ' ' . _('Customer Contacts') . '</th>';
echo '<tr>
<th>' . _('Name') . '</th>
<th>' . _('Role') . '</th>
@@ -627,7 +627,7 @@
echo '</table>';
} else {
if ($_SESSION['CustomerID'] != "") {
- echo '<br><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/group_add.png" title="' . _('Customer Contacts') . '" alt=""><a href="AddCustomerContacts.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Contact') . '</a></div>';
+ echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/group_add.png" title="' . _('Customer Contacts') . '" alt=""><a href="AddCustomerContacts.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Contact') . '</a></div>';
}
}
// Customer Notes
@@ -635,7 +635,7 @@
$sql = 'SELECT * FROM custnotes where debtorno="' . $_SESSION['CustomerID'] . '" ORDER BY date DESC';
$result = DB_query($sql, $db);
if (DB_num_rows($result) <> 0) {
- echo '<br><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/note_add.png" title="' . _('Customer Notes') . '" alt="">' . ' ' . _('Customer Notes') . '</div><br>';
+ echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/note_add.png" title="' . _('Customer Notes') . '" alt="">' . ' ' . _('Customer Notes') . '</div><br />';
echo '<table width=45%>';
echo '<tr>
<th>' . _('date') . '</th>
@@ -665,7 +665,7 @@
echo '</table>';
} else {
if ($_SESSION['CustomerID'] != "") {
- echo '<br><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/note_add.png" title="' . _('Customer Notes') . '" alt=""><a href="AddCustomerNotes.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Note for this Customer') . '</a></div>';
+ echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/note_add.png" title="' . _('Customer Notes') . '" alt=""><a href="AddCustomerNotes.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Note for this Customer') . '</a></div>';
}
}
// Custome Type Notes
@@ -673,7 +673,7 @@
$sql = 'SELECT * FROM debtortypenotes where typeid="' . $CustomerType . '" ORDER BY date DESC';
$result = DB_query($sql, $db);
if (DB_num_rows($result) <> 0) {
- echo '<br><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/folder_add.png" title="' . _('Customer Type (Group) Notes') . '" alt="">' . ' ' . _('Customer Type (Group) Notes for:' . '<b> ' . $CustomerTypeName . '</b>') . '</div><br>';
+ echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/folder_add.png" title="' . _('Customer Type (Group) Notes') . '" alt="">' . ' ' . _('Customer Type (Group) Notes for:' . '<b> ' . $CustomerTypeName . '</b>') . '</div><br />';
echo '<table width=45%>';
echo '<tr>
<th>' . _('date') . '</th>
@@ -703,7 +703,7 @@
echo '</table>';
} else {
if ($_SESSION['CustomerID'] != "") {
- echo '<br><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/folder_add.png" title="' . _('Customer Group Notes') . '" alt=""><a href="AddCustomerTypeNotes.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Group Note') . '</a></div><br>';
+ echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/folder_add.png" title="' . _('Customer Group Notes') . '" alt=""><a href="AddCustomerTypeNotes.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Group Note') . '</a></div><br />';
}
}
}
Modified: trunk/StockAdjustments.php
===================================================================
--- trunk/StockAdjustments.php 2011-02-02 07:52:17 UTC (rev 4480)
+++ trunk/StockAdjustments.php 2011-02-04 22:50:18 UTC (rev 4481)
@@ -26,10 +26,16 @@
if (isset($_GET['StockID'])){
$StockID = trim(strtoupper($_GET['StockID']));
$_SESSION['Adjustment']->StockID = trim(strtoupper($StockID));
- $_SESSION['Adjustment']->ItemDescription = trim(strtoupper($_GET['Description']));
- $result = DB_query("SELECT controlled FROM stockmaster WHERE stockid='" . $_SESSION['Adjustment']->StockID . "'",$db);
- $myrow = DB_fetch_row($result);
- $_SESSION['Adjustment']->Controlled = $myrow[0];
+ $result = DB_query("SELECT description, controlled, serialised, decimalplaces FROM stockmaster WHERE stockid='" . $_SESSION['Adjustment']->StockID . "'",$db);
+ $myrow = DB_fetch_array($result);
+ $_SESSION['Adjustment']->ItemDescription = $myrow['description'];
+ $_SESSION['Adjustment']->Controlled = $myrow['controlled'];
+ $_SESSION['Adjustment']->Serialised = $myrow['serialised'];
+ $_SESSION['Adjustment']->DecimalPlaces = $myrow['decimalplaces'];
+ $_SESSION['Adjustment']->SerialItems = array();
+ if (!isset($_SESSION['Adjustment']->Quantity)or !is_numeric($_SESSION['Adjustment']->Quantity)){
+ $_SESSION['Adjustment']->Quantity=0;
+ }
$NewAdjustment = true;
} elseif (isset($_POST['StockID'])){
if(isset($_POST['StockID']) and $_POST['StockID'] != $_SESSION['Adjustment']->StockID){
@@ -357,7 +363,7 @@
}
echo '</select></td></tr>';
-if (!isset($_SESSION['Adjustment']->Narrative)) {
+if (isset($_SESSION['Adjustment']) and !isset($_SESSION['Adjustment']->Narrative)) {
$_SESSION['Adjustment']->Narrative = '';
}
@@ -368,14 +374,13 @@
echo '<td>';
if ($Controlled==1){
- if ($_SESSION['Adjustment']->StockLocation != ''){
- echo '<input type="HIDDEN" name="Quantity" Value="' . $_SESSION['Adjustment']->Quantity . '">
+ if ($_SESSION['Adjustment']->StockLocation == ''){
+ $_SESSION['Adjustment']->StockLocation = $_SESSION['UserStockLocation'];
+ }
+ echo '<input type="HIDDEN" name="Quantity" Value="' . $_SESSION['Adjustment']->Quantity . '">
'.$_SESSION['Adjustment']->Quantity.'
[<a href="'.$rootpath.'/StockAdjustmentsControlled.php?AdjType=REMOVE&' . SID . '">'._('Remove').'</a>]
[<a href="'.$rootpath.'/StockAdjustmentsControlled.php?AdjType=ADD&' . SID . '">'._('Add').'</a>]';
- } else {
- prnMsg( _('Please select a location and press') . ' "' . _('Enter Stock Adjustment') . '" ' . _('below to enter Controlled Items'), 'info');
- }
} else {
echo '<input type=TEXT class="number" name="Quantity" size=12 maxlength=12 Value="' . $Quantity . '">';
}
Modified: trunk/StockAdjustmentsControlled.php
===================================================================
--- trunk/StockAdjustmentsControlled.php 2011-02-02 07:52:17 UTC (rev 4480)
+++ trunk/StockAdjustmentsControlled.php 2011-02-04 22:50:18 UTC (rev 4481)
@@ -26,7 +26,7 @@
}
/*Save some typing by referring to the line item class object in short form */
-$LineItem = &$_SESSION['Adjustment'];
+$LineItem = $_SESSION['Adjustment'];
//Make sure this item is really controlled
if ( $LineItem->Controlled != 1 ){
Modified: trunk/StockCostUpdate.php
===================================================================
--- trunk/StockCostUpdate.php 2011-02-02 07:52:17 UTC (rev 4480)
+++ trunk/StockCostUpdate.php 2011-02-04 22:50:18 UTC (rev 4481)
@@ -4,7 +4,7 @@
//$PageSecurity = 9; /*viewing possible with inquiries but not mods */
-//$UpdateSecurity =10;
+$UpdateSecurity =10;
include('includes/session.inc');
$title = _('Stock Cost Update');
@@ -148,29 +148,29 @@
echo '<input type=hidden name="QOH" VALUE=' . $myrow['totalqoh'] .'>';
echo '<tr><td>' . _('Last Cost') .':</td><td class=number>' . number_format($myrow['lastcost'],2) . '</td></tr>';
-if (! in_array($UpdateSecurity,$_SESSION['AllowedPageSecurityTokens']) OR !isset($UpdateSecurity)){
+if (! in_array($UpdateSecurity,$_SESSION['AllowedPageSecurityTokens'])){
echo '<tr><td>' . _('Cost') . ':</td><td class=number>' . number_format($myrow['materialcost']+$myrow['labourcost']+$myrow['overheadcost'],2) . '</td></tr></table>';
} else {
if ($myrow['mbflag']=='M'){
echo '<input type=hidden name="MaterialCost" VALUE=' . $myrow['materialcost'] . '>';
echo '<tr><td>' . _('Standard Material Cost Per Unit') .':</td><td class=number>' . number_format($myrow['materialcost'],4) . '</td></tr>';
- echo '<tr><td>' . _('Standard Labour Cost Per Unit') . ':</td><td class=number><input type=TEXT class="number" name=LabourCost VALUE=' . $myrow['labourcost'] . '></td></tr>';
- echo '<tr><td>' . _('Standard Overhead Cost Per Unit') . ':</td><td class=number><input type=TEXT class="number" name=OverheadCost VALUE=' . $myrow['overheadcost'] . '></td></tr>';
+ echo '<tr><td>' . _('Standard Labour Cost Per Unit') . ':</td><td class=number><input type=text class="number" name="LabourCost" value=' . $myrow['labourcost'] . '></td></tr>';
+ echo '<tr><td>' . _('Standard Overhead Cost Per Unit') . ':</td><td class=number><input type=text class="number" name="OverheadCost" value=' . $myrow['overheadcost'] . '></td></tr>';
} elseif ($myrow['mbflag']=='B' OR $myrow['mbflag']=='D') {
- echo '<tr><td>' . _('Standard Cost') .':</td><td class=number><input type=TEXT class="number" name="MaterialCost" VALUE=' . $myrow['materialcost'] . '></td></tr>';
+ echo '<tr><td>' . _('Standard Cost') .':</td><td class=number><input type="text" class="number" name="MaterialCost" value=' . $myrow['materialcost'] . '></td></tr>';
} else {
- echo '<input type=hidden name=LabourCost VALUE=0>';
- echo '<input type=hidden name=OverheadCost VALUE=0>';
+ echo '<input type="hidden" name="LabourCost" VALUE=0>';
+ echo '<input type="hidden" name="OverheadCost" VALUE=0>';
}
echo '</table><br /><div class="centre"><input type="submit" name="UpdateData" VALUE="' . _('Update') . '"><br /><br />';
}
if ($myrow['mbflag']!='D'){
- echo '<a href="' . $rootpath . '/StockStatus.php?' . SID . '&StockID=' . $StockID . '>' . _('Show Stock Status') . '</a>';
+ echo '<div class="centre"><a href="' . $rootpath . '/StockStatus.php?' . SID . '&StockID=' . $StockID . '>' . _('Show Stock Status') . '</a>';
echo '<br><a href="' . $rootpath . '/StockMovements.php?' . SID . '&StockID=' . $StockID . '">' . _('Show Stock Movements') . '</a>';
echo '<br><a href="' . $rootpath . '/StockUsage.php?' . SID . '&StockID=' . $StockID . '">' . _('Show Stock Usage') .'</a>';
echo '<br><a href="' . $rootpath . '/SelectSalesOrder.php?' . SID . '&SelectedStockItem=' . $StockID . '">' . _('Search Outstanding Sales Orders') . '</a>';
- echo '<br><a href="' . $rootpath . '/SelectCompletedOrder.php?' . SID . '&SelectedStockItem=' . $StockID . '">' . _('Search Completed Sales Orders') . '</a>';
+ echo '<br><a href="' . $rootpath . '/SelectCompletedOrder.php?' . SID . '&SelectedStockItem=' . $StockID . '">' . _('Search Completed Sales Orders') . '</a></div>';
}
echo '</form></div>';
include('includes/footer.inc');
Modified: trunk/TopItems.php
===================================================================
--- trunk/TopItems.php 2011-02-02 07:52:17 UTC (rev 4480)
+++ trunk/TopItems.php 2011-02-04 22:50:18 UTC (rev 4481)
@@ -1,13 +1,18 @@
<?php
/* $Revision: 1.3 $ */
-//$PageSecurity = 2;
+//$PageSecurity = 2; Now from db
/* Session started in session.inc for password checking and authorisation level check
config.php is in turn included in session.inc*/
include ('includes/session.inc');
$title = _('Top Items Searching');
include ('includes/header.inc');
//check if input already
-if (!(isset($_POST['Location']) and isset($_POST['NumberOfDays']) and isset($_POST['Customers']) and isset($_POST['NumberOfTopItems']) and isset($_POST['order']))) {
+if (!(isset($_POST['Location'])
+ AND isset($_POST['NumberOfDays'])
+ AND isset($_POST['Customers'])
+ AND isset($_POST['NumberOfTopItems'])
+ AND isset($_POST['Sequence']))) {
+
echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Top Sales Order Search') . '" alt="" />' . ' ' . _('Top Sales Order Search') . '</p>';
echo "<form action=" . $_SERVER['PHP_SELF'] . '?' . SID . ' name="SelectCustomer" method=POST>';
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
@@ -18,27 +23,27 @@
locationname
FROM `locations`';
$result = DB_query($sql, $db);
- echo "<option value='All'>" . _('All');
+ echo '<option value="All">' . _('All') . '</option>';
while ($myrow = DB_fetch_array($result)) {
- echo "<option VALUE='" . $myrow['loccode'] . "'>" . $myrow['loccode'] . " - " . $myrow['locationname'];
+ echo "<option VALUE='" . $myrow['loccode'] . "'>" . $myrow['loccode'] . " - " . $myrow['locationname'] . '</option>';
}
- echo "</select></td></tr>";
+ echo '</select></td></tr>';
//to view list of customer
echo '<tr><td width="150">' . _('Select Customer Type') . ' </td><td>:</td><td><select name=Customers>';
$sql = 'SELECT typename,
typeid
FROM debtortype';
$result = DB_query($sql, $db);
- echo "<option value='All'>" . _('All');
+ echo "<option value='All'>" . _('All') . '</option>';
while ($myrow = DB_fetch_array($result)) {
- echo "<option VALUE='" . $myrow['typeid'] . "'>" . $myrow['typename'];
+ echo "<option VALUE='" . $myrow['typeid'] . "'>" . $myrow['typename'] . '</option>';
}
- echo "</select></td>
- </tr>";
+ echo '</select></td>
+ </tr>';
//view order by list to display
echo '<tr> <td width="150">' . _('Select Order By ') . ' </td>
<td>:</td>
- <td><select name=order>';
+ <td><select name="Sequence">';
echo ' <option value=TotalInvoiced>' . _('Total Pieces') . '';
echo ' <option value=ValueSales>' . _('Value of Sales') . '';
echo ' </select></td>
@@ -60,10 +65,11 @@
echo '<br /><div class=centre><input tabindex=5 type=submit value="' . _('Search') . '"></div>';
} else {
// everything below here to view NumberOfTopItems items sale on selected location
+ $FromDate = FormatDateForSQL(DateAdd(Date($_SESSION['DefaultDateFormat']),'d', -$_POST['NumberOfDays']));
//the situation if the location and customer type selected "All"
- if (($_POST['Location'] == "All") and ($_POST['Customers'] == "All")) {
- $SQL = "
- SELECT salesorderdetails.stkcode,
+ if (($_POST['Location'] == 'All') and ($_POST['Customers'] == 'All')) {
+
+ $SQL = "SELECT salesorderdetails.stkcode,
SUM(salesorderdetails.qtyinvoiced) TotalInvoiced,
SUM(salesorderdetails.qtyinvoiced * salesorderdetails.unitprice ) AS ValueSales,
stockmaster.description,
@@ -76,12 +82,12 @@
AND salesorderdetails.stkcode = stockmaster.stockid
AND salesorders.debtorno = debtorsmaster.debtorno
AND debtorsmaster.currcode = currencies.currabrev
- AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_POST['NumberOfDays'] . " DAY)
+ AND salesorderdetails.ActualDispatchDate >= '" . $FromDate . "'
GROUP BY salesorderdetails.stkcode
- ORDER BY " . $_POST["order"] . " DESC
- LIMIT 0," . $_POST['NumberOfTopItems'] . "";
+ ORDER BY " . $_POST['Sequence'] . " DESC
+ LIMIT " . $_POST['NumberOfTopItems'] . "";
} else { //the situation if only location type selected "All"
- if ($_POST['Location'] == "All") {
+ if ($_POST['Location'] == 'All') {
$SQL = "
SELECT salesorderdetails.stkcode,
SUM(salesorderdetails.qtyinvoiced) TotalInvoiced,
@@ -96,16 +102,15 @@
AND salesorderdetails.stkcode = stockmaster.stockid
AND salesorders.debtorno = debtorsmaster.debtorno
AND debtorsmaster.currcode = currencies.currabrev
- AND debtorsmaster.typeid = '" . $_POST["Customers"] . "'
- AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_POST['NumberOfDays'] . " DAY)
+ AND debtorsmaster.typeid = '" . $_POST['Customers'] . "'
+ AND salesorderdetails.ActualDispatchDate >= '" . $FromDate . "'
GROUP BY salesorderdetails.stkcode
- ORDER BY " . $_POST["order"] . " DESC
- LIMIT 0," . $_POST[NumberOfTopItems] . "";
+ ORDER BY " . $_POST['Sequence'] . " DESC
+ LIMIT " . $_POST[NumberOfTopItems] . "";
} else {
//the situation if the customer type selected "All"
if ($_POST['Customers'] == "All") {
- $SQL = "
- SELECT salesorderdetails.stkcode,
+ $SQL = "SELECT salesorderdetails.stkcode,
SUM(salesorderdetails.qtyinvoiced) TotalInvoiced,
SUM(salesorderdetails.qtyinvoiced * salesorderdetails.unitprice ) AS ValueSales,
stockmaster.description,
@@ -118,15 +123,14 @@
AND salesorderdetails.stkcode = stockmaster.stockid
AND salesorders.debtorno = debtorsmaster.debtorno
AND debtorsmaster.currcode = currencies.currabrev
- AND salesorders.fromstkloc = '" . $_POST["Location"] . "'
- AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_POST['NumberOfDays'] . " DAY)
+ AND salesorders.fromstkloc = '" . $_POST['Location'] . "'
+ AND salesorderdetails.ActualDispatchDate >= '" . $FromDate . "'
GROUP BY salesorderdetails.stkcode
- ORDER BY " . $_POST["order"] . " DESC
- LIMIT 0," . $_POST[NumberOfTopItems] . "";
+ ORDER BY " . $_POST['Sequence'] . " DESC
+ LIMIT " . $_POST['NumberOfTopItems'] . "";
} else {
//the situation if the location and customer type not selected "All"
- $SQL = "
- SELECT salesorderdetails.stkcode,
+ $SQL = "SELECT salesorderdetails.stkcode,
SUM(salesorderdetails.qtyinvoiced) TotalInvoiced,
SUM(salesorderdetails.qtyinvoiced * salesorderdetails.unitprice ) AS ValueSales,
stockmaster.description,
@@ -139,12 +143,12 @@
AND salesorderdetails.stkcode = stockmaster.stockid
AND salesorders.debtorno = debtorsmaster.debtorno
AND debtorsmaster.currcode = currencies.currabrev
- AND salesorders.fromstkloc = '" . $_POST["Location"] . "'
+ AND salesorders.fromstkloc = '" . $_POST['Location'] . "'
AND debtorsmaster.typeid = '" . $_POST['Customers'] . "'
- AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_POST['NumberOfDays'] . " DAY)
+ AND salesorderdetails.ActualDispatchDate >= '" . $FromDate . "'
GROUP BY salesorderdetails.stkcode
- ORDER BY " . $_POST["order"] . " DESC
- LIMIT 0," . $_POST[NumberOfTopItems] . "";
+ ORDER BY " . $_POST['Sequence'] . " DESC
+ LIMIT " . $_POST['NumberOfTopItems'] . "";
}
}
}
@@ -161,11 +165,11 @@
<th><strong>' . _('On Hand') . '</strong></th>';
echo $TableHeader;
echo '
- <input type="hidden" value=' . $_POST["Location"] . ' name=location />
- <input type="hidden" value=' . $_POST["order"] . ' name=order />
- <input type="hidden" value=' . $_POST["NumberOfDays"] . ' name=numberofdays />
- <input type="hidden" value=' . $_POST["Customers"] . ' name=customers />
- <input type="hidden" value=' . $_POST["NumberOfTopItems"] . ' name=NumberOfTopItems />
+ <input type="hidden" value=' . $_POST['Location'] . ' name=location />
+ <input type="hidden" value=' . $_POST['Sequence'] . ' name=Sequence />
+ <input type="hidden" value=' . $_POST['NumberOfDays'] . ' name=numberofdays />
+ <input type="hidden" value=' . $_POST['Customers'] . ' name=customers />
+ <input type="hidden" value=' . $_POST['NumberOfTopItems'] . ' name=NumberOfTopItems />
';
$k = 0; //row colour counter
$i = 1;
Modified: trunk/WorkOrderEntry.php
===================================================================
--- trunk/WorkOrderEntry.php 2011-02-02 07:52:17 UTC (rev 4480)
+++ trunk/WorkOrderEntry.php 2011-02-04 22:50:18 UTC (rev 4481)
@@ -252,7 +252,7 @@
if (isset($_POST['submit'])) { //The update button has been clicked
- echo '<div class=centre><a href="' . $_SERVER['PHP_SELF'] . '?' . SID . "'>" . _('Enter a new work order') . '</a>';
+ echo '<div class=centre><a href="' . $_SERVER['PHP_SELF'] . '?' . SID . '">' . _('Enter a new work order') . '</a>';
echo '<br><a href="' . $rootpath . '/SelectWorkOrder.php?' . SID . '">' . _('Select an existing work order') . '</a>';
echo '<br><a href="'. $rootpath . '/WorkOrderCosting.php?' . SID . '&WO=' . $_REQUEST['WO'] . '">' . _('Go to Costing'). '</a></div>';
Modified: trunk/Z_MakeNewCompany.php
===================================================================
--- trunk/Z_MakeNewCompany.php 2011-02-02 07:52:17 UTC (rev 4480)
+++ trunk/Z_MakeNewCompany.php 2011-02-04 22:50:18 UTC (rev 4481)
@@ -140,6 +140,11 @@
$Result = mkdir('./companies/' . $_POST['NewCompany'] . '/reportwriter');
$Result = mkdir('./companies/' . $_POST['NewCompany'] . '/pdf_append');
+ copy ('./companies/' . $_SESSION['DatabaseName'] . '/FormDesigns/GoodsReceived.xml', './companies/' .$_POST['NewCompany'] . '/FormDesigns/GoodsReceived.xml');
+ copy ('./companies/' . $_SESSION['DatabaseName'] . '/FormDesigns/PickingList.xml', './companies/' .$_POST['NewCompany'] . '/FormDesigns/PickingList.xml');
+ copy ('./companies/' . $_SESSION['DatabaseName'] . '/FormDesigns/PurchaseOrder.xml', './companies/' .$_POST['NewCompany'] . '/FormDesigns/PurchaseOrder.xml');
+ copy ('./companies/' . $_SESSION['DatabaseName'] . '/FormDesigns/SalesInvoice.xml', './companies/' .$_POST['NewCompany'] . '/FormDesigns/SalesInvoice.xml');
+
/*OK Now upload the logo */
if ($UploadTheLogo=='Yes'){
$result = move_uploaded_file($_FILES['LogoFile']['tmp_name'], $filename);
Modified: trunk/doc/Change.log.html
===================================================================
--- trunk/doc/Change.log.html 2011-02-02 07:52:17 UTC (rev 4480)
+++ trunk/doc/Change.log.html 2011-02-04 22:50:18 UTC (rev 4481)
@@ -1,5 +1,6 @@
-<p>/<font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p
+<p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p
<p></p>
+<p>2/2/11: Phil PDFTopItems.php and TopItems.php removed mysql specific SQL</p>
<p>30/1/11: Phil GoodsReceived.php rework for supplier units and conversion factor etc now in PO class</p>
<p>30/1/11: Phil PDFGrn.php rework for supplier units and conversion factor etc now in PO class</p>
<p>30/1/11:Exson changed PDFLowGP report remove % from gettext string</p>
Modified: trunk/index.php
===================================================================
--- trunk/index.php 2011-02-02 07:52:17 UTC (rev 4480)
+++ trunk/index.php 2011-02-04 22:50:18 UTC (rev 4481)
@@ -640,11 +640,6 @@
</tr>
<tr>
<td class="menu_group_item">
- <?php echo '<p>• <a href="' . $rootpath . '/ReorderLevelLocation.php?' . SID . '">' . _('Reorder Level By Category/Location') . '</a></p>'; ?>
- </td>
- </tr>
- <tr>
- <td class="menu_group_item">
<?php echo '<p>• <a href="' . $rootpath . '/StockDispatch.php?' . SID . '">' . _('Stock Dispatch') . '</a></p>'; ?>
</td>
</tr>
@@ -738,6 +733,11 @@
<?php echo '<p>• <a href="' . $rootpath . '/PricesByCost.php?' . SID . '">' . _('View or Update Prices Based On Costs') . '</a></p>'; ?>
</td>
</tr>
+ <tr>
+ <td class="menu_group_item">
+ <?php echo '<p>• <a href="' . $rootpath . '/ReorderLevelLocation.php?' . SID . '">' . _('Reorder Level By Category/Location') . '</a></p>'; ?>
+ </td>
+ </tr>
</table>
</td>
</tr>
Modified: trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo
===================================================================
(Binary files differ)
Modified: trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po
===================================================================
--- trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po 2011-02-02 07:52:17 UTC (rev 4480)
+++ trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po 2011-02-04 22:50:18 UTC (rev 4481)
@@ -342,11 +342,11 @@
#: AddCustomerNotes.php:125 AddCustomerTypeNotes.php:123 Areas.php:165
#: BankAccounts.php:226 BOMs.php:150 COGSGLPostings.php:113
#: COGSGLPostings.php:218 CreditStatus.php:175 Currencies.php:239
-#: CustLoginSetup.php:312 CustomerBranches.php:424 Customers.php:909
+#: CustLoginSetup.php:312 CustomerBranches.php:431 Customers.php:909
#: Customers.php:941 CustomerTypes.php:205 EDIMessageFormat.php:152
#: Factors.php:208 FixedAssetCategories.php:182 FixedAssetLocations.php:102
#: FreightCosts.php:243 GeocodeSetup.php:169 GLAccounts.php:319 GLTags.php:62
-#: Labels.php:414 Locations.php:382 MRPDemands.php:304 MRPDemandTypes.php:122
+#: Labels.php:414 Locations.php:354 MRPDemands.php:304 MRPDemandTypes.php:122
#: PaymentMethods.php:205 PaymentTerms.php:203 PcAssignCashToTab.php:251
#: PcClaimExpensesFromTab.php:229 PcExpenses.php:176 PcTabs.php:188
#: PcTypeTabs.php:171 PO_AuthorisationLevels.php:148 Prices_Customer.php:283
@@ -684,9 +684,9 @@
msgstr "TARIH"
#: AddCustomerNotes.php:107 AddCustomerTypeNotes.php:105 PcReportTab.php:176
-#: Stocks.php:871 UpgradeDatabase.php:145 UpgradeDatabase.php:148
-#: UpgradeDatabase.php:151 UpgradeDatabase.php:154 UpgradeDatabase.php:157
-#: UpgradeDatabase.php:160 UpgradeDatabase.php:163 Z_Upgrade_3.10-3.11.php:62
+#: Stocks.php:871 UpgradeDatabase.php:105 UpgradeDatabase.php:109
+#: UpgradeDatabase.php:113 UpgradeDatabase.php:117 UpgradeDatabase.php:121
+#: UpgradeDatabase.php:125 UpgradeDatabase.php:129 Z_Upgrade_3.10-3.11.php:62
#: Z_Upgrade_3.10-3.11.php:66 Z_Upgrade_3.10-3.11.php:70
#: Z_Upgrade_3.10-3.11.php:74 Z_Upgrade_3.10-3.11.php:78
#: Z_Upgrade_3.11-4.00.php:62 Z_Upgrade_3.11-4.00.php:66
@@ -1053,7 +1053,8 @@
msgid "New area code"
msgstr "YENI BÖLGE KODU"
-#: Areas.php:88
+#: Areas.php:88 includes/UpgradeDB_mysql.inc:31
+#: includes/UpgradeDB_mysql.inc:150
msgid "has been inserted"
msgstr "GIRILDI"
@@ -1062,9 +1063,7 @@
msgstr "BÖLGE EKLENEMEDI / GÜNCELLENEMEDI:"
#: Areas.php:116
-msgid ""
-"Cannot delete this area because customer branches have been created using "
-"this area"
+msgid "Cannot delete this area because customer branches have been created using this area"
msgstr "BU BÖLGE SILINEMIYOR, ONU KULLANAN MÜSTERI SUBELERI VAR"
#: Areas.php:117
@@ -1087,7 +1086,7 @@
msgstr "BÖLGE KODU"
#: Areas.php:133 CustomerTypes.php:166 Factors.php:142
-#: FixedAssetCategories.php:137 GLAccounts.php:208 Locations.php:328
+#: FixedAssetCategories.php:137 GLAccounts.php:208 Locations.php:300
#: MRPDemands.php:248 PcAssignCashToTab.php:118 PcClaimExpensesFromTab.php:109
#: PcExpenses.php:127 PcExpensesTypeTab.php:83 PcTabs.php:124
#: PcTypeTabs.php:134 SalesAnalReptCols.php:215 SalesCategories.php:139
@@ -1230,10 +1229,8 @@
msgstr "BANKA ADRESI 50 KARAKTERDEN KISA OLMALI"
#: BankAccounts.php:95
-msgid ""
-"Note that it is not possible to change the currency of the account once "
-"there are transactions against it"
-msgstr ""
+msgid "Note that it is not possible to change the currency of the account once there are transactions against it"
+msgstr "Bu işlemler buna karşı orada bir kez hesabın para birimini değiştirmek mümkün değildir unutmayın"
#: BankAccounts.php:108
msgid "The bank account details have been updated"
@@ -1252,9 +1249,7 @@
msgstr "EKLEME/DÜZELTME IÇIN KULLANILAN KOMUT:"
#: BankAccounts.php:162
-msgid ""
-"Cannot delete this bank account because transactions have been created using "
-"this account"
+msgid "Cannot delete this bank account because transactions have been created using this account"
msgstr "BU BANKA HESABI SILINEMEZ, ONA BAGLI ISLEMLER YARATILMIS"
#: BankAccounts.php:163
@@ -1300,7 +1295,7 @@
#: OffersReceived.php:98 PcReportTab.php:291 PcTabs.php:147 PcTabs.php:295
#: PDFPrintLabel.php:94 PO_AuthorisationLevels.php:125
#: PO_AuthorisationLevels.php:180 PO_AuthorisationLevels.php:183
-#: PO_AuthoriseMyOrders.php:107 PO_Header.php:534
+#: PO_AuthoriseMyOrders.php:107 PO_Header.php:538
#: PO_SelectOSPurchOrder.php:444 PO_SelectPurchOrder.php:359
#: PricesByCost.php:228 Prices.php:198 Prices.php:293 PurchData.php:172
#: PurchData.php:340 PurchData.php:453 SelectSupplier.php:251
@@ -1385,11 +1380,8 @@
msgstr "ISLEM BASARISIZ!"
#: BankMatching.php:72
-msgid ""
-"Use this screen to match webERP Receipts and Payments to your Bank "
-"Statement. Check your bank statement and click the check-box when you find "
-"the matching transaction."
-msgstr ""
+msgid "Use this screen to match webERP Receipts and Payments to your Bank Statement. Check your bank statement and click the check-box when you find the matching transaction."
+msgstr "senin Banka için webERP Makbuzlar ve Ödemeler maç için bu ekranı kullanın. banka hesap kontrol edin ve size uygun işlem bulmak check-kutusunu tıklatın."
#: BankMatching.php:80 BankReconciliation.php:97 CustomerReceipt.php:729
#: DailyBankTransactions.php:28 Payments.php:732 PDFChequeListing.php:46
@@ -1406,7 +1398,7 @@
#: StockLocTransferReceive.php:426 SupplierAllocations.php:443
#: SuppShiptChgs.php:126
msgid "from"
-msgstr ""
+msgstr "dan"
#: BankMatching.php:105 ConfirmDispatchControlled_Invoice.php:59
#: EmailCustTrans.php:65 FixedAssetRegister.php:78 FTP_RadioBeacon.php:281
@@ -1556,7 +1548,7 @@
#: BankMatching.php:226 BankMatching.php:255
msgid "Unclear"
-msgstr ""
+msgstr "Belirsiz"
#: BankMatching.php:299
msgid "Update Matching"
@@ -1657,7 +1649,7 @@
#: BankReconciliation.php:181
msgid "Add back unpresented cheques"
-msgstr ""
+msgstr "Eklemek geri çek unpresented"
#: BankReconciliation.php:186 BankReconciliation.php:258
#: CustomerAllocations.php:331 CustomerAllocations.php:357
@@ -1697,7 +1689,7 @@
#: BankReconciliation.php:231
msgid "Total of all unpresented cheques"
-msgstr ""
+msgstr "Tüm unpresented çeklerin toplam"
#: BankReconciliation.php:249
msgid "The uncleared deposits could not be retrieved by the SQL because"
@@ -2439,15 +2431,15 @@
#: BOMs.php:249
msgid "The effective to date must be a date after the effective after date"
-msgstr ""
+msgstr "Bugüne kadar etkili tarihten sonra etkili sonraki bir tarihte olmalı"
#: BOMs.php:249
msgid "The effective to date is"
-msgstr ""
+msgstr "Bugüne kadar etkilidir"
#: BOMs.php:249
msgid "days before the effective after date"
-msgstr ""
+msgstr "tarihinden sonra yürürlüğe gün öncesi"
#: BOMs.php:249
msgid "No updates have been performed"
@@ -2462,12 +2454,8 @@
msgstr "GEÇERLILIK -BITIS:"
#: BOMs.php:260
-msgid ""
-"Only non-serialised or non-lot controlled items can be set to auto issue. "
-"These items require the lot/serial numbers of items issued to the works "
-"orders to be specified so autoissue is not an option. Auto issue has been "
-"automatically set to off for this component"
-msgstr ""
+msgid "Only non-serialised or non-lot controlled items can be set to auto issue. These items require the lot/serial numbers of items issued to the works orders to be specified so autoissue is not an option. Auto issue has been automatically set to off for this component"
+msgstr "Sadece olmayan veya-çok seri kontrol öğeleri otomatik konu olarak ayarlanabilir. Bu öğeleri autoissue bir seçenek değil, dolayısıyla belirtilen yapılacak işler emir verilmiş öğelerin / seri numaraları çok gerektirir. Auto sorunu otomatik olarak bu bileşeni için yola olmuştur"
#: BOMs.php:284
msgid "Could not update this BOM component because"
@@ -2487,13 +2475,11 @@
#: BOMs.php:307
msgid "An error occurred in checking the component is not already on the BOM"
-msgstr ""
+msgstr "bileşeni kontrol bir hata oluştu BOM zaten değil"
#: BOMs.php:308
-msgid ""
-"The SQL that was used to check the component was not already on the BOM and "
-"that failed in the process was"
-msgstr ""
+msgid "The SQL that was used to check the component was not already on the BOM and that failed in the process was"
+msgstr "bileşeni kontrol etmek için kullanılan SQL BOM zaten değildi ve bu süreçte başarısız oldu"
#: BOMs.php:331
msgid "Could not insert the BOM component because"
@@ -2520,10 +2506,8 @@
msgstr "ÖNCEDEN SU ÜRÜNÜN KOMPONENTI OLARAK KAYDEDILMIS >>"
#: BOMs.php:344
-msgid ""
-"Whilst the quantity of the component required can be modified it is "
-"inappropriate for a component to appear more than once in a bill of material"
-msgstr ""
+msgid "Whilst the quantity of the component required can be modified it is inappropriate for a component to appear more than once in a bill of material"
+msgstr "gerekli bileşeni yaparken miktarı bir bileşen malzemenin bir faturada birden fazla görünmesi için uygun değildir değiştirilebilir"
#: BOMs.php:361
msgid "Could not delete this BOM components because"
@@ -2569,7 +2553,7 @@
#: BOMs.php:415 BOMs.php:496 Stocks.php:814 Stocks.php:816
msgid "Phantom"
-msgstr ""
+msgstr "Fantom"
#: BOMs.php:419
msgid "Select a Different BOM"
@@ -2738,7 +2722,7 @@
#: COGSGLPostings.php:237
msgid "Show all cost of sales posting records"
-msgstr ""
+msgstr "satış rekorları mesajın tüm maliyet göster"
#: COGSGLPostings.php:273 COGSGLPostings.php:290 COGSGLPostings.php:308
#: SalesGLPostings.php:309 SalesGLPostings.php:330 SalesGLPostings.php:356
@@ -2899,27 +2883,27 @@
#: CompanyPreferences.php:330
msgid "Payroll Net Pay Clearing GL Account"
-msgstr ""
+msgstr "GL Hesap Takas Bordro Net Ücret"
#: CompanyPreferences.php:344
msgid "Goods Received Clearing GL Account"
-msgstr ""
+msgstr "Mal GL Hesap Takas Alınan"
#: CompanyPreferences.php:357
msgid "Retained Earning Clearing GL Account"
-msgstr ""
+msgstr "Kazanç Takas GL Hesap Geçmiş"
#: CompanyPreferences.php:371
msgid "Freight Re-charged GL Account"
-msgstr ""
+msgstr "Navlun Re-ücret GL Hesabı"
#: CompanyPreferences.php:393
msgid "Sales Exchange Variances GL Account"
-msgstr ""
+msgstr "Satış Exchange Varyanslar GL Hesabı"
#: CompanyPreferences.php:407
msgid "Purchases Exchange Variances GL Account"
-msgstr ""
+msgstr "Alımları Exchange Varyanslar GL Hesabı"
#: CompanyPreferences.php:421
msgid "Payment Discount GL Account"
@@ -5861,11 +5845,11 @@
#: Credit_Invoice.php:21
msgid "from the customer inquiry screen click the link to credit an invoice"
-msgstr ""
+msgstr "müşteri sorgulama ekranından bir fatura kredi için bağlantıyı tıklayın"
#: Credit_Invoice.php:69
msgid "A credit cannot be produced for the selected invoice"
-msgstr ""
+msgstr "Bir kredi seçilen fatura için üretilen olamaz"
#: Credit_Invoice.php:69
msgid "The invoice details cannot be retrieved because"
@@ -5873,67 +5857,59 @@
#: Credit_Invoice.php:70
msgid "The SQL used to retrieve the invoice details was"
-msgstr ""
+msgstr "SQL fatura bilgilerini almak için kullanılan"
#: Credit_Invoice.php:127 Credit_Invoice.php:173
msgid "This invoice can not be credited using this program"
-msgstr ""
+msgstr "Bu faturanın bu programı kullanarak kredi olamaz"
#: Credit_Invoice.php:127 Credit_Invoice.php:173
msgid "A manual credit note will need to be prepared"
-msgstr ""
+msgstr "Manuel kredi notu hazırlıklı olmak gerekir"
#: Credit_Invoice.php:128
msgid "The SQL used to get the transaction header was"
-msgstr ""
+msgstr "SQL işlem başlık olarak almak için kullanılır"
#: Credit_Invoice.php:173
msgid "The line item"
msgstr "SATIR KALEMI"
#: Credit_Invoice.php:173
-msgid ""
-"is controlled but the serial numbers or batch numbers could not be retrieved "
-"because"
+msgid "is controlled but the serial numbers or batch numbers could not be retrieved because"
msgstr "KONTROLLÜ, ANCAK SERI/LOT NUMARALARI GÖSTERILEMIYOR:"
#: Credit_Invoice.php:174
msgid "The SQL used to get the controlled item details was"
-msgstr ""
+msgstr "SQL kontrol öğesi bilgi almak için kullanılan"
#: Credit_Invoice.php:187
msgid "There are no line items that were retrieved for this invoice"
-msgstr ""
+msgstr "Bu fatura için elde edildi hiçbir satır öğeleri vardır"
#: Credit_Invoice.php:187
-msgid ""
-"The automatic credit program can not create a credit note from this invoice"
-msgstr ""
+msgid "The automatic credit program can not create a credit note from this invoice"
+msgstr "Otomatik kredi programı bu faturanın bir kredi notu oluşturamazsınız"
#: Credit_Invoice.php:193
msgid "This invoice can not be credited using the automatic facility"
-msgstr ""
+msgstr "Bu fatura otomatik özelliğini kullanarak kredi olamaz"
#: Credit_Invoice.php:193
-msgid ""
-"Please report that a duplicate DebtorTrans header record was found for "
-"invoice"
-msgstr ""
+msgid "Please report that a duplicate DebtorTrans header record was found for invoice"
+msgstr "Bir DebtorTrans başlık rekor faturası bulundu yinelenen rapor edin"
#: Credit_Invoice.php:238 SelectCreditItems.php:554
-msgid ""
-"The item could not be updated because you are attempting to set the quantity "
-"credited to less than 0 or the price less than 0 or the discount more than "
-"100% or less than 0%"
-msgstr ""
+msgid "The item could not be updated because you are attempting to set the quantity credited to less than 0 or the price less than 0 or the discount more than 100% or less than 0%"
+msgstr "Eğer az% 0 ya da indirim% 100'den fazla ya da 0'dan az 0 veya fiyat daha az alacak miktarını ayarlamak için çalışıyor çünkü madde güncellenir olamazdı"
#: Credit_Invoice.php:267
msgid "Credit Invoice"
-msgstr ""
+msgstr "Kredi Fatura"
#: Credit_Invoice.php:269
msgid "Credit Note amounts stated in"
-msgstr ""
+msgstr "belirtilen Kredi Notu miktarlarda"
#: Credit_Invoice.php:273 PDFOrdersInvoiced.php:347 PDFOrderStatus.php:315
#: ReverseGRN.php:380 SalesInquiry.php:830 ShipmentCosting.php:140
@@ -5944,7 +5920,7 @@
#: Credit_Invoice.php:275 GLAccountInquiry.php:156 GLAccountReport.php:371
#: GLJournal.php:343 GLJournal.php:362 SuppCreditGRNs.php:228
msgid "Credit"
-msgstr ""
+msgstr "Kredi"
#: Credit_Invoice.php:399
msgid "Freight cost charged on invoice"
@@ -5959,15 +5935,11 @@
msgstr "TOPLAM"
#: Credit_Invoice.php:463 SelectCreditItems.php:897
-msgid ""
-"The GL code to write off the credit value to must be specified. Please "
-"select the appropriate GL code for the selection box"
-msgstr ""
+msgid "The GL code to write off the credit value to must be specified. Please select the appropriate GL code for the selection box"
+msgstr "GL kodu belirtilmelidir için kredi değeri off yazmak için. seçim kutusu için uygun GL kodu seçiniz"
#: Credit_Invoice.php:545
-msgid ""
-"The alteration to the invoice record to reflect the allocation of the credit "
-"note to the invoice could not be done because"
+msgid "The alteration to the invoice record to reflect the allocation of the credit note to the invoice could not be done because...
[truncated message content] |