- modules/fotolab updated imagej to current version & some cod fixes to make it work
[care2x.git] / Care2007 / modules / weberp / GoodsReceivedControlled.php
blobdeb627f834c7c1d9f66b86a2d00ff62aa9637187
1 <?php
2 /* $Revision: 1.13 $ */
3 include('includes/DefinePOClass.php');
4 include('includes/DefineSerialItems.php');
6 $PageSecurity = 11;
8 include('includes/session.inc');
10 $title = _('Receive Controlled Items');
11 /* Session started in header.inc for password checking and authorisation level check */
12 include('includes/header.inc');
14 if (!isset($_SESSION['PO'])) {
15 /* This page can only be called with a purchase order number for receiving*/
16 echo '<CENTER><A HREF="' . $rootpath . '/PO_SelectOSPurchOrder.php?' . SID . '">'.
17 _('Select a purchase order to receive'). '</A></CENTER><br>';
18 prnMsg( _('This page can only be opened if a purchase order and line item has been selected') . '. ' . _('Please do that first'),'error');
19 include('includes/footer.inc');
20 exit;
23 if ($_GET['LineNo']>0){
24 $LineNo = $_GET['LineNo'];
25 } else if ($_POST['LineNo']>0){
26 $LineNo = $_POST['LineNo'];
27 } else {
28 echo '<CENTER><A HREF="' . $rootpath . '/GoodsReceived.php?' . SID . '">'.
29 _('Select a line Item to Receive').'</A></CENTER>';
30 prnMsg( _('This page can only be opened if a Line Item on a PO has been selected') . '. ' . _('Please do that first'), 'error');
31 include( 'includes/footer.inc');
32 exit;
35 global $LineItem;
36 $LineItem = &$_SESSION['PO']->LineItems[$LineNo];
38 if ($LineItem->Controlled !=1 ){ /*This page only relavent for controlled items */
40 echo '<CENTER><A HREF="' . $rootpath . '/GoodsReceived.php?' . SID . '">'.
41 _('Back to the Purchase Order'). '</A></CENTER>';
42 prnMsg( _('The line being recevied must be controlled as defined in the item defintion'), 'error');
43 include('includes/footer.inc');
44 exit;
47 /********************************************
48 Get the page going....
49 ********************************************/
50 echo '<CENTER>';
52 echo '<BR><A HREF="'.$rootpath.'/GoodsReceived.php?' . SID . '">'. _('Back To Purchase Order'). ' # '. $_SESSION['PO']->OrderNo . '</a>';
54 echo '<BR><FONT SIZE=2><B>'. _('Receive controlled item'). ' '. $LineItem->StockID . ' - ' . $LineItem->ItemDescription .
55 ' ' . _('on order') . ' ' . $_SESSION['PO']->OrderNo . ' ' . _('from') . ' ' . $_SESSION['PO']->SupplierName . '</B></FONT>';
57 /** vars needed by InputSerialItem : **/
58 $LocationOut = $_SESSION['PO']->Location;
59 $ItemMustExist = false;
60 $StockID = $LineItem->StockID;
61 $InOutModifier=1;
62 $ShowExisting = false;
63 include ('includes/InputSerialItems.php');
65 //echo '<BR><INPUT TYPE=SUBMIT NAME=\'AddBatches\' VALUE=\'Enter\'><BR>';
66 //echo '</CENTER>';
67 /*TotalQuantity set inside this include file from the sum of the bundles
68 of the item selected for dispatch */
69 $_SESSION['PO']->LineItems[$LineItem->LineNo]->ReceiveQty = $TotalQuantity;
71 include( 'includes/footer.inc');