|
From: <dai...@us...> - 2011-04-05 10:14:31
|
Revision: 4539
http://web-erp.svn.sourceforge.net/web-erp/?rev=4539&view=rev
Author: daintree
Date: 2011-04-05 10:14:24 +0000 (Tue, 05 Apr 2011)
Log Message:
-----------
various
Modified Paths:
--------------
trunk/PDFOrdersInvoiced.php
trunk/SuppCreditGRNs.php
trunk/SupplierInvoice.php
trunk/doc/Change.log.html
trunk/includes/LanguageSetup.php
Modified: trunk/PDFOrdersInvoiced.php
===================================================================
--- trunk/PDFOrdersInvoiced.php 2011-04-04 10:14:30 UTC (rev 4538)
+++ trunk/PDFOrdersInvoiced.php 2011-04-05 10:14:24 UTC (rev 4539)
@@ -2,20 +2,17 @@
/* $Id$*/
-/* $Revision: 1.10 $ */
-
-//$PageSecurity = 3;
include ('includes/session.inc');
$title = _('Orders Invoiced Report');
$InputError=0;
-if (isset($_POST['FromDate']) AND !is_date($_POST['FromDate'])){
+if (isset($_POST['FromDate']) AND !Is_date($_POST['FromDate'])){
$msg = _('The date from must be specified in the format') . ' ' . $DefaultDateFormat;
$InputError=1;
unset($_POST['FromDate']);
}
-if (isset($_POST['ToDate']) AND !is_date($_POST['ToDate'])){
+if (isset($_POST['ToDate']) AND !Is_date($_POST['ToDate'])){
$msg = _('The date to must be specified in the format') . ' ' . $DefaultDateFormat;
$InputError=1;
unset($_POST['ToDate']);
@@ -36,9 +33,9 @@
echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' '
. _('Orders Invoiced Report') . '</p>';
- echo "<form method='post' action='" . $_SERVER['PHP_SELF'] . '?' . sid . "'>";
+ echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">';
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 '<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>';
@@ -47,24 +44,24 @@
$result = DB_query($sql,$db);
- echo "<select name='CategoryID'>";
- echo "<option selected value='All'>" . _('Over All Categories');
+ echo '<select name="CategoryID">';
+ echo '<option selected value="All">' . _('Over All Categories') . '</option>';
while ($myrow=DB_fetch_array($result)){
- echo '<option VALUE=' . $myrow['categoryid'] . '>' . $myrow['categorydescription'];
+ echo '<option value=' . $myrow['categoryid'] . '>' . $myrow['categorydescription'] . '</option>';
}
echo '</select></td></tr>';
- echo '<tr><td>' . _('Inventory Location') . ":</td><td><select name='Location'>";
- echo "<option selected VALUE='All'>" . _('All Locations');
+ echo '<tr><td>' . _('Inventory Location') . ':</td><td><select name="Location">';
+ echo '<option 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'];
+ echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>';
}
echo '</select></td></tr>';
- echo "</table><br><div class='centre'><input type=submit name='Go' VALUE='" . _('Create PDF') . "'></div>";
+ echo '</table><br /><div class="centre"><input type="submit" name="Go" value="' . _('Create PDF') . '"></div>';
include('includes/footer.inc');
exit;
@@ -262,7 +259,7 @@
include('includes/header.inc');
prnMsg(_('An error occurred getting the orders details'),'',_('Database Error'));
if ($debug==1){
- prnMsg( _('The SQL used to get the orders that failed was') . '<br>' . $sql, '',_('Database Error'));
+ prnMsg( _('The SQL used to get the orders that failed was') . '<br />' . $sql, '',_('Database Error'));
}
include ('includes/footer.inc');
exit;
@@ -270,7 +267,7 @@
include('includes/header.inc');
prnMsg(_('There were no orders found in the database within the period from') . ' ' . $_POST['FromDate'] . ' ' . _('to') . ' '. $_POST['ToDate'] . '. ' . _('Please try again selecting a different date range'), 'warn');
if ($debug==1) {
- prnMsg(_('The SQL that returned no rows was') . '<br>' . $sql,'',_('Database Error'));
+ prnMsg(_('The SQL that returned no rows was') . '<br />' . $sql,'',_('Database Error'));
}
include('includes/footer.inc');
exit;
@@ -424,18 +421,7 @@
$LeftOvers = $pdf->addTextWrap($Left_Margin+260,$YPos,100,$FontSize,_('GRAND TOTAL INVOICED'), 'right');
$LeftOvers = $pdf->addTextWrap($Left_Margin+360,$YPos,80,$FontSize,number_format($AccumTotalInv,2), 'right');
$YPos -= ($line_height);
-/* UldisN
-$pdfcode = $pdf->output();
-$len = strlen($pdfcode);
-header('Content-type: application/pdf');
-header('Content-Length: ' . $len);
-header('Content-Disposition: inline; filename=OrdersInvoiced.pdf');
-header('Expires: 0');
-header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
-header('Pragma: public');
-$pdf->stream();
-*/
-$pdf->OutputD($_SESSION['DatabaseName'] . '_OrdersInvoiced_' . date('Y-m-d') . '.pdf');//UldisN
-$pdf->__destruct(); //UldisN
+$pdf->OutputD($_SESSION['DatabaseName'] . '_OrdersInvoiced_' . date('Y-m-d') . '.pdf');
+$pdf->__destruct();
?>
\ No newline at end of file
Modified: trunk/SuppCreditGRNs.php
===================================================================
--- trunk/SuppCreditGRNs.php 2011-04-04 10:14:30 UTC (rev 4538)
+++ trunk/SuppCreditGRNs.php 2011-04-05 10:14:24 UTC (rev 4539)
@@ -6,7 +6,6 @@
the SuppTrans class contains an array of GRNs objects - containing details of GRNs for invoicing and also
an array of GLCodes objects - only used if the AP - GL link is effective */
-//$PageSecurity = 5;
include('includes/DefineSuppTransClass.php');
/* Session started in header.inc for password checking and authorisation level check */
@@ -21,7 +20,7 @@
if (!isset($_SESSION['SuppTrans'])){
prnMsg(_('To enter a supplier transactions the supplier must first be selected from the supplier selection screen') . ', ' . _('then the link to enter a supplier credit note must be clicked on'),'info');
- echo '<br><a href="' . $rootpath . '/SelectSupplier.php?' . SID .'">' . _('Select A Supplier to Enter a Transaction For') . '</a>';
+ echo '<br /><a href="' . $rootpath . '/SelectSupplier.php">' . _('Select A Supplier to Enter a Transaction For') . '</a>';
include('includes/footer.inc');
exit;
/*It all stops here if there aint no supplier selected and credit note initiated ie $_SESSION['SuppTrans'] started off*/
@@ -42,21 +41,21 @@
if ($InputError==False){
$_SESSION['SuppTrans']->Add_GRN_To_Trans($_POST['GRNNumber'],
- $_POST['PODetailItem'],
- $_POST['ItemCode'],
- $_POST['ItemDescription'],
- $_POST['QtyRecd'],
- $_POST['Prev_QuantityInv'],
- $_POST['This_QuantityCredited'],
- $_POST['OrderPrice'],
- $_POST['ChgPrice'],
- $Complete,
- $_POST['StdCostUnit'],
- $_POST['ShiptRef'],
- $_POST['JobRef'],
- $_POST['GLCode'],
- $_POST['PONo'],
- $_POST['AssetID']);
+ $_POST['PODetailItem'],
+ $_POST['ItemCode'],
+ $_POST['ItemDescription'],
+ $_POST['QtyRecd'],
+ $_POST['Prev_QuantityInv'],
+ $_POST['This_QuantityCredited'],
+ $_POST['OrderPrice'],
+ $_POST['ChgPrice'],
+ $Complete,
+ $_POST['StdCostUnit'],
+ $_POST['ShiptRef'],
+ $_POST['JobRef'],
+ $_POST['GLCode'],
+ $_POST['PONo'],
+ $_POST['AssetID']);
}
}
@@ -71,11 +70,11 @@
echo '<table cellpadding=0 class=selection>';
echo '<tr><th colspan=6><font size=3 color=navy>' . _('Credits Against Goods Received Selected') . '</font></th></tr>';
$TableHeader = '<tr><th>' . _('GRN') . '</th>
- <th>' . _('Item Code') . '</th>
- <th>' . _('Description') . '</th>
- <th>' . _('Quantity Credited') . '</th>
- <th>' . _('Price Credited in') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th>
- <th>' . _('Line Value in') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th></tr>';
+ <th>' . _('Item Code') . '</th>
+ <th>' . _('Description') . '</th>
+ <th>' . _('Quantity Credited') . '</th>
+ <th>' . _('Price Credited in') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th>
+ <th>' . _('Line Value in') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th></tr>';
echo $TableHeader;
@@ -101,9 +100,13 @@
}
}
-echo '<tr><td colspan=5 class=number><font size=2 color=navy>' . _('Total Value Credited Against Goods') . ':</font></td>
- <td class=number><font size=2 color=navy><U>' . number_format($TotalValueCharged,2) . '</U></font></td></tr>';
-echo '</table><br /><div class=centre><a href="' . $rootpath . '/SupplierCredit.php?' . SID . '">' . _('Back to Credit Note Entry') . '</a></div>';
+echo '<tr>
+ <td colspan=5 class=number><font size=2 color=navy>' . _('Total Value Credited Against Goods') . ':</font></td>
+ <td class=number><font size=2 color=navy><U>' . number_format($TotalValueCharged,2) . '</U></font></td>
+ </tr>';
+echo '</table>
+ <br />
+ <div class=centre><a href="' . $rootpath . '/SupplierCredit.php?">' . _('Back to Credit Note Entry') . '</a></div>';
/* Now get all the GRNs for this supplier from the database
after the date entered */
@@ -112,156 +115,155 @@
}
$SQL = "SELECT grnno,
- purchorderdetails.orderno,
- purchorderdetails.unitprice,
- grns.itemcode, grns.deliverydate,
- grns.itemdescription,
- grns.qtyrecd,
- grns.quantityinv,
- purchorderdetails.stdcostunit,
- purchorderdetails.assetid
- FROM grns,
- purchorderdetails
- WHERE grns.podetailitem=purchorderdetails.podetailitem AND
- grns.supplierid ='" . $_SESSION['SuppTrans']->SupplierID . "' AND
- grns.deliverydate >= '" . FormatDateForSQL($_POST['Show_Since']) . "'
- ORDER BY grns.grnno";
+ purchorderdetails.orderno,
+ purchorderdetails.unitprice,
+ grns.itemcode, grns.deliverydate,
+ grns.itemdescription,
+ grns.qtyrecd,
+ grns.quantityinv,
+ purchorderdetails.stdcostunit,
+ purchorderdetails.assetid
+ FROM grns INNER JOIN purchorderdetails
+ ON grns.podetailitem=purchorderdetails.podetailitem
+ WHERE grns.supplierid ='" . $_SESSION['SuppTrans']->SupplierID . "' AND
+ grns.deliverydate >= '" . FormatDateForSQL($_POST['Show_Since']) . "'
+ ORDER BY grns.grnno";
$GRNResults = DB_query($SQL,$db);
if (DB_num_rows($GRNResults)==0){
- prnMsg(_('There are no goods received records for') . ' ' . $_SESSION['SuppTrans']->SupplierName . '<br> ' . _('To enter a credit against goods received') . ', ' . _('the goods must first be received using the link below to select purchase orders to receive'),'info');
- echo '<p><a href="' . $rootpath . '/PO_SelectOSPurchOrder.php?' . SID . 'SupplierID=' . $_SESSION['SuppTrans']->SupplierID . '">' . _('Select Purchase Orders to Receive') . '</a>';
- include('includes/footer.inc');
- exit;
+ prnMsg(_('There are no goods received records for') . ' ' . $_SESSION['SuppTrans']->SupplierName . ' ' . _('since') . ' ' . $_POST['Show_Since'] . '<br /> ' . _('To enter a credit against goods received') . ', ' . _('the goods must first be received using the link below to select purchase orders to receive'),'info');
+ echo '<p><a href="' . $rootpath . '/PO_SelectOSPurchOrder.php?SupplierID=' . $_SESSION['SuppTrans']->SupplierID . '">' . _('Select Purchase Orders to Receive') . '</a>';
}
+
/*Set up a table to show the GRNs outstanding for selection */
-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 '<br /><table cellpadding=2 colspan=7 class=selection>';
-echo '<tr<th colspan=10><font size=3 color=navy>' . _('Show Goods Received Since') . ': </font>';
-echo '<input type=Text name="Show_Since" maxlength=11 size=12 class=date alt='.$_SESSION['DefaultDateFormat'].' value="' . $_POST['Show_Since'] . '"><font size=3 color=navy> ';
+echo '<tr><th colspan=10><font size=3 color=navy>' . _('Show Goods Received Since') . ': </font>';
+echo '<input type=Text name="Show_Since" maxlength=11 size=12 class=date alt='.$_SESSION['DefaultDateFormat'].' value="' . $_POST['Show_Since'] . '" /><input type="submit" name="FindGRNs" value="' . _('Display GRNs') . '" /><font size=3 color=navy> ';
echo _('From') . ' ' . $_SESSION['SuppTrans']->SupplierName . '</font></th></tr>';
-$TableHeader = '<tr><th>' . _('GRN') . '</th>
- <th>' . _('Order') . '</th>
- <th>' . _('Item Code') . '</th>
- <th>' . _('Description') . '</th>
- <th>' . _('Delivered') . '</th>
- <th>' . _('Total Qty') . '<br>' . _('Received') . '</th>
- <th>' . _('Qty Already') . '<br>' . _('credit noted') . '</th>
- <th>' . _('Qty Yet') . '<br>' . _('To credit note') . '</th>
- <th>' . _('Order Price') . '<br>' . $_SESSION['SuppTrans']->CurrCode . '</th>
- <th>' . _('Line Value') . '<br>' . _('In') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th>
- </tr>';
-
-echo $TableHeader;
-
-$i=0;
-while ($myrow=DB_fetch_array($GRNResults)){
-
- $GRNAlreadyOnCredit = False;
-
- foreach ($_SESSION['SuppTrans']->GRNs as $EnteredGRN){
- if ($EnteredGRN->GRNNo == $myrow['grnno']) {
- $GRNAlreadyOnCredit = True;
+if (DB_num_rows($GRNResults)>0){
+ $TableHeader = '<tr><th>' . _('GRN') . '</th>
+ <th>' . _('Order') . '</th>
+ <th>' . _('Item Code') . '</th>
+ <th>' . _('Description') . '</th>
+ <th>' . _('Delivered') . '</th>
+ <th>' . _('Total Qty') . '<br />' . _('Received') . '</th>
+ <th>' . _('Qty Already') . '<br />' . _('credit noted') . '</th>
+ <th>' . _('Qty Yet') . '<br />' . _('To credit note') . '</th>
+ <th>' . _('Order Price') . '<br />' . $_SESSION['SuppTrans']->CurrCode . '</th>
+ <th>' . _('Line Value') . '<br />' . _('In') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th>
+ </tr>';
+
+ echo $TableHeader;
+
+ $i=0;
+ while ($myrow=DB_fetch_array($GRNResults)){
+
+ $GRNAlreadyOnCredit = False;
+
+ foreach ($_SESSION['SuppTrans']->GRNs as $EnteredGRN){
+ if ($EnteredGRN->GRNNo == $myrow['grnno']) {
+ $GRNAlreadyOnCredit = True;
+ }
}
- }
- if ($GRNAlreadyOnCredit == False){
- echo '<tr><td><input type=Submit name="GRNNo" Value="' . $myrow['grnno'] . '"></td>
- <td>' . $myrow['orderno'] . '</td>
- <td>' . $myrow['itemcode'] . '</td>
- <td>' . $myrow['itemdescription'] . '</td>
- <td>' . ConvertSQLDate($myrow['deliverydate']) . '</td>
- <td class=number>' . number_format($myrow['qtyrecd'],2) . '</td>
- <td class=number>' . number_format($myrow['quantityinv'],2) . '</td>
- <td class=number>' . number_format($myrow['qtyrecd'] - $myrow['quantityinv'],2) . '</td>
- <td class=number>' . number_format($myrow['unitprice'],2) . '</td>
- <td class=number>' . number_format($myrow['unitprice']*($myrow['qtyrecd'] - $myrow['quantityinv']),2) . '</td>
- </tr>';
- $i++;
- if ($i>15){
- $i=0;
- echo $TableHeader;
+ if ($GRNAlreadyOnCredit == False){
+ echo '<tr><td><input type=Submit name="GRNNo" Value="' . $myrow['grnno'] . '"></td>
+ <td>' . $myrow['orderno'] . '</td>
+ <td>' . $myrow['itemcode'] . '</td>
+ <td>' . $myrow['itemdescription'] . '</td>
+ <td>' . ConvertSQLDate($myrow['deliverydate']) . '</td>
+ <td class=number>' . number_format($myrow['qtyrecd'],2) . '</td>
+ <td class=number>' . number_format($myrow['quantityinv'],2) . '</td>
+ <td class=number>' . number_format($myrow['qtyrecd'] - $myrow['quantityinv'],2) . '</td>
+ <td class=number>' . number_format($myrow['unitprice'],2) . '</td>
+ <td class=number>' . number_format($myrow['unitprice']*($myrow['qtyrecd'] - $myrow['quantityinv']),2) . '</td>
+ </tr>';
+ $i++;
+ if ($i>15){
+ $i=0;
+ echo $TableHeader;
+ }
}
}
-}
-
-echo '</table>';
-
-if (isset($_POST['GRNNo']) AND $_POST['GRNNo']!=''){
-
- $SQL = "SELECT grnno,
- grns.podetailitem,
- purchorderdetails.orderno,
- purchorderdetails.unitprice,
- purchorderdetails.glcode,
- grns.itemcode,
- grns.deliverydate,
- grns.itemdescription,
- grns.quantityinv,
- grns.qtyrecd,
- grns.qtyrecd - grns.quantityinv
- AS qtyostdg,
- purchorderdetails.stdcostunit,
- purchorderdetails.shiptref,
- purchorderdetails.jobref,
- shipments.closed,
- purchorderdetails.assetid
- FROM grns,
- purchorderdetails
- LEFT JOIN shipments ON purchorderdetails.shiptref=shipments.shiptref
- WHERE grns.podetailitem=purchorderdetails.podetailitem AND
- grns.grnno='" .$_POST['GRNNo'] . "'";
- $GRNEntryResult = DB_query($SQL,$db);
- $myrow = DB_fetch_array($GRNEntryResult);
-
- echo '<br /><table class=selection>';
- echo '<tr><th colspan=6><font size=3 color=navy>' . _('GRN Selected For Adding To A Suppliers Credit Note') . '</font></th></tr>';
- echo '<tr><th>' . _('GRN') . '</th>
- <th>' . _('Item') . '</th>
- <th>' . _('Quantity') . '<br>' . _('Outstanding') . '</th>
- <th>' . _('Quantity') . '<br>' . _('credited') . '</th>
- <th>' . _('Order') . '<br>' . _('Price') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th>
- <th>' . _('Credit') . '<br>' . _('Price') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th>
- </tr>';
-
- echo '<tr><td>' . $_POST['GRNNo'] . '</td>
- <td>' . $myrow['itemcode'] . ' ' . $myrow['itemdescription'] . '</td>
- <td class=number>' . number_format($myrow['qtyostdg'],2) . '</td>
- <td><input type=Text Name="This_QuantityCredited" Value=' . $myrow['qtyostdg'] . ' size=11 maxlength=10></td>
- <td class=number>' . $myrow['unitprice'] . '</td>
- <td><input type=Text Name="ChgPrice" Value=' . $myrow['unitprice'] . ' size=11 maxlength=10></td>
- </tr>';
+
echo '</table>';
-
- if ($myrow['closed']==1){ /*Shipment is closed so pre-empt problems later by warning the user - need to modify the order first */
- echo '<input type=hidden name="ShiptRef" Value="">';
- prnMsg(_('Unfortunately the shipment that this purchase order line item was allocated to has been closed') . ' - ' . _('if you add this item to the transaction then no shipments will not be updated') . '. ' . _('If you wish to allocate the order line item to a different shipment the order must be modified first'),'error');
- } else {
- echo '<input type=hidden name="ShiptRef" Value="' . $myrow['shiptref'] . '">';
+
+ if (isset($_POST['GRNNo']) AND $_POST['GRNNo']!=''){
+
+ $SQL = "SELECT grnno,
+ grns.podetailitem,
+ purchorderdetails.orderno,
+ purchorderdetails.unitprice,
+ purchorderdetails.glcode,
+ grns.itemcode,
+ grns.deliverydate,
+ grns.itemdescription,
+ grns.quantityinv,
+ grns.qtyrecd,
+ grns.qtyrecd - grns.quantityinv
+ AS qtyostdg,
+ purchorderdetails.stdcostunit,
+ purchorderdetails.shiptref,
+ purchorderdetails.jobref,
+ shipments.closed,
+ purchorderdetails.assetid
+ FROM grns,
+ purchorderdetails
+ LEFT JOIN shipments ON purchorderdetails.shiptref=shipments.shiptref
+ WHERE grns.podetailitem=purchorderdetails.podetailitem AND
+ grns.grnno='" .$_POST['GRNNo'] . "'";
+ $GRNEntryResult = DB_query($SQL,$db);
+ $myrow = DB_fetch_array($GRNEntryResult);
+
+ echo '<br /><table class=selection>';
+ echo '<tr><th colspan=6><font size=3 color=navy>' . _('GRN Selected For Adding To A Suppliers Credit Note') . '</font></th></tr>';
+ echo '<tr><th>' . _('GRN') . '</th>
+ <th>' . _('Item') . '</th>
+ <th>' . _('Quantity') . '<br />' . _('Outstanding') . '</th>
+ <th>' . _('Quantity') . '<br />' . _('credited') . '</th>
+ <th>' . _('Order') . '<br />' . _('Price') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th>
+ <th>' . _('Credit') . '<br />' . _('Price') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th>
+ </tr>';
+
+ echo '<tr><td>' . $_POST['GRNNo'] . '</td>
+ <td>' . $myrow['itemcode'] . ' ' . $myrow['itemdescription'] . '</td>
+ <td class=number>' . number_format($myrow['qtyostdg'],2) . '</td>
+ <td><input type=Text Name="This_QuantityCredited" Value=' . $myrow['qtyostdg'] . ' size=11 maxlength=10></td>
+ <td class=number>' . $myrow['unitprice'] . '</td>
+ <td><input type=Text Name="ChgPrice" Value=' . $myrow['unitprice'] . ' size=11 maxlength=10></td>
+ </tr>';
+ echo '</table>';
+
+ if ($myrow['closed']==1){ /*Shipment is closed so pre-empt problems later by warning the user - need to modify the order first */
+ echo '<input type=hidden name="ShiptRef" Value="">';
+ prnMsg(_('Unfortunately the shipment that this purchase order line item was allocated to has been closed') . ' - ' . _('if you add this item to the transaction then no shipments will not be updated') . '. ' . _('If you wish to allocate the order line item to a different shipment the order must be modified first'),'error');
+ } else {
+ echo '<input type=hidden name="ShiptRef" Value="' . $myrow['shiptref'] . '">';
+ }
+
+ echo '<br /><div class=centre><input type=Submit Name="AddGRNToTrans" Value="' . _('Add to Credit Note') . '"></div>';
+
+
+ echo '<input type=hidden name="GRNNumber" value=' . $_POST['GRNNo'] . '>';
+ echo '<input type=hidden name="ItemCode" value="' . $myrow['itemcode'] . '">';
+ echo '<input type=hidden name="ItemDescription" value="' . $myrow['itemdescription'] . '">';
+ echo '<input type=hidden name="QtyRecd" value=' . $myrow['qtyrecd'] . '>';
+ echo '<input type=hidden name="Prev_QuantityInv" value=' . $myrow['quantityinv'] . '>';
+ echo '<input type=hidden name="OrderPrice" value=' . $myrow['unitprice'] . '>';
+ echo '<input type=hidden name="StdCostUnit" value=' . $myrow['stdcostunit'] . '>';
+
+ echo '<input type=hidden name="JobRef" Value="' . $myrow['jobref'] . '">';
+ echo '<input type=hidden name="GLCode" Value="' . $myrow['glcode'] . '">';
+ echo '<input type=hidden name="PODetailItem" Value="' . $myrow['podetailitem'] . '">';
+ echo '<input type=hidden name="PONo" Value="' . $myrow['orderno'] . '">';
+ echo '<input type=hidden name="AssetID" Value="' . $myrow['assetid'] . '">';
}
-
- echo '<br /><div class=centre><input type=Submit Name="AddGRNToTrans" Value="' . _('Add to Credit Note') . '"></div>';
-
-
- echo '<input type=hidden name="GRNNumber" value=' . $_POST['GRNNo'] . '>';
- echo '<input type=hidden name="ItemCode" value="' . $myrow['itemcode'] . '">';
- echo '<input type=hidden name="ItemDescription" value="' . $myrow['itemdescription'] . '">';
- echo '<input type=hidden name="QtyRecd" value=' . $myrow['qtyrecd'] . '>';
- echo '<input type=hidden name="Prev_QuantityInv" value=' . $myrow['quantityinv'] . '>';
- echo '<input type=hidden name="OrderPrice" value=' . $myrow['unitprice'] . '>';
- echo '<input type=hidden name="StdCostUnit" value=' . $myrow['stdcostunit'] . '>';
-
- echo '<input type=hidden name="JobRef" Value="' . $myrow['jobref'] . '">';
- echo '<input type=hidden name="GLCode" Value="' . $myrow['glcode'] . '">';
- echo '<input type=hidden name="PODetailItem" Value="' . $myrow['podetailitem'] . '">';
- echo '<input type=hidden name="PONo" Value="' . $myrow['orderno'] . '">';
- echo '<input type=hidden name="AssetID" Value="' . $myrow['assetid'] . '">';
-}
-
+} //end if there were GRNs to select
echo '</form>';
include('includes/footer.inc');
?>
\ No newline at end of file
Modified: trunk/SupplierInvoice.php
===================================================================
--- trunk/SupplierInvoice.php 2011-04-04 10:14:30 UTC (rev 4538)
+++ trunk/SupplierInvoice.php 2011-04-05 10:14:24 UTC (rev 4539)
@@ -562,7 +562,7 @@
$InputError = True;
prnMsg(_('The invoice as entered cannot be processed because the there is no suppliers invoice number or reference entered') . '. ' . _('The supplier invoice number must be entered'),'error');
- } elseif (!is_date( $_SESSION['SuppTrans']->TranDate)){
+ } elseif (!Is_date( $_SESSION['SuppTrans']->TranDate)){
$InputError = True;
prnMsg( _('The invoice as entered cannot be processed because the invoice date entered is not in the format') . ' ' . $_SESSION['DefaultDateFormat'],'error');
Modified: trunk/doc/Change.log.html
===================================================================
--- trunk/doc/Change.log.html 2011-04-04 10:14:30 UTC (rev 4538)
+++ trunk/doc/Change.log.html 2011-04-05 10:14:24 UTC (rev 4539)
@@ -1,5 +1,8 @@
<p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p>
<p />
+<p>5/4/11 Tim: includes/LanguageSetup.php - discovered solution to Turkish character set problem!!</p>
+<p>5/4/11 Phil: couple of is_date functions left over from experiment to see if changing fixed Turkish - now removed from SupplierInvoice.php and PDFOrdersInvoiced.php</p>
+<p>5/4/11 Phil: SuppCreditGRNs was not showing old GRNs and no way to input an older date</p>
<p>31/3/11 Phil:Fix link to create purchase order from purchasing data link on SelectProduct.php - thanks Brian May for pointing out the bug</p>
<p>31/3/11 Phil: Updated all tranlations from the launchpad site</p>
<p>31/3/11 Tim: Fix to make languages display immediately on change - session.inc moved includes/LanguageSetup.php down</p>
Modified: trunk/includes/LanguageSetup.php
===================================================================
--- trunk/includes/LanguageSetup.php 2011-04-04 10:14:30 UTC (rev 4538)
+++ trunk/includes/LanguageSetup.php 2011-04-05 10:14:24 UTC (rev 4539)
@@ -26,7 +26,11 @@
//This maybe required in some stubborn installations
$Locale = setlocale (LC_ALL, $_SESSION['Language']);
-
+
+ //Turkish seems to be a special case
+ if ($_SESSION['Language']=='tr_TR.utf8') {
+ $Locale = setlocale(LC_CTYPE, 'C');
+ }
//$Locale = setlocale (LC_CTYPE, $_SESSION['Language']);
//$Locale = setlocale (LC_MESSAGES, $_SESSION['Language']);
$Locale = setlocale (LC_NUMERIC, 'en_US'); //currently need all decimal points etc to be as expected on webserver
@@ -37,7 +41,7 @@
//putenv('LANG=$Language_Country');
bindtextdomain ('messages', $PathPrefix . 'locale');
textdomain ('messages');
- bind_textdomain_codeset('messages', 'UTF-8');
+ bind_textdomain_codeset('messages', 'UTF-8');
$locale_info = localeconv();
} else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|