-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathGoodsReceivedControlled.php
More file actions
72 lines (57 loc) · 2.65 KB
/
GoodsReceivedControlled.php
File metadata and controls
72 lines (57 loc) · 2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
/* $Revision: 1.15 $ */
include('includes/DefinePOClass.php');
include('includes/DefineSerialItems.php');
$PageSecurity = 11;
include('includes/session.inc');
$title = _('Receive Controlled Items');
/* Session started in header.inc for password checking and authorisation level check */
include('includes/header.inc');
if (!isset($_SESSION['PO'])) {
/* This page can only be called with a purchase order number for receiving*/
echo '<div class="centre"><a href="' . $rootpath . '/PO_SelectOSPurchOrder.php?' . SID . '">'.
_('Select a purchase order to receive'). '</a></div><br>';
prnMsg( _('This page can only be opened if a purchase order and line item has been selected') . '. ' . _('Please do that first'),'error');
include('includes/footer.inc');
exit;
}
if ($_GET['LineNo']>0){
$LineNo = $_GET['LineNo'];
} else if ($_POST['LineNo']>0){
$LineNo = $_POST['LineNo'];
} else {
echo '<div class="centre"><a href="' . $rootpath . '/GoodsReceived.php?' . SID . '">'.
_('Select a line Item to Receive').'</a></div>';
prnMsg( _('This page can only be opened if a Line Item on a PO has been selected') . '. ' . _('Please do that first'), 'error');
include( 'includes/footer.inc');
exit;
}
global $LineItem;
$LineItem = &$_SESSION['PO']->LineItems[$LineNo];
if ($LineItem->Controlled !=1 ){ /*This page only relavent for controlled items */
echo '<div class="centre"><a href="' . $rootpath . '/GoodsReceived.php?' . SID . '">'.
_('Back to the Purchase Order'). '</a></div>';
prnMsg( _('The line being received must be controlled as defined in the item definition'), 'error');
include('includes/footer.inc');
exit;
}
/********************************************
Get the page going....
********************************************/
echo '<div class="centre">';
echo '<br><a href="'.$rootpath.'/GoodsReceived.php?' . SID . '">'. _('Back To Purchase Order'). ' # '. $_SESSION['PO']->OrderNo . '</a>';
echo '<br><font size=2><b>'. _('Receive controlled item'). ' '. $LineItem->StockID . ' - ' . $LineItem->ItemDescription .
' ' . _('on order') . ' ' . $_SESSION['PO']->OrderNo . ' ' . _('from') . ' ' . $_SESSION['PO']->SupplierName . '</b></font></div>';
/** vars needed by InputSerialItem : **/
$LocationOut = $_SESSION['PO']->Location;
$ItemMustExist = false;
$StockID = $LineItem->StockID;
$InOutModifier=1;
$ShowExisting = false;
include ('includes/InputSerialItems.php');
//echo '<br><input type=submit name=\'AddBatches\' VALUE=\'Enter\'><br>';
/*TotalQuantity set inside this include file from the sum of the bundles
of the item selected for dispatch */
$_SESSION['PO']->LineItems[$LineItem->LineNo]->ReceiveQty = $TotalQuantity;
include( 'includes/footer.inc');
?>