|
From: <dai...@us...> - 2013-07-30 10:30:55
|
Revision: 6165
http://sourceforge.net/p/web-erp/reponame/6165
Author: daintree
Date: 2013-07-30 10:30:51 +0000 (Tue, 30 Jul 2013)
Log Message:
-----------
HTML 5 work
Modified Paths:
--------------
trunk/CustomerBranches.php
trunk/GLProfit_Loss.php
trunk/OffersReceived.php
trunk/OutstandingGRNs.php
trunk/PDFDIFOT.php
trunk/PDFDeliveryDifferences.php
trunk/PDFLowGP.php
trunk/PDFOrderStatus.php
trunk/PDFOrdersInvoiced.php
trunk/PDFPeriodStockTransListing.php
trunk/PDFPickingList.php
trunk/PDFPriceList.php
trunk/PDFPrintLabel.php
trunk/PaymentMethods.php
trunk/PaymentTerms.php
trunk/Payments.php
trunk/doc/Change.log
Modified: trunk/CustomerBranches.php
===================================================================
--- trunk/CustomerBranches.php 2013-07-30 07:39:19 UTC (rev 6164)
+++ trunk/CustomerBranches.php 2013-07-30 10:30:51 UTC (rev 6165)
@@ -52,7 +52,7 @@
if (ContainsIllegalCharacters($_POST['BranchCode']) OR mb_strstr($_POST['BranchCode'],' ') OR mb_strstr($_POST['BranchCode'],'-')) {
$InputError = 1;
- prnMsg(_('The Branch code cannot contain any of the following characters')." - & \'",'error');
+ prnMsg(_('The Branch code cannot contain any of the following characters')." - & \' < >",'error');
$Errors[$i] = 'BranchCode';
$i++;
}
@@ -446,9 +446,9 @@
<table class="selection">
<tr>
<td><div class="centre">';
- echo '<b>'.$TotalEnable.'</b> ' . _('Branches are enabled.') . '<br />';
- echo '<b>'.$TotalDisable.'</b> ' . _('Branches are disabled.') . '<br />';
- echo '<b>'.($TotalEnable+$TotalDisable). '</b> ' . _('Total Branches') . '</div></td>
+ echo '<b>' . $TotalEnable.'</b> ' . _('Branches are enabled.') . '<br />';
+ echo '<b>' . $TotalDisable.'</b> ' . _('Branches are disabled.') . '<br />';
+ echo '<b>' . ($TotalEnable+$TotalDisable). '</b> ' . _('Total Branches') . '</div></td>
</tr>
</table>';
} else {
Modified: trunk/GLProfit_Loss.php
===================================================================
--- trunk/GLProfit_Loss.php 2013-07-30 07:39:19 UTC (rev 6164)
+++ trunk/GLProfit_Loss.php 2013-07-30 10:30:51 UTC (rev 6165)
@@ -109,6 +109,10 @@
</select>
</td>
</tr>
+ <tr>
+ <td>' . _('Show all Accounts including zero balances') . '</td>
+ <td><input type="checkbox" title="' . _('Check this box to display all accounts including those accounts with no balance') . '" name="ShowZeroBalances"></td>
+ </tr>
</table>
<br />
<div class="centre">
@@ -404,16 +408,19 @@
if ($_POST['Detail'] == 'Detailed') {
$LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,$myrow['accountcode']);
$LeftOvers = $pdf->addTextWrap($Left_Margin+60,$YPos,190,$FontSize,$myrow['accountname']);
- if ($Section == 1) { /*Income*/
- $LeftOvers = $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,locale_number_format(-$AccountPeriodActual,$_SESSION['CompanyRecord']['decimalplaces']),'right');
- $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,locale_number_format(-$AccountPeriodBudget,$_SESSION['CompanyRecord']['decimalplaces']),'right');
- $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,locale_number_format(-$AccountPeriodLY,$_SESSION['CompanyRecord']['decimalplaces']),'right');
- } else {
- $LeftOvers = $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,locale_number_format($AccountPeriodActual,$_SESSION['CompanyRecord']['decimalplaces']),'right');
- $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,locale_number_format($AccountPeriodBudget,$_SESSION['CompanyRecord']['decimalplaces']),'right');
- $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,locale_number_format($AccountPeriodLY,$_SESSION['CompanyRecord']['decimalplaces']),'right');
+ if (isset($_POST['ShowZeroBalances']) OR (!isset($_POST['ShowZeroBalances']) AND ($AccountPeriodActual <> 0 OR $AccountPeriodBudget <> 0 OR $AccountPeriodLY <> 0))){ //condition for pdf
+
+ if ($Section == 1) { /*Income*/
+ $LeftOvers = $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,locale_number_format(-$AccountPeriodActual,$_SESSION['CompanyRecord']['decimalplaces']),'right');
+ $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,locale_number_format(-$AccountPeriodBudget,$_SESSION['CompanyRecord']['decimalplaces']),'right');
+ $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,locale_number_format(-$AccountPeriodLY,$_SESSION['CompanyRecord']['decimalplaces']),'right');
+ } else {
+ $LeftOvers = $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,locale_number_format($AccountPeriodActual,$_SESSION['CompanyRecord']['decimalplaces']),'right');
+ $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,locale_number_format($AccountPeriodBudget,$_SESSION['CompanyRecord']['decimalplaces']),'right');
+ $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,locale_number_format($AccountPeriodLY,$_SESSION['CompanyRecord']['decimalplaces']),'right');
+ }
+ $YPos -= $line_height;
}
- $YPos -= $line_height;
}
}
//end of loop
@@ -969,42 +976,42 @@
echo '<tr class="OddTableRows">';
$k++;
}
-
- $ActEnquiryURL = '<a href="' . $RootPath . '/GLAccountInquiry.php?Period=' . $_POST['ToPeriod'] . '&Account=' . $myrow['accountcode'] . '&Show=Yes">' . $myrow['accountcode'] . '</a>';
-
- if ($Section ==1){
- printf('<td>%s</td>
- <td>%s</td>
- <td></td>
- <td class="number">%s</td>
- <td></td>
- <td class="number">%s</td>
- <td></td>
- <td class="number">%s</td>
- </tr>',
- $ActEnquiryURL,
- htmlspecialchars($myrow['accountname'], ENT_QUOTES,'UTF-8', false),
- locale_number_format(-$AccountPeriodActual,$_SESSION['CompanyRecord']['decimalplaces']),
- locale_number_format(-$AccountPeriodBudget,$_SESSION['CompanyRecord']['decimalplaces']),
- locale_number_format(-$AccountPeriodLY,$_SESSION['CompanyRecord']['decimalplaces']));
- } else {
- printf('<td>%s</td>
- <td>%s</td>
- <td class="number">%s</td>
- <td></td>
- <td class="number">%s</td>
- <td></td>
- <td class="number">%s</td>
- <td></td>
- </tr>',
- $ActEnquiryURL,
- htmlspecialchars($myrow['accountname'], ENT_QUOTES,'UTF-8', false),
- locale_number_format($AccountPeriodActual,$_SESSION['CompanyRecord']['decimalplaces']),
- locale_number_format($AccountPeriodBudget,$_SESSION['CompanyRecord']['decimalplaces']),
- locale_number_format($AccountPeriodLY,$_SESSION['CompanyRecord']['decimalplaces']));
+ if (isset($_POST['ShowZeroBalances']) OR (!isset($_POST['ShowZeroBalances']) AND ($AccountPeriodActual <> 0 OR $AccountPeriodBudget <> 0 OR $AccountPeriodLY <> 0))){
+ $ActEnquiryURL = '<a href="' . $RootPath . '/GLAccountInquiry.php?Period=' . $_POST['ToPeriod'] . '&Account=' . $myrow['accountcode'] . '&Show=Yes">' . $myrow['accountcode'] . '</a>';
+
+ if ($Section ==1){
+ printf('<td>%s</td>
+ <td>%s</td>
+ <td></td>
+ <td class="number">%s</td>
+ <td></td>
+ <td class="number">%s</td>
+ <td></td>
+ <td class="number">%s</td>
+ </tr>',
+ $ActEnquiryURL,
+ htmlspecialchars($myrow['accountname'], ENT_QUOTES,'UTF-8', false),
+ locale_number_format(-$AccountPeriodActual,$_SESSION['CompanyRecord']['decimalplaces']),
+ locale_number_format(-$AccountPeriodBudget,$_SESSION['CompanyRecord']['decimalplaces']),
+ locale_number_format(-$AccountPeriodLY,$_SESSION['CompanyRecord']['decimalplaces']));
+ } else {
+ printf('<td>%s</td>
+ <td>%s</td>
+ <td class="number">%s</td>
+ <td></td>
+ <td class="number">%s</td>
+ <td></td>
+ <td class="number">%s</td>
+ <td></td>
+ </tr>',
+ $ActEnquiryURL,
+ htmlspecialchars($myrow['accountname'], ENT_QUOTES,'UTF-8', false),
+ locale_number_format($AccountPeriodActual,$_SESSION['CompanyRecord']['decimalplaces']),
+ locale_number_format($AccountPeriodBudget,$_SESSION['CompanyRecord']['decimalplaces']),
+ locale_number_format($AccountPeriodLY,$_SESSION['CompanyRecord']['decimalplaces']));
+ }
+ $j++;
}
-
- $j++;
}
}
//end of loop
Modified: trunk/OffersReceived.php
===================================================================
--- trunk/OffersReceived.php 2013-07-30 07:39:19 UTC (rev 6164)
+++ trunk/OffersReceived.php 2013-07-30 10:30:51 UTC (rev 6165)
@@ -13,7 +13,7 @@
currcode,
paymentterms
FROM suppliers
- WHERE supplierid='".$_POST['supplierid']."'";
+ WHERE supplierid='" . $_POST['supplierid'] . "'";
$result = DB_query($sql, $db);
$myrow=DB_fetch_array($result);
$SupplierName=$myrow['suppname'];
@@ -31,24 +31,24 @@
ON offers.currcode=purchorderauth.currabrev
LEFT JOIN suppliers
ON suppliers.supplierid=offers.supplierid
- WHERE purchorderauth.userid='".$_SESSION['UserID']."'
+ WHERE purchorderauth.userid='" . $_SESSION['UserID'] . "'
AND offers.expirydate>'" . date('Y-m-d') . "'
AND purchorderauth.cancreate=0";
$result=DB_query($sql, $db);
if (DB_num_rows($result)==0) {
prnMsg(_('There are no offers outstanding that you are authorised to deal with'), 'information');
} else {
- echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/supplier.png" title="' . _('Select Supplier') . '" alt="" />
+ echo '<p class="page_title_text"><img src="' . $RootPath.'/css/' . $Theme.'/images/supplier.png" title="' . _('Select Supplier') . '" alt="" />
' . ' ' . _('Select Supplier') . '</p>';
echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">';
echo '<div>';
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
echo '<table class="selection">
<tr>
- <td>'._('Select Supplier').'</td>
+ <td>' . _('Select Supplier').'</td>
<td><select name=supplierid>';
while ($myrow=DB_fetch_array($result)) {
- echo '<option value="'.$myrow['supplierid'].'">'.$myrow['suppname'].'</option>';
+ echo '<option value="' . $myrow['supplierid'].'">' . $myrow['suppname'].'</option>';
}
echo '</select></td>
</tr>
@@ -97,23 +97,23 @@
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
echo '<p class="page_title_text">
- <img src="'.$RootPath.'/css/'.$Theme.'/images/supplier.png" title="' . _('Supplier Offers') . '" alt="" />' . ' ' . _('Supplier Offers') . '
+ <img src="' . $RootPath.'/css/' . $Theme.'/images/supplier.png" title="' . _('Supplier Offers') . '" alt="" />' . ' ' . _('Supplier Offers') . '
</p>';
echo '<table class="selection">
<tr>
- <th>'._('Offer ID').'</th>
- <th>'._('Supplier').'</th>
- <th>'._('Stock Item').'</th>
- <th>'._('Quantity').'</th>
- <th>'._('Units').'</th>
- <th>'._('Price').'</th>
- <th>'._('Total').'</th>
- <th>'._('Currency').'</th>
- <th>'._('Offer Expires').'</th>
- <th>'._('Accept').'</th>
- <th>'._('Reject').'</th>
- <th>'._('Defer').'</th>
+ <th>' . _('Offer ID').'</th>
+ <th>' . _('Supplier').'</th>
+ <th>' . _('Stock Item').'</th>
+ <th>' . _('Quantity').'</th>
+ <th>' . _('Units').'</th>
+ <th>' . _('Price').'</th>
+ <th>' . _('Total').'</th>
+ <th>' . _('Currency').'</th>
+ <th>' . _('Offer Expires').'</th>
+ <th>' . _('Accept').'</th>
+ <th>' . _('Reject').'</th>
+ <th>' . _('Defer').'</th>
</tr>';
$k=0;
echo 'The result has rows '.DB_num_rows($result).'<br/>';
@@ -125,19 +125,19 @@
echo '<tr class="OddTableRows">';
$k++;
}
- echo '<td>'.$myrow['offerid'].'</td>
- <td>'.$myrow['suppname'].'</td>
- <td>'.$myrow['description'].'</td>
+ echo '<td>' . $myrow['offerid'].'</td>
+ <td>' . $myrow['suppname'].'</td>
+ <td>' . $myrow['description'].'</td>
<td class="number">'.locale_number_format($myrow['quantity'],$myrow['decimalplaces']).'</td>
- <td>'.$myrow['uom'].'</td>
+ <td>' . $myrow['uom'].'</td>
<td class="number">'.locale_number_format($myrow['price'],$myrow['currdecimalplaces']).'</td>
<td class="number">'.locale_number_format($myrow['price']*$myrow['quantity'],$myrow['currdecimalplaces']).'</td>
- <td>'.$myrow['currcode'].'</td>
- <td>'.$myrow['expirydate'].'</td>
- <td><input type="radio" name="action'.$myrow['offerid'].'" value="1" /></td>
- <td><input type="radio" name="action'.$myrow['offerid'].'" value="2" /></td>
- <td><input type="radio" checked name="action'.$myrow['offerid'].'" value="3" /></td>
- <td><input type="hidden" name="supplierid" value="'.$myrow['supplierid'].'" /></td>
+ <td>' . $myrow['currcode'].'</td>
+ <td>' . $myrow['expirydate'].'</td>
+ <td><input type="radio" name="action' . $myrow['offerid'] . '" value="1" /></td>
+ <td><input type="radio" name="action' . $myrow['offerid'] . '" value="2" /></td>
+ <td><input type="radio" checked name="action' . $myrow['offerid'] . '" value="3" /></td>
+ <td><input type="hidden" name="supplierid" value="' . $myrow['supplierid'] . '" /></td>
</tr>';
}
echo '<tr>
@@ -152,27 +152,27 @@
</form>';
} else if(isset($_POST['submit']) and isset($_POST['supplierid'])) {
include ('includes/htmlMimeMail.php');
- $accepts=array();
+ $Accepts=array();
$RejectsArray=array();
- $defers=array();
+ $Defers=array();
foreach ($_POST as $key => $value) {
if(mb_substr($key,0,6)=='action') {
$OfferID=mb_substr($key,6);
switch ($value) {
case 1:
- $accepts[]=$OfferID;
+ $Accepts[]=$OfferID;
break;
case 2:
$RejectsArray[]=$OfferID;
break;
case 3:
- $defers[]=$OfferID;
+ $Defers[]=$OfferID;
break;
}
}
}
- if (sizeOf($accepts)>0){
- $MailText=_('This email has been automatically generated by the webERP installation at'). ' ' . $_SESSION['CompanyRecord']['coyname']."\n";
+ if (sizeOf($Accepts)>0){
+ $MailText=_('This email has been automatically generated by the webERP installation at'). ' ' . $_SESSION['CompanyRecord']['coyname'] . "\n";
$MailText.=_('The following offers you made have been accepted')."\n";
$MailText.=_('An official order will be sent to you in due course')."\n\n";
$sql="SELECT rate FROM currencies where currabrev='" . $CurrCode ."'";
@@ -192,18 +192,18 @@
stat_comment,
paymentterms)
VALUES (
- '".$OrderNo."',
- '".$_POST['supplierid']."',
+ '" . $OrderNo."',
+ '" . $_POST['supplierid'] . "',
'".date('Y-m-d')."',
- '".$Rate."',
- '".$_SESSION['UserID']."',
- '".$_SESSION['DefaultFactoryLocation']."',
+ '" . $Rate."',
+ '" . $_SESSION['UserID'] . "',
+ '" . $_SESSION['DefaultFactoryLocation'] . "',
'".date('Y-m-d')."',
'"._('Pending')."',
'"._('Automatically generated from tendering system')."',
- '".$PaymentTerms."')";
+ '" . $PaymentTerms."')";
DB_query($sql, $db);
- foreach ($accepts as $AcceptID) {
+ foreach ($Accepts as $AcceptID) {
$sql="SELECT offers.quantity,
offers.price,
offers.uom,
@@ -212,10 +212,10 @@
FROM offers
LEFT JOIN stockmaster
ON offers.stockid=stockmaster.stockid
- WHERE offerid='".$AcceptID."'";
+ WHERE offerid='" . $AcceptID."'";
$result= DB_query($sql, $db);
$myrow=DB_fetch_array($result);
- $MailText.=$myrow['description']."\t"._('Quantity').' '.$myrow['quantity']."\t"._('Price').' '.
+ $MailText.=$myrow['description'] . "\t"._('Quantity').' ' . $myrow['quantity'] . "\t"._('Price').' '.
locale_number_format($myrow['price'])."\n";
$sql="INSERT INTO purchorderdetails (orderno,
itemcode,
@@ -225,20 +225,20 @@
actprice,
quantityord,
suppliersunit)
- VALUES ('".$OrderNo."',
- '".$myrow['stockid']."',
+ VALUES ('" . $OrderNo."',
+ '" . $myrow['stockid'] . "',
'".date('Y-m-d')."',
'".DB_escape_string($myrow['description'])."',
- '".$myrow['price']."',
- '".$myrow['price']."',
- '".$myrow['quantity']."',
- '".$myrow['uom']."')";
+ '" . $myrow['price'] . "',
+ '" . $myrow['price'] . "',
+ '" . $myrow['quantity'] . "',
+ '" . $myrow['uom'] . "')";
$result=DB_query($sql, $db);
- $sql="DELETE FROM offers WHERE offerid='".$AcceptID."'";
+ $sql="DELETE FROM offers WHERE offerid='" . $AcceptID."'";
$result=DB_query($sql, $db);
}
$mail = new htmlMimeMail();
- $mail->setSubject(_('Your offer to').' '.$_SESSION['CompanyRecord']['coyname'].' '._('has been accepted'));
+ $mail->setSubject(_('Your offer to').' ' . $_SESSION['CompanyRecord']['coyname'].' ' . _('has been accepted'));
$mail->setText($MailText);
$Recipients = GetMailList('OffersReceivedResultRecipients');
if (sizeOf($Recipients) == 0) {
@@ -254,16 +254,16 @@
$result = SendMailBySmtp($mail,$Recipients);
}
if($result){
- prnMsg(_('The accepted offers from').' '.$SupplierName.' '._('have been converted to purchase orders and an email sent to')
- .' '.$Email."\n"._('Please review the order contents').' '.'<a href="'.$RootPath .
- '/PO_Header.php?ModifyOrderNumber=' . $OrderNo.'">'._('here').'</a>', 'success');
+ prnMsg(_('The accepted offers from').' ' . $SupplierName.' ' . _('have been converted to purchase orders and an email sent to')
+ .' ' . $Email."\n"._('Please review the order contents').' '.'<a href="' . $RootPath .
+ '/PO_Header.php?ModifyOrderNumber=' . $OrderNo.'">' . _('here').'</a>', 'success');
}else{
- prnMsg(_('The accepted offers from').' '.$SupplierName.' '._('have been converted to purcharse orders but failed to mail, you can view the order contents').' '.'<a href="'.$RootPath.'/PO_Header.php?ModifyOrderNumber=' . $OrderNo.'">'._('here').'</a>','warn');
+ prnMsg(_('The accepted offers from').' ' . $SupplierName.' ' . _('have been converted to purcharse orders but failed to mail, you can view the order contents').' '.'<a href="' . $RootPath.'/PO_Header.php?ModifyOrderNumber=' . $OrderNo.'">' . _('here').'</a>','warn');
}
}
if (sizeOf($RejectsArray)>0){
$MailText=_('This email has been automatically generated by the webERP installation at').' '.
- $_SESSION['CompanyRecord']['coyname']."\n";
+ $_SESSION['CompanyRecord']['coyname'] . "\n";
$MailText.=_('The following offers you made have been rejected')."\n\n";
foreach ($RejectsArray as $RejectID) {
$sql="SELECT offers.quantity,
@@ -272,7 +272,7 @@
FROM offers
LEFT JOIN stockmaster
ON offers.stockid=stockmaster.stockid
- WHERE offerid='".$RejectID."'";
+ WHERE offerid='" . $RejectID."'";
$result= DB_query($sql, $db);
$myrow=DB_fetch_array($result);
$MailText .= $myrow['description'] . "\t" . _('Quantity') . ' ' . $myrow['quantity'] . "\t" . _('Price') . ' ' . locale_number_format($myrow['price'])."\n";
@@ -280,7 +280,7 @@
$result=DB_query($sql, $db);
}
$mail = new htmlMimeMail();
- $mail->setSubject(_('Your offer to').' '.$_SESSION['CompanyRecord']['coyname'].' '._('has been rejected'));
+ $mail->setSubject(_('Your offer to').' ' . $_SESSION['CompanyRecord']['coyname'].' ' . _('has been rejected'));
$mail->setText($MailText);
$mail->setFrom($_SESSION['CompanyRecord']['coyname'] . ' <' . $_SESSION['CompanyRecord']['email'] . '>');
$Recipients = GetMailList('OffersReceivedResultRecipients');
@@ -297,11 +297,11 @@
$result = SendmailBySmtp($mail,$Recipients);
}
if($result){
- prnMsg(_('The rejected offers from').' '.$SupplierName.' '._('have been removed from the system and an email sent to')
- .' '.$Email, 'success');
+ prnMsg(_('The rejected offers from').' ' . $SupplierName.' ' . _('have been removed from the system and an email sent to')
+ .' ' . $Email, 'success');
}else{
- prnMsg(_('The rejected offers from').' '.$SupplierName.' '._('have been removed from the system and but no email was not sent to')
- .' '.$Email, 'warn');
+ prnMsg(_('The rejected offers from').' ' . $SupplierName.' ' . _('have been removed from the system and but no email was not sent to')
+ .' ' . $Email, 'warn');
}
}
Modified: trunk/OutstandingGRNs.php
===================================================================
--- trunk/OutstandingGRNs.php 2013-07-30 07:39:19 UTC (rev 6164)
+++ trunk/OutstandingGRNs.php 2013-07-30 10:30:51 UTC (rev 6165)
@@ -265,11 +265,11 @@
echo '<tr>
<td>' . _('From Supplier Code') . ':</td>
- <td><input type="text" name="FromCriteria" value="0" /></td>
+ <td><input type="text" name="FromCriteria" required="required" autofocus="autofocus" pattern="[0-9a-zA-Z]*" value="0" /></td>
</tr>
<tr>
<td>' . _('To Supplier Code'). ':</td>
- <td><input type="text" name="ToCriteria" value="zzzzzzz" /></td>
+ <td><input type="text" name="ToCriteria" required="required" pattern="[0-9a-zA-Z]*" value="zzzzzzz" /></td>
</tr>
</table>
<br />
Modified: trunk/PDFDIFOT.php
===================================================================
--- trunk/PDFDIFOT.php 2013-07-30 07:39:19 UTC (rev 6164)
+++ trunk/PDFDIFOT.php 2013-07-30 10:30:51 UTC (rev 6165)
@@ -30,12 +30,12 @@
echo '<table class="selection">
<tr>
<td>' . _('Enter the date from which variances between orders and deliveries are to be listed') . ':</td>
- <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'].'" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . '" /></td>
+ <td><input type="text" required="required" autofocus="autofocus" class="date" alt="' .$_SESSION['DefaultDateFormat'].'" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . '" /></td>
+ </tr>
+ <tr>
+ <td>' . _('Enter the date to which variances between orders and deliveries are to be listed') . ':</td>
+ <td><input type="text" required="required" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td>
</tr>';
- echo '<tr>
- <td>' . _('Enter the date to which variances between orders and deliveries are to be listed') . ':</td>
- <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td>
- </tr>';
if (!isset($_POST['DaysAcceptable'])){
$_POST['DaysAcceptable'] = 1;
@@ -43,9 +43,11 @@
echo '<tr>
<td>' . _('Enter the number of days considered acceptable between delivery requested date and invoice date(ie the date dispatched)') . ':</td>
- <td><input type="text" class="number" name="DaysAcceptable" maxlength="2" size="2" value="' . $_POST['DaysAcceptable'] . '" /></td>
- </tr>';
- echo '<tr><td>' . _('Inventory Category') . '</td><td>';
+ <td><input type="text" class="integer" name="DaysAcceptable" maxlength="2" size="2" value="' . $_POST['DaysAcceptable'] . '" /></td>
+ </tr>
+ <tr>
+ <td>' . _('Inventory Category') . '</td>
+ <td>';
$sql = "SELECT categorydescription, categoryid FROM stockcategory WHERE stocktype<>'D' AND stocktype<>'L'";
$result = DB_query($sql,$db);
@@ -60,9 +62,10 @@
echo '</select></td></tr>';
- echo '<tr><td>' . _('Inventory Location') . ':</td>
- <td><select name="Location">';
- echo '<option selected="selected" value="All">' . _('All Locations') . '</option>';
+ echo '<tr>
+ <td>' . _('Inventory Location') . ':</td>
+ <td><select name="Location">
+ <option selected="selected" value="All">' . _('All Locations') . '</option>';
$result= DB_query("SELECT loccode, locationname FROM locations",$db);
while ($myrow=DB_fetch_array($result)){
@@ -70,7 +73,8 @@
}
echo '</select></td></tr>';
- echo '<tr><td>' . _('Email the report off') . ':</td>
+ echo '<tr>
+ <td>' . _('Email the report off') . ':</td>
<td><select name="Email">
<option selected="selected" value="No">' . _('No') . '</option>
<option value="Yes">' . _('Yes') . '</option>
@@ -80,9 +84,9 @@
<br />
<div class="centre">
<input type="submit" name="Go" value="' . _('Create PDF') . '" />
- </div>';
- echo '</div>
- </form>';
+ </div>
+ </div>
+ </form>';
if ($InputError==1){
prnMsg($msg,'error');
Modified: trunk/PDFDeliveryDifferences.php
===================================================================
--- trunk/PDFDeliveryDifferences.php 2013-07-30 07:39:19 UTC (rev 6164)
+++ trunk/PDFDeliveryDifferences.php 2013-07-30 10:30:51 UTC (rev 6165)
@@ -30,10 +30,11 @@
echo '<table class="selection">
<tr>
<td>' . _('Enter the date from which variances between orders and deliveries are to be listed') . ':</td>
- <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat']. '" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . '" /></td>
+ <td><input type="text" required="required" autofocus="autofocus" class="date" alt="' . $_SESSION['DefaultDateFormat']. '" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . '" /></td>
</tr>';
echo '<tr>
- <td>' . _('Enter the date to which variances between orders and deliveries are to be listed') . ':</td><td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat']. '" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td>
+ <td>' . _('Enter the date to which variances between orders and deliveries are to be listed') . ':</td>
+ <td><input type="text" required="required" class="date" alt="' . $_SESSION['DefaultDateFormat']. '" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td>
</tr>';
echo '<tr>
<td>' . _('Inventory Category') . '</td>
@@ -56,9 +57,8 @@
}
echo '</select></td>
- </tr>';
-
- echo '<tr>
+ </tr>
+ <tr>
<td>' . _('Inventory Location') . ':</td>
<td><select name="Location">
<option selected="selected" value="All">' . _('All Locations') . '</option>';
@@ -80,9 +80,9 @@
<br />
<div class="centre">
<input type="submit" name="Go" value="' . _('Create PDF') . '" />
- </div>';
- echo '</div>
- </form>';
+ </div>
+ </div>
+ </form>';
if ($InputError==1){
prnMsg($msg,'error');
Modified: trunk/PDFLowGP.php
===================================================================
--- trunk/PDFLowGP.php 2013-07-30 07:39:19 UTC (rev 6164)
+++ trunk/PDFLowGP.php 2013-07-30 10:30:51 UTC (rev 6165)
@@ -128,25 +128,25 @@
echo '<div>';
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
echo '<table class="selection">';
- echo '<tr><td>' . _('Sales Made From') . ' (' . _('in the format') . ' ' . $_SESSION['DefaultDateFormat'] . '):</td>
- <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" size="10" maxlength="10" value="' . $_POST['FromDate'] . '" /></td>
- </tr>';
-
- echo '<tr><td>' . _('Sales Made To') . ' (' . _('in the format') . ' ' . $_SESSION['DefaultDateFormat'] . '):</td>
- <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" size="10" maxlength="10" value="' . $_POST['ToDate'] . '" /></td>
- </tr>';
-
- echo '<tr><td>' . _('Show sales with GP % below') . ':</td>
- <td><input type="text" class="number" name="GPMin" maxlength="3" size="3" value="' . $_POST['GPMin'] . '" /></td>
- </tr>';
-
- echo '</table>
- <br />
- <div class="centre">
- <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" />
- </div>';
- echo '</div>
- </form>';
+ echo '<tr>
+ <td>' . _('Sales Made From') . ' (' . _('in the format') . ' ' . $_SESSION['DefaultDateFormat'] . '):</td>
+ <td><input type="text" required="required" autofocus="autofocus" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" size="10" maxlength="10" value="' . $_POST['FromDate'] . '" /></td>
+ </tr>
+ <tr>
+ <td>' . _('Sales Made To') . ' (' . _('in the format') . ' ' . $_SESSION['DefaultDateFormat'] . '):</td>
+ <td><input type="text" required="required" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" size="10" maxlength="10" value="' . $_POST['ToDate'] . '" /></td>
+ </tr>
+ <tr>
+ <td>' . _('Show sales with GP % below') . ':</td>
+ <td><input type="text" class="integer" name="GPMin" maxlength="3" size="3" value="' . $_POST['GPMin'] . '" /></td>
+ </tr>
+ </table>
+ <br />
+ <div class="centre">
+ <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" />
+ </div>
+ </div>
+ </form>';
}
include('includes/footer.inc');
Modified: trunk/PDFOrderStatus.php
===================================================================
--- trunk/PDFOrderStatus.php 2013-07-30 07:39:19 UTC (rev 6164)
+++ trunk/PDFOrderStatus.php 2013-07-30 10:30:51 UTC (rev 6165)
@@ -30,51 +30,58 @@
echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/transactions.png" title="' . $Title . '" alt="" />' . ' ' . _('Order Status Report') . '</p>';
echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">';
- echo '<div>';
- echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
- echo '<table class="selection">
- <tr>
- <td>' . _('Enter the date from which orders are to be listed') . ':</td>
- <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . '" /></td>
- </tr>';
- echo '<tr><td>' . _('Enter the date to which orders are to be listed') . ':</td><td>';
- echo '<input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td></tr>';
- echo '<tr><td>' . _('Inventory Category') . '</td><td>';
+ echo '<div>
+ <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />
+ <table class="selection">
+ <tr>
+ <td>' . _('Enter the date from which orders are to be listed') . ':</td>
+ <td><input type="text" required="required" autofocus="autofocus" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . '" /></td>
+ </tr>
+ <tr>
+ <td>' . _('Enter the date to which orders are to be listed') . ':</td>
+ <td><input type="text" required="required" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td>
+ </tr>
+ <tr>
+ <td>' . _('Inventory Category') . '</td>
+ <td>';
$sql = "SELECT categorydescription, categoryid FROM stockcategory WHERE stocktype<>'D' AND stocktype<>'L'";
$result = DB_query($sql,$db);
- echo '<select name="CategoryID">';
- echo '<option selected="selected" value="All">' . _('Over All Categories') . '</option>';
+ echo '<select required="required" name="CategoryID">
+ <option selected="selected" value="All">' . _('Over All Categories') . '</option>';
while ($myrow=DB_fetch_array($result)){
echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>';
}
- echo '</select></td></tr>';
+ echo '</select></td>
+ </tr>
+ <tr>
+ <td>' . _('Inventory Location') . ':</td>
+ <td><select name="Location">
+ <option selected="selected" value="All">' . _('All Locations') . '</option>';
- echo '<tr><td>' . _('Inventory Location') . ':</td><td><select name="Location">';
- echo '<option selected="selected" value="All">' . _('All Locations') . '</option>';
-
$result= DB_query("SELECT loccode, locationname FROM locations",$db);
while ($myrow=DB_fetch_array($result)){
echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>';
}
echo '</select></td></tr>';
- echo '<tr><td>' . _('Back Order Only') . ':</td>
- <td><select name="BackOrders">
- <option selected="selected" value="Yes">' . _('Only Show Back Orders') . '</option>
- <option value="No">' . _('Show All Orders') . '</option>
- </select></td>
- </tr>
- </table>
- <br />
- <div class="centre">
- <input type="submit" name="Go" value="' . _('Create PDF') . '" />
- </div>';
- echo '</div>
- </form>';
+ echo '<tr>
+ <td>' . _('Back Order Only') . ':</td>
+ <td><select name="BackOrders">
+ <option selected="selected" value="Yes">' . _('Only Show Back Orders') . '</option>
+ <option value="No">' . _('Show All Orders') . '</option>
+ </select></td>
+ </tr>
+ </table>
+ <br />
+ <div class="centre">
+ <input type="submit" name="Go" value="' . _('Create PDF') . '" />
+ </div>
+ </div>
+ </form>';
include('includes/footer.inc');
exit;
Modified: trunk/PDFOrdersInvoiced.php
===================================================================
--- trunk/PDFOrdersInvoiced.php 2013-07-30 07:39:19 UTC (rev 6164)
+++ trunk/PDFOrdersInvoiced.php 2013-07-30 10:30:51 UTC (rev 6165)
@@ -35,43 +35,50 @@
echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">';
echo '<div>';
- echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
- echo '<table class="selection">
- <tr>
- <td>' . _('Enter the date from which orders are to be listed') . ':</td>
- <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'] .'" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . '" /></td>
- </tr>';
- echo '<tr><td>' . _('Enter the date to which orders are to be listed') . ':</td>
- <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'] . '" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td></tr>';
- echo '<tr><td>' . _('Inventory Category') . '</td><td>';
+ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />
+ <table class="selection">
+ <tr>
+ <td>' . _('Enter the date from which orders are to be listed') . ':</td>
+ <td><input type="text" required="required" autofocus="autofocus" class="date" alt="' .$_SESSION['DefaultDateFormat'] .'" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . '" /></td>
+ </tr>
+ <tr>
+ <td>' . _('Enter the date to which orders are to be listed') . ':</td>
+ <td><input type="text" required="required" class="date" alt="' .$_SESSION['DefaultDateFormat'] . '" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td>
+ </tr>
+ <tr>
+ <td>' . _('Inventory Category') . '</td>
+ <td>';
$sql = "SELECT categorydescription, categoryid FROM stockcategory WHERE stocktype<>'D' AND stocktype<>'L'";
$result = DB_query($sql,$db);
-
- echo '<select name="CategoryID">';
+ echo '<select required="required" name="CategoryID">';
echo '<option selected="selected" value="All">' . _('Over All Categories') . '</option>';
while ($myrow=DB_fetch_array($result)){
echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>';
}
- echo '</select></td></tr>';
+ echo '</select></td>
+ </tr>
+ <tr>
+ <td>' . _('Inventory Location') . ':</td>
+ <td><select required="required" name="Location">
+ <option selected="selected" value="All">' . _('All Locations') . '</option>';
- echo '<tr><td>' . _('Inventory Location') . ':</td><td><select name="Location">';
- echo '<option selected="selected" value="All">' . _('All Locations') . '</option>';
-
$result= DB_query("SELECT loccode, locationname FROM locations",$db);
while ($myrow=DB_fetch_array($result)){
echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>';
}
- echo '</select></td></tr>';
+ echo '</select></td>
+ </tr>
+ </table>
+ <br />
+ <div class="centre">
+ <input type="submit" name="Go" value="' . _('Create PDF') . '" />
+ </div>
+ </div>
+ </form>';
- echo '</table>
- <br />
- <div class="centre"><input type="submit" name="Go" value="' . _('Create PDF') . '" /></div>';
- echo '</div>
- </form>';
-
include('includes/footer.inc');
exit;
} else {
Modified: trunk/PDFPeriodStockTransListing.php
===================================================================
--- trunk/PDFPeriodStockTransListing.php 2013-07-30 07:39:19 UTC (rev 6164)
+++ trunk/PDFPeriodStockTransListing.php 2013-07-30 10:30:51 UTC (rev 6165)
@@ -24,31 +24,29 @@
prnMsg($msg,'error');
}
- echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">';
- echo '<div>';
- echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
- echo '<table class="selection">';
- echo '<tr>
- <td>' . _('Enter the date from which the transactions are to be listed') . ':</td>
- <td><input type="text" name="FromDate" maxlength="10" size="10" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td>
- </tr>';
- echo '<tr>
- <td>' . _('Enter the date to which the transactions are to be listed') . ':</td>
- <td><input type="text" name="ToDate" maxlength="10" size="10" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td>
- </tr>';
-
- echo '<tr><td>' . _('Transaction type') . '</td><td>';
-
- echo '<select name="TransType">';
-
- echo '<option value="10">' . _('Sales Invoice').'</option>
- <option value="11">' . _('Sales Credit Note').'</option>
- <option value="16">' . _('Location Transfer').'</option>
- <option value="17">' . _('Stock Adjustment').'</option>
- <option value="25">' . _('Purchase Order Delivery').'</option>
- <option value="26">' . _('Work Order Receipt').'</option>
- <option value="28">' . _('Work Order Issue').'</option>
- </select></td>
+ echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">
+ <div>
+ <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />
+ <table class="selection">
+ <tr>
+ <td>' . _('Enter the date from which the transactions are to be listed') . ':</td>
+ <td><input type="text" required="required" autofocus="autofocus" name="FromDate" maxlength="10" size="10" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td>
+ </tr>
+ <tr>
+ <td>' . _('Enter the date to which the transactions are to be listed') . ':</td>
+ <td><input type="text" required="required" name="ToDate" maxlength="10" size="10" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td>
+ </tr>
+ <tr>
+ <td>' . _('Transaction type') . '</td>
+ <td><select name="TransType">
+ <option value="10">' . _('Sales Invoice').'</option>
+ <option value="11">' . _('Sales Credit Note').'</option>
+ <option value="16">' . _('Location Transfer').'</option>
+ <option value="17">' . _('Stock Adjustment').'</option>
+ <option value="25">' . _('Purchase Order Delivery').'</option>
+ <option value="26">' . _('Work Order Receipt').'</option>
+ <option value="28">' . _('Work Order Issue').'</option>
+ </select></td>
</tr>';
$sql = "SELECT loccode, locationname FROM locations";
@@ -56,7 +54,7 @@
echo '<tr>
<td>' . _('For Stock Location') . ':</td>
- <td><select name="StockLocation">
+ <td><select required="required" name="StockLocation">
<option value="All">' . _('All') . '</option>';
while ($myrow=DB_fetch_array($resultStkLocs)){
Modified: trunk/PDFPickingList.php
===================================================================
--- trunk/PDFPickingList.php 2013-07-30 07:39:19 UTC (rev 6164)
+++ trunk/PDFPickingList.php 2013-07-30 10:30:51 UTC (rev 6165)
@@ -26,16 +26,17 @@
FROM locations";
$result=DB_query($sql, $db);
echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/sales.png" title="' . _('Search') . '" alt="" />' . ' ' . $Title.'</p><br />';
- echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post" name="form">';
- echo '<div>';
- echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
- echo '<table class="selection">
+ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post" name="form">
+ <div>
+ <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />
+ <table class="selection">
<tr>
<td>'._('Create picking lists for all deliveries to be made on').' : '.'</td>
- <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="TransDate" maxlength="10" size="11" value="'.date($_SESSION['DefaultDateFormat'], mktime(date('m'),date('Y'),date('d')+1)).'" /></td>
- </tr>';
- echo '<tr><td>'._('From Warehouse').' : '.'</td>
- <td><select name="loccode">';
+ <td><input type="text" required="required" autofocus="autofocus" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="TransDate" maxlength="10" size="11" value="' . date($_SESSION['DefaultDateFormat'], mktime(date('m'),date('Y'),date('d')+1)) . '" /></td>
+ </tr>
+ <tr>
+ <td>'._('From Warehouse').' : '.'</td>
+ <td><select required="required" name="loccode">';
while ($myrow=DB_fetch_array($result)) {
echo '<option value="'.$myrow['loccode'].'">'.$myrow['locationname'].'</option>';
}
Modified: trunk/PDFPriceList.php
===================================================================
--- trunk/PDFPriceList.php 2013-07-30 07:39:19 UTC (rev 6164)
+++ trunk/PDFPriceList.php 2013-07-30 10:30:51 UTC (rev 6165)
@@ -288,25 +288,31 @@
}
echo '</select></td></tr>';
- echo '<tr><td>' . _('Show Gross Profit %') . ':</td>
- <td><select name="ShowGPPercentages">';
- echo '<option selected="selected" value="No">'. _('Prices Only') . '</option>';
- echo '<option value="Yes">'. _('Show GP % too') . '</option>';
- echo '</select></td></tr>';
-
- echo '<tr><td>' . _('Price Listing Type'). ':</td><td><select name="CustomerSpecials">';
- echo '<option selected="selected" value="Sales Type Prices">'. _('Default Sales Type Prices') . '</option>';
- echo '<option value="Customer Special Prices Only">'. _('Customer Special Prices Only') . '</option>';
- echo '<option value="Full Description">'. _('Full Description') . '</option>';
- echo '</select></td></tr>';
-
- echo '<tr><td>' . _('Effective As At') . ':</td>';
- echo '<td><input type="text" size="11" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="EffectiveDate" value="' . Date($_SESSION['DefaultDateFormat']) . '" />';
- echo '</td></tr>';
-
- echo '</table><br /><div class="centre"><input type="submit" name="PrintPDF" value="'. _('Print PDF'). '" /></div>';
- echo '</div>
- </form>';
+ echo '<tr>
+ <td>' . _('Show Gross Profit %') . ':</td>
+ <td><select name="ShowGPPercentages">
+ <option selected="selected" value="No">'. _('Prices Only') . '</option>
+ <option value="Yes">'. _('Show GP % too') . '</option>
+ </select></td>
+ </tr>
+ <tr>
+ <td>' . _('Price Listing Type'). ':</td><td><select name="CustomerSpecials">
+ <option selected="selected" value="Sales Type Prices">'. _('Default Sales Type Prices') . '</option>
+ <option value="Customer Special Prices Only">'. _('Customer Special Prices Only') . '</option>
+ <option value="Full Description">'. _('Full Description') . '</option>
+ </select></td>
+ </tr>
+ <tr>
+ <td>' . _('Effective As At') . ':</td>
+ <td><input type="text" required="required" size="11" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="EffectiveDate" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td>
+ </tr>
+ </table>
+ <br />
+ <div class="centre">
+ <input type="submit" name="PrintPDF" value="'. _('Print PDF'). '" />
+ </div>
+ </div>
+ </form>';
}
include('includes/footer.inc');
@@ -376,4 +382,4 @@
$PageNumber++;
}
-?>
+?>
\ No newline at end of file
Modified: trunk/PDFPrintLabel.php
===================================================================
--- trunk/PDFPrintLabel.php 2013-07-30 07:39:19 UTC (rev 6164)
+++ trunk/PDFPrintLabel.php 2013-07-30 10:30:51 UTC (rev 6165)
@@ -280,7 +280,7 @@
echo '<table class="selection">';
echo '<tr>
<td>' . _('Label to print') . ':</td>
- <td><select name="LabelID">';
+ <td><select required="required" autofocus="autofocus" name="LabelID">';
$LabelResult = DB_query("SELECT labelid, description FROM labels",$db);
while ($LabelRow = DB_fetch_array($LabelResult)){
@@ -335,10 +335,11 @@
echo '<option value="' . $myrow['currabrev'] . '">' . $myrow['country'] . ' - ' .$myrow['currency'] . '</option>';
}
}
- echo '</select></td></tr>';
-
- echo '<tr><td>' . _('Effective As At') . ':</td>';
- echo '<td><input type="text" size="11" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="EffectiveDate" value="' . Date($_SESSION['DefaultDateFormat']) . '" />';
+ echo '</select></td>
+ </tr>
+ <tr>
+ <td>' . _('Effective As At') . ':</td>
+ <td><input type="text" size="11" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="EffectiveDate" value="' . Date($_SESSION['DefaultDateFormat']) . '" />';
echo '</td></tr>';
echo '</table>
Modified: trunk/PaymentMethods.php
===================================================================
--- trunk/PaymentMethods.php 2013-07-30 07:39:19 UTC (rev 6164)
+++ trunk/PaymentMethods.php 2013-07-30 10:30:51 UTC (rev 6165)
@@ -265,18 +265,18 @@
}
echo '<tr>
<td>' . _('Payment Method') . ':' . '</td>
- <td><input type="text" '. (in_array('MethodName',$Errors) ? 'class="inputerror"' : '' ) .' name="MethodName" size="30" maxlength="30" value="' . $_POST['MethodName'] . '" /></td>
+ <td><input type="text" '. (in_array('MethodName',$Errors) ? 'class="inputerror"' : '' ) .' name="MethodName" autofocus="autofocus" required="required" size="30" maxlength="30" value="' . $_POST['MethodName'] . '" /></td>
</tr>';
echo '<tr>
<td>' . _('Use For Payments') . ':' . '</td>
- <td><select name="ForPayment">
+ <td><select required="required" name="ForPayment">
<option' . ($_POST['ForPayment'] ? ' selected="selected"' : '') .' value="1">' . _('Yes') . '</option>
<option' . ($_POST['ForPayment'] ? '' : ' selected="selected"') .' value="0">' . _('No') . '</option>
</select></td>
</tr>';
echo '<tr>
<td>' . _('Use For Receipts') . ':' . '</td>
- <td><select name="ForReceipt">
+ <td><select required="required" name="ForReceipt">
<option' . ($_POST['ForReceipt'] ? ' selected="selected"' : '') .' value="1">' . _('Yes') . '</option>
<option' . ($_POST['ForReceipt'] ? '' : ' selected="selected"') .' value="0">' . _('No') . '</option>
</select></td>
Modified: trunk/PaymentTerms.php
===================================================================
--- trunk/PaymentTerms.php 2013-07-30 07:39:19 UTC (rev 6164)
+++ trunk/PaymentTerms.php 2013-07-30 10:30:51 UTC (rev 6165)
@@ -277,13 +277,13 @@
</tr>';
echo '<tr>
<td>' . _('Term Code') . ':</td>
- <td><input type="text" name="TermsIndicator"' . (in_array('TermsIndicator',$Errors) ? 'class="inputerror"' : '' ) .' value="' . $_POST['TermsIndicator'] . '" size="3" maxlength="2" /></td>
+ <td><input type="text" name="TermsIndicator"' . (in_array('TermsIndicator',$Errors) ? 'class="inputerror"' : '' ) .' autofocus="autofocus" required="required" pattern="[0-9a-ZA-Z_]*" title="' . _('A 2 character code to identify this payment term. Any alpha-numeric characters can be used') . '" value="' . $_POST['TermsIndicator'] . '" size="3" maxlength="2" /></td>
</tr>';
}
echo '<tr>
<td>'. _('Terms Description'). ':</td>
- <td><input type="text"' . (in_array('Terms',$Errors) ? 'class="inputerror"' : '' ) .' name="Terms" value="'.$_POST['Terms']. '" size="35" maxlength="40" /></td>
+ <td><input type="text"' . (in_array('Terms',$Errors) ? 'class="inputerror"' : '' ) .' name="Terms" ' . (isset($SelectedTerms)? 'autofocus="autofocus"': '') . ' required="required" value="'.$_POST['Terms']. '" title="' . _('A description of the payment terms is required') . '" size="35" maxlength="40" /></td>
</tr>
<tr>
<td>'._('Due After A Given No. Of Days').':</td>
@@ -294,7 +294,7 @@
echo ' /></td>
</tr>
<tr><td>'._('Days (Or Day In Following Month)').':</td>
- <td><input type="text"' . (in_array('DayNumber',$Errors) ? 'class="inputerror"' : '' ) .' name="DayNumber" class="number" size="4" maxlength="3" value="';
+ <td><input type="text" ' . (in_array('DayNumber',$Errors) ? 'class="inputerror"' : '' ) .' name="DayNumber" required="required" class="integer" size="4" maxlength="3" value="';
if ($DaysBeforeDue !=0) {
echo locale_number_format($DaysBeforeDue,0);
} else {
Modified: trunk/Payments.php
===================================================================
--- trunk/Payments.php 2013-07-30 07:39:19 UTC (rev 6164)
+++ trunk/Payments.php 2013-07-30 10:30:51 UTC (rev 6165)
@@ -743,12 +743,12 @@
echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'] . '?identifier=' . $identifier) . '" method="post">';
echo '<div>';
-echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
+echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />
+ <br />
+ <table class="selection">
+ <tr>
+ <th colspan="4"><h3>' . _('Payment');
-echo '<br /><table class="selection">';
-
-echo '<tr><th colspan="4"><h3>' . _('Payment');
-
if ($_SESSION['PaymentDetail' . $identifier]->SupplierID!=''){
echo ' ' . _('to') . ' ' . $_SESSION['PaymentDetail' . $identifier]->SuppName;
}
@@ -771,7 +771,7 @@
echo '<tr>
<td>' . _('Bank Account') . ':</td>
- <td><select name="BankAccount" onchange="ReloadForm(UpdateHeader)">';
+ <td><select name="BankAccount" autofocus="autofocus" required="required" title="' . _('Select the bank account that the payment has been made from') . '" onchange="ReloadForm(UpdateHeader)">';
if (DB_num_rows($AccountsResults)==0){
echo '</select></td>
@@ -797,13 +797,14 @@
echo '<tr>
<td>' . _('Date Paid') . ':</td>
- <td><input type="text" name="DatePaid" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" maxlength="10" size="11" onchange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . $_SESSION['PaymentDetail' . $identifier]->DatePaid . '" /></td>
+ <td><input type="text" name="DatePaid" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" required="required" maxlength="10" size="11" onchange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . $_SESSION['PaymentDetail' . $identifier]->DatePaid . '" /></td>
</tr>';
if ($_SESSION['PaymentDetail' . $identifier]->SupplierID==''){
- echo '<tr><td>' . _('Currency of Payment') . ':</td>
- <td><select name="Currency" onchange="ReloadForm(UpdateHeader)">';
+ echo '<tr>
+ <td>' . _('Currency of Payment') . ':</td>
+ <td><select name="Currency" required="required" onchange="ReloadForm(UpdateHeader)">';
$SQL = "SELECT currency, currabrev, rate FROM currencies";
$result=DB_query($SQL,$db);
@@ -859,7 +860,7 @@
}
echo '<tr>
<td>' . _('Payment Exchange Rate') . ':</td>
- <td><input class="number" type="text" name="ExRate" maxlength="10" size="12" value="' . $_POST['ExRate'] . '" /></td>
+ <td><input class="number" type="text" name="ExRate" maxlength="10" size="12" title="' . _('The exchange rate between the currency of the bank account currency and the currency of the payment') . '" value="' . $_POST['ExRate'] . '" /></td>
<td>' . $SuggestedExRateText . ' <i>' . _('The exchange rate between the currency of the bank account currency and the currency of the payment') . '. 1 ' . $_SESSION['PaymentDetail' . $identifier]->AccountCurrency . ' = ? ' . $_SESSION['PaymentDetail' . $identifier]->Currency . '</i></td>
</tr>';
}
@@ -876,7 +877,7 @@
}
echo '<tr>
<td>' . _('Functional Exchange Rate') . ':</td>
- <td><input type="text" name="FunctionalExRate" maxlength="10" size="12" value="' . $_POST['FunctionalExRate'] . '" /></td>
+ <td><input type="text" name="FunctionalExRate" maxlength="10" size="12" class="number" title="' . _('The exchange rate between the currency of the business (the functional currency) and the currency of the bank account') . '" value="' . $_POST['FunctionalExRate'] . '" /></td>
<td>' . ' ' . $SuggestedFunctionalExRateText . ' <i>' . _('The exchange rate between the currency of the business (the functional currency) and the currency of the bank account') . '. 1 ' . $_SESSION['CompanyRecord']['currencydefault'] . ' = ? ' . $_SESSION['PaymentDetail' . $identifier]->AccountCurrency . '</i></td>
</tr>';
}
@@ -911,31 +912,27 @@
if (!isset($_POST['Narrative'])) {
$_POST['Narrative']='';
}
-
+if (!isset($_POST['Currency'])){
+ $_POST['Currency'] = $_SESSION['CompanyRecord']['currencydefault'];
+}
echo '<tr>
<td>' . _('Reference / Narrative') . ':</td>
<td colspan="2"><input type="text" name="Narrative" maxlength="80" size="82" value="' . stripslashes($_POST['Narrative'] ) . '" /> ' . _('(Max. length 80 characters)') . '</td>
</tr>
+ <td><input type="hidden" name="PreviousCurrency" value="' . $_POST['Currency'].'" /></td>
+ <td colspan="3"><div class="centre"><input type="submit" name="UpdateHeader" value="' . _('Update'). '" /></div></td>
+ </tr>
+ </table>
+ <br />';
-
- <td><input type="hidden" name="PreviousCurrency" value="'.$_POST['Currency'].'" /></td>
-
-
- <td colspan="3"><div class="centre"><input type="submit" name="UpdateHeader" value="' . _('Update'). '" /></div></td>
- </tr>';
-
-
-echo '</table><br />';
-
-
if ($_SESSION['CompanyRecord']['gllink_creditors']==1 AND $_SESSION['PaymentDetail' . $identifier]->SupplierID==''){
/* Set upthe form for the transaction entry for a GL Payment Analysis item */
echo '<br /><table class="selection">';
- echo '<tr><th colspan="2"><h3>' . _('General Ledger Payment Analysis Entry') . '</h3></th></tr>';
-
- //Select the Tag
echo '<tr>
+ <th colspan="2"><h3>' . _('General Ledger Payment Analysis Entry') . '</h3></th>
+ </tr>
+ <tr>
<td>' . _('Select Tag') . ':</td>
<td><select name="Tag">';
@@ -961,12 +958,13 @@
if (isset($_POST['GLManualCode'])) {
echo '<tr>
<td>' . _('Enter GL Account Manually') . ':</td>
- <td><input type="text" class="number" name="GLManualCode" maxlength="12" size="12" onchange="return inArray(this, GLCode.options,'. "'".'The account code '."'".'+ this.value+ '."'".' doesnt exist'."'".')"' . ' value="'. $_POST['GLManualCode'] .'" /></td>
+ <td><input type="text" name="GLManualCode" maxlength="12" size="12" onchange="return inArray(this, GLCode.options,\'' . _('The account code') . ' \' + this.value + \'' . _('doesnt exist') . '\')" value="'. $_POST['GLManualCode'] .'" /></td>
</tr>';
} else {
echo '<tr>
<td>' . _('Enter GL Account Manually') . ':</td>
- <td><input type="text" class="number" name="GLManualCode" maxlength="12" size="12" onchange="return inArray(this, GLCode.options,'. "'".'The account code '."'".'+ this.value+ '."'".' doesnt exist'."'".')" /></td></tr>';
+ <td><input type="text" name="GLManualCode" maxlength="12" size="12" onchange="return inArray(this, GLCode.options,\'' . _('The account code') . ' \' + this.value + \'' . _('doesnt exist') . '\')" /></td>
+ </tr>';
}
echo '<tr>
@@ -1050,11 +1048,12 @@
if (isset($_POST['GLAmount'])) {
echo '<tr>
<td>' . _('Amount') . ' (' . $_SESSION['PaymentDetail' . $identifier]->Currency . '):</td>
- <td><input type="text" name="GLAmount" maxlength="12" size="12" class="number" value="' . $_POST['GLAmount'] . '" /></td>
+ <td><input type="text" required="required" name="GLAmount" maxlength="12" size="12" class="number" value="' . $_POST['GLAmount'] . '" /></td>
</tr>';
} else {
- echo '<tr><td>' . _('Amount') . ' (' . $_SESSION['PaymentDetail' . $identifier]->Currency . '):</td>
- <td><input type="text" name="GLAmount" maxlength="12" size="12" class="number" /></td>
+ echo '<tr>
+ <td>' . _('Amount') . ' (' . $_SESSION['PaymentDetail' . $identifier]->Currency . '):</td>
+ <td><input type="text" required="required" name="GLAmount" maxlength="12" size="12" class="number" value="0" /></td>
</tr>';
}
@@ -1134,4 +1133,4 @@
echo '</form>';
include('includes/footer.inc');
-?>
+?>
\ No newline at end of file
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2013-07-30 07:39:19 UTC (rev 6164)
+++ trunk/doc/Change.log 2013-07-30 10:30:51 UTC (rev 6165)
@@ -1,5 +1,6 @@
webERP Change Log
+29/7/13 Serge Gélinas: Profit and loss now has option to show all accounts and by default just shows those with a balance
25/7/13 Serge Gélinas: Balance sheet now has option to show all accounts and by default just shows those with a balance
24/7/13 Exson: Fixed that empty password should be allowed. Reported by Tim.
24/7/13 Exson: Add the html5 mark for some input fields in WWW_Users.php.
|