|
From: <ex...@us...> - 2016-07-22 00:46:53
|
Revision: 7570
http://sourceforge.net/p/web-erp/reponame/7570
Author: exsonqu
Date: 2016-07-22 00:46:50 +0000 (Fri, 22 Jul 2016)
Log Message:
-----------
22/07/16 Exson: Add empty check for internal request to avoid empty request creating in InternalStockRequest.php.
Modified Paths:
--------------
trunk/InternalStockRequest.php
trunk/doc/Change.log
Modified: trunk/InternalStockRequest.php
===================================================================
--- trunk/InternalStockRequest.php 2016-07-09 03:17:59 UTC (rev 7569)
+++ trunk/InternalStockRequest.php 2016-07-22 00:46:50 UTC (rev 7570)
@@ -59,7 +59,8 @@
}
}
-if (isset($_POST['Submit'])) {
+if (isset($_POST['Submit']) AND (!empty($_SESSION['Request']->LineItems))) {
+
DB_Txn_Begin();
$InputError=0;
if ($_SESSION['Request']->Department=='') {
@@ -133,6 +134,8 @@
include('includes/footer.inc');
unset($_SESSION['Request']);
exit;
+} elseif(isset($_POST['Submit'])) {
+ prnMsg(_('There are no items added to this request'),'error');
}
echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/supplier.png" title="' . _('Dispatch') .
@@ -275,24 +278,24 @@
</tr>';
$k=0;
-
-foreach ($_SESSION['Request']->LineItems as $LineItems) {
-
- if ($k==1){
- echo '<tr class="EvenTableRows">';
- $k=0;
- } else {
- echo '<tr class="OddTableRows">';
- $k++;
+if (isset($_SESSION['Request']->LineItems)) {
+ foreach ($_SESSION['Request']->LineItems as $LineItems) {
+ if ($k==1){
+ echo '<tr class="EvenTableRows">';
+ $k=0;
+ } else {
+ echo '<tr class="OddTableRows">';
+ $k++;
+ }
+ echo '<td>' . $LineItems->LineNumber . '</td>
+ <td>' . $LineItems->StockID . '</td>
+ <td>' . $LineItems->ItemDescription . '</td>
+ <td class="number">' . locale_number_format($LineItems->Quantity, $LineItems->DecimalPlaces) . '</td>
+ <td>' . $LineItems->UOM . '</td>
+ <td><a href="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Edit='.$LineItems->LineNumber.'">' . _('Edit') . '</a></td>
+ <td><a href="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete='.$LineItems->LineNumber.'">' . _('Delete') . '</a></td>
+ </tr>';
}
- echo '<td>' . $LineItems->LineNumber . '</td>
- <td>' . $LineItems->StockID . '</td>
- <td>' . $LineItems->ItemDescription . '</td>
- <td class="number">' . locale_number_format($LineItems->Quantity, $LineItems->DecimalPlaces) . '</td>
- <td>' . $LineItems->UOM . '</td>
- <td><a href="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Edit='.$LineItems->LineNumber.'">' . _('Edit') . '</a></td>
- <td><a href="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete='.$LineItems->LineNumber.'">' . _('Delete') . '</a></td>
- </tr>';
}
echo '</table>
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2016-07-09 03:17:59 UTC (rev 7569)
+++ trunk/doc/Change.log 2016-07-22 00:46:50 UTC (rev 7570)
@@ -1,4 +1,5 @@
webERP Change Log
+22/07/16 Exson: Add empty check for internal request to avoid empty request creating in InternalStockRequest.php.
09/07/16 Exson: Fixed the utf8 character print incorrect of pdf file in class.pdf.php.
08/07/16 Exson: Fixed the transaction atomicity bug by change table lock to row lock in SQL_CommonFunctions.inc.
08/07/16 Exson: Fixed the bug that when bank account or currency changes the functional rate or exrate unchanged with suggested rate in Payments.php.
|