|
From: <ex...@us...> - 2016-07-27 07:03:30
|
Revision: 7573
http://sourceforge.net/p/web-erp/reponame/7573
Author: exsonqu
Date: 2016-07-27 07:03:27 +0000 (Wed, 27 Jul 2016)
Log Message:
-----------
27/07/16 Exson: Add error proof to avoid a blank credit note issued without any items credited or freight charge input in Credit_Invoice.php.
Modified Paths:
--------------
trunk/Credit_Invoice.php
trunk/doc/Change.log
Modified: trunk/Credit_Invoice.php
===================================================================
--- trunk/Credit_Invoice.php 2016-07-25 08:13:03 UTC (rev 7572)
+++ trunk/Credit_Invoice.php 2016-07-27 07:03:27 UTC (rev 7573)
@@ -219,14 +219,24 @@
$myrow = DB_fetch_array($NewDispatchTaxProvResult);
$_SESSION['CreditItems' . $identifier]->DispatchTaxProvince = $myrow['taxprovinceid'];
+
+ $TotalQtyCredited = 0;
foreach($_SESSION['CreditItems' . $identifier]->LineItems as $LineItem) {
$_SESSION['CreditItems' . $identifier]->GetTaxes($LineItem->LineNumber);
+ $TotalQtyCredited += $LineItem->QtyDispatched;
}
}
if(isset($_POST['ChargeFreightCost'])) {
$_SESSION['CreditItems' . $identifier]->FreightCost = filter_number_format($_POST['ChargeFreightCost']);
+ if (($TotalQtyCredit + abs($_POST['ChargeFreightCost']))<=0) {
+ prnMsg(_('There are no item quantity or freight charge input'),'error');
+ if (isset($_POST['ProcessCredit'])) {
+ unset($_POST['ProcessCredit']);
+ }
+ }
+
}
if($_SESSION['SalesmanLogin'] == '') {
if(isset($_POST['SalesPerson'])) {
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2016-07-25 08:13:03 UTC (rev 7572)
+++ trunk/doc/Change.log 2016-07-27 07:03:27 UTC (rev 7573)
@@ -1,4 +1,6 @@
webERP Change Log
+
+27/07/16 Exson: Add error proof to avoid a blank credit note issued without any items credited or freight charge input in Credit_Invoice.php.
25/07/16 Exson: Add InternalStockRequestInquiry.php script.
22/07/16 Exson: Make items search limited to the sales orders and if search result is 1 show the result immediately in SelectSalesOrder.php
22/07/16 Exson: Add empty check for internal request to avoid empty request creating in InternalStockRequest.php.
|