From: <te...@us...> - 2013-01-17 01:54:06
|
Revision: 5793 http://sourceforge.net/p/web-erp/reponame/5793 Author: tehonu Date: 2013-01-17 01:54:03 +0000 (Thu, 17 Jan 2013) Log Message: ----------- Pak Ricard: Send an email to Inventory Manager when there is a balance cancellation on transfer reception to prevent employee fraud. Modified Paths: -------------- trunk/StockLocTransferReceive.php Modified: trunk/StockLocTransferReceive.php =================================================================== --- trunk/StockLocTransferReceive.php 2013-01-15 14:20:25 UTC (rev 5792) +++ trunk/StockLocTransferReceive.php 2013-01-17 01:54:03 UTC (rev 5793) @@ -328,6 +328,15 @@ AND stockid = '". $TrfLine->StockID."'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('Unable to set the quantity received to the quantity shipped to cancel the balance on this transfer line'); $Result = DB_query($sql, $db, $ErrMsg, $DbgMsg, true); + // send an email to the inventory manager about this cancellation (as can lead to employee fraud) + if ($_SESSION['InventoryManagerEmail']!=''){ + $ConfirmationText = _('Cancelled balance at transfer'). ': ' . $_SESSION['Transfer']->TrfID . + ' ' . _('stock code') . ': ' . $TrfLine->StockID . + ' ' . _('by user') . ': ' . $_SESSION['UserID'] . + ' ' . _('at') . ': ' . Date('Y-m-d H:i:s'); + $EmailSubject = _('Cancelled balance at transfer'). ' ' . $_SESSION['Transfer']->TrfID; + mail($_SESSION['InventoryManagerEmail'],$EmailSubject,$ConfirmationText); + } } $i++; } /*end of foreach TransferItem */ |