|
From: <dai...@us...> - 2013-05-01 08:19:37
|
Revision: 5873
http://sourceforge.net/p/web-erp/reponame/5873
Author: daintree
Date: 2013-05-01 08:19:32 +0000 (Wed, 01 May 2013)
Log Message:
-----------
Ricards string GLAccount.php remove numeric trap - fix PO line lead time calculation
Modified Paths:
--------------
trunk/GLAccounts.php
trunk/PO_Items.php
trunk/doc/Change.log
Modified: trunk/GLAccounts.php
===================================================================
--- trunk/GLAccounts.php 2013-04-30 09:02:29 UTC (rev 5872)
+++ trunk/GLAccounts.php 2013-05-01 08:19:32 UTC (rev 5873)
@@ -28,11 +28,8 @@
//first off validate inputs sensible
- if (!is_long((integer)$_POST['AccountCode'])) {
+ if (mb_strlen($_POST['AccountName']) >50) {
$InputError = 1;
- prnMsg(_('The account code must be an integer'),'warn');
- } elseif (mb_strlen($_POST['AccountName']) >50) {
- $InputError = 1;
prnMsg( _('The account name must be fifty characters or less long'),'warn');
}
@@ -234,7 +231,7 @@
} else {
echo '<table class="selection">';
echo '<tr><td>' . _('Account Code') . ':</td>
- <td><input type="text" name="AccountCode" size="11" class="number" maxlength="20" /></td>
+ <td><input type="text" name="AccountCode" size="30" maxlength="30" /></td>
</tr>';
}
Modified: trunk/PO_Items.php
===================================================================
--- trunk/PO_Items.php 2013-04-30 09:02:29 UTC (rev 5872)
+++ trunk/PO_Items.php 2013-05-01 08:19:32 UTC (rev 5873)
@@ -234,7 +234,12 @@
} /* end of the loop round the detail line items on the order */
echo '<p />';
prnMsg(_('Purchase Order') . ' ' . $_SESSION['PO'.$identifier]->OrderNo . ' ' . _('on') . ' ' . $_SESSION['PO'.$identifier]->SupplierName . ' ' . _('has been created'),'success');
+ if ($_SESSION['PO'.$identifier]->AllowPrintPO==1
+ AND ($_SESSION['PO'.$identifier]->Status=='Authorised'
+ OR $_SESSION['PO'.$identifier]->Status=='Printed')){
+ echo '<br /><div class="centre"><a target="_blank" href="'.$RootPath.'/PO_PDFPurchOrder.php?OrderNo=' . $_SESSION['PO'.$identifier]->OrderNo . '">' . _('Print Purchase Order') . '</a></div>';
+ }
} else { /*its an existing order need to update the old order info */
/*Check to see if there are any incomplete lines on the order */
@@ -384,8 +389,10 @@
$Result = DB_Txn_Commit($db);
/* Only show the link to auto receive the order if the user has permission to receive goods and permission to authorise and has authorised the order */
- if ($_SESSION['PO'.$identifier]->Status == 'Authorised' AND in_array($_SESSION['PageSecurityArray']['GoodsReceived.php'], $_SESSION['AllowedPageSecurityTokens'])){
- echo '<a href="SupplierInvoice.php?SupplierID=' . $_SESSION['PO'.$identifier]->SupplierID . '&ReceivePO=' . $_SESSION['PO'.$identifier]->OrderNo . '&DeliveryDate=' . $_SESSION['PO'.$identifier]->DeliveryDate . '">' . _('Receive and Enter Purchase Invoice') . '</a>';
+ if ($_SESSION['PO'.$identifier]->Status == 'Authorised'
+ AND in_array($_SESSION['PageSecurityArray']['GoodsReceived.php'], $_SESSION['AllowedPageSecurityTokens'])){
+
+ echo '<a href="SupplierInvoice.php?SupplierID=' . $_SESSION['PO'.$identifier]->SupplierID . '&ReceivePO=' . $_SESSION['PO'.$identifier]->OrderNo . '&DeliveryDate=' . $_SESSION['PO'.$identifier]->DeliveryDate . '">' . _('Receive and Enter Purchase Invoice') . '</a>';
}
unset($_SESSION['PO'.$identifier]); /*Clear the PO data to allow a newy to be input*/
@@ -634,10 +641,10 @@
$SuppliersPartNo = $PurchRow['suppliers_partno'];
$LeadTime = $PurchRow['leadtime'];
/* Work out the delivery date based on today + lead time
- * if > header DeliveryDate then set DeliveryDate to today + leadtime
- */
+ * if > header DeliveryDate then set DeliveryDate to today + leadtime
+ */
$DeliveryDate = DateAdd(Date($_SESSION['DefaultDateFormat']),'d',$LeadTime);
- if (! Date1GreaterThanDate2($DeliveryDate,$_SESSION['PO'.$identifier]->DeliveryDate)){
+ if (Date1GreaterThanDate2($_SESSION['PO'.$identifier]->DeliveryDate,$DeliveryDate)){
$DeliveryDate = $_SESSION['PO'.$identifier]->DeliveryDate;
}
} else { // no purchasing data setup
@@ -646,10 +653,10 @@
$SupplierDescription = $ItemRow['description'];
$SuppliersUnitOfMeasure = $ItemRow['units'];
$SuppliersPartNo = '';
- $LeadTime = 1;
+ $LeadTime=1;
$DeliveryDate = $_SESSION['PO'.$identifier]->DeliveryDate;
}
-
+
$_SESSION['PO'.$identifier]->add_to_order ($_SESSION['PO'.$identifier]->LinesOnOrder+1,
$ItemCode,
0, /*Serialised */
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2013-04-30 09:02:29 UTC (rev 5872)
+++ trunk/doc/Change.log 2013-05-01 08:19:32 UTC (rev 5873)
@@ -1,11 +1,14 @@
OwebERP Change Log
-04/30/2013 Exson Update the translation file for Chinese simplify locale
-04/30/2013 Exson: Fixed the bug in SystemParameters.php which missing a</select> tag and cannot display the config in $_SESSION correctly. Reported by Tim.
-04/30/3013 Exson: Create a new sql file 4.10-4.11.sql with the smtp setting statement.
-04/29/2013 Exson: Modify the PO_PDFPurchOrder.php to make it suitable for smtp setting.
-29/04/2013 Exson Fixed the smtp does not work for langaguage is change in utf8 code in file of smtp.php and HTMLMimeMail.php.
-29/04/2013 Exson Fixed the db_free_result() error messages due to the query returned a boolean value in SMTPServer.php
+1/5/13 Ricard: GLAccounts.php change error trap that only allows numeric GL accounts as now the chart of accounts can contain text accounts
+1/5/13 Phil: Fix purchase order lead time calculation as reported by MacPhotoBiker on forum
+1/5/13 Phil: Add link to print purchase order after placement as suggested by MacPhotoBiker on forum
+30/4/13 Exson Update the translation file for Chinese simplify locale
+30/4/13 Exson: Fixed the bug in SystemParameters.php which missing a</select> tag and cannot display the config in $_SESSION correctly. Reported by Tim.
+30/4/13 Exson: Create a new sql file 4.10-4.11.sql with the smtp setting statement.
+29/4/13 Exson: Modify the PO_PDFPurchOrder.php to make it suitable for smtp setting.
+29/04/13 Exson Fixed the smtp does not work for langaguage is change in utf8 code in file of smtp.php and HTMLMimeMail.php.
+29/04/13 Exson Fixed the db_free_result() error messages due to the query returned a boolean value in SMTPServer.php
27/4/13 Samudaya: Fixed a bug in PO_Items.php when a line of a purchase order is deleted (other than the last line) and then subsequently a new line is added - the last line of the order is over-written.
27/4/13 Samudaya: PO_Items.php When purchasing a non-stock item (asset), AssetID goes to wrong column in purchorderdetails table (Column name - suppliers_partno). Fixed the bug and now save the AssetID in the correct assetid column.
27/4/13 Samudaya: Fixed the Page Navigation (Go, Previous, Next) problem. This problem occurs there are many assets and display as several pages.
|