From: <tim...@us...> - 2010-06-09 15:11:06
|
Revision: 3487 http://web-erp.svn.sourceforge.net/web-erp/?rev=3487&view=rev Author: tim_schofield Date: 2010-06-09 15:11:00 +0000 (Wed, 09 Jun 2010) Log Message: ----------- Harald: Contracts.php - Fix typo in error message. Modified Paths: -------------- trunk/Contracts.php trunk/doc/Change.log.html Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2010-06-09 14:42:02 UTC (rev 3486) +++ trunk/Contracts.php 2010-06-09 15:11:00 UTC (rev 3487) @@ -135,7 +135,7 @@ echo "<meta http-equiv='Refresh' content='0; url=" . $rootpath . '/Contract_Items.php?' . SID . 'identifier='.$identifier. "'>"; echo '<p>'; prnMsg(_('You should automatically be forwarded to the entry of the Contract line items page') . '. ' . - _('If this does not happen') . ' (' . _('if the browser does not supContractrt META Refresh') . ') ' . + _('If this does not happen') . ' (' . _('if the browser does not support META Refresh') . ') ' . "<a href='$rootpath/Contract_Items.php?" . SID. 'identifier='.$identifier . "'>" . _('click here') . '</a> ' . _('to continue'),'info'); include('includes/footer.inc'); exit; @@ -267,7 +267,7 @@ if (strlen($_ContractST['Keywords'])>0) { //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_ContractST['Keywords']) . '%'; - + $SQL = "SELECT suppliers.CustomerID, suppliers.suppname, suppliers.address1, Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-06-09 14:42:02 UTC (rev 3486) +++ trunk/doc/Change.log.html 2010-06-09 15:11:00 UTC (rev 3487) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>09/06/10 Harald: Contracts.php - Fix typo in error message.</p> <p>09/06/10 Tim: UserSettings.php - Fix sql error for case when password is being updated.</p> <p>08/06/10 Tim: Add option to exclude value information from GRN screen</p> <p>07/06/10 Tim: Various changes to correctly deal with suppliers uom plus layout changes to puirchase orders and goods received notes</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-06-10 19:52:13
|
Revision: 3488 http://web-erp.svn.sourceforge.net/web-erp/?rev=3488&view=rev Author: tim_schofield Date: 2010-06-10 19:52:07 +0000 (Thu, 10 Jun 2010) Log Message: ----------- Tim: GoodsReceived.php - session.inc should come before any calls to gettext _() function. Modified Paths: -------------- trunk/GoodsReceived.php trunk/doc/Change.log.html Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2010-06-09 15:11:00 UTC (rev 3487) +++ trunk/GoodsReceived.php 2010-06-10 19:52:07 UTC (rev 3488) @@ -7,9 +7,9 @@ $PageSecurity = 11; /* Session started in header.inc for password checking and authorisation level check */ +include('includes/session.inc'); include('includes/DefinePOClass.php'); include('includes/DefineSerialItems.php'); -include('includes/session.inc'); include('includes/SQL_CommonFunctions.inc'); if (empty($identifier)) { $identifier=''; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-06-09 15:11:00 UTC (rev 3487) +++ trunk/doc/Change.log.html 2010-06-10 19:52:07 UTC (rev 3488) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>10/06/10 Tim: GoodsReceived.php - session.inc should come before any calls to gettext _() function.</p> <p>09/06/10 Harald: Contracts.php - Fix typo in error message.</p> <p>09/06/10 Tim: UserSettings.php - Fix sql error for case when password is being updated.</p> <p>08/06/10 Tim: Add option to exclude value information from GRN screen</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2010-06-12 08:33:39
|
Revision: 3489 http://web-erp.svn.sourceforge.net/web-erp/?rev=3489&view=rev Author: daintree Date: 2010-06-12 08:33:32 +0000 (Sat, 12 Jun 2010) Log Message: ----------- David Short - fix for Z_ReversePaymentRun.php Modified Paths: -------------- trunk/Contracts.php trunk/Z_ReverseSuppPaymentRun.php trunk/build/make_release.sh trunk/doc/Manual/ManualInventory.html trunk/includes/header.inc Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2010-06-10 19:52:07 UTC (rev 3488) +++ trunk/Contracts.php 2010-06-12 08:33:32 UTC (rev 3489) @@ -13,7 +13,7 @@ } if (isset($_GET['CustomerID'])) { - $_ContractST['Select']=$_GET['CustomerID']; + $_POST['Select']=$_GET['CustomerID']; } include('includes/header.inc'); @@ -42,17 +42,17 @@ $_SESSION['ExistingContract']=0; } -if (isset($_ContractST['Select']) and empty($_ContractST['SupplierContact'])) { +if (isset($_POST['Select']) and empty($_POST['SupplierContact'])) { $sql = "SELECT contact FROM suppliercontacts - WHERE CustomerID='". $_ContractST['Select'] ."'"; + WHERE CustomerID='". $_POST['Select'] ."'"; $SuppCoResult = DB_query($sql,$db); if (DB_num_rows($SuppCoResult)>0) { $myrow = DB_fetch_row($SuppCoResult); - $_ContractST['SupplierContact'] = $myrow[0]; + $_POST['SupplierContact'] = $myrow[0]; } else { - $_ContractST['SupplierContact']=''; + $_POST['SupplierContact']=''; } } @@ -76,7 +76,7 @@ /**/ $_SESSION['RequireSupplierSelection'] = 0; /**/ - $_ContractST['Select'] = $_GET['SelectedCustomer']; + $_POST['Select'] = $_GET['SelectedCustomer']; /** * the item (its item code) that should be purchased @@ -85,39 +85,39 @@ } -if (isset($_ContractST['EnterLines'])){ +if (isset($_POST['EnterLines'])){ /*User hit the button to enter line items - * ensure session variables updated then meta refresh to Contract_Items.php*/ - $_SESSION['Contract'.$identifier]->Location=$_ContractST['StkLocation']; - $_SESSION['Contract'.$identifier]->SupplierContact=$_ContractST['SupplierContact']; - $_SESSION['Contract'.$identifier]->DelAdd1 = $_ContractST['DelAdd1']; - $_SESSION['Contract'.$identifier]->DelAdd2 = $_ContractST['DelAdd2']; - $_SESSION['Contract'.$identifier]->DelAdd3 = $_ContractST['DelAdd3']; - $_SESSION['Contract'.$identifier]->DelAdd4 = $_ContractST['DelAdd4']; - $_SESSION['Contract'.$identifier]->DelAdd5 = $_ContractST['DelAdd5']; - $_SESSION['Contract'.$identifier]->DelAdd6 = $_ContractST['DelAdd6']; - $_SESSION['Contract'.$identifier]->suppDelAdd1 = $_ContractST['suppDelAdd1']; - $_SESSION['Contract'.$identifier]->suppDelAdd2 = $_ContractST['suppDelAdd2']; - $_SESSION['Contract'.$identifier]->suppDelAdd3 = $_ContractST['suppDelAdd3']; - $_SESSION['Contract'.$identifier]->suppDelAdd4 = $_ContractST['suppDelAdd4']; - $_SESSION['Contract'.$identifier]->suppDelAdd5 = $_ContractST['suppDelAdd5']; - $_SESSION['Contract'.$identifier]->supptel= $_ContractST['supptel']; - $_SESSION['Contract'.$identifier]->Initiator = $_ContractST['Initiator']; - $_SESSION['Contract'.$identifier]->RequisitionNo = $_ContractST['Requisition']; - $_SESSION['Contract'.$identifier]->version = $_ContractST['version']; - $_SESSION['Contract'.$identifier]->deliverydate = $_ContractST['deliverydate']; - $_SESSION['Contract'.$identifier]->revised = $_ContractST['revised']; - $_SESSION['Contract'.$identifier]->ExRate = $_ContractST['ExRate']; - $_SESSION['Contract'.$identifier]->Comments = $_ContractST['Comments']; - $_SESSION['Contract'.$identifier]->deliveryby = $_ContractST['deliveryby']; - $_SESSION['Contract'.$identifier]->StatusMessage = $_ContractST['StatComments']; - $_SESSION['Contract'.$identifier]->paymentterms = $_ContractST['paymentterms']; - $_SESSION['Contract'.$identifier]->contact = $_ContractST['Contact']; - $_SESSION['Contract'.$identifier]->tel = $_ContractST['tel']; - $_SESSION['Contract'.$identifier]->Contractrt = $_ContractST['Contractrt']; + $_SESSION['Contract'.$identifier]->Location=$_POST['StkLocation']; + $_SESSION['Contract'.$identifier]->SupplierContact=$_POST['SupplierContact']; + $_SESSION['Contract'.$identifier]->DelAdd1 = $_POST['DelAdd1']; + $_SESSION['Contract'.$identifier]->DelAdd2 = $_POST['DelAdd2']; + $_SESSION['Contract'.$identifier]->DelAdd3 = $_POST['DelAdd3']; + $_SESSION['Contract'.$identifier]->DelAdd4 = $_POST['DelAdd4']; + $_SESSION['Contract'.$identifier]->DelAdd5 = $_POST['DelAdd5']; + $_SESSION['Contract'.$identifier]->DelAdd6 = $_POST['DelAdd6']; + $_SESSION['Contract'.$identifier]->suppDelAdd1 = $_POST['suppDelAdd1']; + $_SESSION['Contract'.$identifier]->suppDelAdd2 = $_POST['suppDelAdd2']; + $_SESSION['Contract'.$identifier]->suppDelAdd3 = $_POST['suppDelAdd3']; + $_SESSION['Contract'.$identifier]->suppDelAdd4 = $_POST['suppDelAdd4']; + $_SESSION['Contract'.$identifier]->suppDelAdd5 = $_POST['suppDelAdd5']; + $_SESSION['Contract'.$identifier]->supptel= $_POST['supptel']; + $_SESSION['Contract'.$identifier]->Initiator = $_POST['Initiator']; + $_SESSION['Contract'.$identifier]->RequisitionNo = $_POST['Requisition']; + $_SESSION['Contract'.$identifier]->version = $_POST['version']; + $_SESSION['Contract'.$identifier]->deliverydate = $_POST['deliverydate']; + $_SESSION['Contract'.$identifier]->revised = $_POST['revised']; + $_SESSION['Contract'.$identifier]->ExRate = $_POST['ExRate']; + $_SESSION['Contract'.$identifier]->Comments = $_POST['Comments']; + $_SESSION['Contract'.$identifier]->deliveryby = $_POST['deliveryby']; + $_SESSION['Contract'.$identifier]->StatusMessage = $_POST['StatComments']; + $_SESSION['Contract'.$identifier]->paymentterms = $_POST['paymentterms']; + $_SESSION['Contract'.$identifier]->contact = $_POST['Contact']; + $_SESSION['Contract'.$identifier]->tel = $_POST['tel']; + $_SESSION['Contract'.$identifier]->Contractrt = $_POST['Contractrt']; - if (isset($_ContractST['RePrint']) and $_ContractST['RePrint']==1){ + if (isset($_POST['RePrint']) and $_POST['RePrint']==1){ $_SESSION['Contract'.$identifier]->AllowPrintContract=1; @@ -129,7 +129,7 @@ $updateResult = DB_query($sql,$db,$ErrMsg); } else { - $_ContractST['RePrint'] = 0; + $_POST['RePrint'] = 0; } echo "<meta http-equiv='Refresh' content='0; url=" . $rootpath . '/Contract_Items.php?' . SID . 'identifier='.$identifier. "'>"; @@ -151,7 +151,7 @@ include ('includes/Contract_ReadInOrder.inc'); } -if (isset($_ContractST['CancelOrder']) AND $_ContractST['CancelOrder']!='') { +if (isset($_POST['CancelOrder']) AND $_POST['CancelOrder']!='') { /*The cancel button on the header screen - to delete order */ $OK_to_delete = 1; //assume this in the first instance @@ -174,7 +174,7 @@ $emailresult=DB_query($emailsql, $db); $emailrow=DB_fetch_array($emailresult); $StatusComment=date($_SESSION['DefaultDateFormat']). - ' - Order Cancelled by <a href="mailto:'.$emailrow['email'].'">'.$_SESSION['UserID'].'</a><br>'.$_ContractST['statcommentscomplete']; + ' - Order Cancelled by <a href="mailto:'.$emailrow['email'].'">'.$_SESSION['UserID'].'</a><br>'.$_POST['statcommentscomplete']; unset($_SESSION['Contract'.$identifier]->LineItems); unset($_SESSION['Contract'.$identifier]); $_SESSION['Contract'.$identifier] = new PurchOrder; @@ -232,7 +232,7 @@ } -if (isset($_ContractST['ChangeSupplier'])) { +if (isset($_POST['ChangeSupplier'])) { /* change supplier only allowed with appropriate permissions - * button only displayed to modify is AccessLevel >10 @@ -246,7 +246,7 @@ $_SESSION['RequireSupplierSelection']=1; $_SESSION['Contract'.$identifier]->Stat = PurchOrder::STATUS_PENDING; $StatusComment=$date.' - Supplier changed by <a href="mailto:'.$emailrow['email'].'">'.$_SESSION['UserID']. - '</a> - '.$_ContractST['StatComments'].'<br>'.$_ContractST['statcommentscomplete']; + '</a> - '.$_POST['StatComments'].'<br>'.$_POST['statcommentscomplete']; $_SESSION['Contract'.$identifier]->StatComments=$StatusComment; } else { echo '<br><br>'; @@ -256,17 +256,17 @@ } $msg=''; -if (isset($_ContractST['SearchSuppliers'])){ +if (isset($_POST['SearchSuppliers'])){ - if (strlen($_ContractST['Keywords'])>0 AND strlen($_SESSION['Contract'.$identifier]->CustomerID)>0) { + if (strlen($_POST['Keywords'])>0 AND strlen($_SESSION['Contract'.$identifier]->CustomerID)>0) { $msg=_('Supplier name keywords have been used in preference to the supplier code extract entered'); } - if ($_ContractST['Keywords']=='' AND $_ContractST['SuppCode']=='') { + if ($_POST['Keywords']=='' AND $_POST['SuppCode']=='') { $msg=_('At least one Supplier Name keyword OR an extract of a Supplier Code must be entered for the search'); } else { - if (strlen($_ContractST['Keywords'])>0) { + if (strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces - $SearchString = '%' . str_replace(' ', '%', $_ContractST['Keywords']) . '%'; + $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; $SQL = "SELECT suppliers.CustomerID, suppliers.suppname, @@ -281,7 +281,7 @@ WHERE suppliers.suppname " . LIKE . " '$SearchString' ORDER BY suppliers.suppname"; - } elseif (strlen($_ContractST['SuppCode'])>0){ + } elseif (strlen($_POST['SuppCode'])>0){ $SQL = "SELECT suppliers.CustomerID, suppliers.suppname, suppliers.address1, @@ -292,7 +292,7 @@ suppliers.address6, suppliers.currcode FROM suppliers - WHERE suppliers.CustomerID " . LIKE . " '%" . $_ContractST['SuppCode'] . "%' + WHERE suppliers.CustomerID " . LIKE . " '%" . $_POST['SuppCode'] . "%' ORDER BY suppliers.CustomerID"; } @@ -301,7 +301,7 @@ if (DB_num_rows($result_SuppSelect)==1){ $myrow=DB_fetch_array($result_SuppSelect); - $_ContractST['Select'] = $myrow['CustomerID']; + $_POST['Select'] = $myrow['CustomerID']; } elseif (DB_num_rows($result_SuppSelect)==0){ prnMsg( _('No supplier records contain the selected text') . ' - ' . _('please alter your search criteria and try again'),'info'); @@ -311,37 +311,37 @@ // added by Hudson -if((!isset($_ContractST['SearchSuppliers']) or $_ContractST['SearchSuppliers']=='' ) AND +if((!isset($_POST['SearchSuppliers']) or $_POST['SearchSuppliers']=='' ) AND (isset($_SESSION['Contract'.$identifier]->CustomerID) AND $_SESSION['Contract'.$identifier]->CustomerID!='')){ /*The session variables are set but the form variables have been lost * need to restore the form variables from the session */ - $_ContractST['CustomerID']=$_SESSION['Contract'.$identifier]->CustomerID; - $_ContractST['SupplierName']=$_SESSION['Contract'.$identifier]->SupplierName; - $_ContractST['CurrCode'] = $_SESSION['Contract'.$identifier]->CurrCode; - $_ContractST['ExRate'] = $_SESSION['Contract'.$identifier]->ExRate; - $_ContractST['paymentterms'] = $_SESSION['Contract'.$identifier]->paymentterms; - $_ContractST['DelAdd1']=$_SESSION['Contract'.$identifier]->DelAdd1; - $_ContractST['DelAdd2']=$_SESSION['Contract'.$identifier]->DelAdd2; - $_ContractST['DelAdd3']=$_SESSION['Contract'.$identifier]->DelAdd3; - $_ContractST['DelAdd4']=$_SESSION['Contract'.$identifier]->DelAdd4; - $_ContractST['DelAdd5']=$_SESSION['Contract'.$identifier]->DelAdd5; - $_ContractST['DelAdd6']=$_SESSION['Contract'.$identifier]->DelAdd6; - $_ContractST['suppDelAdd1']=$_SESSION['Contract'.$identifier]->suppDelAdd1; - $_ContractST['suppDelAdd2']=$_SESSION['Contract'.$identifier]->suppDelAdd2; - $_ContractST['suppDelAdd3']=$_SESSION['Contract'.$identifier]->suppDelAdd3; - $_ContractST['suppDelAdd4']=$_SESSION['Contract'.$identifier]->suppDelAdd4; - $_ContractST['suppDelAdd5']=$_SESSION['Contract'.$identifier]->suppDelAdd5; - $_ContractST['suppDelAdd6']=$_SESSION['Contract'.$identifier]->suppDelAdd6; + $_POST['CustomerID']=$_SESSION['Contract'.$identifier]->CustomerID; + $_POST['SupplierName']=$_SESSION['Contract'.$identifier]->SupplierName; + $_POST['CurrCode'] = $_SESSION['Contract'.$identifier]->CurrCode; + $_POST['ExRate'] = $_SESSION['Contract'.$identifier]->ExRate; + $_POST['paymentterms'] = $_SESSION['Contract'.$identifier]->paymentterms; + $_POST['DelAdd1']=$_SESSION['Contract'.$identifier]->DelAdd1; + $_POST['DelAdd2']=$_SESSION['Contract'.$identifier]->DelAdd2; + $_POST['DelAdd3']=$_SESSION['Contract'.$identifier]->DelAdd3; + $_POST['DelAdd4']=$_SESSION['Contract'.$identifier]->DelAdd4; + $_POST['DelAdd5']=$_SESSION['Contract'.$identifier]->DelAdd5; + $_POST['DelAdd6']=$_SESSION['Contract'.$identifier]->DelAdd6; + $_POST['suppDelAdd1']=$_SESSION['Contract'.$identifier]->suppDelAdd1; + $_POST['suppDelAdd2']=$_SESSION['Contract'.$identifier]->suppDelAdd2; + $_POST['suppDelAdd3']=$_SESSION['Contract'.$identifier]->suppDelAdd3; + $_POST['suppDelAdd4']=$_SESSION['Contract'.$identifier]->suppDelAdd4; + $_POST['suppDelAdd5']=$_SESSION['Contract'.$identifier]->suppDelAdd5; + $_POST['suppDelAdd6']=$_SESSION['Contract'.$identifier]->suppDelAdd6; } -if (isset($_ContractST['Select'])) { +if (isset($_POST['Select'])) { /* will only be true if page called from supplier selection form * or set because only one supplier record returned from a search * so parse the $Select string into supplier code and branch code */ - $sql='SELECT currcode FROM suppliers where CustomerID="'.$_ContractST['Select'].'"'; + $sql='SELECT currcode FROM suppliers where CustomerID="'.$_POST['Select'].'"'; $result=DB_query($sql,$db); $myrow=DB_fetch_array($result); $SupplierCurrCode=$myrow['currcode']; @@ -367,9 +367,9 @@ suppliers.Contractrt FROM suppliers INNER JOIN currencies ON suppliers.currcode=currencies.currabrev - WHERE CustomerID='" . $_ContractST['Select'] . "'"; + WHERE CustomerID='" . $_POST['Select'] . "'"; - $ErrMsg = _('The supplier record of the supplier selected') . ': ' . $_ContractST['Select'] . ' ' . + $ErrMsg = _('The supplier record of the supplier selected') . ': ' . $_POST['Select'] . ' ' . _('cannot be retrieved because'); $DbgMsg = _('The SQL used to retrieve the supplier details and failed was'); $result =DB_query($sql,$db,$ErrMsg,$DbgMsg); @@ -378,33 +378,33 @@ // added for suppliers lookup fields if (($authmyrow=DB_fetch_array($authresult) and $authmyrow[0]==0 ) ) { - $_ContractST['SupplierName'] = $myrow[0]; - $_ContractST['CurrCode'] = $myrow[1]; - $_ContractST['ExRate'] = $myrow[2]; - $_ContractST['paymentterms']= $myrow[3]; - $_ContractST['suppDelAdd1'] = $myrow[4]; - $_ContractST['suppDelAdd2'] = $myrow[5]; - $_ContractST['suppDelAdd3'] = $myrow[6]; - $_ContractST['suppDelAdd4'] = $myrow[7]; - $_ContractST['suppDelAdd5'] = $myrow[8]; - $_ContractST['suppDelAdd6'] = $myrow[9]; - $_ContractST['supptel'] = $myrow[10]; - $_ContractST['Contractrt'] = $myrow[11]; + $_POST['SupplierName'] = $myrow[0]; + $_POST['CurrCode'] = $myrow[1]; + $_POST['ExRate'] = $myrow[2]; + $_POST['paymentterms']= $myrow[3]; + $_POST['suppDelAdd1'] = $myrow[4]; + $_POST['suppDelAdd2'] = $myrow[5]; + $_POST['suppDelAdd3'] = $myrow[6]; + $_POST['suppDelAdd4'] = $myrow[7]; + $_POST['suppDelAdd5'] = $myrow[8]; + $_POST['suppDelAdd6'] = $myrow[9]; + $_POST['supptel'] = $myrow[10]; + $_POST['Contractrt'] = $myrow[11]; - $_SESSION['Contract'.$identifier]->CustomerID = $_ContractST['Select']; + $_SESSION['Contract'.$identifier]->CustomerID = $_POST['Select']; $_SESSION['RequireSupplierSelection'] = 0; - $_SESSION['Contract'.$identifier]->SupplierName = $_ContractST['SupplierName']; - $_SESSION['Contract'.$identifier]->CurrCode = $_ContractST['CurrCode']; - $_SESSION['Contract'.$identifier]->ExRate = $_ContractST['ExRate']; - $_SESSION['Contract'.$identifier]->paymentterms = $_ContractST['paymentterms']; - $_SESSION['Contract'.$identifier]->suppDelAdd1 = $_ContractST['suppDelAdd1']; - $_SESSION['Contract'.$identifier]->suppDelAdd2 = $_ContractST['suppDelAdd2']; - $_SESSION['Contract'.$identifier]->suppDelAdd3 = $_ContractST['suppDelAdd3']; - $_SESSION['Contract'.$identifier]->suppDelAdd4 = $_ContractST['suppDelAdd4']; - $_SESSION['Contract'.$identifier]->suppDelAdd5 = $_ContractST['suppDelAdd5']; - $_SESSION['Contract'.$identifier]->suppDelAdd6 = $_ContractST['suppDelAdd6']; - $_SESSION['Contract'.$identifier]->supptel = $_ContractST['supptel']; - $_SESSION['Contract'.$identifier]->Contractrt = $_ContractST['Contractrt']; + $_SESSION['Contract'.$identifier]->SupplierName = $_POST['SupplierName']; + $_SESSION['Contract'.$identifier]->CurrCode = $_POST['CurrCode']; + $_SESSION['Contract'.$identifier]->ExRate = $_POST['ExRate']; + $_SESSION['Contract'.$identifier]->paymentterms = $_POST['paymentterms']; + $_SESSION['Contract'.$identifier]->suppDelAdd1 = $_POST['suppDelAdd1']; + $_SESSION['Contract'.$identifier]->suppDelAdd2 = $_POST['suppDelAdd2']; + $_SESSION['Contract'.$identifier]->suppDelAdd3 = $_POST['suppDelAdd3']; + $_SESSION['Contract'.$identifier]->suppDelAdd4 = $_POST['suppDelAdd4']; + $_SESSION['Contract'.$identifier]->suppDelAdd5 = $_POST['suppDelAdd5']; + $_SESSION['Contract'.$identifier]->suppDelAdd6 = $_POST['suppDelAdd6']; + $_SESSION['Contract'.$identifier]->supptel = $_POST['supptel']; + $_SESSION['Contract'.$identifier]->Contractrt = $_POST['Contractrt']; } else { prnMsg( _('You do not have the authority to raise Contracts for '). $SupplierName.'. '._('Please Consult your system administrator for more information').'. ' @@ -416,7 +416,7 @@ // end of added for suppliers lookup fields } else { - $_ContractST['Select'] = $_SESSION['Contract'.$identifier]->CustomerID; + $_POST['Select'] = $_SESSION['Contract'.$identifier]->CustomerID; $sql = "SELECT suppliers.suppname, suppliers.currcode, suppliers.paymentterms, @@ -430,9 +430,9 @@ suppliers.Contractrt FROM suppliers INNER JOIN currencies ON suppliers.currcode=currencies.currabrev - WHERE CustomerID='" . $_ContractST['Select'] . "'"; + WHERE CustomerID='" . $_POST['Select'] . "'"; - $ErrMsg = _('The supplier record of the supplier selected') . ': ' . $_ContractST['Select'] . ' ' . + $ErrMsg = _('The supplier record of the supplier selected') . ': ' . $_POST['Select'] . ' ' . _('cannot be retrieved because'); $DbgMsg = _('The SQL used to retrieve the supplier details and failed was'); $result =DB_query($sql,$db,$ErrMsg,$DbgMsg); @@ -443,32 +443,32 @@ // added for suppliers lookup fields if (!isset($_SESSION['Contract'.$identifier])) { - $_ContractST['SupplierName'] = $myrow[0]; - $_ContractST['CurrCode'] = $myrow[1]; - $_ContractST['paymentterms']= $myrow[2]; - $_ContractST['suppDelAdd1'] = $myrow[3]; - $_ContractST['suppDelAdd2'] = $myrow[4]; - $_ContractST['suppDelAdd3'] = $myrow[5]; - $_ContractST['suppDelAdd4'] = $myrow[6]; - $_ContractST['suppDelAdd5'] = $myrow[7]; - $_ContractST['suppDelAdd6'] = $myrow[8]; - $_ContractST['supptel'] = $myrow[9]; - $_ContractST['Contractrt'] = $myrow[10]; + $_POST['SupplierName'] = $myrow[0]; + $_POST['CurrCode'] = $myrow[1]; + $_POST['paymentterms']= $myrow[2]; + $_POST['suppDelAdd1'] = $myrow[3]; + $_POST['suppDelAdd2'] = $myrow[4]; + $_POST['suppDelAdd3'] = $myrow[5]; + $_POST['suppDelAdd4'] = $myrow[6]; + $_POST['suppDelAdd5'] = $myrow[7]; + $_POST['suppDelAdd6'] = $myrow[8]; + $_POST['supptel'] = $myrow[9]; + $_POST['Contractrt'] = $myrow[10]; - $_SESSION['Contract'.$identifier]->CustomerID = $_ContractST['Select']; + $_SESSION['Contract'.$identifier]->CustomerID = $_POST['Select']; $_SESSION['RequireSupplierSelection'] = 0; - $_SESSION['Contract'.$identifier]->SupplierName = $_ContractST['SupplierName']; - $_SESSION['Contract'.$identifier]->CurrCode = $_ContractST['CurrCode']; - $_SESSION['Contract'.$identifier]->ExRate = $_ContractST['ExRate']; - $_SESSION['Contract'.$identifier]->paymentterms = $_ContractST['paymentterms']; - $_SESSION['Contract'.$identifier]->suppDelAdd1 = $_ContractST['suppDelAdd1']; - $_SESSION['Contract'.$identifier]->suppDelAdd2 = $_ContractST['suppDelAdd2']; - $_SESSION['Contract'.$identifier]->suppDelAdd3 = $_ContractST['suppDelAdd3']; - $_SESSION['Contract'.$identifier]->suppDelAdd4 = $_ContractST['suppDelAdd4']; - $_SESSION['Contract'.$identifier]->suppDelAdd5 = $_ContractST['suppDelAdd5']; - $_SESSION['Contract'.$identifier]->suppDelAdd6 = $_ContractST['suppDelAdd6']; - $_SESSION['Contract'.$identifier]->supptel = $_ContractST['supptel']; - $_SESSION['Contract'.$identifier]->Contractrt = $_ContractST['Contractrt']; + $_SESSION['Contract'.$identifier]->SupplierName = $_POST['SupplierName']; + $_SESSION['Contract'.$identifier]->CurrCode = $_POST['CurrCode']; + $_SESSION['Contract'.$identifier]->ExRate = $_POST['ExRate']; + $_SESSION['Contract'.$identifier]->paymentterms = $_POST['paymentterms']; + $_SESSION['Contract'.$identifier]->suppDelAdd1 = $_POST['suppDelAdd1']; + $_SESSION['Contract'.$identifier]->suppDelAdd2 = $_POST['suppDelAdd2']; + $_SESSION['Contract'.$identifier]->suppDelAdd3 = $_POST['suppDelAdd3']; + $_SESSION['Contract'.$identifier]->suppDelAdd4 = $_POST['suppDelAdd4']; + $_SESSION['Contract'.$identifier]->suppDelAdd5 = $_POST['suppDelAdd5']; + $_SESSION['Contract'.$identifier]->suppDelAdd6 = $_POST['suppDelAdd6']; + $_SESSION['Contract'.$identifier]->supptel = $_POST['supptel']; + $_SESSION['Contract'.$identifier]->Contractrt = $_POST['Contractrt']; // end of added for suppliers lookup fields } } @@ -655,28 +655,28 @@ /*Set up form for entry of order header stuff */ - if (!isset($_ContractST['LookupDeliveryAddress']) and (!isset($_ContractST['StkLocation']) or $_ContractST['StkLocation']) + if (!isset($_POST['LookupDeliveryAddress']) and (!isset($_POST['StkLocation']) or $_POST['StkLocation']) AND (isset($_SESSION['Contract'.$identifier]->Location) AND $_SESSION['Contract'.$identifier]->Location != '')) { /* The session variables are set but the form variables have * been lost -- * need to restore the form variables from the session */ - $_ContractST['StkLocation']=$_SESSION['Contract'.$identifier]->Location; - $_ContractST['SupplierContact']=$_SESSION['Contract'.$identifier]->SupplierContact; - $_ContractST['DelAdd1']=$_SESSION['Contract'.$identifier]->DelAdd1; - $_ContractST['DelAdd2']=$_SESSION['Contract'.$identifier]->DelAdd2; - $_ContractST['DelAdd3']=$_SESSION['Contract'.$identifier]->DelAdd3; - $_ContractST['DelAdd4']=$_SESSION['Contract'.$identifier]->DelAdd4; - $_ContractST['DelAdd5']=$_SESSION['Contract'.$identifier]->DelAdd5; - $_ContractST['DelAdd6']=$_SESSION['Contract'.$identifier]->DelAdd6; - $_ContractST['Initiator']=$_SESSION['Contract'.$identifier]->Initiator; - $_ContractST['Requisition']=$_SESSION['Contract'.$identifier]->RequisitionNo; - $_ContractST['version']=$_SESSION['Contract'.$identifier]->version; - $_ContractST['deliverydate']=$_SESSION['Contract'.$identifier]->deliverydate; - $_ContractST['revised']=$_SESSION['Contract'.$identifier]->revised; - $_ContractST['ExRate']=$_SESSION['Contract'.$identifier]->ExRate; - $_ContractST['Comments']=$_SESSION['Contract'.$identifier]->Comments; - $_ContractST['deliveryby']=$_SESSION['Contract'.$identifier]->deliveryby; - $_ContractST['paymentterms']=$_SESSION['Contract'.$identifier]->paymentterms; + $_POST['StkLocation']=$_SESSION['Contract'.$identifier]->Location; + $_POST['SupplierContact']=$_SESSION['Contract'.$identifier]->SupplierContact; + $_POST['DelAdd1']=$_SESSION['Contract'.$identifier]->DelAdd1; + $_POST['DelAdd2']=$_SESSION['Contract'.$identifier]->DelAdd2; + $_POST['DelAdd3']=$_SESSION['Contract'.$identifier]->DelAdd3; + $_POST['DelAdd4']=$_SESSION['Contract'.$identifier]->DelAdd4; + $_POST['DelAdd5']=$_SESSION['Contract'.$identifier]->DelAdd5; + $_POST['DelAdd6']=$_SESSION['Contract'.$identifier]->DelAdd6; + $_POST['Initiator']=$_SESSION['Contract'.$identifier]->Initiator; + $_POST['Requisition']=$_SESSION['Contract'.$identifier]->RequisitionNo; + $_POST['version']=$_SESSION['Contract'.$identifier]->version; + $_POST['deliverydate']=$_SESSION['Contract'.$identifier]->deliverydate; + $_POST['revised']=$_SESSION['Contract'.$identifier]->revised; + $_POST['ExRate']=$_SESSION['Contract'.$identifier]->ExRate; + $_POST['Comments']=$_SESSION['Contract'.$identifier]->Comments; + $_POST['deliveryby']=$_SESSION['Contract'.$identifier]->deliveryby; + $_POST['paymentterms']=$_SESSION['Contract'.$identifier]->paymentterms; } // move apart by Hudson @@ -701,39 +701,39 @@ if (isset($_GET['ModifyContractNo']) && $_GET['ModifyContractNo'] != '') { $_SESSION['Contract'.$identifier]->version += 1; - $_ContractST['version'] = $_SESSION['Contract'.$identifier]->version; + $_POST['version'] = $_SESSION['Contract'.$identifier]->version; } elseif (isset($_SESSION['Contract'.$identifier]->version) and $_SESSION['Contract'.$identifier]->version != '') { - $_ContractST['version'] = $_SESSION['Contract'.$identifier]->version; + $_POST['version'] = $_SESSION['Contract'.$identifier]->version; } else { - $_ContractST['version']='1'; + $_POST['version']='1'; } - if (!isset($_ContractST['deliverydate'])) { - $_ContractST['deliverydate']= date($_SESSION['DefaultDateFormat']); + if (!isset($_POST['deliverydate'])) { + $_POST['deliverydate']= date($_SESSION['DefaultDateFormat']); } echo '<tr><td>' . _('Version'). ' #' . ":</td><td><input type='hidden' name='version' size=16 maxlength=15 - value='" . $_ContractST['version'] . "'>".$_ContractST['version']."</td></tr>"; + value='" . $_POST['version'] . "'>".$_POST['version']."</td></tr>"; echo '<tr><td>' . _('Revised') . ":</td><td><input type='hidden' name='revised' size=11 maxlength=15 value=" . $date . '>'.$date.'</td></tr>'; echo '<tr><td>' . _('Delivery Date') . ":</td><td><input type='text' class=date alt='".$_SESSION['DefaultDateFormat']. - "' name='deliverydate' size=11 value=" . $_ContractST['deliverydate'] . '>'."</td></tr>"; + "' name='deliverydate' size=11 value=" . $_POST['deliverydate'] . '>'."</td></tr>"; - if (!isset($_ContractST['Initiator'])) { - $_ContractST['Initiator'] = $_SESSION['UserID']; - $_ContractST['Requisition'] = ''; + if (!isset($_POST['Initiator'])) { + $_POST['Initiator'] = $_SESSION['UserID']; + $_POST['Requisition'] = ''; } echo '<tr><td>' . _('Initiated By') . ":</td> <td><input type='hidden' name='Initiator' size=11 maxlength=10 value=" . - $_ContractST['Initiator'] . ">".$_ContractST['Initiator']."</td></tr>"; + $_POST['Initiator'] . ">".$_POST['Initiator']."</td></tr>"; echo '<tr><td>' . _('Requisition Ref') . ":</td><td><input type='text' name='Requisition' size=16 - maxlength=15 value=" . $_ContractST['Requisition'] . '></td></tr>'; + maxlength=15 value=" . $_POST['Requisition'] . '></td></tr>'; // echo '<tr><td>' . _('Exchange Rate') . ":</td> -// <td><input type=TEXT name='ExRate' size=16 maxlength=15 VALUE=" . $_ContractST['ExRate'] . '></td> -// echo "<input type='hidden' name='ExRate' size=16 maxlength=15 value=" . $_ContractST['ExRate'] . "></td>"; +// <td><input type=TEXT name='ExRate' size=16 maxlength=15 VALUE=" . $_POST['ExRate'] . '></td> +// echo "<input type='hidden' name='ExRate' size=16 maxlength=15 value=" . $_POST['ExRate'] . "></td>"; // </tr>'; echo '<tr><td>' . _('Date Printed') . ':</td><td>'; @@ -745,12 +745,12 @@ echo _('Not yet printed'); } - if (isset($_ContractST['AllowRePrint'])) { + if (isset($_POST['AllowRePrint'])) { $sql='UPDATE purchorders SET allowprint=1 WHERE orderno='.$_SESSION['Contract'.$identifier]->OrderNo; $result=DB_query($sql, $db); } - if ($_SESSION['Contract'.$identifier]->AllowPrintContract==0 AND empty($_ContractST['RePrint'])){ + if ($_SESSION['Contract'.$identifier]->AllowPrintContract==0 AND empty($_POST['RePrint'])){ echo '<tr><td>' . _('Allow Reprint') . ":</td><td><select name='RePrint' onChange='ReloadForm(form1.AllowRePrint)'><option selected value=0>" . _('No') . "<option value=1>" . _('Yes') . '</select></td>'; echo '<td><input type=submit name="AllowRePrint" value="Update"></td></tr>'; @@ -838,8 +838,8 @@ $LocnResult = DB_query($sql,$db); while ($LocnRow=DB_fetch_array($LocnResult)){ - if (isset($_ContractST['StkLocation']) and ($_ContractST['StkLocation'] == $LocnRow['loccode'] OR - ($_ContractST['StkLocation']=='' AND $LocnRow['loccode']==$_SESSION['UserStockLocation']))){ + if (isset($_POST['StkLocation']) and ($_POST['StkLocation'] == $LocnRow['loccode'] OR + ($_POST['StkLocation']=='' AND $LocnRow['loccode']==$_SESSION['UserStockLocation']))){ echo "<option selected value='" . $LocnRow['loccode'] . "'>" . $LocnRow['locationname']; } else { echo "<option value='" . $LocnRow['loccode'] . "'>" . $LocnRow['locationname']; @@ -853,9 +853,9 @@ /* If this is the first time * the form loaded set up defaults */ - if (!isset($_ContractST['StkLocation']) OR $_ContractST['StkLocation']==''){ + if (!isset($_POST['StkLocation']) OR $_POST['StkLocation']==''){ - $_ContractST['StkLocation'] = $_SESSION['UserStockLocation']; + $_POST['StkLocation'] = $_SESSION['UserStockLocation']; $sql = "SELECT deladd1, deladd2, @@ -866,30 +866,30 @@ tel, contact FROM locations - WHERE loccode='" . $_ContractST['StkLocation'] . "'"; + WHERE loccode='" . $_POST['StkLocation'] . "'"; $LocnAddrResult = DB_query($sql,$db); if (DB_num_rows($LocnAddrResult)==1){ $LocnRow = DB_fetch_row($LocnAddrResult); - $_ContractST['DelAdd1'] = $LocnRow[0]; - $_ContractST['DelAdd2'] = $LocnRow[1]; - $_ContractST['DelAdd3'] = $LocnRow[2]; - $_ContractST['DelAdd4'] = $LocnRow[3]; - $_ContractST['DelAdd5'] = $LocnRow[4]; - $_ContractST['DelAdd6'] = $LocnRow[5]; - $_ContractST['tel'] = $LocnRow[6]; - $_ContractST['Contact'] = $LocnRow[7]; + $_POST['DelAdd1'] = $LocnRow[0]; + $_POST['DelAdd2'] = $LocnRow[1]; + $_POST['DelAdd3'] = $LocnRow[2]; + $_POST['DelAdd4'] = $LocnRow[3]; + $_POST['DelAdd5'] = $LocnRow[4]; + $_POST['DelAdd6'] = $LocnRow[5]; + $_POST['tel'] = $LocnRow[6]; + $_POST['Contact'] = $LocnRow[7]; - $_SESSION['Contract'.$identifier]->Location= $_ContractST['StkLocation']; -// $_SESSION['Contract'.$identifier]->SupplierContact= $_ContractST['SupplierContact']; - $_SESSION['Contract'.$identifier]->DelAdd1 = $_ContractST['DelAdd1']; - $_SESSION['Contract'.$identifier]->DelAdd2 = $_ContractST['DelAdd2']; - $_SESSION['Contract'.$identifier]->DelAdd3 = $_ContractST['DelAdd3']; - $_SESSION['Contract'.$identifier]->DelAdd4 = $_ContractST['DelAdd4']; - $_SESSION['Contract'.$identifier]->DelAdd5 = $_ContractST['DelAdd5']; - $_SESSION['Contract'.$identifier]->DelAdd6 = $_ContractST['DelAdd6']; - $_SESSION['Contract'.$identifier]->tel = $_ContractST['tel']; - $_SESSION['Contract'.$identifier]->contact = $_ContractST['Contact']; + $_SESSION['Contract'.$identifier]->Location= $_POST['StkLocation']; +// $_SESSION['Contract'.$identifier]->SupplierContact= $_POST['SupplierContact']; + $_SESSION['Contract'.$identifier]->DelAdd1 = $_POST['DelAdd1']; + $_SESSION['Contract'.$identifier]->DelAdd2 = $_POST['DelAdd2']; + $_SESSION['Contract'.$identifier]->DelAdd3 = $_POST['DelAdd3']; + $_SESSION['Contract'.$identifier]->DelAdd4 = $_POST['DelAdd4']; + $_SESSION['Contract'.$identifier]->DelAdd5 = $_POST['DelAdd5']; + $_SESSION['Contract'.$identifier]->DelAdd6 = $_POST['DelAdd6']; + $_SESSION['Contract'.$identifier]->tel = $_POST['tel']; + $_SESSION['Contract'.$identifier]->contact = $_POST['Contact']; } else { /*The default location of the user is crook */ @@ -898,7 +898,7 @@ } - } elseif (isset($_ContractST['LookupDeliveryAddress'])){ + } elseif (isset($_POST['LookupDeliveryAddress'])){ $sql = "SELECT deladd1, deladd2, @@ -909,29 +909,29 @@ tel, contact FROM locations - WHERE loccode='" . $_ContractST['StkLocation'] . "'"; + WHERE loccode='" . $_POST['StkLocation'] . "'"; $LocnAddrResult = DB_query($sql,$db); if (DB_num_rows($LocnAddrResult)==1){ $LocnRow = DB_fetch_row($LocnAddrResult); - $_ContractST['DelAdd1'] = $LocnRow[0]; - $_ContractST['DelAdd2'] = $LocnRow[1]; - $_ContractST['DelAdd3'] = $LocnRow[2]; - $_ContractST['DelAdd4'] = $LocnRow[3]; - $_ContractST['DelAdd5'] = $LocnRow[4]; - $_ContractST['DelAdd6'] = $LocnRow[5]; - $_ContractST['tel'] = $LocnRow[6]; - $_ContractST['Contact'] = $LocnRow[7]; + $_POST['DelAdd1'] = $LocnRow[0]; + $_POST['DelAdd2'] = $LocnRow[1]; + $_POST['DelAdd3'] = $LocnRow[2]; + $_POST['DelAdd4'] = $LocnRow[3]; + $_POST['DelAdd5'] = $LocnRow[4]; + $_POST['DelAdd6'] = $LocnRow[5]; + $_POST['tel'] = $LocnRow[6]; + $_POST['Contact'] = $LocnRow[7]; - $_SESSION['Contract'.$identifier]->Location= $_ContractST['StkLocation']; - $_SESSION['Contract'.$identifier]->DelAdd1 = $_ContractST['DelAdd1']; - $_SESSION['Contract'.$identifier]->DelAdd2 = $_ContractST['DelAdd2']; - $_SESSION['Contract'.$identifier]->DelAdd3 = $_ContractST['DelAdd3']; - $_SESSION['Contract'.$identifier]->DelAdd4 = $_ContractST['DelAdd4']; - $_SESSION['Contract'.$identifier]->DelAdd5 = $_ContractST['DelAdd5']; - $_SESSION['Contract'.$identifier]->DelAdd6 = $_ContractST['DelAdd6']; - $_SESSION['Contract'.$identifier]->tel = $_ContractST['tel']; - $_SESSION['Contract'.$identifier]->contact = $_ContractST['Contact']; + $_SESSION['Contract'.$identifier]->Location= $_POST['StkLocation']; + $_SESSION['Contract'.$identifier]->DelAdd1 = $_POST['DelAdd1']; + $_SESSION['Contract'.$identifier]->DelAdd2 = $_POST['DelAdd2']; + $_SESSION['Contract'.$identifier]->DelAdd3 = $_POST['DelAdd3']; + $_SESSION['Contract'.$identifier]->DelAdd4 = $_POST['DelAdd4']; + $_SESSION['Contract'.$identifier]->DelAdd5 = $_POST['DelAdd5']; + $_SESSION['Contract'.$identifier]->DelAdd6 = $_POST['DelAdd6']; + $_SESSION['Contract'.$identifier]->tel = $_POST['tel']; + $_SESSION['Contract'.$identifier]->contact = $_POST['Contact']; } } @@ -940,22 +940,22 @@ <td><input type='text' name=Contact size=41 value='" . $_SESSION['Contract'.$identifier]->contact . "'></td> </tr>"; echo '<tr><td>' . _('Address') . " 1 :</td> - <td><input type='text' name=DelAdd1 size=41 maxlength=40 value='" . $_ContractST['DelAdd1'] . "'></td> + <td><input type='text' name=DelAdd1 size=41 maxlength=40 value='" . $_POST['DelAdd1'] . "'></td> </tr>"; echo '<tr><td>' . _('Address') . " 2 :</td> - <td><input type='text' name=DelAdd2 size=41 maxlength=40 value='" . $_ContractST['DelAdd2'] . "'></td> + <td><input type='text' name=DelAdd2 size=41 maxlength=40 value='" . $_POST['DelAdd2'] . "'></td> </tr>"; echo '<tr><td>' . _('Address') . " 3 :</td> - <td><input type='text' name=DelAdd3 size=41 maxlength=40 value='" . $_ContractST['DelAdd3'] . "'></td> + <td><input type='text' name=DelAdd3 size=41 maxlength=40 value='" . $_POST['DelAdd3'] . "'></td> </tr>"; echo '<tr><td>' . _('Address') . " 4 :</td> - <td><input type='text' name=DelAdd4 size=21 maxlength=20 value='" . $_ContractST['DelAdd4'] . "'></td> + <td><input type='text' name=DelAdd4 size=21 maxlength=20 value='" . $_POST['DelAdd4'] . "'></td> </tr>"; echo '<tr><td>' . _('Address') . " 5 :</td> - <td><input type='text' name=DelAdd5 size=16 maxlength=15 value='" . $_ContractST['DelAdd5'] . "'></td> + <td><input type='text' name=DelAdd5 size=16 maxlength=15 value='" . $_POST['DelAdd5'] . "'></td> </tr>"; echo '<tr><td>' . _('Address') . " 6 :</td> - <td><input type='text' name=DelAdd6 size=16 maxlength=15 value='" . $_ContractST['DelAdd6'] . "'></td> + <td><input type='text' name=DelAdd6 size=16 maxlength=15 value='" . $_POST['DelAdd6'] . "'></td> </tr>"; echo '<tr><td>' . _('Phone') . ":</td> <td><input type='text' name=tel size=31 maxlength=30 value='" . $_SESSION['Contract'.$identifier]->tel . "'></td> @@ -967,7 +967,7 @@ $shipperResult = DB_query($sql,$db); while ($shipperRow=DB_fetch_array($shipperResult)){ - if (isset($_ContractST['deliveryby']) and ($_ContractST['deliveryby'] == $shipperRow['shipper_id'])) { + if (isset($_POST['deliveryby']) and ($_POST['deliveryby'] == $shipperRow['shipper_id'])) { echo "<option selected value='" . $shipperRow['shipper_id'] . "'>" . $shipperRow['shippername']; } else { echo "<option value='" . $shipperRow['shipper_id'] . "'>" . $shipperRow['shippername']; @@ -1000,12 +1000,12 @@ echo '</td></tr><tr><td>' . _('Supplier Contact') . ':</td><td> <select name=SupplierContact>'; - $sql = "SELECT contact FROM suppliercontacts WHERE CustomerID='". $_ContractST['Select'] ."'"; + $sql = "SELECT contact FROM suppliercontacts WHERE CustomerID='". $_POST['Select'] ."'"; $SuppCoResult = DB_query($sql,$db); while ( $SuppCoRow=DB_fetch_array($SuppCoResult)){ - if ($_ContractST['SupplierContact'] == $SuppCoRow['contact'] OR ($_ContractST['SupplierContact']=='' + if ($_POST['SupplierContact'] == $SuppCoRow['contact'] OR ($_POST['SupplierContact']=='' AND $SuppCoRow['contact']==$_SESSION['Contract'.$identifier]->SupplierContact)){ //if (1) { echo "<option selected value='" . $SuppCoRow['contact'] . "'>" . $SuppCoRow['contact']; @@ -1018,19 +1018,19 @@ echo '</td></tr>'; echo '<tr><td>' . _('Address') . " 1 :</td> - </td><td><input type='text' name=suppDelAdd1 size=41 maxlength=40 value='" . $_ContractST['suppDelAdd1'] . "'></td> + </td><td><input type='text' name=suppDelAdd1 size=41 maxlength=40 value='" . $_POST['suppDelAdd1'] . "'></td> </tr>"; echo '<tr><td>' . _('Address') . " 2 :</td> - </td><td><input type='text' name=suppDelAdd2 size=41 maxlength=40 value='" . $_ContractST['suppDelAdd2'] . "'></td> + </td><td><input type='text' name=suppDelAdd2 size=41 maxlength=40 value='" . $_POST['suppDelAdd2'] . "'></td> </tr>"; echo '<tr><td>' . _('Address') . " 3 :</td> - </td><td><input type='text' name=suppDelAdd3 size=41 maxlength=40 value='" . $_ContractST['suppDelAdd3'] . "'></td> + </td><td><input type='text' name=suppDelAdd3 size=41 maxlength=40 value='" . $_POST['suppDelAdd3'] . "'></td> </tr>"; echo '<tr><td>' . _('Address') . " 4 :</td> - </td><td><input type='text' name=suppDelAdd5 size=21 maxlength=20 value='" . $_ContractST['suppDelAdd5'] . "'></td> + </td><td><input type='text' name=suppDelAdd5 size=21 maxlength=20 value='" . $_POST['suppDelAdd5'] . "'></td> </tr>"; echo '<tr><td>' . _('Address') . " 5 :</td> - </td><td><input type='text' name=suppDelAdd4 size=41 maxlength=40 value='" . $_ContractST['suppDelAdd4'] . "'></td> + </td><td><input type='text' name=suppDelAdd4 size=41 maxlength=40 value='" . $_POST['suppDelAdd4'] . "'></td> </tr>"; echo '<tr><td>' . _('Phone') . ": </td><td><input type='text' name=supptel size=31 maxlength=30 value='" . $_SESSION['Contract'.$identifier]->supptel . "'></td> @@ -1052,15 +1052,15 @@ $result=DB_query("SELECT loccode, locationname FROM locations WHERE loccode='" . $_SESSION['Contract'.$identifier]->Contractrt."'", $db); $myrow = DB_fetch_array($result); - $_ContractST['Contractrt'] = $myrow['locationname']; + $_POST['Contractrt'] = $myrow['locationname']; echo '<tr><td>' . _('Delivery To') . ": - </td><td><input type='text' name=Contractrt size=31 value='" . $_ContractST['Contractrt'] . "'></td> + </td><td><input type='text' name=Contractrt size=31 value='" . $_POST['Contractrt'] . "'></td> </tr>"; if ($_SESSION['Contract'.$identifier]->CurrCode != $_SESSION['CompanyRecord']['currencydefault']) { echo '<tr><td>'. _('Exchange Rate').':'.'</td><td><input type=text name="ExRate" - value='.$_ContractST['ExRate'].' class=number size=11></td></tr>'; + value='.$_POST['ExRate'].' class=number size=11></td></tr>'; } else { echo '<input type=hidden name="ExRate" value="1">'; } @@ -1070,11 +1070,11 @@ $Default_Comments = ''; - if (!isset($_ContractST['Comments'])) { - $_ContractST['Comments']=$Default_Comments; + if (!isset($_POST['Comments'])) { + $_POST['Comments']=$Default_Comments; } - echo ":</th></tr><tr><td colspan=4><textarea name='Comments' style='width:100%' rows=5>" . $_ContractST['Comments'] . '</textarea>'; + echo ":</th></tr><tr><td colspan=4><textarea name='Comments' style='width:100%' rows=5>" . $_POST['Comments'] . '</textarea>'; echo '</table>'; Modified: trunk/Z_ReverseSuppPaymentRun.php =================================================================== --- trunk/Z_ReverseSuppPaymentRun.php 2010-06-10 19:52:07 UTC (rev 3488) +++ trunk/Z_ReverseSuppPaymentRun.php 2010-06-12 08:33:32 UTC (rev 3489) @@ -22,7 +22,7 @@ suppreference, rate FROM supptrans - WHERE type = 22 + WHERE supptrans.type = 22 AND trandate = '" . $SQLTranDate . "'"; $Result = DB_query($SQL,$db); @@ -53,7 +53,7 @@ $SQL= 'UPDATE supptrans SET settled=0, alloc=alloc-' . $Alloc['amt'] . ', diffonexch = diffonexch - ((' . $Alloc['Amt'] . '/rate ) - ' . $Alloc['amt']/$Payment['rate'] . ') - WHERE type=' . $Alloc['typeno'] . ' + WHERE supptrans.type=' . $Alloc['type'] . ' AND transno=' . $Alloc['transno']; $ErrMsg =_('The update to the suppliers charges that were settled by the payment failed because'); Modified: trunk/build/make_release.sh =================================================================== --- trunk/build/make_release.sh 2010-06-10 19:52:07 UTC (rev 3488) +++ trunk/build/make_release.sh 2010-06-12 08:33:32 UTC (rev 3489) @@ -28,8 +28,8 @@ msgmerge -U --backup=off locale/el_GR.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot msgmerge -U --backup=off locale/fa_IR.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot msgmerge -U --backup=off locale/hu_HU.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U --backup=off locale/lv_LV.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot - msgfmt -o locale/fr_FR.utf8/LC_MESSAGES/messages.mo locale/fr_FR.utf8/LC_MESSAGES/messages.po msgfmt -o locale/ja_JP.utf8/LC_MESSAGES/messages.mo locale/ja_JP.utf8/LC_MESSAGES/messages.po msgfmt -o locale/nl_NL.utf8/LC_MESSAGES/messages.mo locale/nl_NL.utf8/LC_MESSAGES/messages.po @@ -49,6 +49,7 @@ msgfmt -o locale/el_GR.utf8/LC_MESSAGES/messages.mo locale/el_GR.utf8/LC_MESSAGES/messages.po msgfmt -o locale/fa_IR.utf8/LC_MESSAGES/messages.mo locale/fa_IR.utf8/LC_MESSAGES/messages.po msgfmt -o locale/hu_HU.utf8/LC_MESSAGES/messages.mo locale/hu_HU.utf8/LC_MESSAGES/messages.po +msgfmt -o locale/lv_LV.utf8/LC_MESSAGES/messages.mo locale/hu_HU.utf8/LC_MESSAGES/messages.po echo "SET FOREIGN_KEY_CHECKS = 0;" > $BASE_DIR/sql/mysql/weberp-new.sql @@ -96,7 +97,7 @@ rm $BASE_DIR/sql/mysql/weberp-demo_data.sql rm $BASE_DIR/sql/mysql/weberp-base.sql -# echo "CREATE SCHEMA IF NOT EXISTS weberp DEFAULT CHARACTER SET latin1 DEFAULT COLLATE latin1_swedish_ci;" >> /home/tim/workspace/webERP/sql/mysql/weberp-new.sql +# echo "CREATE SCHEMA IF NOT EXISTS weberp DEFAULT CHARACTER SET DEFAULT COLLATE latin1_swedish_ci;" >> /home/tim/workspace/webERP/sql/mysql/weberp-new.sql echo "SET FOREIGN_KEY_CHECKS = 1;" >> $BASE_DIR/sql/mysql/weberp-new.sql echo "UPDATE systypes SET typeno=0;" >> $BASE_DIR/sql/mysql/weberp-new.sql echo "INSERT INTO shippers VALUES (1,'Default Shipper',0);" >> $BASE_DIR/sql/mysql/weberp-new.sql Modified: trunk/doc/Manual/ManualInventory.html =================================================================== --- trunk/doc/Manual/ManualInventory.html 2010-06-10 19:52:07 UTC (rev 3488) +++ trunk/doc/Manual/ManualInventory.html 2010-06-12 08:33:32 UTC (rev 3489) @@ -67,6 +67,8 @@ </ul> These fields are not relavent to other inventory categories. When category properties are defined - there are options to define the inputs of the fields - they can be simply a text box, a check box or a combo box with the values pre-defined as a comma separated list. When a user comes to define an item these new fields (properties) will display on the item entry page. <br><br> +To enter new properties for a specific inventory category it is necessary to click on edit for the category - the new properties form will show below the usual information relevant to the category. +<br><br> <font size="+2"><b>Adding Inventory Items</b></font> <br><br> Entry of new items requires the input of certain base information: Modified: trunk/includes/header.inc =================================================================== --- trunk/includes/header.inc 2010-06-10 19:52:07 UTC (rev 3488) +++ trunk/includes/header.inc 2010-06-12 08:33:32 UTC (rev 3489) @@ -12,12 +12,12 @@ echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'; - + echo '<html xmlns="http://www.w3.org/1999/xhtml"><head><title>' . $title . '</title>'; echo '<link rel="shortcut icon" href="'. $rootpath.'/favicon.ico" />'; echo '<link rel="icon" href="' . $rootpath.'/favicon.ico" />'; echo '<meta http-equiv="Content-Type" content="text/html; charset="utf-8" />'; - echo '<link href="'.$rootpath. '/css/'. $_SESSION['Theme'] .'/default.css" rel="stylesheet" type="text/css" />'; + echo '<link href="' . $rootpath . '/css/'. $_SESSION['Theme'] .'/default.css" rel="stylesheet" type="text/css" />'; echo '<script type="text/javascript" src = "'.$rootpath.'/javascripts/MiscFunctions.js"></script>'; echo '</head>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-06-12 09:06:39
|
Revision: 3490 http://web-erp.svn.sourceforge.net/web-erp/?rev=3490&view=rev Author: tim_schofield Date: 2010-06-12 09:06:33 +0000 (Sat, 12 Jun 2010) Log Message: ----------- Reverse revision 3488 Revision Links: -------------- http://web-erp.svn.sourceforge.net/web-erp/?rev=3488&view=rev Modified Paths: -------------- trunk/GoodsReceived.php trunk/doc/Change.log.html Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2010-06-12 08:33:32 UTC (rev 3489) +++ trunk/GoodsReceived.php 2010-06-12 09:06:33 UTC (rev 3490) @@ -7,9 +7,9 @@ $PageSecurity = 11; /* Session started in header.inc for password checking and authorisation level check */ -include('includes/session.inc'); include('includes/DefinePOClass.php'); include('includes/DefineSerialItems.php'); +include('includes/session.inc'); include('includes/SQL_CommonFunctions.inc'); if (empty($identifier)) { $identifier=''; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-06-12 08:33:32 UTC (rev 3489) +++ trunk/doc/Change.log.html 2010-06-12 09:06:33 UTC (rev 3490) @@ -1,6 +1,5 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> -<p>10/06/10 Tim: GoodsReceived.php - session.inc should come before any calls to gettext _() function.</p> <p>09/06/10 Harald: Contracts.php - Fix typo in error message.</p> <p>09/06/10 Tim: UserSettings.php - Fix sql error for case when password is being updated.</p> <p>08/06/10 Tim: Add option to exclude value information from GRN screen</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2010-06-13 10:45:38
|
Revision: 3491 http://web-erp.svn.sourceforge.net/web-erp/?rev=3491&view=rev Author: daintree Date: 2010-06-13 10:45:30 +0000 (Sun, 13 Jun 2010) Log Message: ----------- new development work on contract costing module Modified Paths: -------------- trunk/Contracts.php trunk/CounterSales.php trunk/SelectOrderItems.php trunk/doc/Change.log.html trunk/doc/Manual/ManualRequirements.html trunk/includes/DefineContractClass.php trunk/includes/Login.php trunk/index.php trunk/sql/mysql/upgrade3.11.1-3.12.sql Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2010-06-12 09:06:33 UTC (rev 3490) +++ trunk/Contracts.php 2010-06-13 10:45:30 UTC (rev 3491) @@ -13,7 +13,7 @@ } if (isset($_GET['CustomerID'])) { - $_POST['Select']=$_GET['CustomerID']; + $_POST['SelectedCustomer']=$_GET['CustomerID']; } include('includes/header.inc'); @@ -39,1054 +39,842 @@ if (isset($_GET['NewContract']) and isset($_SESSION['Contract'.$identifier])){ unset($_SESSION['Contract'.$identifier]); - $_SESSION['ExistingContract']=0; + $_SESSION['ExistingContract'] = 0; } -if (isset($_POST['Select']) and empty($_POST['SupplierContact'])) { - $sql = "SELECT contact - FROM suppliercontacts - WHERE CustomerID='". $_POST['Select'] ."'"; - - $SuppCoResult = DB_query($sql,$db); - if (DB_num_rows($SuppCoResult)>0) { - $myrow = DB_fetch_row($SuppCoResult); - $_POST['SupplierContact'] = $myrow[0]; - } else { - $_POST['SupplierContact']=''; - } -} - - if (isset($_GET['NewContract']) AND isset($_GET['SelectedCustomer'])) { /* * initialize a new contract */ $_SESSION['ExistingContract']=0; + unset($_SESSION['Contract'.$identifier]->ContractBOM); + unset($_SESSION['Contract'.$identifier]->ContractReqts); unset($_SESSION['Contract'.$identifier]); /* initialize new class object */ $_SESSION['Contract'.$identifier] = new Contract; - /** - * and fill it with essential data - */ - $_SESSION['Contract'.$identifier]->AllowPrintContract = 1; /* Of course cos the - * order aint even started !!*/ - $_SESSION['Contract'.$identifier]->GLLink = $_SESSION['CompanyRecord']['gllink_stock']; - /* set the CustomerID we got */ - $_SESSION['Contract'.$identifier]->CustomerID = $_GET['SelectedCustomer']; - /**/ - $_SESSION['RequireSupplierSelection'] = 0; - /**/ - $_POST['Select'] = $_GET['SelectedCustomer']; - - /** - * the item (its item code) that should be purchased - */ - $purch_item = $_GET['StockID']; - + + $_SESSION['RequireCustomerSelection'] = 0; + $_POST['SelectedCustomer'] = $_GET['SelectedCustomer']; + /*The customer is checked for credit and the Contract Object populated + * using the usual logic of when a customer is selected + * */ } -if (isset($_POST['EnterLines'])){ +if (isset($_POST['EnterContractBOM']) OR isset($_POST['EnterContractRequirements'])){ /*User hit the button to enter line items - * ensure session variables updated then meta refresh to Contract_Items.php*/ - $_SESSION['Contract'.$identifier]->Location=$_POST['StkLocation']; - $_SESSION['Contract'.$identifier]->SupplierContact=$_POST['SupplierContact']; - $_SESSION['Contract'.$identifier]->DelAdd1 = $_POST['DelAdd1']; - $_SESSION['Contract'.$identifier]->DelAdd2 = $_POST['DelAdd2']; - $_SESSION['Contract'.$identifier]->DelAdd3 = $_POST['DelAdd3']; - $_SESSION['Contract'.$identifier]->DelAdd4 = $_POST['DelAdd4']; - $_SESSION['Contract'.$identifier]->DelAdd5 = $_POST['DelAdd5']; - $_SESSION['Contract'.$identifier]->DelAdd6 = $_POST['DelAdd6']; - $_SESSION['Contract'.$identifier]->suppDelAdd1 = $_POST['suppDelAdd1']; - $_SESSION['Contract'.$identifier]->suppDelAdd2 = $_POST['suppDelAdd2']; - $_SESSION['Contract'.$identifier]->suppDelAdd3 = $_POST['suppDelAdd3']; - $_SESSION['Contract'.$identifier]->suppDelAdd4 = $_POST['suppDelAdd4']; - $_SESSION['Contract'.$identifier]->suppDelAdd5 = $_POST['suppDelAdd5']; - $_SESSION['Contract'.$identifier]->supptel= $_POST['supptel']; - $_SESSION['Contract'.$identifier]->Initiator = $_POST['Initiator']; - $_SESSION['Contract'.$identifier]->RequisitionNo = $_POST['Requisition']; - $_SESSION['Contract'.$identifier]->version = $_POST['version']; - $_SESSION['Contract'.$identifier]->deliverydate = $_POST['deliverydate']; - $_SESSION['Contract'.$identifier]->revised = $_POST['revised']; + $_SESSION['Contract'.$identifier]->ContractRef=$_POST['ContractRef']; + $_SESSION['Contract'.$identifier]->ContractDescription=$_POST['ContractDescription']; + $_SESSION['Contract'.$identifier]->DebtorNo = $_POST['DebtorNo']; + $_SESSION['Contract'.$identifier]->BranchCode = $_POST['BranchCode']; + $_SESSION['Contract'.$identifier]->CategoryID = $_POST['CategoryID']; + $_SESSION['Contract'.$identifier]->RequiredDate = $_POST['RequiredDate']; + $_SESSION['Contract'.$identifier]->Margin = $_POST['Margin']; + $_SESSION['Contract'.$identifier]->CustomerRef = $_POST['CustomerRef']; + $_SESSION['Contract'.$identifier]->QuantityReqd = $_POST['QuantityReqd']; + $_SESSION['Contract'.$identifier]->Units = $_POST['Units']; $_SESSION['Contract'.$identifier]->ExRate = $_POST['ExRate']; - $_SESSION['Contract'.$identifier]->Comments = $_POST['Comments']; - $_SESSION['Contract'.$identifier]->deliveryby = $_POST['deliveryby']; - $_SESSION['Contract'.$identifier]->StatusMessage = $_POST['StatComments']; - $_SESSION['Contract'.$identifier]->paymentterms = $_POST['paymentterms']; - $_SESSION['Contract'.$identifier]->contact = $_POST['Contact']; - $_SESSION['Contract'.$identifier]->tel = $_POST['tel']; - $_SESSION['Contract'.$identifier]->Contractrt = $_POST['Contractrt']; + if (isset($_POST['EnterContractBOM'])){ + echo "<meta http-equiv='Refresh' content='0; url=" . $rootpath . '/Contract_Items.php?' . SID . 'identifier='.$identifier. "'>"; + echo '<p>'; + prnMsg(_('You should automatically be forwarded to the entry of the Contract line items page') . '. ' . + _('If this does not happen') . ' (' . _('if the browser does not support META Refresh') . ') ' . + "<a href='$rootpath/ContractBOM.php?" . SID. 'identifier='.$identifier . "'>" . _('click here') . '</a> ' . _('to continue'),'info'); + include('includes/footer.inc'); + exit; + } + if (isset($_POST['EnterContractRequirements'])){ + echo "<meta http-equiv='Refresh' content='0; url=" . $rootpath . '/ContractRequirements.php?' . SID . 'identifier='.$identifier. "'>"; + echo '<p>'; + prnMsg(_('You should automatically be forwarded to the entry of the Contract requirements page') . '. ' . + _('If this does not happen') . ' (' . _('if the browser does not support META Refresh') . ') ' . + "<a href='$rootpath/ContractRequirements.php?" . SID. 'identifier='.$identifier . "'>" . _('click here') . '</a> ' . _('to continue'),'info'); + include('includes/footer.inc'); + exit; + } +} /* end of if going to contract BOM or contract requriements */ - if (isset($_POST['RePrint']) and $_POST['RePrint']==1){ +echo '<a href="'. $rootpath . '/ContractSelect.php?' . SID . "identifier=".$identifier.'">'. _('Back to Contracts'). '</a><br>'; - $_SESSION['Contract'.$identifier]->AllowPrintContract=1; +//attempting to upload the drawing image file +if (isset($_FILES['Drawing']) AND $_FILES['Drawing']['name'] !='' AND $_SESSION['Contract'.$identifier]->ContractRef!='') { - $sql = 'UPDATE purchorders - SET purchorders.allowprint=1 - WHERE purchorders.orderno=' . $_SESSION['Contract'.$identifier]->OrderNo; + $result = $_FILES['Drawing']['error']; + $UploadTheFile = 'Yes'; //Assume all is well to start off with + $filename = $_SESSION['part_pics_dir'] . '/' . $_SESSION['Contract'.$identifier]->ContractRef . '.jpg'; - $ErrMsg = _('An error occurred updating the Contract to allow reprints') . '. ' . _('The error says'); - $updateResult = DB_query($sql,$db,$ErrMsg); + //But check for the worst + if (strtoupper(substr(trim($_FILES['Drawing']['name']),strlen($_FILES['Drawing']['name'])-3))!='JPG'){ + prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); + $UploadTheFile ='No'; + } elseif ( $_FILES['Drawing']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check + prnMsg(_('The file size is over the maximum allowed. The maximum size allowed in KB is') . ' ' . $_SESSION['MaxImageSize'],'warn'); + $UploadTheFile ='No'; + } elseif ( $_FILES['Drawing']['type'] == 'text/plain' ) { //File Type Check + prnMsg( _('Only graphics files can be uploaded'),'warn'); + $UploadTheFile ='No'; + } elseif (file_exists($filename)){ + prnMsg(_('Attempting to overwrite an existing item image'),'warn'); + $result = unlink($filename); + if (!$result){ + prnMsg(_('The existing image could not be removed'),'error'); + $UploadTheFile ='No'; + } + } - } else { - $_POST['RePrint'] = 0; + if ($UploadTheFile=='Yes'){ + $result = move_uploaded_file($_FILES['Drawing']['tmp_name'], $filename); + $message = ($result)?_('File url') ."<a href='". $filename ."'>" . $filename . '</a>' : _('Something is wrong with uploading the file'); } + /* EOR Add Image upload for New Item - by Ori */ +} - echo "<meta http-equiv='Refresh' content='0; url=" . $rootpath . '/Contract_Items.php?' . SID . 'identifier='.$identifier. "'>"; - echo '<p>'; - prnMsg(_('You should automatically be forwarded to the entry of the Contract line items page') . '. ' . - _('If this does not happen') . ' (' . _('if the browser does not support META Refresh') . ') ' . - "<a href='$rootpath/Contract_Items.php?" . SID. 'identifier='.$identifier . "'>" . _('click here') . '</a> ' . _('to continue'),'info'); - include('includes/footer.inc'); - exit; -} /* end of if isset _ContractST'EnterLines' */ -echo '<a href="'. $rootpath . '/Contract_SelectOSPurchOrder.php?' . SID . "identifier=".$identifier.'">'. _('Back to Contracts'). '</a><br>'; - -/*The page can be called with ModifyContractNo=x where x is a purchase - * order number. The page then looks up the details of order x and allows +/*The page can be called with ModifyContractRef=x where x is a contract + * reference. The page then looks up the details of contract x and allows * these details to be modified */ -if (isset($_GET['ModifyContractNo'])){ - include ('includes/Contract_ReadInOrder.inc'); -} +if (isset($_GET['ModifyContractRef'])){ -if (isset($_POST['CancelOrder']) AND $_POST['CancelOrder']!='') { -/*The cancel button on the header screen - to delete order */ - $OK_to_delete = 1; //assume this in the first instance + if (isset($_SESSION['Contract'.$identifier])){ + unset ($_SESSION['Contract'.$identifier]->ContractBOM); + unset ($_SESSION['Contract'.$identifier]->ContractReqts); + unset ($_SESSION['Contract'.$identifier]); + } + + $_SESSION['ExistingContract']=$_GET['ModifyContractRef']; + $_SESSION['RequireCustomerSelection'] = 0; + $_SESSION['Contract'.$identifier] = new Contract; - if(!isset($_SESSION['ExistingContract']) OR $_SESSION['ExistingContract']!=0) { - /* need to check that not already dispatched or invoiced - * by the supplier */ + /*read in all the guff from the selected contract into the contract Class variable */ - if($_SESSION['Contract'.$identifier]->Any_Already_Received()==1){ - $OK_to_delete =0; - prnMsg( _('This order cannot be cancelled because some of it has already been received') . '. ' . - _('The line item quantities may be modified to quantities more than already received') . '. ' . - _('Prices cannot be altered for lines that have already been received') .' '. - _('and quantities cannot be reduced below the quantity already received'),'warn'); - } + $ContractHeaderSQL = "SELECT contractdescription, + debtorno, + branchcode, + status, + categoryid, + orderno, + margin, + wo, + requireddate, + quantityreqd, + units, + drawing, + exrate + FROM contracts + WHERE contractref= '" . $_GET['ModifyContractRef'] . "'"; - } + $ErrMsg = _('The contract cannot be retrieved because'); + $DbgMsg = _('The SQL statement that was used and failed was'); + $ContractHdrResult = DB_query($ContractHeaderSQL,$db,$ErrMsg,$DbgMsg); - if ($OK_to_delete==1){ - $emailsql='SELECT email FROM www_users WHERE userid="'.$_SESSION['Contract'.$identifier]->Initiator.'"'; - $emailresult=DB_query($emailsql, $db); - $emailrow=DB_fetch_array($emailresult); - $StatusComment=date($_SESSION['DefaultDateFormat']). - ' - Order Cancelled by <a href="mailto:'.$emailrow['email'].'">'.$_SESSION['UserID'].'</a><br>'.$_POST['statcommentscomplete']; - unset($_SESSION['Contract'.$identifier]->LineItems); - unset($_SESSION['Contract'.$identifier]); - $_SESSION['Contract'.$identifier] = new PurchOrder; - $_SESSION['RequireSupplierSelection'] = 1; + if (DB_num_rows($ContractHdrResult)==1 and !isset($_SESSION['Contract'.$identifier]->ContractRef )) { - if($_SESSION['ExistingContract']!=0){ + $myrow = DB_fetch_array($ContractHdrResult); + $_SESSION['Contract'.$identifier]->ContractRef = $_GET['ModifyOrderRef']; + $_SESSION['Contract'.$identifier]->ContractDescription = $myrow['contractdescription']; + $_SESSION['Contract'.$identifier]->DebtorNo = $myrow['debtorno']; + $_SESSION['Contract'.$identifier]->BranchCode = $myrow['branchcode']; + $_SESSION['Contract'.$identifier]->Status = $myrow['status']; + $_SESSION['Contract'.$identifier]->CategoryID = $myrow['categoryid']; + $_SESSION['Contract'.$identifier]->OrderNo = $myrow['orderno']; + $_SESSION['Contract'.$identifier]->Margin = $myrow['Margin']; + $_SESSION['Contract'.$identifier]->WO = $myrow['wo']; + $_SESSION['Contract'.$identifier]->RequiredDate = $myrow['RequiredDate']; + $_SESSION['Contract'.$identifier]->QuantityRequired = $myrow['QuantityRequired']; + $_SESSION['Contract'.$identifier]->Units = $myrow['units']; + $_SESSION['Contract'.$identifier]->Drawing = $myrow['drawing']; + $_SESSION['Contract'.$identifier]->ExRate = $myrow['exrate']; + +/*now populate the contract BOM array with the items required for the contract */ - $sql = 'UPDATE purchorderdetails - SET completed=1 - WHERE purchorderdetails.orderno =' . $_SESSION['ExistingContract']; - $ErrMsg = _('The order detail lines could not be deleted because'); - $DelResult=DB_query($sql,$db,$ErrMsg); + $ContractBOMsql = "SELECT contractbom.stockid, + contractbom.workcentreadded, + contractbom.quantity, + stockmaster.units, + stockmaster.materialcost+stockmaster.labourcost+stockmaster.overheadcost AS cost + FROM contractbom INNER JOIN stockmaster + ON contractbom.stockid=stockmaster.stockid + WHERE contractref ='" . $_GET['ModifyContractRef'] . "'"; - $sql="UPDATE purchorders - SET status='".PurchOrder::STATUS_CANCELLED."', - stat_comment='".$StatusComment."' - WHERE orderno=".$_SESSION['ExistingContract']; + $ErrMsg = _('The bill of material cannot be retrieved because'); + $DbgMsg = _('The SQL statement that was used to retrieve the contract bill of material was'); + $ContractBOMResult = db_query($ContractBOMSQL,$db,$ErrMsg,$DbgMsg); - $ErrMsg = _('The order header could not be deleted because'); + if (db_num_rows($ContractBOMResult) > 0) { + while ($myrow=db_fetch_array($ContractBOMResult)) { + $_SESSION['Contract'.$identifier]->Add_To_ContractBOM($myrow['stockid'], + $myrow['workcentreadded'], + $myrow['quantity'], + $myrow['cost'], + $myrow['units']); + } /* add contract bill of materials BOM lines*/ + } //end is there was a contract BOM to add + //Now add the contract requirments + $ContractReqtsSQL = "SELECT component, + quantity, + costperunit, + contractreqid + FROM contractreqts + WHERE contractref ='" . $_GET['ModifyContractRef'] . "' + ORDER BY contractreqid"; + + $ErrMsg = _('The other contract requirementscannot be retrieved because'); + $DbgMsg = _('The SQL statement that was used to retrieve the other contract requirments was'); + $ContractReqtsResult = db_query($ContractReqtsSQL,$db,$ErrMsg,$DbgMsg); + + if (db_num_rows($ContractReqtsResult) > 0) { + while ($myrow=db_fetch_array($ContractReqtsResult)) { + $_SESSION['Contract'.$identifier]->Add_To_ContractRequirements($myrow['component'], + $myrow['quantity'], + $myrow['costperunit'], + $myrow['contractreqid']); + } /* add other contract requirments lines*/ + } //end is there are contract other contract requirments to add + } // end if there was a header for the contract + +}// its an existing contract to readin + +if (isset($_POST['CancelContract'])) { +/*The cancel button on the header screen - to delete the contract */ + $OK_to_delete = 1; //assume this in the first instance + if(!isset($_SESSION['ExistingContract']) OR $_SESSION['ExistingContract']!=0) { + /* need to check that not already ordered by the customer - status = 0 */ + if($_SESSION['Contract'.$identifier]->Status==1){ + $result = DB_query('SELECT orderno FROM salesorders WHERE orderno=' . $_SESSION['Contract'.$identifier]->OrderNo,$db); + if (DB_num_rows($result)==1){ + $OK_to_delete =0; + prnMsg( _('The contract has already been ordered by the customer the order must also be deleted first before the contract can be deleted'),'warn'); + } + } + } + if ($OK_to_delete==1){ + if($_SESSION['ExistingContract']!=0){ + + $sql = "DELETE FROM contractbom WHERE contractref='" . $_SESSION['Contract'.$identifier]->ContractRef . "'"; + $ErrMsg = _('The contract bill of materials could not be deleted because'); $DelResult=DB_query($sql,$db,$ErrMsg); - prnMsg( _('Order number').' '.$_SESSION['ExistingContract'].' '._('has been cancelled'), 'success'); + $sql = "DELETE FROM contractreqts WHERE contractref='" . $_SESSION['Contract'.$identifier]->ContractRef . "'"; + $ErrMsg = _('The contract requirments could not be deleted because'); + $DelResult=DB_query($sql,$db,$ErrMsg); + $sql= "DELETE FROM contracts WHERE contractref='" . $_SESSION['Contract'.$identifier]->ContractRef . "'"; + $ErrMsg = _('The contract could not be deleted because'); + $DelResult=DB_query($sql,$db,$ErrMsg); + + prnMsg( _('Contract').' '.$_SESSION['Contract'.$identifier]->ContractRef.' '._('has been cancelled'), 'success'); unset($_SESSION['Contract'.$identifier]); unset($_SESSION['ExistingContract']); - } else { - // Re-Direct to right place - unset($_SESSION['Contract'.$identifier]); - prnMsg( _('The creation of the new order has been cancelled'), 'success'); } + unset($_SESSION['Contract'.$identifier]->ContractBOM); + unset($_SESSION['Contract'.$identifier]->ContractReqts); + unset($_SESSION['Contract'.$identifier]); + $_SESSION['Contract'.$identifier] = new Contract; + $_SESSION['RequireCustomerSelection'] = 1; } } if (!isset($_SESSION['Contract'.$identifier])){ - /* It must be a new order being created + /* It must be a new contract being created * $_SESSION['Contract'.$identifier] would be set up from the order modification - * code above if a modification to an existing order. Also - * $ExistingContract would be set to 1. The delivery check screen - * is where the details of the order are either updated or - * inserted depending on the value of ExistingContract */ + * code above if a modification to an existing contract. Also + * $ExistingContract would be set to the ContractRef + * */ - $_SESSION['ExistingContract']=0; - $_SESSION['Contract'.$identifier] = new PurchOrder; - $_SESSION['Contract'.$identifier]->AllowPrintContract = 1; /*Of course cos the order aint even started !!*/ - $_SESSION['Contract'.$identifier]->GLLink = $_SESSION['CompanyRecord']['gllink_stock']; + $_SESSION['ExistingContract']= 0; + $_SESSION['Contract'.$identifier] = new Contract; + + if ($_SESSION['Contract'.$identifier]->DebtorNo=='' OR !isset($_SESSION['Contract'.$identifier]->DebtorNo)){ - if ($_SESSION['Contract'.$identifier]->CustomerID=='' OR !isset($_SESSION['Contract'.$identifier]->CustomerID)){ - /* a session variable will have to maintain if a supplier * has been selected for the order or not the session * variable CustomerID holds the supplier code already * as determined from user id /password entry */ - $_SESSION['RequireSupplierSelection'] = 1; + $_SESSION['RequireCustomerSelection'] = 1; } else { - $_SESSION['RequireSupplierSelection'] = 0; + $_SESSION['RequireCustomerSelection'] = 0; } - } -if (isset($_POST['ChangeSupplier'])) { - -/* change supplier only allowed with appropriate permissions - - * button only displayed to modify is AccessLevel >10 - * (see below)*/ - if ($_SESSION['Contract'.$identifier]->Stat == PurchOrder::STATUS_PENDING and $_SESSION['UserID']==$_SESSION['Contract'.$identifier]->Initiator) { - if ($_SESSION['Contract'.$identifier]->Any_Already_Received()==0){ - $emailsql='SELECT email FROM www_users WHERE userid="'.$_SESSION['Contract'.$identifier]->Initiator.'"'; - $emailresult=DB_query($emailsql, $db); - $emailrow=DB_fetch_array($emailresult); - $date = date($_SESSION['DefaultDateFormat']); - $_SESSION['RequireSupplierSelection']=1; - $_SESSION['Contract'.$identifier]->Stat = PurchOrder::STATUS_PENDING; - $StatusComment=$date.' - Supplier changed by <a href="mailto:'.$emailrow['email'].'">'.$_SESSION['UserID']. - '</a> - '.$_POST['StatComments'].'<br>'.$_POST['statcommentscomplete']; - $_SESSION['Contract'.$identifier]->StatComments=$StatusComment; - } else { - echo '<br><br>'; - prnMsg(_('Cannot modify the supplier of the order once some of the order has been received'),'warn'); - } +if (isset($_POST['CommitContract'])){ + /*This is the bit where the contract object is commited to the database after a bit of error checking */ + + //First update the session['Contract'.$identifier] variable with all inputs from the form + + $InputError = False; //assume no errors on input then test for errors + if (strlen($_POST['ContractRef'])<2){ + prnMsg(_('The contract reference is expected to be more than 2 characters long. Please alter the contract reference before proceeding.'),'error'); + $InputError = true; } -} + //The contractRef cannot be the same as an existing stockid or contractref + $result = DB_query("SELECT stockid FROM stockmaster WHERE stockid='" . $_POST['ContractRef'] . "'",$db); + if (DB_num_rows($result)==1){ + prnMsg(_('The contract reference cannot be the same as a previously created stock item. Please modify the contract reference before continuing'),'error'); + $InputError=true; + } + if (strlen($_POST['ContractDescription'])<10){ + prnMsg(_('The contract description is expected to be more than 10 characters long. Please alter the contract description in full before proceeding.'),'error'); + $InputError = true; + } + if (! Is_Date($_POST['RequiredDate'])){ + prnMsg (_('The date the contract is required to be completed by must be entered in the format') . ' ' . $_SESSION['DefaultDateFormat'],'error'); + $InputError =true; + } + if (Date1GreaterThanDate2(Date($_SESSION['DefaultDateFormat']),$_POST['RequiredDate']) AND $_POST['RequiredDate']!=''){ + prnMsg(_('The date that the contract is to be completed by is expected to be a date in the future. Make the required date a date after today before proceeding.'),'error'); + $InputError =true; + } + if (!is_numeric($_POST['QuantityReqd'])){ + prnMsg(_('The quantity required is expected to be numeric. Please enter a number in the quantity required field before proceeding.'),'error'); + $InputError=true; + } + if ($_POST['QuantityReqd']<=0){ + prnMsg(_('The quantity required is expected to be a positive number. Please enter a postive number in the quantity required field before proceeding.'),'error'); + $InputError=true; + } + if (!$InputError) { + $_SESSION['Contract'.$identifier]->ContractRef=$_POST['ContractRef']; + $_SESSION['Contract'.$identifier]->ContractDescription=$_POST['ContractDescription']; + $_SESSION['Contract'.$identifier]->CategoryID = $_POST['CategoryID']; + $_SESSION['Contract'.$identifier]->RequiredDate = $_POST['RequiredDate']; + $_SESSION['Contract'.$identifier]->Margin = $_POST['Margin']; + $_SESSION['Contract'.$identifier]->Status = $_POST['Status']; + $_SESSION['Contract'.$identifier]->CustomerRef = $_POST['CustomerRef']; + $_SESSION['Contract'.$identifier]->QuantityReqd = $_POST['QuantityReqd']; + $_SESSION['Contract'.$identifier]->Units = $_POST['Units']; + $_SESSION['Contract'.$identifier]->ExRate = $_POST['ExRate']; + } + + $sql = "SELECT contractref, + debtorno, + branchcode, + categoryid, + requireddate, + margin, + customerref, + quantityreqd, + units, + exrate, + status + FROM contracts + WHERE contractref='" . $_POST['ContractRef'] . "'"; + + $result = DB_query($sql,$db); + if (DB_num_rows($result)==1){ // then we have an existing contract with this contractref + $ExistingContract = DB_fetch_array($result); + if ($ExistingContract['debtorno'] != $_SESSION['Contract'.$identifier]->DebtorNo){ + prnMsg(_('The contract reference cannot be the same as a previously created contract for another customer. Please modify the contract reference before continuing'),'error'); + $InputError=true; + } + if ($ExistingContract['status'] == 0 AND $_POST['Status']==2){ + prnMsg(_('The contract must first be made into a customer quotation - only then can it be completed.'),'error'); + $InputError=true; + } + if ($ExistingContract['status'] == 1 AND $_POST['Status']==0){ + prnMsg(_('Having made the contract into a quotation it cannot now be changed back into just a costing.'),'error'); + $InputError=true; + } + if ($ExistingContract['status'] == 1 AND $_POST['Status']==2){ + /* then we are completing this contract - need to : + * close the work order + * do the variances postings + */ + + + + + + + } + if($ExistingContract['status']<=1 AND ! $InputError){ + //then we can accept any changes at all do an update on the whole lot + $sql = "UPDATE contracts SET categoryid = '" . $_POST['CategoryID'] ."', + requireddate = '" . FormatDateForSQL($_POST['RequiredDate']) . "', + margin = " . $_POST['Margin'] . ", + customerref = '" . $_POST['CustomerRef'] . "', + quantityreqd = " . $_POST['QuantityReqd'] . ", + units = '" . $_POST['Units'] . "', + exrate = " . $_POST['ExRate'] . ", + status = " . $_POST['Status'] . " + WHERE contractref ='" . $_POST['ContractRef'] . "'"; + $ErrMsg = _('Cannot update the contract because'); + $result = DB_query($sql,$db,$ErrMsg); + /* also need to update the items on the contract BOM - delete the existing contract BOM then add these items*/ + $result = DB_query("DELETE FROM contractbom WHERE contractref='" .$_POST['ContractRef'] . "'",$db); + $ErrMsg = _('Could not add a component to the contract bill of material'); + foreach ($_SESSION['Contract'.$identifier]->ContractBOM as $Component){ + $sql = "INSERT INTO contractbom (contractref, + stockid, + workcentreadded, + quantity) + VALUES ( '" . $_POST['ContractRef'] . "', + '" . $Component->StockID . "', + '" . $Component->WorkCentre . "', + " . $Component->Quantity . ")"; + $result = DB_query($sql,$db,$ErrMsg); + } + + /*also need to update the items on the contract requirements - delete the existing database entries then add these */ + $result = DB_query("DELETE FROM contractreqts WHERE contractref='" .$_POST['ContractRef'] . "'",$db); + $ErrMsg = _('Could not add a requirement to the contract requirements'); + foreach ($_SESSION['Contract'.$identifier]->ContractReqts as $Requirement){ + $sql = "INSERT INTO contractreqts (contractref, + requirement, + costperunit, + quantity) + VALUES ( '" . $_POST['ContractRef'] . "', + '" . $Requirement->Requirement . "', + '" . $Requirement->CostPerUnit . "', + " . $Requirement->Quantity . ")"; + $result = DB_query($sql,$db,$ErrMsg); + } + + + prnMsg(_('The changes to the contract have been committed to the database'),'success'); + } + if ($ExistingContract['status']==1 AND ! $InputError){ + //then the quotation will need to be updated with the revised contract cost if necessary + + + + } + if ($ExistingContract['status'] == 0 AND $_POST['Status']==1){ + /*we are updating the status on the contract to a quotation so we need to + * add a new item for the contract into the stockmaster + * add a salesorder header and detail as a quotation for the item + */ + + + } + } else { /*Its a new contract - so insert */ + + if ($_POST['Status'] !=0){ + //a new contract being created with a status of not a quotation - create it anyway but with status=0 + prnMsg(_('A contract can only be created with a status of costing initially'),'warn'); + } + $sql = "INSERT INTO contracts ( contractref, + debtorno, + branchcode, + categoryid, + requireddate, + margin, + customerref, + quantityreqd, + units, + exrate) + VALUES ('" . $_POST['ContractRef'] . "', + '" . $_SESSION['Contract'.$identifier]->DebtorNo . "', + '" . $_SESSION['Contract'.$identifier]->BranchCode . "', + '" . $_POST['CategoryID'] . "', + '" . FormatDateForSQL($_POST['RequiredDate']) . "', + " . $_POST['Margin'] . ", + '" . $_POST['CustomerRef'] . "', + " . $_POST['QuantityReqd'] . ", + '" . $_POST['Units'] . "', + ". $_POST['ExRate'] .")"; + + $ErrMsg = _('The new contract could not be added because'); + $result = DB_query($sql,$db,$ErrMsg); + + /*Also need to add the reqts and contracbom*/ + $ErrMsg = _('Could not add a component to the contract bill of material'); + foreach ($_SESSION['Contract'.$identifier]->ContractBOM as $Component){ + $sql = "INSERT INTO contractbom (contractref, + stockid, + workcentreadded, + quantity) + VALUES ( '" . $_POST['ContractRef'] . "', + '" . $Component->StockID . "', + '" . $Component->WorkCentre . "', + " . $Component->Quantity . ")"; + $result = DB_query($sql,$db,$ErrMsg); + } + + $ErrMsg = _('Could not add a requirement to the contract requirements'); + foreach ($_SESSION['Contract'.$identifier]->ContractReqts as $Requirement){ + $sql = "INSERT INTO contractreqts (contractref, + requirement, + costperunit, + quantity) + VALUES ( '" . $_POST['ContractRef'] . "', + '" . $Requirement->Requirement . "', + '" . $Requirement->CostPerUnit . "', + " . $Requirement->Quantity . ")"; + $result = DB_query($sql,$db,$ErrMsg); + } + prnMsg(_('The new contract has been added to the database'),'success'); + } //end of adding a new contract +}//end of commital to database -$msg=''; -if (isset($_POST['SearchSuppliers'])){ +if (isset($_POST['SearchCustomers'])){ - if (strlen($_POST['Keywords'])>0 AND strlen($_SESSION['Contract'.$identifier]->CustomerID)>0) { - $msg=_('Supplier name keywords have been used in preference to the supplier code extract entered'); + if (($_POST['CustKeywords']!='') AND (($_POST['CustCode']!='') OR ($_POST['CustPhone']!=''))) { + prnMsg( _('Customer Branch Name keywords have been used in preference to the Customer Branch Code or Branch Phone Number entered'), 'warn'); } - if ($_POST['Keywords']=='' AND $_POST['SuppCode']=='') { - $msg=_('At least one Supplier Name keyword OR an extract of a Supplier Code must be entered for the search'); + if (($_POST['CustCode']!='') AND ($_POST['CustPhone']!='')) { + prnMsg(_('Customer Branch Code has been used in preference to the Customer Branch Phone Number entered'), 'warn'); + } + if (($_POST['CustKeywords']=='') AND ($_POST['CustCode']=='') AND ($_POST['CustPhone']=='')) { + prnMsg(_('At least one Customer Branch Name keyword OR an extract of a Customer Branch Code or Branch Phone Number must be entered for the search'), 'warn'); } else { - if (strlen($_POST['Keywords'])>0) { + if (strlen($_POST['CustKeywords'])>0) { //insert wildcard characters in spaces - $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; + $_POST['CustKeywords'] = strtoupper(trim($_POST['CustKeywords'])); + $SearchString = '%' . str_replace(' ', '%', $_POST['CustKeywords']) . '%'; - $SQL = "SELECT suppliers.CustomerID, - suppliers.suppname, - suppliers.address1, - suppliers.address2, - suppliers.address3, - suppliers.address4, - suppliers.address5, - suppliers.address6, - suppliers.currcode - FROM suppliers - WHERE suppliers.suppname " . LIKE . " '$SearchString' - ORDER BY suppliers.suppname"; + $SQL = "SELECT custbranch.brname, + custbranch.contactname, + custbranch.phoneno, + custbranch.faxno, + custbranch.branchcode, + custbranch.debtorno, + debtorsmaster.name + FROM custbranch + LEFT JOIN debtorsmaster + ON custbranch.debtorno=debtorsmaster.debtorno + WHERE custbranch.brname " . LIKE . " '$SearchString' + AND custbranch.disabletrans=0 + ORDER BY custbranch.debtorno, custbranch.branchcode"; + + } elseif (strlen($_POST['CustCode'])>0){ - } elseif (strlen($_POST['SuppCode'])>0){ - $SQL = "SELECT suppliers.CustomerID, - suppliers.suppname, - suppliers.address1, - suppliers.address2, - suppliers.address3, - suppliers.address4, - suppliers.address5, - suppliers.address6, - suppliers.currcode - FROM suppliers - WHERE suppliers.CustomerID " . LIKE . " '%" . $_POST['SuppCode'] . "%' - ORDER BY suppliers.CustomerID"; + $_POST['CustCode'] = strtoupper(trim($_POST['CustCode'])); + + $SQL = "SELECT custbranch.brname, + custbranch.contactname, + custbranch.phoneno, + custbranch.faxno, + custbranch.branchcode, + custbranch.debtorno, + debtorsmaster.name + FROM custbranch + LEFT JOIN debtorsmaster + ON custbranch.debtorno=debtorsmaster.debtorno + WHERE custbranch.debtorno " . LIKE . " '%" . $_POST['CustCode'] . "%' OR custbranch.branchcode " . LIKE . " '%" . $_POST['CustCode'] . "%' + AND custbranch.disabletrans=0 + ORDER BY custbranch.debtorno"; + + } elseif (strlen($_POST['CustPhone'])>0){ + $SQL = "SELECT custbranch.brname, + custbranch.contactname, + custbranch.phoneno, + custbranch.faxno, + custbranch.branchcode, + custbranch.debtorno, + debtorsmaster.name + FROM custbranch + LEFT JOIN debtorsmaster + ON custbranch.debtorno=debtorsmaster.debtorno + WHERE custbranch.phoneno " . LIKE . " '%" . $_POST['CustPhone'] . "%' + AND custbranch.disabletrans=0 + ORDER BY custbranch.debtorno"; } - $ErrMsg = _('The searched supplier records requested cannot be retrieved because'); - $result_SuppSelect = DB_query($SQL,$db,$ErrMsg); + $ErrMsg = _('The searched customer records requested cannot be retrieved because'); + $result_CustSelect = DB_query($SQL,$db,$ErrMsg); - if (DB_num_rows($result_SuppSelect)==1){ - $myrow=DB_fetch_array($result_SuppSelect); - $_POST['Select'] = $myrow['CustomerID']; - } elseif (DB_num_rows($result_SuppSelect)==0){ - prnMsg( _('No supplier records contain the selected text') . ' - ' . - _('please alter your search criteria and try again'),'info'); + if (DB_num_rows($result_CustSelect)==1){ + $myrow=DB_fetch_array($result_CustSelect); + $_POST['SelectedCustomer'] = $myrow['debtorno'] . '-' . $myrow['branchcode']; + } elseif (DB_num_rows($result_CustSelect)==0){ + prnMsg(_('No Customer Branch records contain the search criteria') . ' - ' . _('please try again') . ' - ' . _('Note a Customer Branch Name may be different to the Customer Name'),'info'); } - } /*one of keywords or SuppCode was more than a zero length string */ -} /*end of if search for supplier codes/names */ + } /*one of keywords or custcode was more than a zero length string */ +} /*end of if search for customer codes/names */ -// added by Hudson -if((!isset($_POST['SearchSuppliers']) or $_POST['SearchSuppliers']=='' ) AND - (isset($_SESSION['Contract'.$identifier]->CustomerID) AND $_SESSION['Contract'.$identifier]->CustomerID!='')){ +if (isset($_POST['SelectedCustomer'])) { - /*The session variables are set but the form variables have been lost - * need to restore the form variables from the session */ - $_POST['CustomerID']=$_SESSION['Contract'.$identifier]->CustomerID; - $_POST['SupplierName']=$_SESSION['Contract'.$identifier]->SupplierName; - $_POST['CurrCode'] = $_SESSION['Contract'.$identifier]->CurrCode; - $_POST['ExRate'] = $_SESSION['Contract'.$identifier]->ExRate; - $_POST['paymentterms'] = $_SESSION['Contract'.$identifier]->paymentterms; - $_POST['DelAdd1']=$_SESSION['Contract'.$identifier]->DelAdd1; - $_POST['DelAdd2']=$_SESSION['Contract'.$identifier]->DelAdd2; - $_POST['DelAdd3']=$_SESSION['Contract'.$identifier]->DelAdd3; - $_POST['DelAdd4']=$_SESSION['Contract'.$identifier]->DelAdd4; - $_POST['DelAdd5']=$_SESSION['Contract'.$identifier]->DelAdd5; - $_POST['DelAdd6']=$_SESSION['Contract'.$identifier]->DelAdd6; - $_POST['suppDelAdd1']=$_SESSION['Contract'.$identifier]->suppDelAdd1; - $_POST['suppDelAdd2']=$_SESSION['Contract'.$identifier]->suppDelAdd2; - $_POST['suppDelAdd3']=$_SESSION['Contract'.$identifier]->suppDelAdd3; - $_POST['suppDelAdd4']=$_SESSION['Contract'.$identifier]->suppDelAdd4; - $_POST['suppDelAdd5']=$_SESSION['Contract'.$identifier]->suppDelAdd5; - $_POST['suppDelAdd6']=$_SESSION['Contract'.$identifier]->suppDelAdd6; +/* will only be true if page called from customer selection form + * or set because only one customer record returned from a search + * so parse the $Select string into debtorno and branch code */ + $CustomerBranchArray = explode('-',$_POST['SelectedCustomer']); + $_SESSION['Contract'.$identifier]->DebtorNo = trim($CustomerBranchArray[0]); + $_SESSION['Contract'.$identifier]->BranchCode = trim($CustomerBranchArray[1]); + + $sql = "SELECT debtorsmaster.name, + custbranch.brname, + debtorsmaster.currcode, + debtorsmaster.holdreason, + holdreasons.dissallowinvoices, + currencies.rate + FROM debtorsmaster INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + INNER JOIN custbranch + ON debtorsmaster.debtorno=custbranch.debtorno + INNER JOIN holdreasons + ON debtorsmaster.holdreason=holdreasons.reasoncode + WHERE debtorsmaster.debtorno='" . $_SESSION['Contract'.$identifier]->DebtorNo . "' + AND custbranch.branchcode='" . $_SESSION['Contract'.$identifier]->BranchCode . "'" ; -} - -if (isset($_POST['Select'])) { - -/* will only be true if page called from supplier selection form - * or set because only one supplier record returned from a search - * so parse the $Select string into supplier code and branch code */ - $sql='SELECT currcode FROM suppliers where CustomerID="'.$_POST['Select'].'"'; - $result=DB_query($sql,$db); - $myrow=DB_fetch_array($result); - $SupplierCurrCode=$myrow['currcode']; - - $authsql='SELECT cancreate - FROM purchorderauth - WHERE userid="'.$_SESSION['UserID'].'" - AND currabrev="'.$SupplierCurrCode.'"'; - - $authresult=DB_query($authsql,$db); - - $sql = "SELECT suppliers.suppname, - suppliers.currcode, - currencies.rate, - suppliers.paymentterms, - suppliers.address1, - suppliers.address2, - suppliers.address3, - suppliers.address4, - suppliers.address5, - suppliers.address6, - suppliers.phn, - suppliers.Contractrt - FROM suppliers INNER JOIN currencies - ON suppliers.currcode=currencies.currabrev - WHERE CustomerID='" . $_POST['Select'] . "'"; - - $ErrMsg = _('The supplier record of the supplier selected') . ': ' . $_POST['Select'] . ' ' . + $ErrMsg = _('The customer record selected') . ': ' . $_POST['SelectedCustomer'] . ' ' . _('cannot be retrieved because'); - $DbgMsg = _('The SQL used to retrieve the supplier details and failed was'); - $result =DB_query($sql,$db,$ErrMsg,$DbgMsg); - $myrow = DB_fetch_row($result); - $SupplierName = $myrow[0]; - // added for suppliers lookup fields - - if (($authmyrow=DB_fetch_array($authresult) and $authmyrow[0]==0 ) ) { - $_POST['SupplierName'] = $myrow[0]; - $_POST['CurrCode'] = $myrow[1]; - $_POST['ExRate'] = $myrow[2]; - $_POST['paymentterms']= $myrow[3]; - $_POST['suppDelAdd1'] = $myrow[4]; - $_POST['suppDelAdd2'] = $myrow[5]; - $_POST['suppDelAdd3'] = $myrow[6]; - $_POST['suppDelAdd4'] = $myrow[7]; - $_POST['suppDelAdd5'] = $myrow[8]; - $_POST['suppDelAdd6'] = $myrow[9]; - $_POST['supptel'] = $myrow[10]; - $_POST['Contractrt'] = $myrow[11]; - - $_SESSION['Contract'.$identifier]->CustomerID = $_POST['Select']; - $_SESSION['RequireSupplierSelection'] = 0; - $_SESSION['Contract'.$identifier]->SupplierName = $_POST['SupplierName']; - $_SESSION['Contract'.$identifier]->CurrCode = $_POST['CurrCode']; - $_SESSION['Contract'.$identifier]->ExRate = $_POST['ExRate']; - $_SESSION['Contract'.$identifier]->paymentterms = $_POST['paymentterms']; - $_SESSION['Contract'.$identifier]->suppDelAdd1 = $_POST['suppDelAdd1']; - $_SESSION['Contract'.$identifier]->suppDelAdd2 = $_POST['suppDelAdd2']; - $_SESSION['Contract'.$identifier]->suppDelAdd3 = $_POST['suppDelAdd3']; - $_SESSION['Contract'.$identifier]->suppDelAdd4 = $_POST['suppDelAdd4']; - $_SESSION['Contract'.$identifier]->suppDelAdd5 = $_POST['suppDelAdd5']; - $_SESSION['Contract'.$identifier]->suppDelAdd6 = $_POST['suppDelAdd6']; - $_SESSION['Contract'.$identifier]->supptel = $_POST['supptel']; - $_SESSION['Contract'.$identifier]->Contractrt = $_POST['Contractrt']; + $DbgMsg = _('The SQL used to retrieve the customer details and failed was'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); + $myrow = DB_fetch_array($result); + if (DB_num_rows($result)==0){ + prnMsg(_('The customer details were unable to be retrieved'),'error'); + if ($debug==1){ + prnMsg(_('The SQL used that failed to get the customer details was:') . '<p>' . $sql,'error'); + } } else { - prnMsg( _('You do not have the authority to raise Contracts for '). - $SupplierName.'. '._('Please Consult your system administrator for more information').'. ' - ._('You can setup authorisations ').'<a href=Contract_AuthorisationLevels.php>'._('here').'.</a>', 'warn'); - include('includes/footer.inc'); - exit; - } + $_SESSION['Contract'.$identifier]->BranchName = $myrow['brname']; + $_SESSION['RequireCustomerSelection'] = 0; + $_SESSION['Contract'.$identifier]->CustomerName = $myrow['name']; + $_SESSION['Contract'.$identifier]->CurrCode = $myrow['currcode']; + $_SESSION['Contract'.$identifier]->ExRate = $myrow['rate']; + + if ($_SESSION['CheckCreditLimits'] > 0){ /*Check credit limits is 1 for warn and 2 for prohibit contracts */ + $CreditAvailable = GetCreditAvailable($_SESSION['Contract'.$identifier]->DebtorNo,$db); + if ($_SESSION['CheckCreditLimits']==1 AND $CreditAvailable <=0){ + prnMsg(_('The') . ' ' . $_SESSION['Contract'.$identifier]->CustomerName . ' ' . _('account is currently at or over their credit limit'),'warn'); + } elseif ($_SESSION['CheckCreditLimits']==2 AND $CreditAvailable <=0){ + prnMsg(_('No more orders can be placed by') . ' ' . $myrow[0] . ' ' . _(' their account is currently at or over their credit limit'),'warn'); + include('includes/footer.inc'); + exit; + } + } + } //a customer was retrieved ok +} //end if a customer has just been selected - // end of added for suppliers lookup fields -} else { - $_POST['Select'] = $_SESSION['Contract'.$identifier]->CustomerID; - $sql = "SELECT suppliers.suppname, - suppliers.currcode, - suppliers.paymentterms, - suppliers.address1, - suppliers.address2, - suppliers.address3, - suppliers.address4, - suppliers.address5, - suppliers.address6, - suppliers.phn, - suppliers.Contractrt - FROM suppliers INNER JOIN currencies - ON suppliers.currcode=currencies.currabrev - WHERE CustomerID='" . $_POST['Select'] . "'"; +if ($_SESSION['RequireCustomerSelection'] == 1 + OR !isset($_SESSION['Contract'.$identifier]->DebtorNo) + OR $_SESSION['Contract'.$identifier]->DebtorNo=='' ) { - $ErrMsg = _('The supplier record of the supplier selected') . ': ' . $_POST['Select'] . ' ' . - _('cannot be retrieved because'); - $DbgMsg = _('The SQL used to retrieve the supplier details and failed was'); - $result =DB_query($sql,$db,$ErrMsg,$DbgMsg); + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . + _('Contract') . '" alt="">' . ' ' . _('Contract: Select Customer') . ''; + echo '<form action="' . $_SERVER['PHP_SELF'] . '?' .SID .'&identifier=' . $identifier .'" name="CustomerSelection" method=post>'; + + echo '<table cellpadding=3 colspan=4 class=selection> + <tr> + <td><h5>' . _('Part of the Customer Branch Name') . ':</h5></td> + <td><input tabindex=1 type="Text" name="CustKeywords" size=20 maxlength=25></td> + <td><h2><b>' . _('OR') . '</b></h2></td> + <td><h5>' . _('Part of the Customer Branch Code'). ':</h5></td> + <td><input tabindex=2 type="Text" name="CustCode" size=15 maxlength=18></td> + <td><h2><b>' . _('OR') . '</b></h2></td> + <td><h5>' . _('Part of the Branch Phone Number') . ':</h5></td> + <td><input tabindex=3 type="Text" name="CustPhone" size=15 maxlength=18></td> + </tr> + </table> + <br><div class="centre"><input tabindex=4 type=submit name="SearchCustomers" value="' . _('Search Now') . '"> + <input tabindex=5 type=submit action=reset value="' . _('Reset') .'"></div>'; + + if (isset($result_CustSelect)) { + echo '<table cellpadding=2 colspan=7>'; - $myrow = DB_fetch_row($result); - - - // added for suppliers lookup fields - if (!isset($_SESSION['Contract'.$identifier])) { - $_POST['SupplierName'] = $myrow[0]; - $_POST['CurrCode'] = $myrow[1]; - $_POST['paymentterms']= $myrow[2]; - $_POST['suppDelAdd1'] = $myrow[3]; - $_POST['suppDelAdd2'] = $myrow[4]; - $_POST['suppDelAdd3'] = $myrow[5]; - $_POST['suppDelAdd4'] = $myrow[6]; - $_POST['suppDelAdd5'] = $myrow[7]; - $_POST['suppDelAdd6'] = $myrow[8]; - $_POST['supptel'] = $myrow[9]; - $_POST['Contractrt'] = $myrow[10]; - - $_SESSION['Contract'.$identifier]->CustomerID = $_POST['Select']; - $_SESSION['RequireSupplierSelection'] = 0; - $_SESSION['Contract'.$identifier]->SupplierName = $_POST['SupplierName']; - $_SESSION['Contract'.$identifier]->CurrCode = $_POST['CurrCode']; - $_SESSION['Contract'.$identifier]->ExRate = $_POST['ExRate']; - $_SESSION['Contract'.$identifier]->paymentterms = $_POST['paymentterms']; - $_SESSION['Contract'.$identifier]->suppDelAdd1 = $_POST['suppDelAdd1']; - $_SESSION['Contract'.$identifier]->suppDelAdd2 = $_POST['suppDelAdd2']; - $_SESSION['Contract'.$identifier]->suppDelAdd3 = $_POST['suppDelAdd3']; - $_SESSION['Contract'.$identifier]->suppDelAdd4 = $_POST['suppDelAdd4']; - $_SESSION['Contract'.$identifier]->suppDelAdd5 = $_POST['suppDelAdd5']; - $_SESSION['Contract'.$identifier]->suppDelAdd6 = $_POST['suppDelAdd6']; - $_SESSION['Contract'.$identifier]->supptel = $_POST['supptel']; - $_SESSION['Contract'.$identifier]->Contractrt = $_POST['Contractrt']; - // end of added for suppliers lookup fields - } -} - -// MADE THE SUPPILERS BECOME SELECT MENU NOT BY SEARCHING By Hudson @2008/6/30 - -// part of step 1 -if ($_SESSION['RequireSupplierSelection'] ==1 OR !isset($_SESSION['Contract'.$identifier]->CustomerID) OR - $_SESSION['Contract'.$identifier]->CustomerID=='' ) { -//if (true) { - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . - _('Contract') . '" alt="">' . ' ' . _('Contract: Select Supplier') . ''; - echo "<form action='" . $_SERVER['PHP_SELF'] . '?' . SID . "identifier=".$identifier."' method=Contractst name='choosesupplier'>"; - if (strlen($msg)>1){ - prnMsg($msg,'warn'); - } - - echo '<table cellpadding=3 colspan=4> - <tr> - <td><font size=1>' . _('Enter text in the supplier name') . ":</font></td> - <td><input type='Text' name='Keywords' size=20 maxlength=25></td> - <td><font size=3><b>" . _('OR') . '</b></font></td> - <td><font size=1>' . _('Enter text extract in the supplier code') . ":</font></td> - <td><input type='text' name='SuppCode' size=15 maxlength=18></td> - </tr> - </table><br><div class='centre'> - <input type=submit name='SearchSuppliers' value=" . _('Search Now') . "> - <input type=submit action=reset value='" . _('Reset') . "'></div>"; - - echo '<script type="text/javascript">defaultControl(document.forms[0].Keywords);</script>'; - -// UPDATED BY HUDSON 30/6/2008 - - if (isset($result_SuppSelect)) { - - echo '<br><table cellpadding=3 colspan=7 border=1>'; - - $tableheader = "<tr> - <th>" . _('Code') . "</th> - <th>" . _('Supplier Name') . "</th> - <th>" . _('Address') . "</th> - <th>" . _('Currency') . '</th> + $TableHeader = '<br><tr> + <th>' . _('Customer') . '</th> + <th>' . _('Branch') . '</th> + <th>' . _('Contact') . '</th> + <th>' . _('Phone') . '</th> + <th>' . _('Fax') . '</th> </tr>'; + echo $TableHeader; - echo $tableheader; - $j = 1; - $k = 0; /*row counter to determine background colour */ + $k = 0; //row counter to determine background colour + $LastCustomer=''; + while ($myrow=DB_fetch_array($result_CustSelect)) { - while ($myrow=DB_fetch_array($result_SuppSelect)) { - if ($k==1){ echo '<tr class="EvenTableRows">'; $k=0; } else { echo '<tr class="OddTableRows">'; - $k++; + $k=1; } - - echo "<td><input type='submit' style='width:100%' name='Select' value='".$myrow['CustomerID']."' ></td> - <td>".$myrow['suppname']."</td><td>"; - - for ($i=1; $i<=6; $i++) { - if ($myrow['address'.$i] != '') { - echo $myrow['address'.$i].'<br>'; - } + if ($LastCustomer != $myrow['name']) { + echo '<td>'.$myrow['name'].'</td>'; + } else { + echo '<td></td>'; } - echo "</td><td>".$myrow['currcode']."</td></tr>"; - - //end of page full new headings if + echo '<td><input tabindex='.number_format($j+5).' type=submit name="Submit" value="'.$myrow['brname'].'"</td> + <input type=hidden name="SelectedCustomer" value="'.$myrow['debtorno'].' - '.$myrow['branchcode'].'"> + <td>'.$myrow['contactname'].'</td> + <td>'.$myrow['phoneno'].'</td> + <td>'.$myrow['faxno'].'</td> + </tr></form>'; + $LastCustomer=$myrow['name']; + $j++; +//end of page full new headings if } //end of while loop echo '</table>'; - } -//end if results to show + }//end if results to show -//end if RequireSupplierSelection -} else { -/* everything below here only do if a supplier is selected */ +//end if RequireCustomerSelection +} else { /*A customer is already selected so get into the contract setup proper */ - echo "<form name='form1' action='" . $_SERVER['PHP_SELF'] . '?' . SID . "identifier=".$identifier. "' method=Contractst>"; + echo '<form name="ContractEntry" enctype="multipart/form-data" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '&identifier=' . $identifier . '" method="post">'; -// Be careful not made confused by orderno and realorderno -// $orderno = previous_id("purchorders","orderno"); -// $_SESSION['Contract'.$identifier]->OrderNo2 = $orderno; echo '<p class="page_title_text"> - <img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Contract') . '" alt=""> - ' . $_SESSION['Contract'.$identifier]->SupplierName . ' - ' . _('All amounts stated in') . ' - ' . $_SESSION['Contract'.$identifier]->CurrCode . '<br />'; + <img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Contract') . '" alt=""> + ' . $_SESSION['Contract'.$identifier]->CustomerName; + + if ($_SESSION['CompanyRecord']['currencydefault'] != $_SESSION['Contract'.$identifier]->CurrCode){ + echo ' - ' . _('All amounts stated in') . ' ' . $_SESSION['Contract'.$identifier]->CurrCode . '<br />'; + } if ($_SESSION['ExistingContract']) { - echo _(' Modify Contract Number') . ' ' . $_SESSION['Contract'.$identifier]->OrderNo; - - echo '</p>'; - + echo _('Modify Contract') . ': ' . $_SESSION['Contract'.$identifier]->ContractRef; } + echo '</p>'; + + //echo '<meta http-equiv="refresh" content="0; url=' . $rootpath . '/Contract_Items.php?' . SID . '&identifier='.$identifier. '">'; + -/* 2008-08-19 ToPu -- debugging purContractse */ - if (isset($purch_item)) { - prnMsg(_('Purchase Item(s) with this code') . ': ' . $purch_item,'info'); + /*Set up form for entry of contract header stuff */ - /** - * 2008-08-21 ToPu - * Now go ahead to Contract_Items.php - * with NewItem=$purch_item - */ - /* a somewhat nice outfit for that link */ - echo "<div class='centre'>"; - echo '<br><table class="table_index"><tr><td class="menu_group_item">'; - - /* the link */ - echo '<li><a href="'.$rootpath.'/Contract_Items.php?' . SID . 'NewItem=' . $purch_item . "&identifier=".$identifier. '">' . - _('Enter Line Item to this Contract') . '</a></li>'; - /**/ - echo "</td></tr></table></div><br>"; - - if (isset($_GET['Quantity'])) { - $Qty=$_GET['Quantity']; - } else { - $Qty=1; - } - - $sql='SELECT - controlled, - serialised, - description, - units , - decimalplaces - FROM stockmaster - WHERE stockid="'.$purch_item.'" '; - $result=DB_query($sql, $db); - $stockmasterrow=DB_fetch_array($result); - - $sql='SELECT - price, - suppliersuom, - suppliers_partno - FROM purchdata - WHERE supplierno="'.$_GET['SelectedCustomer'] .'" - AND stockid="'.$purch_item.'" '; - $result=DB_query($sql, $db); - $purchdatarow=DB_fetch_array($result); - - $sql='SELECT - stockact - FROM stockcategory - LEFT JOIN stockmaster ON stockmaster.categoryid=stockcategory.categoryid - WHERE stockid="'.$purch_item.'" '; - $result=DB_query($sql, $db); - $categoryrow=DB_fetch_array($result); - - $_SESSION['Contract'.$identifier]->add_to_order( - 1, - $purch_item, - $stockmasterrow['serialised'], - $stockmasterrow['controlled'], - $Qty, - $stockmasterrow['description'], - $purchdatarow['price'], - $stockmasterrow['units'], - $categoryrow['stockact'], - date($_SESSION['DefaultDateFormat']), - 0, - 0, - '', - 0, - 0, - '', - $stockmasterrow['decimalplaces'], - $purch_item, - $purchdatarow['suppliersuom'], - $purchdatarow['suppliers_partno'], - $Qty*$purchdatarow['price'], - '', - 0, - 0, - 0, - 0, - $Qty, - $Qty*$purchdatarow['price']); - echo "<meta http-equiv='Refresh' content='0; url=" . $rootpath . '/Contract_Items.php?' . SID . 'identifier='.$identifier. "'>"; - } - - /*Set up form for entry of order header stuff */ - - if (!isset($_POST['LookupDeliveryAddress']) and (!isset($_POST['StkLocation']) or $_POST['StkLocation']) - AND (isset($_SESSION['Contract'.$identifier]->Location) AND $_SESSION['Contract'.$identifier]->Location != '')) { - /* The session variables are set but the form variables have - * been lost -- - * need to restore the form variables from the session */ - $_POST['StkLocation']=$_SESSION['Contract'.$identifier]->Location; - $_POST['SupplierContact']=$_SESSION['Contract'.$identifier]->SupplierContact; - $_POST['DelAdd1']=$_SESSION['Contract'.$identifier]->DelAdd1; - $_POST['DelAdd2']=$_SESSION['Contract'.$identifier]->DelAdd2; - $_POST['DelAdd3']=$_SESSION['Contract'.$identifier]->DelAdd3; - $_POST['DelAdd4']=$_SESSION['Contract'.$identifier]->DelAdd4; - $_POST['DelAdd5']=$_SESSION['Contract'.$identifier]->DelAdd5; - $_POST['DelAdd6']=$_SESSION['Contract'.$identifier]->DelAdd6; - $_POST['Initiator']=$_SESSION['Contract'.$identifier]->Initiator; - $_POST['Requisition']=$_SESSION['Contract'.$identifier]->RequisitionNo; - $_POST['version']=$_SESSION['Contract'.$identifier]->version; - $_POST['deliverydate']=$_SESSION['Contract'.$identifier]->deliverydate; - $_POST['revised']=$_SESSION['Contract'.$identifier]->revised; - $_POST['ExRate']=$_SESSION['Contract'.$identifier]->ExRate; - $_POST['Comments']=$_SESSION['Contract'.$identifier]->Comments; - $_POST['deliveryby']=$_SESSION['Contract'.$identifier]->deliveryby; - $_POST['paymentterms']=$_SESSION['Contract'.$identifier]->paymentterms; - } - -// move apart by Hudson - echo '<br><table border=1 colspan=1 width=80%> - <tr> - <td><font color=blue size=4><b>' . _('Order Initiation Details') . '</b></font></td> - - <td><font color=blue size=4><b>' . _('Order Status') . '</b></font></td> - </tr> <tr><td style="width:50%">'; - echo '<table>'; - echo '<tr><td>' . _('Contract Date') . ':</td><td>'; - if ($_SESSION['ExistingContract']!=0){ - echo ConvertSQLDate($_SESSION['Contract'.$identifier]->Orig_OrderDate); + echo '<tr><td>' . _('Contract Reference') . ':</td><td>'; + if ($_SESSION['Contract'.$identifier]->Status==0) { + /*Then the contract has not become an order yet and we can allow changes to the ContractRef */ + echo '<input type="text" name="ContractRef" size=21 maxlength=20 value="' . $_SESSION['Contract'.$identifier]->ContractRef . '">'; } else { - /* DefaultDateFormat defined in config.php */ - echo Date($_SESSION['DefaultDateFormat']); + /*Just show the contract Ref - dont allow modification */ + echo '<input type="hidden" name="ContractRef" value="' . $_SESSION['Contract'.$identifier]->ContractRef . '">' . $_SESSION['Contract'.$identifier]->ContractRef; } echo '</td></tr>'; + echo '<tr><td>' . _('Category') . ':</td><td><select name="CategoryID" onChange="ReloadForm(ItemForm.UpdateCategories)">'; - $date = date($_SESSION['DefaultDateFormat']); + $sql = 'SELECT categoryid, categorydescription FROM stockcategory WHERE stocktype!="A"'; + $ErrMsg = _('The stock categories could not be retrieved because'); + $DbgMsg = _('The SQL used to retrieve stock categories and failed was'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); - if (isset($_GET['ModifyContractNo']) && $_GET['ModifyContractNo'] != '') { - $_SESSION['Contract'.$identifier]->version += 1; - $_POST['version'] = $_SESSION['Contract'.$identifier]->version; - } elseif (isset($_SESSION['Contract'.$identifier]->version) and $_SESSION['Contract'.$identifier]->version != '') { - $_POST['version'] = $_SESSION['Contract'.$identifier]->version; - } else { - $_POST['version']='1'; + while ($myrow=DB_fetch_array($result)){ + if (!isset($_SESSION['Contract'.$identifier]->CategoryID) or $myrow['categoryid']==$_SESSION['Contract'.$identifier]->CategoryID){ + echo '<option selected VALUE="'. $myrow['categoryid'] . '">' . $myrow['categorydescription']; + } else { + echo '<option VALUE="'. $myrow['categoryid'] . '">' . $myrow['categorydescription']; + } } - if (!isset($_POST['deliverydate'])) { - $_POST['deliverydate']= date($_SESSION['DefaultDateFormat']); - } + echo '</select><a target="_blank" href="'. $rootpath . '/StockCategories.php?' . SID . '">' . _('Add or Modify Contract Categories') . '</a></td></tr>'; - echo '<tr><td>' . _('Version'). ' #' . ":</td><td><input type='hidden' name='version' size=16 maxlength=15 - value='" . $_POST['version'] . "'>".$_POST['version']."</td></tr>"; - echo '<tr><td>' . _('Revised') . ":</td><td><input type='hidden' name='revised' size=11 maxlength=15 value=" . - $date . '>'.$date.'</td></tr>'; - echo '<tr><td>' . _('Delivery Date') . ":</td><td><input type='text' class=date alt='".$_SESSION['DefaultDateFormat']. - "' name='deliverydate' size=11 value=" . $_POST['deliverydate'] . '>'."</td></tr>"; - - if (!isset($_POST['Initiator'])) { - $_POST['Initiator'] = $_SESSION['UserID']; - $_POST['Requisition'] = ''; + echo '<tr><td>' . _('Units of Measure') . ':</td><td><select name="Units">'; + $sql = 'SELECT unitname FROM unitsofmeasure ORDER by unitname'; + $UOMResult = DB_query($sql,$db); + + while( $UOMrow = DB_fetch_array($UOMResult) ) { + if (isset($_SESSION['Contract'.$identifier]->Units) AND $_SESSION... [truncated message content] |
From: <tim...@us...> - 2010-06-13 17:39:30
|
Revision: 3492 http://web-erp.svn.sourceforge.net/web-erp/?rev=3492&view=rev Author: tim_schofield Date: 2010-06-13 17:39:23 +0000 (Sun, 13 Jun 2010) Log Message: ----------- Tim: upgrade3.11.1-3.12.sql - Extend modules al.lowed field to allow for new modules Modified Paths: -------------- trunk/doc/Change.log.html trunk/sql/mysql/upgrade3.11.1-3.12.sql Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-06-13 10:45:30 UTC (rev 3491) +++ trunk/doc/Change.log.html 2010-06-13 17:39:23 UTC (rev 3492) @@ -1,6 +1,7 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> -<p>13/6/10 Phil: Contracts.php new work changes to index.php to allow for new contract costing module</p> +<p>13/06/10 Tim: upgrade3.11.1-3.12.sql - Extend modules al.lowed field to allow for new modules</p> +<p>13/06/10 Phil: Contracts.php new work changes to index.php to allow for new contract costing module</p> <p>10/06/10 Tim: GoodsReceived.php - session.inc should come before any calls to gettext _() function.</p> <p>09/06/10 Harald: Contracts.php - Fix typo in error message. Phil - This script is not even close to working yet anyway!!</p> <p>09/06/10 Tim: UserSettings.php - Fix sql error for case when password is being updated.</p> Modified: trunk/sql/mysql/upgrade3.11.1-3.12.sql =================================================================== --- trunk/sql/mysql/upgrade3.11.1-3.12.sql 2010-06-13 10:45:30 UTC (rev 3491) +++ trunk/sql/mysql/upgrade3.11.1-3.12.sql 2010-06-13 17:39:23 UTC (rev 3492) @@ -225,5 +225,7 @@ ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -ALTER TABLE `salestypes` CHANGE COLUMN `sales_type` `sales_type` VARCHAR(40) NOT NULL DEFAULT '';>>>>>>> .r3482 +ALTER TABLE `salestypes` CHANGE COLUMN `sales_type` `sales_type` VARCHAR(40) NOT NULL DEFAULT ''; INSERT INTO `config` VALUES ('ShowValueOnGRN', 1); + +ALTER TABLE `www_users` CHANGE COLUMN `modulesallowed` `modulesallowed` varchar(40) NOT NULL DEFAULT '1,1,1,1,1,1,1,1,1,1,1,'; \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-06-13 17:46:43
|
Revision: 3493 http://web-erp.svn.sourceforge.net/web-erp/?rev=3493&view=rev Author: tim_schofield Date: 2010-06-13 17:46:37 +0000 (Sun, 13 Jun 2010) Log Message: ----------- Tim: Supplier login scripts needed for tendering system Modified Paths: -------------- trunk/SelectSupplier.php trunk/doc/Change.log.html Added Paths: ----------- trunk/SuppLoginSetup.php Modified: trunk/SelectSupplier.php =================================================================== --- trunk/SelectSupplier.php 2010-06-13 17:39:23 UTC (rev 3492) +++ trunk/SelectSupplier.php 2010-06-13 17:46:37 UTC (rev 3493) @@ -173,6 +173,7 @@ echo "<br><a href=\"$rootpath/SupplierContacts.php?" . SID . '&SupplierID=' . $_SESSION['SupplierID'] . "\">" . _('Add/Modify/Delete Supplier Contacts') . '</a>'; echo '<br>'; echo "<br><a href='$rootpath/Shipments.php?" . SID . "&NewShipment=Yes'>" . _('Set Up A New Shipment') . '</a>'; + echo "<br><a href='$rootpath/SuppLoginSetup.php?" . SID . "&NewShipment=Yes'>" . _('Supplier Login Configuration') . '</a>'; echo '</td></tr></table>'; } else { // Supplier is not selected yet Added: trunk/SuppLoginSetup.php =================================================================== --- trunk/SuppLoginSetup.php (rev 0) +++ trunk/SuppLoginSetup.php 2010-06-13 17:46:37 UTC (rev 3493) @@ -0,0 +1,541 @@ +<?php +/* $Revision: 1.2 $ */ +/* $Id$*/ + +$PageSecurity = 15; + +include('includes/session.inc'); +$title = _('Supplier Login Configuration'); +include('includes/header.inc'); +include('includes/SQL_CommonFunctions.inc'); + +$ModuleList = array(_('Orders'), + _('Receivables'), + _('Payables'), + _('Purchasing'), + _('Inventory'), + _('Manufacturing'), + _('General Ledger'), + _('Asset Manager'), + _('Petty Cash'), + _('Setup')); + +echo "<a href='" . $rootpath . '/SelectSupplier.php?' . SID . "'>" . _('Back to Suppliers') . '</a><br>'; + +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Supplier') . '" alt="">' . ' ' . _('Supplier') . ' : ' . $_SESSION['SupplierID'] . _(' has been selected') . '<br>';//'</p>'; +//echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/group_add.png" title="' . _('Search') . '" alt="">' . ' ' . $title.'<br>'; + + +//Make an array of the security roles where only one role is active and is ID 1 + +//For the security role selection box, we will only show roles that have: +//- Only one entry in securitygroups AND the tokenid of this entry == 1 + +//First get all available security role ID's' +$query_roles = 'SELECT secroleid FROM securityroles'; +$result_roles = DB_query($query_roles, $db); + +//Check for every security role if they have only one entry in securitygroups, if so check if the tokenid == 1, then store in selection box +//Then they can be put in the $SecurityRoles array for the selection box; +$SecurityRoles = array(); +while ($myroles = DB_fetch_array($result_roles)){ + + $sqltoken = "SELECT tokenid FROM securitygroups WHERE secroleid = '" . $myroles['secroleid'] ."'"; + $result = DB_query($sqltoken,$db); + $Number_roles = DB_num_rows($result); + $myrow=DB_fetch_array($result); + + if ($Number_roles == 1 && $myrow['tokenid']==4 ) { + + $sql = "SELECT secroleid, secrolename FROM securityroles WHERE secroleid = '" . $myroles['secroleid'] ."'"; + $Sec_Result = DB_query($sql, $db); + // Now load it into an aray using Key/Value pairs + while( $Sec_row = DB_fetch_row($Sec_Result) ) { + $SecurityRoles[$Sec_row[0]] = $Sec_row[1]; + } + DB_free_result($Sec_Result); + + } + +} + +if (isset($_GET['SelectedUser'])){ + $SelectedUser = $_GET['SelectedUser']; +} elseif (isset($_POST['SelectedUser'])){ + $SelectedUser = $_POST['SelectedUser']; +} + +if (isset($_POST['submit'])) { + + //initialise no input errors assumed initially before we test + $InputError = 0; + + /* actions to take once the user has clicked the submit button + ie the page has called itself with some user input */ + + //first off validate inputs sensible + if (strlen($_POST['UserID'])<3){ + $InputError = 1; + prnMsg(_('The user ID entered must be at least 4 characters long'),'error'); + } elseif (ContainsIllegalCharacters($_POST['UserID'])) { + $InputError = 1; + prnMsg(_('User names cannot contain any of the following characters') . " - ' & + \" \\ " . _('or a space'),'error'); + } elseif (strlen($_POST['Password'])<5){ + if (!$SelectedUser){ + $InputError = 1; + prnMsg(_('The password entered must be at least 5 characters long'),'error'); + } + } elseif (strstr($_POST['Password'],$_POST['UserID'])!= False){ + $InputError = 1; + prnMsg(_('The password cannot contain the user id'),'error'); + } + //comment out except for demo! Do not want anyone modifying demo user. + /* + elseif ($_POST['UserID'] == 'demo') { + prnMsg(_('The demonstration user called demo cannot be modified.'),'error'); + $InputError = 1; + } + */ + + /* Make a comma separated list of modules allowed ready to update the database*/ + $i=0; + $ModulesAllowed = ''; + while ($i < count($ModuleList)){ + $FormVbl = "Module_" . $i; + $ModulesAllowed .= $_POST[($FormVbl)] . ','; + $i++; + } + $_POST['ModulesAllowed']= $ModulesAllowed; + + + if (isset($SelectedUser) AND $InputError !=1) { + +/*SelectedUser could also exist if submit had not been clicked this code would not run in this case cos submit is false of course see the delete code below*/ + + if (!isset($_POST['Supp']) OR $_POST['Supp']==NULL OR $_POST['Supp']==''){ + $_POST['Supp']=''; + } + $UpdatePassword = ""; + if ($_POST['Password'] != ""){ + $UpdatePassword = "password='" . CryptPass($_POST['Password']) . "',"; + } + + $sql = "UPDATE www_users SET realname='" . $_POST['RealName'] . "', + supplierid='" . $_POST['Supp'] ."', + phone='" . $_POST['Phone'] ."', + email='" . $_POST['Email'] ."', + password='".CryptPass($UpdatePassword)."', + pagesize='" . $_POST['PageSize'] . "', + fullaccess=" . $_POST['Access'] . ", + theme='" . $_POST['Theme'] . "', + language ='" . $_POST['UserLanguage'] . "', + defaultlocation='" . $_POST['DefaultLocation'] ."', + modulesallowed='" . $ModulesAllowed . "', + blocked=" . $_POST['Blocked'] . " + WHERE userid = '$SelectedUser'"; + + $msg = _('The selected user record has been updated'); + } elseif ($InputError !=1) { + + $sql = "INSERT INTO www_users (userid, + realname, + supplierid, + password, + phone, + email, + pagesize, + fullaccess, + defaultlocation, + lastvisitdate, + modulesallowed, + displayrecordsmax, + theme, + language) + VALUES ('" . $_POST['UserID'] . "', + '" . $_POST['RealName'] ."', + '" . $_POST['Supp'] ."', + '" . CryptPass($_POST['Password']) ."', + '" . $_POST['Phone'] . "', + '" . $_POST['Email'] ."', + '" . $_POST['PageSize'] ."', + " . $_POST['Access'] . ", + '" . $_POST['DefaultLocation'] ."', + '" . date($_SESSION['DefaultDateFormat']) ."', + '" . $ModulesAllowed . "', + " . $_SESSION['DefaultDisplayRecordsMax'] . ", + '" . $_POST['Theme'] . "', + '". $_POST['UserLanguage'] ."')"; + $msg = _('A new user record has been inserted'); + } + + if ($InputError!=1){ + //run the SQL from either of the above possibilites + $ErrMsg = _('The user alterations could not be processed because'); + $DbgMsg = _('The SQL that was used to update the user and failed was'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); + + unset($_POST['UserID']); + unset($_POST['RealName']); + unset($_POST['Supp']); + unset($_POST['BranchCode']); + unset($_POST['Phone']); + unset($_POST['Email']); + unset($_POST['Password']); + unset($_POST['PageSize']); + unset($_POST['Access']); + unset($_POST['DefaultLocation']); + unset($_POST['ModulesAllowed']); + unset($_POST['Blocked']); + unset($_POST['Theme']); + unset($_POST['UserLanguage']); + unset($SelectedUser); + } + +} elseif (isset($_GET['delete'])) { +//the link to delete a selected record was clicked instead of the submit button + + // comment out except for demo! Do not want anyopne deleting demo user. + /* + if ($SelectedUser == 'demo') { + prnMsg(_('The demonstration user called demo cannot be deleted'),'error'); + } else { + */ + $sql='SELECT userid FROM audittrail where userid="'. $SelectedUser .'"'; + $result=DB_query($sql, $db); + if (DB_num_rows($result)!=0) { + prnMsg(_('Cannot delete user as entries already exist in the audit trail'), 'warn'); + } else { + + $sql="DELETE FROM www_users WHERE userid='$SelectedUser'"; + $ErrMsg = _('The User could not be deleted because');; + $result = DB_query($sql,$db,$ErrMsg); + prnMsg(_('User Deleted'),'info'); + } + unset($SelectedUser); + // } + +} + +if (!isset($SelectedUser)) { + +/* If its the first time the page has been displayed with no parameters then none of the above are true and the list of Users will be displayed with links to delete or edit each. These will call the same page again and allow update/input or deletion of the records*/ + + $sql = "SELECT userid, + realname, + phone, + email, + supplierid, + lastvisitdate, + fullaccess, + pagesize, + theme, + language + FROM www_users WHERE supplierid = '" . $_SESSION['SupplierID'] . "'"; + $result = DB_query($sql,$db); + + echo '<table>'; + echo "<tr><th>" . _('User Login') . "</th> + <th>" . _('Full Name') . "</th> + <th>" . _('Telephone') . "</th> + <th>" . _('Email') . "</th> + <th>" . _('Supplier Code') . "</th> + <th>" . _('Last Visit') . "</th> + <th>" . _('Security Role') ."</th> + <th>" . _('Report Size') ."</th> + <th>" . _('Theme') ."</th> + <th>" . _('Language') ."</th> + </tr>"; + + $k=0; //row colour counter + + while ($myrow = DB_fetch_array($result)) { + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k=1; + } + + $LastVisitDate = ConvertSQLDate($myrow['lastvisitdate']); + + /*The SecurityHeadings array is defined in config.php */ + + echo "<td>".$myrow['userid']."</td> + <td>".$myrow['realname']."</td> + <td>".$myrow['phone']."</td> + <td>".$myrow['email']."</td> + <td>".$myrow['supplierid']."</td> + <td>".$LastVisitDate."</td> + <td>".$SecurityRoles[($myrow['fullaccess'])]."</td> + <td>".$myrow['pagesize']."</td> + <td>".$myrow['theme']."</td> + <td>".$myrow['language']."</td> + <td><a href=\"".$_SERVER['PHP_SELF'] . "?" . SID."&SelectedUser=".$myrow[0]."\">" . _('Edit') . "</a></td> + <td><a href=\"".$_SERVER['PHP_SELF'] . "?" . SID."&SelectedUser=".$myrow[0]."&delete=1\">" . _('Delete') . "</a></td> + </tr>"; + + } //END WHILE LIST LOOP + echo '</table><br>'; +} //end of ifs and buts! + + +if (isset($SelectedUser)) { + echo "<div class='centre'><a href='" . $_SERVER['PHP_SELF'] ."?" . SID . "'>" . _('Review Existing Users') . '</a></div><br>'; +} + +echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . "?" . SID . ">"; + +if (isset($SelectedUser)) { + //editing an existing User + + $sql = "SELECT userid, + realname, + phone, + email, + supplierid, + password, + branchcode, + pagesize, + fullaccess, + defaultlocation, + modulesallowed, + blocked, + theme, + language + FROM www_users + WHERE userid='" . $SelectedUser . "'"; + + $result = DB_query($sql, $db); + $myrow = DB_fetch_array($result); + + $_POST['UserID'] = $myrow['userid']; + $_POST['RealName'] = $myrow['realname']; + $_POST['Phone'] = $myrow['phone']; + $_POST['Email'] = $myrow['email']; + $_POST['Supp'] = $myrow['supplierid']; + $_POST['BranchCode'] = $myrow['branchcode']; + $_POST['PageSize'] = $myrow['pagesize']; + $_POST['Access'] = $myrow['fullaccess']; + $_POST['DefaultLocation'] = $myrow['defaultlocation']; + $_POST['ModulesAllowed'] = $myrow['modulesallowed']; + $_POST['Theme'] = $myrow['theme']; + $_POST['UserLanguage'] = $myrow['language']; + $_POST['Blocked'] = $myrow['blocked']; + + echo "<input type='hidden' name='SelectedUser' value='" . $SelectedUser . "'>"; + echo "<input type='hidden' name='UserID' value='" . $_POST['UserID'] . "'>"; + echo "<input type='hidden' name='ModulesAllowed' value='" . $_POST['ModulesAllowed'] . "'>"; + + echo '<table class=selection> <tr><td>' . _('User code') . ':</td><td>'; + echo $_POST['UserID'] . '</td></tr>'; + +} else { //end of if $SelectedUser only do the else when a new record is being entered + + echo '<table class=selection><tr><td>' . _('User Login') . ":</td><td><input type='text' name='UserID' size=22 maxlength=20 ></td></tr>"; + + /*set the default modules to show to all + this had trapped a few people previously*/ + $i=0; + if (!isset($_POST['ModulesAllowed'])) { + $_POST['ModulesAllowed']='0,0,1,1,0,0,0,0,0,0,'; + } + foreach($ModuleList as $ModuleName){ + if ($i>0){ + $_POST['ModulesAllowed'] .=','; + } + $_POST['ModulesAllowed'] .= '1'; + $i++; + } +} + +if (!isset($_POST['Password'])) { + $_POST['Password']=''; +} +if (!isset($_POST['RealName'])) { + $_POST['RealName']=''; +} +if (!isset($_POST['Phone'])) { + $_POST['Phone']=''; +} +if (!isset($_POST['Email'])) { + $_POST['Email']=''; +} +echo '<tr><td>' . _('Password') . ":</td> + <td><input type='password' name='Password' size=22 maxlength=20 value='" . $_POST['Password'] . "'></tr>"; +echo '<tr><td>' . _('Full Name') . ":</td> + <td><input type='text' name='RealName' value='" . $_POST['RealName'] . "' size=36 maxlength=35></td></tr>"; +echo '<tr><td>' . _('Telephone No') . ":</td> + <td><input type='text' name='Phone' value='" . $_POST['Phone'] . "' size=32 maxlength=30></td></tr>"; +echo '<tr><td>' . _('Email Address') .":</td> + <td><input type='text' name='Email' value='" . $_POST['Email'] ."' size=32 maxlength=55></td></tr>"; +echo '<tr><td>' . _('Security Role') . ":</td><td><select name='Access'>"; + +foreach ($SecurityRoles as $SecKey => $SecVal) { + if (isset($_POST['Access']) and $SecKey == $_POST['Access']){ + echo "<option selected value=" . $SecKey . ">" . $SecVal; + } else { + echo "<option value=" . $SecKey . ">" . $SecVal; + } +} +echo '</select></td></tr>'; +echo '<input type="hidden" name="ID" value="'.$_SESSION['UserID'].'">'; + +echo '<tr><td>' . _('Default Location') . ":</td> + <td><select name='DefaultLocation'>"; + +$sql = "SELECT loccode, locationname FROM locations"; +$result = DB_query($sql,$db); + +while ($myrow=DB_fetch_array($result)){ + + if (isset($_POST['DefaultLocation']) and $myrow['loccode'] == $_POST['DefaultLocation']){ + + echo "<option selected value='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + + } else { + echo "<option Value='" . $myrow['loccode'] . "'>" . $myrow['locationname']; + + } + +} + +//Supplier is fixed by selection of supplier +$_POST['Supp']=$_SESSION['SupplierID']; +echo '<input type="hidden" name="Supp" value="' . $_POST['Supp'] . '">'; +echo '<tr><td>'._('Supplier Code').':</td> + <td>' . $_POST['Supp'] . '</td></tr>'; + +echo '<tr><td>' . _('Reports Page Size') .":</td> + <td><select name='PageSize'>"; + +if(isset($_POST['PageSize']) and $_POST['PageSize']=='A4'){ + echo "<option selected value='A4'>" . _('A4'); +} else { + echo "<option value='A4'>A4"; +} + +if(isset($_POST['PageSize']) and $_POST['PageSize']=='A3'){ + echo "<option selected Value='A3'>" . _('A3'); +} else { + echo "<option value='A3'>A3"; +} + +if(isset($_POST['PageSize']) and $_POST['PageSize']=='A3_landscape'){ + echo "<option selected Value='A3_landscape'>" . _('A3') . ' ' . _('landscape'); +} else { + echo "<option value='A3_landscape'>" . _('A3') . ' ' . _('landscape'); +} + +if(isset($_POST['PageSize']) and $_POST['PageSize']=='letter'){ + echo "<option selected Value='letter'>" . _('Letter'); +} else { + echo "<option value='letter'>" . _('Letter'); +} + +if(isset($_POST['PageSize']) and $_POST['PageSize']=='letter_landscape'){ + echo "<option selected Value='letter_landscape'>" . _('Letter') . ' ' . _('landscape'); +} else { + echo "<option value='letter_landscape'>" . _('Letter') . ' ' . _('landscape'); +} + +if(isset($_POST['PageSize']) and $_POST['PageSize']=='legal'){ + echo "<option selected value='legal'>" . _('Legal'); +} else { + echo "<option Value='legal'>" . _('Legal'); +} +if(isset($_POST['PageSize']) and $_POST['PageSize']=='legal_landscape'){ + echo "<option selected value='legal_landscape'>" . _('Legal') . ' ' . _('landscape'); +} else { + echo "<option value='legal_landscape'>" . _('Legal') . ' ' . _('landscape'); +} + +echo '</select></td></tr>'; + +echo '<tr> + <td>' . _('Theme') . ":</td> + <td><select name='Theme'>"; + +$ThemeDirectory = dir('css/'); + + +while (false != ($ThemeName = $ThemeDirectory->read())){ + + if (is_dir("css/$ThemeName") AND $ThemeName != '.' AND $ThemeName != '..' AND $ThemeName != 'CVS'){ + + if (isset($_POST['Theme']) and $_POST['Theme'] == $ThemeName){ + echo "<option selected value='$ThemeName'>$ThemeName"; + } else if (!isset($_POST['Theme']) and ($_SESSION['DefaultTheme']==$ThemeName)) { + echo "<option selected value='$ThemeName'>$ThemeName"; + } else { + echo "<option value='$ThemeName'>$ThemeName"; + } + } +} + +echo '</select></td></tr>'; + + +echo '<tr> + <td>' . _('Language') . ":</td> + <td><select name='UserLanguage'>"; + + $LangDirHandle = dir('locale/'); + + +while (false != ($LanguageEntry = $LangDirHandle->read())){ + + if (is_dir('locale/' . $LanguageEntry) AND $LanguageEntry != '..' AND $LanguageEntry != 'CVS' AND $LanguageEntry!='.'){ + + if (isset($_POST['UserLanguage']) and $_POST['UserLanguage'] == $LanguageEntry){ + echo "<option selected value='$LanguageEntry'>$LanguageEntry"; + } elseif (!isset($_POST['UserLanguage']) and $LanguageEntry == $DefaultLanguage) { + echo "<option selected value='$LanguageEntry'>$LanguageEntry"; + } else { + echo "<option value='$LanguageEntry'>$LanguageEntry"; + } + } +} + +echo '</select></td></tr>'; +/*Make an array out of the comma separated list of modules allowed*/ +$ModulesAllowed = explode(',',$_POST['ModulesAllowed']); + +$i=0; +foreach($ModuleList as $ModuleName){ + + echo '<tr><td>' . _('Display') . ' ' . $ModuleName . ' ' . _('options') . ": </td><td><select name='Module_" . $i . "'>"; + if ($ModulesAllowed[$i]==0){ + echo '<option selected value=0>' . _('No'); + echo '<option value=1>' . _('Yes'); + } else { + echo '<option selected value=1>' . _('Yes'); + echo '<option value=0>' . _('No'); + } + echo '</select></td></tr>'; + $i++; +} + +echo '<tr><td>' . _('Account Status') . ":</td><td><select name='Blocked'>"; +if ($_POST['Blocked']==0){ + echo '<option selected value=0>' . _('Open'); + echo '<option value=1>' . _('Blocked'); +} else { + echo '<option selected value=1>' . _('Blocked'); + echo '<option value=0>' . _('Open'); +} +echo '</select></td></tr>'; + + +echo "</table><br> + <div class='centre'><input type='submit' name='submit' value='" . _('Enter Information') . "'></div></form>"; + +if (isset($_GET['SelectedUser'])) { + echo '<script type="text/javascript">defaultControl(document.forms[0].Password);</script>'; +} else { + echo '<script type="text/javascript">defaultControl(document.forms[0].UserID);</script>'; +} + +include('includes/footer.inc'); + +?> \ No newline at end of file Property changes on: trunk/SuppLoginSetup.php ___________________________________________________________________ Added: svn:keywords + Id Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-06-13 17:39:23 UTC (rev 3492) +++ trunk/doc/Change.log.html 2010-06-13 17:46:37 UTC (rev 3493) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>13/06/10 Tim: Supplier login scripts needed for tendering system</p> <p>13/06/10 Tim: upgrade3.11.1-3.12.sql - Extend modules al.lowed field to allow for new modules</p> <p>13/06/10 Phil: Contracts.php new work changes to index.php to allow for new contract costing module</p> <p>10/06/10 Tim: GoodsReceived.php - session.inc should come before any calls to gettext _() function.</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-06-13 20:49:38
|
Revision: 3494 http://web-erp.svn.sourceforge.net/web-erp/?rev=3494&view=rev Author: tim_schofield Date: 2010-06-13 20:49:32 +0000 (Sun, 13 Jun 2010) Log Message: ----------- Simon Peter Otandeka: GoodsReceived.php - Correct sql syntax to work for mysql versions before 5.1 Modified Paths: -------------- trunk/GoodsReceived.php trunk/doc/Change.log.html Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2010-06-13 17:46:37 UTC (rev 3493) +++ trunk/GoodsReceived.php 2010-06-13 20:49:32 UTC (rev 3494) @@ -120,7 +120,8 @@ LEFT JOIN unitsofmeasure ON purchdata.suppliersuom=unitsofmeasure.unitid WHERE supplierno="'.$_SESSION['PO']->SupplierID.'" - AND stockid="'.$LnItm->StockID.'"'; + AND stockid="'.$LnItm->StockID.'" + GROUP BY unitsofmeasure.unitname'; $uomresult=DB_query($uomsql, $db); if (DB_num_rows($uomresult)>0) { Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-06-13 17:46:37 UTC (rev 3493) +++ trunk/doc/Change.log.html 2010-06-13 20:49:32 UTC (rev 3494) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>13/06/10 Simon Peter Otandeka: GoodsReceived.php - Correct sql syntax to work for mysql versions before 5.1</p> <p>13/06/10 Tim: Supplier login scripts needed for tendering system</p> <p>13/06/10 Tim: upgrade3.11.1-3.12.sql - Extend modules al.lowed field to allow for new modules</p> <p>13/06/10 Phil: Contracts.php new work changes to index.php to allow for new contract costing module</p> @@ -12,10 +13,10 @@ <p>03/06/10 Phil: Added a bit of error trapping to ensure customer/branch set up when going into CounterSales.php</p> <p>03/06/10 Otandeka: Locations.php used explode function rather than substr function to split the cashsalecustomer to get Branch and Debtorno codes - also changed format to just a hypen between debtorno and branchcode</p> <p>03/06/10 Otandeka: CounterSales php changed to use explode to get branch and debtorno from cashsalecustomer - and changed format to debtorno-branchcode and rather than debtorno - branchcode (spaces removed)</p> -<p>31/5/10 Phil: BankMatching script took out double quotes reformated indenting - a hard one to read - my bad!</p> -<p>31/5/10 Phil: New script CounterSales.php to allow entry of sale and payment over the counter as a half way step to POS - the customer account is defaulted based on the users default stock location. The locations table now has a default cash sales account - see below</p> +<p>31/05/10 Phil: BankMatching script took out double quotes reformated indenting - a hard one to read - my bad!</p> +<p>31/05/10 Phil: New script CounterSales.php to allow entry of sale and payment over the counter as a half way step to POS - the customer account is defaulted based on the users default stock location. The locations table now has a default cash sales account - see below</p> <P>29/05/10 ChenJohn: SalesTypes.php - upgrade3.11.1-3.12.sql - to allow sales type description up to 40 char length</p> -<p>28/5/10 Phil: New field in locations table to allow a default cash sales account to be setup by location -modifications to Locations.php to allow it to be entered and error-trapping for debtor - branch format required for specification. This will be used in a new CounterSales.php script I am working on</p> +<p>28/05/10 Phil: New field in locations table to allow a default cash sales account to be setup by location -modifications to Locations.php to allow it to be entered and error-trapping for debtor - branch format required for specification. This will be used in a new CounterSales.php script I am working on</p> <P>27/05/10 Tim: PurchData.php - Show the uom name, not the number</p> <P>27/05/10 Tim: CustomerAllocations.php - Show the right balance, and the allocate link where needed</p> <P>27/05/10 Tim: GoodsReceived.php - Correctly show the suppliers Units of measure</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-06-16 08:12:14
|
Revision: 3495 http://web-erp.svn.sourceforge.net/web-erp/?rev=3495&view=rev Author: tim_schofield Date: 2010-06-16 08:12:08 +0000 (Wed, 16 Jun 2010) Log Message: ----------- Tim: CustloginSetup.php - Improvements to layout, and correctly get customer name Modified Paths: -------------- trunk/CustLoginSetup.php trunk/doc/Change.log.html Modified: trunk/CustLoginSetup.php =================================================================== --- trunk/CustLoginSetup.php 2010-06-13 20:49:32 UTC (rev 3494) +++ trunk/CustLoginSetup.php 2010-06-16 08:12:08 UTC (rev 3495) @@ -9,15 +9,15 @@ include('includes/header.inc'); include('includes/SQL_CommonFunctions.inc'); -$ModuleList = array(_('Orders'), - _('Receivables'), - _('Payables'), - _('Purchasing'), - _('Inventory'), - _('Manufacturing'), - _('General Ledger'), +$ModuleList = array(_('Orders'), + _('Receivables'), + _('Payables'), + _('Purchasing'), + _('Inventory'), + _('Manufacturing'), + _('General Ledger'), _('Setup')); - + echo "<a href='" . $rootpath . '/SelectCustomer.php?' . SID . "'>" . _('Back to Customers') . '</a><br>'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="">' . ' ' . _('Customer') . ' : ' . $_SESSION['CustomerID'] . ' - ' . $CustomerName . ' ' . $phone . _(' has been selected') . '<br>';//'</p>'; @@ -42,7 +42,7 @@ $result = DB_query($sqltoken,$db); $Number_roles = DB_num_rows($result); $myrow=DB_fetch_array($result); - + if ($Number_roles == 1 && $myrow['tokenid']==1 ) { $sql = "SELECT secroleid, secrolename FROM securityroles WHERE secroleid = '" . $myroles['secroleid'] ."'"; @@ -51,7 +51,7 @@ while( $Sec_row = DB_fetch_row($Sec_Result) ) { $SecurityRoles[$Sec_row[0]] = $Sec_row[1]; } - DB_free_result($Sec_Result); + DB_free_result($Sec_Result); } @@ -254,7 +254,7 @@ FROM www_users WHERE customerid = '" . $_SESSION['CustomerID'] . "'"; $result = DB_query($sql,$db); - echo '<table border=1>'; + echo '<table>'; echo "<tr><th>" . _('User Login') . "</th> <th>" . _('Full Name') . "</th> <th>" . _('Telephone') . "</th> @@ -340,7 +340,7 @@ modulesallowed, blocked, theme, - language + language FROM www_users WHERE userid='" . $SelectedUser . "'"; @@ -360,17 +360,17 @@ $_POST['Theme'] = $myrow['theme']; $_POST['UserLanguage'] = $myrow['language']; $_POST['Blocked'] = $myrow['blocked']; - + echo "<input type='hidden' name='SelectedUser' value='" . $SelectedUser . "'>"; echo "<input type='hidden' name='UserID' value='" . $_POST['UserID'] . "'>"; echo "<input type='hidden' name='ModulesAllowed' value='" . $_POST['ModulesAllowed'] . "'>"; - echo '<table> <tr><td>' . _('User code') . ':</td><td>'; + echo '<table class=selection> <tr><td>' . _('User code') . ':</td><td>'; echo $_POST['UserID'] . '</td></tr>'; } else { //end of if $SelectedUser only do the else when a new record is being entered - echo '<table><tr><td>' . _('User Login') . ":</td><td><input type='text' name='UserID' size=22 maxlength=20 ></td></tr>"; + echo '<table class=selection><tr><td>' . _('User Login') . ":</td><td><input type='text' name='UserID' size=22 maxlength=20 ></td></tr>"; /*set the default modules to show to all this had trapped a few people previously*/ @@ -451,7 +451,7 @@ $result = DB_query($sql,$db); while ($myrow=DB_fetch_array($result)){ - + //Set the first available branch as default value when nothing is selected if (!isset($_POST['BranchCode'])) { $_POST['BranchCode']= $myrow['branchcode']; @@ -465,7 +465,7 @@ echo "<option Value='" . $myrow['branchcode'] . "'>" . $myrow['branchcode']; } - + } echo '<tr><td>' . _('Reports Page Size') .":</td> @@ -554,7 +554,7 @@ } elseif (!isset($_POST['UserLanguage']) and $LanguageEntry == $DefaultLanguage) { echo "<option selected value='$LanguageEntry'>$LanguageEntry"; } else { - echo "<option value='$LanguageEntry'>$LanguageEntry"; + echo "<option value='$LanguageEntry'>$LanguageEntry"; } } } Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-06-13 20:49:32 UTC (rev 3494) +++ trunk/doc/Change.log.html 2010-06-16 08:12:08 UTC (rev 3495) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>16/06/10 Tim: CustloginSetup.php - Improvements to layout, and correctly get customer name</p> <p>13/06/10 Simon Peter Otandeka: GoodsReceived.php - Correct sql syntax to work for mysql versions before 5.1</p> <p>13/06/10 Tim: Supplier login scripts needed for tendering system</p> <p>13/06/10 Tim: upgrade3.11.1-3.12.sql - Extend modules al.lowed field to allow for new modules</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-06-16 08:14:12
|
Revision: 3496 http://web-erp.svn.sourceforge.net/web-erp/?rev=3496&view=rev Author: tim_schofield Date: 2010-06-16 08:14:06 +0000 (Wed, 16 Jun 2010) Log Message: ----------- Tim: Customers.php - Correctly show fax and phone numbers Modified Paths: -------------- trunk/Customers.php trunk/doc/Change.log.html Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2010-06-16 08:12:08 UTC (rev 3495) +++ trunk/Customers.php 2010-06-16 08:14:06 UTC (rev 3496) @@ -636,8 +636,8 @@ address4, address5, address6, - custbranch.phoneno, - custbranch.faxno, + custbranch.phoneno as telephone, + custbranch.faxno as fax, custbranch.email, currcode, salestype, Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-06-16 08:12:08 UTC (rev 3495) +++ trunk/doc/Change.log.html 2010-06-16 08:14:06 UTC (rev 3496) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>16/06/10 Tim: Customers.php - Correctly show fax and phone numbers</p> <p>16/06/10 Tim: CustloginSetup.php - Improvements to layout, and correctly get customer name</p> <p>13/06/10 Simon Peter Otandeka: GoodsReceived.php - Correct sql syntax to work for mysql versions before 5.1</p> <p>13/06/10 Tim: Supplier login scripts needed for tendering system</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-06-16 08:23:33
|
Revision: 3497 http://web-erp.svn.sourceforge.net/web-erp/?rev=3497&view=rev Author: tim_schofield Date: 2010-06-16 08:23:27 +0000 (Wed, 16 Jun 2010) Log Message: ----------- Tim: SelectProduct.php - Layout improvements Modified Paths: -------------- trunk/SelectProduct.php trunk/doc/Change.log.html Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2010-06-16 08:14:06 UTC (rev 3496) +++ trunk/SelectProduct.php 2010-06-16 08:23:27 UTC (rev 3497) @@ -70,7 +70,7 @@ $Its_A_Labour_Item = false; echo '<table width="90%"><tr><th colspan=3><img src="' . $rootpath . '/css/' . $theme . '/images/inventory.png" title="' . _('Inventory') . '" alt=""><b>' . ' ' . $StockID . ' - ' . $myrow['description'] . '</th></tr></b>'; echo '<tr><td width="40%" valign="top"> - <table>'; //nested table + <table align=left>'; //nested table echo '<tr><th class=number>' . _('Item Type:') . '</th><td colspan=2 class=select>'; switch ($myrow['mbflag']) { case 'A': @@ -177,7 +177,7 @@ } //end of if PricesSecuirty allows viewing of prices echo '</table>'; //end of first nested table // Item Category Property mod: display the item properties - echo '<table>'; + echo '<table align=left>'; $CatValResult = DB_query("SELECT categoryid FROM stockmaster WHERE stockid='" . $StockID . "'", $db); @@ -230,7 +230,7 @@ $PropertyCounter++; } //end loop round properties for the item category echo '</table>'; //end of Item Category Property mod -echo '<td width="15%"> +echo '<td style="width: 15%; vertical-align: top"> <table>'; //nested table to show QOH/orders $QOH = 0; switch ($myrow['mbflag']) { Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-06-16 08:14:06 UTC (rev 3496) +++ trunk/doc/Change.log.html 2010-06-16 08:23:27 UTC (rev 3497) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>16/06/10 Tim: SelectProduct.php - Layout improvements</p> <p>16/06/10 Tim: Customers.php - Correctly show fax and phone numbers</p> <p>16/06/10 Tim: CustloginSetup.php - Improvements to layout, and correctly get customer name</p> <p>13/06/10 Simon Peter Otandeka: GoodsReceived.php - Correct sql syntax to work for mysql versions before 5.1</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-06-17 08:45:30
|
Revision: 3498 http://web-erp.svn.sourceforge.net/web-erp/?rev=3498&view=rev Author: tim_schofield Date: 2010-06-17 08:45:24 +0000 (Thu, 17 Jun 2010) Log Message: ----------- Tim: Enable a supplier to login and make an offer to the company Modified Paths: -------------- trunk/SystemParameters.php trunk/doc/Change.log.html trunk/includes/session.inc trunk/index.php trunk/sql/mysql/upgrade3.11.1-3.12.sql Added Paths: ----------- trunk/SupplierTenders.php trunk/includes/DefineOfferClass.php Added: trunk/SupplierTenders.php =================================================================== --- trunk/SupplierTenders.php (rev 0) +++ trunk/SupplierTenders.php 2010-06-17 08:45:24 UTC (rev 3498) @@ -0,0 +1,465 @@ +<?php +/* $Id$*/ + +$PageSecurity = 9; + +include('includes/DefineOfferClass.php'); +include('includes/session.inc'); +$title = _('Supplier Tendering'); +include('includes/header.inc'); + +$Maximum_Number_Of_Parts_To_Show=50; + +if (!isset($_POST['SupplierID'])) { + $sql='SELECT supplierid FROM www_users WHERE userid="'.$_SESSION['UserID'].'"'; + $result=DB_query($sql, $db); + $myrow=DB_fetch_array($result); + if ($myrow['supplierid']=='') { + prnMsg(_('This functionality can only be accessed via a supplier login.'), 'warning'); + include('includes/footer.inc'); + exit; + } else { + $_POST['SupplierID']=$myrow['supplierid']; + } +} + +if (isset($_GET['Delete'])) { + $_POST['SupplierID']=$_SESSION['offer']->SupplierID; + $_POST['TenderType']=$_GET['Type']; + $_SESSION['offer']->remove_from_offer($_GET['Delete']); +} + +$sql='SELECT suppname, currcode FROM suppliers WHERE supplierid="'.$_POST['SupplierID'].'"'; +$result=DB_query($sql, $db); +$myrow=DB_fetch_array($result); +$Supplier=$myrow['suppname']; +$Currency=$myrow['currcode']; + +/* If the supplierID is set then it must be a login from the supplier but if nothing else is + * set then the supplier must have just logged in so show them the choices. + */ +if (isset($_POST['SupplierID']) and empty($_POST['TenderType']) and empty($_POST['Search']) and empty($_POST['NewItem']) and empty($_GET['Delete'])) { + if (isset($_SESSION['offer'])) { + unset($_SESSION['offer']); + } + echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . "?" . SID . ">"; + echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/supplier.png" title="' . + _('Tenders') . '" alt="">' . ' ' . _('Create or View Offers from') . ' '.$Supplier.'</p>'; + echo '<table class=selection>'; + echo'<tr><td>'._('Select option for tendering').'</td>'; + echo '<td><select name=TenderType>'; +// echo '<option value=1>'._('View or Amend outstanding offers from').' '.$Supplier .'</option>'; + echo '<option value=2>'._('Create a new offer from').' '.$Supplier .'</option>'; +// echo '<option value=3>'._('View any open tenders without an offer from').' '.$Supplier .'</option>'; + echo '</select></td></tr>'; + echo '<input type=hidden name=SupplierID value="'.$_POST['SupplierID'].'"'; + echo '<tr><td colspan=2><div class=centre><input type="submit" name="submit" value="' . _('Select') . '"></div></td></tr>'; + echo '</table></form>'; +} + +if (isset($_POST['NewItem']) and !isset($_POST['Update'])) { + foreach ($_POST as $key => $value) { + if (substr($key,0,3)=='qty') { + $StockID=substr($key,3); + $Quantity=$value; + } + if (substr($key,0,5)=='price') { + $Price=$value; + } + if (substr($key,0,3)=='uom') { + $UOM=$value; + } + if (isset($UOM)) { + $sql='SELECT description, decimalplaces FROM stockmaster WHERE stockid="'.$StockID.'"'; + $result=DB_query($sql, $db); + $myrow=DB_fetch_array($result); + $_SESSION['offer']->add_to_offer( + $_SESSION['offer']->LinesOnOffer, + $StockID, + $Quantity, + $myrow['description'], + $Price, + $UOM, + $myrow['decimalplaces']); + unset($UOM); + } + } +} + +if (isset($_POST['Update']) and !isset($_POST['NewItem'])) { + foreach ($_POST as $key => $value) { + if (substr($key,0,3)=='qty') { + $LineNo=substr($key,3); + $Quantity=$value; + } + if (substr($key,0,5)=='price') { + $Price=$value; + } + if (isset($Price)) { + $_SESSION['offer']->update_offer_item( + $LineNo, + $Quantity, + $Price); + unset($Price); + } + } +} + +if (isset($_POST['Save'])) { + $MailText=''; + foreach ($_SESSION['offer']->LineItems as $LineItems) { + if ($LineItems->Deleted==False) { + $sql='INSERT INTO offers ( + supplierid, + stockid, + quantity, + uom, + price, + expirydate, + currcode) + VALUES ( + "'.$_POST['SupplierID'].'", + "'.$LineItems->StockID.'", + '.$LineItems->Quantity.', + "'.$LineItems->Units.'", + '.$LineItems->Price.', + "'.FormatDateForSQL(DateAdd(date($_SESSION['DefaultDateFormat']),'m',3)).'", + "'.$Currency.'" + )'; + $ErrMsg = _('The suppliers offer could not be inserted into the database because'); + $DbgMsg = _('The SQL statement used to insert the suppliers offer record and failed was'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + if (DB_error_no($db)==0) { + prnMsg( _('The offer for').' '.$LineItems->StockID.' '._('has been inserted into the database'), 'success'); + $MailText .= $LineItems->Quantity.$LineItems->Units.' '._('of').' '.$LineItems->StockID.' '._('at a price of'). + ' '.$Currency.$LineItems->Price."\n"; + } else { + prnMsg( _('The offer for').' '.$LineItems->StockID.' '._('could not be inserted into the database'), 'error'); + include('includes/footer.inc'); + exit; + } + } + } + include ('includes/htmlMimeMail.php'); + $mail = new htmlMimeMail(); + $mail->SetSubject(_('Offer received from').' '.$Supplier); + $mail->setText(_('This email is automatically generated by webERP')."\n" . + _('You have received the following offer from').' '.$Supplier."\n\n".$MailText); + $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . ' <' . $_SESSION['CompanyRecord']['email'] . '>'); + $result = $mail->send(array('tim...@go...'), 'smtp'); + echo 'x'.$result.'x'; + include('includes/footer.inc'); + exit; +} + +if (isset($_SESSION['offer']) and $_SESSION['offer']->LinesOnOffer>0 or isset($_POST['Update'])) { + echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . "?" . SID . ">"; + echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/supplier.png" title="' . + _('Search') . '" alt="">' . ' ' . _('Items to offer from').' '.$Supplier; + echo '<table>'; + echo '<tr>'; + echo '<th>'._('Stock ID').'</th>'; + echo '<th>'._('Description').'</th>'; + echo '<th>'._('Quantity').'</th>'; + echo '<th>'._('UOM').'</th>'; + echo '<th>'._('Price').' ('.$Currency.')</th>'; + echo '<th>'._('Line Total').' ('.$Currency.')</th>'; + echo '</tr>'; + $k=0; + foreach ($_SESSION['offer']->LineItems as $LineItems) { + if ($LineItems->Deleted==False) { + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k=1; + } + echo '<td>'.$LineItems->StockID.'</td>'; + echo '<td>'.$LineItems->ItemDescription.'</td>'; + echo '<td><input type=text class=number name="qty'.$LineItems->LineNo.'" value='.number_format($LineItems->Quantity,$LineItems->DecimalPlaces).'></td>'; + echo '<td>'.$LineItems->Units.'</td>'; + echo '<td><input type=text class=number name="price'.$LineItems->LineNo.'" value='.number_format($LineItems->Price,2,'.','').'></td>'; + echo '<td class=number>'.number_format($LineItems->Price*$LineItems->Quantity,2).'</td>'; + echo "<td><a href='" . $_SERVER['PHP_SELF'] . "?" . SID . "Delete=" . $LineItems->LineNo . "&Type=" . $_POST['TenderType'] . "'>" . _('Remove') . "</a></td></tr>"; + echo '</tr>'; + } + } + echo '</table>'; + echo '<input type=hidden name=TenderType value="'.$_POST['TenderType'].'">'; + echo '<br><div class="centre"><input type="submit" name="Update" value="Update offer">'; + echo '<input type="submit" name="Save" value="Save offer"></div>'; + echo '</form>'; +} + +/*The supplier has chosen option 1 + */ +if (isset($_POST['TenderType']) and $_POST['TenderType']==1) { +} + +/*The supplier has chosen option 2 + */ +if (isset($_POST['TenderType']) and $_POST['TenderType']==2 and !isset($_POST['Search']) or isset($_GET['Delete'])) { + if (!isset($_SESSION['offer'])) { + $_SESSION['offer']=new Offer(); + $_SESSION['offer']->SupplierID=$_POST['SupplierID']; + } + echo '<form action="' . $_SERVER['PHP_SELF'] . '?' . SID . '" method=post>'; + echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . + _('Search') . '" alt="">' . ' ' . _('Search for Inventory Items'); + $sql = 'SELECT categoryid, + categorydescription + FROM stockcategory + ORDER BY categorydescription'; + $result = DB_query($sql, $db); + if (DB_num_rows($result) == 0) { + echo '<p><font size=4 color=red>' . _('Problem Report') . ':</font><br>' . + _('There are no stock categories currently defined please use the link below to set them up'); + echo '<br><a href="' . $rootpath . '/StockCategories.php?' . SID . '">' . _('Define Stock Categories') . '</a>'; + exit; + } + echo '<table class=selection><tr>'; + echo '<td>' . _('In Stock Category') . ':'; + echo '<select name="StockCat">'; + if (!isset($_POST['StockCat'])) { + $_POST['StockCat'] = ""; + } + if ($_POST['StockCat'] == "All") { + echo '<option selected value="All">' . _('All'); + } else { + echo '<option value="All">' . _('All'); + } + while ($myrow1 = DB_fetch_array($result)) { + if ($myrow1['categoryid'] == $_POST['StockCat']) { + echo '<option selected VALUE="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription']; + } else { + echo '<option value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription']; + } + } + echo '</select>'; + echo '<td>' . _('Enter partial') . '<b> ' . _('Description') . '</b>:</td><td>'; + if (isset($_POST['Keywords'])) { + echo '<input type="text" name="Keywords" value="' . $_POST['Keywords'] . '" size=20 maxlength=25>'; + } else { + echo '<input type="text" name="Keywords" size=20 maxlength=25>'; + } + echo '<input type="hidden" name="TenderType" value='.$_POST['TenderType'].'>'; + echo '<input type="hidden" name="SupplierID" value='.$_POST['SupplierID'].'>'; + echo '</td></tr><tr><td></td>'; + echo '<td><font size 3><b>' . _('OR') . ' ' . '</b></font>' . _('Enter partial') . ' <b>' . _('Stock Code') . '</b>:</td>'; + echo '<td>'; + if (isset($_POST['StockCode'])) { + echo '<input type="text" name="StockCode" value="' . $_POST['StockCode'] . '" size=15 maxlength=18>'; + } else { + echo '<input type="text" name="StockCode" size=15 maxlength=18>'; + } + echo '</td></tr></table><br>'; + echo '<div class="centre"><input type=submit name="Search" value="' . _('Search Now') . '"></div><br></form>'; + echo '<script type="text/javascript">defaultControl(document.forms[0].StockCode);</script>'; + echo '</form>'; +} + +if (isset($_POST['Search'])){ /*ie seach for stock items */ + echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . "?" . SID . ">"; + echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/supplier.png" title="' . + _('Tenders') . '" alt="">' . ' ' . _('Select items to offer from').' '.$Supplier .'</p>'; + + if ($_POST['Keywords'] AND $_POST['StockCode']) { + $msg=_('Stock description keywords have been used in preference to the Stock code extract entered'); + } + if ($_POST['Keywords']) { + //insert wildcard characters in spaces + $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; + + if ($_POST['StockCat']=='All'){ + $sql = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.units + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE stockmaster.mbflag!='D' + AND stockmaster.mbflag!='A' + AND stockmaster.mbflag!='K' + and stockmaster.discontinued!=1 + AND stockmaster.description " . LIKE . " '$SearchString' + ORDER BY stockmaster.stockid"; + } else { + $sql = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.units + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE stockmaster.mbflag!='D' + AND stockmaster.mbflag!='A' + AND stockmaster.mbflag!='K' + and stockmaster.discontinued!=1 + AND stockmaster.description " . LIKE . " '$SearchString' + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid"; + } + + } elseif ($_POST['StockCode']){ + + $_POST['StockCode'] = '%' . $_POST['StockCode'] . '%'; + + if ($_POST['StockCat']=='All'){ + $sql = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.units + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE stockmaster.mbflag!='D' + AND stockmaster.mbflag!='A' + AND stockmaster.mbflag!='K' + and stockmaster.discontinued!=1 + AND stockmaster.stockid " . LIKE . " '" . $_POST['StockCode'] . "' + ORDER BY stockmaster.stockid"; + } else { + $sql = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.units + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE stockmaster.mbflag!='D' + AND stockmaster.mbflag!='A' + AND stockmaster.mbflag!='K' + and stockmaster.discontinued!=1 + AND stockmaster.stockid " . LIKE . " '" . $_POST['StockCode'] . "' + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid"; + } + + } else { + if ($_POST['StockCat']=='All'){ + $sql = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.units + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE stockmaster.mbflag!='D' + AND stockmaster.mbflag!='A' + AND stockmaster.mbflag!='K' + and stockmaster.discontinued!=1 + ORDER BY stockmaster.stockid"; + } else { + $sql = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.units + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE stockmaster.mbflag!='D' + AND stockmaster.mbflag!='A' + AND stockmaster.mbflag!='K' + and stockmaster.discontinued!=1 + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid"; + } + } + + $ErrMsg = _('There is a problem selecting the part records to display because'); + $DbgMsg = _('The SQL statement that failed was'); + $SearchResult = DB_query($sql,$db,$ErrMsg,$DbgMsg); + + if (DB_num_rows($SearchResult)==0 && $debug==1){ + prnMsg( _('There are no products to display matching the criteria provided'),'warn'); + } + if (DB_num_rows($SearchResult)==1){ + + $myrow=DB_fetch_array($SearchResult); + $_GET['NewItem'] = $myrow['stockid']; + DB_data_seek($SearchResult,0); + } + + if (isset($SearchResult)) { + + echo "<table cellpadding=1 colspan=7>"; + + $tableheader = "<tr> + <th>" . _('Code') . "</th> + <th>" . _('Description') . "</th> + <th>" . _('Units') . "</th> + <th>" . _('Image') . "</th> + <th>" . _('Quantity') . "</th> + <th>" . _('Price') .' ('.$Currency.")</th> + </tr>"; + echo $tableheader; + + $j = 1; + $k=0; //row colour counter + $PartsDisplayed=0; + while ($myrow=DB_fetch_array($SearchResult)) { + + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k=1; + } + + $filename = $myrow['stockid'] . '.jpg'; + if (file_exists( $_SESSION['part_pics_dir'] . '/' . $filename) ) { + + $ImageSource = '<img src="'.$rootpath . '/' . $_SESSION['part_pics_dir'] . '/' . $myrow['stockid'] . + '.jpg" width="50" height="50">'; + + } else { + $ImageSource = '<i>'._('No Image').'</i>'; + } + + $uomsql='SELECT conversionfactor, + suppliersuom, + unitsofmeasure.unitname + FROM purchdata + LEFT JOIN unitsofmeasure + ON purchdata.suppliersuom=unitsofmeasure.unitid + WHERE supplierno="'.$_POST['SupplierID'].'" + AND stockid="'.$myrow['stockid'].'"'; + + $uomresult=DB_query($uomsql, $db); + if (DB_num_rows($uomresult)>0) { + $uomrow=DB_fetch_array($uomresult); + if (strlen($uomrow['suppliersuom'])>0) { + $uom=$uomrow['unitname']; + } else { + $uom=$myrow['units']; + } + } else { + $uom=$myrow['units']; + } + echo "<td>".$myrow['stockid']."</td> + <td>".$myrow['description']."</td> + <td>".$uom."</td> + <td>".$ImageSource."</td> + <td><input class='number' type='text' size=6 value=0 name='qty".$myrow['stockid']."'></td> + <td><input class='number' type='text' size=12 value=0 name='price".$myrow['stockid']."'></td> + <input type='hidden' size=6 value=".$uom." name='uom".$myrow['stockid']."'> + </tr>"; + + $PartsDisplayed++; + if ($PartsDisplayed == $Maximum_Number_Of_Parts_To_Show){ + break; + } +#end of page full new headings if + } +#end of while loop + echo '</table>'; + if ($PartsDisplayed == $Maximum_Number_Of_Parts_To_Show){ + + /*$Maximum_Number_Of_Parts_To_Show defined in config.php */ + + prnMsg( _('Only the first') . ' ' . $Maximum_Number_Of_Parts_To_Show . ' ' . _('can be displayed') . '. ' . + _('Please restrict your search to only the parts required'),'info'); + } + echo '<a name="end"></a><br><div class="centre"><input type="submit" name="NewItem" value="Update offer"></div>'; + }#end if SearchResults to show + echo '<input type="hidden" name="TenderType" value='.$_POST['TenderType'].'>'; + echo '<input type="hidden" name="SupplierID" value='.$_POST['SupplierID'].'>'; + + echo '</form>'; + +} //end of if search + +include('includes/footer.inc'); + +?> \ No newline at end of file Property changes on: trunk/SupplierTenders.php ___________________________________________________________________ Added: svn:keywords + Id Modified: trunk/SystemParameters.php =================================================================== --- trunk/SystemParameters.php 2010-06-16 08:23:27 UTC (rev 3497) +++ trunk/SystemParameters.php 2010-06-17 08:45:24 UTC (rev 3498) @@ -80,6 +80,9 @@ }elseif (!IsEmailAddress($_POST['X_FactoryManagerEmail'])){ $InputError = 1; prnMsg(_('The Factory Manager Email address does not appear to be valid'),'error'); + }elseif (!IsEmailAddress($_POST['X_PurchasingManagerEmail'])){ + $InputError = 1; + prnMsg(_('The Purchasing Manager Email address does not appear to be valid'),'error'); }elseif (strlen($_POST['X_FrequentlyOrderedItems']) > 2 || !is_numeric($_POST['X_FrequentlyOrderedItems'])) { $InputError = 1; prnMsg(_('The number of frequently ordered items to display must be numeric'),'error'); @@ -261,6 +264,9 @@ if ($_SESSION['FactoryManagerEmail'] != $_POST['X_FactoryManagerEmail']){ $sql[] = "UPDATE config SET confvalue='" . $_POST['X_FactoryManagerEmail'] . "' WHERE confname='FactoryManagerEmail'"; } + if ($_SESSION['PurchasingManagerEmail'] != $_POST['X_PurchasingManagerEmail']){ + $sql[] = "UPDATE config SET confvalue='" . $_POST['X_PurchasingManagerEmail'] . "' WHERE confname='PurchasingManagerEmail'"; + } if ($_SESSION['AutoCreateWOs'] != $_POST['X_AutoCreateWOs']){ $sql[] = 'UPDATE config SET confvalue=' . $_POST['X_AutoCreateWOs'] . " WHERE confname='AutoCreateWOs'"; } @@ -970,7 +976,11 @@ <td><input type="text" name="X_FactoryManagerEmail" size=50 maxlength=50 value="' . $_SESSION['FactoryManagerEmail'] . '"></td> <td>' . _('Work orders automatically created when sales orders are entered will be emailed to this address') .'</td></tr>'; +echo '<tr><td>' . _('Purchasing Manager Email Address') . ':</td> + <td><input type="text" name="X_PurchasingManagerEmail" size=50 maxlength=50 value="' . $_SESSION['PurchasingManagerEmail'] . '"></td> + <td>' . _('The email address for the purchasing manager, used to receive notifications by the tendering system') .'</td></tr>'; + echo '</table><div class="centre"><input type="Submit" Name="submit" value="' . _('Update') . '"></div></form>'; include('includes/footer.inc'); Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-06-16 08:23:27 UTC (rev 3497) +++ trunk/doc/Change.log.html 2010-06-17 08:45:24 UTC (rev 3498) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>17/06/10 Tim: Enable a supplier to login and make an offer to the company</p> <p>16/06/10 Tim: SelectProduct.php - Layout improvements</p> <p>16/06/10 Tim: Customers.php - Correctly show fax and phone numbers</p> <p>16/06/10 Tim: CustloginSetup.php - Improvements to layout, and correctly get customer name</p> Copied: trunk/includes/DefineOfferClass.php (from rev 3491, trunk/includes/DefinePOClass.php) =================================================================== --- trunk/includes/DefineOfferClass.php (rev 0) +++ trunk/includes/DefineOfferClass.php 2010-06-17 08:45:24 UTC (rev 3498) @@ -0,0 +1,138 @@ +<?php +/* $Id$ */ +/* Definition of the Offer class to hold all the information for a supplier offer +*/ + + +Class Offer { + + var $LineItems; /*array of objects of class LineDetails using the product id as the pointer */ + var $CurrCode; + var $ExRate; + var $Initiator; + var $deliverydate; + var $RequisitionNo; + var $DelAdd1; + var $DelAdd2; + var $DelAdd3; + var $DelAdd4; + var $DelAdd5; + var $DelAdd6; + var $tel; + var $suppDelAdd1; + var $suppDelAdd2; + var $suppDelAdd3; + var $suppDelAdd4; + var $suppDelAdd5; + var $suppDelAdd6; + var $SupplierContact; + var $supptel; + var $Comments; + var $Location; + var $Managed; + var $SupplierID; + var $SupplierName; + var $Orig_OrderDate; + var $OrderNo; /*Only used for modification of existing orders otherwise only established when order committed */ + var $LinesOnOffer; + var $PrintedPurchaseOrder; + var $DatePurchaseOrderPrinted; + var $total; + var $GLLink; /*Is the GL link to stock activated only checked when order initiated or reading in for modification */ + var $version; + var $Stat; + var $StatComments; + var $AllowPrintPO; + var $revised; + var $deliveryby; + var $paymentterms; + var $contact; + var $port; + + function Offer(){ + /*Constructor function initialises a new purchase offer object */ + $this->LineItems = array(); + $this->total=0; + $this->LinesOnOffer=0; + } + + function add_to_offer( + $LineNo, + $StockID, + $Qty, + $ItemDescr, + $Price, + $UOM, + $DecimalPlaces){ + + if (isset($Qty) and $Qty!=0){ + + $this->LineItems[$LineNo] = new LineDetails($LineNo, + $StockID, + $Qty, + $ItemDescr, + $Price, + $UOM, + $DecimalPlaces); + $this->LinesOnOffer++; + Return 1; + } + Return 0; + } + + function update_offer_item($LineNo, + $Qty, + $Price){ + + $this->LineItems[$LineNo]->Quantity = $Qty; + $this->LineItems[$LineNo]->Price = $Price; + } + + function remove_from_offer(&$LineNo){ + $this->LineItems[$LineNo]->Deleted = True; + } + + + function Offer_Value() { + $TotalValue=0; + foreach ($this->LineItems as $OrderedItems) { + $TotalValue += ($OrderedItems->Price)*($OrderedItems->Quantity); + } + return $TotalValue; + } +} /* end of class defintion */ + +Class LineDetails { +/* PurchOrderDetails */ + var $LineNo; + var $StockID; + var $ItemDescription; + var $Quantity; + var $Price; + var $Units; + var $DecimalPlaces; + var $Deleted; + + function LineDetails ( + $LineNo, + $StockItem, + $Qty, + $ItemDescr, + $Prc, + $UOM, + $DecimalPlaces) + { + + /* Constructor function to add a new LineDetail object with passed params */ + $this->LineNo = $LineNo; + $this->StockID =$StockItem; + $this->ItemDescription = $ItemDescr; + $this->Quantity = $Qty; + $this->Price = $Prc; + $this->Units = $UOM; + $this->DecimalPlaces = $DecimalPlaces; + $this->Deleted = False; + } +} + +?> \ No newline at end of file Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2010-06-16 08:23:27 UTC (rev 3497) +++ trunk/includes/session.inc 2010-06-17 08:45:24 UTC (rev 3498) @@ -138,16 +138,16 @@ $CurrenciesResult = DB_query('SELECT currabrev FROM currencies',$db); while ($CurrencyRow = DB_fetch_row($CurrenciesResult)){ if ($CurrencyRow[0]!=$_SESSION['CompanyRecord']['currencydefault']){ - - $UpdateCurrRateResult = DB_query('UPDATE currencies SET + + $UpdateCurrRateResult = DB_query('UPDATE currencies SET rate=' . GetCurrencyRate ($CurrencyRow[0],$CurrencyRates) . " ' WHERE currabrev='" . $CurrencyRow[0] . "'",$db); } } $_SESSION['UpdateCurrencyRatesDaily'] = Date('Y-m-d'); - - - + + + $UpdateConfigResult = DB_query("UPDATE config SET confvalue = '" . Date('Y-m-d') . "' WHERE confname='UpdateCurrencyRatesDaily'",$db); } } @@ -232,6 +232,14 @@ exit; } +/* Nasty kludge to allow Supplier only logins as well as Customer logins */ +if (count($_SESSION['AllowedPageSecurityTokens'])==1 and $_SESSION['AllowedPageSecurityTokens'][0]==9 and $PageSecurity==1){ + $_SESSION['AllowedPageSecurityTokens'][0]=1; + $SupplierLogin=1; +} else { + $SupplierLogin=0; +} + if (!isset($AllowAnyone)){ if ((!in_array($PageSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PageSecurity))) { $title = _('Security Permissions Problem'); @@ -252,6 +260,11 @@ } } +/* Nasty kludge to allow Supplier only logins as well as Customer logins */ +if ($SupplierLogin==1) { + $_SESSION['AllowedPageSecurityTokens'][0]=9; +} + if (in_array(15, $_SESSION['AllowedPageSecurityTokens'])) { $debug = 1; } else { Modified: trunk/index.php =================================================================== --- trunk/index.php 2010-06-16 08:23:27 UTC (rev 3497) +++ trunk/index.php 2010-06-17 08:45:24 UTC (rev 3498) @@ -12,16 +12,16 @@ /*The module link codes are hard coded in a switch statement below to determine the options to show for each tab */ $ModuleLink = array('orders', 'AR', 'AP', 'PO', 'stock', 'manuf', 'Contracts', 'GL', 'FA', 'PC', 'system'); /*The headings showing on the tabs accross the main index used also in WWW_Users for defining what should be visible to the user */ -$ModuleList = array(_('Sales'), - _('Receivables'), - _('Payables'), - _('Purchases'), - _('Inventory'), +$ModuleList = array(_('Sales'), + _('Receivables'), + _('Payables'), + _('Purchases'), + _('Inventory'), _('Manufacturing'), - _('Contracts'), - _('General Ledger'), - _('Asset Manager'), - _('Petty Cash'), + _('Contracts'), + _('General Ledger'), + _('Asset Manager'), + _('Petty Cash'), _('Setup')); if (isset($_GET['Application'])){ /*This is sent by this page (to itself) when the user clicks on a tab */ @@ -30,9 +30,11 @@ include('includes/header.inc'); -if (count($_SESSION['AllowedPageSecurityTokens'])==1){ +if (count($_SESSION['AllowedPageSecurityTokens'])==1 and $SupplierLogin==0){ -/* if there is only one security access and its 1 (it has to be 1 for this page came up at all)- it must be a customer log on need to limit the menu to show only the customer accessible stuff this is what the page looks like for customers logging in */ +/* if there is only one security access and its 1 (it has to be 1 for this page came up at all)- it must be a customer log on + * need to limit the menu to show only the customer accessible stuff this is what the page looks like for customers logging in + */ ?> <tr> @@ -58,6 +60,20 @@ <?php include('includes/footer.inc'); exit; +} else if (count($_SESSION['AllowedPageSecurityTokens'])==1 and $SupplierLogin==1){ +?> + + <tr> + <td class="menu_group_items"> <!-- Orders transaction options --> + <table class="table_index"> + <tr> + <td class="menu_group_item"> + <?php echo '<p>• <a href="' . $rootpath . '/SupplierTenders.php?' . sid . '">' . _('Supplier Tenders') . '</a></p>'; ?> + </td> + </tr> + </table> + </td> +<?php } else { /* Security settings DO allow seeing the main menu */ ?> @@ -1300,12 +1316,12 @@ <?php echo '<p>• <a href="' . $rootpath . '/Contracts.php?' . sid . '">' . _('Create Contract') . '</a></p>'; ?> </td> </tr> - <tr> + <tr> </table> </td> <td class="menu_group_items"> <!-- Contract Costing Inquiries/Reports options --> <table width="100%" class="table_index"> - + <tr> <td class="menu_group_item"> <?php echo GetRptLinks('fa'); ?> @@ -1315,7 +1331,7 @@ </td> <td class="menu_group_items"> <!-- Contract Costing Maintenance options --> <table width="100%" class="table_index"> - + </table> </td> </table> Modified: trunk/sql/mysql/upgrade3.11.1-3.12.sql =================================================================== --- trunk/sql/mysql/upgrade3.11.1-3.12.sql 2010-06-16 08:23:27 UTC (rev 3497) +++ trunk/sql/mysql/upgrade3.11.1-3.12.sql 2010-06-17 08:45:24 UTC (rev 3498) @@ -166,13 +166,16 @@ ALTER TABLE `www_users` add `supplierid` varchar(10) NOT NULL DEFAULT '' AFTER `customerid`; INSERT INTO `securityroles` VALUES (9,'Supplier Log On Only'); +UPDATE `securitytokens` SET `tokenname`='Supplier centre - Supplier access only' WHERE tokenid=9; +INSERT INTO `securitygroups` VALUES(9,9); ALTER TABLE locations add cashsalecustomer VARCHAR(21) NOT NULL DEFAULT ''; DROP TABLE contracts; DROP TABLE contractreqts; DROP TABLE contractbom; -CREATE TABLE `contractbom` ( + +CREATE TABLE IF NOT EXISTS `contractbom` ( contractref varchar(20) NOT NULL DEFAULT '0', `stockid` varchar(20) NOT NULL DEFAULT '', `workcentreadded` char(5) NOT NULL DEFAULT '', @@ -186,7 +189,7 @@ ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE `contractreqts` ( +CREATE TABLE IF NOT EXISTS `contractreqts` ( `contractreqid` int(11) NOT NULL AUTO_INCREMENT, `contractref` varchar(20) NOT NULL DEFAULT '0', `requirement` varchar(40) NOT NULL DEFAULT '', @@ -198,7 +201,7 @@ ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE `contracts` ( +CREATE TABLE IF NOT EXISTS `contracts` ( `contractref` varchar(20) NOT NULL DEFAULT '', `contractdescription` text NOT NULL DEFAULT '', `debtorno` varchar(10) NOT NULL DEFAULT '', @@ -228,4 +231,21 @@ ALTER TABLE `salestypes` CHANGE COLUMN `sales_type` `sales_type` VARCHAR(40) NOT NULL DEFAULT ''; INSERT INTO `config` VALUES ('ShowValueOnGRN', 1); -ALTER TABLE `www_users` CHANGE COLUMN `modulesallowed` `modulesallowed` varchar(40) NOT NULL DEFAULT '1,1,1,1,1,1,1,1,1,1,1,'; \ No newline at end of file +ALTER TABLE `www_users` CHANGE COLUMN `modulesallowed` `modulesallowed` varchar(40) NOT NULL DEFAULT '1,1,1,1,1,1,1,1,1,1,1,'; + +CREATE TABLE IF NOT EXISTS `offers` ( + offerid int(11) NOT NULL AUTO_INCREMENT, + tenderid int(11) NOT NULL DEFAULT 0, + supplierid varchar(10) NOT NULL DEFAULT '', + stockid varchar(20) NOT NULL DEFAULT '', + quantity double NOT NULL DEFAULT 0.0, + uom varchar(15) NOT NULL DEFAULT '', + price double NOT NULL DEFAULT 0.0, + expirydate date NOT NULL DEFAULT '0000-00-00', + currcode char(3) NOT NULL DEFAULT '', + PRIMARY KEY (`offerid`), + CONSTRAINT `offers_ibfk_1` FOREIGN KEY (`supplierid`) REFERENCES `suppliers` (`supplierid`), + CONSTRAINT `offers_ibfk_2` FOREIGN KEY (`stockid`) REFERENCES `stockmaster` (`stockid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `config` VALUES('PurchasingManagerEmail', ''); \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-06-17 21:26:54
|
Revision: 3500 http://web-erp.svn.sourceforge.net/web-erp/?rev=3500&view=rev Author: tim_schofield Date: 2010-06-17 21:26:44 +0000 (Thu, 17 Jun 2010) Log Message: ----------- Zhiguo & Alec_H: Updates to Chinese translation Modified Paths: -------------- trunk/doc/Change.log.html trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-06-17 08:50:07 UTC (rev 3499) +++ trunk/doc/Change.log.html 2010-06-17 21:26:44 UTC (rev 3500) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>17/06/10 Zhiguo & Alec_H: Updates to Chinese translation</p> <p>17/06/10 Tim: Enable a supplier to login and make an offer to the company</p> <p>16/06/10 Tim: SelectProduct.php - Layout improvements</p> <p>16/06/10 Tim: Customers.php - Correctly show fax and phone numbers</p> Modified: trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po 2010-06-17 08:50:07 UTC (rev 3499) +++ trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po 2010-06-17 21:26:44 UTC (rev 3500) @@ -1,21 +1,22 @@ -# weberp 简体中文界面文件 -# Copyright (C) 2007 Logic Works Ltd -# This file is distributed under the same license as the webERP package. -# FIRST AUTHOR <rom...@gm...>, 2006. -# THIS VERSION FROM http://weberp-china.oicp.net +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# msgid "" msgstr "" -"Project-Id-Version: WEBERP3.05 VERSION\n" +"Project-Id-Version: WEBERP3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-12-28 10:58+1200\n" -"PO-Revision-Date: 2010-04-05 14:02+0800\n" -"Last-Translator: 曲 <hex...@ya...>\n" +"POT-Creation-Date: 2009-12-28 14:49+1200\n" +"PO-Revision-Date: 2010-06-16 00:41+0800\n" +"Last-Translator: \n" "Language-Team: WebERP Translation Team <web...@li...>\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-Language: Chinese\n" "X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" #: AccountGroups.php:9 #: index.php:1156 @@ -23,32 +24,27 @@ msgstr "科目组" #: AccountGroups.php:19 -#, fuzzy msgid "An error occurred in retrieving the account groups of the parent account group during the check for recursion" -msgstr "在BOM回环检查中查询BOM组件发生错误" +msgstr "中检索的父帐户的组帐户组的递归检查过程中发生错误" #: AccountGroups.php:20 -#, fuzzy msgid "The SQL that was used to retrieve the account groups of the parent account group and that failed in the process was" -msgstr "用于查询BOM组件失败的SQL是" +msgstr "SQL,用来检索的父帐户的组帐户组和过程中失败" #: AccountGroups.php:57 #: AccountGroups.php:94 #: AccountGroups.php:177 #: AccountGroups.php:187 -#, fuzzy msgid "The SQL that was used to retrieve the information was" -msgstr "用于查找交易数据的SQL是" +msgstr "在用来检索信息的 SQL 是" #: AccountGroups.php:58 -#, fuzzy msgid "Could not check whether the group exists because" -msgstr "未能判定物料是否存在, 因为" +msgstr "无法检查组存在的原因" #: AccountGroups.php:65 -#, fuzzy msgid "The account group name already exists in the database" -msgstr "科目组名称不能包含这个字符" +msgstr "该科目组名称已经存在" #: AccountGroups.php:71 msgid "The account group name cannot contain the character" @@ -64,18 +60,16 @@ msgstr "或这个字符" #: AccountGroups.php:77 -#, fuzzy msgid "The account group name must be at least one character long" -msgstr "联系人名称必须不少于 1 个字" +msgstr "帐户的组名称必须至少一个字符" #: AccountGroups.php:84 msgid "The parent account group selected appears to result in a recursive account structure - select an alternative parent account group or make this group a top level account group" -msgstr "" +msgstr "所选的父帐户组出现导致递归帐户结构-选择一个另类的父帐户组或使这组最高级别科目组" #: AccountGroups.php:95 -#, fuzzy msgid "Could not check whether the group is recursive because" -msgstr "未能删除仓库库存记录, 因为" +msgstr "无法检查组是否递归因为" #: AccountGroups.php:107 msgid "The section in accounts must be an integer" @@ -86,19 +80,16 @@ msgstr "试算表内行号必须是整数" #: AccountGroups.php:119 -#, fuzzy msgid "The sequence in the TB must be numeric and less than" -msgstr "试算表内行号必须是小于" +msgstr "试算表行次必须为数字且小于" #: AccountGroups.php:136 -#, fuzzy msgid "An error occurred in updating the account group" -msgstr "更新" +msgstr "更新科目组发生错误" #: AccountGroups.php:137 -#, fuzzy msgid "The SQL that was used to update the account group was" -msgstr "用于更新供应商失败的 SQL 是" +msgstr "SQL 用于更新帐户组是" #: AccountGroups.php:139 #: AccountSections.php:106 @@ -107,14 +98,12 @@ msgstr "记录已更新" #: AccountGroups.php:157 -#, fuzzy msgid "An error occurred in inserting the account group" -msgstr "插入新仓库时发生错误, 因为" +msgstr "插入科目组发生错误" #: AccountGroups.php:158 -#, fuzzy msgid "The SQL that was used to insert the account group was" -msgstr "用作插入供应商失败的 SQL 是" +msgstr "SQL 用于插入组中的帐户是" #: AccountGroups.php:159 #: AccountSections.php:118 @@ -123,9 +112,8 @@ msgstr "记录已新增" #: AccountGroups.php:176 -#, fuzzy msgid "An error occurred in retrieving the group information from chartmaster" -msgstr "查找货币时发生错误" +msgstr "从图表学习检索组信息的过程中出错" #: AccountGroups.php:181 msgid "Cannot delete this account group because general ledger accounts have been created using this group" @@ -205,40 +193,35 @@ #: AccountGroups.php:182 msgid "general ledger accounts that refer to this account group" -msgstr "属于此科目组的会计科目" +msgstr "个属于此科目组的会计科目" #: AccountGroups.php:186 -#, fuzzy msgid "An error occurred in retrieving the parent group information" -msgstr "查找货币时发生错误" +msgstr "检索该父组信息的过程中出错" #: AccountGroups.php:191 -#, fuzzy msgid "Cannot delete this account group because it is a parent account group of other account group(s)" -msgstr "删除会计科目失败, 原因是:已作为税务科目" +msgstr "不能删除此帐户的组,因为它是父帐户组的其他帐户组" #: AccountGroups.php:192 msgid "account groups that have this group as its/there parent account group" msgstr "" #: AccountGroups.php:195 -#, fuzzy msgid "An error occurred in deleting the account group" -msgstr "取得付款清单时发生错误" +msgstr "删去帐户组中的一个错误" #: AccountGroups.php:196 -#, fuzzy msgid "The SQL that was used to delete the account group was" -msgstr "用于更新供应商失败的 SQL 是" +msgstr "所用的帐户组中删除的 SQL 是" #: AccountGroups.php:198 msgid "group has been deleted" msgstr "科目组已删除" #: AccountGroups.php:223 -#, fuzzy msgid "The sql that was used to retrieve the account group information was " -msgstr "用于查找交易数据的SQL是" +msgstr "用于检索组的帐户信息的 sql 是" #: AccountGroups.php:224 msgid "Could not get account groups because" @@ -289,7 +272,7 @@ #: WorkOrderEntry.php:11 #: WWW_Users.php:37 msgid "Search" -msgstr "查找" +msgstr "搜索" #: AccountGroups.php:230 msgid "Group Name" @@ -318,9 +301,8 @@ #: AccountGroups.php:234 #: AccountGroups.php:334 -#, fuzzy msgid "Parent Group" -msgstr "片断组" +msgstr "父组" #: AccountGroups.php:250 #: AccountGroups.php:253 @@ -643,14 +625,12 @@ msgstr "查看科目组" #: AccountGroups.php:292 -#, fuzzy msgid "An error occurred in retrieving the account group information" -msgstr "查找货币时发生错误" +msgstr "检索组的帐户信息的过程中出错" #: AccountGroups.php:293 -#, fuzzy msgid "The SQL that was used to retrieve the account group and that failed in the process was" -msgstr "用于查询BOM组件失败的SQL是" +msgstr "SQL 用来检索帐户组和过程中失败" #: AccountGroups.php:307 #: GLAccounts.php:245 @@ -660,14 +640,13 @@ msgstr "科目组" #: AccountGroups.php:331 -#, fuzzy msgid "Account Group Name" msgstr "科目组名称" #: AccountGroups.php:341 #: AccountGroups.php:343 msgid "Top Level Group" -msgstr "" +msgstr "最高级别组" #: AccountGroups.php:357 msgid "Section In Accounts" @@ -721,18 +700,16 @@ msgstr "会计要素" #: AccountSections.php:68 -#, fuzzy msgid "The account section already exists in the database" -msgstr "输入的部件编码不存在于数据库" +msgstr "在数据库中已存在的帐户部分" #: AccountSections.php:75 msgid "The account section name cannot contain the character" msgstr "会计要素不能包含这个字符" #: AccountSections.php:81 -#, fuzzy msgid "The account section name must contain at least one character" -msgstr "会计要素不能包含这个字符" +msgstr "帐户一节名称必须包含至少一个字符" #: AccountSections.php:87 #: AccountSections.php:93 @@ -782,9 +759,8 @@ #: AddCustomerContacts.php:50 #: SelectCustomer.php:681 #: SelectCustomer.php:721 -#, fuzzy msgid "Customer Contacts" -msgstr "客户报价单" +msgstr "客户联系" #: AddCustomerContacts.php:20 #: CustEDISetup.php:11 @@ -794,19 +770,16 @@ msgstr "返回客户" #: AddCustomerContacts.php:32 -#, fuzzy msgid "The Contact must be an integer." -msgstr "科目编号必须是整数" +msgstr "联系必须完整" #: AddCustomerContacts.php:35 -#, fuzzy msgid "The contact's name must be forty characters or less long" -msgstr "科目名称必须不多于50个字符" +msgstr "联系人的名称必须是四十个字符或更少的长" #: AddCustomerContacts.php:38 -#, fuzzy msgid "The contact's name may not be empty" -msgstr "税类名称不能留空" +msgstr "联系人的姓名不能为空" #: AddCustomerContacts.php:50 #: AddCustomerNotes.php:49 @@ -826,19 +799,16 @@ msgstr "已更新" #: AddCustomerContacts.php:61 -#, fuzzy msgid "The contact record has been added" -msgstr "折扣已新增" +msgstr "已添加联系人记录" #: AddCustomerContacts.php:88 -#, fuzzy msgid "The contact record has been deleted" -msgstr "折扣已删除" +msgstr "联系人记录已被删除" #: AddCustomerContacts.php:98 -#, fuzzy msgid "Contacts for Customer: <b>" -msgstr "和于客户" +msgstr "客户联系人:" #: AddCustomerContacts.php:107 #: CompanyPreferences.php:227 @@ -875,9 +845,8 @@ #: AddCustomerContacts.php:109 #: Customers.php:919 -#, fuzzy msgid "Phone no" -msgstr "电话" +msgstr "电话号码" #: AddCustomerContacts.php:110 #: AddCustomerContacts.php:196 @@ -893,12 +862,11 @@ #: AddCustomerContacts.php:144 msgid "Review all contacts for this Customer" -msgstr "" +msgstr "审查该客户的所有联系方式" #: AddCustomerContacts.php:173 -#, fuzzy msgid "Contact Code" -msgstr "物料组编号" +msgstr "联系编号" #: AddCustomerContacts.php:178 #: Factors.php:180 @@ -924,47 +892,39 @@ #: AddCustomerNotes.php:49 #: SelectCustomer.php:729 #: SelectCustomer.php:768 -#, fuzzy msgid "Customer Notes" -msgstr "客户编号" +msgstr "客户备注" #: AddCustomerNotes.php:20 #: AddCustomerTypeNotes.php:20 -#, fuzzy msgid "Back to Select Customer" -msgstr "返回客户" +msgstr "返回选择客户" #: AddCustomerNotes.php:31 -#, fuzzy msgid "The contact priority must be an integer." -msgstr "科目编号必须是整数" +msgstr "联系人的优先级必须是整数" #: AddCustomerNotes.php:34 #: AddCustomerTypeNotes.php:34 -#, fuzzy msgid "The contact's notes must be two hundred characters or less long" -msgstr "科目名称必须不多于50个字符" +msgstr "联系人的说明必须是二百个字符或更少的长" #: AddCustomerNotes.php:37 #: AddCustomerTypeNotes.php:37 -#, fuzzy msgid "The contact's notes may not be empty" -msgstr "税类名称不能留空" +msgstr "联系人的说明不能留空" #: AddCustomerNotes.php:60 -#, fuzzy msgid "The contact notes record has been added" -msgstr "折扣已新增" +msgstr "已添加联系人的说明" #: AddCustomerNotes.php:87 -#, fuzzy msgid "The contact note record has been deleted" -msgstr "折扣已删除" +msgstr "联系人说明记录已经被删除" #: AddCustomerNotes.php:97 -#, fuzzy msgid "Notes for Customer: <b>" -msgstr "和于客户" +msgstr "顾客说明" #: AddCustomerNotes.php:106 #: AddCustomerNotes.php:188 @@ -1020,79 +980,66 @@ #: AddCustomerNotes.php:108 #: AddCustomerNotes.php:182 msgid "WWW" -msgstr "" +msgstr "www" #: AddCustomerNotes.php:109 #: AddCustomerNotes.php:194 #: AddCustomerTypeNotes.php:106 #: AddCustomerTypeNotes.php:181 -#, fuzzy msgid "Priority" -msgstr "利润" +msgstr "优先级" #: AddCustomerNotes.php:143 -#, fuzzy msgid "Review all notes for this Customer" -msgstr "张此客户分公司/客户的销售订单" +msgstr "此用户查看所有的说明" #: AddCustomerNotes.php:171 #: AddCustomerTypeNotes.php:169 -#, fuzzy msgid "Note ID" -msgstr "备注" +msgstr "备注 ID" #: AddCustomerNotes.php:176 -#, fuzzy msgid "Contact Note" -msgstr "物料组编号" +msgstr "联系人说明" #: AddCustomerTypeNotes.php:6 #: SelectCustomer.php:776 -#, fuzzy msgid "Customer Type (Group) Notes" -msgstr "客户已更新" +msgstr "客户类型 (集团) 说明" #: AddCustomerTypeNotes.php:31 -#, fuzzy msgid "The Contact priority must be an integer." -msgstr "科目编号必须是整数" +msgstr "联系人的优先级必须是整体" #: AddCustomerTypeNotes.php:49 #: SelectCustomer.php:816 -#, fuzzy msgid "Customer Group Notes" -msgstr "客户已更新" +msgstr "客户群体说明" #: AddCustomerTypeNotes.php:60 -#, fuzzy msgid "The contact group notes record has been added" -msgstr "折扣已新增" +msgstr "已添加客户群体说明记录" #: AddCustomerTypeNotes.php:84 -#, fuzzy msgid "The contact group note record has been deleted" -msgstr "折扣已删除" +msgstr "联系人群体说明记录已被删除" #: AddCustomerTypeNotes.php:94 -#, fuzzy msgid "Notes for Customer Type: <b>" -msgstr "和于客户" +msgstr "客户说明类型" #: AddCustomerTypeNotes.php:105 #: AddCustomerTypeNotes.php:176 -#, fuzzy msgid "href" -msgstr "首选" +msgstr "超链接" #: AddCustomerTypeNotes.php:140 -#, fuzzy msgid "Review all notes for this Customer Type" -msgstr "张此客户分公司/客户的销售订单" +msgstr "查看所有的说明为该客户类型" #: AddCustomerTypeNotes.php:174 -#, fuzzy msgid "Contact Group Note" -msgstr "科目组名称" +msgstr "联系人群体说明" #: AgedDebtors.php:17 msgid "Aged Customer Balance Listing" @@ -1367,7 +1314,6 @@ msgstr "运行失败的 SQL 是" #: AgedDebtors.php:438 -#, fuzzy msgid "There are no customers meeting the criteria specified to list" msgstr "没有符合选择条件的客户" @@ -1457,7 +1403,7 @@ #: SuppPriceList.php:231 #: Tax.php:348 msgid "Print PDF" -msgstr "打印到PDF" +msgstr "生成PDF" #: AgedSuppliers.php:18 msgid "Aged Supplier Listing" @@ -1526,9 +1472,8 @@ msgstr "区域编号长度必须是或少于3个字符" #: Areas.php:46 -#, fuzzy msgid "The area code entered already exists" -msgstr "输入的部件编码:" +msgstr "区号输入已经存在" #: Areas.php:51 msgid "The area description must be twenty five characters or less long" @@ -1567,9 +1512,8 @@ msgstr "家此区域编号的分公司" #: Areas.php:125 -#, fuzzy msgid "Cannot delete this area because sales analysis records exist that use this area" -msgstr "不能删除这个区域因为此区域已用于现有的销售分析记录" +msgstr "不能删除这方面,因为销售分析使用该区域的记录已经存在" #: Areas.php:126 msgid "sales analysis records referring this area code" @@ -1608,28 +1552,25 @@ #: AuditTrail.php:9 msgid "Audit Trail" -msgstr "" +msgstr "审计跟踪" #: AuditTrail.php:21 -#, fuzzy msgid "Incorrect date format used, please re-enter" -msgstr "输入的日期无效, 请输入有效日期格式" +msgstr "使用不正确的日期格式,请重新输入" #: AuditTrail.php:34 #: BOMIndented.php:314 #: BOMIndentedReverse.php:302 #: MRPCalendar.php:251 -#, fuzzy msgid "From Date" -msgstr "账号" +msgstr "起始日期" #: AuditTrail.php:36 #: BOMIndented.php:315 #: BOMIndentedReverse.php:303 #: MRPCalendar.php:253 -#, fuzzy msgid "To Date" -msgstr "日期" +msgstr "截止日期" #: AuditTrail.php:40 #: PO_AuthorisationLevels.php:87 @@ -1640,9 +1581,8 @@ msgstr "用户 ID" #: AuditTrail.php:53 -#, fuzzy msgid "Table " -msgstr "启用" +msgstr "目录" #: AuditTrail.php:64 #: PO_SelectPurchOrder.php:370 @@ -1650,15 +1590,13 @@ msgstr "查看" #: AuditTrail.php:141 -#, fuzzy msgid "Date/Time" -msgstr "日期" +msgstr "日期/时间" #: AuditTrail.php:142 #: includes/header.inc:42 -#, fuzzy msgid "User" -msgstr "用户 ID" +msgstr "用户" #: AuditTrail.php:143 #: BankReconciliation.php:183 @@ -1691,17 +1629,15 @@ #: includes/InputSerialItemsFile.php:126 #: includes/PDFTaxPageHeader.inc:34 msgid "Type" -msgstr "凭证类型" +msgstr "类型" #: AuditTrail.php:144 -#, fuzzy msgid "Table" -msgstr "启用" +msgstr "表格" #: AuditTrail.php:145 -#, fuzzy msgid "Field Name" -msgstr "全名" +msgstr "域名" #: AuditTrail.php:146 #: SystemParameters.php:300 @@ -1712,7 +1648,7 @@ #: BankAccounts.php:9 msgid "Bank Accounts Maintenance" -msgstr "银行账号" +msgstr "银行账户" #: BankAccounts.php:13 #: TaxAuthorities.php:147 @@ -1721,29 +1657,27 @@ #: BankAccounts.php:14 msgid "Update Bank Account details. Account Code is for SWIFT or BSB type Bank Codes. Set Default for Invoices to \"yes\" to print Account details on Invoices (only one account can be set to \"yes\")." -msgstr "" +msgstr "更新账户详细信息。守则是对于 SWIFT 或 BSB 的帐户键入银行代码。设置默认值为\"yes\"发票,(只有一个帐户可以将设置为\"是\") 的发票上打印帐户详细信息" #: BankAccounts.php:46 -#, fuzzy msgid "The bank account code already exists in the database" -msgstr "输入的部件编码不存在于数据库" +msgstr "银行账户代码已经存在于数据库" #: BankAccounts.php:52 msgid "The bank account name must be fifty characters or less long" -msgstr "银行账号名称长度必须是或少于50个字" +msgstr "银行账户名称长度必须是或少于50个字" #: BankAccounts.php:58 msgid "The bank account name may not be empty." -msgstr "银行账号名称不能留空" +msgstr "银行账户名称不能留空" #: BankAccounts.php:64 -#, fuzzy msgid "The bank account number may not be empty." -msgstr "银行账号名称不能留空" +msgstr "银行账户不能留空" #: BankAccounts.php:70 msgid "The bank account number must be fifty characters or less long" -msgstr "银行帐号长度必须是或少于50个字" +msgstr "银行账户长度必须是或少于50个字" #: BankAccounts.php:76 msgid "The bank address must be fifty characters or less long" @@ -1751,66 +1685,63 @@ #: BankAccounts.php:95 msgid "Note that it is not possible to change the currency of the account once there are transactions against it" -msgstr "" +msgstr "请注意,不可能去改变货币的账户,一旦反对交易。" #: BankAccounts.php:108 msgid "The bank account details have been updated" -msgstr "银行帐号已更新" +msgstr "银行账户已更新" #: BankAccounts.php:129 msgid "The new bank account has been entered" -msgstr "新建银行账号成功" +msgstr "新建银行账户成功" #: BankAccounts.php:134 msgid "The bank account could not be inserted or modified because" -msgstr "新建或更新银行账号失败,原因是" +msgstr "新建或更新银行账户失败,原因是" #: BankAccounts.php:135 msgid "The SQL used to insert/modify the bank account details was" -msgstr "用于新建或更新银行账号的SQL是" +msgstr "用于新建或更新银行账户的SQL是" #: BankAccounts.php:162 msgid "Cannot delete this bank account because transactions have been created using this account" -msgstr "不能删除此银行账号,因为此账号已有交易" +msgstr "不能删除此银行账户,因为此账号已有交易" #: BankAccounts.php:163 msgid "transactions with this bank account code" -msgstr "笔此银行账号的交易" +msgstr "笔此银行账户的交易" #: BankAccounts.php:169 msgid "Bank account deleted" -msgstr "银行账号已删除" +msgstr "银行账户已删除" #: BankAccounts.php:190 -#, fuzzy msgid "The bank accounts set up could not be retrieved because" -msgstr "银行账号没找到,原因是" +msgstr "银行账户不能检索设立是由于" #: BankAccounts.php:191 msgid "The SQL used to retrieve the bank account details was" -msgstr "用于查找银行账号的SQL是" +msgstr "用于查找银行账户的SQL是" #: BankAccounts.php:196 #: GLJournal.php:272 -#, fuzzy msgid "GL Account Code" -msgstr "科目编号" +msgstr "总账科目" #: BankAccounts.php:197 #: BankAccounts.php:325 msgid "Bank Account Name" -msgstr "银行账号名称" +msgstr "银行账户名称" #: BankAccounts.php:198 #: BankAccounts.php:327 -#, fuzzy msgid "Bank Account Code" -msgstr "会计科目" +msgstr "银行代码" #: BankAccounts.php:199 #: BankAccounts.php:329 msgid "Bank Account Number" -msgstr "银行账号" +msgstr "银行账户" #: BankAccounts.php:200 #: BankAccounts.php:331 @@ -1845,28 +1776,25 @@ #: BankAccounts.php:202 #: BankAccounts.php:350 -#, fuzzy msgid "Default for Invoices" -msgstr "删除发票" +msgstr "发票默认" #: BankAccounts.php:251 msgid "Show All Bank Accounts Defined" -msgstr "显示全部银行账号" +msgstr "显示全部银行账户" #: BankAccounts.php:283 #: BankAccounts.php:286 msgid "Bank Account GL Code" -msgstr "会计科目" +msgstr "银行账户科目" #: BankAccounts.php:333 -#, fuzzy msgid "Currency Of Account" -msgstr "销售成本科目" +msgstr "记帐货币" #: BankMatching.php:8 -#, fuzzy msgid "Bank Account Matching" -msgstr "银行对账-收款" +msgstr "银行账户匹配" #: BankMatching.php:13 #: Z_CheckDebtorsControl.php:79 @@ -1875,14 +1803,12 @@ #: BankMatching.php:14 #: BankMatching.php:18 -#, fuzzy msgid "Bank Matching" -msgstr "核对收款" +msgstr "银行结算" #: BankMatching.php:14 -#, fuzzy msgid "Bank Account Matching - Receipts" -msgstr "银行对账-收款" +msgstr "银行对账-收据" #: BankMatching.php:17 #: PaymentAllocations.php:33 @@ -1890,9 +1816,8 @@ msgstr "付款" #: BankMatching.php:18 -#, fuzzy msgid "Bank Account Matching - Payments" -msgstr "银行对账-收款" +msgstr "银行账户匹配-支付" #: BankMatching.php:20 msgid "This page must be called with a bank transaction type" @@ -1903,14 +1828,12 @@ msgstr "不能直接调用" #: BankMatching.php:33 -#, fuzzy msgid "Could not retrieve transaction information" -msgstr "找不到此应收交易对应的总帐分录" +msgstr "无法检索的交易信息" #: BankMatching.php:40 -#, fuzzy msgid "Could not match off this payment because" -msgstr "无法确认这笔付款, 因为" +msgstr "未能确认此付款是因为" #: BankMatching.php:50 msgid "Could not update the amount matched off this bank transaction because" @@ -1922,7 +1845,7 @@ #: BankMatching.php:64 msgid "Use this screen to match webERP Receipts and Payments to your Bank Statement. Check your bank statement and click the check-box when you find the matching transaction." -msgstr "" +msgstr "\"使用此屏幕以匹配您的银行结单的 webERP 收支。请检查您银行对帐单,当您找到匹配的交易记录,请单击复选框\"" #: BankMatching.php:71 #: BankReconciliation.php:95 @@ -1932,7 +1855,7 @@ #: TaxAuthorities.php:148 #: TaxAuthorities.php:295 msgid "Bank Account" -msgstr "银行账号" +msgstr "银行账户" #: BankMatching.php:93 #: PO_SelectOSPurchOrder.php:462 @@ -2166,56 +2089,49 @@ #: BankReconciliation.php:19 msgid "The entry in the bank statement balance is not numeric. The balance on the bank statement should be entered. The exchange difference has not been calculated and no general ledger journal has been created" -msgstr "" +msgstr "银行对账单条目不是数字的,应输入银行月结单上的剩余。交换的区别没有被计算并总帐日志未已被创建" #: BankReconciliation.php:28 -#, fuzzy msgid "Could not retrieve the exchange rate for the selected bank account" -msgstr "未能取得收货单, 因为" +msgstr "无法检索所选的银行账户的汇率" #: BankReconciliation.php:58 #: BankReconciliation.php:75 -#, fuzzy msgid "reconciliation on" -msgstr "显示银行对账单" +msgstr "对帐上" #: BankReconciliation.php:60 -#, fuzzy msgid "Cannot insert a GL entry for the exchange difference because" -msgstr "未能插入收款的总账凭证, 因为" +msgstr "不能插入一个总账的汇兑差额,因为" #: BankReconciliation.php:61 -#, fuzzy msgid "The SQL that failed to insert the exchange difference GL entry was" -msgstr "插入收款总账凭证失败的SQL是" +msgstr "SQL 插入交换不同总帐项失败是" #: BankReconciliation.php:81 -#, fuzzy msgid "Exchange difference of" -msgstr "期间差异" +msgstr "交换不同的" #: BankReconciliation.php:81 -#, fuzzy msgid "has been posted" -msgstr "已结算" +msgstr "已公布" #: BankReconciliation.php:91 #: SuppPaymentRun.php:296 msgid "The bank accounts could not be retrieved by the SQL because" -msgstr "找不到银行账号,因为" +msgstr "找不到银行账户,因为" #: BankReconciliation.php:92 #: CustomerReceipt.php:693 #: Payments.php:703 #: SuppPaymentRun.php:298 -#, fuzzy msgid "The SQL used to retrieve the bank accounts was" -msgstr "找不到银行账号的SQL是" +msgstr "SQL 用于检索银行账户是" #: BankReconciliation.php:98 #: CustomerReceipt.php:703 msgid "Bank Accounts have not yet been defined" -msgstr "尚未定义银行账号" +msgstr "尚未定义银行账户" #: BankReconciliation.php:98 #: CustomerReceipt.php:703 @@ -2227,7 +2143,7 @@ #: Payments.php:710 #: SuppPaymentRun.php:306 msgid "define the bank accounts" -msgstr "定义银行账号" +msgstr "定义银行账户" #: BankReconciliation.php:98 #: CustomerReceipt.php:703 @@ -2242,25 +2158,23 @@ #: BankReconciliation.php:132 msgid "The bank account balance could not be returned by the SQL because" -msgstr "银行账号余额没找到,原因是" +msgstr "银行账户余额没找到,原因是" #: BankReconciliation.php:145 -#, fuzzy msgid "Could not retrieve the currency and exchange rate for the selected bank account" -msgstr "未能取得收货单, 因为" +msgstr "无法检索的货币和汇率为所选的银行账户" #: BankReconciliation.php:153 -#, fuzzy msgid "Balance as at" -msgstr "截止" +msgstr "结余于" #: BankReconciliation.php:176 msgid "The unpresented cheques could not be retrieved by the SQL because" -msgstr "未找到企业已付银行未付记录, 因为" +msgstr "未找到企业已付银行的未清算记录, 因为" #: BankReconciliation.php:179 msgid "Add back unpresented cheques" -msgstr "加:企业已付银行未付" +msgstr "加:企业已付银行未清算" #: BankReconciliation.php:184 #: BankReconciliation.php:256 @@ -2311,7 +2225,7 @@ #: includes/PDFBankingSummaryPageHeader.inc:40 #: includes/PDFStockComparisonPageHeader.inc:36 msgid "Reference" -msgstr "摘要" +msgstr "参考" #: BankReconciliation.php:186 #: BankReconciliation.php:258 @@ -2320,37 +2234,36 @@ #: BankReconciliation.php:229 msgid "Total of all unpresented cheques" -msgstr "企业已付银行未付合计:" +msgstr "企业已付银行未清算合计:" #: BankReconciliation.php:247 msgid "The uncleared deposits could not be retrieved by the SQL because" -msgstr "未找到企业已收银行未收记录, 因为" +msgstr "未找到企业已收银行的未清算记录, 因为" #: BankReconciliation.php:251 msgid "Less deposits not cleared" -msgstr "减:企业已收银行未收" +msgstr "减:企业已收银行未清算" #: BankReconciliation.php:301 msgid "Total of all uncleared deposits" -msgstr "企业已收银行未收合计:" +msgstr "企业已收银行未清算合计:" #: BankReconciliation.php:303 msgid "Bank statement balance should be" msgstr "银行对账单余额应是" #: BankReconciliation.php:307 -#, fuzzy msgid "Enter the actual bank statement balance" -msgstr "输入要执行付款的日期" +msgstr "输入实际银行对账单结算" #: BankReconciliation.php:309 #: BankReconciliation.php:319 msgid "Calculate and Post Exchange Difference" -msgstr "" +msgstr "计算与兑换差异" #: BankReconciliation.php:309 msgid "This will create a general ledger journal to write off the exchange difference in the current balance of the account. It is important that the exchange rate above reflects the current value of the bank account currency" -msgstr "" +msgstr "这将创建一个总账去冲销当前的收支平衡帐户兑换不同。重要的是上述的汇率反映了银行账户币种的当前值" #: BankReconciliation.php:309 #: Customers.php:958 @@ -2360,11 +2273,11 @@ #: WorkOrderCosting.php:510 #: WorkOrderEntry.php:513 msgid "Are You Sure?" -msgstr "确信要删除么?" +msgstr "确认要删除吗?" #: BankReconciliation.php:318 msgid "It is normal for foreign currency accounts to have exchange differences that need to be reflected as the exchange rate varies. This reconciliation is prepared using the exchange rate set up in the currencies table (see the set-up tab). This table must be maintained with the current exchange rate before running the reconciliation. If you wish to create a journal to reflect the exchange difference based on the current exchange rate to correct the reconciliation to the actual bank statement balance click below." -msgstr "" +msgstr "这是正常的外币帐户具有需要得到反映,交换率因不同地点而异的交换差异。该对帐已准备好使用汇率设置货币表中 (请参见设置选项表上的)。此表必须与当前汇率保持在运行对帐前。如果您想要创建一个分类账,以反映兑换不同基于当前汇率来更正实际银行对账单平衡对帐,点击下面。" #: BankReconciliation.php:324 msgid "Match off cleared payments" @@ -2380,49 +2293,43 @@ #: BOMExtendedQty.php:283 #, fuzzy msgid "Quantity Extended BOM Listing" -msgstr "未开发票数量" +msgstr "扩展物料清单数量" #: BOMExtendedQty.php:34 #: BOMIndentedReverse.php:30 #: MRPCalendar.php:85 #: MRP.php:30 #: SalesInquiry.php:1190 -#, fuzzy msgid "The SQL to to create passbom failed with the message" -msgstr "查找物料的SQL运行失败,数据库消息" +msgstr "创建通过物料清单失败,其SQL消息是" #: BOMExtendedQty.php:47 #: BOMIndented.php:42 #: BOMIndentedReverse.php:43 #: MRP.php:38 -#, fuzzy msgid "Create of tempbom failed because" -msgstr "新增税收组失败, 因为" +msgstr "创建临时物料清单失败,因为" #: BOMExtendedQty.php:158 -#, fuzzy msgid "The Quantiy Extended BOM Listing could not be retrieved by the SQL because" -msgstr "未能由 SQL 提取保安代符清单, 因为" +msgstr "扩展物料清单数量不能被检索,SQL是" #: BOMExtendedQty.php:260 #: BOMIndented.php:235 -#, fuzzy msgid "Print Indented BOM Listing Error" -msgstr "库存价值报表打印错误" +msgstr "打印缩排式物料清单错误" #: BOMExtendedQty.php:262 #: BOMIndented.php:237 -#, fuzzy msgid "There were no items for the selected assembly" -msgstr "报价单中没有物料" +msgstr "没有为所选的程序集的项目" #: BOMExtendedQty.php:287 #: BOMIndented.php:263 #: BOMIndentedReverse.php:257 #: MRPReport.php:510 -#, fuzzy msgid "Part" -msgstr "打印" +msgstr "成分" #: BOMExtendedQty.php:288 #: BOMExtendedQty.php:339 @@ -2512,19 +2419,16 @@ msgstr "数量" #: BOMExtendedQty.php:289 -#, fuzzy msgid "Selection Option" -msgstr "会计要素名称" +msgstr "选择选项" #: BOMExtendedQty.php:290 -#, fuzzy msgid "Show All Parts" -msgstr "显示全部订单" +msgstr "显示所有部分" #: BOMExtendedQty.php:291 -#, fuzzy msgid "Only Show Shortages" -msgstr "只显示剩余订单" +msgstr "只显示不足" #: BOMExtendedQty.php:293 #: BOMIndented.php:271 @@ -2533,9 +2437,8 @@ #: MRPPlannedWorkOrders.php:236 #: MRPReschedules.php:141 #: MRPShortages.php:228 -#, fuzzy msgid "Print Option" -msgstr "打印报价单" +msgstr "打印选项" #: BOMExtendedQty.php:294 #: BOMIndented.php:272 @@ -2545,7 +2448,7 @@ #: MRPReschedules.php:142 #: MRPShortages.php:229 msgid "Print With Alternating Highlighted Lines" -msgstr "" +msgstr "交互式高亮行打印" #: BOMExtendedQty.php:295 #: BOMIndented.php:273 @@ -2554,13 +2457,12 @@ #: MRPPlannedWorkOrders.php:238 #: MRPReschedules.php:143 #: MRPShortages.php:230 -#, fuzzy msgid "Plain Print" -msgstr "空白打印纸" +msgstr "普通打印" #: BOMExtendedQty.php:319 msgid "Extended Quantity BOM Listing For " -msgstr "" +msgstr "扩展物料清单数量" #: BOMExtendedQty.php:321 #: BOMIndented.php:300 @@ -2673,14 +2575,12 @@ msgstr "页" #: BOMExtendedQty.php:324 -#, fuzzy msgid "Build Quantity: " -msgstr "数量" +msgstr "生产量" #: BOMExtendedQty.php:331 -#, fuzzy msgid "Build" -msgstr "重建" +msgstr "生产" #: BOMExtendedQty.php:332 #: BOMInquiry.php:102 @@ -2701,9 +2601,8 @@ msgstr "库存数量" #: BOMExtendedQty.php:333 -#, fuzzy msgid "P.O." -msgstr "采购订单" +msgstr "汇票" #: BOMExtendedQty.php:334 msgid "W.O." @@ -2742,9 +2641,8 @@ #: SalesInquiry.php:1154 #: StockDispatch.php:340 #: StockDispatch.php:347 -#, fuzzy msgid "Part Number" -msgstr "传真" +msgstr "产品型号" #: BOMExtendedQty.php:337 #: BOMIndented.php:309 @@ -2767,9 +2665,8 @@ #: BOMExtendedQty.php:343 #: MRPShortages.php:277 -#, fuzzy msgid "Shortage" -msgstr "显示用量" +msgstr "不足" #: BOMIndented.php:14 #: BOMIndented.php:15 @@ -2779,35 +2676,29 @@ #: BOMIndentedReverse.php:15 #: BOMIndentedReverse.php:16 #: BOMIndentedReverse.php:148 -#, fuzzy msgid "Indented BOM Listing" -msgstr "付款清单" +msgstr "缩排式物料清单" #: BOMIndented.php:29 -#, fuzzy msgid "The SQL to create passbom failed with the message" -msgstr "查找物料的SQL运行失败,数据库消息" +msgstr "创建通过式物料清单失败,SQL消息是" #: BOMIndented.php:151 #: BOMIndentedReverse.php:150 -#, fuzzy msgid "The Indented BOM Listing could not be retrieved by the SQL because" -msgstr "图像清单未能由SQL 提取, 因为" +msgstr "缩排式物料清单不能被检索,其SQL是" #: BOMIndented.php:266 -#, fuzzy msgid "Levels" -msgstr "层" +msgstr "色彩级别" #: BOMIndented.php:267 -#, fuzzy msgid "All Levels" -msgstr "层" +msgstr "各级" #: BOMIndented.php:268 -#, fuzzy msgid "One Level" -msgstr "层" +msgstr "一个级别" #: BOMIndented.php:310 #: BOMIndentedReverse.php:298 @@ -2971,39 +2862,34 @@ msgstr "" #: BOMIndented.php:321 -#, fuzzy msgid "Assembly:" -msgstr "装配物料" +msgstr "组装" #: BOMIndented.php:326 #: BOMIndentedReverse.php:312 msgid " 12345678901234567890" -msgstr "" +msgstr " 12345678901234567890" #: BOMIndentedReverse.php:232 -#, fuzzy msgid "Print Reverse Indented BOM Listing Error" -msgstr "打印客户清单错误" +msgstr "打印相反缩排式物料清单错误" #: BOMIndentedReverse.php:234 -#, fuzzy msgid "There were no items for the selected component" -msgstr "报价单中没有物料" +msgstr "没有所选组件的项目" #: BOMIndentedReverse.php:253 #: BOMIndentedReverse.php:287 -#, fuzzy msgid "Reverse Indented BOM Listing" -msgstr "已开发票订单清单" +msgstr "相反缩排式物料清单" #: BOMIndentedReverse.php:306 -#, fuzzy msgid "Component:" -msgstr "组件" +msgstr "组件 " #: BOMInquiry.php:7 msgid "Costed Bill Of Material" -msgstr "BOM成本" +msgstr "创建物料清单" #: BOMInquiry.php:18 #: BOMs.php:803 @@ -3013,12 +2899,11 @@ #: BOMInquiry.php:18 #: BOMs.php:803 msgid "or Assembly or Kit part" -msgstr "或装配物料, 或套装物料" +msgstr "或装配物料, 或套装工具" #: BOMInquiry.php:19 -#, fuzzy msgid "to view the costed bill of materials" -msgstr "查看BOM成本" +msgstr "若要查看的材料成本的清单" #: BOMInquiry.php:20 #: BOMs.php:805 @@ -3033,7 +2918,7 @@ #: BOMInquiry.php:21 #: BOMs.php:806 msgid "kits or assemblies to be available for construction of a bill of material" -msgstr "可构成BOM的装配物料或套装物料" +msgstr "套装工具/装配物料 对构建物料清单有效" #: BOMInquiry.php:22 #: BOMs.php:807 @@ -3149,7 +3034,7 @@ #: WorkOrderEntry.php:551 #: WorkOrderIssue.php:643 msgid "Search Now" -msgstr "查找" +msgstr "搜索" #: BOMInquiry.php:35 #: BOMs.php:737 @@ -3172,7 +3057,7 @@ #: BOMs.php:740 #: MRPDemands.php:57 msgid "At least one stock description keyword or an extract of a stock code must be entered for the search" -msgstr "请输入物料描述或物料编号用于查找物料BOM" +msgstr "必需输入一个 物料描述/物料编号 关键词" #: BOMInquiry.php:91 #: BOMs.php:793 @@ -3259,11 +3144,11 @@ #: BOMInquiry.php:160 msgid "The bill of material could not be retrieved because" -msgstr "找不到BOM,因为" +msgstr "找不到物料清单,因为" #: BOMInquiry.php:164 msgid "The bill of material for this part is not set up" -msgstr "物料的BOM没有维护" +msgstr "这一部分物料清单中的未设置" #: BOMInquiry.php:164 msgid "there are no components defined for it" @@ -3297,26 +3182,26 @@ #: BOMInquiry.php:222 msgid "to view the costed bill of material for" -msgstr "查看BOM成本" +msgstr "查看的物料成本的清单" #: BOMListing.php:18 #: BOMListing.php:19 #: BOMListing.php:126 msgid "Bill Of Material Listing" -msgstr "BOM清单" +msgstr "物料清单表" #: BOMListing.php:48 #: BOMListing.php:59 msgid "Bill of Materials Listing" -msgstr "BOM清单" +msgstr "物料清单表" #: BOMListing.php:50 msgid "The Bill of Material listing could not be retrieved by the SQL because" -msgstr "取得BOM的SQL运行失败, 因为" +msgstr "取得物料清单的数据 SQL 行失败, 因为" #: BOMListing.php:61 msgid "The Bill of Material listing has no bills to report on" -msgstr "指定范围内无BOM:" +msgstr "指定范围内无物料清单:" #: BOMListing.php:135 msgid "From Inventory Part Code" @@ -3328,31 +3213,31 @@ #: BOMs.php:9 msgid "Multi-Level Bill Of Materials Maintenance" -msgstr "多层BOM维护" +msgstr "多层物料清单维护" #: BOMs.php:36 msgid "A maximum of 15 levels of bill of materials only can be displayed" -msgstr "最多只能显示15层的BOM" +msgstr "最多只能显示15层的物料清单" #: BOMs.php:57 msgid "An error occurred in retrieving the components of the BOM during the check for recursion" -msgstr "在BOM回环检查中查询BOM组件发生错误" +msgstr "在物料回环检查中查询物料清单组件发生错误" #: BOMs.php:58 msgid "The SQL that was used to retrieve the components of the BOM and that failed in the process was" -msgstr "用于查询BOM组件失败的SQL是" +msgstr "检索物料清单组成失败,其SQL过程是" #: BOMs.php:106 msgid "Could not retrieve the BOM components because" -msgstr "找不到BOM组件,因为" +msgstr "找不到物料清单组成,因为" #: BOMs.php:107 msgid "The SQL used to retrieve the components was" -msgstr "用于查询BOM组件的SQL是" +msgstr "用于查询物料清单组件的数据是" #: BOMs.php:121 msgid "Drill Down" -msgstr "子BOM" +msgstr "深度分析" #: BOMs.php:126 #: BOMs.php:132 @@ -3368,7 +3253,7 @@ #: SelectProduct.php:612 #: SelectProduct.php:613 msgid "N/A" -msgstr "无" +msgstr "不适用" #: BOMs.php:224 msgid "The effective after date field must be a date in the format dd/mm/yy or dd/mm/yyyy or ddmmyy or ddmmyyyy or dd-mm-yy or dd-mm-yyyy" @@ -3416,15 +3301,15 @@ #: BOMs.php:259 msgid "Only non-serialised or non-lot controlled items can be set to auto issue. These items require the lot/serial numbers of items issued to the works orders to be specified so autoissue is not an option. Auto issue has been automatically set to off for this component" -msgstr "" +msgstr "唯有非连载或不多受管制的物品可以将其设置为自动发行。这些事项要求把更多/序列号发给规定的工作订单,所以自动发行并不是一个选择。自动发行已经被自动设置为关闭此组件" #: BOMs.php:283 msgid "Could not update this BOM component because" -msgstr "不能更新此BOM组件, 因为" +msgstr "不能更新此物料清单组件, 因为" #: BOMs.php:284 msgid "The SQL used to update the component was" -msgstr "用作更新BOM组件的SQL是" +msgstr "用作更新物料清单组件的数据是" #: BOMs.php:287 msgid "Details for" @@ -3436,27 +3321,27 @@ #: BOMs.php:306 msgid "An error occurred in checking the component is not already on the BOM" -msgstr "检查组件件是否已经在BOM内时发生错误" +msgstr "检索组件发生错误,该组件不在物料清单内" #: BOMs.php:307 msgid "The SQL that was used to check the component was not already on the BOM and that failed in the process was" -msgstr "用作检查组件是否已经在BOM内而执行失败的SQL是" +msgstr "用作检查组件是否已经在B物料清单内而执行失败的 SQL 是" #: BOMs.php:330 msgid "Could not insert the BOM component because" -msgstr "不能插入BOM组件,因为" +msgstr "不能插入物料清单组件,因为" #: BOMs.php:331 msgid "The SQL used to insert the component was" -msgstr "用于插入BOM组件的SQL是" +msgstr "用于插入物料清单组件的 SQL 是" #: BOMs.php:336 msgid "A new component part" -msgstr "新的BOM组件" +msgstr "新的物料组件" #: BOMs.php:336 msgid "has been added to the bill of material for part" -msgstr "已插入到物料的BOM" +msgstr "已插入到物料的物料清单" #: BOMs.php:343 msgid "The component" @@ -3464,19 +3349,19 @@ #: BOMs.php:343 msgid "is already recorded as a component of" -msgstr "已经作为此物料BOM的组件" +msgstr "已将将其记录为一个组件" #: BOMs.php:343 msgid "Whilst the quantity of the component required can be modified it is inappropriate for a component to appear more than once in a bill of material" -msgstr "BOM中包含某个组件的数量是可以修改的, 但一个物料在BOM中多次出现是不恰当的" +msgstr "物料清单中包含某个组件的数量是可以修改的, 但一个物料在物料清单中多次出现是不恰当的" #: BOMs.php:360 msgid "Could not delete this BOM components because" -msgstr "不能删除BOM, 因为" +msgstr "不能删除物料清单, 因为" #: BOMs.php:361 msgid "The SQL used to delete the BOM was" -msgstr "用作删除BOM的SQL是" +msgstr "用作删除物料清单的SQL语句是" #: BOMs.php:369 msgid "The component part" @@ -3484,7 +3369,7 @@ #: BOMs.php:369 msgid "has been deleted from this BOM" -msgstr "已从BOM中删除" +msgstr "已从物料清单中删除" #: BOMs.php:392 #: BOMs.php:435 @@ -3500,7 +3385,7 @@ #: BOMs.php:478 #: BOMs.php:498 msgid "The SQL used to retrieve description of the parent part was" -msgstr "用于查找父物料描述的SQL是" +msgstr "用于查找父物料描述的 SQL 是" #: BOMs.php:402 #: ConfirmDispatch_Invoice.php:963 @@ -3530,22 +3415,22 @@ #: BOMs.php:411 msgid "Kit Set" -msgstr "套装物料" +msgstr "套装工具" #: BOMs.php:414 #: BOMs.php:501 #: Stocks.php:784 #: Stocks.php:786 msgid "Phantom" -msgstr "" +msgstr "图纸" #: BOMs.php:420 msgid "Select a Different BOM" -msgstr "选择其他BOM" +msgstr "选择其他物料清单" #: BOMs.php:423 msgid "Review Components" -msgstr "显示BOM组件" +msgstr "显示物料清单组件" #: BOMs.php:441 msgid "Manufactured parent items" @@ -3557,13 +3442,13 @@ #: BOMs.php:481 msgid "Kit sets" -msgstr "套装物料" +msgstr "套装工具" #: BOMs.php:520 #: InventoryQuantities.php:225 #: ReorderLevel.php:269 msgid "Level" -msgstr "层" +msgstr "级" #: BOMs.php:523 #: BOMs.php:635 @@ -3613,14 +3498,12 @@ #: BOMs.php:528 #: WorkOrderIssue.php:591 #: WorkOrderStatus.php:83 -#, fuzzy msgid "Auto Issue" -msgstr "要发出的数量" +msgstr "自动发行" #: BOMs.php:529 -#, fuzzy msgid "Qty On Hand" -msgstr "在手数量" +msgstr "现存数量" #: BOMs.php:533 msgid "No materials found." @@ -3628,11 +3511,11 @@ #: BOMs.php:583 msgid "Edit the details of the selected component in the fields below" -msgstr "在下面修改选定BOM组件信息" +msgstr "在下面修改选定物料清单组件信息" #: BOMs.php:583 msgid "Click on the Enter Information button to update the component details" -msgstr "点保存按钮更新BOM组件信息" +msgstr "点保存,更新物料清单组件信息" #: BOMs.php:593 msgid "Component code" @@ -3663,21 +3546,20 @@ msgstr "工作中心" #: BOMs.php:703 -#, fuzzy msgid "Auto Issue this Component to Work Orders" -msgstr "发出存货物料到工作单" +msgstr "自动发出存货物料到工作单" #: BOMs.php:804 msgid "to maintain the bill of material for using the options below" -msgstr "维护物料BOM,输入以下选择条件" +msgstr "维护物料清单,输入以下选择条件" #: COGSGLPostings.php:9 msgid "Cost Of Sales GL Postings Set Up" -msgstr "销售成本科目设置" +msgstr "销售成本科目配置" #: COGSGLPostings.php:36 msgid "Cost of sales GL posting code has been updated" -msgstr "销售成本科目设置已更新" +msgstr "销售成本总账过账已更新" #: COGSGLPostings.php:52 msgid "A new cost of sales posting code has been inserted" @@ -3783,7 +3665,7 @@ #: COGSGLPostings.php:316 msgid "Post to GL account" -msgstr "销售成本科目" +msgstr "发布总账科目" #: CompanyPreferences.php:10 #: index.php:863 @@ -3797,21 +3679,21 @@ #: CompanyPreferences.php:40 #: Customers.php:63 msgid "The Line 1 of the address must be forty characters or less long" -msgstr "地址列1最长40字" +msgstr "街道 最长40字" #: CompanyPreferences.php:46 #: Customers.php:68 msgid "The Line 2 of the address must be forty characters or less long" -msgstr "地址列2最长40字" +msgstr "城市/市区 最长40字" #: CompanyPreferences.php:52 #: Customers.php:73 msgid "The Line 3 of the address must be forty characters or less long" -msgstr "地址列3最长40字" +msgstr "国家 最长40字" #: CompanyPreferences.php:58 msgid "The Line 4 of the address must be forty characters or less long" -msgstr "地址列4最长40字" +msgstr "邮政编码 最长40字" #: CompanyPreferences.php:64 #: Customers.php:83 @@ -3836,9 +3718,8 @@ msgstr "电子邮件地址最长55字" #: CompanyPreferences.php:94 -#, fuzzy msgid "The email address is not correctly formed" -msgstr "输入的分公司不存在" +msgstr "电子邮件地址模型不正确" #: CompanyPreferences.php:129 msgid "The company preferences could not be updated because" @@ -3849,9 +3730,8 @@ msgstr "公司参数已更新" #: CompanyPreferences.php:143 -#, fuzzy msgid "Could not update the currency rates" -msgstr "更新会计科目失败,原因是:" +msgstr "无法更新通货汇率" #: CompanyPreferences.php:153 #: Customers.php:274 @@ -3888,25 +3768,25 @@ #: Factors.php:174 #: Factors.php:189 msgid "Address Line 1" -msgstr "地址列1" +msgstr "街道" #: CompanyPreferences.php:243 #: Factors.php:175 #: Factors.php:190 msgid "Address Line 2" -msgstr "地址列2" +msgstr "城市/市区" #: CompanyPreferences.php:247 #: Factors.php:176 #: Factors.php:191 msgid "Address Line 3" -msgstr "地址列3" +msgstr "国家" #: CompanyPreferences.php:251 #: Factors.php:177 #: Factors.php:192 msgid "Address Line 4" -msgstr "地址列4" +msgstr "邮政编码" #: CompanyPreferences.php:255 #: Customers.php:449 @@ -3942,7 +3822,7 @@ #: CompanyPreferences.php:278 msgid "Home Currency" -msgstr "本位币" +msgstr "本国货币" #: CompanyPreferences.php:300 msgid "Debtors Control GL Account" @@ -4090,9 +3970,8 @@ msgstr "销售订单" #: ConfirmDispatch_Invoice.php:11 -#, fuzzy msgid "Confirm Dispatches and Invoice An Order" -msgstr "对销售订单发运及开发票" +msgstr "确认急件、发票及订单" #: ConfirmDispatch_Invoice.php:25 msgid "This page can only be opened if an order has been selected Please select an order first from the delivery details screen click on Confirm for invoicing" @@ -4127,14 +4006,12 @@ msgstr "找不到订单行, 请选择其他订单" #: ConfirmDispatch_Invoice.php:243 -#, fuzzy msgid "Confirm Invoice" -msgstr "输入发票" +msgstr "确认发票" #: ConfirmDispatch_Invoice.php:243 -#, fuzzy msgid "Confirm Dispatch and Invoice" -msgstr "对销售订单发运及开发票" +msgstr "确认急件和发票" #: ConfirmDispatch_Invoice.php:244 #: CustLoginSetup.php:23 @@ -4509,9 +4386,8 @@ #: ConfirmDispatch_Invoice.php:445 #: ConfirmDispatch_Invoice.php:449 -#, fuzzy msgid "Charge Freight Cost inc Tax" -msgstr "代垫运费" +msgstr "公司负责运费税" #: ConfirmDispatch_Invoice.php:504 msgid "Invoice Totals" @@ -4527,26 +4403,25 @@ #: ConfirmDispatch_Invoice.php:554 msgid "Could not retrieve the quantity left at the location once this order is invoiced (for the purposes of checking that stock will not go negative because)" -msgstr "" +msgstr "无法检索保留在一旦订单开票的位置的数量,(为了检查库存不会负数的目的因为)" #: ConfirmDispatch_Invoice.php:559 msgid "Invoicing the selected order would result in negative stock. The system parameters are set to prohibit negative stocks from occurring. This invoice cannot be created until the stock on hand is corrected." -msgstr "" +msgstr "已选择的订单发票会导致负库存。系统参数被设置为禁止负库存的发生。无法创建此发票直到现存货量已被更改。" #: ConfirmDispatch_Invoice.php:559 #: ConfirmDispatch_Invoice.php:582 #: WorkOrderReceive.php:152 -#, fuzzy msgid "Negative Stock Prohibited" -msgstr "负库存清单" +msgstr "禁止负库存" #: ConfirmDispatch_Invoice.php:578 msgid "Could not retrieve the component quantity left at the location once the assembly item on this order is invoiced (for the purposes of checking that stock will not go negative because)" -msgstr "" +msgstr "无法检索留在一旦已开发票订单的组装项目位置的组件数量。(为了检查库存不会负数的目的因为)" #: ConfirmDispatch_Invoice.php:582 msgid "Invoicing the selected order would result in negative stock for a component of an assembly item on the order. The system parameters are set to prohibit negative stocks from occurring. This invoice cannot be created until the stock on hand is corrected." -msgstr "" +msgstr "对订单上组装的项目组件,已选择的订单发票会导致负库存。系统参数被设置为禁止负库存的发生。系无法创建此发票直到现存货量已被更改。" #: ConfirmDispatch_Invoice.php:608 msgid "We were unable to load Area where the Sale is to from the BRANCHES table" @@ -5199,7 +5074,7 @@ #: Credit_Invoice.php:685 #: SelectCreditItems.php:1392 msgid "Could not retrieve assembly components from the database for" -msgstr "找不到BOM组件信息" +msgstr "找不到物料清单组件信息" #: ConfirmDispatch_Invoice.php:913 #: Credit_Invoice.php:685 @@ -5223,7 +5098,7 @@ #: ConfirmDispatch_Invoice.php:927 msgid "Can not retrieve assembly components location stock quantities because " -msgstr "找不到BOM组件库存,因为" +msgstr "找不到物料清单组件库存,因为" #: ConfirmDispatch_Invoice.php:963 #: CustomerInquiry.php:194 @@ -5252,7 +5127,7 @@ #: Credit_Invoice.php:779 #: SelectCreditItems.php:1445 msgid "Stock movement records for the assembly components of" -msgstr "BOM组件的物料移动记录" +msgstr "装配组件的物料移动记录" #: ConfirmDispatch_Invoice.php:970 #: Credit_Invoice.php:779 @@ -5523,39 +5398,37 @@ #: ConfirmDispatch_Invoice.php:1447 #: ConfirmDispatch_Invoice.php:1449 msgid "Print this invoice" -msgstr "打印这张发票" +msgstr "打印此发票" #: ConfirmDispatch_Invoice.php:1447 #: SystemParameters.php:410 msgid "Landscape" -msgstr "纵向" +msgstr "横向" #: ConfirmDispatch_Invoice.php:1449 #: SystemParameters.php:411 msgid "Portrait" -msgstr "横向" +msgstr "纵向" #: ConfirmDispatch_Invoice.php:1451 msgid "Select another order for invoicing" -msgstr "选择其他要开发票的订单" +msgstr "给其他订单开发票" #: ConfirmDispatch_Invoice.php:1452 msgid "Sales Order Entry" -msgstr "销售订单行" +msgstr "创建新销售订单" #: ConfirmDispatch_Invoice.php:1467 -#, fuzzy msgid "Date On Invoice" -msgstr "删除发票" +msgstr "关于发票日期" #: ConfirmDispatch_Invoice.php:1474 msgid "Consignment Note Ref" msgstr "运单号" #: ConfirmDispatch_Invoice.php:1479 -#, fuzzy msgid "Action For Balance" -msgstr "期末客户欠款汇总表" +msgstr "对结算的功能" #: ConfirmDispatch_Invoice.php:1480 msgid "Automatically put balance on back order" @@ -5576,7 +5449,7 @@ #: Credit_Invoice.php:15 msgid "Credit An Invoice" -msgstr "冲销发票" +msgstr "红字发票" #: Credit_Invoice.php:21 msgid "This page can only be opened if an invoice has been selected for crediting" @@ -5588,7 +5461,7 @@ #: Credit_Invoice.php:21 msgid "from the customer inquiry screen click the link to credit an invoice" -msgstr "从客户交易查询界面在发票行点冲销发票" +msgstr "从客户交易查询界面在发票行点红字发票" #: Credit_Invoice.php:69 msgid "A credit cannot be produced for the selected invoice" @@ -5651,7 +5524,7 @@ #: Credit_Invoice.php:258 msgid "Credit Invoice" -msgstr "冲销发票" +msgstr "红字发票" #: Credit_Invoice.php:260 msgid "Credit Note amounts stated in" @@ -5716,11 +5589,11 @@ #: Credit_Invoice.php:598 msgid "The allocation record for the credit note could not be added to the database because" -msgstr "冲销发票记录未能加入数据库,因为" +msgstr "红字发票记录未能加入数据库,因为" #: Credit_Invoice.php:599 msgid "The following SQL to insert the allocation record for the credit note was used" -msgstr "用于插入冲销发票记录的SQL是" +msgstr "用于插入红字发票记录的SQL是" #: Credit_Invoice.php:615 msgid "Could not determine if the item" @@ -5739,9 +5612,8 @@ msgstr "销售订单记录未能减少已开出发票的数量,因为" #: Credit_Invoice.php:708 -#, fuzzy msgid "Could not get the current location stock of the assembly component" -msgstr "未能取得BOM组件的当前库存" +msgstr "无法获取当前装配物料清单组件的位置库存" #: Credit_Invoice.php:744 #: Credit_Invoice.php:773 @@ -5916,12 +5788,11 @@ #: CreditStatus.php:7 msgid "Credit Status Code Maintenance" -msgstr "信用等级编号" +msgstr "信用等级维护" #: CreditStatus.php:39 -#, fuzzy msgid "The credit status code already exists in the database" -msgstr "输入的部件编码不存在于数据库" +msgstr "在数据库中已存在的信用状态代码" #: CreditStatus.php:45 msgid "The status code name must be an integer" @@ -5932,9 +5803,8 @@ msgstr "信用等级内容必须不多于 30 个字" #: CreditStatus.php:55 -#, fuzzy msgid "The credit status description must be entered" -msgstr "信用等级内容必须不多于 30 个字" +msgstr "必须输入信用状况说明" #: CreditStatus.php:77 msgid "The credit status record has been updated" @@ -5969,7 +5839,7 @@ #: CreditStatus.php:158 msgid "Invoice OK" -msgstr "允许" +msgstr "允许开发票" #: CreditStatus.php:160 msgid "NO INVOICING" @@ -5984,13 +5854,12 @@ msgstr "货币" #: Currencies.php:47 -#, fuzzy msgid "The currency already exists in the database" -msgstr "输入的部件编码不存在于数据库" +msgstr "在数据库中已存在的货币" #: Currencies.php:53 msgid "The currency abbreviation must be 3 characters or less long and for automated currency updates to work correctly be one of the ISO4217 currency codes" -msgstr "" +msgstr "货币的缩写必须是3个字符或者更长,对于自动货币正常工作的更新是 ISO4217 货币代码之一" #: Currencies.php:59 msgid "The exchange rate must be numeric" @@ -6072,7 +5941,7 @@ #: Currencies.php:183 msgid "ISO4217 Code" -msgstr "" +msgstr "ISO 4217 编码" #: Currencies.php:184 #: Currencies.php:310 @@ -6100,14 +5969,13 @@ msgstr "汇率" #: Currencies.php:188 -#, fuzzy msgid "Ex Rate - ECB" -msgstr "汇率" +msgstr "不包括欧洲央行率" #: Currencies.php:222 -#, fuzzy, php-format +#, php-format msgid "Graph" -msgstr "开启图表" +msgstr "图表" #: Currencies.php:254 msgid "Functional Currency" @@ -6125,7 +5993,7 @@ #: Currencies.php:299 msgid "ISO 4217 Currency Code" -msgstr "" +msgstr "ISO 4217 货币代码" #: Currencies.php:306 msgid "Currency Abbreviation" @@ -6133,7 +6001,7 @@ #: CustEDISetup.php:8 msgid "Customer EDI Set Up" -msgstr "客户EDI设置" +msgstr "客户EDI(电子数据交换)设置" #: CustEDISetup.php:35 msgid "The customers EDI reference code cannot contain any of the following characters" @@ -6175,7 +6043,7 @@ #: CustomerBranches.php:727 #: SystemParameters.php:749 msgid "Disabled" -msgstr "不启用" +msgstr "关闭" #: CustEDISetup.php:107 #: CustEDISetup.php:110 @@ -6234,9 +6102,8 @@ #: CustLoginSetup.php:8 #: SelectCustomer.php:310 -#, fuzzy msgid "Customer Login Configuration" -msgstr "客户 EDI 设置" +msgstr "客户登录配置" #: CustLoginSetup.php:12 #: PO_SelectOSPurchOrder.php:204 @@ -6298,7 +6165,6 @@ #: CustLoginSetup.php:23 #: SelectCustomer.php:283 -#, fuzzy msgid " has been selected" msgstr "已被选取" @@ -6329,9 +6195,8 @@ #: CustLoginSetup.php:108 #: WWW_Users.php:99 -#, fuzzy msgid "The check on validity of the customer code and branch failed because" -msgstr "检查客户编码和分公司有效性失败, 因为" +msgstr "对客户代码和分公司的有效性检查失败因为" #: CustLoginSetup.php:109 #: WWW_Users.php:100 @@ -6369,9 +6234,8 @@ #: CustLoginSetup.php:226 #: WWW_Users.php:225 -#, fuzzy msgid "Cannot delete user as entries already exist in the audit trail" -msgstr "未能删除这物料, 因为已有采购订单" +msgstr "当项目已经存在的审计线索,不能删除用户" #: CustLoginSetup.php:230 #: WWW_Users.php:229 @@ -6451,7 +6315,7 @@ #: includes/PDFCustomerListPageHeader.inc:84 #: api/api_xml-rpc.php:163 msgid "Branch Code" -msgstr "分公司" +msgstr "分公司编码" #: CustLoginSetup.php:264 #: WWW_Users.php:266 @@ -6462,9 +6326,8 @@ #: CustLoginSetup.php:410 #: WWW_Users.php:267 #: WWW_Users.php:422 -#, fuzzy msgid "Security Role" -msgstr "岗位" +msgstr "安全任务" #: CustLoginSetup.php:266 #: WWW_Users.php:268 @@ -6612,7 +6475,7 @@ #: CustomerAllocations.php:15 msgid "Customer Receipt" -msgstr "客户收据(收款)" +msgstr "客户收款" #: CustomerAllocations.php:15 #: SupplierAllocations.php:27 @@ -6638,18 +6501,16 @@ msgstr "这样可以避免再出现此信息" #: CustomerAllocations.php:51 -#, fuzzy msgid "Amount entered was negative" -msgstr "收到的金额" +msgstr "输入金额为负" #: CustomerAllocations.php:51 msgid "Only positive amounts are allowed" -msgstr "" +msgstr "唯有正确的数量才被允许" #: CustomerAllocations.php:78 -#, fuzzy msgid "Allocation could not be processed because the amount allocated is more than the" -msgstr "清算执行失败,因为发票金额大于待清算" +msgstr "因为分配量是无法处理分配多个" #: CustomerAllocations.php:79 #: SupplierAllocations.php:95 @@ -6670,15 +6531,13 @@ msgstr "金额" #: CustomerAllocations.php:341 -#, fuzzy msgid "Allocate Receipt" -msgstr "收款凭证" +msgstr "分配收据" #: CustomerAllocations.php:341 #: CustomerReceipt.php:499 -#, fuzzy msgid "Allocate Receipts" -msgstr "收款凭证" +msgstr "收款清算" #: CustomerAllocations.php:344 #: PDFRemittanceAdvice.php:308 @@ -6689,9 +6548,8 @@ msgstr "凭证类型" #: CustomerAllocations.php:346 -#, fuzzy msgid "Cust No" -msgstr "客户编号" +msgstr "客户号" #: CustomerAllocations.php:350 #: SupplierAllocations.php:579 @@ -6700,9 +6558,8 @@ msgstr "清算" #: CustomerAllocations.php:351 -#, fuzzy msgid "Action" -msgstr "会计要素" +msgstr "作用" #: CustomerAllocations.php:364 msgid "Amount in customer currency" @@ -6757,9 +6614,8 @@ msgstr "清算" #: CustomerAllocations.php:378 -#, fuzzy msgid "Running" -msgstr "使用中" +msgstr "运行" #: CustomerAllocations.php:378 #: CustomerInquiry.php:197 @@ -6773,9 +6629,8 @@ msgstr "余额" #: CustomerAllocations.php:392 -#, fuzzy msgid "Being allocated" -msgstr "金额" +msgstr "进行清算" #: CustomerAllocations.php:435 #: SupplierAllocations.php:525 @@ -6807,9 +6662,8 @@ msgstr "取消" #: CustomerAllocations.php:479 -#, fuzzy msgid "No outstanding receipts or credits to be allocated for this customer" -msgstr "此客户没有未清算收款或红字发票" +msgstr "没有显著的收据或信贷分配为该客户" #: CustomerAllocations.php:591 #: SupplierAllocations.php:690 @@ -6873,28 +6727,25 @@ #: SelectSupplier.php:26 #: SelectSupplier.php:395 #: Suppliers.php:379 -#, fuzzy msgid "An error occurred in retrieving the information" -msgstr "查找货币时发生错误" +msgstr "检索信息的过程中出错" #: CustomerBranches.php:108 #: Suppliers.php:388 msgid "Warning - Geocode Integration is enabled, but no hosts are setup. Go to Geocode Setup" -msgstr "" +msgstr "警告-地理编码集成已被激活,但是主机没有被设立。继续设立地理编码" #: CustomerBranches.php:175 -#, fuzzy msgid "branch has been updated." msgstr "客户分公司已更新" #: CustomerBranches.php:244 -#, fuzzy msgid "Customer branch<b>" -msgstr "客户分公司" +msgstr "客户分公司<b>" #: CustomerBranches.php:244 msgid "</b>has been added, add another branch, or return to <a href=index.php>Main Menu</a>" -msgstr "" +msgstr "</b>已经被添加, 或者另一个分支,或返回到 <a href=index.php>主菜单</a>" #: CustomerBranches.php:248 msgid "The branch record could not be inserted or updated because" @@ -6914,7 +6765,7 @@ #: CustomerBranches.php:304 msgid "sales analysis records with this Branch Code/customer" -msgstr "条属于此客户分公司编码/客户的销售分析记录" +msgstr "条属于此 客户分公司代码/客户 的销售分析记录" #: CustomerBranches.php:313 msgid "Cannot delete this branch because sales orders exist for it" @@ -6926,7 +6777,7 @@ #: CustomerBranches.php:314 msgid "sales orders for this Branch/customer" -msgstr "张此客户分公司/客户的销售订单" +msgstr "张此 客户分公司/客户 的销售订单" #: CustomerBranches.php:323 msgid "Cannot delete this branch because users exist that refer to it" @@ -6953,15 +6804,13 @@ msgstr "客户分公司已删除" #: CustomerBranches.php:371 -#, fuzzy msgid "Branches defined for" -msgstr "客户分公司定义" +msgstr "客户分公司定义为" #: CustomerBranches.php:375 #: CustomerBranches.php:591 -#, fuzzy msgid "Branch Contact" -msgstr "分公司" +msgstr "分公司联系人" #: CustomerBranches.php:376 #: SalesInquiry.php:751 @@ -6999,50 +6848,43 @@ #: CustomerBranches.php:396 #, php-format msgid "Are you sure you wish to delete this branch?" -msgstr "确认要删除此客户分公司么" +msgstr "确认要删除此客户分公司吗?" #: CustomerBranches.php:415 -#, fuzzy msgid "Delete Branch" -msgstr "删除发票" +msgstr "删除分公司" #: CustomerBranches.php:422 -#, fuzzy msgid "Branches are enabled." -msgstr "客户分公司定义" +msgstr "分公司 启用" #: CustomerBranches.php:423 -#, fuzzy msgid "Branches are disabled." -msgstr "客户分公司定义" +msgstr "分公司 关闭" #: CustomerBranches.php:424 -#, fuzzy msgid "Total Branches" -msgstr "余额总计" +msgstr "分公司总计" #: CustomerBranches.php:438 -#, fuzzy msgid "No Branches are defined for" -msgstr "客户分公司定义" +msgstr "没有定义" #: CustomerBranches.php:438 msgid "You must have a minimum of one branch for each Customer. Please add a branch now." -msgstr "" +msgstr "的分公司。每个客户必须至少有1个分公司,请添加。" #: CustomerBranches.php:456 msgid "Show all branches defined for" msgstr "显示所有的客户分公司" #: CustomerBranches.php:532 -#, fuzzy msgid "Change Branch" -msgstr "客户分公司" +msgstr "更改分公司" #: CustomerBranches.php:565 -#, fuzzy msgid "Add a Branch" -msgstr "分公司" +msgstr "添加分公司" #: CustomerBranches.php:579 msgid "There are no sales people defined as yet" @@ -7050,7 +6892,7 @@ #: CustomerBranches.php:579 msgid "customer branches must be allocated to a sales person" -msgstr "客户分司必须配置给销售员" +msgstr "客户分公司必须配置给销售员" #: CustomerBranches.php:579 msgid "Please use the link below to define at least one sales person" @@ -7068,24 +6910,20 @@ msgstr "分公司名称" #: CustomerBranches.php:594 -#, fuzzy msgid "Street Address 1 (Street)" -msgstr "地址列1" +msgstr "街道" #: CustomerBranches.php:597 -#, fuzzy msgid "Street Address 2 (Suburb/City)" -msgstr "地址列2" +msgstr "城市/市区" #: CustomerBranches.php:600 -#, fuzzy msgid "Street Address 3 (State)" -msgstr "地址列3" +msgstr "国家" #: CustomerBranches.php:603 -#, fuzzy msgid "Street Address 4 (Postal Code)" -msgstr "地址列4" +msgstr "邮政编码" #: CustomerBranches.php:606 msgid "Street Address 5" @@ -7096,14 +6934,12 @@ msgstr "地址列6" #: CustomerBranches.php:612 -#, fuzzy msgid "Special Instructions" -msgstr "套打" +msgstr "特殊说明" #: CustomerBranches.php:615 -#, fuzzy msgid "Default days to deliver" -msgstr "净价" +msgstr "默认交货天数" #: CustomerBranches.php:618 msgid "Forward Date After (day in month)" @@ -7174,14 +7010,12 @@ msgstr "传真" #: CustomerBranches.php:722 -#, fuzzy msgid "Transactions on this branch" -msgstr "是否启用此分公司进行交易" +msgstr "此分公司交易" #: CustomerBranches.php:733 -#, fuzzy msgid "Default freight/shipper method" -msgstr "默认承运人" +msgstr "默认 运送/发货人 方式" #: CustomerBranches.php:749 msgid "Default Packlist" @@ -7196,33 +7030,28 @@ msgstr "隐藏公司信息及标志" #: CustomerBranches.php:766 -#, fuzzy msgid "Postal Address 1 (Street)" -msgstr "邮政地址1" +msgstr "街道" #: CustomerBranches.php:769 -#, fuzzy msgid "Postal Address 2 (Suburb/City)" -msgstr "邮政地址2" +msgstr "城市/市区" #: CustomerBranches.php:772 -#, fuzzy msgid "Postal Address 3 (State)" -msgstr "邮政地址3" +msgstr "国家" #: CustomerBranches.php:775 -#, fuzzy msgid "Postal Address 4 (Postal Code)" -msgstr "邮政地址4" +msgstr "邮政编码" #: CustomerBranches.php:778 msgid "Customers Internal Branch Code (EDI)" msgstr "客户内部分公司编码 (EDI)" #: CustomerBranches.php:782 -#, fuzzy msgid "Enter Branch" -msgstr "输入批次" +msgstr "确认" #: CustomerInquiry.php:11 msgid "Customer Inquiry" @@ -7414,12 +7243,11 @@ #: SupplierInquiry.php:197 #: SupplierInquiry.php:198 msgid "More Info" -msgstr "" +msgstr "更多信息" #: CustomerInquiry.php:231 -#, fuzzy msgid "Credit " -msgstr "贷方" +msgstr "信用" #: CustomerInquiry.php:231 msgid "Click to credit the invoice" @@ -7428,7 +7256,7 @@ #: CustomerInquiry.php:232 #: CustomerInquiry.php:235 msgid "HTML " -msgstr "" +msgstr "HTML" #: CustomerInquiry.php:232 #: CustomerTransInquiry.php:125 @@ -7439,20 +7267,19 @@ #: CustomerInquiry.php:233 #: CustomerInquiry.php:236 msgid "PDF " -msgstr "" +msgstr "PDF" #: CustomerInquiry.php:233 #: CustomerInquiry.php:236 #: SelectSalesOrder.php:480 #: SelectSalesOrder.php:481 -#, fuzzy, php-format +#, php-format msgid "Click for PDF" -msgstr "按此返回" +msgstr "生成PDF" #: CustomerInquiry.php:234 -#, fuzzy msgid "Email " -msgstr "电子邮件" +msgstr "电子邮箱" #: CustomerInquiry.php:234 msgid "Click to email the invoice" @@ -7471,16 +7298,16 @@ #: CustomerInquiry.php:384 #: CustomerInquiry.php:422 #: CustomerInquiry.php:453 -#, fuzzy, php-format +#, php-format msgid "View GL Entries" -msgstr "检视总账入账" +msgstr "检视总账记录" #: CustomerInquiry.php:245 #: CustomerInquiry.php:328 #: CustomerInquiry.php:384 -#, fuzzy, php-format +#, php-format msgid "View the GL Entries" -msgstr "检视总账入账" +msgstr "检视总账记录" #: CustomerInquiry.php:327 #: CustomerInquiry.php:355 @@ -7506,21 +7333,19 @@ #: CustomerReceipt.php:45 msgid "is not set up as a bank account" -msgstr "没有定义为银行账号" +msgstr "没有定义为银行账户" #: CustomerReceipt.php:58 -#, fuzzy msgid "The exchange rate entered should be numeric" -msgstr "汇率必须是数字" +msgstr "输入的汇率应为数字" #: CustomerReceipt.php:65 -#, fuzzy msgid "The functional exchange rate entered should be numeric" -msgstr "汇率必须是数字" +msgstr "输入该功能的汇率应为数字" #: CustomerReceipt.php:81 msgid "Changing the currency of the receipt means that existing entries need to be re-done - only customers trading in the selected currency can be selected" -msgstr "" +msgstr "更变收据的货币意味着现存个数需要去重做-唯有客户交易时在选择货币时才能被挑选。" #: CustomerReceipt.php:191 msgid "The company has not yet been set up properly" @@ -7542,7 +7367,7 @@ #: CustomerReceipt.php:218 #, fuzzy msgid "Batch Number" -msgstr "传真" +msgstr "批号" #: CustomerReceipt.php:219 #: CustomerReceipt.php:726 @@ -7552,7 +7377,7 @@ #: CustomerReceipt.php:221 #: CustomerReceipt.php:818 msgid "GL Code" -msgstr "会计科目" +msgstr "总账科目" #: CustomerReceipt.php:222 #: CustomerReceipt.php:962 @@ -7562,7 +7387,7 @@ #: CustomerReceipt.php:241 #, fuzzy msgid "Print a Customer Receipt" -msgstr "客户收据(收款)" +msgstr "输入 客户收款" #: CustomerReceipt.php:263 msgid "Cannot insert a GL entry for the receipt because" @@ -7620,7 +7445,7 @@ #: CustomerReceipt.php:461 msgid "The SQL that failed to insert the GL transaction for the debtors account credit was" -msgstr "插入应收总账贷方失败的SQL是" +msgstr "插入应收账款贷方失败的SQL是" #: CustomerReceipt.php:462 msgid "Cannot insert a GL transaction for the debtors account cre... [truncated message content] |
From: <tim...@us...> - 2010-06-18 16:16:56
|
Revision: 3501 http://web-erp.svn.sourceforge.net/web-erp/?rev=3501&view=rev Author: tim_schofield Date: 2010-06-18 16:16:49 +0000 (Fri, 18 Jun 2010) Log Message: ----------- Tim: WWW_Users.php - Extend for Contracts module Modified Paths: -------------- trunk/WWW_Users.php trunk/doc/Change.log.html Modified: trunk/WWW_Users.php =================================================================== --- trunk/WWW_Users.php 2010-06-17 21:26:44 UTC (rev 3500) +++ trunk/WWW_Users.php 2010-06-18 16:16:49 UTC (rev 3501) @@ -17,6 +17,7 @@ _('Purchasing'), _('Inventory'), _('Manufacturing'), + _('Contracts'), _('General Ledger'), _('Asset Manager'), _('Petty Cash'), Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-06-17 21:26:44 UTC (rev 3500) +++ trunk/doc/Change.log.html 2010-06-18 16:16:49 UTC (rev 3501) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>18/06/10 Tim: WWW_Users.php - Extend for Contracts module</p> <p>17/06/10 Zhiguo & Alec_H: Updates to Chinese translation</p> <p>17/06/10 Tim: Enable a supplier to login and make an offer to the company</p> <p>16/06/10 Tim: SelectProduct.php - Layout improvements</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-06-19 07:56:38
|
Revision: 3502 http://web-erp.svn.sourceforge.net/web-erp/?rev=3502&view=rev Author: tim_schofield Date: 2010-06-19 07:56:32 +0000 (Sat, 19 Jun 2010) Log Message: ----------- Use percentages for font sizes Modified Paths: -------------- trunk/css/silverwolf/default.css trunk/doc/Change.log.html Modified: trunk/css/silverwolf/default.css =================================================================== --- trunk/css/silverwolf/default.css 2010-06-18 16:16:49 UTC (rev 3501) +++ trunk/css/silverwolf/default.css 2010-06-19 07:56:32 UTC (rev 3502) @@ -15,7 +15,7 @@ | reflected throughout Web-ERP. | \--------------------------------------------------*/ -/* $Id$*/ +/* $Id: default.css 3446 2010-05-05 10:11:54Z tim_schofield $*/ body { font-family: Arial, Verdana, Helvetica, sans-serif; @@ -41,7 +41,7 @@ /*links before selection */ a { font-family: Arial, Verdana, Helvetica, sans-serif; - font-size: 10px; + font-size: 100%; font-weight: normal; text-decoration: none; color: #00f; @@ -61,7 +61,7 @@ th { font-weight: normal; background-color: #cccce5; - font-size: 10px; + font-size: 100%; color: #300; text-align: center; vertical-align: middle; @@ -76,7 +76,7 @@ /*table detail items default format */ td { font-family: Arial, Verdana, Helvetica, sans-serif; - font-size: 10px; + font-size: 100%; text-align: left; } @@ -174,7 +174,7 @@ textarea { font-family: Arial, Verdana, Helvetica, sans-serif; - font-size: 10px; + font-size: 100%; background-color: #e3e1e1; border-width:1px; border-bottom-color: gray; @@ -189,7 +189,7 @@ input { font-family: Arial, Verdana, Helvetica, sans-serif; - font-size: 10px; + font-size: 100%; background-color: #e3e1e1; border-width:1px; border-bottom-color: gray; @@ -204,7 +204,7 @@ input:hover { font-family: Arial, Verdana, Helvetica, sans-serif; - font-size: 10px; + font-size: 100%; background-color: #e3e5f5; border-width:1px; border-bottom-color: gray; @@ -227,7 +227,7 @@ select { font-family: Arial, Verdana, Helvetica, sans-serif; - font-size: 10px; + font-size: 100%; } font.good { @@ -258,7 +258,7 @@ #page { width: 100%; color: black; - font-size: 10px; + font-size: 100%; white-space: nowrap; border: none; } @@ -341,7 +341,7 @@ padding-top: 1px; padding-bottom: 1px; font-weight: normal; - font-size: 10px; + font-size: 100%; TEXT-ALIGN:center; } End Merge */ @@ -361,7 +361,7 @@ width: 100%; margin: 0px; padding: 0px; - font-size: 10px; + font-size: 100%; } /* Main page heading with quick menu within */ @@ -387,7 +387,7 @@ .quick_menu_left { background: none; font-family: Arial, Verdana, Helvetica, sans-serif; - font-size: 10px; + font-size: 100%; font-weight: bold; border: none; white-space: nowrap; @@ -458,12 +458,12 @@ } .system_menu_tabs a { - font-size: 10px; + font-size: 100%; color: black; } .system_menu_tabs a:hover { - font-size: 10px; + font-size: 100%; color: black; } @@ -534,7 +534,7 @@ span.main_menu_nolink { font-family: Arial, Verdana, Helvetica, sans-serif; - font-size: 10px; + font-size: 100%; font-weight: bold; color: #777; text-decoration: none; @@ -576,7 +576,7 @@ .menu_group_headers_text { font-family: Arial, Verdana, Helvetica, sans-serif; - font-size: 10px; + font-size: 100%; font-weight: bold; color: black; } @@ -603,7 +603,7 @@ padding-top: 2px; padding-bottom: 2px; font-weight: bold; - font-size: 10px; + font-size: 100%; color: black; background-color: #cccce5; width: 33%; @@ -628,7 +628,7 @@ position: static; font-family: Verdana, Arial, Helvetica; font-weight: normal; - font-size: 10px; + font-size: 100%; color: black; text-align:center; } @@ -653,7 +653,7 @@ padding-top: 1px; padding-bottom: 1px; font-weight: normal; - font-size: 10px; + font-size: 100%; color: black; TEXT-ALIGN:left; } @@ -662,7 +662,7 @@ span.menu_group_nolink { font-family: Arial, Verdana, Helvetica, sans-serif; - font-size: 10px; + font-size: 100%; font-weight: normal; color: #777; text-decoration: none; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-06-18 16:16:49 UTC (rev 3501) +++ trunk/doc/Change.log.html 2010-06-19 07:56:32 UTC (rev 3502) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>18/06/10 Tim: default.css - Use percentages for font sizes</p> <p>18/06/10 Tim: WWW_Users.php - Extend for Contracts module</p> <p>17/06/10 Zhiguo & Alec_H: Updates to Chinese translation</p> <p>17/06/10 Tim: Enable a supplier to login and make an offer to the company</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-06-19 08:14:43
|
Revision: 3504 http://web-erp.svn.sourceforge.net/web-erp/?rev=3504&view=rev Author: tim_schofield Date: 2010-06-19 08:14:37 +0000 (Sat, 19 Jun 2010) Log Message: ----------- Add the first line of the branch address to the sql Modified Paths: -------------- trunk/CounterSales.php trunk/doc/Change.log.html Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2010-06-19 07:56:50 UTC (rev 3503) +++ trunk/CounterSales.php 2010-06-19 08:14:37 UTC (rev 3504) @@ -132,6 +132,7 @@ /* now get the branch defaults from the customer branches table CustBranch. */ $sql = "SELECT custbranch.brname, + custbranch.braddress1, custbranch.defaultshipvia, custbranch.deliverblind, custbranch.specialinstructions, Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-06-19 07:56:50 UTC (rev 3503) +++ trunk/doc/Change.log.html 2010-06-19 08:14:37 UTC (rev 3504) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>18/06/10 Tim: CounterSales.php - Add the first line of address to the sql query</p> <p>18/06/10 Tim: default.css - Use percentages for font sizes</p> <p>18/06/10 Tim: WWW_Users.php - Extend for Contracts module</p> <p>17/06/10 Zhiguo & Alec_H: Updates to Chinese translation</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-06-19 08:15:02
|
Revision: 3505 http://web-erp.svn.sourceforge.net/web-erp/?rev=3505&view=rev Author: tim_schofield Date: 2010-06-19 08:14:56 +0000 (Sat, 19 Jun 2010) Log Message: ----------- Add a field for the supplier code in WWW_Users.php Modified Paths: -------------- trunk/WWW_Users.php trunk/doc/Change.log.html Modified: trunk/WWW_Users.php =================================================================== --- trunk/WWW_Users.php 2010-06-19 08:14:37 UTC (rev 3504) +++ trunk/WWW_Users.php 2010-06-19 08:14:56 UTC (rev 3505) @@ -138,6 +138,7 @@ email='" . $_POST['Email'] ."', " . $UpdatePassword . " branchcode='" . $_POST['BranchCode'] . "', + supplierid='" . $_POST['SupplierID'] . "', salesman='" . $_POST['Salesman'] . "', pagesize='" . $_POST['PageSize'] . "', fullaccess=" . $_POST['Access'] . ", @@ -156,6 +157,7 @@ realname, customerid, branchcode, + supplierid, salesman, password, phone, @@ -172,6 +174,7 @@ '" . $_POST['RealName'] ."', '" . $_POST['Cust'] ."', '" . $_POST['BranchCode'] ."', + '" . $_POST['SupplierID'] ."', '" . $_POST['Salesman'] . "', '" . CryptPass($_POST['Password']) ."', '" . $_POST['Phone'] . "', @@ -197,6 +200,7 @@ unset($_POST['RealName']); unset($_POST['Cust']); unset($_POST['BranchCode']); + unset($_POST['SupplierID']); unset($_POST['Salesman']); unset($_POST['Phone']); unset($_POST['Email']); @@ -248,6 +252,7 @@ email, customerid, branchcode, + supplierid, salesman, lastvisitdate, fullaccess, @@ -264,6 +269,7 @@ <th>" . _('Email') . "</th> <th>" . _('Customer Code') . "</th> <th>" . _('Branch Code') . "</th> + <th>" . _('Supplier Code') . "</th> <th>" . _('Salesperson') . "</th> <th>" . _('Last Visit') . "</th> <th>" . _('Security Role') ."</th> @@ -303,6 +309,7 @@ <td>%s</td> <td>%s</td> <td>%s</td> + <td>%s</td> <td><a href=\"%s&SelectedUser=%s\">" . _('Edit') . "</a></td> <td><a href=\"%s&SelectedUser=%s&delete=1\">" . _('Delete') . "</a></td> </tr>", @@ -313,11 +320,12 @@ $myrow[4], $myrow[5], $myrow[6], + $myrow[7], $LastVisitDate, - $SecurityRoles[($myrow[8])], - $myrow[9], + $SecurityRoles[($myrow[9])], $myrow[10], $myrow[11], + $myrow[12], $_SERVER['PHP_SELF'] . "?" . SID, $myrow[0], $_SERVER['PHP_SELF'] . "?" . SID, @@ -344,6 +352,7 @@ customerid, password, branchcode, + supplierid, salesman, pagesize, fullaccess, @@ -365,6 +374,7 @@ $_POST['Email'] = $myrow['email']; $_POST['Cust'] = $myrow['customerid']; $_POST['BranchCode'] = $myrow['branchcode']; + $_POST['SupplierID'] = $myrow['supplierid']; $_POST['Salesman'] = $myrow['salesman']; $_POST['PageSize'] = $myrow['pagesize']; $_POST['Access'] = $myrow['fullaccess']; @@ -459,12 +469,18 @@ if (!isset($_POST['BranchCode'])) { $_POST['BranchCode']=''; } +if (!isset($_POST['SupplierID'])) { + $_POST['SupplierID']=''; +} echo '<tr><td>' . _('Customer Code') . ':</td> <td><input type="text" name="Cust" size=10 maxlength=10 value="' . $_POST['Cust'] . '"></td></tr>'; echo '<tr><td>' . _('Branch Code') . ':</td> <td><input type="text" name="BranchCode" size=10 maxlength=10 VALUE="' . $_POST['BranchCode'] .'"></td></tr>'; +echo '<tr><td>' . _('Supplier Code') . ':</td> + <td><input type="text" name="SupplierID" size=10 maxlength=10 VALUE="' . $_POST['SupplierID'] .'"></td></tr>'; + echo '<tr><td>' . _('Restrict to Sales Person') . ':</td> <td><select name="Salesman">'; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-06-19 08:14:37 UTC (rev 3504) +++ trunk/doc/Change.log.html 2010-06-19 08:14:56 UTC (rev 3505) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>18/06/10 Tim: WWW_Users.php - Add a field in for the supplier code</p> <p>18/06/10 Tim: CounterSales.php - Add the first line of address to the sql query</p> <p>18/06/10 Tim: default.css - Use percentages for font sizes</p> <p>18/06/10 Tim: WWW_Users.php - Extend for Contracts module</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-06-19 17:53:30
|
Revision: 3506 http://web-erp.svn.sourceforge.net/web-erp/?rev=3506&view=rev Author: tim_schofield Date: 2010-06-19 17:53:23 +0000 (Sat, 19 Jun 2010) Log Message: ----------- Add facility to search by sales area Modified Paths: -------------- trunk/SelectCustomer.php trunk/doc/Change.log.html Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2010-06-19 08:14:56 UTC (rev 3505) +++ trunk/SelectCustomer.php 2010-06-19 17:53:23 UTC (rev 3506) @@ -96,7 +96,7 @@ if ($_POST['CustType'] AND $_POST['CustPhone'] == "" AND $_POST['CustCode'] == "" AND $_POST['Keywords'] == "" AND $_POST['CustAdd'] == "") { $msg = _('Search Result: Customer Type has been used in search') . '<br>'; } - if (($_POST['Keywords'] == "") AND ($_POST['CustCode'] == "") AND ($_POST['CustPhone'] == "") AND ($_POST['CustType'] == "")) { + if (($_POST['Keywords'] == "") AND ($_POST['CustCode'] == "") AND ($_POST['CustPhone'] == "") AND ($_POST['CustType'] == "") AND ($_POST['Area'] == "")) { $SQL = "SELECT debtorsmaster.debtorno, debtorsmaster.name, debtorsmaster.address1, @@ -206,6 +206,23 @@ ON debtorsmaster.debtorno = custbranch.debtorno, debtortype WHERE debtorsmaster.typeid LIKE debtortype.typeid AND debtortype.typename = '" . $_POST['CustType'] . "'"; + } elseif (strlen($_POST['Area']) > 0) { + $SQL = "SELECT debtorsmaster.debtorno, + debtorsmaster.name, + debtorsmaster.address1, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, + custbranch.branchcode, + custbranch.brname, + custbranch.contactname, + debtortype.typename, + custbranch.phoneno, + custbranch.faxno + FROM debtorsmaster LEFT JOIN custbranch + ON debtorsmaster.debtorno = custbranch.debtorno, debtortype + WHERE debtorsmaster.typeid LIKE debtortype.typeid + AND custbranch.area = '" . $_POST['Area'] . "'"; } } //one of keywords or custcode or custphone was more than a zero length string if ($_SESSION['SalesmanLogin'] != '') { @@ -316,9 +333,9 @@ } else { echo '<input type="Text" name="CustAdd" size=20 maxlength=25>'; } -echo '</td>'; +echo '</td></tr>'; /* End addded search feature. Gilles Deacur */ -echo '<td><font size=3><b>' . _('OR') . '</b></font></td><td>' . _('Choose a Type') . ':</td><td>'; +echo '<tr><td><font size=3><b>' . _('OR') . '</b></font></td><td>' . _('Choose a Type') . ':</td><td>'; if (isset($_POST['CustType'])) { // Show Customer Type drop down list $result2 = DB_query('SELECT typeid, typename FROM debtortype ', $db); @@ -330,6 +347,7 @@ } else { // If OK show select box with option selected echo '<select name="CustType">'; + echo "<option value=''>" . _('Any'); while ($myrow = DB_fetch_array($result2)) { if ($_POST['CustType'] == $myrow['typename']) { echo "<option selected value='" . $myrow['typename'] . "'>" . $myrow['typename']; @@ -338,7 +356,7 @@ } } //end while loop DB_data_seek($result2, 0); - echo '</select></td></tr>'; + echo '</select></td>'; } } else { // No option selected yet, so show Customer Type drop down list @@ -351,13 +369,38 @@ } else { // if OK show select box with available options to choose echo '<select name="CustType">'; + echo "<option value=''>" . _('Any'); while ($myrow = DB_fetch_array($result2)) { echo "<option value='" . $myrow['typename'] . "'>" . $myrow['typename']; } //end while loop DB_data_seek($result2, 0); - echo '</select></td></tr>'; + echo '</select></td>'; } } + +/* Option to select a sales area */ +echo '<td><font size=3><b>' . _('OR') . '</b></font></td><td>' . _('Choose an Area') . ':</td><td>'; +$result2 = DB_query('SELECT areacode, areadescription FROM areas ', $db); +// Error if no sales areas setup +if (DB_num_rows($result2) == 0) { + $DataError = 1; + echo '<a href="Areas.php?" target="_parent">Setup Types</a>'; + echo '<tr><td colspan=2>' . prnMsg(_('No Sales Areas defined'), 'error') . '</td></tr>'; +} else { + // if OK show select box with available options to choose + echo '<select name="Area">'; + echo "<option value=''>" . _('Any'); + while ($myrow = DB_fetch_array($result2)) { + if ($_POST['Area']==$myrow['areacode']) { + echo "<option selected value='" . $myrow['areacode'] . "'>" . $myrow['areadescription']; + } else { + echo "<option value='" . $myrow['areacode'] . "'>" . $myrow['areadescription']; + } + } //end while loop + DB_data_seek($result2, 0); + echo '</select></td></tr>'; +} + echo "</td></tr></table><br />"; echo '<div class="centre"><input type=submit name="Search" value="' . _('Search Now') . '"><input type=submit name="CSV" value="' . _('CSV Format') . '"></div>'; if (isset($_SESSION['SalesmanLogin']) and $_SESSION['SalesmanLogin'] != '') { Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-06-19 08:14:56 UTC (rev 3505) +++ trunk/doc/Change.log.html 2010-06-19 17:53:23 UTC (rev 3506) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>18/06/10 Tim: SelectCustomers.php - Add facility to search by sales area</p> <p>18/06/10 Tim: WWW_Users.php - Add a field in for the supplier code</p> <p>18/06/10 Tim: CounterSales.php - Add the first line of address to the sql query</p> <p>18/06/10 Tim: default.css - Use percentages for font sizes</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-06-19 17:53:54
|
Revision: 3507 http://web-erp.svn.sourceforge.net/web-erp/?rev=3507&view=rev Author: tim_schofield Date: 2010-06-19 17:53:46 +0000 (Sat, 19 Jun 2010) Log Message: ----------- Layout improvements, and link to SearchCustomer.php Modified Paths: -------------- trunk/Areas.php trunk/SelectCustomer.php trunk/doc/Change.log.html Modified: trunk/Areas.php =================================================================== --- trunk/Areas.php 2010-06-19 17:53:23 UTC (rev 3506) +++ trunk/Areas.php 2010-06-19 17:53:46 UTC (rev 3507) @@ -43,7 +43,7 @@ $i++; } elseif ($myrow[0]>0 and !isset($SelectedArea)){ $InputError = 1; - prnMsg(_('The area code entered already exists'),'error'); + prnMsg(_('The area code entered already exists'),'error'); $Errors[$i] = 'AreaCode'; $i++; } elseif (strlen($_POST['AreaDescription']) >25) { @@ -62,7 +62,7 @@ $Errors[$i] = 'AreaDescription'; $i++; } - + if (isset($SelectedArea) AND $InputError !=1) { /*SelectedArea could also exist if submit had not been clicked this code would not run in this case cos submit is false of course see the delete code below*/ @@ -100,7 +100,7 @@ unset($_POST['AreaDescription']); prnMsg($msg,'success'); } - + } elseif (isset($_GET['delete'])) { //the link to delete a selected record was clicked instead of the submit button @@ -134,14 +134,16 @@ } //end if Delete area unset($SelectedArea); unset($_GET['delete']); -} +} if (!isset($SelectedArea)) { $sql = 'SELECT * FROM areas'; $result = DB_query($sql,$db); - echo '<table border=1>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="">' . ' ' . $title.'<br>'; + + echo '<table>'; echo "<tr> <th>" . _('Area Code') . "</th> <th>" . _('Area Name') . '</th>'; @@ -161,6 +163,7 @@ echo '<td>' . $myrow[1] . '</td>'; echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?' . SID . '&SelectedArea=' . $myrow[0] . '">' . _('Edit') . '</a></td>'; echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?' . SID . '&SelectedArea=' . $myrow[0] . '&delete=yes">' . _('Delete') . '</a></td>'; + echo '<td><a href="SelectCustomer.php'. '?' . SID . '&Area=' . $myrow[0] . '">' . _('View Customers from this Area') . '</a></td>'; } //END WHILE LIST LOOP @@ -176,7 +179,7 @@ if (!isset($_GET['delete'])) { - echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; + echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '><br>'; if (isset($SelectedArea)) { //editing an existing area @@ -194,7 +197,7 @@ echo '<input type=hidden name=SelectedArea VALUE=' . $SelectedArea . '>'; echo '<input type=hidden name=AreaCode VALUE=' .$_POST['AreaCode'] . '>'; - echo '<table><tr><td>' . _('Area Code') . ':</td><td>' . $_POST['AreaCode'] . '</td></tr>'; + echo '<table class=selection><tr><td>' . _('Area Code') . ':</td><td>' . $_POST['AreaCode'] . '</td></tr>'; } else { if (!isset($_POST['AreaCode'])) { @@ -203,7 +206,7 @@ if (!isset($_POST['AreaDescription'])) { $_POST['AreaDescription'] = ''; } - echo '<table> + echo '<table class=selection> <tr> <td>' . _('Area Code') . ':</td> <td><input tabindex="1" ' . (in_array('AreaCode',$Errors) ? 'class="inputerror"' : '' ) .' type="Text" name="AreaCode" value="' . $_POST['AreaCode'] . '" size=3 maxlength=3></td> @@ -212,12 +215,12 @@ echo '<tr><td>' . _('Area Name') . ':</td> <td><input tabindex="2" ' . (in_array('AreaDescription',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="AreaDescription" value="' . $_POST['AreaDescription'] .'" size=26 maxlength=25></td> - </tr> - </table>'; + </tr>'; - echo '<br><div class="centre"><input tabindex="3" type="Submit" name="submit" value=' . _('Enter Information') .'></div></form>'; + echo '<tr><td colspan=2><div class="centre"><input tabindex="3" type="Submit" name="submit" value=' . _('Enter Information') .'></div></td></tr>'; + echo '</table></form>'; } //end if record deleted no point displaying form to add record include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2010-06-19 17:53:23 UTC (rev 3506) +++ trunk/SelectCustomer.php 2010-06-19 17:53:46 UTC (rev 3507) @@ -11,6 +11,15 @@ if (!isset($_SESSION['CustomerID'])) { //initialise if not already done $_SESSION['CustomerID'] = ""; } +if (isset($_GET['Area'])) { + $_POST['Area']=$_GET['Area']; + $_POST['Search']='Search'; + $_POST['Keywords']=''; + $_POST['CustCode']=''; + $_POST['CustPhone']=''; + $_POST['CustAdd']=''; + $_POST['CustType']=''; +} echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/customer.png" title="' . _('Customer') . '" alt="">' . ' ' . _('Customers') . ''; if (!isset($_SESSION['CustomerType'])) { //initialise if not already done $_SESSION['CustomerType'] = ""; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-06-19 17:53:23 UTC (rev 3506) +++ trunk/doc/Change.log.html 2010-06-19 17:53:46 UTC (rev 3507) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>18/06/10 Tim: Areas.php - Layout improvements, and link to SearchCustomer.php</p> <p>18/06/10 Tim: SelectCustomers.php - Add facility to search by sales area</p> <p>18/06/10 Tim: WWW_Users.php - Add a field in for the supplier code</p> <p>18/06/10 Tim: CounterSales.php - Add the first line of address to the sql query</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-06-19 18:42:03
|
Revision: 3508 http://web-erp.svn.sourceforge.net/web-erp/?rev=3508&view=rev Author: tim_schofield Date: 2010-06-19 18:41:57 +0000 (Sat, 19 Jun 2010) Log Message: ----------- Layout improvements Modified Paths: -------------- trunk/AccountGroups.php trunk/doc/Change.log.html Modified: trunk/AccountGroups.php =================================================================== --- trunk/AccountGroups.php 2010-06-19 17:53:46 UTC (rev 3507) +++ trunk/AccountGroups.php 2010-06-19 18:41:57 UTC (rev 3508) @@ -225,7 +225,7 @@ $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="">' . ' ' . $title.'<br>'; - echo '<table> + echo '<table class=selection> <tr> <th>' . _('Group Name') . "</th> <th>" . _('Section') . "</th> @@ -271,12 +271,12 @@ if (isset($_POST['SelectedAccountGroup']) OR isset($_GET['SelectedAccountGroup'])) { - echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '?' . SID .'">' . _('Review Account Groups') . '</a></div>'; + echo '<br><div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '?' . SID .'">' . _('Review Account Groups') . '</a></div>'; } if (! isset($_GET['delete'])) { - echo '<form method="post" id="AccountGroups" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '">'; + echo '<br><form method="post" id="AccountGroups" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '">'; if (isset($_GET['SelectedAccountGroup'])) { //editing an existing account group @@ -300,7 +300,7 @@ $_POST['PandL'] = $myrow['pandl']; $_POST['ParentGroupName'] = $myrow['parentgroupname']; - echo '<table><tr><td>'; + echo '<table class=selection><tr><td>'; echo '<input type="hidden" name="SelectedAccountGroup" value="' . $_GET['SelectedAccountGroup'] . '" />'; echo '<input type="hidden" name="GroupName" value="' . $_POST['GroupName'] . '" />'; @@ -326,7 +326,7 @@ $_POST['PandL']=''; } - echo '<table style="margin: 10px auto;"><tr><td>'; + echo '<br><table class=selection><tr><td>'; echo '<input type="hidden" name="SelectedAccountGroup" value="' . $_POST['SelectedAccountGroup'] . '" />'; echo _('Account Group Name') . ':' . '</td><td> <input tabindex="1" ' . (in_array('GroupName',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="GroupName" size="50" maxlength="50" value="' . $_POST['GroupName'] . '" /></td></tr>'; @@ -391,10 +391,10 @@ ' type="text" maxlength="4" name="SequenceInTB" class=number value="' . $_POST['SequenceInTB'] . '" /></td></tr>'; + echo '<tr><td colspan=2><div class="centre"><input tabindex="6" type="submit" name="submit" value="' . _('Enter Information') . '" /></div></td></tr>'; + echo '</table>'; - echo '<div class="centre"><input tabindex="6" type="submit" name="submit" value="' . _('Enter Information') . '" /></div>'; - echo '<script type="text/javascript">defaultControl(document.forms[0].GroupName);</script>'; echo '</form>'; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-06-19 17:53:46 UTC (rev 3507) +++ trunk/doc/Change.log.html 2010-06-19 18:41:57 UTC (rev 3508) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>18/06/10 Tim: AccountGroups.php - Layout improvements</p> <p>18/06/10 Tim: Areas.php - Layout improvements, and link to SearchCustomer.php</p> <p>18/06/10 Tim: SelectCustomers.php - Add facility to search by sales area</p> <p>18/06/10 Tim: WWW_Users.php - Add a field in for the supplier code</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-06-19 18:42:21
|
Revision: 3509 http://web-erp.svn.sourceforge.net/web-erp/?rev=3509&view=rev Author: tim_schofield Date: 2010-06-19 18:42:15 +0000 (Sat, 19 Jun 2010) Log Message: ----------- Layout improvements Modified Paths: -------------- trunk/AccountSections.php trunk/doc/Change.log.html Modified: trunk/AccountSections.php =================================================================== --- trunk/AccountSections.php 2010-06-19 18:41:57 UTC (rev 3508) +++ trunk/AccountSections.php 2010-06-19 18:42:15 UTC (rev 3509) @@ -176,7 +176,7 @@ $result = DB_query($sql,$db,$ErrMsg); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="">' . ' ' . $title.'<br>'; - echo "<table name='SectionList'> + echo "<table name='SectionList' class=selection> <tr> <th>" . _('Section Number') . "</th> <th>" . _('Section Description') . "</th> @@ -235,7 +235,7 @@ $_POST['SectionName'] = $myrow['sectionname']; echo "<input type=hidden name='SelectedSectionID' value='" . $_POST['SectionID'] . "'>"; - echo "<table> + echo "<table class=selection> <td>" . _('Section Number') . ':' . "</td> <td>" . $_POST['SectionID'] . "</td>"; } @@ -251,7 +251,7 @@ if (!isset($_POST['SectionName'])) { $_POST['SectionName']=''; } - echo "<table> + echo "<table class=selection> <tr> <td>" . _('Section Number') . ':' . '</td> <td><input tabindex="1" ' . (in_array('SectionID',$Errors) ? 'class="inputerror"' : '' ) ." type='text' name='SectionID' class=number size=4 maxlength=4 value='" . $_POST['SectionID'] . "'></td></tr>"; @@ -260,7 +260,7 @@ <td><input tabindex="2" ' . (in_array('SectionName',$Errors) ? 'class="inputerror"' : '' ) ." type='text' name='SectionName' size=30 maxlength=30 value='" . $_POST['SectionName'] . "'></td> </tr>"; - echo '<tr><td></td><td colspan=2><input tabindex="3" type=Submit name=submit value=' . _('Enter Information') . '></td></tr>'; + echo '<tr><td colspan=2><div class=centre><input tabindex="3" type=Submit name=submit value=' . _('Enter Information') . '></div></td></tr>'; echo '</table>'; if (!isset($_GET['SelectedSectionID']) or $_GET['SelectedSectionID']=='') { Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-06-19 18:41:57 UTC (rev 3508) +++ trunk/doc/Change.log.html 2010-06-19 18:42:15 UTC (rev 3509) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>18/06/10 Tim: AccountSections.php - Layout improvements</p> <p>18/06/10 Tim: AccountGroups.php - Layout improvements</p> <p>18/06/10 Tim: Areas.php - Layout improvements, and link to SearchCustomer.php</p> <p>18/06/10 Tim: SelectCustomers.php - Add facility to search by sales area</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-06-19 19:10:29
|
Revision: 3511 http://web-erp.svn.sourceforge.net/web-erp/?rev=3511&view=rev Author: tim_schofield Date: 2010-06-19 19:10:23 +0000 (Sat, 19 Jun 2010) Log Message: ----------- Layout improvements Modified Paths: -------------- trunk/AddCustomerContacts.php trunk/doc/Change.log.html Modified: trunk/AddCustomerContacts.php =================================================================== --- trunk/AddCustomerContacts.php 2010-06-19 18:48:07 UTC (rev 3510) +++ trunk/AddCustomerContacts.php 2010-06-19 19:10:23 UTC (rev 3511) @@ -18,7 +18,16 @@ $DebtorNo = $_GET['DebtorNo']; } echo "<a href='" . $rootpath . '/Customers.php?' . SID .'&DebtorNo='.$DebtorNo."'>" . _('Back to Customers') . '</a><br>'; -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="">' . ' ' . $title.'<br>'; +$SQLname='SELECT * from debtorsmaster where debtorno="'.$DebtorNo.'"'; +$Result = DB_query($SQLname,$db); +$row = DB_fetch_array($Result); +if (!isset($_GET['Id'])) { + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . + '" alt="">' . ' ' . _('Contacts for Customer: <b>') .$row['name'].'<br>'; +} else { + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . + '" alt="">' . ' ' . _('Edit contact for <b>') .$row['name'].'<br>'; +} if ( isset($_POST['submit']) ) { //initialise no input errors assumed initially before we test @@ -67,6 +76,7 @@ echo '<br>'; prnMsg($msg, 'success'); + echo '<br>'; unset($Id); unset($_POST['conName']); unset($_POST['conRole']); @@ -92,17 +102,12 @@ } if (!isset($Id)) { - $SQLname='SELECT * from debtorsmaster where debtorno="'.$DebtorNo.'"'; - $Result = DB_query($SQLname,$db); - $row = DB_fetch_array($Result); - echo '<div class="centre">' . _('Contacts for Customer: <b>') .$row['name'].'</b></div><br>'; - $sql = "SELECT * FROM custcontacts where debtorno='".$DebtorNo."' ORDER BY contid"; $result = DB_query($sql,$db); //echo '<br>'.$sql; - echo '<table border=1>'; + echo '<table class=selection>'; echo '<tr> <th>' . _('Name') . '</th> <th>' . _('Role') . '</th> @@ -170,9 +175,9 @@ echo '<input type=hidden name="Id" value='. $Id .'>'; echo '<input type=hidden name="Con_ID" value=' . $_POST['Con_ID'] . '>'; echo '<input type=hidden name="DebtorNo" value=' . $_POST['debtorno'] . '>'; - echo '<table><tr><td>'. _('Contact Code').':</td><td>' . $_POST['Con_ID'] . '</td></tr>'; + echo '<table class=selection><tr><td>'. _('Contact Code').':</td><td>' . $_POST['Con_ID'] . '</td></tr>'; } else { - echo '<table>'; + echo '<table class=selection>'; } echo '<tr><td>'. _('Contact Name') . '</td>'; @@ -195,12 +200,12 @@ } echo '<tr><td>' . _('Notes') . '</td>'; if (isset($_POST['conNotes'])) { - echo '<td><textarea name="conNotes">'. $_POST['conNotes'] . '</textarea></table>'; + echo '<td><textarea name="conNotes">'. $_POST['conNotes'] . '</textarea>'; } else { - echo '<td><textarea name="conNotes"></textarea></table>'; + echo '<td><textarea name="conNotes"></textarea>'; } - echo '<br><div class="centre"><input type="Submit" name="submit" value="'. _('Enter Information') . '"></div>'; - + echo '<tr><td colspan=2><div class="centre"><input type="Submit" name="submit" value="'. _('Enter Information') . '"></div></td></tr>'; + echo '</table>'; echo '</form>'; } //end if record deleted no point displaying form to add record Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-06-19 18:48:07 UTC (rev 3510) +++ trunk/doc/Change.log.html 2010-06-19 19:10:23 UTC (rev 3511) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>18/06/10 Tim: AddCustomerContacts.php - Layout improvements</p> <p>18/06/10 Tim: AccountSections.php - Layout improvements</p> <p>18/06/10 Tim: AccountGroups.php - Layout improvements</p> <p>18/06/10 Tim: Areas.php - Layout improvements, and link to SearchCustomer.php</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-06-19 19:22:55
|
Revision: 3512 http://web-erp.svn.sourceforge.net/web-erp/?rev=3512&view=rev Author: tim_schofield Date: 2010-06-19 19:22:48 +0000 (Sat, 19 Jun 2010) Log Message: ----------- Layout improvements Modified Paths: -------------- trunk/AddCustomerNotes.php trunk/doc/Change.log.html Modified: trunk/AddCustomerNotes.php =================================================================== --- trunk/AddCustomerNotes.php 2010-06-19 19:10:23 UTC (rev 3511) +++ trunk/AddCustomerNotes.php 2010-06-19 19:22:48 UTC (rev 3512) @@ -36,19 +36,19 @@ $InputError = 1; prnMsg( _("The contact's notes may not be empty"), 'error'); } - + if (isset($Id) and $InputError !=1) { - - $sql = "UPDATE custnotes SET + + $sql = "UPDATE custnotes SET note='" . $_POST['note'] . "', date='" . FormatDateForSQL($_POST['date']) . "', href='" . $_POST['href'] . "', priority='" . $_POST['priority'] . "' - WHERE debtorno ='".$DebtorNo."' + WHERE debtorno ='".$DebtorNo."' AND noteid=".$Id; $msg = _('Customer Notes') . ' ' . $DebtorNo . ' ' . _('has been updated'); } elseif ($InputError !=1) { - + $sql = "INSERT INTO custnotes (debtorno,href,note,date,priority) VALUES ( '" . $DebtorNo. "', @@ -59,7 +59,7 @@ )"; $msg = _('The contact notes record has been added'); } - + if ($InputError !=1) { $result = DB_query($sql,$db); //echo '<br>'.$sql; @@ -77,7 +77,7 @@ //the link to delete a selected record was clicked instead of the submit button // PREVENT DELETES IF DEPENDENT RECORDS IN 'SalesOrders' - + $sql="DELETE FROM custnotes WHERE noteid=".$Id." and debtorno='".$DebtorNo."'"; $result = DB_query($sql,$db); @@ -87,27 +87,27 @@ prnMsg( _('The contact note record has been deleted'), 'success'); unset($Id); unset($_GET['delete']); - + } - + if (!isset($Id)) { $SQLname='SELECT * from debtorsmaster where debtorno="'.$DebtorNo.'"'; $Result = DB_query($SQLname,$db); $row = DB_fetch_array($Result); - echo '<div class="centre">' . _('Notes for Customer: <b>') .$row['name'].'</b></div>'; - - + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . + '" alt="">' . _('Notes for Customer: <b>') .$row['name'].'<br>'; + $sql = "SELECT * FROM custnotes where debtorno='".$DebtorNo."' ORDER BY date DESC"; $result = DB_query($sql,$db); //echo '<br>'.$sql; - echo '<table border=1>'; + echo '<table class=selection>'; echo '<tr> <th>' . _('Date') . '</th> <th>' . _('Note') . '</th> <th>' . _('WWW') . '</th> <th>' . _('Priority') . '</th>'; - + $k=0; //row colour counter while ($myrow = DB_fetch_array($result)) { @@ -128,26 +128,26 @@ $myrow[3], $myrow[2], $myrow[5], - $_SERVER['PHP_SELF'] . "?" . SID, - $myrow[0], - $myrow[1], - $_SERVER['PHP_SELF'] . "?" . SID, + $_SERVER['PHP_SELF'] . "?" . SID, $myrow[0], + $myrow[1], + $_SERVER['PHP_SELF'] . "?" . SID, + $myrow[0], $myrow[1]); - + } //END WHILE LIST LOOP echo '</table>'; } -if (isset($Id)) { +if (isset($Id)) { echo '<div class="centre"><a href="'.$_SERVER['PHP_SELF'] . '?' . SID .'&DebtorNo='.$DebtorNo.'"><?='._('Review all notes for this Customer').'</a></div>'; -} +} echo '<p>'; if (!isset($_GET['delete'])) { echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '&DebtorNo='.$DebtorNo.'">'; - + if (isset($Id)) { //editing an existing @@ -158,7 +158,7 @@ //echo '<br>'.$sql; $myrow = DB_fetch_array($result); - + $_POST['noteid'] = $myrow['noteid']; $_POST['note'] = $myrow['note']; $_POST['href'] = $myrow['href']; @@ -168,41 +168,41 @@ echo '<input type=hidden name="Id" value='. $Id .'>'; echo '<input type=hidden name="Con_ID" value=' . $_POST['noteid'] . '>'; echo '<input type=hidden name="DebtorNo" value=' . $_POST['debtorno'] . '>'; - echo '<table><tr><td>'. _('Note ID').':</td><td>' . $_POST['noteid'] . '</td></tr>'; + echo '<table class=selection><tr><td>'. _('Note ID').':</td><td>' . $_POST['noteid'] . '</td></tr>'; } else { - echo '<table>'; + echo '<table class=selection>'; } echo '<tr><td>' . _('Contact Note'). '</td>'; - if (isset($_POST['note'])) { - echo '<td><textarea name="note">' .$_POST['note'] . '</textarea></td></tr>'; - } else { - echo '<td><textarea name="note"></textarea></td></tr>'; - } + if (isset($_POST['note'])) { + echo '<td><textarea name="note">' .$_POST['note'] . '</textarea></td></tr>'; + } else { + echo '<td><textarea name="note"></textarea></td></tr>'; + } echo '<tr><td>'. _('WWW').'</td>'; - if (isset($_POST['href'])) { - echo '<td><input type="Text" name="href" value="'.$_POST['href'].'" size=35 maxlength=100></td></tr>'; - } else { - echo '<td><input type="Text" name="href" size=35 maxlength=100></td></tr>'; - } + if (isset($_POST['href'])) { + echo '<td><input type="Text" name="href" value="'.$_POST['href'].'" size=35 maxlength=100></td></tr>'; + } else { + echo '<td><input type="Text" name="href" size=35 maxlength=100></td></tr>'; + } echo '<tr><td>' . _('Date') .'</td>'; - if (isset($_POST['date'])) { - echo '<td><input type="Text" name="date" value="'.ConvertSQLDate($_POST['date']).'" size=10 maxlength=10></td></tr>'; - } else { - echo '<td><input type="Text" name="date" size=10 maxlength=10></td></tr>'; - } + if (isset($_POST['date'])) { + echo '<td><input type="Text" name="date" value="'.ConvertSQLDate($_POST['date']).'" size=10 maxlength=10></td></tr>'; + } else { + echo '<td><input type="Text" name="date" size=10 maxlength=10></td></tr>'; + } echo '<tr><td>'. _('Priority'). '</td>'; - if (isset($_POST['priority'])) { - echo '<td><input type="Text" name="priority" value="' .$_POST['priority']. '" size=1 maxlength=3></td></td>'; - } else { - echo '<td><input type="Text" name="priority" size=1 maxlength=3></td></td>'; - } + if (isset($_POST['priority'])) { + echo '<td><input type="Text" name="priority" value="' .$_POST['priority']. '" size=1 maxlength=3></td></td>'; + } else { + echo '<td><input type="Text" name="priority" size=1 maxlength=3></td></td>'; + } + echo '<tr><td colspan=2><div class="centre"><input type="Submit" name="submit" value="'._('Enter Information').'"></div></td></tr>'; echo '</table>'; - echo '<div class="centre"><input type="Submit" name="submit" value="'._('Enter Information').'"></div>'; echo '</form>'; - -} //end if record deleted no point displaying form to add record +} //end if record deleted no point displaying form to add record + include('includes/footer.inc'); ?> Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-06-19 19:10:23 UTC (rev 3511) +++ trunk/doc/Change.log.html 2010-06-19 19:22:48 UTC (rev 3512) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>18/06/10 Tim: AddCustomerNotes.php - Layout improvements</p> <p>18/06/10 Tim: AddCustomerContacts.php - Layout improvements</p> <p>18/06/10 Tim: AccountSections.php - Layout improvements</p> <p>18/06/10 Tim: AccountGroups.php - Layout improvements</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-06-21 08:19:11
|
Revision: 3513 http://web-erp.svn.sourceforge.net/web-erp/?rev=3513&view=rev Author: tim_schofield Date: 2010-06-21 08:19:00 +0000 (Mon, 21 Jun 2010) Log Message: ----------- updated Z_ChangeStockCode.php as the last one broke due to the recent changes in contractBOM table (just changed the field name). Modified Paths: -------------- trunk/Z_ChangeStockCode.php trunk/doc/Change.log.html Modified: trunk/Z_ChangeStockCode.php =================================================================== --- trunk/Z_ChangeStockCode.php 2010-06-19 19:22:48 UTC (rev 3512) +++ trunk/Z_ChangeStockCode.php 2010-06-21 08:19:00 UTC (rev 3513) @@ -1,323 +1,323 @@ -<?php -/* $Id$*/ -/*Script to Delete all sales transactions*/ - -$PageSecurity=15; -include ('includes/session.inc'); -$title = _('UTILITY PAGE Change A Stock Code'); -include('includes/header.inc'); -include('includes/SQL_CommonFunctions.inc'); - -if (isset($_POST['ProcessStockChange'])){ - - $_POST['NewStockID'] = strtoupper($_POST['NewStockID']); - -/*First check the stock code exists */ - $result=DB_query("SELECT stockid FROM stockmaster WHERE stockid='" . $_POST['OldStockID'] . "'",$db); - if (DB_num_rows($result)==0){ - prnMsg(_('The stock code') . ': ' . $_POST['OldStockID'] . ' ' . _('does not currently exist as a stock code in the system'),'error'); - include('includes/footer.inc'); - exit; - } - - if (ContainsIllegalCharacters($_POST['NewStockID'])){ - prnMsg(_('The new stock code to change the old code to contains illegal characters - no changes will be made'),'error'); - include('includes/footer.inc'); - exit; - } - - if ($_POST['NewStockID']==''){ - prnMsg(_('The new stock code to change the old code to must be entered as well'),'error'); - include('includes/footer.inc'); - exit; - } - - -/*Now check that the new code doesn't already exist */ - $result=DB_query("SELECT stockid FROM stockmaster WHERE stockid='" . $_POST['NewStockID'] . "'",$db); - if (DB_num_rows($result)!=0){ - echo '<br><br>'; - prnMsg(_('The replacement stock code') . ': ' . $_POST['NewStockID'] . ' ' . _('already exists as a stock code in the system') . ' - ' . _('a unique stock code must be entered for the new code'),'error'); - include('includes/footer.inc'); - exit; - } - - - - $result = DB_Txn_Begin($db); - - echo '<br>' . _('Adding the new stock master record'); - $sql = "INSERT INTO stockmaster (stockid, - categoryid, - description, - longdescription, - units, - mbflag, - lastcurcostdate, - actualcost, - lastcost, - materialcost, - labourcost, - overheadcost, - lowestlevel, - discontinued, - controlled, - eoq, - volume, - kgs, - barcode, - discountcategory, - taxcatid) - SELECT '" . $_POST['NewStockID'] . "', - categoryid, - description, - longdescription, - units, - mbflag, - lastcurcostdate, - actualcost, - lastcost, - materialcost, - labourcost, - overheadcost, - lowestlevel, - discontinued, - controlled, - eoq, - volume, - kgs, - barcode, - discountcategory, - taxcatid - FROM stockmaster - WHERE stockid='" . $_POST['OldStockID'] . "'"; - - $DbgMsg = _('The SQL statement that failed was'); - $ErrMsg =_('The SQL to insert the new stock master record failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - echo ' ... ' . _('completed'); - - echo '<br>' . _('Changing stock location records'); - $sql = "UPDATE locstock SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to update stock location records failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - echo ' ... ' . _('completed'); - - echo '<br>' . _('Changing stock movement records'); - $sql = "UPDATE stockmoves SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to update stock movement transaction records failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - echo ' ... ' . _('completed'); - - echo '<BR>' . _('Changing location transfer information'); - - $sql = "UPDATE loctransfers SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to update the loctransfers records failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - echo ' ... ' . _('completed'); - - echo '<BR>' . _('Changing MRP demands information'); - - $sql = "UPDATE mrpdemands SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to update the mrpdemands records failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - echo ' ... ' . _('completed'); - - $sql="select count(table_name) from information_schema.tables where table_schema='".$_SESSION['DatabaseName']."' and table_name='mrpplannedorders'"; - $result = DB_query($sql,$db); - $row=DB_fetch_row($result); - if ($row[0]>0) { - echo '<BR>' . _('Changing MRP planned orders information'); - - $sql = "UPDATE mrpplannedorders SET part='" . $_POST['NewStockID'] . "' WHERE part='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to update the mrpplannedorders records failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - echo ' ... ' . _('completed'); - } - - echo '<BR>' . _('Changing MRP requirements information'); - - $sql = "UPDATE mrprequirements SET part='" . $_POST['NewStockID'] . "' WHERE part='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to update the mrprequirements records failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - echo ' ... ' . _('completed'); - - echo '<BR>' . _('Changing MRP supplies information'); - - $sql = "UPDATE mrpsupplies SET part='" . $_POST['NewStockID'] . "' WHERE part='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to update the mrpsupplies records failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - echo ' ... ' . _('completed'); - - - - echo '<br>' . _('Changing sales analysis records'); - $sql = "UPDATE salesanalysis SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to update Sales Analysis records failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - echo ' ... ' . _('completed'); - - - echo '<br>' . _('Changing order delivery differences records'); - $sql = "UPDATE orderdeliverydifferenceslog SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to update order delivery differences records failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - echo ' ... ' . _('completed'); - - - echo '<br>' . _('Changing pricing records'); - $sql = "UPDATE prices SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to update the pricing records failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - echo ' ... ' . _('completed'); - - - echo '<br>' . _('Changing sales orders detail records'); - $sql = "UPDATE salesorderdetails SET stkcode='" . $_POST['NewStockID'] . "' WHERE stkcode='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to update the sales order header records failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - echo ' ... ' . _('completed'); - - - echo '<br>' . _('Changing purchase order details records'); - $sql = "UPDATE purchorderdetails SET itemcode='" . $_POST['NewStockID'] . "' WHERE itemcode='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to update the purchase order detail records failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - echo ' ... ' . _('completed'); - - - echo '<br>' . _('Changing purchasing data records'); - $sql = "UPDATE purchdata SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to update the purchasing data records failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - echo ' ... ' . _('completed'); - - echo '<br>' . _('Changing the stock code in shipment charges records'); - $sql = "UPDATE shipmentcharges SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to update Shipment Charges records failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - echo ' ... ' . _('completed'); - - echo '<br>' . _('Changing the stock check freeze file records'); - $sql = "UPDATE stockcheckfreeze SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to update stock check freeze records failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - echo ' ... ' . _('completed'); - - echo '<br>' . _('Changing the stock counts table records'); - $sql = "UPDATE stockcounts SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to update stock counts records failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - echo ' ... ' . _('completed'); - - - echo '<br>' . _('Changing the GRNs table records'); - $sql = "UPDATE grns SET itemcode='" . $_POST['NewStockID'] . "' WHERE itemcode='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to update GRN records failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - echo ' ... ' . _('completed'); - - - echo '<br>' . _('Changing the contract BOM table records'); - $sql = "UPDATE contractbom SET component='" . $_POST['NewStockID'] . "' WHERE component='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to contract BOM records failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - echo ' ... ' . _('completed'); - - - echo '<br>' . _('Changing the BOM table records') . ' - ' . _('components'); - $sql = "UPDATE bom SET component='" . $_POST['NewStockID'] . "' WHERE component='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to update the BOM records failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - echo ' ... ' . _('completed'); - - - echo '<br>' . _('Changing the BOM table records') . ' - ' . _('parents'); - $sql = "UPDATE bom SET parent='" . $_POST['NewStockID'] . "' WHERE parent='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to update the BOM parent records failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - echo ' ... ' . _('completed'); - - echo '<br>' . _('Changing any image files'); - if (file_exists($_SESSION['part_pics_dir'] . '/' .$_POST['OldStockID'].'.jpg')) { - if (rename($_SESSION['part_pics_dir'] . '/' .$_POST['OldStockID'].'.jpg', - $_SESSION['part_pics_dir'] . '/' .$_POST['NewStockID'].'.jpg')) { - echo ' ... ' . _('completed'); - } else { - echo ' ... ' . _('failed'); - } - } else { - echo ' ... ' . _('completed'); - } - - echo '<br>' . _('Changing the item properties table records') . ' - ' . _('parents'); - $sql = "UPDATE stockitemproperties SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to update the item properties records failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - echo ' ... ' . _('completed'); - - $sql = 'SET FOREIGN_KEY_CHECKS=0'; - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - - echo '<BR>' . _('Changing work order requirements information'); - - $sql = "UPDATE worequirements SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to update the stockid worequirements records failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - echo ' ... ' . _('completed'); - - $sql = "UPDATE worequirements SET parentstockid='" . $_POST['NewStockID'] . "' WHERE parentstockid='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to update the parent stockid worequirements records failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - echo ' ... ' . _('completed'); - - echo '<BR>' . _('Changing work order information'); - - $sql = "UPDATE woitems SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to update the woitem records failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - echo ' ... ' . _('completed'); - - - echo '<br>' . _('Changing any serialised item information'); - - - $sql = "UPDATE stockserialitems SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to update the stockserialitem records failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - $sql = "UPDATE stockserialmoves SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to update the stockserialitem records failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - echo ' ... ' . _('completed'); - - $sql = 'SET FOREIGN_KEY_CHECKS=1'; - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - - $result = DB_Txn_Commit($db); - - echo '<br>' . _('Deleting the old stock master record'); - $sql = "DELETE FROM stockmaster WHERE stockid='" . $_POST['OldStockID'] . "'"; - $ErrMsg = _('The SQL to delete the old stock master record failed'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - echo ' ... ' . _('completed'); - - - echo '<p>' . _('Stock Code') . ': ' . $_POST['OldStockID'] . ' ' . _('was successfully changed to') . ' : ' . $_POST['NewStockID']; - -} - -echo "<form action='" . $_SERVER['PHP_SELF'] . "?=" . $SID . "' method=post>"; - -echo '<p><table> - <tr><td>' . _('Existing Inventory Code') . ":</td> - <td><input type=Text name='OldStockID' size=20 maxlength=20></td></tr>"; - -echo '<tr><td>' . _('New Inventory Code') . ":</td><td><input type=Text name='NewStockID' size=20 maxlength=20></td></tr>"; -echo '</table>'; - -echo "<div class=centre><input type=submit name='ProcessStockChange' VALUE='" . _('Process') . "'></div>"; - -echo '</form>'; - -include('includes/footer.inc'); +<?php +/* $Id: Z_ChangeStockCode.php 3293 2010-01-12 11:02:25Z tim_schofield $*/ +/*Script to Delete all sales transactions*/ + +$PageSecurity=15; +include ('includes/session.inc'); +$title = _('UTILITY PAGE Change A Stock Code'); +include('includes/header.inc'); +include('includes/SQL_CommonFunctions.inc'); + +if (isset($_POST['ProcessStockChange'])){ + + $_POST['NewStockID'] = strtoupper($_POST['NewStockID']); + +/*First check the stock code exists */ + $result=DB_query("SELECT stockid FROM stockmaster WHERE stockid='" . $_POST['OldStockID'] . "'",$db); + if (DB_num_rows($result)==0){ + prnMsg(_('The stock code') . ': ' . $_POST['OldStockID'] . ' ' . _('does not currently exist as a stock code in the system'),'error'); + include('includes/footer.inc'); + exit; + } + + if (ContainsIllegalCharacters($_POST['NewStockID'])){ + prnMsg(_('The new stock code to change the old code to contains illegal characters - no changes will be made'),'error'); + include('includes/footer.inc'); + exit; + } + + if ($_POST['NewStockID']==''){ + prnMsg(_('The new stock code to change the old code to must be entered as well'),'error'); + include('includes/footer.inc'); + exit; + } + + +/*Now check that the new code doesn't already exist */ + $result=DB_query("SELECT stockid FROM stockmaster WHERE stockid='" . $_POST['NewStockID'] . "'",$db); + if (DB_num_rows($result)!=0){ + echo '<br><br>'; + prnMsg(_('The replacement stock code') . ': ' . $_POST['NewStockID'] . ' ' . _('already exists as a stock code in the system') . ' - ' . _('a unique stock code must be entered for the new code'),'error'); + include('includes/footer.inc'); + exit; + } + + + + $result = DB_Txn_Begin($db); + + echo '<br>' . _('Adding the new stock master record'); + $sql = "INSERT INTO stockmaster (stockid, + categoryid, + description, + longdescription, + units, + mbflag, + lastcurcostdate, + actualcost, + lastcost, + materialcost, + labourcost, + overheadcost, + lowestlevel, + discontinued, + controlled, + eoq, + volume, + kgs, + barcode, + discountcategory, + taxcatid) + SELECT '" . $_POST['NewStockID'] . "', + categoryid, + description, + longdescription, + units, + mbflag, + lastcurcostdate, + actualcost, + lastcost, + materialcost, + labourcost, + overheadcost, + lowestlevel, + discontinued, + controlled, + eoq, + volume, + kgs, + barcode, + discountcategory, + taxcatid + FROM stockmaster + WHERE stockid='" . $_POST['OldStockID'] . "'"; + + $DbgMsg = _('The SQL statement that failed was'); + $ErrMsg =_('The SQL to insert the new stock master record failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + + echo '<br>' . _('Changing stock location records'); + $sql = "UPDATE locstock SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to update stock location records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + + echo '<br>' . _('Changing stock movement records'); + $sql = "UPDATE stockmoves SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to update stock movement transaction records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + + echo '<BR>' . _('Changing location transfer information'); + + $sql = "UPDATE loctransfers SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to update the loctransfers records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + + echo '<BR>' . _('Changing MRP demands information'); + + $sql = "UPDATE mrpdemands SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to update the mrpdemands records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + + $sql="select count(table_name) from information_schema.tables where table_schema='".$_SESSION['DatabaseName']."' and table_name='mrpplannedorders'"; + $result = DB_query($sql,$db); + $row=DB_fetch_row($result); + if ($row[0]>0) { + echo '<BR>' . _('Changing MRP planned orders information'); + + $sql = "UPDATE mrpplannedorders SET part='" . $_POST['NewStockID'] . "' WHERE part='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to update the mrpplannedorders records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + } + + echo '<BR>' . _('Changing MRP requirements information'); + + $sql = "UPDATE mrprequirements SET part='" . $_POST['NewStockID'] . "' WHERE part='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to update the mrprequirements records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + + echo '<BR>' . _('Changing MRP supplies information'); + + $sql = "UPDATE mrpsupplies SET part='" . $_POST['NewStockID'] . "' WHERE part='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to update the mrpsupplies records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + + + + echo '<br>' . _('Changing sales analysis records'); + $sql = "UPDATE salesanalysis SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to update Sales Analysis records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + + + echo '<br>' . _('Changing order delivery differences records'); + $sql = "UPDATE orderdeliverydifferenceslog SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to update order delivery differences records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + + + echo '<br>' . _('Changing pricing records'); + $sql = "UPDATE prices SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to update the pricing records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + + + echo '<br>' . _('Changing sales orders detail records'); + $sql = "UPDATE salesorderdetails SET stkcode='" . $_POST['NewStockID'] . "' WHERE stkcode='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to update the sales order header records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + + + echo '<br>' . _('Changing purchase order details records'); + $sql = "UPDATE purchorderdetails SET itemcode='" . $_POST['NewStockID'] . "' WHERE itemcode='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to update the purchase order detail records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + + + echo '<br>' . _('Changing purchasing data records'); + $sql = "UPDATE purchdata SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to update the purchasing data records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + + echo '<br>' . _('Changing the stock code in shipment charges records'); + $sql = "UPDATE shipmentcharges SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to update Shipment Charges records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + + echo '<br>' . _('Changing the stock check freeze file records'); + $sql = "UPDATE stockcheckfreeze SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to update stock check freeze records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + + echo '<br>' . _('Changing the stock counts table records'); + $sql = "UPDATE stockcounts SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to update stock counts records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + + + echo '<br>' . _('Changing the GRNs table records'); + $sql = "UPDATE grns SET itemcode='" . $_POST['NewStockID'] . "' WHERE itemcode='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to update GRN records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + + + echo '<br>' . _('Changing the contract BOM table records'); + $sql = "UPDATE contractbom SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to contract BOM records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + + + echo '<br>' . _('Changing the BOM table records') . ' - ' . _('components'); + $sql = "UPDATE bom SET component='" . $_POST['NewStockID'] . "' WHERE component='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to update the BOM records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + + + echo '<br>' . _('Changing the BOM table records') . ' - ' . _('parents'); + $sql = "UPDATE bom SET parent='" . $_POST['NewStockID'] . "' WHERE parent='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to update the BOM parent records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + + echo '<br>' . _('Changing any image files'); + if (file_exists($_SESSION['part_pics_dir'] . '/' .$_POST['OldStockID'].'.jpg')) { + if (rename($_SESSION['part_pics_dir'] . '/' .$_POST['OldStockID'].'.jpg', + $_SESSION['part_pics_dir'] . '/' .$_POST['NewStockID'].'.jpg')) { + echo ' ... ' . _('completed'); + } else { + echo ' ... ' . _('failed'); + } + } else { + echo ' ... ' . _('completed'); + } + + echo '<br>' . _('Changing the item properties table records') . ' - ' . _('parents'); + $sql = "UPDATE stockitemproperties SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to update the item properties records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + + $sql = 'SET FOREIGN_KEY_CHECKS=0'; + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + + echo '<BR>' . _('Changing work order requirements information'); + + $sql = "UPDATE worequirements SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to update the stockid worequirements records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + + $sql = "UPDATE worequirements SET parentstockid='" . $_POST['NewStockID'] . "' WHERE parentstockid='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to update the parent stockid worequirements records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + + echo '<BR>' . _('Changing work order information'); + + $sql = "UPDATE woitems SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to update the woitem records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + + + echo '<br>' . _('Changing any serialised item information'); + + + $sql = "UPDATE stockserialitems SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to update the stockserialitem records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + $sql = "UPDATE stockserialmoves SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to update the stockserialitem records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + + $sql = 'SET FOREIGN_KEY_CHECKS=1'; + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + + $result = DB_Txn_Commit($db); + + echo '<br>' . _('Deleting the old stock master record'); + $sql = "DELETE FROM stockmaster WHERE stockid='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to delete the old stock master record failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + + + echo '<p>' . _('Stock Code') . ': ' . $_POST['OldStockID'] . ' ' . _('was successfully changed to') . ' : ' . $_POST['NewStockID']; + +} + +echo "<form action='" . $_SERVER['PHP_SELF'] . "?=" . $SID . "' method=post>"; + +echo '<p><table> + <tr><td>' . _('Existing Inventory Code') . ":</td> + <td><input type=Text name='OldStockID' size=20 maxlength=20></td></tr>"; + +echo '<tr><td>' . _('New Inventory Code') . ":</td><td><input type=Text name='NewStockID' size=20 maxlength=20></td></tr>"; +echo '</table>'; + +echo "<div class=centre><input type=submit name='ProcessStockChange' VALUE='" . _('Process') . "'></div>"; + +echo '</form>'; + +include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-06-19 19:22:48 UTC (rev 3512) +++ trunk/doc/Change.log.html 2010-06-21 08:19:00 UTC (rev 3513) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>21/06/10 Pak Ricard: Z_ChangeStockCode.php - updated Z_ChangeStockCode.php as the last one broke due to the recent changes in contractBOM table (just changed the field name).</p> <p>18/06/10 Tim: AddCustomerNotes.php - Layout improvements</p> <p>18/06/10 Tim: AddCustomerContacts.php - Layout improvements</p> <p>18/06/10 Tim: AccountSections.php - Layout improvements</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-06-23 14:38:22
|
Revision: 3514 http://web-erp.svn.sourceforge.net/web-erp/?rev=3514&view=rev Author: tim_schofield Date: 2010-06-23 14:38:16 +0000 (Wed, 23 Jun 2010) Log Message: ----------- View, accept, or reject any offers made Modified Paths: -------------- trunk/SupplierTenders.php trunk/doc/Change.log.html trunk/index.php Added Paths: ----------- trunk/OffersReceived.php Added: trunk/OffersReceived.php =================================================================== --- trunk/OffersReceived.php (rev 0) +++ trunk/OffersReceived.php 2010-06-23 14:38:16 UTC (rev 3514) @@ -0,0 +1,254 @@ +<?php + +$PageSecurity = 4; + +include('includes/session.inc'); +$title = _('Supplier Offers'); +include('includes/header.inc'); +include('includes/SQL_CommonFunctions.inc'); + +if (isset($_POST['supplierid'])) { + $sql='SELECT suppname, + email, + currcode, + paymentterms + FROM suppliers + WHERE supplierid="'.$_POST['supplierid'].'"'; + $result = DB_query($sql, $db); + $myrow=DB_fetch_array($result); + $SupplierName=$myrow['suppname']; + $Email=$myrow['email']; + $CurrCode=$myrow['currcode']; + $PaymentTerms=$myrow['paymentterms']; +} + +if (!isset($_POST['supplierid'])) { + $sql='SELECT DISTINCT + offers.supplierid, + suppliers.suppname + FROM offers + LEFT JOIN purchorderauth + ON offers.currcode=purchorderauth.currabrev + LEFT JOIN suppliers + ON suppliers.supplierid=offers.supplierid + WHERE purchorderauth.userid="'.$_SESSION['UserID'].'" + AND offers.expirydate>"'.date('Y-m-d').'"'; + $result=DB_query($sql, $db); + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . + _('Select Supplier') . '" alt="">' . ' ' . _('Select Supplier') . '</p>'; + echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; + echo '<table class=selection>'; + echo '<tr><td>'._('Select Supplier').'</td>'; + echo '<td><select name=supplierid>'; + while ($myrow=DB_fetch_array($result)) { + echo '<option value="'.$myrow['supplierid'].'">'.$myrow['suppname'].'</option>'; + } + echo '</select></td></tr>'; + echo '<tr><td colspan=12><div class="centre"><input type=submit name=select value=' . _('Enter Information') . '></div></td></tr>'; + echo '</table>'; + echo '</form>'; +} + +if (!isset($_POST['submit']) and isset($_POST['supplierid'])) { + $sql = 'SELECT offers.offerid, + offers.tenderid, + offers.supplierid, + suppliers.suppname, + offers.stockid, + stockmaster.description, + offers.quantity, + offers.uom, + offers.price, + offers.expirydate, + offers.currcode, + stockmaster.decimalplaces + FROM offers + LEFT JOIN purchorderauth + ON offers.currcode=purchorderauth.currabrev + LEFT JOIN suppliers + ON suppliers.supplierid=offers.supplierid + LEFT JOIN stockmaster + ON stockmaster.stockid=offers.stockid + WHERE purchorderauth.userid="'.$_SESSION['UserID'].'" + AND offers.expirydate>"'.date('Y-m-d').'" + AND offers.supplierid="'.$_POST['supplierid'].'" + ORDER BY offerid'; + $result=DB_query($sql, $db); + + echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; + + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . + _('Supplier Offers') . '" alt="">' . ' ' . _('Supplier Offers') . '</p>'; + + echo '<table class=selection>'; + echo '<tr><th>'._('Offer ID').'</th>'; + echo '<th>'._('Supplier').'</th>'; + echo '<th>'._('Stock Item').'</th>'; + echo '<th>'._('Quantity').'</th>'; + echo '<th>'._('Units').'</th>'; + echo '<th>'._('Price').'</th>'; + echo '<th>'._('Total').'</th>'; + echo '<th>'._('Currency').'</th>'; + echo '<th>'._('Offer Expires').'</th>'; + echo '<th>'._('Accept').'</th>'; + echo '<th>'._('Reject').'</th>'; + echo '<th>'._('Defer').'</th></tr>'; + $k=0; + + while ($myrow=DB_fetch_array($result)) { + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k++; + } + echo '<td>'.$myrow['offerid'].'</td>'; + echo '<td>'.$myrow['suppname'].'</td>'; + echo '<td>'.$myrow['description'].'</td>'; + echo '<td class=number>'.number_format($myrow['quantity'],$myrow['decimalplaces']).'</td>'; + echo '<td>'.$myrow['uom'].'</td>'; + echo '<td class=number>'.number_format($myrow['price'],2).'</td>'; + echo '<td class=number>'.number_format($myrow['price']*$myrow['quantity'],2).'</td>'; + echo '<td>'.$myrow['currcode'].'</td>'; + echo '<td>'.$myrow['expirydate'].'</td>'; + echo '<td><input type="radio" name="action'.$myrow['offerid'].'" value="1"></td>'; + echo '<td><input type="radio" name="action'.$myrow['offerid'].'" value="2"></td>'; + echo '<td><input type="radio" checked name="action'.$myrow['offerid'].'" value="3"></td>'; + echo '<td><input type="hidden" name="supplierid" value="'.$myrow['supplierid'].'"></td>'; + echo '</tr>'; + } + echo '<tr><td colspan=12><div class="centre"><input type=Submit name=submit value=' . _('Enter Information') . '></div></td></tr>'; + echo '</form></table>'; +} else if(isset($_POST['submit']) and isset($_POST['supplierid'])) { + include ('includes/htmlMimeMail.php'); + $accepts=array(); + $rejects=array(); + $defers=array(); + foreach ($_POST as $key => $value) { + if(substr($key,0,6)=='action') { + $OfferID=substr($key,6); + switch ($value) { + case 1: + $accepts[]=$OfferID; + break; + case 2: + $rejects[]=$OfferID; + break; + case 3: + $defers[]=$OfferID; + break; + } + } + } + if (sizeOf($accepts)>0){ + $MailText=_('This email has been automatically generated by the webERP installation at').' '. + $_SESSION['CompanyRecord']['coyname']."\n"; + $MailText.=_('The following offers you made have been accepted')."\n"; + $MailText.=_('An official order will be sent to you in due course')."\n\n"; + $sql='SELECT rate FROM currencies where currabrev="'.$CurrCode.'"'; + $result=DB_query($sql, $db); + $myrow=DB_fetch_array($result); + $Rate=$myrow['rate']; + $OrderNo = GetNextTransNo(18, $db); + $sql='INSERT INTO purchorders ( + orderno, + supplierno, + orddate, + rate, + initiator, + intostocklocation, + deliverydate, + status, + stat_comment, + paymentterms) + VALUES ( + '.$OrderNo.', + "'.$_POST['supplierid'].'", + "'.date('Y-m-d').'", + '.$Rate.', + "'.$_SESSION['UserID'].'", + "'.$_SESSION['DefaultFactoryLocation'].'", + "'.date('Y-m-d').'", + "'._('Pending').'", + "'._('Automatically generated from tendering system').'", + "'.$PaymentTerms.'")'; + DB_query($sql, $db); + foreach ($accepts as $AcceptID) { + $sql='SELECT offers.quantity, + offers.price, + offers.uom, + stockmaster.description, + stockmaster.stockid + FROM offers + LEFT JOIN stockmaster + ON offers.stockid=stockmaster.stockid + WHERE offerid='.$AcceptID; + $result= DB_query($sql, $db); + $myrow=DB_fetch_array($result); + $MailText.=$myrow['description']."\t"._('Quantity').' '.$myrow['quantity']."\t"._('Price').' '. + number_Format($myrow['price'])."\n"; + $sql='INSERT INTO purchorderdetails ( + orderno, + itemcode, + deliverydate, + itemdescription, + unitprice, + actprice, + quantityord, + itemno, + uom) + VALUES ( + '.$OrderNo.', + "'.$myrow['stockid'].'", + "'.date('Y-m-d').'", + "'.$myrow['description'].'", + '.$myrow['price'].', + '.$myrow['price'].', + '.$myrow['quantity'].', + "'.$myrow['stockid'].'", + "'.$myrow['uom'].'")'; + $result=DB_query($sql, $db); + $sql='DELETE FROM offers WHERE offerid="'.$AcceptID.'"'; + $result=DB_query($sql, $db); + } + $mail = new htmlMimeMail(); + $mail->setSubject(_('Your offer to').' '.$_SESSION['CompanyRecord']['coyname'].' '._('has been accepted')); + $mail->setText($MailText); + $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . ' <' . $_SESSION['CompanyRecord']['email'] . '>'); + $result = $mail->send(array($Email), 'smtp'); + prnMsg(_('The accepted offers from').' '.$SupplierName.' '._('have been converted to purchase orders and an email sent to') + .' '.$Email."\n"._('Please review the order contents').' '.'<a href="'.$rootpath . + "/PO_Header.php?" . SID . "&ModifyOrderNumber=" . $OrderNo.'">'._('here').'</a>"', 'success'); + } + if (sizeOf($rejects)>0){ + $MailText=_('This email has been automatically generated by the webERP installation at').' '. + $_SESSION['CompanyRecord']['coyname']."\n"; + $MailText.=_('The following offers you made have been rejected')."\n\n"; + foreach ($rejects as $RejectID) { + $sql='SELECT offers.quantity, + offers.price, + stockmaster.description + FROM offers + LEFT JOIN stockmaster + ON offers.stockid=stockmaster.stockid + WHERE offerid='.$RejectID; + $result= DB_query($sql, $db); + $myrow=DB_fetch_array($result); + $MailText.=$myrow['description']."\t"._('Quantity').' '.$myrow['quantity']."\t"._('Price').' '. + number_Format($myrow['price'])."\n"; + $sql='DELETE FROM offers WHERE offerid="'.$RejectID.'"'; + $result=DB_query($sql, $db); + } + $mail = new htmlMimeMail(); + $mail->setSubject(_('Your offer to').' '.$_SESSION['CompanyRecord']['coyname'].' '._('has been rejected')); + $mail->setText($MailText); + $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . ' <' . $_SESSION['CompanyRecord']['email'] . '>'); + $result = $mail->send(array($Email), 'smtp'); + prnMsg(_('The rejected offers from').' '.$SupplierName.' '._('have been removed from the system and an email sent to') + .' '.$Email, 'success'); + } +} +include('includes/footer.inc'); + +?> \ No newline at end of file Modified: trunk/SupplierTenders.php =================================================================== --- trunk/SupplierTenders.php 2010-06-21 08:19:00 UTC (rev 3513) +++ trunk/SupplierTenders.php 2010-06-23 14:38:16 UTC (rev 3514) @@ -142,7 +142,7 @@ } include ('includes/htmlMimeMail.php'); $mail = new htmlMimeMail(); - $mail->SetSubject(_('Offer received from').' '.$Supplier); + $mail->setSubject(_('Offer received from').' '.$Supplier); $mail->setText(_('This email is automatically generated by webERP')."\n" . _('You have received the following offer from').' '.$Supplier."\n\n".$MailText); $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . ' <' . $_SESSION['CompanyRecord']['email'] . '>'); Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-06-21 08:19:00 UTC (rev 3513) +++ trunk/doc/Change.log.html 2010-06-23 14:38:16 UTC (rev 3514) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>23/06/10 Tim: View, accept, or reject any offers made.</p> <p>21/06/10 Pak Ricard: Z_ChangeStockCode.php - updated Z_ChangeStockCode.php as the last one broke due to the recent changes in contractBOM table (just changed the field name).</p> <p>18/06/10 Tim: AddCustomerNotes.php - Layout improvements</p> <p>18/06/10 Tim: AddCustomerContacts.php - Layout improvements</p> Modified: trunk/index.php =================================================================== --- trunk/index.php 2010-06-21 08:19:00 UTC (rev 3513) +++ trunk/index.php 2010-06-23 14:38:16 UTC (rev 3514) @@ -487,6 +487,11 @@ </tr> <tr> <td class="menu_group_item"> + <?php echo '<p>• <a href="' . $rootpath . '/OffersReceived.php?' . sid . '">' . _('Process Tenders and Offers') . '</a></p>'; ?> + </td> + </tr> + <tr> + <td class="menu_group_item"> <?php echo '<p>• <a href="' . $rootpath . '/PO_AuthoriseMyOrders.php?' . sid . '">' . _('Orders to Authorise') . '</a></p>'; ?> </td> </tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |