|
From: <dai...@us...> - 2012-03-03 21:32:17
|
Revision: 5006
http://web-erp.svn.sourceforge.net/web-erp/?rev=5006&view=rev
Author: daintree
Date: 2012-03-03 21:32:10 +0000 (Sat, 03 Mar 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/ReorderLevel.php
trunk/SelectProduct.php
trunk/Stocks.php
trunk/doc/Change.log
trunk/includes/MainMenuLinksArray.php
trunk/includes/PDFTransPageHeaderPortrait.inc
trunk/includes/footer.inc
trunk/index.php
Added Paths:
-----------
trunk/companies/weberpdemo/part_pics/BREAD.jpg
Modified: trunk/ReorderLevel.php
===================================================================
--- trunk/ReorderLevel.php 2012-03-03 20:03:26 UTC (rev 5005)
+++ trunk/ReorderLevel.php 2012-03-03 21:32:10 UTC (rev 5006)
@@ -109,8 +109,8 @@
AND locstock.stockid = stockmaster.stockid
AND locstock.stockid ='" . $myrow['stockid'] .
"' AND locstock.loccode !='" . $myrow['loccode'] . "'";
- $otherresult = DB_query($sql2,$db,'','',false,true);
- while ($myrow2 = DB_fetch_array($otherresult,$db)){
+ $OtherResult = DB_query($sql2,$db,'','',false,true);
+ while ($myrow2 = DB_fetch_array($OtherResult,$db)){
$YPos -=$line_height;
// Parameters for addTextWrap are defined in /includes/class.pdf.php
@@ -146,8 +146,8 @@
include('includes/footer.inc');
exit;
} else {
- $pdf->OutputD($_SESSION['DatabaseName'] . '_ReOrderLevel_' . date('Y-m-d') . '.pdf');//UldisN
- $pdf->__destruct(); //UldisN
+ $pdf->OutputD($_SESSION['DatabaseName'] . '_ReOrderLevel_' . date('Y-m-d') . '.pdf');
+ $pdf->__destruct();
}
} else { /*The option to print PDF was not hit so display form */
Modified: trunk/SelectProduct.php
===================================================================
--- trunk/SelectProduct.php 2012-03-03 20:03:26 UTC (rev 5005)
+++ trunk/SelectProduct.php 2012-03-03 21:32:10 UTC (rev 5006)
@@ -411,7 +411,9 @@
if ($Its_A_Kitset_Assembly_Or_Dummy == False) {
echo '<a href="' . $rootpath . '/PO_SelectOSPurchOrder.php?SelectedStockItem=' . $StockID . '">' . _('Search Outstanding Purchase Orders') . '</a><br />';
echo '<a href="' . $rootpath . '/PO_SelectPurchOrder.php?SelectedStockItem=' . $StockID . '">' . _('Search All Purchase Orders') . '</a><br />';
- echo '<a href="' . $rootpath . '/' . $_SESSION['part_pics_dir'] . '/' . $StockID . '.jpg">' . _('Show Part Picture (if available)') . '</a><br />';
+ if (file_exists($_SESSION['part_pics_dir'] . '/' . $StockID . '.jpg')){
+ echo '<a href="' . $rootpath . '/' . $_SESSION['part_pics_dir'] . '/' . $StockID . '.jpg">' . _('Show Part Picture') . '</a><br />';
+ }
}
if ($Its_A_Dummy == False) {
echo '<a href="' . $rootpath . '/BOMInquiry.php?StockID=' . $StockID . '">' . _('View Costed Bill Of Material') . '</a><br />';
Modified: trunk/Stocks.php
===================================================================
--- trunk/Stocks.php 2012-03-03 20:03:26 UTC (rev 5005)
+++ trunk/Stocks.php 2012-03-03 21:32:10 UTC (rev 5006)
@@ -90,7 +90,7 @@
$i=1;
- if (!isset($_POST['Description']) or mb_strlen($_POST['Description']) > 50 OR mb_strlen($_POST['Description'])==0) {
+ if (!isset($_POST['Description']) OR mb_strlen($_POST['Description']) > 50 OR mb_strlen($_POST['Description'])==0) {
$InputError = 1;
prnMsg (_('The stock item description must be entered and be fifty characters or less long') . '. ' . _('It cannot be a zero length string either') . ' - ' . _('a description is required'),'error');
$Errors[$i] = 'Description';
@@ -719,7 +719,7 @@
echo '<input type="hidden" name="New" value="'.$New.'" />';
-if (!isset($StockID) or $StockID=='' or isset($_POST['UpdateCategories'])) {
+if (!isset($StockID) OR $StockID=='' or isset($_POST['UpdateCategories'])) {
/*If the page was called without $StockID passed to page then assume a new stock item is to be entered show a form with a part Code field other wise the form showing the fields with the existing entries against the part will show for editing with only a hidden StockID field. New is set to flag that the page may have called itself and still be entering a new part, in which case the page needs to know not to go looking up details for an existing part*/
if (!isset($StockID)) {
@@ -851,7 +851,7 @@
$result = DB_query($sql,$db,$ErrMsg,$DbgMsg);
while ($myrow=DB_fetch_array($result)){
- if (!isset($_POST['CategoryID']) or $myrow['categoryid']==$_POST['CategoryID']){
+ if (!isset($_POST['CategoryID']) OR $myrow['categoryid']==$_POST['CategoryID']){
echo '<option selected="selected" value="'. $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>';
} else {
echo '<option value="'. $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>';
@@ -879,13 +879,13 @@
if (!isset($_POST['Controlled']) OR $_POST['Controlled']==''){
$_POST['Controlled']=0;
}
-if (!isset($_POST['Serialised']) or $_POST['Serialised']=='' || $_POST['Controlled']==0){
+if (!isset($_POST['Serialised']) OR $_POST['Serialised']=='' || $_POST['Controlled']==0){
$_POST['Serialised']=0;
}
-if (!isset($_POST['DecimalPlaces']) or $_POST['DecimalPlaces']==''){
+if (!isset($_POST['DecimalPlaces']) OR $_POST['DecimalPlaces']==''){
$_POST['DecimalPlaces']=0;
}
-if (!isset($_POST['Discontinued']) or $_POST['Discontinued']==''){
+if (!isset($_POST['Discontinued']) OR $_POST['Discontinued']==''){
$_POST['Discontinued']=0;
}
if (!isset($_POST['Pansize'])) {
@@ -941,22 +941,22 @@
} else {
echo '<option value="A">' . _('Assembly') . '</option>';
}
-if (!isset($_POST['MBFlag']) or $_POST['MBFlag']=='K'){
+if (!isset($_POST['MBFlag']) OR $_POST['MBFlag']=='K'){
echo '<option selected="selected" value="K">' . _('Kit') . '</option>';
} else {
echo '<option value="K">' . _('Kit') . '</option>';
}
-if (!isset($_POST['MBFlag']) or $_POST['MBFlag']=='M'){
+if (!isset($_POST['MBFlag']) OR $_POST['MBFlag']=='M'){
echo '<option selected="selected" value="M">' . _('Manufactured') . '</option>';
} else {
echo '<option value="M">' . _('Manufactured') . '</option>';
}
-if (!isset($_POST['MBFlag']) or $_POST['MBFlag']=='G' OR !isset($_POST['MBFlag']) OR $_POST['MBFlag']==''){
+if (!isset($_POST['MBFlag']) OR $_POST['MBFlag']=='G' OR !isset($_POST['MBFlag']) OR $_POST['MBFlag']==''){
echo '<option selected="selected" value="G">' . _('Phantom') . '</option>';
} else {
echo '<option value="G">' . _('Phantom') . '</option>';
}
-if (!isset($_POST['MBFlag']) or $_POST['MBFlag']=='B' OR !isset($_POST['MBFlag']) OR $_POST['MBFlag']==''){
+if (!isset($_POST['MBFlag']) OR $_POST['MBFlag']=='B' OR !isset($_POST['MBFlag']) OR $_POST['MBFlag']==''){
echo '<option selected="selected" value="B">' . _('Purchased') . '</option>';
} else {
echo '<option value="B">' . _('Purchased') . '</option>';
@@ -1031,7 +1031,7 @@
<td>' . _('Perishable') . ':</td>
<td><select name="Perishable">';
-if (!isset($_POST['Perishable']) or $_POST['Perishable']==0){
+if (!isset($_POST['Perishable']) OR $_POST['Perishable']==0){
echo '<option selected="selected" value="0">' . _('No'). '</option>';
} else {
echo '<option value="0">' . _('No'). '</option>';
Added: trunk/companies/weberpdemo/part_pics/BREAD.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/companies/weberpdemo/part_pics/BREAD.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2012-03-03 20:03:26 UTC (rev 5005)
+++ trunk/doc/Change.log 2012-03-03 21:32:10 UTC (rev 5006)
@@ -1,5 +1,6 @@
webERP Change Log
+3/3/12 Phil: SelectProduct.php checked for existence of part pic before displaying a link that could potnetially fail
29/2/12 Phil: Changed all htmlentities calls to htmlspecialchars calls
28/2/12 Tim: Added functionality that allows for the set up of internal departments, and for the request of stock to be issued - a new issue account is defined in stockcategories. Issue requests must be authorised by a department manager and then issues fulfilled creates a stock adjustment with posting in the gl to the item category issue account.
28/02/2012 Vitaly: Added DB_escape_string() to narrative in SQL INSERT statements. Fixes a problem posting to database when the string contains quotes.
Modified: trunk/includes/MainMenuLinksArray.php
===================================================================
--- trunk/includes/MainMenuLinksArray.php 2012-03-03 20:03:26 UTC (rev 5005)
+++ trunk/includes/MainMenuLinksArray.php 2012-03-03 21:32:10 UTC (rev 5006)
@@ -101,11 +101,16 @@
_('Customer Listing By Area/Salesperson'),
_('Sales Graphs'),
_('List Daily Transactions'),
- _('Customer Transaction Inquiries')
- );
+ _('Customer Transaction Inquiries') );
+if ($_SESSION['InvoicePortraitFormat']==0){
+ $PrintInvoicesOrCreditNotesScript = '/PrintCustTrans.php';
+} else {
+ $PrintInvoicesOrCreditNotesScript = '/PrintCustTransPortrait.php';
+}
+
$MenuItems['AR']['Reports']['URL'] = array ('/CustWhereAlloc.php',
- '/PrintCustTrans.php',
+ $PrintInvoicesOrCreditNotesScript,
'/PrintCustStatements.php',
'/SalesAnalRepts.php',
'/AgedDebtors.php',
@@ -114,8 +119,7 @@
'/PDFCustomerList.php',
'/SalesGraph.php',
'/PDFCustTransListing.php',
- '/CustomerTransInquiry.php'
- );
+ '/CustomerTransInquiry.php' );
$MenuItems['AR']['Maintenance']['Caption'] = array (_('Add Customer'),
_('Customers')
Modified: trunk/includes/PDFTransPageHeaderPortrait.inc
===================================================================
--- trunk/includes/PDFTransPageHeaderPortrait.inc 2012-03-03 20:03:26 UTC (rev 5005)
+++ trunk/includes/PDFTransPageHeaderPortrait.inc 2012-03-03 21:32:10 UTC (rev 5006)
@@ -9,7 +9,7 @@
$YPos = $Page_Height - $Top_Margin;
-$pdf->addJpegFromFile($_SESSION['LogoFile'],$Page_Width/2 -115,$YPos-50,0,35);
+$pdf->addJpegFromFile($_SESSION['LogoFile'],$Page_Width/2 -118,$YPos-60,0,35);
$FontSize =15;
if ($InvOrCredit=='Invoice') {
Modified: trunk/includes/footer.inc
===================================================================
--- trunk/includes/footer.inc 2012-03-03 20:03:26 UTC (rev 5005)
+++ trunk/includes/footer.inc 2012-03-03 21:32:10 UTC (rev 5006)
@@ -6,15 +6,15 @@
echo '<tr>';
echo '<td style="width:33%"></td><td class="footer">';
-echo '<img src="'. $rootpath . '/' . $_SESSION['LogoFile'] . '" width="120" alt="webERP" title="webERP ' . _('Copyright') . ' © webrp.org - ' . date('Y') . '" /></td>';
+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%">'.(strftime('%A')).', '.(date($_SESSION['DefaultDateFormat']).' | '.(strftime(($DefaultClock==12) ? '%I:%M %p' : '%H:%M'))).'</td>';
echo '</tr>';
+echo '<tr><td colspan="3" class="footer">' ._('Copyright') . ' © weberp.org 2003 - ' . date('Y') . '</td></tr>';
+echo '<tr><td colspan="3" class="footer">webERP ' ._('version') .' ' . $_SESSION['VersionNumber'] . '</td></tr>';
-echo '<tr><td colspan="3" class="footer">webERP v' . $_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/weberp"><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 '<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>';
Modified: trunk/index.php
===================================================================
--- trunk/index.php 2012-03-03 20:03:26 UTC (rev 5005)
+++ trunk/index.php 2012-03-03 21:32:10 UTC (rev 5006)
@@ -68,7 +68,7 @@
if ($_SESSION['ModulesEnabled'][$i]==1) {
// If this is the first time the application is loaded then it is possible that
// SESSION['Module'] is not set if so set it to the first module that is enabled for the user
- if (!isset($_SESSION['Module'])OR $_SESSION['Module']==''){
+ if (!isset($_SESSION['Module']) OR $_SESSION['Module']==''){
$_SESSION['Module']=$ModuleLink[$i];
}
if ($ModuleLink[$i] == $_SESSION['Module']){
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|