|
From: <dai...@us...> - 2011-04-17 10:18:10
|
Revision: 4552
http://web-erp.svn.sourceforge.net/web-erp/?rev=4552&view=rev
Author: daintree
Date: 2011-04-17 10:18:02 +0000 (Sun, 17 Apr 2011)
Log Message:
-----------
various
Modified Paths:
--------------
trunk/PO_Header.php
trunk/Prices_Customer.php
trunk/PrintCustTrans.php
trunk/RecurringSalesOrders.php
trunk/SupplierTypes.php
trunk/includes/OutputSerialItems.php
Modified: trunk/PO_Header.php
===================================================================
--- trunk/PO_Header.php 2011-04-16 06:20:56 UTC (rev 4551)
+++ trunk/PO_Header.php 2011-04-17 10:18:02 UTC (rev 4552)
@@ -766,7 +766,7 @@
if($_SESSION['ExistingOrder'] != 0 AND $_SESSION['PO'.$identifier]->Status == 'Printed'){
- echo '<tr><td><a href="' . $rootpath . '/GoodsReceived.php?' . SID . '&PONumber=' .
+ echo '<tr><td><a href="' . $rootpath . '/GoodsReceived.php?PONumber=' .
$_SESSION['PO'.$identifier]->OrderNo . '&identifier=' . $identifier . '">'._('Receive this order').'</a></td></tr>';
}
if ($_SESSION['PO'.$identifier]->Status==''){ //then its a new order
@@ -959,9 +959,9 @@
<td><input type="text" name="Tel" size="31" maxlength="30" value="' . $_SESSION['PO'.$identifier]->Tel . '"></td>
</tr>';
- echo '<tr><td>' . _('Delivery By') . ':</td><td><select name=DeliveryBy>';
+ echo '<tr><td>' . _('Delivery By') . ':</td><td><select name="DeliveryBy">';
- $ShipperResult = DB_query('SELECT shipper_id, shippername FROM shippers',$db);
+ $ShipperResult = DB_query("SELECT shipper_id, shippername FROM shippers",$db);
while ($ShipperRow=DB_fetch_array($ShipperResult)){
if (isset($_POST['DeliveryBy']) and ($_POST['DeliveryBy'] == $ShipperRow['shipper_id'])) {
@@ -978,7 +978,7 @@
echo '<table class=selection width=100%><tr><td>' . _('Supplier Selection') . ':</td><td>
<select name=Keywords onChange="ReloadForm(form1.SearchSuppliers)">';
- $SuppCoResult = DB_query('SELECT supplierid, suppname FROM suppliers ORDER BY suppname',$db);
+ $SuppCoResult = DB_query("SELECT supplierid, suppname FROM suppliers ORDER BY suppname",$db);
while ( $SuppCoRow=DB_fetch_array($SuppCoResult)){
if ($SuppCoRow['suppname'] == $_SESSION['PO'.$identifier]->SupplierName) {
@@ -1029,9 +1029,10 @@
</td><td><input type="text" name="SuppTel" size="31" maxlength="30" value="' . $_SESSION['PO'.$identifier]->SuppTel . '"></td>
</tr>';
- $result=DB_query('SELECT terms, termsindicator FROM paymentterms', $db);
+ $result=DB_query("SELECT terms, termsindicator FROM paymentterms", $db);
- echo '<tr><td>' . _('Payment Terms') . ':</td><td><select name="PaymentTerms">';
+ echo '<tr><td>' . _('Payment Terms') . ':</td>
+ <td><select name="PaymentTerms">';
while ($myrow = DB_fetch_array($result)) {
if ($myrow['termsindicator']==$_SESSION['PO'.$identifier]->PaymentTerms) {
@@ -1054,8 +1055,9 @@
</tr>';
if ($_SESSION['PO'.$identifier]->CurrCode != $_SESSION['CompanyRecord']['currencydefault']) {
- echo '<tr><td>'. _('Exchange Rate').':'.'</td><td><input type=text name="ExRate"
- value='.$_POST['ExRate'].' class=number size=11></td></tr>';
+ echo '<tr><td>'. _('Exchange Rate').':'.'</td>
+ <td><input type=text name="ExRate" value='.$_POST['ExRate'].' class="number" size=11></td>
+ </tr>';
} else {
echo '<input type=hidden name="ExRate" value="1">';
}
Modified: trunk/Prices_Customer.php
===================================================================
--- trunk/Prices_Customer.php 2011-04-16 06:20:56 UTC (rev 4551)
+++ trunk/Prices_Customer.php 2011-04-17 10:18:02 UTC (rev 4552)
@@ -1,7 +1,5 @@
<?php
-/* $Revision: 1.11 $ */
/* $Id$*/
-//$PageSecurity = 11;
include('includes/session.inc');
@@ -275,158 +273,142 @@
} else {
$EndDateDisplay = ConvertSQLDate($myrow['enddate']);
}
- printf("<tr bgcolor='#CCCCCC'>
- <td class=number>%0.2f</td>
- <td>%s</td>
- <td>%s</td>
- <td>%s</td>
- <td><a href='%s?Item=%s&Price=%s&Branch=%s&StartDate=%s&EndDate=%s&Edit=1'>" . _('Edit') . "</td>
- <td><a href='%s?Item=%s&Branch=%s&StartDate=%s&EndDate=%s&delete=yes'>" . _('Delete') . "</td></tr>",
- $myrow['price'],
- $Branch,
- ConvertSQLDate($myrow['startdate']),
- $EndDateDisplay,
- $_SERVER['PHP_SELF'],
- $Item,
- $myrow['price'],
- $myrow['branchcode'],
- $myrow['startdate'],
- $myrow['enddate'],
- $_SERVER['PHP_SELF'],
- $Item,
- $myrow['branchcode'],
- $myrow['startdate'],
- $myrow['enddate']);
+ echo '<tr bgcolor="#CCCCCC">
+ <td class=number>'.number_format($myrow['price'],2).'</td>
+ <td>'.$Branch.'</td>
+ <td>'.$myrow['units'].'</td>
+ <td class=number>'.$myrow['conversionfactor'].'</td>
+ <td>'.ConvertSQLDate($myrow['startdate']).'</td>
+ <td>'.$EndDateDisplay.'</td>
+ <td><a href="'.$_SERVER['PHP_SELF'].'?Item='.$Item.'&Price='.$myrow['price'].'&Branch='.$myrow['branchcode'].
+ '&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&Edit=1">' . _('Edit') . '</td>
+ <td><a href="'.$_SERVER['PHP_SELF'].'?Item='.$Item.'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'] .'&EndDate='.$myrow['enddate'].'&delete=yes">' . _('Delete') . '</td></tr>';
+
}
//END WHILE LIST LOOP
}
-?>
+echo '</table></tr></table><p />';
-</table></tr></table>
+echo '<form method="post" action=' . $_SERVER['PHP_SELF'] . '?' . SID . '>';
+echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
+echo '<input type=hidden name="Item" VALUE="' . $Item . '">';
-<p>
-
-<?php
- echo '<form method="post" action=' . $_SERVER['PHP_SELF'] . '?' . SID . '>';
- echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
- echo '<input type=hidden name="Item" VALUE="' . $Item . '">';
-
- if (isset($_GET['Edit']) and $_GET['Edit']==1){
- echo '<input type=hidden name="Editing" VALUE="Yes">';
- echo '<input type=hidden name="OldStartDate" VALUE="' . $_GET['StartDate'] .'">';
- echo '<input type=hidden name="OldEndDate" VALUE="' . $_GET['EndDate'] . '">';
- $_POST['Price']=$_GET['Price'];
- $_POST['Branch']=$_GET['Branch'];
- $_POST['StartDate'] = ConvertSQLDate($_GET['StartDate']);
- if (Is_Date($_GET['EndDate'])){
- $_POST['EndDate'] = ConvertSQLDate($_GET['EndDate']);
- } else {
- $_POST['EndDate']='';
- }
+if (isset($_GET['Edit']) and $_GET['Edit']==1){
+ echo '<input type=hidden name="Editing" VALUE="Yes">';
+ echo '<input type=hidden name="OldStartDate" VALUE="' . $_GET['StartDate'] .'">';
+ echo '<input type=hidden name="OldEndDate" VALUE="' . $_GET['EndDate'] . '">';
+ $_POST['Price']=$_GET['Price'];
+ $_POST['Branch']=$_GET['Branch'];
+ $_POST['StartDate'] = ConvertSQLDate($_GET['StartDate']);
+ if (Is_Date($_GET['EndDate'])){
+ $_POST['EndDate'] = ConvertSQLDate($_GET['EndDate']);
+ } else {
+ $_POST['EndDate']='';
}
- if (!isset($_POST['Branch'])) {
- $_POST['Branch']='';
- }
- if (!isset($_POST['Price'])) {
- $_POST['Price']=0;
- }
+}
+if (!isset($_POST['Branch'])) {
+ $_POST['Branch']='';
+}
+if (!isset($_POST['Price'])) {
+ $_POST['Price']=0;
+}
- if (!isset($_POST['StartDate'])){
- $_POST['StartDate'] = Date($_SESSION['DefaultDateFormat']);
- }
+if (!isset($_POST['StartDate'])){
+ $_POST['StartDate'] = Date($_SESSION['DefaultDateFormat']);
+}
- if (!isset($_POST['EndDate'])){
- $_POST['EndDate'] = DateAdd(Date($_SESSION['DefaultDateFormat']), 'y', 1);
- }
+if (!isset($_POST['EndDate'])){
+ $_POST['EndDate'] = '';
+}
- $sql = "SELECT
- branchcode,
- brname
- FROM custbranch
- WHERE debtorno='".$_SESSION['CustomerID'] ."'";
- $result = DB_query($sql, $db);
- echo '<table class=selection>';
- echo '<tr><td>' . _('Branch') . ':</td>';
- echo '<td><select name="Branch"';
- while ($myrow=DB_fetch_array($result)) {
- if ($myrow['branchcode']==$_POST['branch']) {
- echo '<option selected value='.$myrow['branchcode'].'>'.$myrow['brname'].'</option>';
- } else {
- echo '<option value='.$myrow['branchcode'].'>'.$myrow['brname'].'</option>';
- }
+$sql = "SELECT
+ branchcode,
+ brname
+ FROM custbranch
+ WHERE debtorno='".$_SESSION['CustomerID'] ."'";
+$result = DB_query($sql, $db);
+echo '<table class=selection>';
+echo '<tr><td>' . _('Branch') . ':</td>';
+echo '<td><select name="Branch"';
+while ($myrow=DB_fetch_array($result)) {
+ if ($myrow['branchcode']==$_POST['branch']) {
+ echo '<option selected value='.$myrow['branchcode'].'>'.$myrow['brname'].'</option>';
+ } else {
+ echo '<option value='.$myrow['branchcode'].'>'.$myrow['brname'].'</option>';
}
- echo '></td></tr>';
- echo '<tr><td>' . _('Start Date') . ':</td>
- <td><input type="Text" name="StartDate" class=date alt='.$_SESSION['DefaultDateFormat'].
- ' size=11 maxlength=10 value=' . $_POST['StartDate'] . '></td></tr>';
- echo '<tr><td>' . _('End Date') . ':</td>
- <td><input type="Text" name="EndDate" class=date alt='.$_SESSION['DefaultDateFormat'].
- ' size=11 maxlength=10 value=' . $_POST['EndDate'] . '></td></tr>';
+}
+echo '></td></tr>';
+echo '<tr><td>' . _('Start Date') . ':</td>
+ <td><input type="Text" name="StartDate" class=date alt='.$_SESSION['DefaultDateFormat'].
+ ' size=11 maxlength=10 value=' . $_POST['StartDate'] . '></td></tr>';
+echo '<tr><td>' . _('End Date') . ':</td>
+ <td><input type="Text" name="EndDate" class=date alt='.$_SESSION['DefaultDateFormat'].
+ ' size=11 maxlength=10 value=' . $_POST['EndDate'] . '></td></tr>';
- echo '<tr><td>' . _('Price') . ':</td>
- <td><input type="Text" class=number name="Price" size=11 maxlength=10 value=' . $_POST['Price'] . '></td>
- </tr></table>';
+echo '<tr><td>' . _('Price') . ':</td>
+ <td><input type="Text" class=number name="Price" size=11 maxlength=10 value=' . $_POST['Price'] . '></td>
+ </tr></table>';
- echo '<br><div class="centre"><input type="Submit" name="submit" VALUE="' . _('Enter Information') . '"></div>';
+echo '<br><div class="centre"><input type="Submit" name="submit" VALUE="' . _('Enter Information') . '"></div>';
- echo '</form>';
- include('includes/footer.inc');
+echo '</form>';
+include('includes/footer.inc');
- function ReSequenceEffectiveDates ($Item, $PriceList, $CurrAbbrev, $CustomerID, $db) {
+function ReSequenceEffectiveDates ($Item, $PriceList, $CurrAbbrev, $CustomerID, $db) {
- /*This is quite complicated - the idea is that prices set up should be unique and there is no way two prices could be returned as valid - when getting a price in includes/GetPrice.inc the logic is to first look for a price of the salestype/currency within the effective start and end dates - then if not get the price with a start date prior but a blank end date (the default price). We would not want two prices where the effective dates fall between an existing price so it is necessary to update enddates of prices - with me - I am just hanging on here myself
+ /*This is quite complicated - the idea is that prices set up should be unique and there is no way two prices could be returned as valid - when getting a price in includes/GetPrice.inc the logic is to first look for a price of the salestype/currency within the effective start and end dates - then if not get the price with a start date prior but a blank end date (the default price). We would not want two prices where the effective dates fall between an existing price so it is necessary to update enddates of prices - with me - I am just hanging on here myself
- Prices with no end date are default prices and need to be ignored in this resquence*/
+ Prices with no end date are default prices and need to be ignored in this resquence*/
- $SQL = "SELECT branchcode,
- startdate,
- enddate
- FROM prices
- WHERE debtorno='" . $CustomerID . "'
- AND stockid='" . $Item . "'
- AND currabrev='" . $CurrAbbrev . "'
- AND typeabbrev='" . $PriceList . "'
- AND enddate<>''
- ORDER BY
- branchcode,
- startdate,
- enddate";
+ $SQL = "SELECT branchcode,
+ startdate,
+ enddate
+ FROM prices
+ WHERE debtorno='" . $CustomerID . "'
+ AND stockid='" . $Item . "'
+ AND currabrev='" . $CurrAbbrev . "'
+ AND typeabbrev='" . $PriceList . "'
+ AND enddate<>''
+ ORDER BY
+ branchcode,
+ startdate,
+ enddate";
- $result = DB_query($SQL,$db);
+ $result = DB_query($SQL,$db);
- unset($BranchCode);
+ unset($BranchCode);
- while ($myrow = DB_fetch_array($result)){
- if (!isset($BranchCode)){
- unset($NextDefaultStartDate); //a price with a blank end date
- unset($NextStartDate);
- unset($EndDate);
- unset($StartDate);
- $BranchCode = $myrow['branchcode'];
- }
- if (isset($NextStartDate)){
- if (Date1GreaterThanDate2(ConvertSQLDate($myrow['startdate']),$NextStartDate)){
- $NextStartDate = ConvertSQLDate($myrow['startdate']);
- if (Date1GreaterThanDate2(ConvertSQLDate($EndDate),ConvertSQLDate($myrow['startdate']))) {
- /*Need to make the end date the new start date less 1 day */
- $SQL = "UPDATE prices SET enddate = '" . FormatDateForSQL(DateAdd($NextStartDate,'d',-1)) . "'
- WHERE stockid ='" .$Item . "'
- AND currabrev='" . $CurrAbbrev . "'
- AND typeabbrev='" . $PriceList . "'
- AND startdate ='" . $StartDate . "'
- AND enddate = '" . $EndDate . "'
- AND debtorno ='" . $CustomerID . "'";
- $UpdateResult = DB_query($SQL,$db);
- }
- } //end of if startdate after NextStartDate - we have a new NextStartDate
- } //end of if set NextStartDate
- else {
- $NextStartDate = ConvertSQLDate($myrow['startdate']);
- }
- $StartDate = $myrow['startdate'];
- $EndDate = $myrow['enddate'];
+ while ($myrow = DB_fetch_array($result)){
+ if (!isset($BranchCode)){
+ unset($NextDefaultStartDate); //a price with a blank end date
+ unset($NextStartDate);
+ unset($EndDate);
+ unset($StartDate);
+ $BranchCode = $myrow['branchcode'];
}
+ if (isset($NextStartDate)){
+ if (Date1GreaterThanDate2(ConvertSQLDate($myrow['startdate']),$NextStartDate)){
+ $NextStartDate = ConvertSQLDate($myrow['startdate']);
+ if (Date1GreaterThanDate2(ConvertSQLDate($EndDate),ConvertSQLDate($myrow['startdate']))) {
+ /*Need to make the end date the new start date less 1 day */
+ $SQL = "UPDATE prices SET enddate = '" . FormatDateForSQL(DateAdd($NextStartDate,'d',-1)) . "'
+ WHERE stockid ='" .$Item . "'
+ AND currabrev='" . $CurrAbbrev . "'
+ AND typeabbrev='" . $PriceList . "'
+ AND startdate ='" . $StartDate . "'
+ AND enddate = '" . $EndDate . "'
+ AND debtorno ='" . $CustomerID . "'";
+ $UpdateResult = DB_query($SQL,$db);
+ }
+ } //end of if startdate after NextStartDate - we have a new NextStartDate
+ } //end of if set NextStartDate
+ else {
+ $NextStartDate = ConvertSQLDate($myrow['startdate']);
+ }
+ $StartDate = $myrow['startdate'];
+ $EndDate = $myrow['enddate'];
+ }
}
?>
\ No newline at end of file
Modified: trunk/PrintCustTrans.php
===================================================================
--- trunk/PrintCustTrans.php 2011-04-16 06:20:56 UTC (rev 4551)
+++ trunk/PrintCustTrans.php 2011-04-17 10:18:02 UTC (rev 4552)
@@ -1,6 +1,6 @@
<?php
/* $Id$ */
-//$PageSecurity = 1;
+
include ('includes/session.inc');
if (isset($_GET['FromTransNo'])) {
$FromTransNo = trim($_GET['FromTransNo']);
@@ -31,7 +31,6 @@
if (isset($PrintPDF) or isset($_GET['PrintPDF']) and $PrintPDF and isset($FromTransNo) and isset($InvOrCredit) and $FromTransNo != '') {
$PaperSize = $FormDesign->PaperSize;
include ('includes/PDFStarter.php');
- // Javier: now I use the native constructor, better to not use references
if ($InvOrCredit == 'Invoice') {
$pdf->addInfo('Title', _('Sales Invoice') . ' ' . $FromTransNo . ' to ' . $_POST['ToTransNo']);
$pdf->addInfo('Subject', _('Invoices from') . ' ' . $FromTransNo . ' ' . _('to') . ' ' . $_POST['ToTransNo']);
@@ -39,11 +38,7 @@
$pdf->addInfo('Title', _('Sales Credit Note'));
$pdf->addInfo('Subject', _('Credit Notes from') . ' ' . $FromTransNo . ' ' . _('to') . ' ' . $_POST['ToTransNo']);
}
- /* Javier: I have brought this piece from the pdf class constructor to get it closer to the admin/user,
- I corrected it to match TCPDF, but it still needs some check, after which,
- I think it should be moved to each report to provide flexible Document Header and Margins in a per-report basis. */
- /* END Brought from class.pdf.php constructor */
- // $pdf->selectFont('helvetica');
+
$FirstPage = true;
$line_height = $FormDesign->LineHeight;
while ($FromTransNo <= $_POST['ToTransNo']) {
@@ -167,7 +162,7 @@
AND debtortrans.branchcode=custbranch.branchcode
AND custbranch.salesman=salesman.salesmancode";
if ($_POST['PrintEDI'] == 'No') {
- $sql = $sql . ' AND debtorsmaster.ediinvoices=0';
+ $sql = $sql . " AND debtorsmaster.ediinvoices=0";
}
} // end else
if ($FromTransNo!='Preview') {
@@ -177,7 +172,7 @@
include ('includes/header.inc');
prnMsg(_('There was a problem retrieving the invoice or credit note details for note number') . ' ' . $InvoiceToPrint . ' ' . _('from the database') . '. ' . _('To print an invoice, the sales order record, the customer transaction record and the branch record for the customer must not have been purged') . '. ' . _('To print a credit note only requires the customer, transaction, salesman and branch records be available'), 'error');
if ($debug == 1) {
- prnMsg(_('The SQL used to get this information that failed was') . "<br />" . $sql, 'error');
+ prnMsg(_('The SQL used to get this information that failed was') . '<br />' . $sql, 'error');
}
include ('includes/footer.inc');
exit;
@@ -230,9 +225,9 @@
if (DB_error_no($db) != 0) {
$title = _('Transaction Print Error Report');
include ('includes/header.inc');
- echo '<br>' . _('There was a problem retrieving the invoice or credit note stock movement details for invoice number') . ' ' . $FromTransNo . ' ' . _('from the database');
+ echo '<br />' . _('There was a problem retrieving the invoice or credit note stock movement details for invoice number') . ' ' . $FromTransNo . ' ' . _('from the database');
if ($debug == 1) {
- echo '<br>' . _('The SQL used to get this information that failed was') . "<br>$sql";
+ echo '<br />' . _('The SQL used to get this information that failed was') . '<br />' . $sql;
}
include ('includes/footer.inc');
exit;
@@ -389,36 +384,40 @@
include ('includes/header.inc');
if (!isset($FromTransNo) OR $FromTransNo == '') {
/* if FromTransNo is not set then show a form to allow input of either a single invoice number or a range of invoices to be printed. Also get the last invoice number created to show the user where the current range is up to */
- echo "<form action='" . $_SERVER['PHP_SELF'] . '?' . SID . "' method='POST'><table class='selection'>";
+ echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="POST">
+ <table class="selection">';
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . _('Print Invoices or Credit Notes (Landscape Mode)') . '</p>';
echo '<tr><td>' . _('Print Invoices or Credit Notes') . '</td><td><select name=InvOrCredit>';
if ($InvOrCredit == 'Invoice' OR !isset($InvOrCredit)) {
- echo "<option selected VALUE='Invoice'>" . _('Invoices');
- echo "<option VALUE='Credit'>" . _('Credit Notes');
+ echo '<option selected value="Invoice">' . _('Invoices') . '</option>';
+ echo '<option value="Credit">' . _('Credit Notes'). '</option>';
} else {
- echo "<option selected VALUE='Credit'>" . _('Credit Notes');
- echo "<option VALUE='Invoice'>" . _('Invoices');
+ echo '<option selected value="Credit">' . _('Credit Notes') . '</option>';
+ echo '<option value="Invoice">' . _('Invoices') . '</option>';
}
echo '</select></td></tr>';
echo '<tr><td>' . _('Print EDI Transactions') . '</td><td><select name=PrintEDI>';
if ($InvOrCredit == 'Invoice' OR !isset($InvOrCredit)) {
- echo "<option selected VALUE='No'>" . _('Do not Print PDF EDI Transactions');
- echo "<option VALUE='Yes'>" . _('Print PDF EDI Transactions Too');
+ echo '<option selected value="No">' . _('Do not Print PDF EDI Transactions') . '</option>';
+ echo '<option value="Yes">' . _('Print PDF EDI Transactions Too') . '</option>';
} else {
- echo "<option VALUE='No'>" . _('Do not Print PDF EDI Transactions');
- echo "<option selected VALUE='Yes'>" . _('Print PDF EDI Transactions Too');
+ echo '<option value="No">' . _('Do not Print PDF EDI Transactions') . '</option>';
+ echo '<option selected value="Yes">' . _('Print PDF EDI Transactions Too') . '</option>';
}
echo '</select></td></tr>';
- echo '<tr><td>' . _('Start invoice/credit note number to print') . '</td><td><input Type=text class=number max=6 size=7 name=FromTransNo></td></tr>';
- echo '<tr><td>' . _('End invoice/credit note number to print') . "</td><td><input Type=text class=number max=6 size=7 name='ToTransNo'></td></tr></table>";
- echo "<br><div class='centre'><input type=Submit Name='Print' Value='" . _('Print') . "'><p>";
- echo "<input type=Submit Name='PrintPDF' Value='" . _('Print PDF') . "'></div>";
- $sql = 'SELECT typeno FROM systypes WHERE typeid=10';
+ echo '<tr><td>' . _('Start invoice/credit note number to print') . '</td>
+ <td><input type="text" class="number" max=6 size=7 name=FromTransNo></td></tr>';
+ echo '<tr><td>' . _('End invoice/credit note number to print') . '</td>
+ <td><input Type="text" class="number" max=6 size=7 name="ToTransNo"></td>
+ </tr></table>';
+ echo '<br /><div class="centre"><input type="submit" name="Print" value="' . _('Print') . '"><p />';
+ echo '<input type="submit" name="PrintPDF" value="' . _('Print PDF') . '"></div>';
+ $sql = "SELECT typeno FROM systypes WHERE typeid=10";
$result = DB_query($sql, $db);
$myrow = DB_fetch_row($result);
- echo '<div class="page_help_text"><b>' . _('The last invoice created was number') . ' ' . $myrow[0] . '</b><br>' . _('If only a single invoice is required') . ', ' . _('enter the invoice number to print in the Start transaction number to print field and leave the End transaction number to print field blank') . '. ' . _('Only use the end invoice to print field if you wish to print a sequential range of invoices') . '';
- $sql = 'SELECT typeno FROM systypes WHERE typeid=11';
+ echo '<div class="page_help_text"><b>' . _('The last invoice created was number') . ' ' . $myrow[0] . '</b><br />' . _('If only a single invoice is required') . ', ' . _('enter the invoice number to print in the Start transaction number to print field and leave the End transaction number to print field blank') . '. ' . _('Only use the end invoice to print field if you wish to print a sequential range of invoices') . '';
+ $sql = "SELECT typeno FROM systypes WHERE typeid=11";
$result = DB_query($sql, $db);
$myrow = DB_fetch_row($result);
echo '<br /><b>' . _('The last credit note created was number') . ' ' . $myrow[0] . '</b><br />' .
@@ -518,12 +517,9 @@
}
$result = DB_query($sql, $db);
if (DB_num_rows($result) == 0 OR DB_error_no($db) != 0) {
- echo '<div class="page_help_text">' . _('There was a problem retrieving the invoice or credit note details for note number') .
- ' ' . $FromTransNo . ' ' . _('from the database') . '. ' .
- _('To print an invoice, the sales order record, the customer transaction record and the branch record for the customer must not have been purged') .
- '. ' . _('To print a credit note only requires the customer, transaction, salesman and branch records be available').'</div>';
+ echo '<div class="page_help_text">' . _('There was a problem retrieving the invoice or credit note details for note number') . ' ' . $FromTransNo . ' ' . _('from the database') . '. ' . _('To print an invoice, the sales order record, the customer transaction record and the branch record for the customer must not have been purged') . '. ' . _('To print a credit note only requires the customer, transaction, salesman and branch records be available').'</div>';
if ($debug == 1) {
- echo _('The SQL used to get this information that failed was') . "<br>$sql";
+ echo _('The SQL used to get this information that failed was') . "<br />$sql";
}
break;
include ('includes/footer.inc');
@@ -543,22 +539,22 @@
} else {
echo '<font color=RED size=4>' . _('TAX CREDIT NOTE') . ' ';
}
- echo '</b>' . _('Number') . ' ' . $FromTransNo . '</font><br><font size=1>' . _('Tax Authority Ref') . '. ' . $_SESSION['CompanyRecord']['gstno'] . '</td></tr></table>';
+ echo '</b>' . _('Number') . ' ' . $FromTransNo . '</font><br /><font size=1>' . _('Tax Authority Ref') . '. ' . $_SESSION['CompanyRecord']['gstno'] . '</td></tr></table>';
/* Now print out the logo and company name and address */
- echo '<table class="table1"><tr><td><font size=4 color="#333333"><b>' . $_SESSION['CompanyRecord']['coyname'] . '</b></font><br>';
- echo $_SESSION['CompanyRecord']['regoffice1'] . '<br>';
- echo $_SESSION['CompanyRecord']['regoffice2'] . '<br>';
- echo $_SESSION['CompanyRecord']['regoffice3'] . '<br>';
- echo $_SESSION['CompanyRecord']['regoffice4'] . '<br>';
- echo $_SESSION['CompanyRecord']['regoffice5'] . '<br>';
- echo $_SESSION['CompanyRecord']['regoffice6'] . '<br>';
- echo _('Telephone') . ': ' . $_SESSION['CompanyRecord']['telephone'] . '<br>';
- echo _('Facsimile') . ': ' . $_SESSION['CompanyRecord']['fax'] . '<br>';
- echo _('Email') . ': ' . $_SESSION['CompanyRecord']['email'] . '<br>';
+ echo '<table class="table1"><tr><td><font size=4 color="#333333"><b>' . $_SESSION['CompanyRecord']['coyname'] . '</b></font><br />';
+ echo $_SESSION['CompanyRecord']['regoffice1'] . '<br />';
+ echo $_SESSION['CompanyRecord']['regoffice2'] . '<br />';
+ echo $_SESSION['CompanyRecord']['regoffice3'] . '<br />';
+ echo $_SESSION['CompanyRecord']['regoffice4'] . '<br />';
+ echo $_SESSION['CompanyRecord']['regoffice5'] . '<br />';
+ echo $_SESSION['CompanyRecord']['regoffice6'] . '<br />';
+ echo _('Telephone') . ': ' . $_SESSION['CompanyRecord']['telephone'] . '<br />';
+ echo _('Facsimile') . ': ' . $_SESSION['CompanyRecord']['fax'] . '<br />';
+ echo _('Email') . ': ' . $_SESSION['CompanyRecord']['email'] . '<br />';
echo '</td><td WIDTH=50% class=number>';
/* Now the customer charged to details in a sub table within a cell of the main table*/
echo '<table class="table1"><tr><td align=left bgcolor="#BBBBBB"><b>' . _('Charge To') . ':</b></td></tr><tr><td bgcolor="#EEEEEE">';
- echo $myrow['name'] . '<br>' . $myrow['address1'] . '<br>' . $myrow['address2'] . '<br>' . $myrow['address3'] . '<br>' . $myrow['address4'] . '<br>' . $myrow['address5'] . '<br>' . $myrow['address6'];
+ echo $myrow['name'] . '<br />' . $myrow['address1'] . '<br />' . $myrow['address2'] . '<br />' . $myrow['address3'] . '<br />' . $myrow['address4'] . '<br />' . $myrow['address5'] . '<br />' . $myrow['address6'];
echo '</td></tr></table>';
/*end of the small table showing charge to account details */
echo _('Page') . ': ' . $PageNumber;
@@ -571,8 +567,8 @@
<td align=left bgcolor="#BBBBBB"><b>' . _('Delivered To') . ':</b></td>
</tr>';
echo '<tr>
- <td bgcolor="#EEEEEE">' . $myrow['brname'] . '<br>' . $myrow['braddress1'] . '<br>' . $myrow['braddress2'] . '<br>' . $myrow['braddress3'] . '<br>' . $myrow['braddress4'] . '<br>' . $myrow['braddress5'] . '<br>' . $myrow['braddress6'] . '</td>';
- echo '<td bgcolor="#EEEEEE">' . $myrow['deliverto'] . '<br>' . $myrow['deladd1'] . '<br>' . $myrow['deladd2'] . '<br>' . $myrow['deladd3'] . '<br>' . $myrow['deladd4'] . '<br>' . $myrow['deladd5'] . '<br>' . $myrow['deladd6'] . '</td>';
+ <td bgcolor="#EEEEEE">' . $myrow['brname'] . '<br />' . $myrow['braddress1'] . '<br />' . $myrow['braddress2'] . '<br />' . $myrow['braddress3'] . '<br />' . $myrow['braddress4'] . '<br />' . $myrow['braddress5'] . '<br />' . $myrow['braddress6'] . '</td>';
+ echo '<td bgcolor="#EEEEEE">' . $myrow['deliverto'] . '<br />' . $myrow['deladd1'] . '<br />' . $myrow['deladd2'] . '<br />' . $myrow['deladd3'] . '<br />' . $myrow['deladd4'] . '<br />' . $myrow['deladd5'] . '<br />' . $myrow['deladd6'] . '</td>';
echo '</tr>
</table><hr>';
echo '<table class="table1">
@@ -614,7 +610,7 @@
<td align=left bgcolor="#BBBBBB"><b>' . _('Branch') . ':</b></td>
</tr>';
echo '<tr>
- <td bgcolor="#EEEEEE">' . $myrow['brname'] . '<br>' . $myrow['braddress1'] . '<br>' . $myrow['braddress2'] . '<br>' . $myrow['braddress3'] . '<br>' . $myrow['braddress4'] . '<br>' . $myrow['braddress5'] . '<br>' . $myrow['braddress6'] . '</td>
+ <td bgcolor="#EEEEEE">' . $myrow['brname'] . '<br />' . $myrow['braddress1'] . '<br />' . $myrow['braddress2'] . '<br />' . $myrow['braddress3'] . '<br />' . $myrow['braddress4'] . '<br />' . $myrow['braddress5'] . '<br />' . $myrow['braddress6'] . '</td>
</tr></table>';
echo '<hr><table class="table1"><tr>
<td align=left bgcolor="#BBBBBB"><b>' . _('Date') . '</b></td>
@@ -643,7 +639,7 @@
if (DB_error_no($db) != 0) {
echo '<div class="page_help_text">' . _('There was a problem retrieving the invoice or credit note stock movement details for invoice number') . ' ' . $FromTransNo . ' ' . _('from the database').'</div>';
if ($debug == 1) {
- echo '<br>' . _('The SQL used to get this information that failed was') . '<br>'.$sql;
+ echo '<br />' . _('The SQL used to get this information that failed was') . '<br />'.$sql;
}
exit;
}
@@ -700,16 +696,16 @@
echo '</b>' . _('Number') . ' ' . $FromTransNo . '</font><br /><font size=1>' . _('GST Number') . ' - ' . $_SESSION['CompanyRecord']['gstno'] . '</td></tr></table>';
/*Now print out company name and address */
echo '<table class="table1"><tr>
- <td><font size=4 color="#333333"><b>' . $_SESSION['CompanyRecord']['coyname'] . '</b></font><br>';
- echo $_SESSION['CompanyRecord']['regoffice1'] . '<br>';
- echo $_SESSION['CompanyRecord']['regoffice2'] . '<br>';
- echo $_SESSION['CompanyRecord']['regoffice3'] . '<br>';
- echo $_SESSION['CompanyRecord']['regoffice4'] . '<br>';
- echo $_SESSION['CompanyRecord']['regoffice5'] . '<br>';
- echo $_SESSION['CompanyRecord']['regoffice6'] . '<br>';
- echo _('Telephone') . ': ' . $_SESSION['CompanyRecord']['telephone'] . '<br>';
- echo _('Facsimile') . ': ' . $_SESSION['CompanyRecord']['fax'] . '<br>';
- echo _('Email') . ': ' . $_SESSION['CompanyRecord']['email'] . '<br>';
+ <td><font size=4 color="#333333"><b>' . $_SESSION['CompanyRecord']['coyname'] . '</b></font><br />';
+ echo $_SESSION['CompanyRecord']['regoffice1'] . '<br />';
+ echo $_SESSION['CompanyRecord']['regoffice2'] . '<br />';
+ echo $_SESSION['CompanyRecord']['regoffice3'] . '<br />';
+ echo $_SESSION['CompanyRecord']['regoffice4'] . '<br />';
+ echo $_SESSION['CompanyRecord']['regoffice5'] . '<br />';
+ echo $_SESSION['CompanyRecord']['regoffice6'] . '<br />';
+ echo _('Telephone') . ': ' . $_SESSION['CompanyRecord']['telephone'] . '<br />';
+ echo _('Facsimile') . ': ' . $_SESSION['CompanyRecord']['fax'] . '<br />';
+ echo _('Email') . ': ' . $_SESSION['CompanyRecord']['email'] . '<br />';
echo '</td><td class=number>' . _('Page') . ': '.$PageNumber.'</td></tr></table>';
echo '<table class="table1"><tr>
<th>' . _('Item Code') . '</th>
@@ -736,18 +732,18 @@
} else {
echo '<font color=RED size=4>' . _('TAX CREDIT NOTE') . ' ';
}
- echo '</b>' . _('Number') . ' ' . $FromTransNo . '</font><br><font size=1>' . _('GST Number') . ' - ' . $_SESSION['CompanyRecord']['gstno'] . '</td></tr><table>';
+ echo '</b>' . _('Number') . ' ' . $FromTransNo . '</font><br /><font size=1>' . _('GST Number') . ' - ' . $_SESSION['CompanyRecord']['gstno'] . '</td></tr><table>';
/* Print out the logo and company name and address */
- echo '<table class="table1"><tr><td><font size=4 color="#333333"><b>' . $_SESSION['CompanyRecord']['coyname'] . '</b></font><br>';
- echo $_SESSION['CompanyRecord']['regoffice1'] . '<br>';
- echo $_SESSION['CompanyRecord']['regoffice2'] . '<br>';
- echo $_SESSION['CompanyRecord']['regoffice3'] . '<br>';
- echo $_SESSION['CompanyRecord']['regoffice4'] . '<br>';
- echo $_SESSION['CompanyRecord']['regoffice5'] . '<br>';
- echo $_SESSION['CompanyRecord']['regoffice6'] . '<br>';
- echo _('Telephone') . ': ' . $_SESSION['CompanyRecord']['telephone'] . '<br>';
- echo _('Facsimile') . ': ' . $_SESSION['CompanyRecord']['fax'] . '<br>';
- echo _('Email') . ': ' . $_SESSION['CompanyRecord']['email'] . '<br>';
+ echo '<table class="table1"><tr><td><font size=4 color="#333333"><b>' . $_SESSION['CompanyRecord']['coyname'] . '</b></font><br />';
+ echo $_SESSION['CompanyRecord']['regoffice1'] . '<br />';
+ echo $_SESSION['CompanyRecord']['regoffice2'] . '<br />';
+ echo $_SESSION['CompanyRecord']['regoffice3'] . '<br />';
+ echo $_SESSION['CompanyRecord']['regoffice4'] . '<br />';
+ echo $_SESSION['CompanyRecord']['regoffice5'] . '<br />';
+ echo $_SESSION['CompanyRecord']['regoffice6'] . '<br />';
+ echo _('Telephone') . ': ' . $_SESSION['CompanyRecord']['telephone'] . '<br />';
+ echo _('Facsimile') . ': ' . $_SESSION['CompanyRecord']['fax'] . '<br />';
+ echo _('Email') . ': ' . $_SESSION['CompanyRecord']['email'] . '<br />';
echo '</td><td class=number>' . _('Page') . ': '.$PageNumber.'</td></tr></table>';
echo '<table class="table1"><tr>
<th>' . _('Item Code') . '</th>
@@ -760,10 +756,10 @@
$LineCounter = 10;
}
/* Space out the footer to the bottom of the page */
- echo '<br><br>' . $myrow['invtext'];
+ echo '<br /><br />' . $myrow['invtext'];
$LineCounter = $LineCounter + 2 + $LinesRequiredForText;
while ($LineCounter < ($_SESSION['PageLength'] - 6)) {
- echo '<br>';
+ echo '<br />';
$LineCounter++;
}
/* Now print out the footer and totals */
Modified: trunk/RecurringSalesOrders.php
===================================================================
--- trunk/RecurringSalesOrders.php 2011-04-16 06:20:56 UTC (rev 4551)
+++ trunk/RecurringSalesOrders.php 2011-04-17 10:18:02 UTC (rev 4552)
@@ -6,7 +6,6 @@
/* Session started in header.inc for password checking the session will contain the details of the order from the Cart class object. The details of the order come from SelectOrderItems.php */
-//$PageSecurity=1;
include('includes/session.inc');
$title = _('Recurring Orders');
include('includes/header.inc');
@@ -494,13 +493,13 @@
echo '<br><div class="centre">';
if ($NewRecurringOrder=='Yes'){
- echo '<input type=hidden name="NewRecurringOrder" value="Yes">';
- echo "<input type=submit name='Process' value='" . _('Create Recurring Order') . "'>";
+ echo '<input type="hidden" name="NewRecurringOrder" value="Yes">';
+ echo '<input type="submit" name="Process" value="' . _('Create Recurring Order') . '">';
} else {
echo '<input type=hidden name="NewRecurringOrder" value="No">';
echo '<input type=hidden name="ExistingRecurrOrderNo" value=' . $_POST['ExistingRecurrOrderNo'] . '>';
- echo "<input type=submit name='Process' value='" . _('Update Recurring Order Details') . "'>";
+ echo '<input type="submit" name="Process" value="' . _('Update Recurring Order Details') . '">';
echo '<hr>';
echo '<br><br><input type=submit name="DeleteRecurringOrder" value="' . _('Delete Recurring Order') . ' ' . $_POST['ExistingRecurrOrderNo'] . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this recurring order template?') . '\');">';
}
Modified: trunk/SupplierTypes.php
===================================================================
--- trunk/SupplierTypes.php 2011-04-16 06:20:56 UTC (rev 4551)
+++ trunk/SupplierTypes.php 2011-04-17 10:18:02 UTC (rev 4552)
@@ -1,8 +1,6 @@
<?php
-/* $Revision: 1.6 $ */
-/* $Id$*/
-//$PageSecurity = 4;
+/* $Id SupplierTypes.php 4183 2010-12-14 09:30:20Z daintree $ */
include('includes/session.inc');
$title = _('Supplier Types') . ' / ' . _('Maintenance');
Modified: trunk/includes/OutputSerialItems.php
===================================================================
--- trunk/includes/OutputSerialItems.php 2011-04-16 06:20:56 UTC (rev 4551)
+++ trunk/includes/OutputSerialItems.php 2011-04-17 10:18:02 UTC (rev 4552)
@@ -34,21 +34,21 @@
$listtableheader=$tableheader;
} else if ($LineItem->Serialised==0 and $Perishable==1){
$tableheader = '<tr>
- <th>'. _('Batch/Roll/Bundle'). ' #</th>
- <th>'. _('Available'). '</th>
- <th>'. _('Quantity'). '</th>
- <th>'. _('Expiry Date'). '</th>
- </tr>';
+ <th>'. _('Batch/Roll/Bundle'). ' #</th>
+ <th>'. _('Available'). '</th>
+ <th>'. _('Quantity'). '</th>
+ <th>'. _('Expiry Date'). '</th>
+ </tr>';
$listtableheader = '<tr>
- <th>'. _('Batch/Roll/Bundle'). ' #</th>
- <th>'. _('Quantity'). '</th>
- <th>'. _('Expiry Date'). '</th>
- </tr>';
+ <th>'. _('Batch/Roll/Bundle'). ' #</th>
+ <th>'. _('Quantity'). '</th>
+ <th>'. _('Expiry Date'). '</th>
+ </tr>';
} else {
$tableheader = '<tr>
- <th>'. _('Batch/Roll/Bundle'). ' #</th>
- <th>'. _('Quantity'). '</th>
- </tr>';
+ <th>'. _('Batch/Roll/Bundle'). ' #</th>
+ <th>'. _('Quantity'). '</th>
+ </tr>';
$listtableheader=$tableheader;
}
@@ -97,7 +97,6 @@
echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?Delete=' . $Bundle->BundleRef . '&StockID=' . $LineItem->StockID . '&LineNo=' . $LineNo .'">'. _('Delete'). '</a></td></tr>';
- $LineItem->SerialItems[]=$Bundle;
$TotalQuantity += $Bundle->BundleQty;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|