|
From: <dai...@us...> - 2011-07-05 10:27:34
|
Revision: 4623
http://web-erp.svn.sourceforge.net/web-erp/?rev=4623&view=rev
Author: daintree
Date: 2011-07-05 10:27:25 +0000 (Tue, 05 Jul 2011)
Log Message:
-----------
various
Modified Paths:
--------------
trunk/EDIProcessOrders.php
trunk/EDISendInvoices.php
trunk/EmailConfirmation.php
trunk/EmailCustTrans.php
trunk/ExchangeRateTrend.php
trunk/Factors.php
trunk/FixedAssetRegister.php
trunk/PDFQuotation.php
trunk/PDFQuotationPortrait.php
trunk/ShipmentCosting.php
trunk/TaxAuthorityRates.php
trunk/includes/LanguagesArray.php
trunk/includes/PDFQuotationPageHeader.inc
trunk/includes/PDFQuotationPortraitPageHeader.inc
trunk/includes/RFC822.php
trunk/includes/tcpdf/tcpdf.php
trunk/sql/mysql/upgrade4.04.4-4.04.5.sql
Modified: trunk/EDIProcessOrders.php
===================================================================
--- trunk/EDIProcessOrders.php 2011-07-03 04:33:19 UTC (rev 4622)
+++ trunk/EDIProcessOrders.php 2011-07-05 10:27:25 UTC (rev 4623)
@@ -76,7 +76,7 @@
while ($LineText = fgets($fp) AND $TryNextFile != True){ /* get each line of the order file */
$LineText = StripTrailingComma($LineText);
- echo "<br />".$LineText;
+ echo '<br />' . $LineText;
if ($SegTag != mb_substr($LineText,0,3)){
$SegCounter=1;
@@ -140,7 +140,7 @@
$Order->Comments .= "\n" . _('blanket order');
break;
case '224':
- $EmailText .= "\n\n" . _('This order is URGENT') . "</font>";
+ $EmailText .= "\n\n" . _('This order is URGENT') . '</font>';
$Order->Comments .= "\n" . _('URGENT ORDER');
break;
case '226':
@@ -184,7 +184,7 @@
$EmailText .= "\n" . _('Customers order ref') . ': ' . $BGM_C106[0];
}
if (isset($BGM_elements[2])){
- echo "<br />echo BGM_elements[2] " .$BGM_elements[2];
+ echo '<br />echo BGM_elements[2] ' .$BGM_elements[2];
$BGM_1225 = explode(':',$BGM_elements[2]);
$MsgFunction = $BGM_1225[0];
@@ -457,22 +457,23 @@
case 'SN':
/*Store Number - get the branch details from the store number - snag here too cos need to ensure got the Customer detail first before try looking up its branches */
$BranchResult = DB_query("SELECT branchcode,
- brname,
- braddress1,
- braddress2,
- braddress3,
- braddress4,
- braddress5,
- braddress6,
- contactname,
- defaultlocation,
- phoneno,
- email
- FROM custbranch INNER JOIN debtorsmaster ON custbranch.debtorno = custbranch.debtorno WHERE custbranchcode='" . $NAD_C082[0] . "' AND custbranch.debtorno='" . $Order->DebtorNo . "' AND debtorsmaster.ediorders=1",$db);
+ brname,
+ braddress1,
+ braddress2,
+ braddress3,
+ braddress4,
+ braddress5,
+ braddress6,
+ contactname,
+ defaultlocation,
+ phoneno,
+ email
+ FROM custbranch INNER JOIN debtorsmaster ON custbranch.debtorno = custbranch.debtorno WHERE custbranchcode='" . $NAD_C082[0] . "' AND custbranch.debtorno='" . $Order->DebtorNo . "' AND debtorsmaster.ediorders=1",$db);
if (DB_num_rows($BranchResult)!=1){
$EmailText .= "\n" . _('The Store number was specified as') . ' ' . $NAD_C082[0] . ' ' . _('Unfortunately there are either no branches of customer code') . ' ' . $Order->DebtorNo . ' ' ._('or several that match this store number') . '. ' . _('This order could not be processed further');
$TryNextFile = True; /* Look for other EDI msgs */
- $CreateOrder = False; /*Dont create order in system */ } else {
+ $CreateOrder = False; /*Dont create order in system */
+ } else {
$BranchRow = DB_fetch_array($BranchResult);
$Order->BranchCode = $BranchRow['branchcode'];
$Order->DeliverTo = $BranchRow['brname'];
Modified: trunk/EDISendInvoices.php
===================================================================
--- trunk/EDISendInvoices.php 2011-07-03 04:33:19 UTC (rev 4622)
+++ trunk/EDISendInvoices.php 2011-07-05 10:27:25 UTC (rev 4623)
@@ -8,16 +8,16 @@
include('includes/htmlMimeMail.php'); // need for sending email attachments
/*Get the Customers who are enabled for EDI invoicing */
-$sql = 'SELECT debtorno,
- edireference,
- editransport,
- ediaddress,
- ediserveruser,
- ediserverpwd,
- daysbeforedue,
- dayinfollowingmonth
- FROM debtorsmaster INNER JOIN paymentterms ON debtorsmaster.paymentterms=paymentterms.termsindicator
- WHERE ediinvoices=1';
+$sql = "SELECT debtorno,
+ edireference,
+ editransport,
+ ediaddress,
+ ediserveruser,
+ ediserverpwd,
+ daysbeforedue,
+ dayinfollowingmonth
+ FROM debtorsmaster INNER JOIN paymentterms ON debtorsmaster.paymentterms=paymentterms.termsindicator
+ WHERE ediinvoices=1";
$EDIInvCusts = DB_query($sql,$db);
@@ -30,29 +30,29 @@
/*Figure out if there are any unset invoices or credits for the customer */
$sql = "SELECT debtortrans.id,
- transno,
- type,
- order_,
- trandate,
- ovgst,
- ovamount,
- ovfreight,
- ovdiscount,
- debtortrans.branchcode,
- custbranchcode,
- invtext,
- shipvia,
- rate,
- brname,
- braddress1,
- braddress2,
- braddress3,
- braddress4
- FROM debtortrans INNER JOIN custbranch ON custbranch.debtorno = debtortrans.debtorno
- AND custbranch.branchcode = debtortrans.branchcode
- WHERE (type=10 or type=11)
- AND edisent=0
- AND debtortrans.debtorno='" . $CustDetails['debtorno'] . "'";
+ transno,
+ type,
+ order_,
+ trandate,
+ ovgst,
+ ovamount,
+ ovfreight,
+ ovdiscount,
+ debtortrans.branchcode,
+ custbranchcode,
+ invtext,
+ shipvia,
+ rate,
+ brname,
+ braddress1,
+ braddress2,
+ braddress3,
+ braddress4
+ FROM debtortrans INNER JOIN custbranch ON custbranch.debtorno = debtortrans.debtorno
+ AND custbranch.branchcode = debtortrans.branchcode
+ WHERE (type=10 or type=11)
+ AND edisent=0
+ AND debtortrans.debtorno='" . $CustDetails['debtorno'] . "'";
$ErrMsg = _('There was a problem retrieving the customer transactions because');
$TransHeaders = DB_query($sql,$db,$ErrMsg);
@@ -135,34 +135,34 @@
if ($TransDetail['type']==10){ /*its an invoice */
$sql = "SELECT stockmoves.stockid,
- stockmaster.description,
- -stockmoves.qty as quantity,
- stockmoves.discountpercent,
- ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . "* -stockmoves.qty) AS fxnet,
- (stockmoves.price * " . $ExchRate . ") AS fxprice,
- stockmoves.taxrate,
- stockmaster.units
- FROM stockmoves,
- stockmaster
- WHERE stockmoves.stockid = stockmaster.stockid
- AND stockmoves.type=10
- AND stockmoves.transno='" . $TransNo . "'
- AND stockmoves.show_on_inv_crds=1";
+ stockmaster.description,
+ -stockmoves.qty as quantity,
+ stockmoves.discountpercent,
+ ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . "* -stockmoves.qty) AS fxnet,
+ (stockmoves.price * " . $ExchRate . ") AS fxprice,
+ stockmoves.taxrate,
+ stockmaster.units
+ FROM stockmoves,
+ stockmaster
+ WHERE stockmoves.stockid = stockmaster.stockid
+ AND stockmoves.type=10
+ AND stockmoves.transno='" . $TransNo . "'
+ AND stockmoves.show_on_inv_crds=1";
} else {
/* credit note */
$sql = "SELECT stockmoves.stockid,
- stockmaster.description,
- stockmoves.qty as quantity,
- stockmoves.discountpercent,
- ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . " * stockmoves.qty) as fxnet,
- (stockmoves.price * " . $ExchRate . ") AS fxprice,
- stockmoves.taxrate,
- stockmaster.units
- FROM stockmoves,
- stockmaster
- WHERE stockmoves.stockid = stockmaster.stockid
- AND stockmoves.type=11 and stockmoves.transno='" . $TransNo . "'
- AND stockmoves.show_on_inv_crds=1";
+ stockmaster.description,
+ stockmoves.qty as quantity,
+ stockmoves.discountpercent,
+ ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . " * stockmoves.qty) as fxnet,
+ (stockmoves.price * " . $ExchRate . ") AS fxprice,
+ stockmoves.taxrate,
+ stockmaster.units
+ FROM stockmoves,
+ stockmaster
+ WHERE stockmoves.stockid = stockmaster.stockid
+ AND stockmoves.type=11 and stockmoves.transno='" . $TransNo . "'
+ AND stockmoves.show_on_inv_crds=1";
}
$TransLinesResult = DB_query($sql,$db);
@@ -174,9 +174,9 @@
$StockID = $TransLines['StockID'];
$sql = "SELECT partnerstockid
FROM ediitemmapping
- WHERE supporcust='CUST'
- AND partnercode ='" . $CustDetails['debtorno'] . "'
- AND stockid='" . $TransLines['stockid'] . "'";
+ WHERE supporcust='CUST'
+ AND partnercode ='" . $CustDetails['debtorno'] . "'
+ AND stockid='" . $TransLines['stockid'] . "'";
$CustStkResult = DB_query($sql,$db);
if (DB_num_rows($CustStkResult)==1){
Modified: trunk/EmailConfirmation.php
===================================================================
--- trunk/EmailConfirmation.php 2011-07-03 04:33:19 UTC (rev 4622)
+++ trunk/EmailConfirmation.php 2011-07-05 10:27:25 UTC (rev 4623)
@@ -1,108 +1,144 @@
<?php
/* $Id$*/
-//$PageSecurity = 2;
include('includes/session.inc');
include('includes/SQL_CommonFunctions.inc');
//Get Out if we have no order number to work with
If (!isset($_GET['TransNo']) OR $_GET['TransNo']==""){
- $title = _('Select Order To Print');
- include('includes/header.inc');
- echo '<div class="centre"><br /><br /><br />';
- prnMsg( _('Select an Order Number to Print before calling this page') , 'error');
- echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item">
- <li><a href="'. $rootpath . '/SelectSalesOrder.php?'. SID .'">' . _('Outstanding Sales Orders') . '</a></li>
- <li><a href="'. $rootpath . '/SelectCompletedOrder.php?'. SID .'">' . _('Completed Sales Orders') . '</a></li>
- </td></tr></table></div><br /><br /><br />';
- include('includes/footer.inc');
- exit();
+ $title = _('Select Order To Print');
+ include('includes/header.inc');
+ echo '<div class="centre">
+ <br />
+ <br />
+ <br />';
+ prnMsg( _('Select an Order Number to Print before calling this page') , 'error');
+ echo '<br />
+ <br />
+ <br />
+ <table class="table_index">
+ <tr>
+ <td class="menu_group_item">
+ <ul>
+ <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li>
+ <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li>
+ </ul>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <br />
+ <br />
+ <br />';
+ include('includes/footer.inc');
+ exit();
}
-$MailTo = $_GET['EMail'];
-$headers = 'From: Bethany Manufacturing <sa...@be...>' . '\n';
-$headers .= 'MIME-Version: 1.0\n' . 'Content-Type: text/html; charset="utf-8"\n';
+$MailTo = $_GET['EMail'];
+$headers = 'From: Bethany Manufacturing <sa...@be...>' . '\n';
+$headers .= 'MIME-Version: 1.0\n' . 'Content-Type: text/html; charset="utf-8"\n';
/*retrieve the order details from the database to print */
$ErrMsg = _('There was a problem retrieving the order header details for Order Number') . ' ' . $_GET['TransNo'] . ' ' . _('from the database');
$sql = "SELECT salesorders.debtorno,
- salesorders.customerref,
- salesorders.comments,
- salesorders.orddate,
- salesorders.deliverto,
- salesorders.deladd1,
- salesorders.deladd2,
- salesorders.deladd3,
- salesorders.deladd4,
- salesorders.deladd5,
- salesorders.deladd6,
- salesorders.deliverblind,
- debtorsmaster.name,
- debtorsmaster.address1,
- debtorsmaster.address2,
- debtorsmaster.address3,
- debtorsmaster.address4,
- debtorsmaster.address5,
- debtorsmaster.address6,
- shippers.shippername,
- salesorders.printedpackingslip,
- salesorders.datepackingslipprinted,
- locations.locationname,
- salesorders.deliverydate
- FROM salesorders,
- debtorsmaster,
- shippers,
- locations
- WHERE salesorders.debtorno=debtorsmaster.debtorno
- AND salesorders.shipvia=shippers.shipper_id
- AND salesorders.fromstkloc=locations.loccode
- AND salesorders.orderno=" . $_GET['TransNo'];
+ salesorders.customerref,
+ salesorders.comments,
+ salesorders.orddate,
+ salesorders.deliverto,
+ salesorders.deladd1,
+ salesorders.deladd2,
+ salesorders.deladd3,
+ salesorders.deladd4,
+ salesorders.deladd5,
+ salesorders.deladd6,
+ salesorders.deliverblind,
+ debtorsmaster.name,
+ debtorsmaster.address1,
+ debtorsmaster.address2,
+ debtorsmaster.address3,
+ debtorsmaster.address4,
+ debtorsmaster.address5,
+ debtorsmaster.address6,
+ shippers.shippername,
+ salesorders.printedpackingslip,
+ salesorders.datepackingslipprinted,
+ locations.locationname,
+ salesorders.deliverydate
+ FROM salesorders,
+ debtorsmaster,
+ shippers,
+ locations
+ WHERE salesorders.debtorno=debtorsmaster.debtorno
+ AND salesorders.shipvia=shippers.shipper_id
+ AND salesorders.fromstkloc=locations.loccode
+ AND salesorders.orderno='" . $_GET['TransNo'] . "'";
$result=DB_query($sql,$db, $ErrMsg);
//If there are no rows, there's a problem.
if (DB_num_rows($result)==0){
- $title = _('Print Packing Slip Error');
- include('includes/header.inc');
- echo '<div class="centre"><br /><br /><br />';
- prnMsg( _('Unable to Locate Order Number') . ' : ' . $_GET['TransNo'] . ' ', 'error');
- echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item">
- <li><a href="'. $rootpath . '/SelectSalesOrder.php?'. SID .'">' . _('Outstanding Sales Orders') . '</a></li>
- <li><a href="'. $rootpath . '/SelectCompletedOrder.php?'. SID .'">' . _('Completed Sales Orders') . '</a></li>
- </td></tr></table></div><br /><br /><br />';
- include('includes/footer.inc');
- exit();
+ $title = _('Print Packing Slip Error');
+ include('includes/header.inc');
+ echo '<div class="centre">
+ <br />
+ <br />
+ <br />';
+ prnMsg( _('Unable to Locate Order Number') . ' : ' . $_GET['TransNo'] . ' ', 'error');
+ echo '<br />
+ <br />
+ <br />
+ <table class="table_index">
+ <tr>
+ <td class="menu_group_item">
+ <ul>
+ <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li>
+ <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li>
+ </ul>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <br />
+ <br />
+ <br />';
+ include('includes/footer.inc');
+ exit();
} elseif (DB_num_rows($result)==1){ /*There is only one order header returned - thats good! */
- $myrow = DB_fetch_array($result);
- /* Place the deliver blind variable into a hold variable to used when
- producing the packlist */
- $DeliverBlind = $myrow['deliverblind'];
- $DeliveryDate = $myrow['salesorders.deliverydate'];
- if ($myrow['printedpackingslip']==1 AND ($_GET['Reprint']!='OK' OR !isset($_GET['Reprint']))){
- $title = _('Print Packing Slip Error');
- include('includes/header.inc');
- echo '<p>';
- prnMsg( _('The packing slip for order number') . ' ' . $_GET['TransNo'] . ' ' .
- _('has previously been printed') . '. ' . _('It was printed on'). ' ' . ConvertSQLDate($myrow['datepackingslipprinted']) .
- '<br />' . _('This check is there to ensure that duplicate packing slips are not produced and dispatched more than once to the customer'), 'warn' );
- echo '<p><a href="' . $rootpath . '/PrintCustOrder.php?' . SID . '&TransNo=' . $_GET['TransNo'] . '&Reprint=OK">'
- . _('Do a Re-Print') . ' (' . _('On Pre-Printed Stationery') . ') ' . _('Even Though Previously Printed') . '</a><p>' .
- '<a href="' . $rootpath. '/PrintCustOrder_generic.php?' . SID . '&TransNo=' . $_GET['TransNo'] . '&Reprint=OK">'. _('Do a Re-Print') . ' (' . _('Plain paper') . ' - ' . _('A4') . ' ' . _('landscape') . ') ' . _('Even Though Previously Printed'). '</a>';
+ $myrow = DB_fetch_array($result);
+ /* Place the deliver blind variable into a hold variable to used when
+ producing the packlist */
+ $DeliverBlind = $myrow['deliverblind'];
+ $DeliveryDate = $myrow['salesorders.deliverydate'];
+ if ($myrow['printedpackingslip']==1 AND ($_GET['Reprint']!='OK' OR !isset($_GET['Reprint']))){
+ $title = _('Print Packing Slip Error');
+ include('includes/header.inc');
+ prnMsg( _('The packing slip for order number') . ' ' . $_GET['TransNo'] . ' ' . _('has previously been printed') . ' ' . _('It was printed on'). ' ' . ConvertSQLDate($myrow['datepackingslipprinted']) . '<br />' . _('This check is there to ensure that duplicate packing slips are not produced and dispatched more than once to the customer'), 'warn' );
+ echo '<p><a href="' . $rootpath . '/PrintCustOrder.php?TransNo=' . $_GET['TransNo'] . '&Reprint=OK">'
+ . _('Do a Re-Print') . ' (' . _('On Pre-Printed Stationery') . ') ' . _('Even Though Previously Printed') . '</a></p><p><a href="' . $rootpath. '/PrintCustOrder_generic.php?TransNo=' . $_GET['TransNo'] . '&Reprint=OK">'. _('Do a Re-Print') . ' (' . _('Plain paper') . ' - ' . _('A4') . ' ' . _('landscape') . ') ' . _('Even Though Previously Printed'). '</a></p>';
- echo '<br /><br /><br />';
- echo _('Or select another Order Number to Print');
- echo '<table class="table_index"><tr><td class="menu_group_item">
- <li><a href="'. $rootpath . '/SelectSalesOrder.php?'. SID .'">' . _('Outstanding Sales Orders') . '</a></li>
- <li><a href="'. $rootpath . '/SelectCompletedOrder.php?'. SID .'">' . _('Completed Sales Orders') . '</a></li>
- </td></tr></table></div><br /><br /><br />';
+ echo '<br />
+ <br />
+ <br />';
+ echo _('Or select another Order Number to Print');
+ echo '<table class="table_index"><tr><td class="menu_group_item">
+ <ul>
+ <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li>
+ <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li>
+ </ul>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <br />
+ <br />
+ <br />';
- include('includes/footer.inc');
- exit;
- }//packing slip has been printed.
- $MailSubject = "Order Confirmation-Sales Order " . $_GET['TransNo'] . " - Your PO " .
- $myrow['customerref'] ;
+ include('includes/footer.inc');
+ exit;
+ }//packing slip has been printed.
+ $MailSubject = _('Order Confirmation-Sales Order') . ' ' . $_GET['TransNo'] . ' - '. _('Your PO') . ' ' . $myrow['customerref'] ;
}
/*retrieve the order details from the database to print */
@@ -111,49 +147,52 @@
)
LETS GO */
-$MailMessage = "<html><head><title>Email Confirmation</title></head><body>" .
- "<Table cellpadding='2' cellspacing='2'><tr>" .
- "<td align='center' colspan='4'><H1>" . $_SESSION['CompanyRecord']['coyname'] . "</H1>" ;
-$MailMessage = $MailMessage . "</td></tr>";
-$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" .
- $_SESSION['CompanyRecord']['regoffice1'] . "</td></tr>";
-$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" .
- $_SESSION['CompanyRecord']['regoffice4'] . ",";
-$MailMessage = $MailMessage . "<b>" .
- $_SESSION['CompanyRecord']['regoffice5'] . "</td></tr>";
-$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" .
- $_SESSION['CompanyRecord']['telephone'] . ' ' . _('Fax'). ': ' .
- $_SESSION['CompanyRecord']['fax'] . "</td></tr>";
-$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" .
- $_SESSION['CompanyRecord']['email'] . "<br /><br /><br /></td></tr>";
-$MailMessage = $MailMessage . "<Table><tr><td align='center' colspan='4'>
- <h2> Order Acknowledgement</h2></td></tr>";
-$MailMessage = $MailMessage . "<tr><td align='center' colspan='4'> <b>Order Number " .
- $_GET['TransNo'] . "</b><br /><br /><br /></td></tr>";
-$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>Delivered To:</b></td></tr>";
-$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" .
- $myrow['deliverto'] . "</td></tr>";
-$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" .
- $myrow['deladd1'] . "</td></tr>";
-If(mb_strlen(trim($myrow['deladd2'])))
-{
- $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd2'] . "</td></tr>";
- $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd3'] .
- ' ' . $myrow['deladd4'] . ' ' . $myrow['deladd5']. "<br /><br /><br /></td></tr>";
+$MailMessage = '<html><head><title>' . _('Email Confirmation') . '</title></head>
+ <body>
+ <table cellpadding="2" cellspacing="2">
+ <tr>
+ <td align="center" colspan="4"><h1>' . $_SESSION['CompanyRecord']['coyname'] . '</h1></td>
+ </tr>
+ <tr><td colspan="4"> <b>' . $_SESSION['CompanyRecord']['regoffice1'] . '</td>
+ </tr>
+ <tr><td colspan="4"> <b>' . $_SESSION['CompanyRecord']['regoffice4'] . ',<b>' . $_SESSION['CompanyRecord']['regoffice5'] . '</td>
+ </tr>
+ <tr><td colspan="4"> <b>' . $_SESSION['CompanyRecord']['telephone'] . ' ' . _('Fax'). ': ' . $_SESSION['CompanyRecord']['fax'] . '</td>
+ </tr>
+ <tr><td colspan="4"> <b>' . $_SESSION['CompanyRecord']['email'] . '<br /><br /><br /></td>
+ </tr>
+ </table>
+ <table>
+ <tr><td align="center" colspan="4">
+ <h2>' . _('Order Acknowledgement') . '</h2></td>
+ </tr>
+ <tr><td align="center" colspan="4"> <b>' . _('Order Number') . ' ' . $_GET['TransNo'] . '</b><br /><br /><br /></td>
+ </tr>
+ <tr><td colspan="4"> <b>' . _('Delivered To') . ':</b></td>
+ </tr>
+ <tr><td colspan="4"> <b>' . $myrow['deliverto'] . '</td>
+ </tr>
+ <tr><td colspan="4"> <b>' . $myrow['deladd1'] . '</td>
+ </tr>';
+
+if(mb_strlen(trim($myrow['deladd2']))) {
+ $MailMessage .= '<tr><td> <b>' . $myrow['deladd2'] . '</td></tr>
+ <tr><td> <b>' . $myrow['deladd3'] . ' ' . $myrow['deladd4'] . ' ' . $myrow['deladd5']. '<br /><br /><br /></td>
+ </tr>';
+} else {
+ $MailMessage .= '<tr><td> <b>' . $myrow['deladd3'] . ' ' . $myrow['deladd4'] . ' ' . $myrow['deladd5'] . '<br /><br /><br /></td>
+ </tr>';
}
-else
-{
- $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd3'] . ' ' .
- $myrow['deladd4'] . ' ' . $myrow['deladd5'] . "<br /><br /><br /></td></tr>";
-}
-$MailMessage = $MailMessage . "</table><table border='1' width='50%'><tr>";
+$MailMessage .= '</table>
+ <table border="1" width="50%"><tr>';
if($_REQUEST['POLine'] == 1){
- $MailMessage = $MailMessage . " <td>PO Line</td>";
+ $MailMessage .= '<td>' . _('PO Line') . '</td>';
}
- $MailMessage = $MailMessage . "<td>Stock Code</td>
- <td>Description</td>
- <td>Quantity Ordered</td>
- <td>Due Date</td></tr>";
+ $MailMessage .= '<td>' . _('Stock Code') . '</td>
+ <td>' . _('Description') . '</td>
+ <td>' . _('Quantity Ordered') . '</td>
+ <td>' . _('Due Date') . '</td>
+ </tr>';
$sql = "SELECT salesorderdetails.stkcode,
@@ -181,33 +220,31 @@
$DscCode[$i] = $myrow2['description'];
$QtyCode[$i] = $DisplayQty ;
$POLine[$i] = $myrow2['poline'];
- If($myrow2['itemdue'] =='')
- {
+ if($myrow2['itemdue'] =='') {
$ItemDue[$i] = date('M d, Y',strtotime($DeliveryDate));
- }
- else
- {
+ } else {
$ItemDue[$i] = date('M d, Y',strtotime($myrow2['itemdue']));
}
- $MailMessage = $MailMessage . "<tr>";
+ $MailMessage .= '<tr>';
if($_REQUEST['POLine'] == 1){
- $MailMessage = $MailMessage . "<td align='right'>" . $POLine[$i] . "</td>";
+ $MailMessage .= '<td align="right">' . $POLine[$i] . '</td>';
}
- $MailMessage = $MailMessage . "<td>" . $myrow2['stkcode'] .
- "</td><td>" .
- $myrow2['description'] . "</td><td align='right'>" .
- $DisplayQty . "</td><td align='center'>" . $ItemDue[$i] .
- "</td></tr>";
+ $MailMessage .= '<td>' . $myrow2['stkcode'] . '</td><td>' . $myrow2['description'] . '</td>
+ <td align="right">' . $DisplayQty . '</td>
+ <td align="center">' . $ItemDue[$i] . '</td>
+ </tr>';
$i = $i + 1;
} //end while there are line items to print out
} /*end if there are order details to show on the order*/
-$MailMessage = $MailMessage . "</Table></body></html>";
+$MailMessage .= '</table>
+ </body>
+ </html>';
// echo $MailMessage . "=mailMessage<br />";
IF(mail( $MailTo, $MailSubject, $MailMessage, $headers )){
- echo " The following E-Mail was sent to $MailTo:";
+ echo ' ' ._('The following E-Mail was sent to') . ' ' . $MailTo . ' :';
}
?>
<html>
Modified: trunk/EmailCustTrans.php
===================================================================
--- trunk/EmailCustTrans.php 2011-07-03 04:33:19 UTC (rev 4622)
+++ trunk/EmailCustTrans.php 2011-07-05 10:27:25 UTC (rev 4623)
@@ -47,8 +47,8 @@
FROM custbranch INNER JOIN debtortrans
ON custbranch.debtorno= debtortrans.debtorno
AND custbranch.branchcode=debtortrans.branchcode
- WHERE debtortrans.type='" . $TypeCode . "'
- AND debtortrans.transno='" .$_GET['FromTransNo'] . "'";
+ WHERE debtortrans.type='" . $TypeCode . "'
+ AND debtortrans.transno='" .$_GET['FromTransNo'] . "'";
$ErrMsg = _('There was a problem retrieving the contact details for the customer');
$ContactResult=DB_query($SQL,$db,$ErrMsg);
Modified: trunk/ExchangeRateTrend.php
===================================================================
--- trunk/ExchangeRateTrend.php 2011-07-03 04:33:19 UTC (rev 4622)
+++ trunk/ExchangeRateTrend.php 2011-07-05 10:27:25 UTC (rev 4623)
@@ -1,9 +1,7 @@
<?php
-/* $Revision: 1.3 $ */
+
/* $Id$*/
-//$PageSecurity = 2;
-
include('includes/session.inc');
$title = _('View Currency Trends');
@@ -29,33 +27,30 @@
_('View Currency Trend') . '" alt="" />' . ' ' . _('View Currency Trend') . '</p>';
echo '<table>'; // First column
- $SQL = 'SELECT * FROM currencies';
+ $SQL = "SELECT * FROM currencies";
$result=DB_query($SQL,$db);
// CurrencyToShow Currency Picker
echo '<tr><td><select name="CurrencyToShow" onChange="ReloadForm(update.submit)">';
- DB_data_seek($result,0);
- while ($myrow=DB_fetch_array($result)) {
- if ($myrow['currabrev']!=$_SESSION['CompanyRecord']['currencydefault']){
- if ( $CurrencyToShow==$myrow['currabrev'] ) {
- echo '<option selected value=' . $myrow['currabrev'] . '>' . $myrow['country'] . ' ' . $myrow['currency'] . ' (' . $myrow['currabrev'] . ')'. '</option>';
- } else {
- echo '<option value=' . $myrow['currabrev'] . '>' . $myrow['country'] . ' ' . $myrow['currency'] . ' (' . $myrow['currabrev'] . ')'. '</option>';
- }
+ DB_data_seek($result,0);
+ while ($myrow=DB_fetch_array($result)) {
+ if ($myrow['currabrev']!=$_SESSION['CompanyRecord']['currencydefault']){
+ if ( $CurrencyToShow==$myrow['currabrev'] ) {
+ echo '<option selected value=' . $myrow['currabrev'] . '>' . $myrow['country'] . ' ' . $myrow['currency'] . ' (' . $myrow['currabrev'] . ')'. '</option>';
+ } else {
+ echo '<option value=' . $myrow['currabrev'] . '>' . $myrow['country'] . ' ' . $myrow['currency'] . ' (' . $myrow['currabrev'] . ')'. '</option>';
}
}
- echo '</select></td></tr>';
+ }
+ echo '</select></td></tr>';
echo '</table>'; /*close off the table in the third column */
-
- echo '<p><div class="centre"><input type=submit name=submit VALUE="' . _('Accept') . '"></div>';
+ echo '<p><div class="centre"><input type=submit name=submit value="' . _('Accept') . '"></div>';
echo '</form>';
-
-
// **************
// SHOW OUR GRAPH
// **************
@@ -66,7 +61,7 @@
echo '<p></div><table class=selection>';
echo '<tr><th><div class="centre"><font size=4 color=BLUE><b><U>' . $FunctionalCurrency . ' / ' . $CurrencyToShow . '</b></U></font></th></tr>';
- echo '<tr><td><img src=' . $image . ' alt="Trend Currently Unavailable"></td></tr>';
+ echo '<tr><td><img src=' . $image . ' alt="' ._('Trend Currently Unavailable') . '"></td></tr>';
echo '</table>';
Modified: trunk/Factors.php
===================================================================
--- trunk/Factors.php 2011-07-03 04:33:19 UTC (rev 4622)
+++ trunk/Factors.php 2011-07-05 10:27:25 UTC (rev 4623)
@@ -151,19 +151,19 @@
if (isset($FactorID) and isset($_POST['Amend'])) {
$sql = "SELECT id,
- coyname,
- address1,
- address2,
- address3,
- address4,
- address5,
- address6,
- contact,
- telephone,
- fax,
- email
- FROM factorcompanies
- WHERE id = '".$FactorID."'";
+ coyname,
+ address1,
+ address2,
+ address3,
+ address4,
+ address5,
+ address6,
+ contact,
+ telephone,
+ fax,
+ email
+ FROM factorcompanies
+ WHERE id = '".$FactorID."'";
$result = DB_query($sql, $db);
$myrow = DB_fetch_array($result);
@@ -208,7 +208,6 @@
<td><input tabindex=2 type="text" name="Address1" size=42 maxlength=40 value="' . $_POST['Address1'] .'"></td></tr>';
echo '<tr><td>' . _('Address Line 2') . ':</td>
<td><input tabindex=3 type="text" name="Address2" size=42 maxlength=40 value="' . $_POST['Address2'] .'"></td></tr>';
-
echo '<tr><td>' . _('Address Line 3') . ':</td>
<td><input tabindex=4 type="text" name="Address3" size=42 maxlength=40 value="' .$_POST['Address3'] .'"></td></tr>';
echo '<tr><td>' . _('Address Line 4') . ':</td>
@@ -248,32 +247,34 @@
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
echo '<input type="hidden" name="New" value="No">';
- echo '<table class=selection><tr>
- <th>' . _('ID') . '</th>
- <th>' . _('Company Name').'</th>
- <th>' . _('Address 1').'</th>
- <th>' . _('Address 2').'</th>
- <th>' . _('Address 3').'</th>
- <th>' . _('Address 4').'</th>
- <th>' . _('Address 5').'</th>
- <th>' . _('Address 6').'</th>
- <th>' . _('Contact').'</th>
- <th>' . _('Telephone').'</th>
- <th>' . _('Fax Number').'</th>
- <th>' . _('Email').'</th></tr>';
+ echo '<table class=selection>
+ <tr>
+ <th>' . _('ID') . '</th>
+ <th>' . _('Company Name').'</th>
+ <th>' . _('Address 1').'</th>
+ <th>' . _('Address 2').'</th>
+ <th>' . _('Address 3').'</th>
+ <th>' . _('Address 4').'</th>
+ <th>' . _('Address 5').'</th>
+ <th>' . _('Address 6').'</th>
+ <th>' . _('Contact').'</th>
+ <th>' . _('Telephone').'</th>
+ <th>' . _('Fax Number').'</th>
+ <th>' . _('Email').'</th>
+ </tr>';
$sql = "SELECT id,
- coyname,
- address1,
- address2,
- address3,
- address4,
- address5,
- address6,
- contact,
- telephone,
- fax,
- email
- FROM factorcompanies";
+ coyname,
+ address1,
+ address2,
+ address3,
+ address4,
+ address5,
+ address6,
+ contact,
+ telephone,
+ fax,
+ email
+ FROM factorcompanies";
$result=DB_query($sql, $db);
$j=1;
while ($myrow = DB_fetch_array($result)) {
@@ -307,6 +308,5 @@
}
-
include('includes/footer.inc');
?>
\ No newline at end of file
Modified: trunk/FixedAssetRegister.php
===================================================================
--- trunk/FixedAssetRegister.php 2011-07-03 04:33:19 UTC (rev 4622)
+++ trunk/FixedAssetRegister.php 2011-07-05 10:27:25 UTC (rev 4623)
@@ -1,5 +1,5 @@
<?php
-//$PageSecurity = 11;
+
include ('includes/session.inc');
$title = _('Fixed Asset Register');
$csv_output = '';
@@ -15,36 +15,36 @@
$DateFrom = FormatDateForSQL($_POST['FromDate']);
$DateTo = FormatDateForSQL($_POST['ToDate']);
$sql = "SELECT fixedassets.assetid,
- fixedassets.description,
- fixedassets.longdescription,
- fixedassets.assetcategoryid,
- fixedassets.serialno,
- fixedassetlocations.locationdescription,
- fixedassets.datepurchased,
- fixedassetlocations.parentlocationid,
- fixedassets.assetlocation,
- fixedassets.disposaldate,
- SUM(CASE WHEN (fixedassettrans.transdate <'" . $DateFrom . "' AND fixedassettrans.fixedassettranstype='cost') THEN fixedassettrans.amount ELSE 0 END) AS costbfwd,
- SUM(CASE WHEN (fixedassettrans.transdate <'" . $DateFrom . "' AND fixedassettrans.fixedassettranstype='depn') THEN fixedassettrans.amount ELSE 0 END) AS depnbfwd,
- SUM(CASE WHEN (fixedassettrans.transdate >='" . $DateFrom ."' AND fixedassettrans.transdate <='" . $DateTo . "' AND fixedassettrans.fixedassettranstype='cost') THEN fixedassettrans.amount ELSE 0 END) AS periodadditions,
- SUM(CASE WHEN fixedassettrans.transdate >='" . $DateFrom . "' AND fixedassettrans.transdate <='" . $DateTo . "' AND fixedassettrans.fixedassettranstype='depn' THEN fixedassettrans.amount ELSE 0 END) AS perioddepn,
- SUM(CASE WHEN fixedassettrans.transdate >='" . $DateFrom . "' AND fixedassettrans.transdate <='" . $DateTo . "' AND fixedassettrans.fixedassettranstype='disposal' THEN fixedassettrans.amount ELSE 0 END) AS perioddisposal
- FROM fixedassets
- INNER JOIN fixedassetcategories ON fixedassets.assetcategoryid=fixedassetcategories.categoryid
- INNER JOIN fixedassetlocations ON fixedassets.assetlocation=fixedassetlocations.locationid
- INNER JOIN fixedassettrans ON fixedassets.assetid=fixedassettrans.assetid
- WHERE fixedassets.assetcategoryid " . LIKE . "'" . $_POST['AssetCategory'] . "'
- AND fixedassets.assetid " . LIKE . "'" . $_POST['AssetID'] . "'
- AND fixedassets.assetlocation " . LIKE . "'" . $_POST['AssetLocation'] . "'
- GROUP BY fixedassets.assetid,
- fixedassets.description,
- fixedassets.longdescription,
- fixedassets.assetcategoryid,
- fixedassets.serialno,
- fixedassetlocations.locationdescription,
- fixedassets.datepurchased,
- fixedassetlocations.parentlocationid,
- fixedassets.assetlocation";
+ fixedassets.description,
+ fixedassets.longdescription,
+ fixedassets.assetcategoryid,
+ fixedassets.serialno,
+ fixedassetlocations.locationdescription,
+ fixedassets.datepurchased,
+ fixedassetlocations.parentlocationid,
+ fixedassets.assetlocation,
+ fixedassets.disposaldate,
+ SUM(CASE WHEN (fixedassettrans.transdate <'" . $DateFrom . "' AND fixedassettrans.fixedassettranstype='cost') THEN fixedassettrans.amount ELSE 0 END) AS costbfwd,
+ SUM(CASE WHEN (fixedassettrans.transdate <'" . $DateFrom . "' AND fixedassettrans.fixedassettranstype='depn') THEN fixedassettrans.amount ELSE 0 END) AS depnbfwd,
+ SUM(CASE WHEN (fixedassettrans.transdate >='" . $DateFrom ."' AND fixedassettrans.transdate <='" . $DateTo . "' AND fixedassettrans.fixedassettranstype='cost') THEN fixedassettrans.amount ELSE 0 END) AS periodadditions,
+ SUM(CASE WHEN fixedassettrans.transdate >='" . $DateFrom . "' AND fixedassettrans.transdate <='" . $DateTo . "' AND fixedassettrans.fixedassettranstype='depn' THEN fixedassettrans.amount ELSE 0 END) AS perioddepn,
+ SUM(CASE WHEN fixedassettrans.transdate >='" . $DateFrom . "' AND fixedassettrans.transdate <='" . $DateTo . "' AND fixedassettrans.fixedassettranstype='disposal' THEN fixedassettrans.amount ELSE 0 END) AS perioddisposal
+ FROM fixedassets
+ INNER JOIN fixedassetcategories ON fixedassets.assetcategoryid=fixedassetcategories.categoryid
+ INNER JOIN fixedassetlocations ON fixedassets.assetlocation=fixedassetlocations.locationid
+ INNER JOIN fixedassettrans ON fixedassets.assetid=fixedassettrans.assetid
+ WHERE fixedassets.assetcategoryid " . LIKE . "'" . $_POST['AssetCategory'] . "'
+ AND fixedassets.assetid " . LIKE . "'" . $_POST['AssetID'] . "'
+ AND fixedassets.assetlocation " . LIKE . "'" . $_POST['AssetLocation'] . "'
+ GROUP BY fixedassets.assetid,
+ fixedassets.description,
+ fixedassets.longdescription,
+ fixedassets.assetcategoryid,
+ fixedassets.serialno,
+ fixedassetlocations.locationdescription,
+ fixedassets.datepurchased,
+ fixedassetlocations.parentlocationid,
+ fixedassets.assetlocation";
$result = DB_query($sql, $db);
if (isset($_POST['pdf'])) {
$FontSize = 10;
@@ -116,8 +116,7 @@
$Ancestors[$i] = $ParentRow['locationdescription'];
}
*/
- if (Date1GreaterThanDate2(ConvertSQLDate($myrow['disposaldate']),$_POST['FromDate'])
- OR $myrow['disposaldate']='0000-00-00'){
+ if (Date1GreaterThanDate2(ConvertSQLDate($myrow['disposaldate']),$_POST['FromDate']) OR $myrow['disposaldate']='0000-00-00') {
if ($myrow['disposaldate']!='0000-00-00' AND Date1GreaterThanDate2($_POST['ToDate'], ConvertSQLDate($myrow['disposaldate']))){
/*The asset was disposed during the period */
@@ -221,14 +220,14 @@
echo '<input type=hidden name=AssetLocation value=' . $_POST['AssetLocation'] . '>';
//Total Values
echo '<tr><th style="vertical-align:top" colspan="5">' . _('TOTAL') . '</th>';
- echo '<th style="text-align:right">' . number_format($TotalCostBfwd, 2) . '</th>';
- echo '<th style="text-align:right">' . number_format($TotalDepnBfwd, 2) . '</th>';
- echo '<th style="text-align:right">' . number_format($TotalAdditions, 2) . '</th>';
- echo '<th style="text-align:right">' . number_format($TotalDepn, 2) . '</th>';
- echo '<th style="text-align:right">' . number_format($TotalCostCfwd, 2) . '</th>';
- echo '<th style="text-align:right">' . number_format($TotalDepnCfwd, 2) . '</th>';
- echo '<th style="text-align:right">' . number_format($TotalNBV, 2) . '</th>';
- echo '<th style="text-align:right">' . number_format($TotalDisposals, 2) . '</th></tr>';
+ echo '<th style="text-align:right">' . number_format($TotalCostBfwd, $_SESSION['CompanyRecord']['decimalplaces']) . '</th>';
+ echo '<th style="text-align:right">' . number_format($TotalDepnBfwd, $_SESSION['CompanyRecord']['decimalplaces']) . '</th>';
+ echo '<th style="text-align:right">' . number_format($TotalAdditions, $_SESSION['CompanyRecord']['decimalplaces']) . '</th>';
+ echo '<th style="text-align:right">' . number_format($TotalDepn, $_SESSION['CompanyRecord']['decimalplaces']) . '</th>';
+ echo '<th style="text-align:right">' . number_format($TotalCostCfwd, $_SESSION['CompanyRecord']['decimalplaces']) . '</th>';
+ echo '<th style="text-align:right">' . number_format($TotalDepnCfwd, $_SESSION['CompanyRecord']['decimalplaces']) . '</th>';
+ echo '<th style="text-align:right">' . number_format($TotalNBV, $_SESSION['CompanyRecord']['decimalplaces']) . '</th>';
+ echo '<th style="text-align:right">' . number_format($TotalDisposals, $_SESSION['CompanyRecord']['decimalplaces']) . '</th></tr>';
echo '</table>';
echo '<br /><div class="centre"><input type="Submit" name="pdf" value="' . _('Print as a pdf') . '"> ';
echo '<input type="Submit" name="csv" value="' . _('Print as CSV') . '"></div></form>';
@@ -238,7 +237,7 @@
echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="">' . ' ' . $title;
$result = DB_query('SELECT categoryid,categorydescription FROM fixedassetcategories', $db);
- echo '<form name="RegisterForm" method="post" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '"><table class="selection">';
+ echo '<form name="RegisterForm" method="post" action="' . $_SERVER['PHP_SELF'] . '"><table class="selection">';
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
echo '<tr><th>' . _('Asset Category') . '</th>';
echo '<td><select name=AssetCategory>';
@@ -251,7 +250,7 @@
}
}
echo '</select></td></tr>';
- $sql = 'SELECT locationid, locationdescription FROM fixedassetlocations';
+ $sql = "SELECT locationid, locationdescription FROM fixedassetlocations";
$result = DB_query($sql, $db);
echo '<tr><th>' . _('Asset Location') . '</th>';
echo '<td><select name=AssetLocation>';
@@ -264,7 +263,7 @@
}
}
echo '</select></td></tr>';
- $sql = 'SELECT assetid, description FROM fixedassets';
+ $sql = "SELECT assetid, description FROM fixedassets";
$result = DB_query($sql, $db);
echo '<tr><th>' . _('Asset') . '</th>';
echo '<td><select name="AssetID">';
@@ -278,18 +277,19 @@
}
echo '</select></td></tr>';
if (empty($_POST['FromDate'])) {
- $_POST['FromDate'] = date($_SESSION['DefaultDateFormat'], mktime(0, 0, 0, date("m"), date("d"), date("Y") - 1));
+ $_POST['FromDate'] = date($_SESSION['DefaultDateFormat'], mktime(0, 0, 0, date('m'), date('d'), date('Y') - 1));
}
if (empty($_POST['ToDate'])) {
$_POST['ToDate'] = date($_SESSION['DefaultDateFormat']);
}
- echo '<tr><th>' . _(' From Date') . "</th><td><input type='text' class='date' alt='" . $_SESSION['DefaultDateFormat'] . "' name='FromDate' maxlength=10 size=11 value='" . $_POST['FromDate'] . "'></td>";
+ echo '<tr><th>' . _(' From Date') . '</th><td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" maxlength=10 size=11 value="' . $_POST['FromDate'] . '"></td>';
echo '</tr>';
- echo '<tr><th>' . _('To Date ') . "</th><td><input type='text' class='date' alt='" . $_SESSION['DefaultDateFormat'] . "' name='ToDate' maxlength=10 size=11 value='" . $_POST['ToDate'] . "'></td>";
- echo '</tr>';
-
- echo '</table><br />';
+ echo '<tr><th>' . _('To Date ') . '</th><td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" maxlength="10" size="11" value="' . $_POST['ToDate'] . '"></td>
+ </tr>
+ </table>
+ <br />';
+
echo '<div class="centre"><input type="Submit" name="submit" value="' . _('Show Assets') . '"> ';
echo '<input type="Submit" name="pdf" value="' . _('Print as a pdf') . '"> ';
echo '<input type="Submit" name = "csv" value= "' . _('Print as CSV') . '"></div>';
Modified: trunk/PDFQuotation.php
===================================================================
--- trunk/PDFQuotation.php 2011-07-03 04:33:19 UTC (rev 4622)
+++ trunk/PDFQuotation.php 2011-07-05 10:27:25 UTC (rev 4623)
@@ -22,37 +22,37 @@
$ErrMsg = _('There was a problem retrieving the quotation header details for Order Number') . ' ' . $_GET['QuotationNo'] . ' ' . _('from the database');
$sql = "SELECT salesorders.customerref,
- salesorders.comments,
- salesorders.orddate,
- salesorders.deliverto,
- salesorders.deladd1,
- salesorders.deladd2,
- salesorders.deladd3,
- salesorders.deladd4,
- salesorders.deladd5,
- salesorders.deladd6,
- debtorsmaster.name,
- debtorsmaster.address1,
- debtorsmaster.address2,
- debtorsmaster.address3,
- debtorsmaster.address4,
- debtorsmaster.address5,
- debtorsmaster.address6,
- shippers.shippername,
- salesorders.printedpackingslip,
- salesorders.datepackingslipprinted,
- salesorders.branchcode,
- locations.taxprovinceid,
- locations.locationname
- FROM salesorders,
- debtorsmaster,
- shippers,
- locations
- WHERE salesorders.debtorno=debtorsmaster.debtorno
- AND salesorders.shipvia=shippers.shipper_id
- AND salesorders.fromstkloc=locations.loccode
- AND salesorders.quotation=1
- AND salesorders.orderno='" . $_GET['QuotationNo'] ."'";
+ salesorders.comments,
+ salesorders.orddate,
+ salesorders.deliverto,
+ salesorders.deladd1,
+ salesorders.deladd2,
+ salesorders.deladd3,
+ salesorders.deladd4,
+ salesorders.deladd5,
+ salesorders.deladd6,
+ debtorsmaster.name,
+ debtorsmaster.currcode,
+ debtorsmaster.address1,
+ debtorsmaster.address2,
+ debtorsmaster.address3,
+ debtorsmaster.address4,
+ debtorsmaster.address5,
+ debtorsmaster.address6,
+ shippers.shippername,
+ salesorders.printedpackingslip,
+ salesorders.datepackingslipprinted,
+ salesorders.branchcode,
+ locations.taxprovinceid,
+ locations.locationname
+ FROM salesorders INNER JOIN debtorsmaster
+ ON salesorders.debtorno=debtorsmaster.debtorno
+ INNER JOIN shippers
+ ON salesorders.shipvia=shippers.shipper_id
+ INNER JOIN locations
+ ON salesorders.fromstkloc=locations.loccode
+ WHERE salesorders.quotation=1
+ AND salesorders.orderno='" . $_GET['QuotationNo'] ."'";
$result=DB_query($sql,$db, $ErrMsg);
@@ -62,9 +62,20 @@
include('includes/header.inc');
echo '<div class="centre"><br /><br /><br />';
prnMsg( _('Unable to Locate Quotation Number') . ' : ' . $_GET['QuotationNo'] . ' ', 'error');
- echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item">
- <li><a href="'. $rootpath . '/SelectSalesOrder.php?'. SID .'&Quotations=Quotes_Only">' . _('Outstanding Quotations') . '</a></li>
- </td></tr></table></div><br /><br /><br />';
+ echo '<br />
+ <br />
+ <br />
+ <table class="table_index">
+ <tr>
+ <td class="menu_group_item">
+ <ul><li><a href="'. $rootpath . '/SelectSalesOrder.php?Quotations=Quotes_Only">' . _('Outstanding Quotations') . '</a></li></ul>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <br />
+ <br />
+ <br />';
include('includes/footer.inc');
exit;
} elseif (DB_num_rows($result)==1){ /*There is only one order header returned - thats good! */
@@ -105,7 +116,7 @@
$result=DB_query($sql,$db, $ErrMsg);
-$ListCount = 0; // UldisN
+$ListCount = 0;
if (DB_num_rows($result)>0){
/*Yes there are line items to start the ball rolling with a page header */
@@ -136,13 +147,19 @@
$TaxProv = $myrow['taxprovinceid'];
$TaxCat = $myrow2['taxcatid'];
$Branch = $myrow['branchcode'];
- $sql3 = " select taxgrouptaxes.taxauthid from taxgrouptaxes INNER JOIN custbranch ON taxgrouptaxes.taxgroupid=custbranch.taxgroupid WHERE custbranch.branchcode='" .$Branch ."'";
+ $sql3 = "SELECT taxgrouptaxes.taxauthid
+ FROM taxgrouptaxes INNER JOIN custbranch
+ ON taxgrouptaxes.taxgroupid=custbranch.taxgroupid
+ WHERE custbranch.branchcode='" .$Branch ."'";
$result3=DB_query($sql3,$db, $ErrMsg);
while ($myrow3=DB_fetch_array($result3)){
$TaxAuth = $myrow3['taxauthid'];
}
- $sql4 = "SELECT * FROM taxauthrates WHERE dispatchtaxprovince='" .$TaxProv ."' AND taxcatid='" .$TaxCat ."' AND taxauthority='" .$TaxAuth ."'";
+ $sql4 = "SELECT * FROM taxauthrates
+ WHERE dispatchtaxprovince='" .$TaxProv ."'
+ AND taxcatid='" .$TaxCat ."'
+ AND taxauthority='" .$TaxAuth ."'";
$result4=DB_query($sql4,$db, $ErrMsg);
while ($myrow4=DB_fetch_array($result4)){
$TaxClass = 100 * $myrow4['taxrate'];
@@ -227,9 +244,9 @@
if ($ListCount == 0){
$title = _('Print Quotation Error');
include('includes/header.inc');
- echo '<p>'. _('There were no items on the quotation') . '. ' . _('The quotation cannot be printed').
- '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?' . SID . '&Quotation=Quotes_only">'. _('Print Another Quotation').
- '</a>' . '<br />'. '<a href="' . $rootpath . '/index.php?' . SID . '">' . _('Back to the menu') . '</a>';
+ prnMsg(_('There were no items on the quotation') . '. ' . _('The quotation cannot be printed'),'info');
+ echo '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?Quotation=Quotes_only">'. _('Print Another Quotation'). '</a>
+ <br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>';
include('includes/footer.inc');
exit;
} else {
Modified: trunk/PDFQuotationPortrait.php
===================================================================
--- trunk/PDFQuotationPortrait.php 2011-07-03 04:33:19 UTC (rev 4622)
+++ trunk/PDFQuotationPortrait.php 2011-07-05 10:27:25 UTC (rev 4623)
@@ -9,11 +9,26 @@
If (!isset($_GET['QuotationNo']) || $_GET['QuotationNo']==""){
$title = _('Select Quotation To Print');
include('includes/header.inc');
- echo '<div class="centre"><br /><br /><br />';
+ echo '<div class="centre">
+ <br />
+ <br />
+ <br />';
prnMsg( _('Select a Quotation to Print before calling this page') , 'error');
- echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item">
- <li><a href="'. $rootpath . '/SelectSalesOrder.php?'. SID .'&Quotations=Quotes_Only">' . _('Quotations') . '</a></li>
- </td></tr></table></div><br /><br /><br />';
+ echo '<br />
+ <br />
+ <br />
+ <table class="table_index">
+ <tr>
+ <td class="menu_group_item">
+ <ul><li><a href="'. $rootpath . '/SelectSalesOrder.php?Quotations=Quotes_Only">' . _('Quotations') . '</a></li>
+ </ul>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <br />
+ <br />
+ <br />';
include('includes/footer.inc');
exit();
}
@@ -22,37 +37,37 @@
$ErrMsg = _('There was a problem retrieving the quotation header details for Order Number') . ' ' . $_GET['QuotationNo'] . ' ' . _('from the database');
$sql = "SELECT salesorders.customerref,
- salesorders.comments,
- salesorders.orddate,
- salesorders.deliverto,
- salesorders.deladd1,
- salesorders.deladd2,
- salesorders.deladd3,
- salesorders.deladd4,
- salesorders.deladd5,
- salesorders.deladd6,
- debtorsmaster.name,
- debtorsmaster.address1,
- debtorsmaster.address2,
- debtorsmaster.address3,
- debtorsmaster.address4,
- debtorsmaster.address5,
- debtorsmaster.address6,
- shippers.shippername,
- salesorders.printedpackingslip,
- salesorders.datepackingslipprinted,
- salesorders.branchcode,
- locations.taxprovinceid,
- locations.locationname
- FROM salesorders,
- debtorsmaster,
- shippers,
- locations
- WHERE salesorders.debtorno=debtorsmaster.debtorno
- AND salesorders.shipvia=shippers.shipper_id
- AND salesorders.fromstkloc=locations.loccode
- AND salesorders.quotation=1
- AND salesorders.orderno='" . $_GET['QuotationNo'] ."'";
+ salesorders.comments,
+ salesorders.orddate,
+ salesorders.deliverto,
+ salesorders.deladd1,
+ salesorders.deladd2,
+ salesorders.deladd3,
+ salesorders.deladd4,
+ salesorders.deladd5,
+ salesorders.deladd6,
+ debtorsmaster.name,
+ debtorsmaster.currcode,
+ debtorsmaster.address1,
+ debtorsmaster.address2,
+ debtorsmaster.address3,
+ debtorsmaster.address4,
+ debtorsmaster.address5,
+ debtorsmaster.address6,
+ shippers.shippername,
+ salesorders.printedpackingslip,
+ salesorders.datepackingslipprinted,
+ salesorders.branchcode,
+ locations.taxprovinceid,
+ locations.locationname
+ FROM salesorders INNER JOIN debtorsmaster
+ ON salesorders.debtorno=debtorsmaster.debtorno
+ INNER JOIN shippers
+ ON salesorders.shipvia=shippers.shipper_id
+ INNER JOIN locations
+ ON salesorders.fromstkloc=locations.loccode
+ WHERE salesorders.quotation=1
+ AND salesorders.orderno='" . $_GET['QuotationNo'] ."'";
$result=DB_query($sql,$db, $ErrMsg);
@@ -60,11 +75,25 @@
if (DB_num_rows($result)==0){
$title = _('Print Quotation Error');
include('includes/header.inc');
- echo '<div class="centre"><br /><br /><br />';
+ echo '<div class="centre">
+ <br />
+ <br />
+ <br />';
prnMsg( _('Unable to Locate Quotation Number') . ' : ' . $_GET['QuotationNo'] . ' ', 'error');
- echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item">
- <li><a href="'. $rootpath . '/SelectSalesOrder.php?'. SID .'&Quotations=Quotes_Only">' . _('Outstanding Quotations') . '</a></li>
- </td></tr></table></div><br /><br /><br />';
+ echo '<br />
+ <br />
+ <br />
+ <table class="table_index">
+ <tr>
+ <td class="menu_group_item">
+ <ul><li><a href="'. $rootpath . '/SelectSalesOrder.php?Quotations=Quotes_Only">' . _('Outstanding Quotations') . '</a></li></ul>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <br />
+ <br />
+ <br />';
include('includes/footer.inc');
exit;
} elseif (DB_num_rows($result)==1){ /*There is only one order header returned - thats good! */
Modified: trunk/ShipmentCosting.php
===================================================================
--- trunk/ShipmentCosting.php 2011-07-03 04:33:19 UTC (rev 4622)
+++ trunk/ShipmentCosting.php 2011-07-05 10:27:25 UTC (rev 4623)
@@ -624,8 +624,8 @@
if ($_SESSION['WeightedAverageCosting']==0){
/* We are standard costing - so show the option to update costs - under W. Avg cost updates are implicit */
echo _('Update Standard Costs') .':<select name="UpdateCost">
- <option selected VALUE="Yes">'. _('Yes') . '</option>
- <option VALUE="No">'. _('No') . '</option>
+ <option selected value="Yes">'. _('Yes') . '</option>
+ <option value="No">'. _('No') . '</option>
</select>';
}
echo '<br /><br /><input type=submit name="Close" VALUE="'. _('Confirm OK to Close'). '">';
Modified: trunk/TaxAuthorityRates.php
===================================================================
--- trunk/TaxAuthorityRates.php 2011-07-03 04:33:19 UTC (rev 4622)
+++ trunk/TaxAuthorityRates.php 2011-07-05 10:27:25 UTC (rev 4623)
@@ -1,8 +1,6 @@
<?php
/* $Id$*/
-//$PageSecurity = 11; // only allow accountant access
-
if (isset($_POST['TaxAuthority'])){
$TaxAuthority = $_POST['TaxAuthority'];
}
@@ -17,10 +15,9 @@
echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Supplier Types')
. '" alt="" />' . $title. '</p>';
-/* <-- $Revision: 1.16 $ --> */
if (!isset($TaxAuthority)){
- prnMsg(_('This page can only be called after selecting the tax authority to edit the rates for') . '. ' . _('Please select the Rates link from the tax authority page') . ".<br /><a href='$rootpath/TaxAuthorities.php'>" . _('click here') . '</a> ' . _('to go to the Tax Authority page'),'error');
+ prnMsg(_('This page can only be called after selecting the tax authority to edit the rates for') . '. ' . _('Please select the Rates link from the tax authority page') . '<br /><a href="' . $rootpath . '/TaxAuthorities.php">' . _('click here') . '</a> ' . _('to go to the Tax Authority page'),'error');
include ('includes/footer.inc');
exit;
}
@@ -29,11 +26,11 @@
if (isset($_POST['UpdateRates'])){
$TaxRatesResult = DB_query("SELECT taxauthrates.taxcatid,
- taxauthrates.taxrate,
- taxauthrates.dispatchtaxprovince
- FROM taxauthrates
- WHERE taxauthrates.taxauthority='" . $TaxAuthority . "'",
- $db);
+ taxauthrates.taxrate,
+ taxauthrates.dispatchtaxprovince
+ FROM taxauthrates
+ WHERE taxauthrates.taxauthority='" . $TaxAuthority . "'",
+ $db);
while ($myrow=DB_fetch_array($TaxRatesResult)){
@@ -55,34 +52,35 @@
$TaxAuthDetail = DB_query("SELECT description FROM taxauthorities WHERE taxid='" . $TaxAuthority . "'",$db);
$myrow = DB_fetch_row($TaxAuthDetail);
-echo '<form action="' . $_SERVER['PHP_SELF'] . '?' . SID .'" method=post>';
+echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">';
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
-echo '<input type=hidden name="TaxAuthority" VALUE=' . $TaxAuthority . '>';
+echo '<input type=hidden name="TaxAuthority" value="' . $TaxAuthority . '">';
$TaxRatesResult = DB_query("SELECT taxauthrates.taxcatid,
- taxcategories.taxcatname,
- taxauthrates.taxrate,
- taxauthrates.dispatchtaxprovince,
- taxprovinces.taxprovincename
- FROM taxauthrates INNER JOIN taxauthorities
- ON taxauthrates.taxauthority=taxauthorities.taxid
- INNER JOIN taxprovinces
- ON taxauthrates.dispatchtaxprovince= taxprovinces.taxprovinceid
- INNER JOIN taxcategories
- ON taxauthrates.taxcatid=taxcategories.taxcatid
- WHERE taxauthrates.taxauthority='" . $TaxAuthority . "'
- ORDER BY taxauthrates.dispatchtaxprovince,
- taxauthrates.taxcatid",
- $db);
+ taxcategories.taxcatname,
+ taxauthrates.taxrate,
+ taxauthrates.dispatchtaxprovince,
+ taxprovinces.taxprovincename
+ FROM taxauthrates INNER JOIN taxauthorities
+ ON taxauthrates.taxauthority=taxauthorities.taxid
+ INNER JOIN taxprovinces
+ ON taxauthrates.dispatchtaxprovince= taxprovinces.taxprovinceid
+ INNER JOIN taxcategories
+ ON taxauthrates.taxcatid=taxcategories.taxcatid
+ WHERE taxauthrates.taxauthority='" . $TaxAuthority . "'
+ ORDER BY taxauthrates.dispatchtaxprovince,
+ taxauthrates.taxcatid",
+ $db);
if (DB_num_rows($TaxRatesResult)>0){
- echo '<table cellpadding=2 class=selection>';
+ echo '<table cellpadding=2 class="selection">';
echo '<tr><th colspan=3><font size=3 color=navy>' . _('Update') . ' ' . $myrow[0] . ' ' . _('Rates') . '</font></th></tr>';
$TableHeader = '<tr><th>' . _('Deliveries From') . '<br />' . _('Tax Province') . '</th>
<th>' . _('Tax Category') . '</th>
- <th>' . _('Tax Rate') . ' %</th></tr>';
+ <th>' . _('Tax Rate') . ' %</th>
+ </tr>';
echo $TableHeader;
$j = 1;
$k = 0; //row counter to determine background colour
@@ -104,7 +102,7 @@
printf('<td>%s</td>
<td>%s</td>
- <td><input type=text class="number" name=%s maxlength=5 size=5 value=%s></td>
+ <td><input type="text" class="number" name=%s maxlength=5 size=5 value=%s></td>
</tr>',
$myrow['taxprovincename'],
$myrow['taxcatname'],
@@ -116,7 +114,9 @@
}
//end of while loop
echo '</table>';
-echo "<br /><div class='centre'><input type=submit name='UpdateRates' VALUE='" . _('Update Rates') . "'>";
+echo '<br />
+ <div class="centre">
+ <input type=submit name="UpdateRates" VALUE="' . _('Update Rates') . '">';
} //end if tax taxcatid/rates to show
else {
prnMsg(_('There are no tax rates to show - perhaps the dispatch tax province records have not yet been created?'),'warn');
@@ -124,10 +124,10 @@
echo '</form>';
-echo '<br /><br /><a href="' . $rootpath . '/TaxAuthorities.php?' . SID . '">' . _('Tax Authorities') . '</a>';
-echo '<br /><a href="' . $rootpath . '/TaxGroups.php?' . SID . '">' . _('Tax Groupings') . '</a>';
-echo '<br /><a href="' . $rootpath . '/TaxCategories.php?' . SID . '">' . _('Tax Categories') . '</a>';
-echo '<br /><a href="' . $rootpath . '/TaxProvinces.php?' . SID . '">' . _('Dispatch Tax Provinces') . '</a>';
+echo '<br /><br /><a href="' . $rootpath . '/TaxAuthorities.php">' . _('Tax Authorities') . '</a>';
+echo '<br /><a href="' . $rootpath . '/TaxGroups.php">' . _('Tax Groupings') . '</a>';
+echo '<br /><a href="' . $rootpath . '/TaxCategories.php">' . _('Tax Categories') . '</a>';
+echo '<br /><a href="' . $rootpath . '/TaxProvinces.php">' . _('Dispatch Tax Provinces') . '</a>';
echo '</div>';
include( 'includes/footer.inc' );
Modified: trunk/includes/LanguagesArray.php
===================================================================
--- trunk/includes/LanguagesArray.php 2011-07-03 04:33:19 UTC (rev 4622)
+++ trunk/includes/LanguagesArray.php 2011-07-05 10:27:25 UTC (rev 4623)
@@ -1,32 +1,32 @@
-<?php
-$LanguagesArray = array();
-$LanguagesArray['en_US.utf8'] = _('English US');
-$LanguagesArray['en_GB.utf8'] = _('English British');
-$LanguagesArray['cz_CZ.utf8'] = _('Czechoslovakian');
-$LanguagesArray['de_DE.utf8'] = _('German');
-$LanguagesArray['el_GR.utf8'] = _('Greek');
-$LanguagesArray['es_ES.utf8'] = _('Spanish');
-$LanguagesArray['et_EE.utf8'] = _('Estonian');
-$LanguagesArray['fa_IR.utf8'] = _('Arabic');
-$LanguagesArray['fr_FR.utf8'] = _('French');
-$LanguagesArray['hi_IN.utf8'] = _('Hindi');
-$LanguagesArray['hr_HR.utf8'] = _('H...
[truncated message content] |