From: <dai...@us...> - 2012-02-05 22:00:54
|
Revision: 4874 http://web-erp.svn.sourceforge.net/web-erp/?rev=4874&view=rev Author: daintree Date: 2012-02-05 22:00:48 +0000 (Sun, 05 Feb 2012) Log Message: ----------- Modified Paths: -------------- trunk/PricesBasedOnMarkUp.php trunk/doc/README.txt trunk/doc/UPGRADING.txt Modified: trunk/PricesBasedOnMarkUp.php =================================================================== --- trunk/PricesBasedOnMarkUp.php 2012-02-05 16:15:00 UTC (rev 4873) +++ trunk/PricesBasedOnMarkUp.php 2012-02-05 22:00:48 UTC (rev 4874) @@ -35,13 +35,13 @@ echo '</select></td></tr>'; -$SQL = 'SELECT currency, currabrev FROM currencies'; +$SQL = "SELECT currency, currabrev FROM currencies"; $result = DB_query($SQL,$db); echo '<tr> - <td>' . _('Select the price list currency to update') . ':</td> - <td><select name="CurrCode">'; + <td>' . _('Select the price list currency to update') . ':</td> + <td><select name="CurrCode">'; if (!isset($_POST['CurrCode'])){ echo '<option selected="selected" value="0">' . _('No Price List Currency Selected') . '</option>'; @@ -102,7 +102,7 @@ echo '<tr><td>' . _('Stock Category From') . ':</td> <td><select name="StkCatFrom">'; -$sql = 'SELECT categoryid, categorydescription FROM stockcategory'; +$sql = "SELECT categoryid, categorydescription FROM stockcategory"; $ErrMsg = _('The stock categories could not be retrieved because'); $DbgMsg = _('The SQL used to retrieve stock categories and failed was'); @@ -119,8 +119,9 @@ DB_data_seek($result,0); -echo '<tr><td>' . _('Stock Category To') . ':</td> - <td><select name="StkCatTo">'; +echo '<tr> + <td>' . _('Stock Category To') . ':</td> + <td><select name="StkCatTo">'; while ($myrow=DB_fetch_array($result)){ if (isset($_POST['StkCatFrom']) and $myrow['categoryid']==$_POST['StkCatTo']){ Modified: trunk/doc/README.txt =================================================================== --- trunk/doc/README.txt 2012-02-05 16:15:00 UTC (rev 4873) +++ trunk/doc/README.txt 2012-02-05 22:00:48 UTC (rev 4874) @@ -32,7 +32,7 @@ SUPPORT -The primary means of support queries is through the user mailing list. +The primary means of support queries is through the forum at http://www.weberp.org/forum or the user mailing list. Please join the list at: http://lists.sourceforge.net/lists/listinfo/web-erp-users if you have queries. The archives of the mailing lists on sourceforge and the FAQ (see http://www.weberp.org/wikidocs/FrequentlyAskedQuestionsInstallation) contain the most common issues with respect to installation. Modified: trunk/doc/UPGRADING.txt =================================================================== --- trunk/doc/UPGRADING.txt 2012-02-05 16:15:00 UTC (rev 4873) +++ trunk/doc/UPGRADING.txt 2012-02-05 22:00:48 UTC (rev 4874) @@ -2,19 +2,11 @@ /* $Id$*/ -From version 4.01 database upgrades are now automatically processed if the version number of the code is different to the version number of the database. The first login will require the system administrator to allow the system to upgrade it's own database. A backup of the database prior to the running the upgrade is advisable. The new upgrade system will not be able to identify versions prior to 3.11 so it is necessary to select the version being upgraded from manaully. It can process database upgrades from version 3.00 onwards. +From versions 4.01 database upgrades are now automatically processed if the version number of the code is different to the version number of the database. The first login will require the system administrator to allow the system to upgrade it's own database. A backup of the database prior to the running the upgrade is advisable and a link is provided to download a backup of the database. The new upgrade system will not be able to identify versions prior to 3.11 so it is necessary to select the version being upgraded from manaully. It can process database upgrades from version 3.00 onwards. -From version 3.05 an upgrade script will be provided that applies the database modifications automatically and does any data conversions required for the new scripts to work. +The instructions to complete upgrades the old way are provided below if for some reason it becomes necessary: -The upgrade script to convert a 3.05 database to work with 3.06 scripts is: -Z_Upgrade_3.05-3.06.php - -Once the new scripts have been loaded onto the web-server and a backup of the old database taken this script should be opened in a URL - there are no links to this URL so it will need to be typed manually into the browser. - -Previous to version 3.05, the database conversion had to be done manually - the instructions to complete upgrades from older versions are provided below: - - CONVERTING THE DATABASE MANUALY - THE DETAIL As each new version is released the new php scripts will use new database fields or changed field names. A a consequence, the new scripts will most likely not work unless the database structure has been converted to the new database structure. Normally the changes to the database between versions are small. However, between 2.9b and 3.0 the changes were significant and the upgrade script may take some time to run. It should not be run from a phpMyAdmin window since PHP will time out long before the upgrade script will have finished. @@ -27,13 +19,12 @@ where XX.XX is the old version number and YY.YY is the new version number. -No other users should be using the database. The upgrade script will need to be edited to use the name of the database that your webERP installation was created with - by default this is weberp. If the default has not been changed then the following line will need to be added to the upgrade script - right at the beginning: +No other users should be using the database. The upgrade script will need to be edited to use the name of the database that your webERP installation was created with - by default this is weberpdemo. If the default has not been changed then the following line (or modified for your database name) will need to be added to the upgrade script - right at the beginning: - use weberp; + use weberpdemo; A similar line will be required but substituting the name of the database that your installation uses where the default database name has been changed. - Upgrading a mysql installation, the script should then be run through mysql from the command line: /usr/local/mysql/bin/mysql -u weberp_db_user -p weberp_db_pwd < path_to_upgraded_webERP_install/sql/mysql/upgradeXX.X-YY.Y.sql @@ -55,14 +46,12 @@ You will need to remove this yourself - otherwise you will not be able to create shipment charges. Using the new db scripts will of course generate dbs without this foreign key. - NOTES ON UPGRADING FROM 2.9B TO 3.0 There are extensive changes to the database and the upgrade2.9b-3.0.sql may take some time to run depending on how much data there is in the system. A backup of the 2.9b database dump should be taken prior to attempting to run the upgrade script. -IMPORTANT: Note that version of mysql 4.1.8 or greater is required because from the mysql change log: - "Fix two hangs: FOREIGN KEY constraints treated table and database names as case-insensitive. RENAME TABLE t TO T would hang in an endless loop if t had a foreign key constraint defined on it. Fix also a hang over the dictionary mutex that would occur if one tried in ALTER TABLE or RENAME TABLE to create a foreign key constraint name that collided with another existing name. (Bug -#3478)" +IMPORTANT: Note that mysql version 4.1.8 or greater is required because from the mysql change log: + "Fix two hangs: FOREIGN KEY constraints treated table and database names as case-insensitive. RENAME TABLE t TO T would hang in an endless loop if t had a foreign key constraint defined on it. Fix also a hang over the dictionary mutex that would occur if one tried in ALTER TABLE or RENAME TABLE to create a foreign key constraint name that collided with another existing name. (Bug #3478)" NOTES ON UPGRADING FROM 3.01 to 3.02 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-02-05 23:31:41
|
Revision: 4875 http://web-erp.svn.sourceforge.net/web-erp/?rev=4875&view=rev Author: daintree Date: 2012-02-05 23:31:35 +0000 (Sun, 05 Feb 2012) Log Message: ----------- New method InsertDebtorReceipt Modified Paths: -------------- trunk/CustomerReceipt.php trunk/api/api_debtortransactions.php Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2012-02-05 22:00:48 UTC (rev 4874) +++ trunk/CustomerReceipt.php 2012-02-05 23:31:35 UTC (rev 4875) @@ -436,6 +436,35 @@ } /*end foreach $ReceiptItem */ echo '</table>'; + /*now enter the BankTrans entry */ + + $SQL="INSERT INTO banktrans (type, + transno, + bankact, + ref, + exrate, + functionalexrate, + transdate, + banktranstype, + amount, + currcode) + VALUES ( + 12, + '" . $_SESSION['ReceiptBatch']->BatchNo . "', + '" . $_SESSION['ReceiptBatch']->Account . "', + '" . $_SESSION['ReceiptBatch']->Narrative . "', + '" . $_SESSION['ReceiptBatch']->ExRate . "', + '" . $_SESSION['ReceiptBatch']->FunctionalExRate . "', + '" . FormatDateForSQL($_SESSION['ReceiptBatch']->DateBanked) . "', + '" . $_SESSION['ReceiptBatch']->ReceiptType . "', + '" . ($BatchReceiptsTotal * $_SESSION['ReceiptBatch']->FunctionalExRate * $_SESSION['ReceiptBatch']->ExRate) . "', + '" . $_SESSION['ReceiptBatch']->Currency . "' + )"; + $DbgMsg = _('The SQL that failed to insert the bank account transaction was'); + $ErrMsg = _('Cannot insert a bank transaction'); + $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + + if ($_SESSION['CompanyRecord']['gllink_debtors']==1){ /* then enter GLTrans records for discount, bank and debtors */ if ($BatchReceiptsTotal!=0){ @@ -460,33 +489,7 @@ $ErrMsg = _('Cannot insert a GL transaction for the bank account debit'); $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); - /*now enter the BankTrans entry */ - - $SQL="INSERT INTO banktrans (type, - transno, - bankact, - ref, - exrate, - functionalexrate, - transdate, - banktranstype, - amount, - currcode) - VALUES ( - 12, - '" . $_SESSION['ReceiptBatch']->BatchNo . "', - '" . $_SESSION['ReceiptBatch']->Account . "', - '" . $_SESSION['ReceiptBatch']->Narrative . "', - '" . $_SESSION['ReceiptBatch']->ExRate . "', - '" . $_SESSION['ReceiptBatch']->FunctionalExRate . "', - '" . FormatDateForSQL($_SESSION['ReceiptBatch']->DateBanked) . "', - '" . $_SESSION['ReceiptBatch']->ReceiptType . "', - '" . ($BatchReceiptsTotal * $_SESSION['ReceiptBatch']->FunctionalExRate * $_SESSION['ReceiptBatch']->ExRate) . "', - '" . $_SESSION['ReceiptBatch']->Currency . "' - )"; - $DbgMsg = _('The SQL that failed to insert the bank account transaction was'); - $ErrMsg = _('Cannot insert a bank transaction'); - $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + } if ($BatchDebtorTotal!=0){ /* Now Credit Debtors account with receipts + discounts */ Modified: trunk/api/api_debtortransactions.php =================================================================== --- trunk/api/api_debtortransactions.php 2012-02-05 22:00:48 UTC (rev 4874) +++ trunk/api/api_debtortransactions.php 2012-02-05 23:31:35 UTC (rev 4875) @@ -268,11 +268,12 @@ $Receipt contains an associative array in the format: * $Receipt['debtorno'] - the customer code - * $Receipt['branchcode'] - the branch code * $Receipt['trandate'] - the date of the receipt * $Receipt['amountfx'] - the amount in FX * $Receipt['paymentmethod'] - the payment method of the receipt e.g. cash/EFTPOS/credit card * $Receipt['bankaccount'] - the webERP bank account + + Maybe allocation a separate method... * $Receipt['allocto_transid'] - the invoice to allocate against */ @@ -288,26 +289,91 @@ $fp = fopen( "/root/Web-Server/apidebug/DebugInfo.txt", "w"); $Errors=VerifyDebtorExists($Header['debtorno'], sizeof($Errors), $Errors, $db); - $Errors=VerifyBranchNoExists($Header['debtorno'],$Header['branchcode'], sizeof($Errors), $Errors, $db); + /*Get Company Defaults */ + $ReadCoyResult = api_DB_query("SELECT debtorsact, + gllink_debtors + FROM companies + WHERE coycode=1",$db); + $CompanyRecord = DB_fetch_array($ReadCoyResult); + if (DB_error_no($db) != 0) { + $Errors[] = NoCompanyRecord; + } + + $CustCurrencySQL = "SELECT debtorsmaster.currcode, + rate, + FROM debtorsmaster + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE custbranch.debtorno = '" . $Receipt['debtorno'] . "'"; + $CurrResult = api_DB_query($CustCurrencySQL,$db); + if (DB_error_no($db) != 0) { + $Errors[] = NoReadCustomerBranch; + } + $CustCurrRow = DB_fetch_array($CurrResult); + + + /*Get the currency and rate of the bank account transferring to*/ + $SQL = "SELECT currcode, rate + FROM bankaccounts INNER JOIN currencies + ON bankaccounts.currcode = currencies.currabrev + WHERE accountcode='" . $ReceiptItem->GLCode."'"; + $TrfFromAccountResult = api_DB_query($SQL,$db); + DB_Txn_Begin($db); - } -/* Retrieves the next transaction number for the given type - * This function is already included from SQL_CommonFunctions.php???? - Isn't it?? + $ReceiptNo = GetNextTransNo(12,$db); + $PeriodNo = GetCurrentPeriod($db); +/*now enter the BankTrans entry */ - function GetNextTransactionNo($type, $db) { - $sql="SELECT typeno FROM systypes WHERE typeid='" . $type . "'"; - $result=DB_query($sql, $db); - $myrow=DB_fetch_array($result); - $NextTransaction=$myrow[0]+1; - return $NextTransaction; + $SQL="INSERT INTO banktrans (type, + transno, + bankact, + ref, + exrate, + functionalexrate, + transdate, + banktranstype, + amount, + currcode) + VALUES (12, + '" . $_SESSION['ReceiptBatch']->BatchNo . "', + '" . $_SESSION['ReceiptBatch']->Account . "', + '" . $_SESSION['ReceiptBatch']->Narrative . "', + '" . $_SESSION['ReceiptBatch']->ExRate . "', + '" . $_SESSION['ReceiptBatch']->FunctionalExRate . "', + '" . FormatDateForSQL($_SESSION['ReceiptBatch']->DateBanked) . "', + '" . $_SESSION['ReceiptBatch']->ReceiptType . "', + '" . ($BatchReceiptsTotal * $_SESSION['ReceiptBatch']->FunctionalExRate * $_SESSION['ReceiptBatch']->ExRate) . "', + '" . $_SESSION['ReceiptBatch']->Currency . "')"; + + $result = api_DB_query($SQL,$db,'','',true); + + if ($CompanyRecord[['gllink_debtors']==1) { + /* Now Credit Debtors account with receipts + discounts */ + $SQL="INSERT INTO gltrans ( type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES ( + 12, + '" . $_SESSION['ReceiptBatch']->BatchNo . "', + '" . FormatDateForSQL($_SESSION['ReceiptBatch']->DateBanked) . "', + '" . $PeriodNo . "', + '". $_SESSION['CompanyRecord']['debtorsact'] . "', + '" . $_SESSION['ReceiptBatch']->Narrative . "', + '" . -$BatchDebtorTotal . "')"; + + $result = api_DB_query($SQL,$db,'','',true); + } + } -*/ /* Create a customer credit note in webERP. * Needs an associative array for the Header * and an array of assocative arrays for the $LineDetails This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-02-05 23:31:41
|
Revision: 4875 http://web-erp.svn.sourceforge.net/web-erp/?rev=4875&view=rev Author: daintree Date: 2012-02-05 23:31:35 +0000 (Sun, 05 Feb 2012) Log Message: ----------- New method InsertDebtorReceipt Modified Paths: -------------- trunk/CustomerReceipt.php trunk/api/api_debtortransactions.php Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2012-02-05 22:00:48 UTC (rev 4874) +++ trunk/CustomerReceipt.php 2012-02-05 23:31:35 UTC (rev 4875) @@ -436,6 +436,35 @@ } /*end foreach $ReceiptItem */ echo '</table>'; + /*now enter the BankTrans entry */ + + $SQL="INSERT INTO banktrans (type, + transno, + bankact, + ref, + exrate, + functionalexrate, + transdate, + banktranstype, + amount, + currcode) + VALUES ( + 12, + '" . $_SESSION['ReceiptBatch']->BatchNo . "', + '" . $_SESSION['ReceiptBatch']->Account . "', + '" . $_SESSION['ReceiptBatch']->Narrative . "', + '" . $_SESSION['ReceiptBatch']->ExRate . "', + '" . $_SESSION['ReceiptBatch']->FunctionalExRate . "', + '" . FormatDateForSQL($_SESSION['ReceiptBatch']->DateBanked) . "', + '" . $_SESSION['ReceiptBatch']->ReceiptType . "', + '" . ($BatchReceiptsTotal * $_SESSION['ReceiptBatch']->FunctionalExRate * $_SESSION['ReceiptBatch']->ExRate) . "', + '" . $_SESSION['ReceiptBatch']->Currency . "' + )"; + $DbgMsg = _('The SQL that failed to insert the bank account transaction was'); + $ErrMsg = _('Cannot insert a bank transaction'); + $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + + if ($_SESSION['CompanyRecord']['gllink_debtors']==1){ /* then enter GLTrans records for discount, bank and debtors */ if ($BatchReceiptsTotal!=0){ @@ -460,33 +489,7 @@ $ErrMsg = _('Cannot insert a GL transaction for the bank account debit'); $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); - /*now enter the BankTrans entry */ - - $SQL="INSERT INTO banktrans (type, - transno, - bankact, - ref, - exrate, - functionalexrate, - transdate, - banktranstype, - amount, - currcode) - VALUES ( - 12, - '" . $_SESSION['ReceiptBatch']->BatchNo . "', - '" . $_SESSION['ReceiptBatch']->Account . "', - '" . $_SESSION['ReceiptBatch']->Narrative . "', - '" . $_SESSION['ReceiptBatch']->ExRate . "', - '" . $_SESSION['ReceiptBatch']->FunctionalExRate . "', - '" . FormatDateForSQL($_SESSION['ReceiptBatch']->DateBanked) . "', - '" . $_SESSION['ReceiptBatch']->ReceiptType . "', - '" . ($BatchReceiptsTotal * $_SESSION['ReceiptBatch']->FunctionalExRate * $_SESSION['ReceiptBatch']->ExRate) . "', - '" . $_SESSION['ReceiptBatch']->Currency . "' - )"; - $DbgMsg = _('The SQL that failed to insert the bank account transaction was'); - $ErrMsg = _('Cannot insert a bank transaction'); - $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + } if ($BatchDebtorTotal!=0){ /* Now Credit Debtors account with receipts + discounts */ Modified: trunk/api/api_debtortransactions.php =================================================================== --- trunk/api/api_debtortransactions.php 2012-02-05 22:00:48 UTC (rev 4874) +++ trunk/api/api_debtortransactions.php 2012-02-05 23:31:35 UTC (rev 4875) @@ -268,11 +268,12 @@ $Receipt contains an associative array in the format: * $Receipt['debtorno'] - the customer code - * $Receipt['branchcode'] - the branch code * $Receipt['trandate'] - the date of the receipt * $Receipt['amountfx'] - the amount in FX * $Receipt['paymentmethod'] - the payment method of the receipt e.g. cash/EFTPOS/credit card * $Receipt['bankaccount'] - the webERP bank account + + Maybe allocation a separate method... * $Receipt['allocto_transid'] - the invoice to allocate against */ @@ -288,26 +289,91 @@ $fp = fopen( "/root/Web-Server/apidebug/DebugInfo.txt", "w"); $Errors=VerifyDebtorExists($Header['debtorno'], sizeof($Errors), $Errors, $db); - $Errors=VerifyBranchNoExists($Header['debtorno'],$Header['branchcode'], sizeof($Errors), $Errors, $db); + /*Get Company Defaults */ + $ReadCoyResult = api_DB_query("SELECT debtorsact, + gllink_debtors + FROM companies + WHERE coycode=1",$db); + $CompanyRecord = DB_fetch_array($ReadCoyResult); + if (DB_error_no($db) != 0) { + $Errors[] = NoCompanyRecord; + } + + $CustCurrencySQL = "SELECT debtorsmaster.currcode, + rate, + FROM debtorsmaster + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE custbranch.debtorno = '" . $Receipt['debtorno'] . "'"; + $CurrResult = api_DB_query($CustCurrencySQL,$db); + if (DB_error_no($db) != 0) { + $Errors[] = NoReadCustomerBranch; + } + $CustCurrRow = DB_fetch_array($CurrResult); + + + /*Get the currency and rate of the bank account transferring to*/ + $SQL = "SELECT currcode, rate + FROM bankaccounts INNER JOIN currencies + ON bankaccounts.currcode = currencies.currabrev + WHERE accountcode='" . $ReceiptItem->GLCode."'"; + $TrfFromAccountResult = api_DB_query($SQL,$db); + DB_Txn_Begin($db); - } -/* Retrieves the next transaction number for the given type - * This function is already included from SQL_CommonFunctions.php???? - Isn't it?? + $ReceiptNo = GetNextTransNo(12,$db); + $PeriodNo = GetCurrentPeriod($db); +/*now enter the BankTrans entry */ - function GetNextTransactionNo($type, $db) { - $sql="SELECT typeno FROM systypes WHERE typeid='" . $type . "'"; - $result=DB_query($sql, $db); - $myrow=DB_fetch_array($result); - $NextTransaction=$myrow[0]+1; - return $NextTransaction; + $SQL="INSERT INTO banktrans (type, + transno, + bankact, + ref, + exrate, + functionalexrate, + transdate, + banktranstype, + amount, + currcode) + VALUES (12, + '" . $_SESSION['ReceiptBatch']->BatchNo . "', + '" . $_SESSION['ReceiptBatch']->Account . "', + '" . $_SESSION['ReceiptBatch']->Narrative . "', + '" . $_SESSION['ReceiptBatch']->ExRate . "', + '" . $_SESSION['ReceiptBatch']->FunctionalExRate . "', + '" . FormatDateForSQL($_SESSION['ReceiptBatch']->DateBanked) . "', + '" . $_SESSION['ReceiptBatch']->ReceiptType . "', + '" . ($BatchReceiptsTotal * $_SESSION['ReceiptBatch']->FunctionalExRate * $_SESSION['ReceiptBatch']->ExRate) . "', + '" . $_SESSION['ReceiptBatch']->Currency . "')"; + + $result = api_DB_query($SQL,$db,'','',true); + + if ($CompanyRecord[['gllink_debtors']==1) { + /* Now Credit Debtors account with receipts + discounts */ + $SQL="INSERT INTO gltrans ( type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES ( + 12, + '" . $_SESSION['ReceiptBatch']->BatchNo . "', + '" . FormatDateForSQL($_SESSION['ReceiptBatch']->DateBanked) . "', + '" . $PeriodNo . "', + '". $_SESSION['CompanyRecord']['debtorsact'] . "', + '" . $_SESSION['ReceiptBatch']->Narrative . "', + '" . -$BatchDebtorTotal . "')"; + + $result = api_DB_query($SQL,$db,'','',true); + } + } -*/ /* Create a customer credit note in webERP. * Needs an associative array for the Header * and an array of assocative arrays for the $LineDetails This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-02-06 06:47:42
|
Revision: 4876 http://web-erp.svn.sourceforge.net/web-erp/?rev=4876&view=rev Author: daintree Date: 2012-02-06 06:47:35 +0000 (Mon, 06 Feb 2012) Log Message: ----------- insertDebtorReceipts api method Modified Paths: -------------- trunk/api/api_debtortransactions.php trunk/api/api_xml-rpc.php trunk/doc/Change.log Modified: trunk/api/api_debtortransactions.php =================================================================== --- trunk/api/api_debtortransactions.php 2012-02-05 23:31:35 UTC (rev 4875) +++ trunk/api/api_debtortransactions.php 2012-02-06 06:47:35 UTC (rev 4876) @@ -263,23 +263,21 @@ return $myrow[0]; } + + function InsertDebtorReceipt($Receipt, $User, $Password) { + /* - This function inserts a debtors receipts into a bank account/GL Postings and does the allocation and journals for difference on exchange + This function inserts a debtors receipt into a bank account/GL Postings and does the allocation and journals for difference on exchange $Receipt contains an associative array in the format: * $Receipt['debtorno'] - the customer code - * $Receipt['trandate'] - the date of the receipt + * $Receipt['trandate'] - the date of the receipt in Y-m-d format * $Receipt['amountfx'] - the amount in FX * $Receipt['paymentmethod'] - the payment method of the receipt e.g. cash/EFTPOS/credit card * $Receipt['bankaccount'] - the webERP bank account - - Maybe allocation a separate method... - * $Receipt['allocto_transid'] - the invoice to allocate against + * $Receipt['reference'] */ - - function InsertDebtorReceipt($Receipt, $User, $Password) { - $Errors = array(); $db = db($User, $Password); if (gettype($db)=='integer') { @@ -288,7 +286,6 @@ } $fp = fopen( "/root/Web-Server/apidebug/DebugInfo.txt", "w"); - $Errors=VerifyDebtorExists($Header['debtorno'], sizeof($Errors), $Errors, $db); /*Get Company Defaults */ $ReadCoyResult = api_DB_query("SELECT debtorsact, gllink_debtors @@ -300,34 +297,60 @@ $Errors[] = NoCompanyRecord; } - $CustCurrencySQL = "SELECT debtorsmaster.currcode, - rate, - FROM debtorsmaster - INNER JOIN currencies - ON debtorsmaster.currcode=currencies.currabrev - WHERE custbranch.debtorno = '" . $Receipt['debtorno'] . "'"; + $CustCurrencySQL = "SELECT currcode, + rate + FROM debtorsmaster + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE debtorno = '" . $Receipt['debtorno'] . "'"; $CurrResult = api_DB_query($CustCurrencySQL,$db); if (DB_error_no($db) != 0) { - $Errors[] = NoReadCustomerBranch; + $Errors[] = DebtorDoesntExist; } $CustCurrRow = DB_fetch_array($CurrResult); - - + /*Get the currency and rate of the bank account transferring to*/ - $SQL = "SELECT currcode, rate + $SQL = "SELECT currcode, + rate FROM bankaccounts INNER JOIN currencies ON bankaccounts.currcode = currencies.currabrev - WHERE accountcode='" . $ReceiptItem->GLCode."'"; - $TrfFromAccountResult = api_DB_query($SQL,$db); - + WHERE accountcode='" . $Receipt['bankaccount'] ."'"; + $BankActResult = api_DB_query($SQL,$db); + if (DB_error_no($db) != 0) { + $Errors[] = InvalidBankAccount; + } + + $BankActRow = DB_fetch_array($BankActResult); + + /*To illustrate the rates required + * The money received is assumed to be in the currency of the customer account. + * but it may be banked into a bank account that is denominated in a different currency - so we need to work out the amount of money that this would turn into when sold to the bank to deposit into this bank account - we call this the receipt ex rate. Normally this would be figured out at the time of entry so the actual currency banked agrees. However, we must use the system rates to automate this and the amounts may not agree to actual deposits. + Take an example functional currency NZD receipt from a customer in USD into an AUD bank account + 1 NZD = 0.80 USD + 1 NZD = 0.90 AUD + The FunctionalExRate = 0.90 - the rate between the functional currency and the bank account currency + The receipt ex rate is the rate at which one can sell the received currency and purchase the bank account currency in this case the AUD/USD cross rate + or 0.8/0.9 = 0.88889 + So the receipt ex rate will always be 1 if the currency of the bank account is the same as the customer currency. + + */ + $ReceiptExRate = $CustCurrRow['rate']/$BankActRow['rate']; + $FunctionalExRate = $BankActRow['rate']; + +fputs($fp, 'Receipt ex rate = ' . $ReceiptExRate . "\n"); +fputs($fp, 'Functional ex rate = ' . $FunctionalExRate . "\n"); + DB_Txn_Begin($db); $ReceiptNo = GetNextTransNo(12,$db); $PeriodNo = GetCurrentPeriod($db); /*now enter the BankTrans entry */ +fputs($fp, 'Receipt No = ' . $ReceiptNo . "\n"); +fputs($fp, 'Period No = ' . $PeriodNo . "\n"); + $SQL="INSERT INTO banktrans (type, transno, bankact, @@ -339,20 +362,22 @@ amount, currcode) VALUES (12, - '" . $_SESSION['ReceiptBatch']->BatchNo . "', - '" . $_SESSION['ReceiptBatch']->Account . "', - '" . $_SESSION['ReceiptBatch']->Narrative . "', - '" . $_SESSION['ReceiptBatch']->ExRate . "', - '" . $_SESSION['ReceiptBatch']->FunctionalExRate . "', - '" . FormatDateForSQL($_SESSION['ReceiptBatch']->DateBanked) . "', - '" . $_SESSION['ReceiptBatch']->ReceiptType . "', - '" . ($BatchReceiptsTotal * $_SESSION['ReceiptBatch']->FunctionalExRate * $_SESSION['ReceiptBatch']->ExRate) . "', - '" . $_SESSION['ReceiptBatch']->Currency . "')"; + '" . $ReceiptNo . "', + '" . $Receipt['bankaccount'] . "', + '" . $Receipt['reference'] . "', + '" . $ReceiptExRate . "', + '" . $FunctionalExRate . "', + '" . $Receipt['trandate'] . "', + '" . $Receipt['paymentmethod'] . "', + '" . round($Receipt['amountfx'] / $ReceiptExRate,4) . "', + '" . $CustCurrRow['currcode'] . "')"; $result = api_DB_query($SQL,$db,'','',true); - if ($CompanyRecord[['gllink_debtors']==1) { - /* Now Credit Debtors account with receipts + discounts */ +fputs($fp, "Entered the bank trans with the following SQL: \n" . $SQL . "\n"); + + if ($CompanyRecord['gllink_debtors']==1) { + /* Now Credit Debtors account with receipts */ $SQL="INSERT INTO gltrans ( type, typeno, trandate, @@ -360,27 +385,90 @@ account, narrative, amount) + VALUES (12, + '" . $ReceiptNo . "', + '" . $Receipt['trandate'] . "', + '" . $PeriodNo . "', + '". $CompanyRecord['debtorsact'] . "', + '" . $Receipt['reference'] . "', + '" . round(-$Receipt['amountfx'] * $FunctionalExRate / $ReceiptExRate,4) . "')"; + + $result = api_DB_query($SQL,$db,'','',true); + +fputs($fp, "Entered the debtor GL journal with the following SQL: \n" . $SQL . "\n"); + + /*and debit bank account with the receipt */ + $SQL="INSERT INTO gltrans ( type, + typeno, + trandate, + periodno, + account, + narrative, + amount) VALUES ( 12, - '" . $_SESSION['ReceiptBatch']->BatchNo . "', - '" . FormatDateForSQL($_SESSION['ReceiptBatch']->DateBanked) . "', + '" . $ReceiptNo . "', + '" . $Receipt['trandate'] . "', '" . $PeriodNo . "', - '". $_SESSION['CompanyRecord']['debtorsact'] . "', - '" . $_SESSION['ReceiptBatch']->Narrative . "', - '" . -$BatchDebtorTotal . "')"; + '". $Receipt['bankaccount'] . "', + '" . $Receipt['reference'] . "', + '" . round($Receipt['amountfx'] * $FunctionalExRate / $ReceiptExRate,4) . "')"; $result = api_DB_query($SQL,$db,'','',true); + +fputs($fp, "Entered the bank deposit GL trans with the following SQL: \n" . $SQL . "\n"); + + } /* end if GL linked to debtors */ + + $SQL = "INSERT INTO debtortrans (transno, + type, + debtorno, + trandate, + inputdate, + prd, + reference, + rate, + ovamount, + invtext) + VALUES ('" . $ReceiptNo . "', + 12, + '" . $Receipt['debtorno'] . "', + '" . $Receipt['trandate'] . "', + '" . date('Y-m-d H-i-s') . "', + '" . $PeriodNo . "', + '" . $Receipt['reference'] . "', + '" . ($ReceiptExRate/$FunctionalExRate) . "', + '" . -$Receipt['amountfx'] . "', + '" . $Receipt['paymentmethod'] . "')"; + + $result = api_DB_query($SQL,$db,'','',true); +fputs($fp, "Entered the debtortrans with the following SQL: \n" . $SQL . "\n"); + + $SQL = "UPDATE debtorsmaster SET lastpaiddate = '" . $Receipt['trandate'] . "', + lastpaid='" . $Receipt['amountfx'] ."' + WHERE debtorsmaster.debtorno='" . $Receipt['debtorno'] . "'"; + + $result = api_DB_query($SQL,$db,'','',true); + + + if (sizeof($Errors)==0) { + $Result = DB_Txn_Commit($db); + $Errors[0]=0; + $Errors[1]=$ReceiptNo; + } else { + $Result = DB_Txn_Rollback($db); } - + return $Errors; } -/* Create a customer credit note in webERP. - * Needs an associative array for the Header - * and an array of assocative arrays for the $LineDetails - */ + function CreateCreditNote($Header,$LineDetails, $User, $Password) { + + /* Create a customer credit note in webERP. + * Needs an associative array for the $Header + * and an array of assocative arrays for the $LineDetails - /* $Header contains an associative array in the format: + * $Header contains an associative array in the format: * Header['debtorno'] - the customer code * Header['branchcode'] - the branch code * Header['trandate'] - the date of the credit note Modified: trunk/api/api_xml-rpc.php =================================================================== --- trunk/api/api_xml-rpc.php 2012-02-05 23:31:35 UTC (rev 4875) +++ trunk/api/api_xml-rpc.php 2012-02-06 06:47:35 UTC (rev 4876) @@ -1056,6 +1056,36 @@ unset($Parameter); unset($ReturnValue); + $Description = _('Creates a customer receipt from the details passed to the method as an associative array'); + $Parameter[0]['name'] = _('Create Customer Receipt'); + $Parameter[0]['description'] = _('An associative array describing the customer receipt with the following fields: debtorno - the customer code, trandate - the date of the receipt in Y-m-d format, amountfx - the amount in FX, paymentmethod - the payment method of the receipt e.g. cash/EFTPOS/credit card, bankaccount - the webERP bank account to use for the transaction, reference - the reference to record against the webERP receipt transaction'); + $Parameter[1]['name'] = _('User name'); + $Parameter[1]['description'] = _('A valid weberp username. This user should have security access to this data.'); + $Parameter[2]['name'] = _('User password'); + $Parameter[2]['description'] = _('The weberp password associated with this user name. '); + $ReturnValue[0] = _('This function returns an array of integers. ') + ._('If the first element is zero then the function was successful, and the second element is the receipt number. ') + ._('Otherwise an array of error codes is returned and no insertion takes place. '); + +/*E*/$InsertDebtorReceipt_sig = array(array($xmlrpcStruct,$xmlrpcStruct), +/*x*/ array($xmlrpcStruct,$xmlrpcStruct,$xmlrpcString,$xmlrpcString)); + $InsertDebtorReceipt_doc = apiBuildDocHTML( $Description,$Parameter,$ReturnValue ); + + function xmlrpc_InsertDebtorReceipt($xmlrpcmsg){ + ob_start('ob_file_callback'); +/*x*/ if ($xmlrpcmsg->getNumParams() == 3) { +/*x*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(InsertDebtorReceipt(php_xmlrpc_decode($xmlrpcmsg->getParam( 0 )), $xmlrpcmsg->getParam( 1 )->scalarval( ),$xmlrpcmsg->getParam( 2 )->scalarval( ))) ); +/*x*/ } else { +/*e*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(InsertDebtorReceipt(php_xmlrpc_decode($xmlrpcmsg->getParam( 0 )), '', ''))); +/*x*/ } + ob_end_flush(); + return $rtn; + } + + unset($Description); + unset($Parameter); + unset($ReturnValue); + $Description = _('Creates a credit note from header details associative array and line items'); $Parameter[0]['name'] = _('Credit Note Header Details'); $Parameter[0]['description'] = _('An associative array describing the credit note header with the fields debtorno, branchcode, trandate, tpe, fromstkloc, customerref, shipvia'); @@ -1083,8 +1113,11 @@ ob_end_flush(); return $rtn; } + + unset($Description); + unset($Parameter); + unset($ReturnValue); - $Description = _('Inserts a sales invoice into the debtortrans table and does the relevant GL entries'); $Parameter[0]['name'] = _('Invoice Details'); $Parameter[0]['description'] = _('An array of index/value items describing the invoice.') @@ -3067,6 +3100,10 @@ "function" => "xmlrpc_InsertSalesInvoice", "signature" => $InsertSalesInvoice_sig, "docstring" => $InsertSalesInvoice_doc), + "weberp.xmlrpc_InsertDebtorReceipt" => array( + "function" => "xmlrpc_InsertDebtorReceipt", + "signature" => $InsertDebtorReceipt_sig, + "docstring" => $InsertDebtorReceipt_doc), "weberp.xmlrpc_CreateCreditNote" => array( "function" => "xmlrpc_CreateCreditNote", "signature" => $CreateCreditNote_sig, Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-02-05 23:31:35 UTC (rev 4875) +++ trunk/doc/Change.log 2012-02-06 06:47:35 UTC (rev 4876) @@ -1,5 +1,6 @@ webERP Change Log +6/2/12 Phil: Added new API function InsertDebtorReceipt in api_debtortransactions.php 4/2/12 Vitaly: Fixed addTextWrap() in class.pdf.php. The length of the string was not calculated properly, causing long strings to print beyond the cell boundaries. 4/2/12 Phil: Added new API function CreateCreditNote in api_debtortransactions.php 3/2/12 Vitaly:Fixed bug that was not allowing PO lines to be deleted in OrderValue method of PO class was testing using asignment operator not comparison operator This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-02-06 06:47:42
|
Revision: 4876 http://web-erp.svn.sourceforge.net/web-erp/?rev=4876&view=rev Author: daintree Date: 2012-02-06 06:47:35 +0000 (Mon, 06 Feb 2012) Log Message: ----------- insertDebtorReceipts api method Modified Paths: -------------- trunk/api/api_debtortransactions.php trunk/api/api_xml-rpc.php trunk/doc/Change.log Modified: trunk/api/api_debtortransactions.php =================================================================== --- trunk/api/api_debtortransactions.php 2012-02-05 23:31:35 UTC (rev 4875) +++ trunk/api/api_debtortransactions.php 2012-02-06 06:47:35 UTC (rev 4876) @@ -263,23 +263,21 @@ return $myrow[0]; } + + function InsertDebtorReceipt($Receipt, $User, $Password) { + /* - This function inserts a debtors receipts into a bank account/GL Postings and does the allocation and journals for difference on exchange + This function inserts a debtors receipt into a bank account/GL Postings and does the allocation and journals for difference on exchange $Receipt contains an associative array in the format: * $Receipt['debtorno'] - the customer code - * $Receipt['trandate'] - the date of the receipt + * $Receipt['trandate'] - the date of the receipt in Y-m-d format * $Receipt['amountfx'] - the amount in FX * $Receipt['paymentmethod'] - the payment method of the receipt e.g. cash/EFTPOS/credit card * $Receipt['bankaccount'] - the webERP bank account - - Maybe allocation a separate method... - * $Receipt['allocto_transid'] - the invoice to allocate against + * $Receipt['reference'] */ - - function InsertDebtorReceipt($Receipt, $User, $Password) { - $Errors = array(); $db = db($User, $Password); if (gettype($db)=='integer') { @@ -288,7 +286,6 @@ } $fp = fopen( "/root/Web-Server/apidebug/DebugInfo.txt", "w"); - $Errors=VerifyDebtorExists($Header['debtorno'], sizeof($Errors), $Errors, $db); /*Get Company Defaults */ $ReadCoyResult = api_DB_query("SELECT debtorsact, gllink_debtors @@ -300,34 +297,60 @@ $Errors[] = NoCompanyRecord; } - $CustCurrencySQL = "SELECT debtorsmaster.currcode, - rate, - FROM debtorsmaster - INNER JOIN currencies - ON debtorsmaster.currcode=currencies.currabrev - WHERE custbranch.debtorno = '" . $Receipt['debtorno'] . "'"; + $CustCurrencySQL = "SELECT currcode, + rate + FROM debtorsmaster + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE debtorno = '" . $Receipt['debtorno'] . "'"; $CurrResult = api_DB_query($CustCurrencySQL,$db); if (DB_error_no($db) != 0) { - $Errors[] = NoReadCustomerBranch; + $Errors[] = DebtorDoesntExist; } $CustCurrRow = DB_fetch_array($CurrResult); - - + /*Get the currency and rate of the bank account transferring to*/ - $SQL = "SELECT currcode, rate + $SQL = "SELECT currcode, + rate FROM bankaccounts INNER JOIN currencies ON bankaccounts.currcode = currencies.currabrev - WHERE accountcode='" . $ReceiptItem->GLCode."'"; - $TrfFromAccountResult = api_DB_query($SQL,$db); - + WHERE accountcode='" . $Receipt['bankaccount'] ."'"; + $BankActResult = api_DB_query($SQL,$db); + if (DB_error_no($db) != 0) { + $Errors[] = InvalidBankAccount; + } + + $BankActRow = DB_fetch_array($BankActResult); + + /*To illustrate the rates required + * The money received is assumed to be in the currency of the customer account. + * but it may be banked into a bank account that is denominated in a different currency - so we need to work out the amount of money that this would turn into when sold to the bank to deposit into this bank account - we call this the receipt ex rate. Normally this would be figured out at the time of entry so the actual currency banked agrees. However, we must use the system rates to automate this and the amounts may not agree to actual deposits. + Take an example functional currency NZD receipt from a customer in USD into an AUD bank account + 1 NZD = 0.80 USD + 1 NZD = 0.90 AUD + The FunctionalExRate = 0.90 - the rate between the functional currency and the bank account currency + The receipt ex rate is the rate at which one can sell the received currency and purchase the bank account currency in this case the AUD/USD cross rate + or 0.8/0.9 = 0.88889 + So the receipt ex rate will always be 1 if the currency of the bank account is the same as the customer currency. + + */ + $ReceiptExRate = $CustCurrRow['rate']/$BankActRow['rate']; + $FunctionalExRate = $BankActRow['rate']; + +fputs($fp, 'Receipt ex rate = ' . $ReceiptExRate . "\n"); +fputs($fp, 'Functional ex rate = ' . $FunctionalExRate . "\n"); + DB_Txn_Begin($db); $ReceiptNo = GetNextTransNo(12,$db); $PeriodNo = GetCurrentPeriod($db); /*now enter the BankTrans entry */ +fputs($fp, 'Receipt No = ' . $ReceiptNo . "\n"); +fputs($fp, 'Period No = ' . $PeriodNo . "\n"); + $SQL="INSERT INTO banktrans (type, transno, bankact, @@ -339,20 +362,22 @@ amount, currcode) VALUES (12, - '" . $_SESSION['ReceiptBatch']->BatchNo . "', - '" . $_SESSION['ReceiptBatch']->Account . "', - '" . $_SESSION['ReceiptBatch']->Narrative . "', - '" . $_SESSION['ReceiptBatch']->ExRate . "', - '" . $_SESSION['ReceiptBatch']->FunctionalExRate . "', - '" . FormatDateForSQL($_SESSION['ReceiptBatch']->DateBanked) . "', - '" . $_SESSION['ReceiptBatch']->ReceiptType . "', - '" . ($BatchReceiptsTotal * $_SESSION['ReceiptBatch']->FunctionalExRate * $_SESSION['ReceiptBatch']->ExRate) . "', - '" . $_SESSION['ReceiptBatch']->Currency . "')"; + '" . $ReceiptNo . "', + '" . $Receipt['bankaccount'] . "', + '" . $Receipt['reference'] . "', + '" . $ReceiptExRate . "', + '" . $FunctionalExRate . "', + '" . $Receipt['trandate'] . "', + '" . $Receipt['paymentmethod'] . "', + '" . round($Receipt['amountfx'] / $ReceiptExRate,4) . "', + '" . $CustCurrRow['currcode'] . "')"; $result = api_DB_query($SQL,$db,'','',true); - if ($CompanyRecord[['gllink_debtors']==1) { - /* Now Credit Debtors account with receipts + discounts */ +fputs($fp, "Entered the bank trans with the following SQL: \n" . $SQL . "\n"); + + if ($CompanyRecord['gllink_debtors']==1) { + /* Now Credit Debtors account with receipts */ $SQL="INSERT INTO gltrans ( type, typeno, trandate, @@ -360,27 +385,90 @@ account, narrative, amount) + VALUES (12, + '" . $ReceiptNo . "', + '" . $Receipt['trandate'] . "', + '" . $PeriodNo . "', + '". $CompanyRecord['debtorsact'] . "', + '" . $Receipt['reference'] . "', + '" . round(-$Receipt['amountfx'] * $FunctionalExRate / $ReceiptExRate,4) . "')"; + + $result = api_DB_query($SQL,$db,'','',true); + +fputs($fp, "Entered the debtor GL journal with the following SQL: \n" . $SQL . "\n"); + + /*and debit bank account with the receipt */ + $SQL="INSERT INTO gltrans ( type, + typeno, + trandate, + periodno, + account, + narrative, + amount) VALUES ( 12, - '" . $_SESSION['ReceiptBatch']->BatchNo . "', - '" . FormatDateForSQL($_SESSION['ReceiptBatch']->DateBanked) . "', + '" . $ReceiptNo . "', + '" . $Receipt['trandate'] . "', '" . $PeriodNo . "', - '". $_SESSION['CompanyRecord']['debtorsact'] . "', - '" . $_SESSION['ReceiptBatch']->Narrative . "', - '" . -$BatchDebtorTotal . "')"; + '". $Receipt['bankaccount'] . "', + '" . $Receipt['reference'] . "', + '" . round($Receipt['amountfx'] * $FunctionalExRate / $ReceiptExRate,4) . "')"; $result = api_DB_query($SQL,$db,'','',true); + +fputs($fp, "Entered the bank deposit GL trans with the following SQL: \n" . $SQL . "\n"); + + } /* end if GL linked to debtors */ + + $SQL = "INSERT INTO debtortrans (transno, + type, + debtorno, + trandate, + inputdate, + prd, + reference, + rate, + ovamount, + invtext) + VALUES ('" . $ReceiptNo . "', + 12, + '" . $Receipt['debtorno'] . "', + '" . $Receipt['trandate'] . "', + '" . date('Y-m-d H-i-s') . "', + '" . $PeriodNo . "', + '" . $Receipt['reference'] . "', + '" . ($ReceiptExRate/$FunctionalExRate) . "', + '" . -$Receipt['amountfx'] . "', + '" . $Receipt['paymentmethod'] . "')"; + + $result = api_DB_query($SQL,$db,'','',true); +fputs($fp, "Entered the debtortrans with the following SQL: \n" . $SQL . "\n"); + + $SQL = "UPDATE debtorsmaster SET lastpaiddate = '" . $Receipt['trandate'] . "', + lastpaid='" . $Receipt['amountfx'] ."' + WHERE debtorsmaster.debtorno='" . $Receipt['debtorno'] . "'"; + + $result = api_DB_query($SQL,$db,'','',true); + + + if (sizeof($Errors)==0) { + $Result = DB_Txn_Commit($db); + $Errors[0]=0; + $Errors[1]=$ReceiptNo; + } else { + $Result = DB_Txn_Rollback($db); } - + return $Errors; } -/* Create a customer credit note in webERP. - * Needs an associative array for the Header - * and an array of assocative arrays for the $LineDetails - */ + function CreateCreditNote($Header,$LineDetails, $User, $Password) { + + /* Create a customer credit note in webERP. + * Needs an associative array for the $Header + * and an array of assocative arrays for the $LineDetails - /* $Header contains an associative array in the format: + * $Header contains an associative array in the format: * Header['debtorno'] - the customer code * Header['branchcode'] - the branch code * Header['trandate'] - the date of the credit note Modified: trunk/api/api_xml-rpc.php =================================================================== --- trunk/api/api_xml-rpc.php 2012-02-05 23:31:35 UTC (rev 4875) +++ trunk/api/api_xml-rpc.php 2012-02-06 06:47:35 UTC (rev 4876) @@ -1056,6 +1056,36 @@ unset($Parameter); unset($ReturnValue); + $Description = _('Creates a customer receipt from the details passed to the method as an associative array'); + $Parameter[0]['name'] = _('Create Customer Receipt'); + $Parameter[0]['description'] = _('An associative array describing the customer receipt with the following fields: debtorno - the customer code, trandate - the date of the receipt in Y-m-d format, amountfx - the amount in FX, paymentmethod - the payment method of the receipt e.g. cash/EFTPOS/credit card, bankaccount - the webERP bank account to use for the transaction, reference - the reference to record against the webERP receipt transaction'); + $Parameter[1]['name'] = _('User name'); + $Parameter[1]['description'] = _('A valid weberp username. This user should have security access to this data.'); + $Parameter[2]['name'] = _('User password'); + $Parameter[2]['description'] = _('The weberp password associated with this user name. '); + $ReturnValue[0] = _('This function returns an array of integers. ') + ._('If the first element is zero then the function was successful, and the second element is the receipt number. ') + ._('Otherwise an array of error codes is returned and no insertion takes place. '); + +/*E*/$InsertDebtorReceipt_sig = array(array($xmlrpcStruct,$xmlrpcStruct), +/*x*/ array($xmlrpcStruct,$xmlrpcStruct,$xmlrpcString,$xmlrpcString)); + $InsertDebtorReceipt_doc = apiBuildDocHTML( $Description,$Parameter,$ReturnValue ); + + function xmlrpc_InsertDebtorReceipt($xmlrpcmsg){ + ob_start('ob_file_callback'); +/*x*/ if ($xmlrpcmsg->getNumParams() == 3) { +/*x*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(InsertDebtorReceipt(php_xmlrpc_decode($xmlrpcmsg->getParam( 0 )), $xmlrpcmsg->getParam( 1 )->scalarval( ),$xmlrpcmsg->getParam( 2 )->scalarval( ))) ); +/*x*/ } else { +/*e*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(InsertDebtorReceipt(php_xmlrpc_decode($xmlrpcmsg->getParam( 0 )), '', ''))); +/*x*/ } + ob_end_flush(); + return $rtn; + } + + unset($Description); + unset($Parameter); + unset($ReturnValue); + $Description = _('Creates a credit note from header details associative array and line items'); $Parameter[0]['name'] = _('Credit Note Header Details'); $Parameter[0]['description'] = _('An associative array describing the credit note header with the fields debtorno, branchcode, trandate, tpe, fromstkloc, customerref, shipvia'); @@ -1083,8 +1113,11 @@ ob_end_flush(); return $rtn; } + + unset($Description); + unset($Parameter); + unset($ReturnValue); - $Description = _('Inserts a sales invoice into the debtortrans table and does the relevant GL entries'); $Parameter[0]['name'] = _('Invoice Details'); $Parameter[0]['description'] = _('An array of index/value items describing the invoice.') @@ -3067,6 +3100,10 @@ "function" => "xmlrpc_InsertSalesInvoice", "signature" => $InsertSalesInvoice_sig, "docstring" => $InsertSalesInvoice_doc), + "weberp.xmlrpc_InsertDebtorReceipt" => array( + "function" => "xmlrpc_InsertDebtorReceipt", + "signature" => $InsertDebtorReceipt_sig, + "docstring" => $InsertDebtorReceipt_doc), "weberp.xmlrpc_CreateCreditNote" => array( "function" => "xmlrpc_CreateCreditNote", "signature" => $CreateCreditNote_sig, Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-02-05 23:31:35 UTC (rev 4875) +++ trunk/doc/Change.log 2012-02-06 06:47:35 UTC (rev 4876) @@ -1,5 +1,6 @@ webERP Change Log +6/2/12 Phil: Added new API function InsertDebtorReceipt in api_debtortransactions.php 4/2/12 Vitaly: Fixed addTextWrap() in class.pdf.php. The length of the string was not calculated properly, causing long strings to print beyond the cell boundaries. 4/2/12 Phil: Added new API function CreateCreditNote in api_debtortransactions.php 3/2/12 Vitaly:Fixed bug that was not allowing PO lines to be deleted in OrderValue method of PO class was testing using asignment operator not comparison operator This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-02-07 05:58:42
|
Revision: 4881 http://web-erp.svn.sourceforge.net/web-erp/?rev=4881&view=rev Author: daintree Date: 2012-02-07 05:58:36 +0000 (Tue, 07 Feb 2012) Log Message: ----------- fix stock transfer Modified Paths: -------------- trunk/StockTransfers.php trunk/doc/Change.log Modified: trunk/StockTransfers.php =================================================================== --- trunk/StockTransfers.php 2012-02-07 04:53:54 UTC (rev 4880) +++ trunk/StockTransfers.php 2012-02-07 05:58:36 UTC (rev 4881) @@ -65,7 +65,7 @@ if (isset($_GET['NewTransfer'])){ unset($_SESSION['Transfer']); - unset($_SESSION['TransferItem']); /*this is defined in bulk transfers but needs to be unset for individual trsnsfers */ + unset($_SESSION['TransferItem']); /*this is defined in bulk transfers but needs to be unset for individual transfers */ $NewTransfer=$_GET['NewTransfer']; } @@ -78,6 +78,8 @@ unset($_SESSION['Transfer']); $NewTransfer = true; } + } else { /* _SESSION['Transfer']->TransferItem[0] is not set so */ + $NewTransfer = true; } } Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-02-07 04:53:54 UTC (rev 4880) +++ trunk/doc/Change.log 2012-02-07 05:58:36 UTC (rev 4881) @@ -1,5 +1,7 @@ webERP Change Log +7/2/12 Phil: StockTransfers.php if SESSION['Transfer'][0] not set then now initiate a new transfer +7/2/12 Exson: Sent NewTransfer with call from SelectProduct.php to ensure new transfer initiated 6/2/12 Tim: Removed FUD as new API functions seem consistent with the rest of the API</p> 6/2/12 Phil: Added new API function InsertDebtorReceipt in api_debtortransactions.php 4/2/12 Vitaly: Fixed addTextWrap() in class.pdf.php. The length of the string was not calculated properly, causing long strings to print beyond the cell boundaries. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-02-07 05:58:42
|
Revision: 4881 http://web-erp.svn.sourceforge.net/web-erp/?rev=4881&view=rev Author: daintree Date: 2012-02-07 05:58:36 +0000 (Tue, 07 Feb 2012) Log Message: ----------- fix stock transfer Modified Paths: -------------- trunk/StockTransfers.php trunk/doc/Change.log Modified: trunk/StockTransfers.php =================================================================== --- trunk/StockTransfers.php 2012-02-07 04:53:54 UTC (rev 4880) +++ trunk/StockTransfers.php 2012-02-07 05:58:36 UTC (rev 4881) @@ -65,7 +65,7 @@ if (isset($_GET['NewTransfer'])){ unset($_SESSION['Transfer']); - unset($_SESSION['TransferItem']); /*this is defined in bulk transfers but needs to be unset for individual trsnsfers */ + unset($_SESSION['TransferItem']); /*this is defined in bulk transfers but needs to be unset for individual transfers */ $NewTransfer=$_GET['NewTransfer']; } @@ -78,6 +78,8 @@ unset($_SESSION['Transfer']); $NewTransfer = true; } + } else { /* _SESSION['Transfer']->TransferItem[0] is not set so */ + $NewTransfer = true; } } Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-02-07 04:53:54 UTC (rev 4880) +++ trunk/doc/Change.log 2012-02-07 05:58:36 UTC (rev 4881) @@ -1,5 +1,7 @@ webERP Change Log +7/2/12 Phil: StockTransfers.php if SESSION['Transfer'][0] not set then now initiate a new transfer +7/2/12 Exson: Sent NewTransfer with call from SelectProduct.php to ensure new transfer initiated 6/2/12 Tim: Removed FUD as new API functions seem consistent with the rest of the API</p> 6/2/12 Phil: Added new API function InsertDebtorReceipt in api_debtortransactions.php 4/2/12 Vitaly: Fixed addTextWrap() in class.pdf.php. The length of the string was not calculated properly, causing long strings to print beyond the cell boundaries. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-02-07 06:56:25
|
Revision: 4882 http://web-erp.svn.sourceforge.net/web-erp/?rev=4882&view=rev Author: daintree Date: 2012-02-07 06:56:18 +0000 (Tue, 07 Feb 2012) Log Message: ----------- fix reorder level script Modified Paths: -------------- trunk/ReorderLevelLocation.php trunk/doc/Change.log Modified: trunk/ReorderLevelLocation.php =================================================================== --- trunk/ReorderLevelLocation.php 2012-02-07 05:58:36 UTC (rev 4881) +++ trunk/ReorderLevelLocation.php 2012-02-07 06:56:18 UTC (rev 4882) @@ -24,39 +24,35 @@ } } -if (isset($_POST['submit']) or isset($_POST['update'])) { +if (isset($_POST['submit']) OR isset($_POST['Update'])) { if ($_POST['NumberOfDays']==''){ header('Location: ReorderLevelLocation.php'); } - if($_POST['order']==1){ + if($_POST['Sequence']==1){ $Sequence="qtyinvoice DESC, locstock.stockid"; }else{ $Sequence="locstock.stockid"; } $sql="SELECT locstock.stockid, - stockmaster.description, - locstock.reorderlevel, - (SELECT SUM(salesorderdetails.qtyinvoiced) - FROM salesorderdetails INNER JOIN salesorders - ON salesorderdetails.orderno = salesorders.orderno - WHERE salesorders.fromstkloc = '" . $_POST['StockLocation'] . "' - AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL ".filter_number_format($_POST['NumberOfDays'])." DAY))as qtyinvoice - FROM locstock INNER JOIN stockmaster - ON locstock.stockid = stockmaster.stockid - WHERE stockmaster.categoryid = '" . $_POST['StockCat'] . "' - AND locstock.loccode = '" . $_POST['StockLocation'] . "' - ORDER BY '" . $Sequence . "' ASC"; + description, + reorderlevel, + decimalplaces + FROM locstock INNER JOIN stockmaster + ON locstock.stockid = stockmaster.stockid + WHERE stockmaster.categoryid = '" . $_POST['StockCat'] . "' + AND locstock.loccode = '" . $_POST['StockLocation'] . "' + ORDER BY '" . $Sequence . "' ASC"; $result = DB_query($sql,$db); - $sqlloc="SELECT locationname + $SqlLoc="SELECT locationname FROM locations WHERE loccode='".$_POST['StockLocation']."'"; - $ResultLocation = DB_query($sqlloc,$db); + $ResultLocation = DB_query($SqlLoc,$db); $Location=DB_fetch_array($ResultLocation); echo'<p class="page_title_text" align="center"><strong>' . _('Location : ') . '' . $Location['locationname'] . ' </strong></p>'; @@ -65,7 +61,6 @@ echo '<tr> <th>' . _('Code') . '</th> <th>' . _('Description') . '</th> - <th>' . _('Total Invoiced').'<br />'._('At All Locations') . '</th> <th>' . _('Total Invoiced').'<br />'._('At Location') . '</th> <th>' . _('On Hand') .'<br />'._('At All Locations') . '</th> <th>' . _('On Hand') .'<br />' ._('At Location') . '</th> @@ -73,7 +68,7 @@ <tr>'; $k=0; //row colour counter - echo'<form action="ReorderLevelLocation.php" method="post" name="update">'; + echo'<form action="ReorderLevelLocation.php" method="post" name="Update">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $i=1; while ($myrow=DB_fetch_array($result)) { @@ -88,64 +83,53 @@ //variable for update data - echo'<input type="hidden" value="' . $_POST['order'] . '" name='. _('order').' /> + echo'<input type="hidden" value="' . $_POST['Sequence'] . '" name="Sequence" /> <input type="hidden" value="' . $_POST['StockLocation'] . '" name="StockLocation" /> <input type="hidden" value="' . $_POST['StockCat'] . '" name="StockCat" /> <input type="hidden" value="' . locale_number_format($_POST['NumberOfDays'],0) . '" name="NumberOfDays" />'; - //get qtyinvoice all - $sqlinv="SELECT sum(salesorderdetails.qtyinvoiced)as qtyinvoice - FROM salesorderdetails INNER JOIN salesorders - WHERE salesorderdetails.stkcode='".$myrow['stockid']."' - AND salesorderdetails.orderno = salesorders.orderno - AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL ".filter_number_format($_POST['NumberOfDays'])." DAY) - "; - $ResultInv = DB_query($sqlinv,$db); - $InvoiceAll=DB_fetch_array($ResultInv); + + $SqlInv="SELECT SUM(-qty) AS qtyinvoiced + FROM stockmoves + WHERE stockid='".$myrow['stockid']."' + AND (type=10 OR type=11) + AND loccode='" . $_POST['StockLocation'] ."' + AND trandate >= '" . FormatDateForSQL(DateAdd(Date($_SESSION['DefaultDateFormat']),'d',-filter_number_format($_POST['NumberOfDays']))) . "'"; + + $ResultInvQty = DB_query($SqlInv,$db); + $SalesRow=DB_fetch_array($ResultInvQty); - if($InvoiceAll['0']==''){ - $QtyInvoiceAll=0; - }else{ - $QtyInvoiceAll=$InvoiceAll['qtyinvoice']; - } - - //get qty invoice - if($myrow['qtyinvoice']==''){ - $QtyInvoice=0; - }else{ - $QtyInvoice=$myrow['qtyinvoice']; - } - //get On Hand all //find the quantity onhand item - $sqloh="SELECT sum(quantity)as qty - FROM locstock - WHERE stockid='" . $myrow['stockid'] . "'"; - $oh = DB_query($sqloh,$db); - $ohRow = DB_fetch_row($oh); + $SqlOH="SELECT SUM(quantity) AS qty + FROM locstock + WHERE stockid='" . $myrow['stockid'] . "'"; + $TotQtyResult = DB_query($SqlOH,$db); + $TotQtyRow = DB_fetch_array($TotQtyResult); //get On Hand in Location - $sqlohin="SELECT SUM(quantity) AS qty - FROM `locstock` - WHERE stockid='" . $myrow['stockid'] . "' - AND locstock.loccode = '" . $_POST['StockLocation'] . "'"; - $ohin = DB_query($sqlohin,$db); - $ohinRow = DB_fetch_row($ohin); + $SqlOHLoc="SELECT SUM(quantity) AS qty + FROM locstock + WHERE stockid='" . $myrow['stockid'] . "' + AND locstock.loccode = '" . $_POST['StockLocation'] . "'"; + $LocQtyResult = DB_query($SqlOHLoc,$db); + $LocQtyRow = DB_fetch_array($LocQtyResult); echo'<td>'.$myrow['stockid'].'</td> <td>'.$myrow['description'].'</td> - <td class="number">'.$QtyInvoiceAll.'</td> - <td class="number">'.$QtyInvoice.'</td> - <td class="number">'.$ohRow['0'].'</td> - <td class="number">'.$ohinRow['0'].'</td> + <td class="number">'.locale_number_format($SalesRow['qtyinvoiced'],$myrow['decimalplaces']).'</td> + <td class="number">'.locale_number_format($TotQtyRow['qty'],$myrow['decimalplaces']).'</td> + <td class="number">'.locale_number_format($LocQtyRow['qty'],$myrow['decimalplaces']).'</td> <td><input type="text" class="number" name="ReorderLevel' . $i .'" maxlength="10" size="10" value="'. locale_number_format($myrow['reorderlevel'],0) .'" /> <input type="hidden" name="StockID' . $i . '" value="' . $myrow['stockid'] . '" /></td> </tr> '; $i++; } //end of looping echo'<tr> - <td style="text-align:center" colspan="7"><input type="submit" name="submit" value="' . _('Update') . '" /></td> + <td style="text-align:center" colspan="7"> + <input type="submit" name="submit" value="' . _('Update') . '" /> + </td> </tr> </form>'; @@ -170,7 +154,7 @@ <td><select name="StockLocation"> '; while ($myrow=DB_fetch_array($resultStkLocs)){ - echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } echo '</select></td></tr>'; @@ -194,7 +178,7 @@ <td><input type="text" class="number" name="NumberOfDays" maxlength="3" size="4" value="0" /></td>'; echo '<tr> <td>' . _('Order By') . ':</td> - <td><select name="order"> + <td><select name="Sequence"> <option value="1">'. _('Total Invoiced') . '</option> <option value="2">'. _('Item Code') . '</option> </select></td> Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-02-07 05:58:36 UTC (rev 4881) +++ trunk/doc/Change.log 2012-02-07 06:56:18 UTC (rev 4882) @@ -1,5 +1,6 @@ webERP Change Log +7/2/12 Phil: Reworked ReorderLevelLocation.php 7/2/12 Phil: StockTransfers.php if SESSION['Transfer'][0] not set then now initiate a new transfer 7/2/12 Exson: Sent NewTransfer with call from SelectProduct.php to ensure new transfer initiated 6/2/12 Tim: Removed FUD as new API functions seem consistent with the rest of the API</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-02-07 06:56:25
|
Revision: 4882 http://web-erp.svn.sourceforge.net/web-erp/?rev=4882&view=rev Author: daintree Date: 2012-02-07 06:56:18 +0000 (Tue, 07 Feb 2012) Log Message: ----------- fix reorder level script Modified Paths: -------------- trunk/ReorderLevelLocation.php trunk/doc/Change.log Modified: trunk/ReorderLevelLocation.php =================================================================== --- trunk/ReorderLevelLocation.php 2012-02-07 05:58:36 UTC (rev 4881) +++ trunk/ReorderLevelLocation.php 2012-02-07 06:56:18 UTC (rev 4882) @@ -24,39 +24,35 @@ } } -if (isset($_POST['submit']) or isset($_POST['update'])) { +if (isset($_POST['submit']) OR isset($_POST['Update'])) { if ($_POST['NumberOfDays']==''){ header('Location: ReorderLevelLocation.php'); } - if($_POST['order']==1){ + if($_POST['Sequence']==1){ $Sequence="qtyinvoice DESC, locstock.stockid"; }else{ $Sequence="locstock.stockid"; } $sql="SELECT locstock.stockid, - stockmaster.description, - locstock.reorderlevel, - (SELECT SUM(salesorderdetails.qtyinvoiced) - FROM salesorderdetails INNER JOIN salesorders - ON salesorderdetails.orderno = salesorders.orderno - WHERE salesorders.fromstkloc = '" . $_POST['StockLocation'] . "' - AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL ".filter_number_format($_POST['NumberOfDays'])." DAY))as qtyinvoice - FROM locstock INNER JOIN stockmaster - ON locstock.stockid = stockmaster.stockid - WHERE stockmaster.categoryid = '" . $_POST['StockCat'] . "' - AND locstock.loccode = '" . $_POST['StockLocation'] . "' - ORDER BY '" . $Sequence . "' ASC"; + description, + reorderlevel, + decimalplaces + FROM locstock INNER JOIN stockmaster + ON locstock.stockid = stockmaster.stockid + WHERE stockmaster.categoryid = '" . $_POST['StockCat'] . "' + AND locstock.loccode = '" . $_POST['StockLocation'] . "' + ORDER BY '" . $Sequence . "' ASC"; $result = DB_query($sql,$db); - $sqlloc="SELECT locationname + $SqlLoc="SELECT locationname FROM locations WHERE loccode='".$_POST['StockLocation']."'"; - $ResultLocation = DB_query($sqlloc,$db); + $ResultLocation = DB_query($SqlLoc,$db); $Location=DB_fetch_array($ResultLocation); echo'<p class="page_title_text" align="center"><strong>' . _('Location : ') . '' . $Location['locationname'] . ' </strong></p>'; @@ -65,7 +61,6 @@ echo '<tr> <th>' . _('Code') . '</th> <th>' . _('Description') . '</th> - <th>' . _('Total Invoiced').'<br />'._('At All Locations') . '</th> <th>' . _('Total Invoiced').'<br />'._('At Location') . '</th> <th>' . _('On Hand') .'<br />'._('At All Locations') . '</th> <th>' . _('On Hand') .'<br />' ._('At Location') . '</th> @@ -73,7 +68,7 @@ <tr>'; $k=0; //row colour counter - echo'<form action="ReorderLevelLocation.php" method="post" name="update">'; + echo'<form action="ReorderLevelLocation.php" method="post" name="Update">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $i=1; while ($myrow=DB_fetch_array($result)) { @@ -88,64 +83,53 @@ //variable for update data - echo'<input type="hidden" value="' . $_POST['order'] . '" name='. _('order').' /> + echo'<input type="hidden" value="' . $_POST['Sequence'] . '" name="Sequence" /> <input type="hidden" value="' . $_POST['StockLocation'] . '" name="StockLocation" /> <input type="hidden" value="' . $_POST['StockCat'] . '" name="StockCat" /> <input type="hidden" value="' . locale_number_format($_POST['NumberOfDays'],0) . '" name="NumberOfDays" />'; - //get qtyinvoice all - $sqlinv="SELECT sum(salesorderdetails.qtyinvoiced)as qtyinvoice - FROM salesorderdetails INNER JOIN salesorders - WHERE salesorderdetails.stkcode='".$myrow['stockid']."' - AND salesorderdetails.orderno = salesorders.orderno - AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL ".filter_number_format($_POST['NumberOfDays'])." DAY) - "; - $ResultInv = DB_query($sqlinv,$db); - $InvoiceAll=DB_fetch_array($ResultInv); + + $SqlInv="SELECT SUM(-qty) AS qtyinvoiced + FROM stockmoves + WHERE stockid='".$myrow['stockid']."' + AND (type=10 OR type=11) + AND loccode='" . $_POST['StockLocation'] ."' + AND trandate >= '" . FormatDateForSQL(DateAdd(Date($_SESSION['DefaultDateFormat']),'d',-filter_number_format($_POST['NumberOfDays']))) . "'"; + + $ResultInvQty = DB_query($SqlInv,$db); + $SalesRow=DB_fetch_array($ResultInvQty); - if($InvoiceAll['0']==''){ - $QtyInvoiceAll=0; - }else{ - $QtyInvoiceAll=$InvoiceAll['qtyinvoice']; - } - - //get qty invoice - if($myrow['qtyinvoice']==''){ - $QtyInvoice=0; - }else{ - $QtyInvoice=$myrow['qtyinvoice']; - } - //get On Hand all //find the quantity onhand item - $sqloh="SELECT sum(quantity)as qty - FROM locstock - WHERE stockid='" . $myrow['stockid'] . "'"; - $oh = DB_query($sqloh,$db); - $ohRow = DB_fetch_row($oh); + $SqlOH="SELECT SUM(quantity) AS qty + FROM locstock + WHERE stockid='" . $myrow['stockid'] . "'"; + $TotQtyResult = DB_query($SqlOH,$db); + $TotQtyRow = DB_fetch_array($TotQtyResult); //get On Hand in Location - $sqlohin="SELECT SUM(quantity) AS qty - FROM `locstock` - WHERE stockid='" . $myrow['stockid'] . "' - AND locstock.loccode = '" . $_POST['StockLocation'] . "'"; - $ohin = DB_query($sqlohin,$db); - $ohinRow = DB_fetch_row($ohin); + $SqlOHLoc="SELECT SUM(quantity) AS qty + FROM locstock + WHERE stockid='" . $myrow['stockid'] . "' + AND locstock.loccode = '" . $_POST['StockLocation'] . "'"; + $LocQtyResult = DB_query($SqlOHLoc,$db); + $LocQtyRow = DB_fetch_array($LocQtyResult); echo'<td>'.$myrow['stockid'].'</td> <td>'.$myrow['description'].'</td> - <td class="number">'.$QtyInvoiceAll.'</td> - <td class="number">'.$QtyInvoice.'</td> - <td class="number">'.$ohRow['0'].'</td> - <td class="number">'.$ohinRow['0'].'</td> + <td class="number">'.locale_number_format($SalesRow['qtyinvoiced'],$myrow['decimalplaces']).'</td> + <td class="number">'.locale_number_format($TotQtyRow['qty'],$myrow['decimalplaces']).'</td> + <td class="number">'.locale_number_format($LocQtyRow['qty'],$myrow['decimalplaces']).'</td> <td><input type="text" class="number" name="ReorderLevel' . $i .'" maxlength="10" size="10" value="'. locale_number_format($myrow['reorderlevel'],0) .'" /> <input type="hidden" name="StockID' . $i . '" value="' . $myrow['stockid'] . '" /></td> </tr> '; $i++; } //end of looping echo'<tr> - <td style="text-align:center" colspan="7"><input type="submit" name="submit" value="' . _('Update') . '" /></td> + <td style="text-align:center" colspan="7"> + <input type="submit" name="submit" value="' . _('Update') . '" /> + </td> </tr> </form>'; @@ -170,7 +154,7 @@ <td><select name="StockLocation"> '; while ($myrow=DB_fetch_array($resultStkLocs)){ - echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } echo '</select></td></tr>'; @@ -194,7 +178,7 @@ <td><input type="text" class="number" name="NumberOfDays" maxlength="3" size="4" value="0" /></td>'; echo '<tr> <td>' . _('Order By') . ':</td> - <td><select name="order"> + <td><select name="Sequence"> <option value="1">'. _('Total Invoiced') . '</option> <option value="2">'. _('Item Code') . '</option> </select></td> Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-02-07 05:58:36 UTC (rev 4881) +++ trunk/doc/Change.log 2012-02-07 06:56:18 UTC (rev 4882) @@ -1,5 +1,6 @@ webERP Change Log +7/2/12 Phil: Reworked ReorderLevelLocation.php 7/2/12 Phil: StockTransfers.php if SESSION['Transfer'][0] not set then now initiate a new transfer 7/2/12 Exson: Sent NewTransfer with call from SelectProduct.php to ensure new transfer initiated 6/2/12 Tim: Removed FUD as new API functions seem consistent with the rest of the API</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-02-07 07:27:38
|
Revision: 4883 http://web-erp.svn.sourceforge.net/web-erp/?rev=4883&view=rev Author: daintree Date: 2012-02-07 07:27:32 +0000 (Tue, 07 Feb 2012) Log Message: ----------- Ricards new parameter for StandardCostDecimalPlaces Modified Paths: -------------- trunk/SelectProduct.php trunk/StockCostUpdate.php trunk/SystemParameters.php trunk/doc/Change.log trunk/sql/mysql/upgrade4.06-4.07.sql Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2012-02-07 06:56:18 UTC (rev 4882) +++ trunk/SelectProduct.php 2012-02-07 07:27:32 UTC (rev 4883) @@ -195,7 +195,7 @@ $Cost = $myrow['cost']; } echo '<th class="number">' . _('Cost') . '</th> - <td class="select">' . locale_number_format($Cost, $_SESSION['CompanyRecord']['decimalplaces']) . '</td>'; + <td class="select">' . locale_number_format($Cost, $_SESSION['StandardCostDecimalPlaces']) . '</td>'; } //end of if PricesSecuirty allows viewing of prices echo '</table>'; //end of first nested table // Item Category Property mod: display the item properties Modified: trunk/StockCostUpdate.php =================================================================== --- trunk/StockCostUpdate.php 2012-02-07 06:56:18 UTC (rev 4882) +++ trunk/StockCostUpdate.php 2012-02-07 07:27:32 UTC (rev 4883) @@ -149,10 +149,10 @@ echo '<input type="hidden" name="QOH" value="' . $myrow['totalqoh'] .'" />'; echo '<tr><td>' . _('Last Cost') .':</td> - <td class="number">' . locale_number_format($myrow['lastcost'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td></tr>'; + <td class="number">' . locale_number_format($myrow['lastcost'],$_SESSION['StandardCostDecimalPlaces']) . '</td></tr>'; if (! in_array($UpdateSecurity,$_SESSION['AllowedPageSecurityTokens'])){ echo '<tr><td>' . _('Cost') . ':</td> - <td class="number">' . locale_number_format($myrow['materialcost']+$myrow['labourcost']+$myrow['overheadcost'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . locale_number_format($myrow['materialcost']+$myrow['labourcost']+$myrow['overheadcost'],$_SESSION['StandardCostDecimalPlaces']) . '</td> </tr> </table>'; } else { @@ -160,20 +160,20 @@ if ($myrow['mbflag']=='M'){ echo '<input type="hidden" name="MaterialCost" value="' . $myrow['materialcost'] . '" />'; echo '<tr><td>' . _('Standard Material Cost Per Unit') .':</td> - <td class="number">' . locale_number_format($myrow['materialcost'],4) . '</td> + <td class="number">' . locale_number_format($myrow['materialcost'],$_SESSION['StandardCostDecimalPlaces']) . '</td> </tr>'; echo '<tr> <td>' . _('Standard Labour Cost Per Unit') . ':</td> - <td class="number"><input type="text" class="number" name="LabourCost" value="' . locale_number_format($myrow['labourcost'],4) . '" /></td> + <td class="number"><input type="text" class="number" name="LabourCost" value="' . locale_number_format($myrow['labourcost'],$_SESSION['StandardCostDecimalPlaces']) . '" /></td> </tr>'; echo '<tr> <td>' . _('Standard Overhead Cost Per Unit') . ':</td> - <td class="number"><input type="text" class="number" name="OverheadCost" value="' . locale_number_format($myrow['overheadcost'],4) . '" /></td> + <td class="number"><input type="text" class="number" name="OverheadCost" value="' . locale_number_format($myrow['overheadcost'],$_SESSION['StandardCostDecimalPlaces']) . '" /></td> </tr>'; } elseif ($myrow['mbflag']=='B' OR $myrow['mbflag']=='D') { echo '<tr> <td>' . _('Standard Cost') .':</td> - <td class="number"><input type="text" class="number" name="MaterialCost" value="' . locale_number_format($myrow['materialcost'],4) . '" /></td> + <td class="number"><input type="text" class="number" name="MaterialCost" value="' . locale_number_format($myrow['materialcost'],$_SESSION['StandardCostDecimalPlaces']) . '" /></td> </tr>'; } else { echo '<input type="hidden" name="LabourCost" value="0" />'; Modified: trunk/SystemParameters.php =================================================================== --- trunk/SystemParameters.php 2012-02-07 06:56:18 UTC (rev 4882) +++ trunk/SystemParameters.php 2012-02-07 07:27:32 UTC (rev 4883) @@ -43,6 +43,10 @@ } elseif (mb_strlen($_POST['X_FreightChargeAppliesIfLessThan']) > 12 || !is_numeric($_POST['X_FreightChargeAppliesIfLessThan']) ) { $InputError = 1; prnMsg(_('Freight Charge Applies If Less Than must be a number'),'error'); + } elseif ( !is_numeric($_POST['X_StandardCostDecimalPlaces']) || + $_POST['X_StandardCostDecimalPlaces'] < 0 || $_POST['X_StandardCostDecimalPlaces'] > 4 ) { + $InputError = 1; + prnMsg(_('Standard Cost Decimal Places must be a number between 0 and 4'),'error'); } elseif (mb_strlen($_POST['X_NumberOfPeriodsOfStockUsage']) > 2 || !is_numeric($_POST['X_NumberOfPeriodsOfStockUsage']) || $_POST['X_NumberOfPeriodsOfStockUsage'] < 1 || $_POST['X_NumberOfPeriodsOfStockUsage'] > 12 ) { $InputError = 1; @@ -153,6 +157,9 @@ if ($_SESSION['CountryOfOperation'] != $_POST['X_CountryOfOperation'] ) { $sql[] = "UPDATE config SET confvalue = '". $_POST['X_CountryOfOperation'] ."' WHERE confname = 'CountryOfOperation'"; } + if ($_SESSION['StandardCostDecimalPlaces'] != $_POST['X_StandardCostDecimalPlaces'] ) { + $sql[] = "UPDATE config SET confvalue = '".$_POST['X_StandardCostDecimalPlaces']."' WHERE confname = 'StandardCostDecimalPlaces'"; + } if ($_SESSION['NumberOfPeriodsOfStockUsage'] != $_POST['X_NumberOfPeriodsOfStockUsage'] ) { $sql[] = "UPDATE config SET confvalue = '".$_POST['X_NumberOfPeriodsOfStockUsage']."' WHERE confname = 'NumberOfPeriodsOfStockUsage'"; } @@ -599,6 +606,13 @@ echo '</select></td> <td>' . _('This parameter is only effective if Do Freight Calculation is set to Yes. Country names come from the currencies table.') .'</td></tr>'; +// StandardCostDecimalPlaces +echo '<tr style="outline: 1px solid"><td>' . _('Standard Cost Decimal Places') . ':</td> + <td><select name="X_StandardCostDecimalPlaces">'; +for ($i=0; $i <= 4; $i++ ) + echo '<option '.($_SESSION['StandardCostDecimalPlaces'] == $i?'selected ':'').'value="'.$i.'">'.$i; +echo '</select></td><td>' . _('Decimal Places to be used in Standard Cost') .'</td></tr>'; + // NumberOfPeriodsOfStockUsage echo '<tr style="outline: 1px solid"><td>' . _('Number Of Periods Of StockUsage') . ':</td> <td><select name="X_NumberOfPeriodsOfStockUsage">'; Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-02-07 06:56:18 UTC (rev 4882) +++ trunk/doc/Change.log 2012-02-07 07:27:32 UTC (rev 4883) @@ -1,5 +1,6 @@ webERP Change Log +7/2/12 Ricard: Made new system parameter for StandardCostDecimalPlaces - reworked SelectProduct.php and StockCostUpdate.php to use the new parameter. Modified SystemParameters.php to allow the parameter to be a number between 0 and 4 inclusive. 7/2/12 Phil: Reworked ReorderLevelLocation.php 7/2/12 Phil: StockTransfers.php if SESSION['Transfer'][0] not set then now initiate a new transfer 7/2/12 Exson: Sent NewTransfer with call from SelectProduct.php to ensure new transfer initiated Modified: trunk/sql/mysql/upgrade4.06-4.07.sql =================================================================== --- trunk/sql/mysql/upgrade4.06-4.07.sql 2012-02-07 06:56:18 UTC (rev 4882) +++ trunk/sql/mysql/upgrade4.06-4.07.sql 2012-02-07 07:27:32 UTC (rev 4883) @@ -33,4 +33,6 @@ ALTER TABLE `www_users` ADD `cancreatetender` tinyint(1) NOT NULL DEFAULT 0 AFTER `fullaccess`; INSERT INTO `systypes` (`typeid`, `typename`, `typeno`) VALUES (37, 'Tenders', 0); +INSERT INTO `config` VALUES ('StandardCostDecimalPlaces','2'); + UPDATE config SET confvalue='4.07.0' WHERE confname='VersionNumber'; \ 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: <dai...@us...> - 2012-02-07 07:27:38
|
Revision: 4883 http://web-erp.svn.sourceforge.net/web-erp/?rev=4883&view=rev Author: daintree Date: 2012-02-07 07:27:32 +0000 (Tue, 07 Feb 2012) Log Message: ----------- Ricards new parameter for StandardCostDecimalPlaces Modified Paths: -------------- trunk/SelectProduct.php trunk/StockCostUpdate.php trunk/SystemParameters.php trunk/doc/Change.log trunk/sql/mysql/upgrade4.06-4.07.sql Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2012-02-07 06:56:18 UTC (rev 4882) +++ trunk/SelectProduct.php 2012-02-07 07:27:32 UTC (rev 4883) @@ -195,7 +195,7 @@ $Cost = $myrow['cost']; } echo '<th class="number">' . _('Cost') . '</th> - <td class="select">' . locale_number_format($Cost, $_SESSION['CompanyRecord']['decimalplaces']) . '</td>'; + <td class="select">' . locale_number_format($Cost, $_SESSION['StandardCostDecimalPlaces']) . '</td>'; } //end of if PricesSecuirty allows viewing of prices echo '</table>'; //end of first nested table // Item Category Property mod: display the item properties Modified: trunk/StockCostUpdate.php =================================================================== --- trunk/StockCostUpdate.php 2012-02-07 06:56:18 UTC (rev 4882) +++ trunk/StockCostUpdate.php 2012-02-07 07:27:32 UTC (rev 4883) @@ -149,10 +149,10 @@ echo '<input type="hidden" name="QOH" value="' . $myrow['totalqoh'] .'" />'; echo '<tr><td>' . _('Last Cost') .':</td> - <td class="number">' . locale_number_format($myrow['lastcost'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td></tr>'; + <td class="number">' . locale_number_format($myrow['lastcost'],$_SESSION['StandardCostDecimalPlaces']) . '</td></tr>'; if (! in_array($UpdateSecurity,$_SESSION['AllowedPageSecurityTokens'])){ echo '<tr><td>' . _('Cost') . ':</td> - <td class="number">' . locale_number_format($myrow['materialcost']+$myrow['labourcost']+$myrow['overheadcost'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . locale_number_format($myrow['materialcost']+$myrow['labourcost']+$myrow['overheadcost'],$_SESSION['StandardCostDecimalPlaces']) . '</td> </tr> </table>'; } else { @@ -160,20 +160,20 @@ if ($myrow['mbflag']=='M'){ echo '<input type="hidden" name="MaterialCost" value="' . $myrow['materialcost'] . '" />'; echo '<tr><td>' . _('Standard Material Cost Per Unit') .':</td> - <td class="number">' . locale_number_format($myrow['materialcost'],4) . '</td> + <td class="number">' . locale_number_format($myrow['materialcost'],$_SESSION['StandardCostDecimalPlaces']) . '</td> </tr>'; echo '<tr> <td>' . _('Standard Labour Cost Per Unit') . ':</td> - <td class="number"><input type="text" class="number" name="LabourCost" value="' . locale_number_format($myrow['labourcost'],4) . '" /></td> + <td class="number"><input type="text" class="number" name="LabourCost" value="' . locale_number_format($myrow['labourcost'],$_SESSION['StandardCostDecimalPlaces']) . '" /></td> </tr>'; echo '<tr> <td>' . _('Standard Overhead Cost Per Unit') . ':</td> - <td class="number"><input type="text" class="number" name="OverheadCost" value="' . locale_number_format($myrow['overheadcost'],4) . '" /></td> + <td class="number"><input type="text" class="number" name="OverheadCost" value="' . locale_number_format($myrow['overheadcost'],$_SESSION['StandardCostDecimalPlaces']) . '" /></td> </tr>'; } elseif ($myrow['mbflag']=='B' OR $myrow['mbflag']=='D') { echo '<tr> <td>' . _('Standard Cost') .':</td> - <td class="number"><input type="text" class="number" name="MaterialCost" value="' . locale_number_format($myrow['materialcost'],4) . '" /></td> + <td class="number"><input type="text" class="number" name="MaterialCost" value="' . locale_number_format($myrow['materialcost'],$_SESSION['StandardCostDecimalPlaces']) . '" /></td> </tr>'; } else { echo '<input type="hidden" name="LabourCost" value="0" />'; Modified: trunk/SystemParameters.php =================================================================== --- trunk/SystemParameters.php 2012-02-07 06:56:18 UTC (rev 4882) +++ trunk/SystemParameters.php 2012-02-07 07:27:32 UTC (rev 4883) @@ -43,6 +43,10 @@ } elseif (mb_strlen($_POST['X_FreightChargeAppliesIfLessThan']) > 12 || !is_numeric($_POST['X_FreightChargeAppliesIfLessThan']) ) { $InputError = 1; prnMsg(_('Freight Charge Applies If Less Than must be a number'),'error'); + } elseif ( !is_numeric($_POST['X_StandardCostDecimalPlaces']) || + $_POST['X_StandardCostDecimalPlaces'] < 0 || $_POST['X_StandardCostDecimalPlaces'] > 4 ) { + $InputError = 1; + prnMsg(_('Standard Cost Decimal Places must be a number between 0 and 4'),'error'); } elseif (mb_strlen($_POST['X_NumberOfPeriodsOfStockUsage']) > 2 || !is_numeric($_POST['X_NumberOfPeriodsOfStockUsage']) || $_POST['X_NumberOfPeriodsOfStockUsage'] < 1 || $_POST['X_NumberOfPeriodsOfStockUsage'] > 12 ) { $InputError = 1; @@ -153,6 +157,9 @@ if ($_SESSION['CountryOfOperation'] != $_POST['X_CountryOfOperation'] ) { $sql[] = "UPDATE config SET confvalue = '". $_POST['X_CountryOfOperation'] ."' WHERE confname = 'CountryOfOperation'"; } + if ($_SESSION['StandardCostDecimalPlaces'] != $_POST['X_StandardCostDecimalPlaces'] ) { + $sql[] = "UPDATE config SET confvalue = '".$_POST['X_StandardCostDecimalPlaces']."' WHERE confname = 'StandardCostDecimalPlaces'"; + } if ($_SESSION['NumberOfPeriodsOfStockUsage'] != $_POST['X_NumberOfPeriodsOfStockUsage'] ) { $sql[] = "UPDATE config SET confvalue = '".$_POST['X_NumberOfPeriodsOfStockUsage']."' WHERE confname = 'NumberOfPeriodsOfStockUsage'"; } @@ -599,6 +606,13 @@ echo '</select></td> <td>' . _('This parameter is only effective if Do Freight Calculation is set to Yes. Country names come from the currencies table.') .'</td></tr>'; +// StandardCostDecimalPlaces +echo '<tr style="outline: 1px solid"><td>' . _('Standard Cost Decimal Places') . ':</td> + <td><select name="X_StandardCostDecimalPlaces">'; +for ($i=0; $i <= 4; $i++ ) + echo '<option '.($_SESSION['StandardCostDecimalPlaces'] == $i?'selected ':'').'value="'.$i.'">'.$i; +echo '</select></td><td>' . _('Decimal Places to be used in Standard Cost') .'</td></tr>'; + // NumberOfPeriodsOfStockUsage echo '<tr style="outline: 1px solid"><td>' . _('Number Of Periods Of StockUsage') . ':</td> <td><select name="X_NumberOfPeriodsOfStockUsage">'; Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-02-07 06:56:18 UTC (rev 4882) +++ trunk/doc/Change.log 2012-02-07 07:27:32 UTC (rev 4883) @@ -1,5 +1,6 @@ webERP Change Log +7/2/12 Ricard: Made new system parameter for StandardCostDecimalPlaces - reworked SelectProduct.php and StockCostUpdate.php to use the new parameter. Modified SystemParameters.php to allow the parameter to be a number between 0 and 4 inclusive. 7/2/12 Phil: Reworked ReorderLevelLocation.php 7/2/12 Phil: StockTransfers.php if SESSION['Transfer'][0] not set then now initiate a new transfer 7/2/12 Exson: Sent NewTransfer with call from SelectProduct.php to ensure new transfer initiated Modified: trunk/sql/mysql/upgrade4.06-4.07.sql =================================================================== --- trunk/sql/mysql/upgrade4.06-4.07.sql 2012-02-07 06:56:18 UTC (rev 4882) +++ trunk/sql/mysql/upgrade4.06-4.07.sql 2012-02-07 07:27:32 UTC (rev 4883) @@ -33,4 +33,6 @@ ALTER TABLE `www_users` ADD `cancreatetender` tinyint(1) NOT NULL DEFAULT 0 AFTER `fullaccess`; INSERT INTO `systypes` (`typeid`, `typename`, `typeno`) VALUES (37, 'Tenders', 0); +INSERT INTO `config` VALUES ('StandardCostDecimalPlaces','2'); + UPDATE config SET confvalue='4.07.0' WHERE confname='VersionNumber'; \ 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: <dai...@us...> - 2012-02-08 09:40:37
|
Revision: 4885 http://web-erp.svn.sourceforge.net/web-erp/?rev=4885&view=rev Author: daintree Date: 2012-02-08 09:40:30 +0000 (Wed, 08 Feb 2012) Log Message: ----------- manual session issues Modified Paths: -------------- trunk/api/api_debtortransactions.php trunk/api/api_errorcodes.php trunk/api/api_xml-rpc.php trunk/doc/Manual/ManualAPIFunctions.php trunk/doc/Manual/ManualContents.php Modified: trunk/api/api_debtortransactions.php =================================================================== --- trunk/api/api_debtortransactions.php 2012-02-07 09:12:13 UTC (rev 4884) +++ trunk/api/api_debtortransactions.php 2012-02-08 09:40:30 UTC (rev 4885) @@ -1281,7 +1281,7 @@ 0, '" . $InvoiceDetails['jobref'] . "', 1)"; - $result = DB_Query($sql, $db); + $result = api_DB_Query($sql, $db); $sql="INSERT INTO gltrans VALUES(null, 10, '" . GetNextTransactionNo(10, $db) . "', @@ -1294,7 +1294,7 @@ 0, '" . $InvoiceDetails['jobref'] . "', 1)"; - $result = DB_Query($sql, $db); + $result = api_DB_Query($sql, $db); $result= DB_Txn_Commit($db); if (DB_error_no($db) != 0) { $Errors[0] = DatabaseUpdateFailed; @@ -1309,6 +1309,91 @@ } } + function AllocateTrans($AllocDetails, $User, $Password) { + + /* AllocDetails is an associative array containing: + * AllocDetails['debtorno'] + * AllocDetails['type'] + * AllocDetails['transno'] + * AllocDetails['customerref'] + */ + $Errors = array(); + $db = db($User, $Password); + if (gettype($db)=='integer') { + $Errors[0]=NoAuthorisation; + return $Errors; + } + $Errors=VerifyDebtorExists($AllocDetails['debtorno'], sizeof($Errors), $Errors, $db); + /*Get the outstanding amount to allocate (all amounts in FX) from the transaction*/ + + if ($AllocDetails['type'] !='11' AND $AllocDetails['type'] !=12){ + $Errors[] = MustBeReceiptOrCreditNote; + } + $SQL = "SELECT id, + rate, + ovamount+ovgst-alloc AS lefttoalloc + FROM debtortrans + WHERE debtorno='" . $AllocDetails['debtorno'] . "' + AND type='" . $AllocDetails['type'] . "' + AND transno='" . $AllocDetails['transno'] . "'"; + $Result = api_DB_query($SQL,$db); + $LeftToAllocRow = DB_fetch_array($Result); + if (DB_num_row($Result)==0){ + $Errors[] = NoTransactionToAllocate; + } + + if ($LeftToAllocRow['lefttoalloc'] >= 0){ + /*Now look for invoices with the same customerref to allocate to */ + $SQL = "SELECT id, + rate, + -ovamount-ovgst-alloc AS outstanding + FROM debtortrans + WHERE debtorno='" . $AllocDetails['debtorno'] . "' + AND type=10 + AND customerref='" . $AllocDetails['customerref'] . "'"; + $Result = api_DB_query($SQL,$db); + $OSInvRow = DB_fetch_array($Result); + if ($OSInvRow['rate']==$LeftToAllocRow['rate'] + AND $OSInvRow['outstanding']>0){ + + if ($OSInvRow['outstanding']>=$LeftToAllocRow['lefttoalloc']){ + /*We can allocate the whole amount of the credit/receipt */ + $AllocateAmount = $LeftToAllocRow['lefttoalloc']; + } else { + /*We can only allocate the rest of the invoice outstanding */ + $AllocateAmount = $OSInvRow['outstanding']; + } + DB_Txn_Begin($db); + /*Now insert the allocation records */ + $SQL = "INSERT INTO custallocs (amt, + datealloc, + transid_allocfrom, + transid_allocto) + VALUE('" . $AllocateAmount . "', + '" . Date('Y-m-d') . "', + '" . $LeftToAllocRow['id'] . "', + '" . $OSInvRow['id'] . "')"; + $Result = api_DB_query($SQL,$db,'','',true); + /*Now update the allocated amounts in the debtortrans for both transactions */ + $SQL = "UPDATE debtortrans SET alloc=alloc-" . $AllocateAmount . " + WHERE id = '" . $LeftToAllocRow['id'] . "'"; + $Result = api_DB_query($SQL,$db,'','',true); + $SQL = "UPDATE debtortrans SET alloc=alloc+" . $AllocateAmount . " + WHERE id = '" . $OSInvRow['id'] . "'"; + $Result = api_DB_query($SQL,$db,'','',true); + } /*end if the exchange rates are the same so no diff on exchange */ + + }/*end if there is owt to allocation*/ + if (sizeof($Errors)==0) { + $Result = DB_Txn_Commit($db); + $Errors[0]=0; + } else { + $Result = DB_Txn_Rollback($db); + } + return $Errors; + + } + /* Create a customer credit note in webERP. This function will bypass the * normal procedure in webERP for creating a sales order first, and then * delivering it. All values should be sent as negatives. Modified: trunk/api/api_errorcodes.php =================================================================== --- trunk/api/api_errorcodes.php 2012-02-07 09:12:13 UTC (rev 4884) +++ trunk/api/api_errorcodes.php 2012-02-08 09:40:30 UTC (rev 4885) @@ -167,6 +167,9 @@ Define('TaxRatesFailed',1162); Define('NoReadCustomerBranch',1163); Define('NoReadItem',1164); + Define('MustBeReceiptOrCreditNote',1165); + Define('NoTransactionToAllocate',1166); + /* Array of Descriptions of errors */ $ErrorDescription['1'] = _('No Authorisation'); @@ -334,5 +337,7 @@ $ErrorDescription['1162'] = _('Unable to read tax rates for this item and tax group'); $ErrorDescription['1163'] = _('Unable to read customer and branch details'); $ErrorDescription['1164'] = _('Unable to read credit note item details'); + $ErrorDescription['1165'] = _('Can only allocate receipts or a credit notes'); + $ErrorDescription['1166'] = _('No transaction found to allocate'); ?> \ No newline at end of file Modified: trunk/api/api_xml-rpc.php =================================================================== --- trunk/api/api_xml-rpc.php 2012-02-07 09:12:13 UTC (rev 4884) +++ trunk/api/api_xml-rpc.php 2012-02-08 09:40:30 UTC (rev 4885) @@ -12,7 +12,7 @@ include '../xmlrpc/lib/xmlrpcs.inc'; $Description = _('This function is used to login into the API methods for the specified the database.') - .'<p><b>' . _('NOTE: using this function means that the User Name and Password fields in the following functions are no longer required. When calling those functions, leave the last two parameters off.') . '</b>'; + .'<p>' . _('NOTE: using this function means that the User Name and Password fields in the following functions are no longer required. When calling those functions, leave the last two parameters off.') . '</p>'; $Parameter[0]['name'] = _('Database Name'); $Parameter[0]['description'] = _('The name of the database to use for the transactions to come. '); $Parameter[1]['name'] = _('User name'); Modified: trunk/doc/Manual/ManualAPIFunctions.php =================================================================== --- trunk/doc/Manual/ManualAPIFunctions.php 2012-02-07 09:12:13 UTC (rev 4884) +++ trunk/doc/Manual/ManualAPIFunctions.php 2012-02-08 09:40:30 UTC (rev 4885) @@ -7,7 +7,7 @@ //$PathPrefix= $_SERVER['HTTP_HOST'].$rootpath.'/../../'; //$PathPrefix= '/../'; -include('../../includes/session.inc'); +//include('../../includes/session.inc'); include('../../xmlrpc/lib/xmlrpc.inc'); include('../../api/api_errorcodes.php'); @@ -45,7 +45,11 @@ $answer = php_xmlrpc_decode($response->value()); for ($i=0; $i<sizeof($answer); $i++) { - echo '<table border="1" width="80%"><tr><th colspan="3"><h4>'._('Method name')._(' - ').'<b>'.$answer[$i].'</b></h4></th></tr></table>'; + echo '<table border="1" width="80%"> + <tr> + <th colspan="3"><h4>'._('Method name')._(' - ').'<b>'.$answer[$i].'</b></h4></th> + </tr> + </table>'; $method = php_xmlrpc_encode($answer[$i]); $msg = new xmlrpcmsg("system.methodHelp", array($method)); Modified: trunk/doc/Manual/ManualContents.php =================================================================== --- trunk/doc/Manual/ManualContents.php 2012-02-07 09:12:13 UTC (rev 4884) +++ trunk/doc/Manual/ManualContents.php 2012-02-08 09:40:30 UTC (rev 4885) @@ -21,7 +21,7 @@ -->';*/ $PathPrefix='../../'; -//include($PathPrefix.'includes/session.inc'); +include($PathPrefix.'includes/session.inc'); include('ManualHeader.html'); ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-02-08 09:40:41
|
Revision: 4885 http://web-erp.svn.sourceforge.net/web-erp/?rev=4885&view=rev Author: daintree Date: 2012-02-08 09:40:30 +0000 (Wed, 08 Feb 2012) Log Message: ----------- manual session issues Modified Paths: -------------- trunk/api/api_debtortransactions.php trunk/api/api_errorcodes.php trunk/api/api_xml-rpc.php trunk/doc/Manual/ManualAPIFunctions.php trunk/doc/Manual/ManualContents.php Modified: trunk/api/api_debtortransactions.php =================================================================== --- trunk/api/api_debtortransactions.php 2012-02-07 09:12:13 UTC (rev 4884) +++ trunk/api/api_debtortransactions.php 2012-02-08 09:40:30 UTC (rev 4885) @@ -1281,7 +1281,7 @@ 0, '" . $InvoiceDetails['jobref'] . "', 1)"; - $result = DB_Query($sql, $db); + $result = api_DB_Query($sql, $db); $sql="INSERT INTO gltrans VALUES(null, 10, '" . GetNextTransactionNo(10, $db) . "', @@ -1294,7 +1294,7 @@ 0, '" . $InvoiceDetails['jobref'] . "', 1)"; - $result = DB_Query($sql, $db); + $result = api_DB_Query($sql, $db); $result= DB_Txn_Commit($db); if (DB_error_no($db) != 0) { $Errors[0] = DatabaseUpdateFailed; @@ -1309,6 +1309,91 @@ } } + function AllocateTrans($AllocDetails, $User, $Password) { + + /* AllocDetails is an associative array containing: + * AllocDetails['debtorno'] + * AllocDetails['type'] + * AllocDetails['transno'] + * AllocDetails['customerref'] + */ + $Errors = array(); + $db = db($User, $Password); + if (gettype($db)=='integer') { + $Errors[0]=NoAuthorisation; + return $Errors; + } + $Errors=VerifyDebtorExists($AllocDetails['debtorno'], sizeof($Errors), $Errors, $db); + /*Get the outstanding amount to allocate (all amounts in FX) from the transaction*/ + + if ($AllocDetails['type'] !='11' AND $AllocDetails['type'] !=12){ + $Errors[] = MustBeReceiptOrCreditNote; + } + $SQL = "SELECT id, + rate, + ovamount+ovgst-alloc AS lefttoalloc + FROM debtortrans + WHERE debtorno='" . $AllocDetails['debtorno'] . "' + AND type='" . $AllocDetails['type'] . "' + AND transno='" . $AllocDetails['transno'] . "'"; + $Result = api_DB_query($SQL,$db); + $LeftToAllocRow = DB_fetch_array($Result); + if (DB_num_row($Result)==0){ + $Errors[] = NoTransactionToAllocate; + } + + if ($LeftToAllocRow['lefttoalloc'] >= 0){ + /*Now look for invoices with the same customerref to allocate to */ + $SQL = "SELECT id, + rate, + -ovamount-ovgst-alloc AS outstanding + FROM debtortrans + WHERE debtorno='" . $AllocDetails['debtorno'] . "' + AND type=10 + AND customerref='" . $AllocDetails['customerref'] . "'"; + $Result = api_DB_query($SQL,$db); + $OSInvRow = DB_fetch_array($Result); + if ($OSInvRow['rate']==$LeftToAllocRow['rate'] + AND $OSInvRow['outstanding']>0){ + + if ($OSInvRow['outstanding']>=$LeftToAllocRow['lefttoalloc']){ + /*We can allocate the whole amount of the credit/receipt */ + $AllocateAmount = $LeftToAllocRow['lefttoalloc']; + } else { + /*We can only allocate the rest of the invoice outstanding */ + $AllocateAmount = $OSInvRow['outstanding']; + } + DB_Txn_Begin($db); + /*Now insert the allocation records */ + $SQL = "INSERT INTO custallocs (amt, + datealloc, + transid_allocfrom, + transid_allocto) + VALUE('" . $AllocateAmount . "', + '" . Date('Y-m-d') . "', + '" . $LeftToAllocRow['id'] . "', + '" . $OSInvRow['id'] . "')"; + $Result = api_DB_query($SQL,$db,'','',true); + /*Now update the allocated amounts in the debtortrans for both transactions */ + $SQL = "UPDATE debtortrans SET alloc=alloc-" . $AllocateAmount . " + WHERE id = '" . $LeftToAllocRow['id'] . "'"; + $Result = api_DB_query($SQL,$db,'','',true); + $SQL = "UPDATE debtortrans SET alloc=alloc+" . $AllocateAmount . " + WHERE id = '" . $OSInvRow['id'] . "'"; + $Result = api_DB_query($SQL,$db,'','',true); + } /*end if the exchange rates are the same so no diff on exchange */ + + }/*end if there is owt to allocation*/ + if (sizeof($Errors)==0) { + $Result = DB_Txn_Commit($db); + $Errors[0]=0; + } else { + $Result = DB_Txn_Rollback($db); + } + return $Errors; + + } + /* Create a customer credit note in webERP. This function will bypass the * normal procedure in webERP for creating a sales order first, and then * delivering it. All values should be sent as negatives. Modified: trunk/api/api_errorcodes.php =================================================================== --- trunk/api/api_errorcodes.php 2012-02-07 09:12:13 UTC (rev 4884) +++ trunk/api/api_errorcodes.php 2012-02-08 09:40:30 UTC (rev 4885) @@ -167,6 +167,9 @@ Define('TaxRatesFailed',1162); Define('NoReadCustomerBranch',1163); Define('NoReadItem',1164); + Define('MustBeReceiptOrCreditNote',1165); + Define('NoTransactionToAllocate',1166); + /* Array of Descriptions of errors */ $ErrorDescription['1'] = _('No Authorisation'); @@ -334,5 +337,7 @@ $ErrorDescription['1162'] = _('Unable to read tax rates for this item and tax group'); $ErrorDescription['1163'] = _('Unable to read customer and branch details'); $ErrorDescription['1164'] = _('Unable to read credit note item details'); + $ErrorDescription['1165'] = _('Can only allocate receipts or a credit notes'); + $ErrorDescription['1166'] = _('No transaction found to allocate'); ?> \ No newline at end of file Modified: trunk/api/api_xml-rpc.php =================================================================== --- trunk/api/api_xml-rpc.php 2012-02-07 09:12:13 UTC (rev 4884) +++ trunk/api/api_xml-rpc.php 2012-02-08 09:40:30 UTC (rev 4885) @@ -12,7 +12,7 @@ include '../xmlrpc/lib/xmlrpcs.inc'; $Description = _('This function is used to login into the API methods for the specified the database.') - .'<p><b>' . _('NOTE: using this function means that the User Name and Password fields in the following functions are no longer required. When calling those functions, leave the last two parameters off.') . '</b>'; + .'<p>' . _('NOTE: using this function means that the User Name and Password fields in the following functions are no longer required. When calling those functions, leave the last two parameters off.') . '</p>'; $Parameter[0]['name'] = _('Database Name'); $Parameter[0]['description'] = _('The name of the database to use for the transactions to come. '); $Parameter[1]['name'] = _('User name'); Modified: trunk/doc/Manual/ManualAPIFunctions.php =================================================================== --- trunk/doc/Manual/ManualAPIFunctions.php 2012-02-07 09:12:13 UTC (rev 4884) +++ trunk/doc/Manual/ManualAPIFunctions.php 2012-02-08 09:40:30 UTC (rev 4885) @@ -7,7 +7,7 @@ //$PathPrefix= $_SERVER['HTTP_HOST'].$rootpath.'/../../'; //$PathPrefix= '/../'; -include('../../includes/session.inc'); +//include('../../includes/session.inc'); include('../../xmlrpc/lib/xmlrpc.inc'); include('../../api/api_errorcodes.php'); @@ -45,7 +45,11 @@ $answer = php_xmlrpc_decode($response->value()); for ($i=0; $i<sizeof($answer); $i++) { - echo '<table border="1" width="80%"><tr><th colspan="3"><h4>'._('Method name')._(' - ').'<b>'.$answer[$i].'</b></h4></th></tr></table>'; + echo '<table border="1" width="80%"> + <tr> + <th colspan="3"><h4>'._('Method name')._(' - ').'<b>'.$answer[$i].'</b></h4></th> + </tr> + </table>'; $method = php_xmlrpc_encode($answer[$i]); $msg = new xmlrpcmsg("system.methodHelp", array($method)); Modified: trunk/doc/Manual/ManualContents.php =================================================================== --- trunk/doc/Manual/ManualContents.php 2012-02-07 09:12:13 UTC (rev 4884) +++ trunk/doc/Manual/ManualContents.php 2012-02-08 09:40:30 UTC (rev 4885) @@ -21,7 +21,7 @@ -->';*/ $PathPrefix='../../'; -//include($PathPrefix.'includes/session.inc'); +include($PathPrefix.'includes/session.inc'); include('ManualHeader.html'); ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-02-11 04:32:52
|
Revision: 4888 http://web-erp.svn.sourceforge.net/web-erp/?rev=4888&view=rev Author: daintree Date: 2012-02-11 04:32:41 +0000 (Sat, 11 Feb 2012) Log Message: ----------- before 4.07 release Modified Paths: -------------- trunk/Credit_Invoice.php trunk/Currencies.php trunk/Prices.php trunk/Prices_Customer.php trunk/api/api_debtortransactions.php trunk/doc/Change.log trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.mo trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.mo trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.mo trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.mo trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.mo trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.mo trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.po trunk/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2012-02-09 09:30:20 UTC (rev 4887) +++ trunk/Credit_Invoice.php 2012-02-11 04:32:41 UTC (rev 4888) @@ -591,7 +591,7 @@ taxamount) VALUES ('" . $CreditTransID . "', '" . $TaxAuthID . "', - '" . -$TaxAmount/$_SESSION['CurrencyRate'] . "')"; + '" . (-$TaxAmount/$_SESSION['CurrencyRate']) . "')"; $ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The debtor transaction taxes records could not be inserted because'); $DbgMsg = _('The following SQL to insert the debtor transaction taxes record was used'); @@ -751,10 +751,10 @@ '" . $_SESSION['CreditItems']->Branch . "', '" . $PeriodNo . "', '" . _('Ex Inv') . ': ' . $_SESSION['ProcessingCredit'] . ' ' . _('Assembly') . ': ' . $CreditLine->StockID . "', - '" . $AssParts['quantity'] * $CreditLine->QtyDispatched . "', + '" . ($AssParts['quantity'] * $CreditLine->QtyDispatched) . "', '" . $AssParts['standard'] . "', 0, - '" . $QtyOnHandPrior + ($AssParts['quantity'] * $CreditLine->QtyDispatched) . "' + '" . ($QtyOnHandPrior + ($AssParts['quantity'] * $CreditLine->QtyDispatched)) . "' )"; } else { @@ -779,7 +779,7 @@ '" . $_SESSION['CreditItems']->Branch . "', '" . $PeriodNo . "', '" . _('Ex Inv') . ': ' . $_SESSION['ProcessingCredit'] . ' ' . _('Assembly') . ': ' . $CreditLine->StockID . "', - '" . $AssParts['quantity'] * $CreditLine->QtyDispatched . "', + '" . ($AssParts['quantity'] * $CreditLine->QtyDispatched) . "', '" . $AssParts['standard'] . "', 0)"; } @@ -790,7 +790,7 @@ if ($Component_MBFlag=='M' OR $Component_MBFlag=='B'){ $SQL = "UPDATE locstock - SET locstock.quantity = locstock.quantity + " . $AssParts['quantity'] * $CreditLine->QtyDispatched . " + SET locstock.quantity = locstock.quantity + " . ($AssParts['quantity'] * $CreditLine->QtyDispatched) . " WHERE locstock.stockid = '" . $AssParts['component'] . "' AND loccode = '" . $_SESSION['CreditItems']->Location . "'"; Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php 2012-02-09 09:30:20 UTC (rev 4887) +++ trunk/Currencies.php 2012-02-11 04:32:41 UTC (rev 4888) @@ -74,9 +74,9 @@ prnMsg(_('The number of decimal places to display for amounts in this currency must be positive or zero'),'error'); $Errors[$i] = 'DecimalPlaces'; $i++; - } elseif (filter_number_format($_POST['DecimalPlaces'])>2){ + } elseif (filter_number_format($_POST['DecimalPlaces'])>4){ $InputError = 1; - prnMsg(_('The number of decimal places to display for amounts in this currency is expected to be 2 or less'),'error'); + prnMsg(_('The number of decimal places to display for amounts in this currency is expected to be 4 or less'),'error'); $Errors[$i] = 'DecimalPlaces'; $i++; } Modified: trunk/Prices.php =================================================================== --- trunk/Prices.php 2012-02-09 09:30:20 UTC (rev 4887) +++ trunk/Prices.php 2012-02-11 04:32:41 UTC (rev 4888) @@ -99,11 +99,10 @@ FROM prices WHERE prices.stockid='".$Item."' AND startdate='" .FormatDateForSQL($_POST['StartDate']) . "' - AND enddate ='" . FormatDateForSQL($_POST['EndDate']) . "' + AND enddate ='" . $SQLEndDate . "' AND prices.typeabbrev='" . $_POST['TypeAbbrev'] . "' AND prices.currabrev='" . $_POST['CurrAbrev'] . "' - AND prices.price='" . filter_number_format($_POST['Price']) . "' - "; + AND prices.price='" . filter_number_format($_POST['Price']) . "'"; $result = DB_query($sql, $db); $myrow = DB_fetch_row($result); @@ -158,7 +157,8 @@ '" . filter_number_format($_POST['Price']) . "')"; $ErrMsg = _('The new price could not be added'); $result = DB_query($sql,$db,$ErrMsg); - + echo "Used the following SQL to insert the price:<br />$sql"; + ReSequenceEffectiveDates ($Item, $_POST['TypeAbbrev'], $_POST['CurrAbrev'], $db) ; prnMsg(_('The new price has been inserted'),'success'); } @@ -305,8 +305,9 @@ DB_free_result($result); echo '</select> </td></tr> - <tr><td>' . _('Sales Type Price List') . ':</td> - <td><select name="TypeAbbrev">'; + <tr> + <td>' . _('Sales Type Price List') . ':</td> + <td><select name="TypeAbbrev">'; $SQL = "SELECT typeabbrev, sales_type FROM salestypes"; $result = DB_query($SQL,$db); @@ -372,9 +373,7 @@ AND enddate <>'0000-00-00' ORDER BY startdate, enddate"; $result = DB_query($SQL,$db); - unset($NextStartDate); - unset($EndDate); - + while ($myrow = DB_fetch_array($result)){ if (isset($NextStartDate)){ if (Date1GreaterThanDate2(ConvertSQLDate($myrow['startdate']),$NextStartDate)){ @@ -413,19 +412,21 @@ AND enddate ='0000-00-00' ORDER BY startdate"; $result = DB_query($SQL,$db); - $NewEndDate = FormatDateForSQL(DateAdd(Date($_SESSION['DefaultDateFormat']),'d',-1)); - - for ($i=1;$i< DB_num_rows($result);$i++) { - $myrow = DB_fetch_array($result); + + while ($myrow = DB_fetch_array($result)) { + if (isset($OldStartDate)){ /*Need to make the end date the new start date less 1 day */ - $SQL = "UPDATE prices SET enddate = '" . $NewEndDate . "' + $NewEndDate = FormatDateForSQL(DateAdd(ConvertSQLDate($myrow['startdate']),'d',-1)); + $SQL = "UPDATE prices SET enddate = '" . $NewEndDate . "' WHERE stockid ='" .$Item . "' AND currabrev='" . $CurrAbbrev . "' AND typeabbrev='" . $PriceList . "' - AND startdate ='" . $myrow['startdate'] . "' + AND startdate ='" . $OldStartDate . "' AND enddate = '0000-00-00' AND debtorno =''"; - $UpdateResult = DB_query($SQL,$db); + $UpdateResult = DB_query($SQL,$db); + } + $OldStartDate = $myrow['startdate']; } // end of loop around duplicate no end date prices } // end function ReSequenceEffectiveDates Modified: trunk/Prices_Customer.php =================================================================== --- trunk/Prices_Customer.php 2012-02-09 09:30:20 UTC (rev 4887) +++ trunk/Prices_Customer.php 2012-02-11 04:32:41 UTC (rev 4888) @@ -317,20 +317,24 @@ $_POST['EndDate'] = ''; } -$sql = "SELECT - branchcode, - brname - FROM custbranch - WHERE debtorno='" . $_SESSION['CustomerID'] . "'"; +$sql = "SELECT branchcode, + brname + FROM custbranch + WHERE debtorno='" . $_SESSION['CustomerID'] . "'"; $result = DB_query($sql, $db); echo '<table class="selection"> <tr> <td>' . _('Branch') . ':</td> <td><select name="Branch">'; - +if ($myrow['branchcode']=='') { + echo '<option selected="selected" value="">' . _('All branches') . '</option>'; +} else { + echo '<option value="">' . _('All branches') . '</option>'; +} + while ($myrow=DB_fetch_array($result)) { - if ($myrow['branchcode']==$_POST['branch']) { + f ($myrow['branchcode']==$_GET['Branch']) { echo '<option selected="selected" value="'.$myrow['branchcode'].'">'.$myrow['brname'].'</option>'; } else { echo '<option value="'.$myrow['branchcode'].'">'.$myrow['brname'].'</option>'; @@ -403,7 +407,8 @@ AND typeabbrev='" . $PriceList . "' AND startdate ='" . $StartDate . "' AND enddate = '" . $EndDate . "' - AND debtorno ='" . $CustomerID . "'"; + AND debtorno ='" . $CustomerID . "' + AND branchcode='" . $BranchCode . "'"; $UpdateResult = DB_query($SQL,$db); } } //end of if startdate after NextStartDate - we have a new NextStartDate @@ -414,5 +419,38 @@ $StartDate = $myrow['startdate']; $EndDate = $myrow['enddate']; } + + //Now look for duplicate prices with no end + $SQL = "SELECT price, + startdate, + enddate + FROM prices + WHERE debtorno='' + AND stockid='" . $Item . "' + AND currabrev='" . $CurrAbbrev . "' + AND typeabbrev='" . $PriceList . "' + AND debtorno ='" . $CustomerID . "' + AND branchcode='' + AND enddate ='0000-00-00' + ORDER BY startdate"; + $result = DB_query($SQL,$db); + + while ($myrow = DB_fetch_array($result)) { + if (isset($OldStartDate)){ + /*Need to make the end date the new start date less 1 day */ + $NewEndDate = FormatDateForSQL(DateAdd(ConvertSQLDate($myrow['startdate']),'d',-1)); + $SQL = "UPDATE prices SET enddate = '" . $NewEndDate . "' + WHERE stockid ='" .$Item . "' + AND currabrev='" . $CurrAbbrev . "' + AND typeabbrev='" . $PriceList . "' + AND startdate ='" . $OldStartDate . "' + AND debtorno ='" . $CustomerID . "' + AND branchcode='' + AND enddate = '0000-00-00' + AND debtorno =''"; + $UpdateResult = DB_query($SQL,$db); + } + $OldStartDate = $myrow['startdate'] + } // end of loop around duplicate no end date prices } ?> \ No newline at end of file Modified: trunk/api/api_debtortransactions.php =================================================================== --- trunk/api/api_debtortransactions.php 2012-02-09 09:30:20 UTC (rev 4887) +++ trunk/api/api_debtortransactions.php 2012-02-11 04:32:41 UTC (rev 4888) @@ -82,6 +82,8 @@ } /* Find the period number from the transaction date */ +/* Why use this function over GetPeriod we already have this function included in DateFunctions.inc + * This function doesn't create periods if required so there is the danger of not being able to insert transactions*/ function GetPeriodFromTransactionDate($TranDate, $i, $Errors, $db) { $sql="SELECT confvalue FROM config WHERE confname='DefaultDateFormat'"; $result=DB_query($sql, $db); @@ -1306,6 +1308,9 @@ * AllocDetails['transno'] * AllocDetails['customerref'] */ + + $fp = fopen('/root/Web-Server/DebugInfo.txt','w'); + $Errors = array(); $db = db($User, $Password); if (gettype($db)=='integer') { Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-02-09 09:30:20 UTC (rev 4887) +++ trunk/doc/Change.log 2012-02-11 04:32:41 UTC (rev 4888) @@ -1,5 +1,9 @@ webERP Change Log +Release 4.07 + +11/2/12 Phil: Fix Prices.php for end dates when a new price with no end date is inserted with a start date in the future. +11/2/12 Ahmed.Fawzy: Repairs to Prices_Customer.php option to have prices for a single customer and all branches had been compromised by having the branch selection box with no "All Branches" option. Also selected branch was not showing as it should have when editing a specific branch price 7/2/12 Ricard: Made new system parameter for StandardCostDecimalPlaces - reworked SelectProduct.php and StockCostUpdate.php to use the new parameter. Modified SystemParameters.php to allow the parameter to be a number between 0 and 4 inclusive. 7/2/12 Phil: Reworked ReorderLevelLocation.php 7/2/12 Phil: StockTransfers.php if SESSION['Transfer'][0] not set then now initiate a new transfer Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2012-02-09 09:30:20 UTC (rev 4887) +++ trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2012-02-11 04:32:41 UTC (rev 4888) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: webERP 3.08\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-01-07 14:17+1300\n" +"POT-Creation-Date: 2012-02-11 17:15+1300\n" "PO-Revision-Date: 2011-02-07 15:33+0000\n" "Last-Translator: Tim Schofield <Unknown>\n" "Language-Team: Czech <cs...@li...>\n" @@ -21,7 +21,7 @@ "X-Poedit-Language: Czech\n" "X-Poedit-SourceCharset: utf-8\n" -#: AccountGroups.php:7 index.php:1298 +#: AccountGroups.php:7 index.php:1308 msgid "Account Groups" msgstr "Účetní skupiny" @@ -145,12 +145,12 @@ #: CustomerTypes.php:157 Factors.php:134 FixedAssetCategories.php:133 #: GLAccounts.php:80 GLAccounts.php:96 Locations.php:237 Locations.php:245 #: Locations.php:256 Locations.php:265 Locations.php:274 Locations.php:283 -#: Locations.php:292 Locations.php:301 MRPDemandTypes.php:87 +#: Locations.php:292 Locations.php:301 Locations.php:309 MRPDemandTypes.php:87 #: PaymentMethods.php:138 PaymentTerms.php:146 PaymentTerms.php:153 #: PcExpenses.php:158 SalesCategories.php:125 SalesCategories.php:132 #: SalesPeople.php:150 SalesPeople.php:157 SalesPeople.php:163 #: SalesTypes.php:140 SalesTypes.php:150 Shippers.php:81 Shippers.php:93 -#: StockCategories.php:181 Stocks.php:615 Stocks.php:624 Stocks.php:632 +#: StockCategories.php:180 Stocks.php:615 Stocks.php:624 Stocks.php:632 #: Stocks.php:640 Stocks.php:648 Stocks.php:656 Suppliers.php:612 #: Suppliers.php:621 Suppliers.php:629 SupplierTypes.php:145 #: TaxCategories.php:131 TaxGroups.php:132 TaxGroups.php:140 @@ -226,14 +226,15 @@ #: SalesAnalRepts.php:11 SalesCategories.php:11 SalesGLPostings.php:17 #: SalesGraph.php:34 SalesPeople.php:20 SalesTypes.php:20 SelectAsset.php:45 #: SelectCompletedOrder.php:11 SelectContract.php:78 SelectCreditItems.php:215 -#: SelectCreditItems.php:286 SelectCustomer.php:260 SelectGLAccount.php:17 -#: SelectGLAccount.php:77 SelectOrderItems.php:577 SelectOrderItems.php:1480 -#: SelectOrderItems.php:1604 SelectProduct.php:496 SelectSalesOrder.php:533 +#: SelectCreditItems.php:286 SelectCustomer.php:262 SelectGLAccount.php:17 +#: SelectGLAccount.php:81 SelectOrderItems.php:577 SelectOrderItems.php:1480 +#: SelectOrderItems.php:1605 SelectProduct.php:500 SelectSalesOrder.php:533 #: SelectSupplier.php:9 SelectSupplier.php:198 SelectWorkOrder.php:9 #: SelectWorkOrder.php:151 ShipmentCosting.php:11 Shipments.php:17 -#: Shippers.php:122 Shippers.php:158 Shipt_Select.php:8 +#: Shippers.php:123 Shippers.php:160 Shipt_Select.php:8 #: StockLocMovements.php:13 StockLocStatus.php:27 Suppliers.php:302 -#: SupplierTenders.php:260 SupplierTenders.php:317 SupplierTransInquiry.php:10 +#: SupplierTenderCreate.php:486 SupplierTenderCreate.php:585 +#: SupplierTenders.php:322 SupplierTenders.php:388 SupplierTransInquiry.php:10 #: TaxGroups.php:15 TaxProvinces.php:11 TopItems.php:77 #: WhereUsedInquiry.php:18 WorkCentres.php:111 WorkCentres.php:162 #: WorkOrderCosting.php:13 WorkOrderEntry.php:11 WorkOrderIssue.php:22 @@ -250,26 +251,26 @@ msgid "Section" msgstr "Sekce" -#: AccountGroups.php:229 AccountGroups.php:392 +#: AccountGroups.php:229 AccountGroups.php:390 msgid "Sequence In TB" msgstr "V pořadí TB" -#: AccountGroups.php:230 AccountGroups.php:376 GLProfit_Loss.php:6 +#: AccountGroups.php:230 AccountGroups.php:374 GLProfit_Loss.php:6 #: GLProfit_Loss.php:125 GLProfit_Loss.php:126 GLProfit_Loss.php:177 -#: SelectGLAccount.php:43 SelectGLAccount.php:57 +#: SelectGLAccount.php:47 SelectGLAccount.php:61 msgid "Profit and Loss" msgstr "Zisky a ztráty" -#: AccountGroups.php:231 AccountGroups.php:338 +#: AccountGroups.php:231 AccountGroups.php:336 msgid "Parent Group" msgstr "Rodičovská skupina" -#: AccountGroups.php:247 AccountGroups.php:250 AccountGroups.php:380 -#: AccountGroups.php:382 BOMs.php:122 BOMs.php:746 BOMs.php:748 +#: AccountGroups.php:247 AccountGroups.php:250 AccountGroups.php:378 +#: AccountGroups.php:380 BOMs.php:122 BOMs.php:746 BOMs.php:748 #: CompanyPreferences.php:476 CompanyPreferences.php:478 #: CompanyPreferences.php:491 CompanyPreferences.php:493 #: CompanyPreferences.php:506 CompanyPreferences.php:508 -#: ContractCosting.php:198 CustomerBranches.php:410 Customers.php:593 +#: ContractCosting.php:198 CustomerBranches.php:411 Customers.php:593 #: Customers.php:941 Customers.php:950 Customers.php:953 #: DeliveryDetails.php:1071 DeliveryDetails.php:1114 DeliveryDetails.php:1117 #: GLTransInquiry.php:69 MRPCalendar.php:224 MRP.php:529 MRP.php:533 @@ -278,33 +279,34 @@ #: PaymentMethods.php:275 PcAuthorizeExpenses.php:244 PDFChequeListing.php:63 #: PDFDeliveryDifferences.php:75 PDFDIFOT.php:75 #: PO_AuthorisationLevels.php:134 PO_AuthorisationLevels.php:139 -#: PO_Header.php:783 PO_PDFPurchOrder.php:384 PO_PDFPurchOrder.php:387 +#: PO_Header.php:782 PO_PDFPurchOrder.php:384 PO_PDFPurchOrder.php:387 #: PurchData.php:189 PurchData.php:514 PurchData.php:517 #: RecurringSalesOrders.php:482 RecurringSalesOrders.php:485 #: SalesAnalReptCols.php:284 SalesAnalReptCols.php:419 #: SalesAnalReptCols.php:422 SalesAnalRepts.php:415 SalesAnalRepts.php:418 #: SalesAnalRepts.php:443 SalesAnalRepts.php:446 SalesAnalRepts.php:471 #: SalesAnalRepts.php:474 SalesPeople.php:219 SalesPeople.php:355 -#: SalesPeople.php:357 SelectProduct.php:381 ShipmentCosting.php:667 +#: SalesPeople.php:357 SelectProduct.php:385 ShipmentCosting.php:667 #: Stocks.php:1015 Stocks.php:1017 Stocks.php:1040 Stocks.php:1042 -#: SuppContractChgs.php:90 SystemParameters.php:389 SystemParameters.php:412 -#: SystemParameters.php:428 SystemParameters.php:491 SystemParameters.php:499 -#: SystemParameters.php:539 SystemParameters.php:612 SystemParameters.php:621 -#: SystemParameters.php:629 SystemParameters.php:647 SystemParameters.php:654 -#: SystemParameters.php:781 SystemParameters.php:916 SystemParameters.php:918 -#: SystemParameters.php:928 SystemParameters.php:930 SystemParameters.php:984 -#: SystemParameters.php:996 SystemParameters.php:998 TaxGroups.php:307 -#: TaxGroups.php:310 TaxGroups.php:366 WWW_Users.php:636 WWW_Users.php:638 +#: SuppContractChgs.php:90 SystemParameters.php:396 SystemParameters.php:419 +#: SystemParameters.php:435 SystemParameters.php:498 SystemParameters.php:506 +#: SystemParameters.php:546 SystemParameters.php:626 SystemParameters.php:635 +#: SystemParameters.php:643 SystemParameters.php:661 SystemParameters.php:668 +#: SystemParameters.php:795 SystemParameters.php:930 SystemParameters.php:932 +#: SystemParameters.php:942 SystemParameters.php:944 SystemParameters.php:998 +#: SystemParameters.php:1010 SystemParameters.php:1012 TaxGroups.php:307 +#: TaxGroups.php:310 TaxGroups.php:366 WWW_Users.php:481 WWW_Users.php:483 +#: WWW_Users.php:654 WWW_Users.php:656 msgid "Yes" msgstr "Ano" -#: AccountGroups.php:253 AccountGroups.php:385 AccountGroups.php:387 +#: AccountGroups.php:253 AccountGroups.php:383 AccountGroups.php:385 #: BankAccounts.php:210 BankAccounts.php:371 BankAccounts.php:373 #: BankAccounts.php:377 BankAccounts.php:385 BOMs.php:124 BOMs.php:745 #: BOMs.php:749 CompanyPreferences.php:475 CompanyPreferences.php:479 #: CompanyPreferences.php:490 CompanyPreferences.php:494 #: CompanyPreferences.php:505 CompanyPreferences.php:509 -#: ContractCosting.php:196 CustomerBranches.php:410 Customers.php:592 +#: ContractCosting.php:196 CustomerBranches.php:411 Customers.php:592 #: Customers.php:936 Customers.php:949 Customers.php:952 #: DeliveryDetails.php:1072 DeliveryDetails.php:1115 DeliveryDetails.php:1118 #: GLTransInquiry.php:86 MRPCalendar.php:226 MRP.php:527 MRP.php:531 @@ -313,24 +315,25 @@ #: PaymentMethods.php:276 PcAuthorizeExpenses.php:242 PDFChequeListing.php:62 #: PDFDeliveryDifferences.php:74 PDFDIFOT.php:74 #: PO_AuthorisationLevels.php:136 PO_AuthorisationLevels.php:141 -#: PO_Header.php:782 PO_PDFPurchOrder.php:385 PO_PDFPurchOrder.php:388 +#: PO_Header.php:781 PO_PDFPurchOrder.php:385 PO_PDFPurchOrder.php:388 #: PurchData.php:192 PurchData.php:515 PurchData.php:518 #: RecurringSalesOrders.php:481 RecurringSalesOrders.php:484 #: SalesAnalReptCols.php:282 SalesAnalReptCols.php:420 #: SalesAnalReptCols.php:423 SalesAnalRepts.php:414 SalesAnalRepts.php:417 #: SalesAnalRepts.php:442 SalesAnalRepts.php:445 SalesAnalRepts.php:470 #: SalesAnalRepts.php:473 SalesPeople.php:221 SalesPeople.php:360 -#: SalesPeople.php:362 SelectProduct.php:383 ShipmentCosting.php:668 +#: SalesPeople.php:362 SelectProduct.php:387 ShipmentCosting.php:668 #: Stocks.php:1010 Stocks.php:1012 Stocks.php:1035 Stocks.php:1037 -#: SuppContractChgs.php:92 SystemParameters.php:390 SystemParameters.php:413 -#: SystemParameters.php:429 SystemParameters.php:492 SystemParameters.php:500 -#: SystemParameters.php:540 SystemParameters.php:613 SystemParameters.php:622 -#: SystemParameters.php:630 SystemParameters.php:648 SystemParameters.php:655 -#: SystemParameters.php:782 SystemParameters.php:915 SystemParameters.php:919 -#: SystemParameters.php:927 SystemParameters.php:931 SystemParameters.php:985 -#: SystemParameters.php:995 SystemParameters.php:999 TaxGroups.php:308 -#: TaxGroups.php:311 TaxGroups.php:368 WWW_Users.php:635 WWW_Users.php:639 -#: includes/PDFLowGPPageHeader.inc:44 includes/PDFTaxPageHeader.inc:35 +#: SuppContractChgs.php:92 SystemParameters.php:397 SystemParameters.php:420 +#: SystemParameters.php:436 SystemParameters.php:499 SystemParameters.php:507 +#: SystemParameters.php:547 SystemParameters.php:627 SystemParameters.php:636 +#: SystemParameters.php:644 SystemParameters.php:662 SystemParameters.php:669 +#: SystemParameters.php:796 SystemParameters.php:929 SystemParameters.php:933 +#: SystemParameters.php:941 SystemParameters.php:945 SystemParameters.php:999 +#: SystemParameters.php:1009 SystemParameters.php:1013 TaxGroups.php:308 +#: TaxGroups.php:311 TaxGroups.php:368 WWW_Users.php:480 WWW_Users.php:484 +#: WWW_Users.php:653 WWW_Users.php:657 includes/PDFLowGPPageHeader.inc:44 +#: includes/PDFTaxPageHeader.inc:35 msgid "No" msgstr "Ne" @@ -338,23 +341,24 @@ #: AddCustomerNotes.php:141 AddCustomerTypeNotes.php:128 Areas.php:164 #: BankAccounts.php:223 BOMs.php:149 COGSGLPostings.php:108 #: COGSGLPostings.php:206 CreditStatus.php:174 Currencies.php:272 -#: CustomerBranches.php:414 Customers.php:1027 Customers.php:1061 +#: CustomerBranches.php:415 Customers.php:1027 Customers.php:1061 #: CustomerTypes.php:202 EDIMessageFormat.php:150 Factors.php:329 #: FixedAssetCategories.php:186 FixedAssetLocations.php:107 #: FreightCosts.php:240 GeocodeSetup.php:173 GLAccounts.php:312 GLTags.php:91 -#: Labels.php:411 Locations.php:382 MRPDemands.php:306 MRPDemandTypes.php:120 +#: Labels.php:408 Locations.php:391 MRPDemands.php:306 MRPDemandTypes.php:120 #: PaymentMethods.php:200 PaymentTerms.php:205 PcAssignCashToTab.php:259 -#: PcClaimExpensesFromTab.php:252 PcExpenses.php:223 PcTabs.php:234 +#: PcClaimExpensesFromTab.php:252 PcExpenses.php:223 PcTabs.php:233 #: PcTypeTabs.php:172 PO_AuthorisationLevels.php:151 Prices_Customer.php:278 -#: Prices.php:251 PurchData.php:204 SalesCategories.php:256 +#: Prices.php:250 PurchData.php:204 SalesCategories.php:256 #: SalesGLPostings.php:132 SalesGLPostings.php:245 SalesPeople.php:232 -#: SalesTypes.php:206 SecurityTokens.php:128 SelectCustomer.php:612 -#: SelectCustomer.php:630 SelectCustomer.php:654 SelectCustomer.php:671 -#: SelectCustomer.php:695 SelectCustomer.php:712 Shippers.php:143 -#: StockCategories.php:242 SupplierContacts.php:163 SupplierTypes.php:189 +#: SalesTypes.php:206 SecurityTokens.php:128 SelectCustomer.php:617 +#: SelectCustomer.php:635 SelectCustomer.php:659 SelectCustomer.php:676 +#: SelectCustomer.php:700 SelectCustomer.php:717 Shippers.php:144 +#: StockCategories.php:241 SupplierContacts.php:163 +#: SupplierTenderCreate.php:146 SupplierTypes.php:189 #: SuppTransGLAnalysis.php:120 TaxAuthorities.php:174 TaxCategories.php:182 #: TaxGroups.php:188 TaxProvinces.php:180 UnitsOfMeasure.php:185 -#: WorkCentres.php:141 WWW_Access.php:123 WWW_Users.php:318 +#: WorkCentres.php:141 WWW_Access.php:123 WWW_Users.php:323 #: includes/InputSerialItems.php:88 includes/OutputSerialItems.php:20 #, php-format msgid "Edit" @@ -370,29 +374,30 @@ #: BankAccounts.php:224 BOMs.php:151 COGSGLPostings.php:109 #: COGSGLPostings.php:207 ContractBOM.php:266 ContractOtherReqts.php:119 #: CounterSales.php:822 Credit_Invoice.php:381 CreditStatus.php:175 -#: Currencies.php:275 CustomerReceipt.php:918 Customers.php:1062 +#: Currencies.php:275 CustomerReceipt.php:921 Customers.php:1062 #: CustomerTypes.php:203 DiscountCategories.php:219 DiscountMatrix.php:182 #: EDIMessageFormat.php:151 FixedAssetCategories.php:187 FreightCosts.php:241 -#: GeocodeSetup.php:174 GLAccounts.php:313 GLJournal.php:427 GLTags.php:92 -#: Labels.php:411 Locations.php:383 MRPDemands.php:307 MRPDemandTypes.php:121 -#: PaymentMethods.php:201 Payments.php:1069 PaymentTerms.php:206 +#: GeocodeSetup.php:174 GLAccounts.php:313 GLJournal.php:425 GLTags.php:92 +#: Labels.php:408 Locations.php:392 MRPDemands.php:307 MRPDemandTypes.php:121 +#: PaymentMethods.php:201 Payments.php:1073 PaymentTerms.php:206 #: PcAssignCashToTab.php:263 PcClaimExpensesFromTab.php:253 PcExpenses.php:224 -#: PcExpensesTypeTab.php:185 PcTabs.php:235 PcTypeTabs.php:173 -#: PO_AuthorisationLevels.php:153 PO_Items.php:709 Prices_Customer.php:279 -#: Prices.php:252 PurchData.php:205 SalesAnalReptCols.php:299 +#: PcExpensesTypeTab.php:185 PcTabs.php:234 PcTypeTabs.php:173 +#: PO_AuthorisationLevels.php:153 PO_Items.php:707 Prices_Customer.php:279 +#: Prices.php:251 PurchData.php:205 SalesAnalReptCols.php:299 #: SalesAnalRepts.php:303 SalesCategories.php:257 SalesGLPostings.php:133 #: SalesGLPostings.php:246 SalesPeople.php:233 SalesTypes.php:207 -#: SecurityTokens.php:129 SelectCreditItems.php:765 SelectCustomer.php:613 -#: SelectCustomer.php:631 SelectCustomer.php:655 SelectCustomer.php:672 -#: SelectCustomer.php:696 SelectCustomer.php:713 SelectOrderItems.php:1399 -#: Shipments.php:439 Shippers.php:144 SpecialOrder.php:656 -#: StockCategories.php:243 StockCategories.php:557 StockLocTransfer.php:302 +#: SecurityTokens.php:129 SelectCreditItems.php:765 SelectCustomer.php:618 +#: SelectCustomer.php:636 SelectCustomer.php:660 SelectCustomer.php:677 +#: SelectCustomer.php:701 SelectCustomer.php:718 SelectOrderItems.php:1399 +#: Shipments.php:439 Shippers.php:145 SpecialOrder.php:665 +#: StockCategories.php:242 StockCategories.php:555 StockLocTransfer.php:302 #: SuppContractChgs.php:99 SuppCreditGRNs.php:102 SuppFixedAssetChgs.php:87 -#: SuppInvGRNs.php:147 SupplierContacts.php:164 SupplierTypes.php:191 -#: SuppShiptChgs.php:90 SuppTransGLAnalysis.php:121 TaxAuthorities.php:175 -#: TaxCategories.php:183 TaxGroups.php:189 TaxProvinces.php:181 -#: UnitsOfMeasure.php:186 WorkCentres.php:142 WOSerialNos.php:320 -#: WWW_Access.php:124 WWW_Users.php:319 includes/InputSerialItemsKeyed.php:58 +#: SuppInvGRNs.php:147 SupplierContacts.php:164 SupplierTenderCreate.php:377 +#: SupplierTenderCreate.php:404 SupplierTypes.php:191 SuppShiptChgs.php:90 +#: SuppTransGLAnalysis.php:121 TaxAuthorities.php:175 TaxCategories.php:183 +#: TaxGroups.php:189 TaxProvinces.php:181 UnitsOfMeasure.php:186 +#: WorkCentres.php:142 WOSerialNos.php:320 WWW_Access.php:124 +#: WWW_Users.php:324 includes/InputSerialItemsKeyed.php:58 #: includes/OutputSerialItems.php:99 #, php-format msgid "Delete" @@ -418,42 +423,42 @@ msgid "The account group name does not exist in the database" msgstr "Účet jméno skupiny neexistuje v databázi" -#: AccountGroups.php:311 GLAccounts.php:243 GLAccounts.php:292 +#: AccountGroups.php:310 GLAccounts.php:243 GLAccounts.php:292 #: Z_ImportGLAccountGroups.php:26 msgid "Account Group" msgstr "Účetní skupina" -#: AccountGroups.php:335 +#: AccountGroups.php:333 msgid "Account Group Name" msgstr "Účet Název skupiny" -#: AccountGroups.php:344 AccountGroups.php:346 +#: AccountGroups.php:342 AccountGroups.php:344 msgid "Top Level Group" msgstr "Nejvyšší úroveň skupiny" -#: AccountGroups.php:360 +#: AccountGroups.php:358 msgid "Section In Accounts" msgstr "Sekce v účtech" -#: AccountGroups.php:397 AccountSections.php:264 AddCustomerContacts.php:258 +#: AccountGroups.php:395 AccountSections.php:264 AddCustomerContacts.php:258 #: AddCustomerNotes.php:245 AddCustomerTypeNotes.php:210 Areas.php:227 #: BankAccounts.php:391 BOMs.php:759 COGSGLPostings.php:354 #: CreditStatus.php:257 Currencies.php:401 CustLoginSetup.php:272 #: DiscountMatrix.php:141 EDIMessageFormat.php:248 #: FixedAssetCategories.php:344 FixedAssetLocations.php:156 #: FreightCosts.php:339 GeocodeSetup.php:270 GLAccounts.php:262 -#: Locations.php:597 MRPDemands.php:419 MRPDemandTypes.php:187 +#: Locations.php:606 MRPDemands.php:419 MRPDemandTypes.php:187 #: OffersReceived.php:56 OffersReceived.php:143 PaymentMethods.php:282 -#: PaymentTerms.php:309 PO_AuthorisationLevels.php:248 Prices_Customer.php:356 +#: PaymentTerms.php:309 PO_AuthorisationLevels.php:262 Prices_Customer.php:360 #: SalesAnalReptCols.php:552 SalesAnalRepts.php:514 SalesGLPostings.php:416 -#: SalesPeople.php:369 Shippers.php:199 StockCategories.php:584 +#: SalesPeople.php:369 Shippers.php:202 StockCategories.php:582 #: SupplierContacts.php:281 SuppLoginSetup.php:293 TaxAuthorities.php:327 #: TaxCategories.php:237 TaxProvinces.php:235 UnitsOfMeasure.php:240 -#: WorkCentres.php:279 WWW_Users.php:678 +#: WorkCentres.php:279 WWW_Users.php:696 msgid "Enter Information" msgstr "Vložit informace" -#: AccountSections.php:7 index.php:1303 +#: AccountSections.php:7 index.php:1313 msgid "Account Sections" msgstr "Sekce účtu" @@ -514,8 +519,8 @@ msgid "Could not retrieve the requested section please try again." msgstr "Nepodařilo se získat požadovanou sekci prosím zkuste to znovu." -#: AddCustomerContacts.php:6 AddCustomerContacts.php:61 SelectCustomer.php:605 -#: SelectCustomer.php:637 +#: AddCustomerContacts.php:6 AddCustomerContacts.php:61 SelectCustomer.php:610 +#: SelectCustomer.php:642 msgid "Customer Contacts" msgstr "Zákazník Kontakty" @@ -560,7 +565,7 @@ #: AddCustomerTypeNotes.php:49 Areas.php:73 CustomerTypes.php:69 #: DeliveryDetails.php:776 Factors.php:105 FixedAssetItems.php:246 #: MRPCalendar.php:176 PcAssignCashToTab.php:88 PcClaimExpensesFromTab.php:79 -#: PcExpenses.php:95 PcTabs.php:102 PcTypeTabs.php:60 PO_Items.php:371 +#: PcExpenses.php:95 PcTabs.php:101 PcTypeTabs.php:60 PO_Items.php:369 #: SalesAnalReptCols.php:129 SalesPeople.php:97 SalesTypes.php:66 #: Stocks.php:497 Suppliers.php:513 SupplierTypes.php:67 msgid "has been updated" @@ -576,7 +581,7 @@ #: AddCustomerContacts.php:128 CompanyPreferences.php:223 #: CustomerBranches.php:368 Customers.php:1014 Customers.php:1022 -#: SalesPeople.php:200 SelectCustomer.php:607 StockDispatch.php:187 +#: SalesPeople.php:200 SelectCustomer.php:612 StockDispatch.php:187 #: StockDispatch.php:199 SupplierContacts.php:150 SuppTransGLAnalysis.php:105 #: includes/InputSerialItemsFile.php:84 includes/InputSerialItemsFile.php:124 #: includes/PDFTaxPageHeader.inc:37 @@ -584,7 +589,7 @@ msgstr "Název" #: AddCustomerContacts.php:129 AddCustomerContacts.php:223 Customers.php:1015 -#: Customers.php:1023 SelectCustomer.php:608 WWW_Access.php:107 +#: Customers.php:1023 SelectCustomer.php:613 WWW_Access.php:107 #: WWW_Access.php:169 msgid "Role" msgstr "Roli" @@ -594,16 +599,17 @@ msgstr "Telefonní číslo" #: AddCustomerContacts.php:131 AddCustomerContacts.php:240 -#: CustomerBranches.php:374 CustomerBranches.php:774 CustomerInquiry.php:253 +#: CustomerBranches.php:374 CustomerBranches.php:781 CustomerInquiry.php:255 #: Customers.php:1017 Customers.php:1025 EmailCustTrans.php:15 -#: EmailCustTrans.php:63 Factors.php:245 Factors.php:292 Locations.php:563 +#: EmailCustTrans.php:63 Factors.php:245 Factors.php:292 Locations.php:572 #: OrderDetails.php:109 PDFRemittanceAdvice.php:243 PO_PDFPurchOrder.php:371 #: PO_PDFPurchOrder.php:374 PrintCustTrans.php:714 PrintCustTrans.php:945 #: PrintCustTrans.php:994 PrintCustTransPortrait.php:753 #: PrintCustTransPortrait.php:999 PrintCustTransPortrait.php:1056 -#: SelectCustomer.php:610 SupplierContacts.php:154 SupplierContacts.php:274 -#: UserSettings.php:184 WWW_Users.php:274 includes/PDFPickingListHeader.inc:25 -#: includes/PDFStatementPageHeader.inc:67 includes/PDFTransPageHeader.inc:82 +#: SelectCustomer.php:421 SelectCustomer.php:615 SupplierContacts.php:154 +#: SupplierContacts.php:274 UserSettings.php:184 WWW_Users.php:279 +#: includes/PDFPickingListHeader.inc:25 includes/PDFStatementPageHeader.inc:67 +#: includes/PDFTransPageHeader.inc:82 #: includes/PDFTransPageHeaderPortrait.inc:109 #: includes/PO_PDFOrderPageHeader.inc:29 msgid "Email" @@ -612,8 +618,8 @@ #: AddCustomerContacts.php:132 AddCustomerContacts.php:249 Customers.php:1018 #: Customers.php:1026 PcAssignCashToTab.php:224 PcAssignCashToTab.php:353 #: PcAuthorizeExpenses.php:92 PcClaimExpensesFromTab.php:214 -#: PcClaimExpensesFromTab.php:372 PcReportTab.php:327 SelectCustomer.php:611 -#: SystemParameters.php:328 WOSerialNos.php:291 WOSerialNos.php:297 +#: PcClaimExpensesFromTab.php:372 PcReportTab.php:327 SelectCustomer.php:616 +#: SystemParameters.php:335 WOSerialNos.php:291 WOSerialNos.php:297 msgid "Notes" msgstr "Bere na vědomí" @@ -635,15 +641,16 @@ msgstr "Jméno kontaktní osoby" #: AddCustomerContacts.php:231 Contracts.php:775 PDFRemittanceAdvice.php:239 -#: PO_Header.php:992 PO_Header.php:1073 SelectCreditItems.php:241 -#: SelectCustomer.php:417 SelectOrderItems.php:606 -#: includes/PDFStatementPageHeader.inc:63 includes/PDFTransPageHeader.inc:81 +#: PO_Header.php:991 PO_Header.php:1072 SelectCreditItems.php:241 +#: SelectCustomer.php:419 SelectOrderItems.php:606 +#: SupplierTenderCreate.php:359 includes/PDFStatementPageHeader.inc:63 +#: includes/PDFTransPageHeader.inc:81 #: includes/PDFTransPageHeaderPortrait.inc:105 msgid "Phone" msgstr "Telefon" -#: AddCustomerNotes.php:6 AddCustomerNotes.php:52 SelectCustomer.php:647 -#: SelectCustomer.php:678 +#: AddCustomerNotes.php:6 AddCustomerNotes.php:52 SelectCustomer.php:652 +#: SelectCustomer.php:683 msgid "Customer Notes" msgstr "Zákazník bere na vědomí" @@ -679,15 +686,15 @@ #: AddCustomerTypeNotes.php:108 AddCustomerTypeNotes.php:200 #: BankMatching.php:263 BankReconciliation.php:209 BankReconciliation.php:284 #: ContractCosting.php:173 CustomerAllocations.php:330 -#: CustomerAllocations.php:363 CustomerInquiry.php:196 +#: CustomerAllocations.php:363 CustomerInquiry.php:198 #: CustomerTransInquiry.php:100 GLAccountInquiry.php:152 -#: GLAccountReport.php:338 GLTransInquiry.php:42 MRPCalendar.php:219 +#: GLAccountReport.php:340 GLTransInquiry.php:42 MRPCalendar.php:219 #: PaymentAllocations.php:66 PcAssignCashToTab.php:220 #: PcAuthorizeExpenses.php:88 PDFRemittanceAdvice.php:300 #: PrintCustTrans.php:822 PrintCustTransPortrait.php:867 ReverseGRN.php:386 #: ShipmentCosting.php:538 ShipmentCosting.php:615 Shipments.php:490 #: StockDispatch.php:189 StockDispatch.php:201 StockLocMovements.php:90 -#: StockMovements.php:94 StockSerialItemResearch.php:81 +#: StockMovements.php:94 StockSerialItemResearch.php:80 #: SupplierAllocations.php:455 SupplierAllocations.php:568 #: SupplierAllocations.php:643 SupplierInquiry.php:209 #: SupplierTransInquiry.php:103 includes/PDFQuotationPageHeader.inc:92 @@ -699,10 +706,10 @@ msgstr "Datum" #: AddCustomerNotes.php:122 AddCustomerTypeNotes.php:109 PcReportTab.php:173 -#: Stocks.php:1019 UpgradeDatabase.php:184 UpgradeDatabase.php:187 -#: UpgradeDatabase.php:190 UpgradeDatabase.php:193 UpgradeDatabase.php:196 -#: UpgradeDatabase.php:199 UpgradeDatabase.php:202 UpgradeDatabase.php:205 -#: UpgradeDatabase.php:208 Z_Upgrade_3.10-3.11.php:62 +#: Stocks.php:1019 UpgradeDatabase.php:186 UpgradeDatabase.php:189 +#: UpgradeDatabase.php:192 UpgradeDatabase.php:195 UpgradeDatabase.php:198 +#: UpgradeDatabase.php:201 UpgradeDatabase.php:204 UpgradeDatabase.php:207 +#: UpgradeDatabase.php:210 Z_Upgrade_3.10-3.11.php:62 #: Z_Upgrade_3.10-3.11.php:66 Z_Upgrade_3.10-3.11.php:70 #: Z_Upgrade_3.10-3.11.php:74 Z_Upgrade_3.10-3.11.php:78 #: Z_Upgrade_3.11-4.00.php:62 Z_Upgrade_3.11-4.00.php:66 @@ -737,7 +744,7 @@ msgid "Contact Note" msgstr "Kontakt Poznámka:" -#: AddCustomerTypeNotes.php:5 SelectCustomer.php:688 +#: AddCustomerTypeNotes.php:5 SelectCustomer.php:693 msgid "Customer Type (Group) Notes" msgstr "Typ zákazníka (Group) Poznámky" @@ -745,7 +752,7 @@ msgid "The Contact priority must be an integer." msgstr "Prioritou Kontakt musí být celé číslo." -#: AddCustomerTypeNotes.php:49 SelectCustomer.php:719 +#: AddCustomerTypeNotes.php:49 SelectCustomer.php:724 msgid "Customer Group Notes" msgstr "Zákaznická skupina bere na vědomí" @@ -813,8 +820,9 @@ #: PDFLowGP.php:20 PDFStockCheckComparison.php:33 #: PDFStockCheckComparison.php:59 PDFStockCheckComparison.php:264 #: ReorderLevel.php:60 SelectAsset.php:37 SelectProduct.php:39 -#: StockCheck.php:66 StockCheck.php:140 SupplierTenders.php:326 -#: SuppPriceList.php:130 includes/PDFPaymentRun_PymtFooter.php:152 +#: StockCheck.php:65 StockCheck.php:139 SupplierTenderCreate.php:592 +#: SupplierTenders.php:397 SuppPriceList.php:130 +#: includes/PDFPaymentRun_PymtFooter.php:152 msgid "Problem Report" msgstr "Problém" @@ -853,8 +861,8 @@ #: PO_PDFPurchOrder.php:31 PO_PDFPurchOrder.php:154 #: PrintCustOrder_generic.php:243 PrintCustOrder.php:220 ReorderLevel.php:63 #: ReorderLevel.php:152 SalesAnalysis_UserDefined.php:28 -#: SelectCreditItems.php:30 StockCheck.php:47 StockCheck.php:69 -#: StockCheck.php:100 StockCheck.php:143 StockCheck.php:154 StockCheck.php:195 +#: SelectCreditItems.php:30 StockCheck.php:46 StockCheck.php:68 +#: StockCheck.php:99 StockCheck.php:142 StockCheck.php:153 StockCheck.php:194 #: StockDispatch.php:93 StockDispatch.php:106 SupplierBalsAtPeriodEnd.php:54 #: SupplierBalsAtPeriodEnd.php:65 SuppPaymentRun.php:112 #: SuppPaymentRun.php:122 SuppPaymentRun.php:186 SuppPaymentRun.php:217 @@ -879,9 +887,9 @@ msgstr "Podrobnosti o nesplacených transakcí pro zákazníka" #: AgedDebtors.php:370 AgedSuppliers.php:198 GLAccountCSV.php:168 -#: GLAccountInquiry.php:143 GLAccountReport.php:94 PO_Items.php:433 -#: PO_Items.php:557 PO_Items.php:582 SalesAnalReptCols.php:365 -#: SpecialOrder.php:441 StockLocTransferReceive.php:370 +#: GLAccountInquiry.php:143 GLAccountReport.php:94 PO_Items.php:431 +#: PO_Items.php:555 PO_Items.php:580 SalesAnalReptCols.php:365 +#: SpecialOrder.php:447 StockLocTransferReceive.php:370 #: StockQuantityByDate.php:121 includes/SelectOrderItems_IntoCart.inc:54 msgid "could not be retrieved because" msgstr "se nepodařilo získat, protože" @@ -890,16 +898,16 @@ #: ConfirmDispatch_Invoice.php:160 ConfirmDispatch_Invoice.php:974 #: ConfirmDispatch_Invoice.php:988 Contracts.php:580 CounterSales.php:1360 #: CounterSales.php:1374 Credit_Invoice.php:697 Credit_Invoice.php:718 -#: CustomerReceipt.php:542 CustomerReceipt.php:681 CustomerReceipt.php:709 +#: CustomerReceipt.php:545 CustomerReceipt.php:684 CustomerReceipt.php:712 #: CustomerTransInquiry.php:91 DeliveryDetails.php:393 GLProfit_Loss.php:596 -#: GLTagProfit_Loss.php:511 Payments.php:334 PDFRemittanceAdvice.php:85 +#: GLTagProfit_Loss.php:511 Payments.php:339 PDFRemittanceAdvice.php:85 #: PurchData.php:86 PurchData.php:104 PurchData.php:245 #: RecurringSalesOrders.php:256 ReverseGRN.php:191 ReverseGRN.php:205 #: ReverseGRN.php:374 SelectCreditItems.php:1409 SelectSalesOrder.php:189 -#: SelectSalesOrder.php:353 StockCheck.php:223 StockCostUpdate.php:77 -#: StockCostUpdate.php:87 StockLocStatus.php:153 StockMovements.php:87 +#: SelectSalesOrder.php:353 StockCheck.php:222 StockCostUpdate.php:78 +#: StockCostUpdate.php:88 StockLocStatus.php:152 StockMovements.php:87 #: StockQuantityByDate.php:95 StockReorderLevel.php:40 StockStatus.php:263 -#: StockTransfers.php:192 StockUsageGraph.php:53 StockUsage.php:139 +#: StockTransfers.php:201 StockUsageGraph.php:53 StockUsage.php:139 #: SupplierInquiry.php:78 SupplierInquiry.php:100 SupplierInquiry.php:136 #: SupplierInquiry.php:190 SupplierTransInquiry.php:95 SuppPaymentRun.php:114 #: SuppPaymentRun.php:188 SuppPaymentRun.php:219 WorkOrderCosting.php:418 @@ -980,7 +988,7 @@ #: InventoryValuation.php:268 MRPPlannedPurchaseOrders.php:280 #: MRPPlannedWorkOrders.php:337 MRPReschedules.php:152 MRPShortages.php:302 #: OutstandingGRNs.php:178 PDFCustomerList.php:417 PDFLowGP.php:146 -#: PDFPriceList.php:307 PDFRemittanceAdvice.php:170 +#: PDFPriceList.php:309 PDFRemittanceAdvice.php:170 #: PDFStockCheckComparison.php:358 PrintCustTrans.php:540 #: PrintCustTransPortrait.php:578 ReorderLevel.php:228 StockDispatch.php:327 #: SupplierBalsAtPeriodEnd.php:159 SuppPriceList.php:246 Tax.php:351 @@ -1106,11 +1114,11 @@ msgstr "Kód oblasti" #: Areas.php:132 CustomerTypes.php:164 Factors.php:140 -#: FixedAssetCategories.php:138 GLAccounts.php:197 Locations.php:328 +#: FixedAssetCategories.php:138 GLAccounts.php:197 Locations.php:337 #: MRPDemands.php:248 PcAssignCashToTab.php:135 PcClaimExpensesFromTab.php:126 -#: PcExpenses.php:166 PcExpensesTypeTab.php:101 PcTabs.php:166 +#: PcExpenses.php:166 PcExpensesTypeTab.php:101 PcTabs.php:165 #: PcTypeTabs.php:135 SalesAnalReptCols.php:215 SalesCategories.php:136 -#: SalesTypes.php:156 StockCategories.php:198 Suppliers.php:638 +#: SalesTypes.php:156 StockCategories.php:197 Suppliers.php:638 #: SupplierTypes.php:151 Z_DeleteInvoice.php:146 msgid "has been deleted" msgstr "byl zrušen" @@ -1156,26 +1164,27 @@ msgid "User ID" msgstr "ID uživatele" -#: AuditTrail.php:49 AuditTrail.php:62 ContractBOM.php:298 +#: AuditTrail.php:49 AuditTrail.php:62 ContractBOM.php:299 #: CounterSales.php:2152 CounterSales.php:2155 CustomerTransInquiry.php:31 #: DailySalesInquiry.php:48 DailySalesInquiry.php:50 FixedAssetRegister.php:56 #: FixedAssetRegister.php:65 InventoryQuantities.php:167 #: InventoryQuantities.php:193 InventoryQuantities.php:195 MRP.php:585 #: MRPReport.php:523 MRPReport.php:525 MRPReschedules.php:144 #: PDFPeriodStockTransListing.php:59 PDFPriceList.php:198 -#: PDFPrintLabel.php:250 PO_Items.php:1021 POReport.php:1567 +#: PDFPrintLabel.php:250 PO_Items.php:1019 POReport.php:1567 #: ReorderLevel.php:181 ReorderLevel.php:183 ReorderLevel.php:213 #: ReorderLevel.php:215 SalesGraph.php:97 SalesGraph.php:99 SalesGraph.php:119 #: SalesGraph.php:121 SalesGraph.php:143 SalesGraph.php:145 SalesGraph.php:179 #: SalesInquiry.php:1078 SalesInquiry.php:1141 SelectCreditItems.php:953 -#: SelectOrderItems.php:1610 SelectOrderItems.php:1613 SelectProduct.php:504 -#: SelectProduct.php:506 StockDispatch.php:298 StockDispatch.php:300 -#: StockLocStatus.php:69 StockLocStatus.php:71 StockLocStatus.php:89 -#: StockLocStatus.php:93 StockLocStatus.php:97 StockQuantityByDate.php:24 -#: SupplierTenders.php:338 SupplierTenders.php:340 SupplierTransInquiry.php:30 -#: SystemParameters.php:947 SystemParameters.php:953 SystemParameters.php:959 -#: SystemParameters.php:965 SystemParameters.php:971 TopItems.php:28 -#: TopItems.php:44 WorkOrderEntry.php:585 WorkOrderEntry.php:588 +#: SelectOrderItems.php:1611 SelectOrderItems.php:1614 SelectProduct.php:508 +#: SelectProduct.php:510 StockDispatch.php:298 StockDispatch.php:300 +#: StockLocStatus.php:68 StockLocStatus.php:70 StockLocStatus.php:88 +#: StockLocStatus.php:92 StockLocStatus.php:96 StockQuantityByDate.php:24 +#: SupplierTenderCreate.php:604 SupplierTenderCreate.php:606 +#: SupplierTenders.php:409 SupplierTenders.php:411 SupplierTransInquiry.php:30 +#: SystemParameters.php:961 SystemParameters.php:967 SystemParameters.php:973 +#: SystemParameters.php:979 SystemParameters.php:985 TopItems.php:28 +#: TopItems.php:44 WorkOrderEntry.php:584 WorkOrderEntry.php:587 #: WorkOrderIssue.php:647 WorkOrderIssue.php:650 msgid "All" msgstr "Všechny" @@ -1190,7 +1199,7 @@ msgstr "Konstantní" #: AuditTrail.php:81 MRPReport.php:776 PO_SelectPurchOrder.php:430 -#: SelectContract.php:193 SelectProduct.php:768 +#: SelectContract.php:193 SelectProduct.php:772 msgid "View" msgstr "Zobrazit" @@ -1203,13 +1212,13 @@ msgstr "Uživatel" #: AuditTrail.php:165 BankReconciliation.php:210 BankReconciliation.php:285 -#: CustomerAllocations.php:361 CustomerInquiry.php:194 +#: CustomerAllocations.php:361 CustomerInquiry.php:196 #: CustomerTransInquiry.php:20 CustomerTransInquiry.php:98 -#: CustWhereAlloc.php:18 CustWhereAlloc.php:105 DailyBankTransactions.php:112 -#: GLAccountInquiry.php:150 GLAccountReport.php:336 GLJournal.php:262 +#: CustWhereAlloc.php:17 CustWhereAlloc.php:104 DailyBankTransactions.php:112 +#: GLAccountInquiry.php:150 GLAccountReport.php:338 GLJournal.php:262 #: MRPReschedules.php:191 SalesByTypePeriodInquiry.php:334 -#: SelectCustomer.php:416 ShipmentCosting.php:536 ShipmentCosting.php:613 -#: StockCategories.php:217 StockLocMovements.php:88 StockMovements.php:92 +#: SelectCustomer.php:418 ShipmentCosting.php:536 ShipmentCosting.php:613 +#: StockCategories.php:216 StockLocMovements.php:88 StockMovements.php:92 #: SupplierAllocations.php:453 SupplierInquiry.php:207 #: SupplierTransInquiry.php:19 SupplierTransInquiry.php:100 #: Z_CheckAllocationsFrom.php:32 Z_CheckAllocationsFrom.php:57 @@ -1223,12 +1232,12 @@ msgid "Table" msgstr "Tabulka" -#: AuditTrail.php:167 api/api_xml-rpc.php:314 api/api_xml-rpc.php:727 -#: api/api_xml-rpc.php:1912 +#: AuditTrail.php:167 api/api_xml-rpc.php:314 api/api_xml-rpc.php:780 +#: api/api_xml-rpc.php:2189 msgid "Field Name" msgstr "Název pole" -#: AuditTrail.php:168 SystemParameters.php:327 +#: AuditTrail.php:168 SystemParameters.php:334 #: includes/PDFOstdgGRNsPageHeader.inc:43 msgid "Value" msgstr "Hodnota" @@ -1403,16 +1412,18 @@ msgid "Bank Address" msgstr "Adresa banky" -#: BankAccounts.php:196 CustomerAllocations.php:333 CustomerReceipt.php:788 +#: BankAccounts.php:196 CustomerAllocations.php:333 CustomerReceipt.php:791 #: CustomerTransInquiry.php:108 OffersReceived.php:109 PcReportTab.php:267 -#: PcTabs.php:206 PcTabs.php:349 PDFPrintLabel.php:97 +#: PcTabs.php:205 PcTabs.php:348 PDFPrintLabel.php:97 #: PO_AuthorisationLevels.php:126 PO_AuthorisationLevels.php:209 -#: PO_AuthorisationLevels.php:214 PO_AuthoriseMyOrders.php:115 +#: PO_AuthorisationLevels.php:214 PO_AuthoriseMyOrders.php:114 #: PO_Header.php:558 PO_SelectOSPurchOrder.php:489 PO_SelectPurchOrder.php:432 -#: PricesByCost.php:274 Prices.php:222 Prices.php:295 PurchData.php:169 +#: PricesByCost.php:274 Prices.php:221 Prices.php:294 PurchData.php:169 #: PurchData.php:352 PurchData.php:481 SelectSupplier.php:260 -#: SupplierCredit.php:263 SupplierInvoice.php:234 SupplierTransInquiry.php:109 -#: SuppPriceList.php:284 includes/PDFBankingSummaryPageHeader.inc:42 +#: SupplierCredit.php:263 SupplierInvoice.php:235 SupplierTenderCreate.php:544 +#: SupplierTenders.php:126 SupplierTenders.php:538 +#: SupplierTransInquiry.php:109 SuppPriceList.php:284 +#: includes/PDFBankingSummaryPageHeader.inc:42 #: includes/PDFDebtorBalsPageHeader.inc:33 #: includes/PDFSupplierBalsPageHeader.inc:36 msgid "Currency" @@ -1510,8 +1521,8 @@ "účtu. Zkontrolujte, zda vaše bankovní výpis a klikněte na check-box, když " "zjistíte, odpovídající transakce." -#: BankMatching.php:92 BankReconciliation.php:104 CustomerReceipt.php:754 -#: DailyBankTransactions.php:32 Payments.php:753 PDFChequeListing.php:44 +#: BankMatching.php:92 BankReconciliation.php:104 CustomerReceipt.php:757 +#: DailyBankTransactions.php:32 Payments.php:758 PDFChequeListing.php:44 #: TaxAuthorities.php:151 TaxAuthorities.php:316 msgid "Bank Account" msgstr "Bankovní účet" @@ -1529,7 +1540,7 @@ #: BankMatching.php:120 ConfirmDispatchControlled_Invoice.php:68 #: EmailCustTrans.php:63 FixedAssetRegister.php:78 FTP_RadioBeacon.php:280 -#: GLAccountCSV.php:171 GLAccountReport.php:103 Payments.php:733 +#: GLAccountCSV.php:171 GLAccountReport.php:103 Payments.php:738 #: PcReportTab.php:102 PDFChequeListing.php:114 PDFChequeListing.php:124 #: PDFChequeListing.php:199 PDFDeliveryDifferences.php:187 #: PDFDeliveryDifferences.php:200 PDFDeliveryDifferences.php:296 @@ -1542,7 +1553,7 @@ #: SalesGraph.php:211 SalesGraph.php:240 SalesGraph.php:244 #: StockLocTransferReceive.php:306 StockLocTransferReceive.php:423 #: Stocks.php:266 Stocks.php:271 StockStatus.php:304 StockStatus.php:345 -#: StockTransfers.php:437 includes/PDFAgedDebtorsPageHeader.inc:18 +#: StockTransfers.php:446 includes/PDFAgedDebtorsPageHeader.inc:18 #: includes/PDFAgedSuppliersPageHeader.inc:17 #: includes/PDFChequeListingPageHeader.inc:17 #: includes/PDFDeliveryDifferencesPageHeader.inc:19 @@ -1579,7 +1590,7 @@ msgid "Show unmatched" msgstr "Zobrazit bezkonkurenční" -#: BankMatching.php:128 BankMatching.php:131 PrintCheque.php:46 +#: BankMatching.php:128 BankMatching.php:131 PrintCheque.php:52 #: ReverseGRN.php:104 includes/PDFCustomerListPageHeader.inc:46 #: includes/PDFDeliveryDifferencesPageHeader.inc:24 #: includes/PDFDIFOTPageHeader.inc:24 @@ -1642,18 +1653,18 @@ msgstr "Ref" #: BankMatching.php:264 ConfirmDispatch_Invoice.php:288 Credit_Invoice.php:279 -#: CustomerAllocations.php:364 CustomerReceipt.php:897 -#: CustomerTransInquiry.php:107 CustWhereAlloc.php:109 -#: PaymentAllocations.php:67 Payments.php:1026 Payments.php:1030 -#: Payments.php:1046 PcAssignCashToTab.php:222 PcAssignCashToTab.php:345 +#: CustomerAllocations.php:364 CustomerReceipt.php:900 +#: CustomerTransInquiry.php:107 CustWhereAlloc.php:108 +#: PaymentAllocations.php:67 Payments.php:1030 Payments.php:1034 +#: Payments.php:1050 PcAssignCashToTab.php:222 PcAssignCashToTab.php:345 #: PcAuthorizeExpenses.php:90 PcClaimExpensesFromTab.php:212 #: PcClaimExpensesFromTab.php:365 PcReportTab.php:172 PcReportTab.php:326 -#: PrintCheque.php:77 PrintCheque.php:91 SelectCreditItems.php:682 +#: PrintCheque.php:83 PrintCheque.php:97 SelectCreditItems.php:682 #: SuppContractChgs.php:79 SuppContractChgs.php:163 SuppFixedAssetChgs.php:76 #: SuppFixedAssetChgs.php:149 SupplierAllocations.php:457 #: SupplierCredit.php:352 SupplierCredit.php:385 SupplierCredit.php:421 -#: SupplierCredit.php:460 SupplierInvoice.php:332 SupplierInvoice.php:373 -#: SupplierInvoice.php:413 SupplierInvoice.php:457 +#: SupplierCredit.php:460 SupplierInvoice.php:333 SupplierInvoice.php:374 +#: SupplierInvoice.php:414 SupplierInvoice.php:458 #: SupplierTransInquiry.php:108 SuppShiptChgs.php:81 SuppShiptChgs.php:146 #: SuppTransGLAnalysis.php:106 SuppTransGLAnalysis.php:191 #: Z_CheckAllocs.php:66 includes/PDFBankingSummaryPageHeader.inc:55 @@ -1724,26 +1735,26 @@ msgid "The bank accounts could not be retrieved by the SQL because" msgstr "Bankovní účty se nepodařilo získat na SQL, protože" -#: BankReconciliation.php:101 CustomerReceipt.php:742 -#: DailyBankTransactions.php:28 Payments.php:749 SuppPaymentRun.php:318 +#: BankReconciliation.php:101 CustomerReceipt.php:745 +#: DailyBankTransactions.php:28 Payments.php:754 SuppPaymentRun.php:318 msgid "The SQL used to retrieve the bank accounts was" msgstr "SQL slouží k získání bankovní účty byly" -#: BankReconciliation.php:111 CustomerReceipt.php:762 +#: BankReconciliation.php:111 CustomerReceipt.php:765 msgid "Bank Accounts have not yet been defined" msgstr "Bankovní účty dosud nebyly definovány" -#: BankReconciliation.php:111 CustomerReceipt.php:762 +#: BankReconciliation.php:111 CustomerReceipt.php:765 msgid "You must first" msgstr "Musíte nejprve" -#: BankReconciliation.php:111 CustomerReceipt.php:762 -#: DailyBankTransactions.php:38 Payments.php:761 SuppPaymentRun.php:331 +#: BankReconciliation.php:111 CustomerReceipt.php:765 +#: DailyBankTransactions.php:38 Payments.php:766 SuppPaymentRun.php:331 msgid "define the bank accounts" msgstr "definovat bankovních účtů" -#: BankReconciliation.php:111 CustomerReceipt.php:762 -#: DailyBankTransactions.php:38 Payments.php:761 SuppPaymentRun.php:331 +#: BankReconciliation.php:111 CustomerReceipt.php:765 +#: DailyBankTransactions.php:38 Payments.php:766 SuppPaymentRun.php:331 msgid "and general ledger accounts to be affected" msgstr "a účtů hlavní knihy mohly být postiženy" @@ -1775,7 +1786,7 @@ #: BankReconciliation.php:211 BankReconciliation.php:286 #: CustomerAllocations.php:329 CustomerAllocations.php:362 -#: CustomerInquiry.php:195 CustomerTransInquiry.php:99 CustWhereAlloc.php:106 +#: CustomerInquiry.php:197 CustomerTransInquiry.php:99 CustWhereAlloc.php:105 #: EmailCustTrans.php:15 GLAccountInquiry.php:151 PrintCustTrans.php:484 #: PrintCustTrans.php:699 PrintCustTrans.php:932 PrintCustTrans.php:981 #: PrintCustTransPortrait.php:506 PrintCustTransPortrait.php:735 @@ -1792,9 +1803,9 @@ msgstr "Číslo" #: BankReconciliation.php:212 BankReconciliation.php:287 -#: ContractCosting.php:172 CustomerInquiry.php:198 -#: CustomerTransInquiry.php:103 CustWhereAlloc.php:107 -#: DailyBankTransactions.php:113 GLAccountReport.php:337 +#: ContractCosting.php:172 CustomerInquiry.php:200 +#: CustomerTransInquiry.php:103 CustWhereAlloc.php:106 +#: DailyBankTransactions.php:113 GLAccountReport.php:339 #: PaymentAllocations.php:64 PaymentAllocations.php:65 #: PDFRemittanceAdvice.php:301 ShiptsList.php:37 StockCounts.php:99 #: StockCounts.php:135 StockLocMovements.php:93 StockMovements.php:98 @@ -1851,7 +1862,7 @@ #: BankReconciliation.php:354 CounterSales.php:822 Customers.php:1091 #: SelectOrderItems.php:1410 Stocks.php:1204 WorkOrderCosting.php:540 -#: WorkOrderEntry.php:569 +#: WorkOrderEntry.php:568 msgid "Are You Sure?" msgstr "Opravdu provést?" @@ -1915,7 +1926,7 @@ #: BOMExtendedQty.php:273 BOMExtendedQty.php:338 BOMExtendedQty.php:339 #: BOMExtendedQty.php:340 BOMExtendedQty.php:341 BOMIndented.php:315 #: BOMIndentedReverse.php:295 BOMInquiry.php:200 BOMs.php:532 BOMs.php:709 -#: ContractBOM.php:237 ContractBOM.php:349 ContractCosting.php:81 +#: ContractBOM.php:237 ContractBOM.php:350 ContractCosting.php:81 #: ContractCosting.php:87 ContractCosting.php:152 ContractOtherReqts.php:94 #: Contracts.php:961 Contracts.php:997 CounterSales.php:742 #: CounterSales.php:2031 CounterSales.php:2216 CounterSales.php:2342 @@ -1935,13 +1946,15 @@ #: SalesGraph.php:269 SalesInquiry.php:980 SalesTopItemsInquiry.php:222 #: SelectCreditItems.php:674 SelectCreditItems.php:1035 #: SelectOrderItems.php:1334 SelectOrderItems.php:1492 -#: SelectOrderItems.php:1676 SelectOrderItems.php:1803 ShipmentCosting.php:149 +#: SelectOrderItems.php:1677 SelectOrderItems.php:1804 ShipmentCosting.php:149 #: ShipmentCosting.php:150 Shipments.php:400 Shipments.php:402 -#: Shipments.php:403 Shipments.php:487 Shipments.php:489 SpecialOrder.php:617 +#: Shipments.php:403 Shipments.php:487 Shipments.php:489 SpecialOrder.php:626 #: StockCounts.php:98 StockLocMovements.php:92 StockLocTransfer.php:277 #: StockMovements.php:97 StockStatus.php:308 StockUsageGraph.php:12 #: SuppCreditGRNs.php:267 SuppCreditGRNs.php:268 SupplierCredit.php:317 -#: SupplierTenders.php:265 SupplierTenders.php:493 WOSerialNos.php:256 +#: SupplierTenderCreate.php:387 SupplierTenderCreate.php:765 +#: SupplierTenders.php:124 SupplierTenders.php:327 SupplierTenders.php:533 +#: SupplierTenders.php:536 SupplierTenders.php:691 WOSerialNos.php:256 #: WOSerialNos.php:296 includes/InputSerialItems.php:111 #: includes/InputSerialItems.php:117 includes/OutputSerialItems.php:38 #: includes/OutputSerialItems.php:43 includes/OutputSerialItems.php:49 @@ -1958,8 +1971,8 @@ #: includes/PDFStockCheckPageHeader.inc:44 #: includes/PDFStockNegativesHeader.inc:33 #: includes/PDFStockTransferHeader.inc:39 includes/PDFTransPageHeader.inc:209 -#: includes/PO_PDFOrderPageHeader.inc:78 api/api_xml-rpc.php:2258 -#: api/api_xml-rpc.php:2304 api/api_xml-rpc.php:2500 +#: includes/PO_PDFOrderPageHeader.inc:78 api/api_xml-rpc.php:2535 +#: api/api_xml-rpc.php:2581 api/api_xml-rpc.php:2777 msgid "Quantity" msgstr "Množství" @@ -1998,11 +2011,11 @@ msgstr "Rozšířená Množství kusovníku výpis " #: BOMExtendedQty.php:320 BOMIndented.php:302 BOMIndentedReverse.php:282 -#: GLAccountReport.php:322 InventoryPlanningPrefSupplier.php:58 +#: GLAccountReport.php:324 InventoryPlanningPrefSupplier.php:58 #: InventoryQuantities.php:232 MRPPlannedPurchaseOrders.php:303 #: MRPPlannedWorkOrders.php:360 MRPReport.php:813 MRPReschedules.php:177 -#: MRPShortages.php:331 PDFOrderStatus.php:305 PDFPriceList.php:337 -#: PDFReceipt.php:31 PO_Header.php:820 PO_PDFPurchOrder.php:61 +#: MRPShortages.php:331 PDFOrderStatus.php:305 PDFPriceList.php:339 +#: PDFReceipt.php:31 PO_Header.php:819 PO_PDFPurchOrder.php:61 #: PO_SelectOSPurchOrder.php:519 ReorderLevel.php:251 StockDispatch.php:355 #: SuppPriceList.php:273 Tax.php:243 includes/PDFAgedDebtorsPageHeader.inc:34 #: includes/PDFAgedSuppliersPageHeader.inc:21 @@ -2034,11 +2047,11 @@ msgstr "Vytištěno" #: BOMExtendedQty.php:321 BOMIndented.php:303 BOMIndentedReverse.php:283 -#: FixedAssetRegister.php:351 GLAccountReport.php:322 +#: FixedAssetRegister.php:351 GLAccountReport.php:324 #: InventoryPlanningPrefSupplier.php:58 InventoryQuantities.php:233 #: MRPPlannedPurchaseOrders.php:304 MRPPlannedWorkOrders.php:361 #: MRPReport.php:814 MRPReschedules.php:178 MRPShortages.php:332 -#: PDFPriceList.php:337 PDFReceipt.php:31 PDFRemittanceAdvice.php:210 +#: PDFPriceList.php:339 PDFReceipt.php:31 PDFRemittanceAdvice.php:210 #: PrintCustTrans.php:737 PrintCustTrans.php:946 PrintCustTrans.php:995 #: PrintCustTransPortrait.php:778 PrintCustTransPortrait.php:1000 #: PrintCustTransPortrait.php:1057 ReorderLevel.php:252 StockDispatch.php:356 @@ -2098,9 +2111,9 @@ #: BOMExtendedQty.php:331 BOMInquiry.php:1... [truncated message content] |
From: <dai...@us...> - 2012-02-11 04:32:52
|
Revision: 4888 http://web-erp.svn.sourceforge.net/web-erp/?rev=4888&view=rev Author: daintree Date: 2012-02-11 04:32:41 +0000 (Sat, 11 Feb 2012) Log Message: ----------- before 4.07 release Modified Paths: -------------- trunk/Credit_Invoice.php trunk/Currencies.php trunk/Prices.php trunk/Prices_Customer.php trunk/api/api_debtortransactions.php trunk/doc/Change.log trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.mo trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.mo trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.mo trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.mo trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.mo trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.mo trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.po trunk/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2012-02-09 09:30:20 UTC (rev 4887) +++ trunk/Credit_Invoice.php 2012-02-11 04:32:41 UTC (rev 4888) @@ -591,7 +591,7 @@ taxamount) VALUES ('" . $CreditTransID . "', '" . $TaxAuthID . "', - '" . -$TaxAmount/$_SESSION['CurrencyRate'] . "')"; + '" . (-$TaxAmount/$_SESSION['CurrencyRate']) . "')"; $ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The debtor transaction taxes records could not be inserted because'); $DbgMsg = _('The following SQL to insert the debtor transaction taxes record was used'); @@ -751,10 +751,10 @@ '" . $_SESSION['CreditItems']->Branch . "', '" . $PeriodNo . "', '" . _('Ex Inv') . ': ' . $_SESSION['ProcessingCredit'] . ' ' . _('Assembly') . ': ' . $CreditLine->StockID . "', - '" . $AssParts['quantity'] * $CreditLine->QtyDispatched . "', + '" . ($AssParts['quantity'] * $CreditLine->QtyDispatched) . "', '" . $AssParts['standard'] . "', 0, - '" . $QtyOnHandPrior + ($AssParts['quantity'] * $CreditLine->QtyDispatched) . "' + '" . ($QtyOnHandPrior + ($AssParts['quantity'] * $CreditLine->QtyDispatched)) . "' )"; } else { @@ -779,7 +779,7 @@ '" . $_SESSION['CreditItems']->Branch . "', '" . $PeriodNo . "', '" . _('Ex Inv') . ': ' . $_SESSION['ProcessingCredit'] . ' ' . _('Assembly') . ': ' . $CreditLine->StockID . "', - '" . $AssParts['quantity'] * $CreditLine->QtyDispatched . "', + '" . ($AssParts['quantity'] * $CreditLine->QtyDispatched) . "', '" . $AssParts['standard'] . "', 0)"; } @@ -790,7 +790,7 @@ if ($Component_MBFlag=='M' OR $Component_MBFlag=='B'){ $SQL = "UPDATE locstock - SET locstock.quantity = locstock.quantity + " . $AssParts['quantity'] * $CreditLine->QtyDispatched . " + SET locstock.quantity = locstock.quantity + " . ($AssParts['quantity'] * $CreditLine->QtyDispatched) . " WHERE locstock.stockid = '" . $AssParts['component'] . "' AND loccode = '" . $_SESSION['CreditItems']->Location . "'"; Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php 2012-02-09 09:30:20 UTC (rev 4887) +++ trunk/Currencies.php 2012-02-11 04:32:41 UTC (rev 4888) @@ -74,9 +74,9 @@ prnMsg(_('The number of decimal places to display for amounts in this currency must be positive or zero'),'error'); $Errors[$i] = 'DecimalPlaces'; $i++; - } elseif (filter_number_format($_POST['DecimalPlaces'])>2){ + } elseif (filter_number_format($_POST['DecimalPlaces'])>4){ $InputError = 1; - prnMsg(_('The number of decimal places to display for amounts in this currency is expected to be 2 or less'),'error'); + prnMsg(_('The number of decimal places to display for amounts in this currency is expected to be 4 or less'),'error'); $Errors[$i] = 'DecimalPlaces'; $i++; } Modified: trunk/Prices.php =================================================================== --- trunk/Prices.php 2012-02-09 09:30:20 UTC (rev 4887) +++ trunk/Prices.php 2012-02-11 04:32:41 UTC (rev 4888) @@ -99,11 +99,10 @@ FROM prices WHERE prices.stockid='".$Item."' AND startdate='" .FormatDateForSQL($_POST['StartDate']) . "' - AND enddate ='" . FormatDateForSQL($_POST['EndDate']) . "' + AND enddate ='" . $SQLEndDate . "' AND prices.typeabbrev='" . $_POST['TypeAbbrev'] . "' AND prices.currabrev='" . $_POST['CurrAbrev'] . "' - AND prices.price='" . filter_number_format($_POST['Price']) . "' - "; + AND prices.price='" . filter_number_format($_POST['Price']) . "'"; $result = DB_query($sql, $db); $myrow = DB_fetch_row($result); @@ -158,7 +157,8 @@ '" . filter_number_format($_POST['Price']) . "')"; $ErrMsg = _('The new price could not be added'); $result = DB_query($sql,$db,$ErrMsg); - + echo "Used the following SQL to insert the price:<br />$sql"; + ReSequenceEffectiveDates ($Item, $_POST['TypeAbbrev'], $_POST['CurrAbrev'], $db) ; prnMsg(_('The new price has been inserted'),'success'); } @@ -305,8 +305,9 @@ DB_free_result($result); echo '</select> </td></tr> - <tr><td>' . _('Sales Type Price List') . ':</td> - <td><select name="TypeAbbrev">'; + <tr> + <td>' . _('Sales Type Price List') . ':</td> + <td><select name="TypeAbbrev">'; $SQL = "SELECT typeabbrev, sales_type FROM salestypes"; $result = DB_query($SQL,$db); @@ -372,9 +373,7 @@ AND enddate <>'0000-00-00' ORDER BY startdate, enddate"; $result = DB_query($SQL,$db); - unset($NextStartDate); - unset($EndDate); - + while ($myrow = DB_fetch_array($result)){ if (isset($NextStartDate)){ if (Date1GreaterThanDate2(ConvertSQLDate($myrow['startdate']),$NextStartDate)){ @@ -413,19 +412,21 @@ AND enddate ='0000-00-00' ORDER BY startdate"; $result = DB_query($SQL,$db); - $NewEndDate = FormatDateForSQL(DateAdd(Date($_SESSION['DefaultDateFormat']),'d',-1)); - - for ($i=1;$i< DB_num_rows($result);$i++) { - $myrow = DB_fetch_array($result); + + while ($myrow = DB_fetch_array($result)) { + if (isset($OldStartDate)){ /*Need to make the end date the new start date less 1 day */ - $SQL = "UPDATE prices SET enddate = '" . $NewEndDate . "' + $NewEndDate = FormatDateForSQL(DateAdd(ConvertSQLDate($myrow['startdate']),'d',-1)); + $SQL = "UPDATE prices SET enddate = '" . $NewEndDate . "' WHERE stockid ='" .$Item . "' AND currabrev='" . $CurrAbbrev . "' AND typeabbrev='" . $PriceList . "' - AND startdate ='" . $myrow['startdate'] . "' + AND startdate ='" . $OldStartDate . "' AND enddate = '0000-00-00' AND debtorno =''"; - $UpdateResult = DB_query($SQL,$db); + $UpdateResult = DB_query($SQL,$db); + } + $OldStartDate = $myrow['startdate']; } // end of loop around duplicate no end date prices } // end function ReSequenceEffectiveDates Modified: trunk/Prices_Customer.php =================================================================== --- trunk/Prices_Customer.php 2012-02-09 09:30:20 UTC (rev 4887) +++ trunk/Prices_Customer.php 2012-02-11 04:32:41 UTC (rev 4888) @@ -317,20 +317,24 @@ $_POST['EndDate'] = ''; } -$sql = "SELECT - branchcode, - brname - FROM custbranch - WHERE debtorno='" . $_SESSION['CustomerID'] . "'"; +$sql = "SELECT branchcode, + brname + FROM custbranch + WHERE debtorno='" . $_SESSION['CustomerID'] . "'"; $result = DB_query($sql, $db); echo '<table class="selection"> <tr> <td>' . _('Branch') . ':</td> <td><select name="Branch">'; - +if ($myrow['branchcode']=='') { + echo '<option selected="selected" value="">' . _('All branches') . '</option>'; +} else { + echo '<option value="">' . _('All branches') . '</option>'; +} + while ($myrow=DB_fetch_array($result)) { - if ($myrow['branchcode']==$_POST['branch']) { + f ($myrow['branchcode']==$_GET['Branch']) { echo '<option selected="selected" value="'.$myrow['branchcode'].'">'.$myrow['brname'].'</option>'; } else { echo '<option value="'.$myrow['branchcode'].'">'.$myrow['brname'].'</option>'; @@ -403,7 +407,8 @@ AND typeabbrev='" . $PriceList . "' AND startdate ='" . $StartDate . "' AND enddate = '" . $EndDate . "' - AND debtorno ='" . $CustomerID . "'"; + AND debtorno ='" . $CustomerID . "' + AND branchcode='" . $BranchCode . "'"; $UpdateResult = DB_query($SQL,$db); } } //end of if startdate after NextStartDate - we have a new NextStartDate @@ -414,5 +419,38 @@ $StartDate = $myrow['startdate']; $EndDate = $myrow['enddate']; } + + //Now look for duplicate prices with no end + $SQL = "SELECT price, + startdate, + enddate + FROM prices + WHERE debtorno='' + AND stockid='" . $Item . "' + AND currabrev='" . $CurrAbbrev . "' + AND typeabbrev='" . $PriceList . "' + AND debtorno ='" . $CustomerID . "' + AND branchcode='' + AND enddate ='0000-00-00' + ORDER BY startdate"; + $result = DB_query($SQL,$db); + + while ($myrow = DB_fetch_array($result)) { + if (isset($OldStartDate)){ + /*Need to make the end date the new start date less 1 day */ + $NewEndDate = FormatDateForSQL(DateAdd(ConvertSQLDate($myrow['startdate']),'d',-1)); + $SQL = "UPDATE prices SET enddate = '" . $NewEndDate . "' + WHERE stockid ='" .$Item . "' + AND currabrev='" . $CurrAbbrev . "' + AND typeabbrev='" . $PriceList . "' + AND startdate ='" . $OldStartDate . "' + AND debtorno ='" . $CustomerID . "' + AND branchcode='' + AND enddate = '0000-00-00' + AND debtorno =''"; + $UpdateResult = DB_query($SQL,$db); + } + $OldStartDate = $myrow['startdate'] + } // end of loop around duplicate no end date prices } ?> \ No newline at end of file Modified: trunk/api/api_debtortransactions.php =================================================================== --- trunk/api/api_debtortransactions.php 2012-02-09 09:30:20 UTC (rev 4887) +++ trunk/api/api_debtortransactions.php 2012-02-11 04:32:41 UTC (rev 4888) @@ -82,6 +82,8 @@ } /* Find the period number from the transaction date */ +/* Why use this function over GetPeriod we already have this function included in DateFunctions.inc + * This function doesn't create periods if required so there is the danger of not being able to insert transactions*/ function GetPeriodFromTransactionDate($TranDate, $i, $Errors, $db) { $sql="SELECT confvalue FROM config WHERE confname='DefaultDateFormat'"; $result=DB_query($sql, $db); @@ -1306,6 +1308,9 @@ * AllocDetails['transno'] * AllocDetails['customerref'] */ + + $fp = fopen('/root/Web-Server/DebugInfo.txt','w'); + $Errors = array(); $db = db($User, $Password); if (gettype($db)=='integer') { Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-02-09 09:30:20 UTC (rev 4887) +++ trunk/doc/Change.log 2012-02-11 04:32:41 UTC (rev 4888) @@ -1,5 +1,9 @@ webERP Change Log +Release 4.07 + +11/2/12 Phil: Fix Prices.php for end dates when a new price with no end date is inserted with a start date in the future. +11/2/12 Ahmed.Fawzy: Repairs to Prices_Customer.php option to have prices for a single customer and all branches had been compromised by having the branch selection box with no "All Branches" option. Also selected branch was not showing as it should have when editing a specific branch price 7/2/12 Ricard: Made new system parameter for StandardCostDecimalPlaces - reworked SelectProduct.php and StockCostUpdate.php to use the new parameter. Modified SystemParameters.php to allow the parameter to be a number between 0 and 4 inclusive. 7/2/12 Phil: Reworked ReorderLevelLocation.php 7/2/12 Phil: StockTransfers.php if SESSION['Transfer'][0] not set then now initiate a new transfer Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2012-02-09 09:30:20 UTC (rev 4887) +++ trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2012-02-11 04:32:41 UTC (rev 4888) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: webERP 3.08\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-01-07 14:17+1300\n" +"POT-Creation-Date: 2012-02-11 17:15+1300\n" "PO-Revision-Date: 2011-02-07 15:33+0000\n" "Last-Translator: Tim Schofield <Unknown>\n" "Language-Team: Czech <cs...@li...>\n" @@ -21,7 +21,7 @@ "X-Poedit-Language: Czech\n" "X-Poedit-SourceCharset: utf-8\n" -#: AccountGroups.php:7 index.php:1298 +#: AccountGroups.php:7 index.php:1308 msgid "Account Groups" msgstr "Účetní skupiny" @@ -145,12 +145,12 @@ #: CustomerTypes.php:157 Factors.php:134 FixedAssetCategories.php:133 #: GLAccounts.php:80 GLAccounts.php:96 Locations.php:237 Locations.php:245 #: Locations.php:256 Locations.php:265 Locations.php:274 Locations.php:283 -#: Locations.php:292 Locations.php:301 MRPDemandTypes.php:87 +#: Locations.php:292 Locations.php:301 Locations.php:309 MRPDemandTypes.php:87 #: PaymentMethods.php:138 PaymentTerms.php:146 PaymentTerms.php:153 #: PcExpenses.php:158 SalesCategories.php:125 SalesCategories.php:132 #: SalesPeople.php:150 SalesPeople.php:157 SalesPeople.php:163 #: SalesTypes.php:140 SalesTypes.php:150 Shippers.php:81 Shippers.php:93 -#: StockCategories.php:181 Stocks.php:615 Stocks.php:624 Stocks.php:632 +#: StockCategories.php:180 Stocks.php:615 Stocks.php:624 Stocks.php:632 #: Stocks.php:640 Stocks.php:648 Stocks.php:656 Suppliers.php:612 #: Suppliers.php:621 Suppliers.php:629 SupplierTypes.php:145 #: TaxCategories.php:131 TaxGroups.php:132 TaxGroups.php:140 @@ -226,14 +226,15 @@ #: SalesAnalRepts.php:11 SalesCategories.php:11 SalesGLPostings.php:17 #: SalesGraph.php:34 SalesPeople.php:20 SalesTypes.php:20 SelectAsset.php:45 #: SelectCompletedOrder.php:11 SelectContract.php:78 SelectCreditItems.php:215 -#: SelectCreditItems.php:286 SelectCustomer.php:260 SelectGLAccount.php:17 -#: SelectGLAccount.php:77 SelectOrderItems.php:577 SelectOrderItems.php:1480 -#: SelectOrderItems.php:1604 SelectProduct.php:496 SelectSalesOrder.php:533 +#: SelectCreditItems.php:286 SelectCustomer.php:262 SelectGLAccount.php:17 +#: SelectGLAccount.php:81 SelectOrderItems.php:577 SelectOrderItems.php:1480 +#: SelectOrderItems.php:1605 SelectProduct.php:500 SelectSalesOrder.php:533 #: SelectSupplier.php:9 SelectSupplier.php:198 SelectWorkOrder.php:9 #: SelectWorkOrder.php:151 ShipmentCosting.php:11 Shipments.php:17 -#: Shippers.php:122 Shippers.php:158 Shipt_Select.php:8 +#: Shippers.php:123 Shippers.php:160 Shipt_Select.php:8 #: StockLocMovements.php:13 StockLocStatus.php:27 Suppliers.php:302 -#: SupplierTenders.php:260 SupplierTenders.php:317 SupplierTransInquiry.php:10 +#: SupplierTenderCreate.php:486 SupplierTenderCreate.php:585 +#: SupplierTenders.php:322 SupplierTenders.php:388 SupplierTransInquiry.php:10 #: TaxGroups.php:15 TaxProvinces.php:11 TopItems.php:77 #: WhereUsedInquiry.php:18 WorkCentres.php:111 WorkCentres.php:162 #: WorkOrderCosting.php:13 WorkOrderEntry.php:11 WorkOrderIssue.php:22 @@ -250,26 +251,26 @@ msgid "Section" msgstr "Sekce" -#: AccountGroups.php:229 AccountGroups.php:392 +#: AccountGroups.php:229 AccountGroups.php:390 msgid "Sequence In TB" msgstr "V pořadí TB" -#: AccountGroups.php:230 AccountGroups.php:376 GLProfit_Loss.php:6 +#: AccountGroups.php:230 AccountGroups.php:374 GLProfit_Loss.php:6 #: GLProfit_Loss.php:125 GLProfit_Loss.php:126 GLProfit_Loss.php:177 -#: SelectGLAccount.php:43 SelectGLAccount.php:57 +#: SelectGLAccount.php:47 SelectGLAccount.php:61 msgid "Profit and Loss" msgstr "Zisky a ztráty" -#: AccountGroups.php:231 AccountGroups.php:338 +#: AccountGroups.php:231 AccountGroups.php:336 msgid "Parent Group" msgstr "Rodičovská skupina" -#: AccountGroups.php:247 AccountGroups.php:250 AccountGroups.php:380 -#: AccountGroups.php:382 BOMs.php:122 BOMs.php:746 BOMs.php:748 +#: AccountGroups.php:247 AccountGroups.php:250 AccountGroups.php:378 +#: AccountGroups.php:380 BOMs.php:122 BOMs.php:746 BOMs.php:748 #: CompanyPreferences.php:476 CompanyPreferences.php:478 #: CompanyPreferences.php:491 CompanyPreferences.php:493 #: CompanyPreferences.php:506 CompanyPreferences.php:508 -#: ContractCosting.php:198 CustomerBranches.php:410 Customers.php:593 +#: ContractCosting.php:198 CustomerBranches.php:411 Customers.php:593 #: Customers.php:941 Customers.php:950 Customers.php:953 #: DeliveryDetails.php:1071 DeliveryDetails.php:1114 DeliveryDetails.php:1117 #: GLTransInquiry.php:69 MRPCalendar.php:224 MRP.php:529 MRP.php:533 @@ -278,33 +279,34 @@ #: PaymentMethods.php:275 PcAuthorizeExpenses.php:244 PDFChequeListing.php:63 #: PDFDeliveryDifferences.php:75 PDFDIFOT.php:75 #: PO_AuthorisationLevels.php:134 PO_AuthorisationLevels.php:139 -#: PO_Header.php:783 PO_PDFPurchOrder.php:384 PO_PDFPurchOrder.php:387 +#: PO_Header.php:782 PO_PDFPurchOrder.php:384 PO_PDFPurchOrder.php:387 #: PurchData.php:189 PurchData.php:514 PurchData.php:517 #: RecurringSalesOrders.php:482 RecurringSalesOrders.php:485 #: SalesAnalReptCols.php:284 SalesAnalReptCols.php:419 #: SalesAnalReptCols.php:422 SalesAnalRepts.php:415 SalesAnalRepts.php:418 #: SalesAnalRepts.php:443 SalesAnalRepts.php:446 SalesAnalRepts.php:471 #: SalesAnalRepts.php:474 SalesPeople.php:219 SalesPeople.php:355 -#: SalesPeople.php:357 SelectProduct.php:381 ShipmentCosting.php:667 +#: SalesPeople.php:357 SelectProduct.php:385 ShipmentCosting.php:667 #: Stocks.php:1015 Stocks.php:1017 Stocks.php:1040 Stocks.php:1042 -#: SuppContractChgs.php:90 SystemParameters.php:389 SystemParameters.php:412 -#: SystemParameters.php:428 SystemParameters.php:491 SystemParameters.php:499 -#: SystemParameters.php:539 SystemParameters.php:612 SystemParameters.php:621 -#: SystemParameters.php:629 SystemParameters.php:647 SystemParameters.php:654 -#: SystemParameters.php:781 SystemParameters.php:916 SystemParameters.php:918 -#: SystemParameters.php:928 SystemParameters.php:930 SystemParameters.php:984 -#: SystemParameters.php:996 SystemParameters.php:998 TaxGroups.php:307 -#: TaxGroups.php:310 TaxGroups.php:366 WWW_Users.php:636 WWW_Users.php:638 +#: SuppContractChgs.php:90 SystemParameters.php:396 SystemParameters.php:419 +#: SystemParameters.php:435 SystemParameters.php:498 SystemParameters.php:506 +#: SystemParameters.php:546 SystemParameters.php:626 SystemParameters.php:635 +#: SystemParameters.php:643 SystemParameters.php:661 SystemParameters.php:668 +#: SystemParameters.php:795 SystemParameters.php:930 SystemParameters.php:932 +#: SystemParameters.php:942 SystemParameters.php:944 SystemParameters.php:998 +#: SystemParameters.php:1010 SystemParameters.php:1012 TaxGroups.php:307 +#: TaxGroups.php:310 TaxGroups.php:366 WWW_Users.php:481 WWW_Users.php:483 +#: WWW_Users.php:654 WWW_Users.php:656 msgid "Yes" msgstr "Ano" -#: AccountGroups.php:253 AccountGroups.php:385 AccountGroups.php:387 +#: AccountGroups.php:253 AccountGroups.php:383 AccountGroups.php:385 #: BankAccounts.php:210 BankAccounts.php:371 BankAccounts.php:373 #: BankAccounts.php:377 BankAccounts.php:385 BOMs.php:124 BOMs.php:745 #: BOMs.php:749 CompanyPreferences.php:475 CompanyPreferences.php:479 #: CompanyPreferences.php:490 CompanyPreferences.php:494 #: CompanyPreferences.php:505 CompanyPreferences.php:509 -#: ContractCosting.php:196 CustomerBranches.php:410 Customers.php:592 +#: ContractCosting.php:196 CustomerBranches.php:411 Customers.php:592 #: Customers.php:936 Customers.php:949 Customers.php:952 #: DeliveryDetails.php:1072 DeliveryDetails.php:1115 DeliveryDetails.php:1118 #: GLTransInquiry.php:86 MRPCalendar.php:226 MRP.php:527 MRP.php:531 @@ -313,24 +315,25 @@ #: PaymentMethods.php:276 PcAuthorizeExpenses.php:242 PDFChequeListing.php:62 #: PDFDeliveryDifferences.php:74 PDFDIFOT.php:74 #: PO_AuthorisationLevels.php:136 PO_AuthorisationLevels.php:141 -#: PO_Header.php:782 PO_PDFPurchOrder.php:385 PO_PDFPurchOrder.php:388 +#: PO_Header.php:781 PO_PDFPurchOrder.php:385 PO_PDFPurchOrder.php:388 #: PurchData.php:192 PurchData.php:515 PurchData.php:518 #: RecurringSalesOrders.php:481 RecurringSalesOrders.php:484 #: SalesAnalReptCols.php:282 SalesAnalReptCols.php:420 #: SalesAnalReptCols.php:423 SalesAnalRepts.php:414 SalesAnalRepts.php:417 #: SalesAnalRepts.php:442 SalesAnalRepts.php:445 SalesAnalRepts.php:470 #: SalesAnalRepts.php:473 SalesPeople.php:221 SalesPeople.php:360 -#: SalesPeople.php:362 SelectProduct.php:383 ShipmentCosting.php:668 +#: SalesPeople.php:362 SelectProduct.php:387 ShipmentCosting.php:668 #: Stocks.php:1010 Stocks.php:1012 Stocks.php:1035 Stocks.php:1037 -#: SuppContractChgs.php:92 SystemParameters.php:390 SystemParameters.php:413 -#: SystemParameters.php:429 SystemParameters.php:492 SystemParameters.php:500 -#: SystemParameters.php:540 SystemParameters.php:613 SystemParameters.php:622 -#: SystemParameters.php:630 SystemParameters.php:648 SystemParameters.php:655 -#: SystemParameters.php:782 SystemParameters.php:915 SystemParameters.php:919 -#: SystemParameters.php:927 SystemParameters.php:931 SystemParameters.php:985 -#: SystemParameters.php:995 SystemParameters.php:999 TaxGroups.php:308 -#: TaxGroups.php:311 TaxGroups.php:368 WWW_Users.php:635 WWW_Users.php:639 -#: includes/PDFLowGPPageHeader.inc:44 includes/PDFTaxPageHeader.inc:35 +#: SuppContractChgs.php:92 SystemParameters.php:397 SystemParameters.php:420 +#: SystemParameters.php:436 SystemParameters.php:499 SystemParameters.php:507 +#: SystemParameters.php:547 SystemParameters.php:627 SystemParameters.php:636 +#: SystemParameters.php:644 SystemParameters.php:662 SystemParameters.php:669 +#: SystemParameters.php:796 SystemParameters.php:929 SystemParameters.php:933 +#: SystemParameters.php:941 SystemParameters.php:945 SystemParameters.php:999 +#: SystemParameters.php:1009 SystemParameters.php:1013 TaxGroups.php:308 +#: TaxGroups.php:311 TaxGroups.php:368 WWW_Users.php:480 WWW_Users.php:484 +#: WWW_Users.php:653 WWW_Users.php:657 includes/PDFLowGPPageHeader.inc:44 +#: includes/PDFTaxPageHeader.inc:35 msgid "No" msgstr "Ne" @@ -338,23 +341,24 @@ #: AddCustomerNotes.php:141 AddCustomerTypeNotes.php:128 Areas.php:164 #: BankAccounts.php:223 BOMs.php:149 COGSGLPostings.php:108 #: COGSGLPostings.php:206 CreditStatus.php:174 Currencies.php:272 -#: CustomerBranches.php:414 Customers.php:1027 Customers.php:1061 +#: CustomerBranches.php:415 Customers.php:1027 Customers.php:1061 #: CustomerTypes.php:202 EDIMessageFormat.php:150 Factors.php:329 #: FixedAssetCategories.php:186 FixedAssetLocations.php:107 #: FreightCosts.php:240 GeocodeSetup.php:173 GLAccounts.php:312 GLTags.php:91 -#: Labels.php:411 Locations.php:382 MRPDemands.php:306 MRPDemandTypes.php:120 +#: Labels.php:408 Locations.php:391 MRPDemands.php:306 MRPDemandTypes.php:120 #: PaymentMethods.php:200 PaymentTerms.php:205 PcAssignCashToTab.php:259 -#: PcClaimExpensesFromTab.php:252 PcExpenses.php:223 PcTabs.php:234 +#: PcClaimExpensesFromTab.php:252 PcExpenses.php:223 PcTabs.php:233 #: PcTypeTabs.php:172 PO_AuthorisationLevels.php:151 Prices_Customer.php:278 -#: Prices.php:251 PurchData.php:204 SalesCategories.php:256 +#: Prices.php:250 PurchData.php:204 SalesCategories.php:256 #: SalesGLPostings.php:132 SalesGLPostings.php:245 SalesPeople.php:232 -#: SalesTypes.php:206 SecurityTokens.php:128 SelectCustomer.php:612 -#: SelectCustomer.php:630 SelectCustomer.php:654 SelectCustomer.php:671 -#: SelectCustomer.php:695 SelectCustomer.php:712 Shippers.php:143 -#: StockCategories.php:242 SupplierContacts.php:163 SupplierTypes.php:189 +#: SalesTypes.php:206 SecurityTokens.php:128 SelectCustomer.php:617 +#: SelectCustomer.php:635 SelectCustomer.php:659 SelectCustomer.php:676 +#: SelectCustomer.php:700 SelectCustomer.php:717 Shippers.php:144 +#: StockCategories.php:241 SupplierContacts.php:163 +#: SupplierTenderCreate.php:146 SupplierTypes.php:189 #: SuppTransGLAnalysis.php:120 TaxAuthorities.php:174 TaxCategories.php:182 #: TaxGroups.php:188 TaxProvinces.php:180 UnitsOfMeasure.php:185 -#: WorkCentres.php:141 WWW_Access.php:123 WWW_Users.php:318 +#: WorkCentres.php:141 WWW_Access.php:123 WWW_Users.php:323 #: includes/InputSerialItems.php:88 includes/OutputSerialItems.php:20 #, php-format msgid "Edit" @@ -370,29 +374,30 @@ #: BankAccounts.php:224 BOMs.php:151 COGSGLPostings.php:109 #: COGSGLPostings.php:207 ContractBOM.php:266 ContractOtherReqts.php:119 #: CounterSales.php:822 Credit_Invoice.php:381 CreditStatus.php:175 -#: Currencies.php:275 CustomerReceipt.php:918 Customers.php:1062 +#: Currencies.php:275 CustomerReceipt.php:921 Customers.php:1062 #: CustomerTypes.php:203 DiscountCategories.php:219 DiscountMatrix.php:182 #: EDIMessageFormat.php:151 FixedAssetCategories.php:187 FreightCosts.php:241 -#: GeocodeSetup.php:174 GLAccounts.php:313 GLJournal.php:427 GLTags.php:92 -#: Labels.php:411 Locations.php:383 MRPDemands.php:307 MRPDemandTypes.php:121 -#: PaymentMethods.php:201 Payments.php:1069 PaymentTerms.php:206 +#: GeocodeSetup.php:174 GLAccounts.php:313 GLJournal.php:425 GLTags.php:92 +#: Labels.php:408 Locations.php:392 MRPDemands.php:307 MRPDemandTypes.php:121 +#: PaymentMethods.php:201 Payments.php:1073 PaymentTerms.php:206 #: PcAssignCashToTab.php:263 PcClaimExpensesFromTab.php:253 PcExpenses.php:224 -#: PcExpensesTypeTab.php:185 PcTabs.php:235 PcTypeTabs.php:173 -#: PO_AuthorisationLevels.php:153 PO_Items.php:709 Prices_Customer.php:279 -#: Prices.php:252 PurchData.php:205 SalesAnalReptCols.php:299 +#: PcExpensesTypeTab.php:185 PcTabs.php:234 PcTypeTabs.php:173 +#: PO_AuthorisationLevels.php:153 PO_Items.php:707 Prices_Customer.php:279 +#: Prices.php:251 PurchData.php:205 SalesAnalReptCols.php:299 #: SalesAnalRepts.php:303 SalesCategories.php:257 SalesGLPostings.php:133 #: SalesGLPostings.php:246 SalesPeople.php:233 SalesTypes.php:207 -#: SecurityTokens.php:129 SelectCreditItems.php:765 SelectCustomer.php:613 -#: SelectCustomer.php:631 SelectCustomer.php:655 SelectCustomer.php:672 -#: SelectCustomer.php:696 SelectCustomer.php:713 SelectOrderItems.php:1399 -#: Shipments.php:439 Shippers.php:144 SpecialOrder.php:656 -#: StockCategories.php:243 StockCategories.php:557 StockLocTransfer.php:302 +#: SecurityTokens.php:129 SelectCreditItems.php:765 SelectCustomer.php:618 +#: SelectCustomer.php:636 SelectCustomer.php:660 SelectCustomer.php:677 +#: SelectCustomer.php:701 SelectCustomer.php:718 SelectOrderItems.php:1399 +#: Shipments.php:439 Shippers.php:145 SpecialOrder.php:665 +#: StockCategories.php:242 StockCategories.php:555 StockLocTransfer.php:302 #: SuppContractChgs.php:99 SuppCreditGRNs.php:102 SuppFixedAssetChgs.php:87 -#: SuppInvGRNs.php:147 SupplierContacts.php:164 SupplierTypes.php:191 -#: SuppShiptChgs.php:90 SuppTransGLAnalysis.php:121 TaxAuthorities.php:175 -#: TaxCategories.php:183 TaxGroups.php:189 TaxProvinces.php:181 -#: UnitsOfMeasure.php:186 WorkCentres.php:142 WOSerialNos.php:320 -#: WWW_Access.php:124 WWW_Users.php:319 includes/InputSerialItemsKeyed.php:58 +#: SuppInvGRNs.php:147 SupplierContacts.php:164 SupplierTenderCreate.php:377 +#: SupplierTenderCreate.php:404 SupplierTypes.php:191 SuppShiptChgs.php:90 +#: SuppTransGLAnalysis.php:121 TaxAuthorities.php:175 TaxCategories.php:183 +#: TaxGroups.php:189 TaxProvinces.php:181 UnitsOfMeasure.php:186 +#: WorkCentres.php:142 WOSerialNos.php:320 WWW_Access.php:124 +#: WWW_Users.php:324 includes/InputSerialItemsKeyed.php:58 #: includes/OutputSerialItems.php:99 #, php-format msgid "Delete" @@ -418,42 +423,42 @@ msgid "The account group name does not exist in the database" msgstr "Účet jméno skupiny neexistuje v databázi" -#: AccountGroups.php:311 GLAccounts.php:243 GLAccounts.php:292 +#: AccountGroups.php:310 GLAccounts.php:243 GLAccounts.php:292 #: Z_ImportGLAccountGroups.php:26 msgid "Account Group" msgstr "Účetní skupina" -#: AccountGroups.php:335 +#: AccountGroups.php:333 msgid "Account Group Name" msgstr "Účet Název skupiny" -#: AccountGroups.php:344 AccountGroups.php:346 +#: AccountGroups.php:342 AccountGroups.php:344 msgid "Top Level Group" msgstr "Nejvyšší úroveň skupiny" -#: AccountGroups.php:360 +#: AccountGroups.php:358 msgid "Section In Accounts" msgstr "Sekce v účtech" -#: AccountGroups.php:397 AccountSections.php:264 AddCustomerContacts.php:258 +#: AccountGroups.php:395 AccountSections.php:264 AddCustomerContacts.php:258 #: AddCustomerNotes.php:245 AddCustomerTypeNotes.php:210 Areas.php:227 #: BankAccounts.php:391 BOMs.php:759 COGSGLPostings.php:354 #: CreditStatus.php:257 Currencies.php:401 CustLoginSetup.php:272 #: DiscountMatrix.php:141 EDIMessageFormat.php:248 #: FixedAssetCategories.php:344 FixedAssetLocations.php:156 #: FreightCosts.php:339 GeocodeSetup.php:270 GLAccounts.php:262 -#: Locations.php:597 MRPDemands.php:419 MRPDemandTypes.php:187 +#: Locations.php:606 MRPDemands.php:419 MRPDemandTypes.php:187 #: OffersReceived.php:56 OffersReceived.php:143 PaymentMethods.php:282 -#: PaymentTerms.php:309 PO_AuthorisationLevels.php:248 Prices_Customer.php:356 +#: PaymentTerms.php:309 PO_AuthorisationLevels.php:262 Prices_Customer.php:360 #: SalesAnalReptCols.php:552 SalesAnalRepts.php:514 SalesGLPostings.php:416 -#: SalesPeople.php:369 Shippers.php:199 StockCategories.php:584 +#: SalesPeople.php:369 Shippers.php:202 StockCategories.php:582 #: SupplierContacts.php:281 SuppLoginSetup.php:293 TaxAuthorities.php:327 #: TaxCategories.php:237 TaxProvinces.php:235 UnitsOfMeasure.php:240 -#: WorkCentres.php:279 WWW_Users.php:678 +#: WorkCentres.php:279 WWW_Users.php:696 msgid "Enter Information" msgstr "Vložit informace" -#: AccountSections.php:7 index.php:1303 +#: AccountSections.php:7 index.php:1313 msgid "Account Sections" msgstr "Sekce účtu" @@ -514,8 +519,8 @@ msgid "Could not retrieve the requested section please try again." msgstr "Nepodařilo se získat požadovanou sekci prosím zkuste to znovu." -#: AddCustomerContacts.php:6 AddCustomerContacts.php:61 SelectCustomer.php:605 -#: SelectCustomer.php:637 +#: AddCustomerContacts.php:6 AddCustomerContacts.php:61 SelectCustomer.php:610 +#: SelectCustomer.php:642 msgid "Customer Contacts" msgstr "Zákazník Kontakty" @@ -560,7 +565,7 @@ #: AddCustomerTypeNotes.php:49 Areas.php:73 CustomerTypes.php:69 #: DeliveryDetails.php:776 Factors.php:105 FixedAssetItems.php:246 #: MRPCalendar.php:176 PcAssignCashToTab.php:88 PcClaimExpensesFromTab.php:79 -#: PcExpenses.php:95 PcTabs.php:102 PcTypeTabs.php:60 PO_Items.php:371 +#: PcExpenses.php:95 PcTabs.php:101 PcTypeTabs.php:60 PO_Items.php:369 #: SalesAnalReptCols.php:129 SalesPeople.php:97 SalesTypes.php:66 #: Stocks.php:497 Suppliers.php:513 SupplierTypes.php:67 msgid "has been updated" @@ -576,7 +581,7 @@ #: AddCustomerContacts.php:128 CompanyPreferences.php:223 #: CustomerBranches.php:368 Customers.php:1014 Customers.php:1022 -#: SalesPeople.php:200 SelectCustomer.php:607 StockDispatch.php:187 +#: SalesPeople.php:200 SelectCustomer.php:612 StockDispatch.php:187 #: StockDispatch.php:199 SupplierContacts.php:150 SuppTransGLAnalysis.php:105 #: includes/InputSerialItemsFile.php:84 includes/InputSerialItemsFile.php:124 #: includes/PDFTaxPageHeader.inc:37 @@ -584,7 +589,7 @@ msgstr "Název" #: AddCustomerContacts.php:129 AddCustomerContacts.php:223 Customers.php:1015 -#: Customers.php:1023 SelectCustomer.php:608 WWW_Access.php:107 +#: Customers.php:1023 SelectCustomer.php:613 WWW_Access.php:107 #: WWW_Access.php:169 msgid "Role" msgstr "Roli" @@ -594,16 +599,17 @@ msgstr "Telefonní číslo" #: AddCustomerContacts.php:131 AddCustomerContacts.php:240 -#: CustomerBranches.php:374 CustomerBranches.php:774 CustomerInquiry.php:253 +#: CustomerBranches.php:374 CustomerBranches.php:781 CustomerInquiry.php:255 #: Customers.php:1017 Customers.php:1025 EmailCustTrans.php:15 -#: EmailCustTrans.php:63 Factors.php:245 Factors.php:292 Locations.php:563 +#: EmailCustTrans.php:63 Factors.php:245 Factors.php:292 Locations.php:572 #: OrderDetails.php:109 PDFRemittanceAdvice.php:243 PO_PDFPurchOrder.php:371 #: PO_PDFPurchOrder.php:374 PrintCustTrans.php:714 PrintCustTrans.php:945 #: PrintCustTrans.php:994 PrintCustTransPortrait.php:753 #: PrintCustTransPortrait.php:999 PrintCustTransPortrait.php:1056 -#: SelectCustomer.php:610 SupplierContacts.php:154 SupplierContacts.php:274 -#: UserSettings.php:184 WWW_Users.php:274 includes/PDFPickingListHeader.inc:25 -#: includes/PDFStatementPageHeader.inc:67 includes/PDFTransPageHeader.inc:82 +#: SelectCustomer.php:421 SelectCustomer.php:615 SupplierContacts.php:154 +#: SupplierContacts.php:274 UserSettings.php:184 WWW_Users.php:279 +#: includes/PDFPickingListHeader.inc:25 includes/PDFStatementPageHeader.inc:67 +#: includes/PDFTransPageHeader.inc:82 #: includes/PDFTransPageHeaderPortrait.inc:109 #: includes/PO_PDFOrderPageHeader.inc:29 msgid "Email" @@ -612,8 +618,8 @@ #: AddCustomerContacts.php:132 AddCustomerContacts.php:249 Customers.php:1018 #: Customers.php:1026 PcAssignCashToTab.php:224 PcAssignCashToTab.php:353 #: PcAuthorizeExpenses.php:92 PcClaimExpensesFromTab.php:214 -#: PcClaimExpensesFromTab.php:372 PcReportTab.php:327 SelectCustomer.php:611 -#: SystemParameters.php:328 WOSerialNos.php:291 WOSerialNos.php:297 +#: PcClaimExpensesFromTab.php:372 PcReportTab.php:327 SelectCustomer.php:616 +#: SystemParameters.php:335 WOSerialNos.php:291 WOSerialNos.php:297 msgid "Notes" msgstr "Bere na vědomí" @@ -635,15 +641,16 @@ msgstr "Jméno kontaktní osoby" #: AddCustomerContacts.php:231 Contracts.php:775 PDFRemittanceAdvice.php:239 -#: PO_Header.php:992 PO_Header.php:1073 SelectCreditItems.php:241 -#: SelectCustomer.php:417 SelectOrderItems.php:606 -#: includes/PDFStatementPageHeader.inc:63 includes/PDFTransPageHeader.inc:81 +#: PO_Header.php:991 PO_Header.php:1072 SelectCreditItems.php:241 +#: SelectCustomer.php:419 SelectOrderItems.php:606 +#: SupplierTenderCreate.php:359 includes/PDFStatementPageHeader.inc:63 +#: includes/PDFTransPageHeader.inc:81 #: includes/PDFTransPageHeaderPortrait.inc:105 msgid "Phone" msgstr "Telefon" -#: AddCustomerNotes.php:6 AddCustomerNotes.php:52 SelectCustomer.php:647 -#: SelectCustomer.php:678 +#: AddCustomerNotes.php:6 AddCustomerNotes.php:52 SelectCustomer.php:652 +#: SelectCustomer.php:683 msgid "Customer Notes" msgstr "Zákazník bere na vědomí" @@ -679,15 +686,15 @@ #: AddCustomerTypeNotes.php:108 AddCustomerTypeNotes.php:200 #: BankMatching.php:263 BankReconciliation.php:209 BankReconciliation.php:284 #: ContractCosting.php:173 CustomerAllocations.php:330 -#: CustomerAllocations.php:363 CustomerInquiry.php:196 +#: CustomerAllocations.php:363 CustomerInquiry.php:198 #: CustomerTransInquiry.php:100 GLAccountInquiry.php:152 -#: GLAccountReport.php:338 GLTransInquiry.php:42 MRPCalendar.php:219 +#: GLAccountReport.php:340 GLTransInquiry.php:42 MRPCalendar.php:219 #: PaymentAllocations.php:66 PcAssignCashToTab.php:220 #: PcAuthorizeExpenses.php:88 PDFRemittanceAdvice.php:300 #: PrintCustTrans.php:822 PrintCustTransPortrait.php:867 ReverseGRN.php:386 #: ShipmentCosting.php:538 ShipmentCosting.php:615 Shipments.php:490 #: StockDispatch.php:189 StockDispatch.php:201 StockLocMovements.php:90 -#: StockMovements.php:94 StockSerialItemResearch.php:81 +#: StockMovements.php:94 StockSerialItemResearch.php:80 #: SupplierAllocations.php:455 SupplierAllocations.php:568 #: SupplierAllocations.php:643 SupplierInquiry.php:209 #: SupplierTransInquiry.php:103 includes/PDFQuotationPageHeader.inc:92 @@ -699,10 +706,10 @@ msgstr "Datum" #: AddCustomerNotes.php:122 AddCustomerTypeNotes.php:109 PcReportTab.php:173 -#: Stocks.php:1019 UpgradeDatabase.php:184 UpgradeDatabase.php:187 -#: UpgradeDatabase.php:190 UpgradeDatabase.php:193 UpgradeDatabase.php:196 -#: UpgradeDatabase.php:199 UpgradeDatabase.php:202 UpgradeDatabase.php:205 -#: UpgradeDatabase.php:208 Z_Upgrade_3.10-3.11.php:62 +#: Stocks.php:1019 UpgradeDatabase.php:186 UpgradeDatabase.php:189 +#: UpgradeDatabase.php:192 UpgradeDatabase.php:195 UpgradeDatabase.php:198 +#: UpgradeDatabase.php:201 UpgradeDatabase.php:204 UpgradeDatabase.php:207 +#: UpgradeDatabase.php:210 Z_Upgrade_3.10-3.11.php:62 #: Z_Upgrade_3.10-3.11.php:66 Z_Upgrade_3.10-3.11.php:70 #: Z_Upgrade_3.10-3.11.php:74 Z_Upgrade_3.10-3.11.php:78 #: Z_Upgrade_3.11-4.00.php:62 Z_Upgrade_3.11-4.00.php:66 @@ -737,7 +744,7 @@ msgid "Contact Note" msgstr "Kontakt Poznámka:" -#: AddCustomerTypeNotes.php:5 SelectCustomer.php:688 +#: AddCustomerTypeNotes.php:5 SelectCustomer.php:693 msgid "Customer Type (Group) Notes" msgstr "Typ zákazníka (Group) Poznámky" @@ -745,7 +752,7 @@ msgid "The Contact priority must be an integer." msgstr "Prioritou Kontakt musí být celé číslo." -#: AddCustomerTypeNotes.php:49 SelectCustomer.php:719 +#: AddCustomerTypeNotes.php:49 SelectCustomer.php:724 msgid "Customer Group Notes" msgstr "Zákaznická skupina bere na vědomí" @@ -813,8 +820,9 @@ #: PDFLowGP.php:20 PDFStockCheckComparison.php:33 #: PDFStockCheckComparison.php:59 PDFStockCheckComparison.php:264 #: ReorderLevel.php:60 SelectAsset.php:37 SelectProduct.php:39 -#: StockCheck.php:66 StockCheck.php:140 SupplierTenders.php:326 -#: SuppPriceList.php:130 includes/PDFPaymentRun_PymtFooter.php:152 +#: StockCheck.php:65 StockCheck.php:139 SupplierTenderCreate.php:592 +#: SupplierTenders.php:397 SuppPriceList.php:130 +#: includes/PDFPaymentRun_PymtFooter.php:152 msgid "Problem Report" msgstr "Problém" @@ -853,8 +861,8 @@ #: PO_PDFPurchOrder.php:31 PO_PDFPurchOrder.php:154 #: PrintCustOrder_generic.php:243 PrintCustOrder.php:220 ReorderLevel.php:63 #: ReorderLevel.php:152 SalesAnalysis_UserDefined.php:28 -#: SelectCreditItems.php:30 StockCheck.php:47 StockCheck.php:69 -#: StockCheck.php:100 StockCheck.php:143 StockCheck.php:154 StockCheck.php:195 +#: SelectCreditItems.php:30 StockCheck.php:46 StockCheck.php:68 +#: StockCheck.php:99 StockCheck.php:142 StockCheck.php:153 StockCheck.php:194 #: StockDispatch.php:93 StockDispatch.php:106 SupplierBalsAtPeriodEnd.php:54 #: SupplierBalsAtPeriodEnd.php:65 SuppPaymentRun.php:112 #: SuppPaymentRun.php:122 SuppPaymentRun.php:186 SuppPaymentRun.php:217 @@ -879,9 +887,9 @@ msgstr "Podrobnosti o nesplacených transakcí pro zákazníka" #: AgedDebtors.php:370 AgedSuppliers.php:198 GLAccountCSV.php:168 -#: GLAccountInquiry.php:143 GLAccountReport.php:94 PO_Items.php:433 -#: PO_Items.php:557 PO_Items.php:582 SalesAnalReptCols.php:365 -#: SpecialOrder.php:441 StockLocTransferReceive.php:370 +#: GLAccountInquiry.php:143 GLAccountReport.php:94 PO_Items.php:431 +#: PO_Items.php:555 PO_Items.php:580 SalesAnalReptCols.php:365 +#: SpecialOrder.php:447 StockLocTransferReceive.php:370 #: StockQuantityByDate.php:121 includes/SelectOrderItems_IntoCart.inc:54 msgid "could not be retrieved because" msgstr "se nepodařilo získat, protože" @@ -890,16 +898,16 @@ #: ConfirmDispatch_Invoice.php:160 ConfirmDispatch_Invoice.php:974 #: ConfirmDispatch_Invoice.php:988 Contracts.php:580 CounterSales.php:1360 #: CounterSales.php:1374 Credit_Invoice.php:697 Credit_Invoice.php:718 -#: CustomerReceipt.php:542 CustomerReceipt.php:681 CustomerReceipt.php:709 +#: CustomerReceipt.php:545 CustomerReceipt.php:684 CustomerReceipt.php:712 #: CustomerTransInquiry.php:91 DeliveryDetails.php:393 GLProfit_Loss.php:596 -#: GLTagProfit_Loss.php:511 Payments.php:334 PDFRemittanceAdvice.php:85 +#: GLTagProfit_Loss.php:511 Payments.php:339 PDFRemittanceAdvice.php:85 #: PurchData.php:86 PurchData.php:104 PurchData.php:245 #: RecurringSalesOrders.php:256 ReverseGRN.php:191 ReverseGRN.php:205 #: ReverseGRN.php:374 SelectCreditItems.php:1409 SelectSalesOrder.php:189 -#: SelectSalesOrder.php:353 StockCheck.php:223 StockCostUpdate.php:77 -#: StockCostUpdate.php:87 StockLocStatus.php:153 StockMovements.php:87 +#: SelectSalesOrder.php:353 StockCheck.php:222 StockCostUpdate.php:78 +#: StockCostUpdate.php:88 StockLocStatus.php:152 StockMovements.php:87 #: StockQuantityByDate.php:95 StockReorderLevel.php:40 StockStatus.php:263 -#: StockTransfers.php:192 StockUsageGraph.php:53 StockUsage.php:139 +#: StockTransfers.php:201 StockUsageGraph.php:53 StockUsage.php:139 #: SupplierInquiry.php:78 SupplierInquiry.php:100 SupplierInquiry.php:136 #: SupplierInquiry.php:190 SupplierTransInquiry.php:95 SuppPaymentRun.php:114 #: SuppPaymentRun.php:188 SuppPaymentRun.php:219 WorkOrderCosting.php:418 @@ -980,7 +988,7 @@ #: InventoryValuation.php:268 MRPPlannedPurchaseOrders.php:280 #: MRPPlannedWorkOrders.php:337 MRPReschedules.php:152 MRPShortages.php:302 #: OutstandingGRNs.php:178 PDFCustomerList.php:417 PDFLowGP.php:146 -#: PDFPriceList.php:307 PDFRemittanceAdvice.php:170 +#: PDFPriceList.php:309 PDFRemittanceAdvice.php:170 #: PDFStockCheckComparison.php:358 PrintCustTrans.php:540 #: PrintCustTransPortrait.php:578 ReorderLevel.php:228 StockDispatch.php:327 #: SupplierBalsAtPeriodEnd.php:159 SuppPriceList.php:246 Tax.php:351 @@ -1106,11 +1114,11 @@ msgstr "Kód oblasti" #: Areas.php:132 CustomerTypes.php:164 Factors.php:140 -#: FixedAssetCategories.php:138 GLAccounts.php:197 Locations.php:328 +#: FixedAssetCategories.php:138 GLAccounts.php:197 Locations.php:337 #: MRPDemands.php:248 PcAssignCashToTab.php:135 PcClaimExpensesFromTab.php:126 -#: PcExpenses.php:166 PcExpensesTypeTab.php:101 PcTabs.php:166 +#: PcExpenses.php:166 PcExpensesTypeTab.php:101 PcTabs.php:165 #: PcTypeTabs.php:135 SalesAnalReptCols.php:215 SalesCategories.php:136 -#: SalesTypes.php:156 StockCategories.php:198 Suppliers.php:638 +#: SalesTypes.php:156 StockCategories.php:197 Suppliers.php:638 #: SupplierTypes.php:151 Z_DeleteInvoice.php:146 msgid "has been deleted" msgstr "byl zrušen" @@ -1156,26 +1164,27 @@ msgid "User ID" msgstr "ID uživatele" -#: AuditTrail.php:49 AuditTrail.php:62 ContractBOM.php:298 +#: AuditTrail.php:49 AuditTrail.php:62 ContractBOM.php:299 #: CounterSales.php:2152 CounterSales.php:2155 CustomerTransInquiry.php:31 #: DailySalesInquiry.php:48 DailySalesInquiry.php:50 FixedAssetRegister.php:56 #: FixedAssetRegister.php:65 InventoryQuantities.php:167 #: InventoryQuantities.php:193 InventoryQuantities.php:195 MRP.php:585 #: MRPReport.php:523 MRPReport.php:525 MRPReschedules.php:144 #: PDFPeriodStockTransListing.php:59 PDFPriceList.php:198 -#: PDFPrintLabel.php:250 PO_Items.php:1021 POReport.php:1567 +#: PDFPrintLabel.php:250 PO_Items.php:1019 POReport.php:1567 #: ReorderLevel.php:181 ReorderLevel.php:183 ReorderLevel.php:213 #: ReorderLevel.php:215 SalesGraph.php:97 SalesGraph.php:99 SalesGraph.php:119 #: SalesGraph.php:121 SalesGraph.php:143 SalesGraph.php:145 SalesGraph.php:179 #: SalesInquiry.php:1078 SalesInquiry.php:1141 SelectCreditItems.php:953 -#: SelectOrderItems.php:1610 SelectOrderItems.php:1613 SelectProduct.php:504 -#: SelectProduct.php:506 StockDispatch.php:298 StockDispatch.php:300 -#: StockLocStatus.php:69 StockLocStatus.php:71 StockLocStatus.php:89 -#: StockLocStatus.php:93 StockLocStatus.php:97 StockQuantityByDate.php:24 -#: SupplierTenders.php:338 SupplierTenders.php:340 SupplierTransInquiry.php:30 -#: SystemParameters.php:947 SystemParameters.php:953 SystemParameters.php:959 -#: SystemParameters.php:965 SystemParameters.php:971 TopItems.php:28 -#: TopItems.php:44 WorkOrderEntry.php:585 WorkOrderEntry.php:588 +#: SelectOrderItems.php:1611 SelectOrderItems.php:1614 SelectProduct.php:508 +#: SelectProduct.php:510 StockDispatch.php:298 StockDispatch.php:300 +#: StockLocStatus.php:68 StockLocStatus.php:70 StockLocStatus.php:88 +#: StockLocStatus.php:92 StockLocStatus.php:96 StockQuantityByDate.php:24 +#: SupplierTenderCreate.php:604 SupplierTenderCreate.php:606 +#: SupplierTenders.php:409 SupplierTenders.php:411 SupplierTransInquiry.php:30 +#: SystemParameters.php:961 SystemParameters.php:967 SystemParameters.php:973 +#: SystemParameters.php:979 SystemParameters.php:985 TopItems.php:28 +#: TopItems.php:44 WorkOrderEntry.php:584 WorkOrderEntry.php:587 #: WorkOrderIssue.php:647 WorkOrderIssue.php:650 msgid "All" msgstr "Všechny" @@ -1190,7 +1199,7 @@ msgstr "Konstantní" #: AuditTrail.php:81 MRPReport.php:776 PO_SelectPurchOrder.php:430 -#: SelectContract.php:193 SelectProduct.php:768 +#: SelectContract.php:193 SelectProduct.php:772 msgid "View" msgstr "Zobrazit" @@ -1203,13 +1212,13 @@ msgstr "Uživatel" #: AuditTrail.php:165 BankReconciliation.php:210 BankReconciliation.php:285 -#: CustomerAllocations.php:361 CustomerInquiry.php:194 +#: CustomerAllocations.php:361 CustomerInquiry.php:196 #: CustomerTransInquiry.php:20 CustomerTransInquiry.php:98 -#: CustWhereAlloc.php:18 CustWhereAlloc.php:105 DailyBankTransactions.php:112 -#: GLAccountInquiry.php:150 GLAccountReport.php:336 GLJournal.php:262 +#: CustWhereAlloc.php:17 CustWhereAlloc.php:104 DailyBankTransactions.php:112 +#: GLAccountInquiry.php:150 GLAccountReport.php:338 GLJournal.php:262 #: MRPReschedules.php:191 SalesByTypePeriodInquiry.php:334 -#: SelectCustomer.php:416 ShipmentCosting.php:536 ShipmentCosting.php:613 -#: StockCategories.php:217 StockLocMovements.php:88 StockMovements.php:92 +#: SelectCustomer.php:418 ShipmentCosting.php:536 ShipmentCosting.php:613 +#: StockCategories.php:216 StockLocMovements.php:88 StockMovements.php:92 #: SupplierAllocations.php:453 SupplierInquiry.php:207 #: SupplierTransInquiry.php:19 SupplierTransInquiry.php:100 #: Z_CheckAllocationsFrom.php:32 Z_CheckAllocationsFrom.php:57 @@ -1223,12 +1232,12 @@ msgid "Table" msgstr "Tabulka" -#: AuditTrail.php:167 api/api_xml-rpc.php:314 api/api_xml-rpc.php:727 -#: api/api_xml-rpc.php:1912 +#: AuditTrail.php:167 api/api_xml-rpc.php:314 api/api_xml-rpc.php:780 +#: api/api_xml-rpc.php:2189 msgid "Field Name" msgstr "Název pole" -#: AuditTrail.php:168 SystemParameters.php:327 +#: AuditTrail.php:168 SystemParameters.php:334 #: includes/PDFOstdgGRNsPageHeader.inc:43 msgid "Value" msgstr "Hodnota" @@ -1403,16 +1412,18 @@ msgid "Bank Address" msgstr "Adresa banky" -#: BankAccounts.php:196 CustomerAllocations.php:333 CustomerReceipt.php:788 +#: BankAccounts.php:196 CustomerAllocations.php:333 CustomerReceipt.php:791 #: CustomerTransInquiry.php:108 OffersReceived.php:109 PcReportTab.php:267 -#: PcTabs.php:206 PcTabs.php:349 PDFPrintLabel.php:97 +#: PcTabs.php:205 PcTabs.php:348 PDFPrintLabel.php:97 #: PO_AuthorisationLevels.php:126 PO_AuthorisationLevels.php:209 -#: PO_AuthorisationLevels.php:214 PO_AuthoriseMyOrders.php:115 +#: PO_AuthorisationLevels.php:214 PO_AuthoriseMyOrders.php:114 #: PO_Header.php:558 PO_SelectOSPurchOrder.php:489 PO_SelectPurchOrder.php:432 -#: PricesByCost.php:274 Prices.php:222 Prices.php:295 PurchData.php:169 +#: PricesByCost.php:274 Prices.php:221 Prices.php:294 PurchData.php:169 #: PurchData.php:352 PurchData.php:481 SelectSupplier.php:260 -#: SupplierCredit.php:263 SupplierInvoice.php:234 SupplierTransInquiry.php:109 -#: SuppPriceList.php:284 includes/PDFBankingSummaryPageHeader.inc:42 +#: SupplierCredit.php:263 SupplierInvoice.php:235 SupplierTenderCreate.php:544 +#: SupplierTenders.php:126 SupplierTenders.php:538 +#: SupplierTransInquiry.php:109 SuppPriceList.php:284 +#: includes/PDFBankingSummaryPageHeader.inc:42 #: includes/PDFDebtorBalsPageHeader.inc:33 #: includes/PDFSupplierBalsPageHeader.inc:36 msgid "Currency" @@ -1510,8 +1521,8 @@ "účtu. Zkontrolujte, zda vaše bankovní výpis a klikněte na check-box, když " "zjistíte, odpovídající transakce." -#: BankMatching.php:92 BankReconciliation.php:104 CustomerReceipt.php:754 -#: DailyBankTransactions.php:32 Payments.php:753 PDFChequeListing.php:44 +#: BankMatching.php:92 BankReconciliation.php:104 CustomerReceipt.php:757 +#: DailyBankTransactions.php:32 Payments.php:758 PDFChequeListing.php:44 #: TaxAuthorities.php:151 TaxAuthorities.php:316 msgid "Bank Account" msgstr "Bankovní účet" @@ -1529,7 +1540,7 @@ #: BankMatching.php:120 ConfirmDispatchControlled_Invoice.php:68 #: EmailCustTrans.php:63 FixedAssetRegister.php:78 FTP_RadioBeacon.php:280 -#: GLAccountCSV.php:171 GLAccountReport.php:103 Payments.php:733 +#: GLAccountCSV.php:171 GLAccountReport.php:103 Payments.php:738 #: PcReportTab.php:102 PDFChequeListing.php:114 PDFChequeListing.php:124 #: PDFChequeListing.php:199 PDFDeliveryDifferences.php:187 #: PDFDeliveryDifferences.php:200 PDFDeliveryDifferences.php:296 @@ -1542,7 +1553,7 @@ #: SalesGraph.php:211 SalesGraph.php:240 SalesGraph.php:244 #: StockLocTransferReceive.php:306 StockLocTransferReceive.php:423 #: Stocks.php:266 Stocks.php:271 StockStatus.php:304 StockStatus.php:345 -#: StockTransfers.php:437 includes/PDFAgedDebtorsPageHeader.inc:18 +#: StockTransfers.php:446 includes/PDFAgedDebtorsPageHeader.inc:18 #: includes/PDFAgedSuppliersPageHeader.inc:17 #: includes/PDFChequeListingPageHeader.inc:17 #: includes/PDFDeliveryDifferencesPageHeader.inc:19 @@ -1579,7 +1590,7 @@ msgid "Show unmatched" msgstr "Zobrazit bezkonkurenční" -#: BankMatching.php:128 BankMatching.php:131 PrintCheque.php:46 +#: BankMatching.php:128 BankMatching.php:131 PrintCheque.php:52 #: ReverseGRN.php:104 includes/PDFCustomerListPageHeader.inc:46 #: includes/PDFDeliveryDifferencesPageHeader.inc:24 #: includes/PDFDIFOTPageHeader.inc:24 @@ -1642,18 +1653,18 @@ msgstr "Ref" #: BankMatching.php:264 ConfirmDispatch_Invoice.php:288 Credit_Invoice.php:279 -#: CustomerAllocations.php:364 CustomerReceipt.php:897 -#: CustomerTransInquiry.php:107 CustWhereAlloc.php:109 -#: PaymentAllocations.php:67 Payments.php:1026 Payments.php:1030 -#: Payments.php:1046 PcAssignCashToTab.php:222 PcAssignCashToTab.php:345 +#: CustomerAllocations.php:364 CustomerReceipt.php:900 +#: CustomerTransInquiry.php:107 CustWhereAlloc.php:108 +#: PaymentAllocations.php:67 Payments.php:1030 Payments.php:1034 +#: Payments.php:1050 PcAssignCashToTab.php:222 PcAssignCashToTab.php:345 #: PcAuthorizeExpenses.php:90 PcClaimExpensesFromTab.php:212 #: PcClaimExpensesFromTab.php:365 PcReportTab.php:172 PcReportTab.php:326 -#: PrintCheque.php:77 PrintCheque.php:91 SelectCreditItems.php:682 +#: PrintCheque.php:83 PrintCheque.php:97 SelectCreditItems.php:682 #: SuppContractChgs.php:79 SuppContractChgs.php:163 SuppFixedAssetChgs.php:76 #: SuppFixedAssetChgs.php:149 SupplierAllocations.php:457 #: SupplierCredit.php:352 SupplierCredit.php:385 SupplierCredit.php:421 -#: SupplierCredit.php:460 SupplierInvoice.php:332 SupplierInvoice.php:373 -#: SupplierInvoice.php:413 SupplierInvoice.php:457 +#: SupplierCredit.php:460 SupplierInvoice.php:333 SupplierInvoice.php:374 +#: SupplierInvoice.php:414 SupplierInvoice.php:458 #: SupplierTransInquiry.php:108 SuppShiptChgs.php:81 SuppShiptChgs.php:146 #: SuppTransGLAnalysis.php:106 SuppTransGLAnalysis.php:191 #: Z_CheckAllocs.php:66 includes/PDFBankingSummaryPageHeader.inc:55 @@ -1724,26 +1735,26 @@ msgid "The bank accounts could not be retrieved by the SQL because" msgstr "Bankovní účty se nepodařilo získat na SQL, protože" -#: BankReconciliation.php:101 CustomerReceipt.php:742 -#: DailyBankTransactions.php:28 Payments.php:749 SuppPaymentRun.php:318 +#: BankReconciliation.php:101 CustomerReceipt.php:745 +#: DailyBankTransactions.php:28 Payments.php:754 SuppPaymentRun.php:318 msgid "The SQL used to retrieve the bank accounts was" msgstr "SQL slouží k získání bankovní účty byly" -#: BankReconciliation.php:111 CustomerReceipt.php:762 +#: BankReconciliation.php:111 CustomerReceipt.php:765 msgid "Bank Accounts have not yet been defined" msgstr "Bankovní účty dosud nebyly definovány" -#: BankReconciliation.php:111 CustomerReceipt.php:762 +#: BankReconciliation.php:111 CustomerReceipt.php:765 msgid "You must first" msgstr "Musíte nejprve" -#: BankReconciliation.php:111 CustomerReceipt.php:762 -#: DailyBankTransactions.php:38 Payments.php:761 SuppPaymentRun.php:331 +#: BankReconciliation.php:111 CustomerReceipt.php:765 +#: DailyBankTransactions.php:38 Payments.php:766 SuppPaymentRun.php:331 msgid "define the bank accounts" msgstr "definovat bankovních účtů" -#: BankReconciliation.php:111 CustomerReceipt.php:762 -#: DailyBankTransactions.php:38 Payments.php:761 SuppPaymentRun.php:331 +#: BankReconciliation.php:111 CustomerReceipt.php:765 +#: DailyBankTransactions.php:38 Payments.php:766 SuppPaymentRun.php:331 msgid "and general ledger accounts to be affected" msgstr "a účtů hlavní knihy mohly být postiženy" @@ -1775,7 +1786,7 @@ #: BankReconciliation.php:211 BankReconciliation.php:286 #: CustomerAllocations.php:329 CustomerAllocations.php:362 -#: CustomerInquiry.php:195 CustomerTransInquiry.php:99 CustWhereAlloc.php:106 +#: CustomerInquiry.php:197 CustomerTransInquiry.php:99 CustWhereAlloc.php:105 #: EmailCustTrans.php:15 GLAccountInquiry.php:151 PrintCustTrans.php:484 #: PrintCustTrans.php:699 PrintCustTrans.php:932 PrintCustTrans.php:981 #: PrintCustTransPortrait.php:506 PrintCustTransPortrait.php:735 @@ -1792,9 +1803,9 @@ msgstr "Číslo" #: BankReconciliation.php:212 BankReconciliation.php:287 -#: ContractCosting.php:172 CustomerInquiry.php:198 -#: CustomerTransInquiry.php:103 CustWhereAlloc.php:107 -#: DailyBankTransactions.php:113 GLAccountReport.php:337 +#: ContractCosting.php:172 CustomerInquiry.php:200 +#: CustomerTransInquiry.php:103 CustWhereAlloc.php:106 +#: DailyBankTransactions.php:113 GLAccountReport.php:339 #: PaymentAllocations.php:64 PaymentAllocations.php:65 #: PDFRemittanceAdvice.php:301 ShiptsList.php:37 StockCounts.php:99 #: StockCounts.php:135 StockLocMovements.php:93 StockMovements.php:98 @@ -1851,7 +1862,7 @@ #: BankReconciliation.php:354 CounterSales.php:822 Customers.php:1091 #: SelectOrderItems.php:1410 Stocks.php:1204 WorkOrderCosting.php:540 -#: WorkOrderEntry.php:569 +#: WorkOrderEntry.php:568 msgid "Are You Sure?" msgstr "Opravdu provést?" @@ -1915,7 +1926,7 @@ #: BOMExtendedQty.php:273 BOMExtendedQty.php:338 BOMExtendedQty.php:339 #: BOMExtendedQty.php:340 BOMExtendedQty.php:341 BOMIndented.php:315 #: BOMIndentedReverse.php:295 BOMInquiry.php:200 BOMs.php:532 BOMs.php:709 -#: ContractBOM.php:237 ContractBOM.php:349 ContractCosting.php:81 +#: ContractBOM.php:237 ContractBOM.php:350 ContractCosting.php:81 #: ContractCosting.php:87 ContractCosting.php:152 ContractOtherReqts.php:94 #: Contracts.php:961 Contracts.php:997 CounterSales.php:742 #: CounterSales.php:2031 CounterSales.php:2216 CounterSales.php:2342 @@ -1935,13 +1946,15 @@ #: SalesGraph.php:269 SalesInquiry.php:980 SalesTopItemsInquiry.php:222 #: SelectCreditItems.php:674 SelectCreditItems.php:1035 #: SelectOrderItems.php:1334 SelectOrderItems.php:1492 -#: SelectOrderItems.php:1676 SelectOrderItems.php:1803 ShipmentCosting.php:149 +#: SelectOrderItems.php:1677 SelectOrderItems.php:1804 ShipmentCosting.php:149 #: ShipmentCosting.php:150 Shipments.php:400 Shipments.php:402 -#: Shipments.php:403 Shipments.php:487 Shipments.php:489 SpecialOrder.php:617 +#: Shipments.php:403 Shipments.php:487 Shipments.php:489 SpecialOrder.php:626 #: StockCounts.php:98 StockLocMovements.php:92 StockLocTransfer.php:277 #: StockMovements.php:97 StockStatus.php:308 StockUsageGraph.php:12 #: SuppCreditGRNs.php:267 SuppCreditGRNs.php:268 SupplierCredit.php:317 -#: SupplierTenders.php:265 SupplierTenders.php:493 WOSerialNos.php:256 +#: SupplierTenderCreate.php:387 SupplierTenderCreate.php:765 +#: SupplierTenders.php:124 SupplierTenders.php:327 SupplierTenders.php:533 +#: SupplierTenders.php:536 SupplierTenders.php:691 WOSerialNos.php:256 #: WOSerialNos.php:296 includes/InputSerialItems.php:111 #: includes/InputSerialItems.php:117 includes/OutputSerialItems.php:38 #: includes/OutputSerialItems.php:43 includes/OutputSerialItems.php:49 @@ -1958,8 +1971,8 @@ #: includes/PDFStockCheckPageHeader.inc:44 #: includes/PDFStockNegativesHeader.inc:33 #: includes/PDFStockTransferHeader.inc:39 includes/PDFTransPageHeader.inc:209 -#: includes/PO_PDFOrderPageHeader.inc:78 api/api_xml-rpc.php:2258 -#: api/api_xml-rpc.php:2304 api/api_xml-rpc.php:2500 +#: includes/PO_PDFOrderPageHeader.inc:78 api/api_xml-rpc.php:2535 +#: api/api_xml-rpc.php:2581 api/api_xml-rpc.php:2777 msgid "Quantity" msgstr "Množství" @@ -1998,11 +2011,11 @@ msgstr "Rozšířená Množství kusovníku výpis " #: BOMExtendedQty.php:320 BOMIndented.php:302 BOMIndentedReverse.php:282 -#: GLAccountReport.php:322 InventoryPlanningPrefSupplier.php:58 +#: GLAccountReport.php:324 InventoryPlanningPrefSupplier.php:58 #: InventoryQuantities.php:232 MRPPlannedPurchaseOrders.php:303 #: MRPPlannedWorkOrders.php:360 MRPReport.php:813 MRPReschedules.php:177 -#: MRPShortages.php:331 PDFOrderStatus.php:305 PDFPriceList.php:337 -#: PDFReceipt.php:31 PO_Header.php:820 PO_PDFPurchOrder.php:61 +#: MRPShortages.php:331 PDFOrderStatus.php:305 PDFPriceList.php:339 +#: PDFReceipt.php:31 PO_Header.php:819 PO_PDFPurchOrder.php:61 #: PO_SelectOSPurchOrder.php:519 ReorderLevel.php:251 StockDispatch.php:355 #: SuppPriceList.php:273 Tax.php:243 includes/PDFAgedDebtorsPageHeader.inc:34 #: includes/PDFAgedSuppliersPageHeader.inc:21 @@ -2034,11 +2047,11 @@ msgstr "Vytištěno" #: BOMExtendedQty.php:321 BOMIndented.php:303 BOMIndentedReverse.php:283 -#: FixedAssetRegister.php:351 GLAccountReport.php:322 +#: FixedAssetRegister.php:351 GLAccountReport.php:324 #: InventoryPlanningPrefSupplier.php:58 InventoryQuantities.php:233 #: MRPPlannedPurchaseOrders.php:304 MRPPlannedWorkOrders.php:361 #: MRPReport.php:814 MRPReschedules.php:178 MRPShortages.php:332 -#: PDFPriceList.php:337 PDFReceipt.php:31 PDFRemittanceAdvice.php:210 +#: PDFPriceList.php:339 PDFReceipt.php:31 PDFRemittanceAdvice.php:210 #: PrintCustTrans.php:737 PrintCustTrans.php:946 PrintCustTrans.php:995 #: PrintCustTransPortrait.php:778 PrintCustTransPortrait.php:1000 #: PrintCustTransPortrait.php:1057 ReorderLevel.php:252 StockDispatch.php:356 @@ -2098,9 +2111,9 @@ #: BOMExtendedQty.php:331 BOMInquiry.php:1... [truncated message content] |
From: <dai...@us...> - 2012-02-12 03:51:32
|
Revision: 4889 http://web-erp.svn.sourceforge.net/web-erp/?rev=4889&view=rev Author: daintree Date: 2012-02-12 03:51:25 +0000 (Sun, 12 Feb 2012) Log Message: ----------- remove debug line Modified Paths: -------------- trunk/Prices.php trunk/api/api_debtortransactions.php Modified: trunk/Prices.php =================================================================== --- trunk/Prices.php 2012-02-11 04:32:41 UTC (rev 4888) +++ trunk/Prices.php 2012-02-12 03:51:25 UTC (rev 4889) @@ -157,7 +157,6 @@ '" . filter_number_format($_POST['Price']) . "')"; $ErrMsg = _('The new price could not be added'); $result = DB_query($sql,$db,$ErrMsg); - echo "Used the following SQL to insert the price:<br />$sql"; ReSequenceEffectiveDates ($Item, $_POST['TypeAbbrev'], $_POST['CurrAbrev'], $db) ; prnMsg(_('The new price has been inserted'),'success'); Modified: trunk/api/api_debtortransactions.php =================================================================== --- trunk/api/api_debtortransactions.php 2012-02-11 04:32:41 UTC (rev 4888) +++ trunk/api/api_debtortransactions.php 2012-02-12 03:51:25 UTC (rev 4889) @@ -439,6 +439,7 @@ reference, rate, ovamount, + ovdiscount, invtext) VALUES ('" . $ReceiptNo . "', 12, @@ -448,7 +449,8 @@ '" . $PeriodNo . "', '" . $Receipt['reference'] . "', '" . ($ReceiptExRate/$FunctionalExRate) . "', - '" . (-$Receipt['amountfx']-$Receipt['discountfx']) . "', + '" . -$Receipt['amountfx'] . "', + '" . -$Receipt['discountfx'] . "', '" . $Receipt['paymentmethod'] . "')"; $result = api_DB_query($SQL,$db,'','',true); @@ -1308,9 +1310,7 @@ * AllocDetails['transno'] * AllocDetails['customerref'] */ - - $fp = fopen('/root/Web-Server/DebugInfo.txt','w'); - + $Errors = array(); $db = db($User, $Password); if (gettype($db)=='integer') { @@ -1325,7 +1325,7 @@ } $SQL = "SELECT id, rate, - ovamount+ovgst-alloc AS lefttoalloc + ovamount+ovgst+ovidscount-alloc AS lefttoalloc FROM debtortrans WHERE debtorno='" . $AllocDetails['debtorno'] . "' AND type='" . $AllocDetails['type'] . "' @@ -1336,27 +1336,29 @@ $Errors[] = NoTransactionToAllocate; } - if ($LeftToAllocRow['lefttoalloc'] >= 0){ + if ($LeftToAllocRow['lefttoalloc'] <= 0){ /* negative if there is owt to allocate */ /*Now look for invoices with the same customerref to allocate to */ $SQL = "SELECT id, rate, - -ovamount-ovgst-alloc AS outstanding + ovamount+ovgst+ovdiscount-alloc AS outstanding FROM debtortrans WHERE debtorno='" . $AllocDetails['debtorno'] . "' AND type=10 - AND customerref='" . $AllocDetails['customerref'] . "'"; + AND reference='" . $AllocDetails['customerref'] . "'"; $Result = api_DB_query($SQL,$db); $OSInvRow = DB_fetch_array($Result); + if ($OSInvRow['rate']==$LeftToAllocRow['rate'] AND $OSInvRow['outstanding']>0){ - - if ($OSInvRow['outstanding']>=$LeftToAllocRow['lefttoalloc']){ + + if ($OSInvRow['outstanding']+$LeftToAllocRow['lefttoalloc']>=0){ /*We can allocate the whole amount of the credit/receipt */ - $AllocateAmount = $LeftToAllocRow['lefttoalloc']; + $AllocateAmount = -$LeftToAllocRow['lefttoalloc']; } else { /*We can only allocate the rest of the invoice outstanding */ $AllocateAmount = $OSInvRow['outstanding']; } + DB_Txn_Begin($db); /*Now insert the allocation records */ $SQL = "INSERT INTO custallocs (amt, @@ -1393,7 +1395,7 @@ * delivering it. All values should be sent as negatives. - * NB: Stock is not updated and the method cannot deal with assembly items + * NB: Stock is not updated, taxes are ignored, the method cannot deal with assembly items * the sales analysis is not updated either ****************** USE WITH CAUTION!! ********************** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-02-12 03:51:32
|
Revision: 4889 http://web-erp.svn.sourceforge.net/web-erp/?rev=4889&view=rev Author: daintree Date: 2012-02-12 03:51:25 +0000 (Sun, 12 Feb 2012) Log Message: ----------- remove debug line Modified Paths: -------------- trunk/Prices.php trunk/api/api_debtortransactions.php Modified: trunk/Prices.php =================================================================== --- trunk/Prices.php 2012-02-11 04:32:41 UTC (rev 4888) +++ trunk/Prices.php 2012-02-12 03:51:25 UTC (rev 4889) @@ -157,7 +157,6 @@ '" . filter_number_format($_POST['Price']) . "')"; $ErrMsg = _('The new price could not be added'); $result = DB_query($sql,$db,$ErrMsg); - echo "Used the following SQL to insert the price:<br />$sql"; ReSequenceEffectiveDates ($Item, $_POST['TypeAbbrev'], $_POST['CurrAbrev'], $db) ; prnMsg(_('The new price has been inserted'),'success'); Modified: trunk/api/api_debtortransactions.php =================================================================== --- trunk/api/api_debtortransactions.php 2012-02-11 04:32:41 UTC (rev 4888) +++ trunk/api/api_debtortransactions.php 2012-02-12 03:51:25 UTC (rev 4889) @@ -439,6 +439,7 @@ reference, rate, ovamount, + ovdiscount, invtext) VALUES ('" . $ReceiptNo . "', 12, @@ -448,7 +449,8 @@ '" . $PeriodNo . "', '" . $Receipt['reference'] . "', '" . ($ReceiptExRate/$FunctionalExRate) . "', - '" . (-$Receipt['amountfx']-$Receipt['discountfx']) . "', + '" . -$Receipt['amountfx'] . "', + '" . -$Receipt['discountfx'] . "', '" . $Receipt['paymentmethod'] . "')"; $result = api_DB_query($SQL,$db,'','',true); @@ -1308,9 +1310,7 @@ * AllocDetails['transno'] * AllocDetails['customerref'] */ - - $fp = fopen('/root/Web-Server/DebugInfo.txt','w'); - + $Errors = array(); $db = db($User, $Password); if (gettype($db)=='integer') { @@ -1325,7 +1325,7 @@ } $SQL = "SELECT id, rate, - ovamount+ovgst-alloc AS lefttoalloc + ovamount+ovgst+ovidscount-alloc AS lefttoalloc FROM debtortrans WHERE debtorno='" . $AllocDetails['debtorno'] . "' AND type='" . $AllocDetails['type'] . "' @@ -1336,27 +1336,29 @@ $Errors[] = NoTransactionToAllocate; } - if ($LeftToAllocRow['lefttoalloc'] >= 0){ + if ($LeftToAllocRow['lefttoalloc'] <= 0){ /* negative if there is owt to allocate */ /*Now look for invoices with the same customerref to allocate to */ $SQL = "SELECT id, rate, - -ovamount-ovgst-alloc AS outstanding + ovamount+ovgst+ovdiscount-alloc AS outstanding FROM debtortrans WHERE debtorno='" . $AllocDetails['debtorno'] . "' AND type=10 - AND customerref='" . $AllocDetails['customerref'] . "'"; + AND reference='" . $AllocDetails['customerref'] . "'"; $Result = api_DB_query($SQL,$db); $OSInvRow = DB_fetch_array($Result); + if ($OSInvRow['rate']==$LeftToAllocRow['rate'] AND $OSInvRow['outstanding']>0){ - - if ($OSInvRow['outstanding']>=$LeftToAllocRow['lefttoalloc']){ + + if ($OSInvRow['outstanding']+$LeftToAllocRow['lefttoalloc']>=0){ /*We can allocate the whole amount of the credit/receipt */ - $AllocateAmount = $LeftToAllocRow['lefttoalloc']; + $AllocateAmount = -$LeftToAllocRow['lefttoalloc']; } else { /*We can only allocate the rest of the invoice outstanding */ $AllocateAmount = $OSInvRow['outstanding']; } + DB_Txn_Begin($db); /*Now insert the allocation records */ $SQL = "INSERT INTO custallocs (amt, @@ -1393,7 +1395,7 @@ * delivering it. All values should be sent as negatives. - * NB: Stock is not updated and the method cannot deal with assembly items + * NB: Stock is not updated, taxes are ignored, the method cannot deal with assembly items * the sales analysis is not updated either ****************** USE WITH CAUTION!! ********************** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-02-15 16:24:52
|
Revision: 4909 http://web-erp.svn.sourceforge.net/web-erp/?rev=4909&view=rev Author: tim_schofield Date: 2012-02-15 16:24:39 +0000 (Wed, 15 Feb 2012) Log Message: ----------- Upload new menuing system moving menu items to an array, only showing items that the user has access to Modified Paths: -------------- trunk/UpgradeDatabase.php trunk/includes/ConnectDB.inc trunk/includes/footer.inc trunk/includes/header.inc trunk/includes/session.inc trunk/index.php Added Paths: ----------- trunk/includes/IndexArray.php trunk/sql/mysql/upgrade4.07-4.08.sql Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2012-02-15 13:32:44 UTC (rev 4908) +++ trunk/UpgradeDatabase.php 2012-02-15 16:24:39 UTC (rev 4909) @@ -133,6 +133,8 @@ $SQLScripts[] = './sql/mysql/upgrade4.05-4.06.sql'; case '4.06.6': $SQLScripts[] = './sql/mysql/upgrade4.06-4.07.sql'; + case '4.06.7': + $SQLScripts[] = './sql/mysql/upgrade4.07-4.08.sql'; case '4.07.0': break; } //end switch Modified: trunk/includes/ConnectDB.inc =================================================================== --- trunk/includes/ConnectDB.inc 2012-02-15 13:32:44 UTC (rev 4908) +++ trunk/includes/ConnectDB.inc 2012-02-15 16:24:39 UTC (rev 4909) @@ -4,7 +4,7 @@ * this value is saved in the $_SESSION['Versionumber'] when includes/GetConfig.php is run * if VersionNumber is < $Version then the DB update script is run */ -$Version='4.06.7'; //must update manually every time there is a DB change +$Version='4.07.1'; //must update manually every time there is a DB change require_once ($PathPrefix .'includes/MiscFunctions.php'); Added: trunk/includes/IndexArray.php =================================================================== --- trunk/includes/IndexArray.php (rev 0) +++ trunk/includes/IndexArray.php 2012-02-15 16:24:39 UTC (rev 4909) @@ -0,0 +1,515 @@ +<?php +$ModuleLink = array('orders', 'AR', 'AP', 'PO', 'stock', 'manuf', 'GL', 'FA', 'PC', 'system'); +$ReportList = array('orders'=>'ord', + 'AR'=>'ar', + 'AP'=>'ap', + 'PO'=>'prch', + 'stock'=>'inv', + 'manuf'=>'man', + 'GL'=>'gl', + 'FA'=>'fa', + 'PC'=>'pc', + 'system'=>'sys' + ); + +/*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'), + _('Manufacturing'), + _('General Ledger'), + _('Asset Manager'), + _('Petty Cash'), + _('Setup')); + +$MenuItems['orders']['Transactions']['Caption'] = array( _('Enter An Order or Quotation'), + _('Enter Counter Sales'), + _('Print Picking Lists'), + _('Outstanding Sales Orders/Quotations'), + _('Special Order'), + _('Recurring Order Template'), + _('Process Recurring Orders') + ); +$MenuItems['orders']['Transactions']['URL'] = array( '/SelectOrderItems.php?NewOrder=Yes', + '/CounterSales.php', + '/PDFPickingList.php', + '/SelectSalesOrder.php', + '/SpecialOrder.php', + '/SelectRecurringSalesOrder.php', + '/RecurringSalesOrdersProcess.php' + ); + +$MenuItems['orders']['Reports']['Caption'] = array( _('Order Inquiry'), + _('Print Price Lists'), + _('Order Status Report'), + _('Orders Invoiced Reports'), + _('Daily Sales Inquiry'), + _('Sales By Sales Type Inquiry'), + _('Sales By Category Inquiry'), + _('Top Sellers Inquiry'), + _('Order Delivery Differences Report'), + _('Delivery In Full On Time (DIFOT) Report'), + _('Sales Order Detail Or Summary Inquiries'), + _('Top Sales Items Report'), + _('Sales With Low Gross Profit Report') + ); + +$MenuItems['orders']['Reports']['URL'] = array( '/SelectCompletedOrder.php', + '/PDFPriceList.php', + '/PDFOrderStatus.php', + '/PDFOrdersInvoiced.php', + '/DailySalesInquiry.php', + '/SalesByTypePeriodInquiry.php', + '/SalesCategoryPeriodInquiry.php', + '/SalesTopItemsInquiry.php', + '/PDFDeliveryDifferences.php', + '/PDFDIFOT.php', + '/SalesInquiry.php', + '/TopItems.php', + '/PDFLowGP.php' + ); + +$MenuItems['orders']['Maintenance']['Caption'] = array( _('Select Contract'), + _('Create Contract') + ); + +$MenuItems['orders']['Maintenance']['URL'] = array( '/SelectContract.php', + '/Contracts.php' + ); + +$MenuItems['AR']['Transactions']['Caption'] = array (_('Select Order to Invoice'), + _('Create A Credit Note'), + _('Enter Receipts'), + _('Allocate Receipts or Credit Notes') + ); +$MenuItems['AR']['Transactions']['URL'] = array ('/SelectSalesOrder.php', + '/SelectCreditItems.php?NewCredit=Yes', + '/CustomerReceipt.php?NewReceipt=Yes&Type=Customer', + '/CustomerAllocations.php' + ); + +$MenuItems['AR']['Reports']['Caption'] = array (_('Where Allocated Inquiry'), + _('Print Invoices or Credit Notes'), + _('Print Statements'), + _('Sales Analysis Reports'), + _('Aged Customer Balances/Overdues Report'), + _('Re-Print A Deposit Listing'), + _('Debtor Balances At A Prior Month End'), + _('Customer Listing By Area/Salesperson'), + _('Sales Graphs'), + _('List Daily Transactions'), + _('Customer Transaction Inquiries') + ); + +$MenuItems['AR']['Reports']['URL'] = array ('/CustWhereAlloc.php', + '/PrintCustTrans.php', + '/PrintCustStatements.php', + '/SalesAnalRepts.php', + '/AgedDebtors.php', + '/PDFBankingSummary.php', + '/DebtorsAtPeriodEnd.php', + '/PDFCustomerList.php', + '/SalesGraph.php', + '/PDFCustTransListing.php', + '/CustomerTransInquiry.php' + ); + +$MenuItems['AR']['Maintenance']['Caption'] = array (_('Add Customer'), + _('Customers') + ); +$MenuItems['AR']['Maintenance']['URL'] = array ('/Customers.php', + '/SelectCustomer.php' + ); + +$MenuItems['AP']['Transactions']['Caption'] = array (_('Select Supplier'), + _('Supplier Allocations') + ); +$MenuItems['AP']['Transactions']['URL'] = array ('/SelectSupplier.php', + '/SupplierAllocations.php' + ); + +$MenuItems['AP']['Reports']['Caption'] = array (_('Aged Supplier Report'), + _('Payment Run Report'), + _('Remittance Advices'), + _('Outstanding GRNs Report'), + _('Supplier Balances At A Prior Month End'), + _('List Daily Transactions'), + _('Supplier Transaction Inquiries') + ); + +$MenuItems['AP']['Reports']['URL'] = array ('/AgedSuppliers.php', + '/SuppPaymentRun.php', + '/PDFRemittanceAdvice.php', + '/OutstandingGRNs.php', + '/SupplierBalsAtPeriodEnd.php', + '/PDFSuppTransListing.php', + '/SupplierTransInquiry.php' + ); + +$MenuItems['AP']['Maintenance']['Caption'] = array (_('Add Supplier'), + _('Maintain Factor Companies') + ); +$MenuItems['AP']['Maintenance']['URL'] = array ('/Suppliers.php', + '/Factors.php' + ); + +$MenuItems['PO']['Transactions']['Caption'] = array (_('Purchase Orders'), + _('Add Purchase Order'), + _('Create a New Tender'), + _('Edit Existing Tenders'), + _('Process Tenders and Offers'), + _('Orders to Authorise'), + _('Shipment Entry'), + _('Select A Shipment') + ); +$MenuItems['PO']['Transactions']['URL'] = array ('/PO_SelectOSPurchOrder.php', + '/PO_Header.php?NewOrder=Yes', + '/SupplierTenderCreate.php?New=Yes', + '/SupplierTenderCreate.php?Edit=Yes', + '/OffersReceived.php', + '/PO_AuthoriseMyOrders.php', + '/SelectSupplier.php', + '/Shipt_Select.php' + ); + +$MenuItems['PO']['Reports']['Caption'] = array (_('Purchase Order Inquiry'), + _('Purchase Order Detail Or Summary Inquiries'), + _('Supplier Price List') + ); + +$MenuItems['PO']['Reports']['URL'] = array ('/PO_SelectPurchOrder.php', + '/POReport.php', + '/SuppPriceList.php' + ); + +$MenuItems['PO']['Maintenance']['Caption'] = array ( + ); +$MenuItems['PO']['Maintenance']['URL'] = array ( + ); +$MenuItems['stock']['Transactions']['Caption'] = array (_('Receive Purchase Orders'), + _('Bulk Inventory Transfer') . ' - ' . _('Dispatch'), + _('Bulk Inventory Transfer') . ' - ' . _('Receive'), + _('Inventory Location Transfers'), + _('Inventory Adjustments'), + _('Reverse Goods Received'), + _('Enter Stock Counts') + ); +$MenuItems['stock']['Transactions']['URL'] = array ('/PO_SelectOSPurchOrder.php', + '/StockLocTransfer.php', + '/StockLocTransferReceive.php', + '/StockTransfers.php?New=Yes', + '/StockAdjustments.php?NewAdjustment=Yes', + '/ReverseGRN.php', + '/StockCounts.php' + ); + +$MenuItems['stock']['Reports']['Caption'] = array (_('Serial Item Research Tool'), + _('Print Price Labels'), + _('Reprint GRN'), + _('Inventory Item Movements'), + _('Inventory Item Status'), + _('Inventory Item Usage'), + _('Inventory Quantities'), + _('Reorder Level'), + _('Stock Dispatch'), + _('Inventory Valuation Report'), + _('Inventory Planning Report'), + _('Inventory Planning Based On Preferred Supplier Data'), + _('Inventory Stock Check Sheets'), + _('Make Inventory Quantities CSV'), + _('Compare Counts Vs Stock Check Data'), + _('All Inventory Movements By Location/Date'), + _('List Inventory Status By Location/Category'), + _('Historical Stock Quantity By Location/Category'), + _('List Negative Stocks'), + _('Period Stock Transaction Listing'), + _('Stock Transfer Note') + ); + +$MenuItems['stock']['Reports']['URL'] = array ('/StockSerialItemResearch.php', + '/PDFPrintLabel.php', + '/ReprintGRN.php', + '/StockMovements.php', + '/StockStatus.php', + '/StockUsage.php', + '/InventoryQuantities.php', + '/ReorderLevel.php', + '/StockDispatch.php', + '/InventoryValuation.php', + '/InventoryPlanning.php', + '/InventoryPlanningPrefSupplier.php', + '/StockCheck.php', + '/StockQties_csv.php', + '/PDFStockCheckComparison.php', + '/StockLocMovements.php', + '/StockLocStatus.php', + '/StockQuantityByDate.php', + '/PDFStockNegatives.php', + '/PDFPeriodStockTransListing.php', + '/PDFStockTransfer.php' + ); + +$MenuItems['stock']['Maintenance']['Caption'] = array (_('Add A New Item'), + _('Select An Item'), + _('Sales Category Maintenance'), + _('Add or Update Prices Based On Costs'), + _('View or Update Prices Based On Costs'), + _('Reorder Level By Category/Location') + ); +$MenuItems['stock']['Maintenance']['URL'] = array ('/Stocks.php', + '/SelectProduct.php', + '/SalesCategories.php', + '/PricesBasedOnMarkUp.php', + '/PricesByCost.php', + '/ReorderLevelLocation.php' + ); + +$MenuItems['manuf']['Transactions']['Caption'] = array (_('Work Order Entry'), + _('Select A Work Order') + ); +$MenuItems['manuf']['Transactions']['URL'] = array ('/WorkOrderEntry.php', + '/SelectWorkOrder.php' + ); + +$MenuItems['manuf']['Reports']['Caption'] = array (_('Select A Work Order'), + _('Costed Bill Of Material Inquiry'), + _('Where Used Inquiry'), + _('Bill Of Material Listing'), + _('Indented Bill Of Material Listing'), + _('List Components Required'), + _('Indented Where Used Listing'), + _('MRP'), + _('MRP Shortages'), + _('MRP Suggested Purchase Orders'), + _('MRP Suggested Work Orders'), + _('MRP Reschedules Required') + ); + +$MenuItems['manuf']['Reports']['URL'] = array ('/WorkOrderEntry.php', + '/BOMInquiry.php', + '/WhereUsedInquiry.php', + '/BOMListing.php', + '/BOMIndented.php', + '/BOMExtendedQty.php', + '/BOMIndentedReverse.php', + '/MRPReport.php', + '/MRPShortages.php', + '/MRPPlannedPurchaseOrders.php', + '/MRPPlannedWorkOrders.php', + '/MRPReschedules.php' + ); + +$MenuItems['manuf']['Maintenance']['Caption'] = array (_('Work Centre'), + _('Bills Of Material'), + _('Master Schedule'), + _('Auto Create Master Schedule'), + _('MRP Calculation') + ); + +$MenuItems['manuf']['Maintenance']['URL'] = array ('/WorkCentres.php', + '/BOMs.php', + '/MRPDemands.php', + '/MRPCreateDemands.php', + '/MRP.php' + ); + +$MenuItems['GL']['Transactions']['Caption'] = array (_('Bank Account Payments Entry'), + _('Bank Account Receipts Entry'), + _('Journal Entry'), + _('Bank Account Payments Matching'), + _('Bank Account Receipts Matching') + ); + +$MenuItems['GL']['Transactions']['URL'] = array ('/Payments.php?NewPayment=Yes', + '/CustomerReceipt.php?NewReceipt=Yes&Type=GL', + '/GLJournal.php?NewJournal=Yes', + '/BankMatching.php?Type=Payments', + '/BankMatching.php?Type=Receipts' + ); + +$MenuItems['GL']['Reports']['Caption'] = array (_('Trial Balance'), + _('Account Inquiry'), + _('Account Listing'), + _('Account Listing to CSV File'), + _('Bank Account Reconciliation Statement'), + _('Cheque Payments Listing'), + _('Daily Bank Transactions'), + _('Profit and Loss Statement'), + _('Balance Sheet'), + _('Tag Reports'), + _('Tax Reports') + ); + +$MenuItems['GL']['Reports']['URL'] = array ('/GLTrialBalance.php', + '/SelectGLAccount.php', + '/GLAccountReport.php', + '/GLAccountCSV.php', + '/BankReconciliation.php', + '/PDFChequeListing.php', + '/DailyBankTransactions.php', + '/GLProfit_Loss.php', + '/GLBalanceSheet.php', + '/GLTagProfit_Loss.php', + '/Tax.php' + ); + +$MenuItems['GL']['Maintenance']['Caption'] = array (_('GL Account'), + _('GL Budgets'), + _('Account Groups'), + _('Account Sections'), + _('GL Tags') + ); + +$MenuItems['GL']['Maintenance']['URL'] = array ('/GLAccounts.php', + '/GLBudgets.php', + '/AccountGroups.php', + '/AccountSections.php', + '/GLTags.php' + ); + +$MenuItems['FA']['Transactions']['Caption'] = array (_('Add a new Asset'), + _('Select an Asset'), + _('Change Asset Location'), + _('Depreciation Journal') + ); + +$MenuItems['FA']['Transactions']['URL'] = array ('/FixedAssetItems.php', + '/SelectAsset.php', + '/FixedAssetTransfer.php', + '/FixedAssetDepreciation.php' + ); + +$MenuItems['FA']['Reports']['Caption'] = array (_('Asset Register'), + ); + +$MenuItems['FA']['Reports']['URL'] = array ('/FixedAssetRegister.php', + ); + +$MenuItems['FA']['Maintenance']['Caption'] = array (_('Asset Categories Maintenance'), + _('Add or Maintain Asset Locations') + ); + +$MenuItems['FA']['Maintenance']['URL'] = array ('/FixedAssetCategories.php', + '/FixedAssetLocations.php' + ); + +$MenuItems['PC']['Transactions']['Caption'] = array (_('Assign Cash to PC Tab'), + _('Claim Expenses From PC Tab'), + _('Expenses Authorisation') + ); + +$MenuItems['PC']['Transactions']['URL'] = array ('/PcAssignCashToTab.php', + '/PcClaimExpensesFromTab.php', + '/PcAuthorizeExpenses.php' + ); + +$MenuItems['PC']['Reports']['Caption'] = array (_('PC Tab General Report'), + ); + +$MenuItems['PC']['Reports']['URL'] = array ('/PcReportTab.php', + ); + +$MenuItems['PC']['Maintenance']['Caption'] = array (_('Types of PC Tabs'), + _('PC Tabs'), + _('PC Expenses'), + _('Expenses for Type of PC Tab') + ); + +$MenuItems['PC']['Maintenance']['URL'] = array ('/PcTypeTabs.php', + '/PcTabs.php', + '/PcExpenses.php', + '/PcExpensesTypeTab.php' + ); + +$MenuItems['system']['Transactions']['Caption'] = array (_('Company Preferences'), + _('Configuration Settings'), + _('User Maintenance'), + _('Maintain Security Tokens'), + _('Role Permissions'), + _('Page Security Settings'), + _('Bank Accounts'), + _('Currency Maintenance'), + _('Tax Authorities and Rates Maintenance'), + _('Tax Group Maintenance'), + _('Dispatch Tax Province Maintenance'), + _('Tax Category Maintenance'), + _('List Periods Defined'), + _('Report Builder Tool'), + _('View Audit Trail'), + _('Geocode Setup'), + _('Form Layout Editor'), + _('Label Templates Maintenance'), + _('SMTP Server Details') + ); + +$MenuItems['system']['Transactions']['URL'] = array ('/CompanyPreferences.php', + '/SystemParameters.php', + '/WWW_Users.php', + '/SecurityTokens.php', + '/WWW_Access.php', + '/PageSecurity.php', + '/BankAccounts.php', + '/Currencies.php', + '/TaxAuthorities.php', + '/TaxGroups.php', + '/TaxProvinces.php', + '/TaxCategories.php', + '/PeriodsInquiry.php', + '/reportwriter/admin/ReportCreator.php', + '/AuditTrail.php', + '/GeocodeSetup.php', + '/FormDesigner.php', + '/Labels.php', + '/SMTPServer.php' + ); + +$MenuItems['system']['Reports']['Caption'] = array (_('Sales Types'), + _('Customer Types'), + _('Supplier Types'), + _('Credit Status'), + _('Payment Terms'), + _('Set Purchase Order Authorisation levels'), + _('Payment Methods'), + _('Sales People'), + _('Sales Areas'), + _('Shippers'), + _('Sales GL Interface Postings'), + _('COGS GL Interface Postings'), + _('Freight Costs Maintenance'), + _('Discount Matrix') + ); + +$MenuItems['system']['Reports']['URL'] = array ('/SalesTypes.php', + '/CustomerTypes.php', + '/SupplierTypes.php', + '/CreditStatus.php', + '/PaymentTerms.php', + '/PO_AuthorisationLevels.php', + '/PaymentMethods.php', + '/SalesPeople.php', + '/Areas.php', + '/Shippers.php', + '/SalesGLPostings.php', + '/COGSGLPostings.php', + '/FreightCosts.php', + '/DiscountMatrix.php' + ); + +$MenuItems['system']['Maintenance']['Caption'] = array (_('Inventory Categories Maintenance'), + _('Inventory Locations Maintenance'), + _('Discount Category Maintenance'), + _('Units of Measure'), + _('MRP Available Production Days'), + _('MRP Demand Types') + ); + +$MenuItems['system']['Maintenance']['URL'] = array ('/StockCategories.php', + '/Locations.php', + '/DiscountCategories.php', + '/UnitsOfMeasure.php', + '/MRPCalendar.php', + '/MRPDemandTypes.php' + ); +?> \ No newline at end of file Modified: trunk/includes/footer.inc =================================================================== --- trunk/includes/footer.inc 2012-02-15 13:32:44 UTC (rev 4908) +++ trunk/includes/footer.inc 2012-02-15 16:24:39 UTC (rev 4909) @@ -2,34 +2,23 @@ /* $Id$*/ - echo '</td>'; - echo '</tr>'; - echo '</table>'; +echo '<table width="100%" id="footer">'; - echo '</td></tr>'; -/*Do the borders */ +echo '<tr>'; +echo '<td style="width:33%"></td><td class="footer">'; +echo '<img src="'. $rootpath . '/' . $_SESSION['LogoFile'] . '" width="120" alt="webERP" title="webERP ' . _('Copyright') . ' © webrp.org - ' . date('Y') . '" /></td>'; +echo '<td class="footer" style="text-align: right;width:33%">'.(strftime('%A')).', '.(date($_SESSION['DefaultDateFormat']).' | '.(strftime(($DefaultClock==12) ? '%I:%M %p' : '%H:%M'))).'</td>'; - echo '</table>'; - - echo '<table width="100%" id="footer">'; - echo '<tr> - <td width="29%"> </td> - <td class="footer"><a href="http://www.weberp.org" rel="external"><img src="'. $rootpath . '/' . $_SESSION['LogoFile'] . '" width="120" alt="webERP" title="webERP ' . _('Copyright') . ' © weberp.org - ' . date('Y') . '" /></a></td> - <td class="footer">'.(strftime('%A')).', '.(date($_SESSION['DefaultDateFormat']).' | '.(strftime(($DefaultClock==12) ? '%I:%M %p' : '%H:%M'))).'</td> - </tr>'; +echo '</tr>'; - echo '<tr> - <td class="footer"> </td> - <td class="footer">webERP v' . $_SESSION['VersionNumber'] . ' ' . _('Copyright') . ' © weberp.org 2002 - '.date('Y').'</td> - </tr>'; +echo '<tr><td colspan="3" class="footer">webERP v' . $_SESSION['VersionNumber'] . '</td></tr>'; - if(http_file_exists('http://sflogo.sourceforge.net/sflogo.php')) { - echo '<tr> - <td class="footer"></td> - <td class="footer"><a href="https://sourceforge.net/projects/web-erp"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=70949&type=12" width="120" height="30" border="0" alt="Get webERP web-based ERP Accounting at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a></td> - </tr>'; - } - echo '</table>'; - echo '</body>'; - echo '</html>'; -?> +// if(http_file_exists('http://sflogo.sourceforge.net/sflogo.php')) { +// echo '<tr><td class="footer"><a href="https://sourceforge.net/projects/weberp"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=391629&type=12" width="120" height="30" border="0" alt="Get webERP web-based ERP Accounting at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a></td></tr>'; +// } + +echo '</table>'; + +echo '</body>'; +echo '</html>'; +?> \ No newline at end of file Modified: trunk/includes/header.inc =================================================================== --- trunk/includes/header.inc 2012-02-15 13:32:44 UTC (rev 4908) +++ trunk/includes/header.inc 2012-02-15 16:24:39 UTC (rev 4909) @@ -3,13 +3,9 @@ // Titles and screen header // Needs the file config.php loaded where the variables are defined for + // $rootpath // $title - should be defined in the page this file is included with - if (!isset($rootpath)){ - $rootpath = dirname(htmlspecialchars($_SERVER['PHP_SELF'])); - if ($rootpath == '/' OR $rootpath == "\\") { - $rootpath = ''; - } - } + $StrictXHTML=False; if (!headers_sent()){ @@ -22,6 +18,7 @@ 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" />'; @@ -39,39 +36,32 @@ echo '<tr>'; echo '<td colspan="2" rowspan="2">'; - echo '<table class="main_page" cellpadding="0" cellspacing="0">'; - echo '<tr>'; - echo '<td>'; - echo '<table width="100%" border="0" cellpadding="0" cellspacing="0" >'; - echo '<tr>'; - echo '<td>'; - if (isset($title)) { echo '<table cellpadding="0" cellspacing="0" border="0" id="quick_menu" class="quick_menu">'; echo '<tr>'; echo '<td align="left" style="width:100%;" class="quick_menu_left">'; -// Use icons for company and user data, saves screen realestate, use ALT tag in case theme icon not avail. - echo '<img src="'.$rootpath.'/css/'.$theme.'/images/company.png" title="' . _('Company') . '" alt="' . _('Company') . '"></img>'; - echo ' ' . stripslashes($_SESSION['CompanyRecord']['coyname']) . ' <a href="' . $rootpath . '/UserSettings.php"><img src="'.$rootpath.'/css/'.$theme.'/images/user.png" title="User" alt="' . _('User') . '"></img>' . stripslashes($_SESSION['UsersRealName']) . '</a>'; +// Use icons for company and user data, saves screen realestate, use alt tag in case theme icon not avail. + echo '<img src="'.$rootpath.'/css/'.$theme.'/images/company.png" title="' . _('Company') . '" alt="' . _('Company') . '" />'; + echo ' ' . stripslashes($_SESSION['CompanyRecord']['coyname']) . ' <a href="' . $rootpath . '/UserSettings.php"><img src="'.$rootpath.'/css/'.$theme.'/images/user.png" title="User" alt="' . _('User') . '" />' . stripslashes($_SESSION['UsersRealName']) . '</a>'; // Make the title text a class, can be set to display:none is some themes - echo '<br /><p class="header_title"> ' . $title . '</p></td>'; + echo '<br />' . $title . '</td>'; echo '<td class="quick_menu_tabs">'; echo '<table cellpadding="0" cellspacing="0" class="quick_menu_tabs"><tr>'; - echo '<td class="quick_menu_tab" align="center"><a accesskey="1" href="' . $rootpath . '/index.php"><span style="text-decoration:underline;">1</span> ' . _('Main Menu') . '</a></td>'; + echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/index.php"><span style="text-decoration:underline;">1</span> ' . _('Main Menu') . '</a></td>'; if (count($_SESSION['AllowedPageSecurityTokens'])>1){ - echo '<td class="quick_menu_tab" align="center"><a accesskey="2" href="' . $rootpath . '/SelectCustomer.php"><span style="text-decoration:underline;">2</span> ' . _('Customers') . '</a></td>'; + echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/SelectCustomer.php"><span style="text-decoration:underline;">2</span> ' . _('Customers') . '</a></td>'; - echo '<td class="quick_menu_tab" align="center"><a accesskey="3" href="' . $rootpath . '/SelectProduct.php"><span style="text-decoration:underline;">3</span> ' . _('Items') . '</a></td>'; + echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/SelectProduct.php"><span style="text-decoration:underline;">3</span> ' . _('Items') . '</a></td>'; - echo '<td class="quick_menu_tab" align="center"><a accesskey="4" href="' . $rootpath . '/SelectSupplier.php"><span style="text-decoration:underline;">4</span> ' . _('Suppliers') . '</a></td>'; + echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/SelectSupplier.php"><span style="text-decoration:underline;">4</span> ' . _('Suppliers') . '</a></td>'; - $DefaultManualLink = '<td class="quick_menu_tab" align="center"><a rel="external" accesskey="8" href="' . $rootpath . '/doc/Manual/ManualContents.php"><span style="text-decoration:underline;">8</span> ' . _('Manual') . '</a></td>'; + $DefaultManualLink = '<td class="quick_menu_tab" align="center"><a rel="external" href="' . $rootpath . '/doc/Manual/ManualContents.php"><span style="text-decoration:underline;">8</span> ' . _('Manual') . '</a></td>'; if (mb_substr($_SESSION['Language'],0,2) !='en'){ if (file_exists('locale/' . $_SESSION['Language'] . '/Manual/ManualContents.php')){ - echo '<td class="quick_menu_tab" align="center"><a target="_blank" accesskey="8" href="' . $rootpath . '/locale/' . $_SESSION['Language'] . '/Manual/ManualContents.php"><span style="text-decoration:underline;">8</span> ' . _('Manual') . '</a></td>'; + echo '<td class="quick_menu_tab" align="center"><a target="_blank" href="' . $rootpath . '/locale/' . $_SESSION['Language'] . '/Manual/ManualContents.php"><span style="text-decoration:underline;">8</span> ' . _('Manual') . '</a></td>'; } else { echo $DefaultManualLink; } @@ -80,7 +70,7 @@ } } - echo '<td class="quick_menu_tab" align="center"><a accesskey="0" href="' . $rootpath . '/Logout.php" onclick="return confirm(\'' . _('Are you sure you wish to logout?') . '\');"><span style="text-decoration:underline;">0</span> ' . _('Logout') . '</a></td>'; + echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/Logout.php" onclick="return confirm(\'' . _('Are you sure you wish to logout?') . '\');"><span style="text-decoration:underline;">0</span> ' . _('Logout') . '</a></td>'; echo '</tr></table>'; echo '</td></tr></table>'; Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2012-02-15 13:32:44 UTC (rev 4908) +++ trunk/includes/session.inc 2012-02-15 16:24:39 UTC (rev 4909) @@ -21,10 +21,10 @@ ini_set('session.gc_Maxlifetime',$SessionLifeTime); -if( !ini_get('safe_mode') ){ - set_time_limit($MaximumExecutionTime); +if( !ini_get('safe_mode') ){ + set_time_limit($MaximumExecutionTime); ini_set('max_execution_time',$MaximumExecutionTime); -} +} session_write_close(); //in case a previous session is not closed session_start(); @@ -75,7 +75,7 @@ if (!isset($AllowAnyone)){ /* only do security checks if AllowAnyone is not true */ - + include $PathPrefix . 'includes/UserLogin.php'; /* Login checking and setup */ if (isset($_POST['UserNameEntryField']) and isset($_POST['Password'])) { @@ -125,9 +125,9 @@ include($PathPrefix . 'includes/GetConfig.php'); /*The page security variable is now retrieved from the database in GetConfig.php and stored in the $SESSION['PageSecurityArray'] array - * the key for the array is the script name - the script name is retrieved from the basename ($_SERVER['SCRIPT_NAME']) + * the key for the array is the script name - the script name is retrieved from the basename ($_SERVER['SCRIPT_NAME']) */ -if (!isset($PageSecurity)){ +if (!isset($PageSecurity)){ //only hardcoded in the UpgradeDatabase script - so old versions that don't have the scripts.pagesecurity field do not choke $PageSecurity = $_SESSION['PageSecurityArray'][basename($_SERVER['SCRIPT_NAME'])]; } @@ -273,17 +273,6 @@ 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'); @@ -305,12 +294,12 @@ } } -/* Nasty kludge to allow Supplier only logins as well as Customer logins - .... hmmmmm some work to do here then! */ -if ($SupplierLogin==1) { - $_SESSION['AllowedPageSecurityTokens'][0]=9; +if (in_array(9,$_SESSION['AllowedPageSecurityTokens']) and $PageSecurity==0 and count($_SESSION['AllowedPageSecurityTokens'])==2){ + $SupplierLogin=1; +} else if (in_array(1,$_SESSION['AllowedPageSecurityTokens']) and $PageSecurity==0 and count($_SESSION['AllowedPageSecurityTokens'])==2){ + $SupplierLogin=0; } - if (in_array(15, $_SESSION['AllowedPageSecurityTokens'])) { /*System administrator login */ $debug = 1; //allow debug messages } else { Modified: trunk/index.php =================================================================== --- trunk/index.php 2012-02-15 13:32:44 UTC (rev 4908) +++ trunk/index.php 2012-02-15 16:24:39 UTC (rev 4909) @@ -1,1533 +1,190 @@ <?php +$PageSecurity=0; -/* $Id$*/ - include('includes/session.inc'); $title=_('Main Menu'); +include('includes/header.inc'); /*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', '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'), - _('Manufacturing'), - _('General Ledger'), - _('Asset Manager'), - _('Petty Cash'), - _('Setup')); +include('includes/IndexArray.php'); -if (isset($_GET['Application'])){ /*This is sent by this page (to itself) when the user clicks on a tab */ - $_SESSION['Module'] = $_GET['Application']; -} - -include('includes/header.inc'); - -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 - */ -?> - - <tr> - <td class="menu_group_items"> <!-- Orders transaction options --> - <table class="table_index"> +if (isset($SupplierLogin) and $SupplierLogin==1){ + echo '<table class="table_index"> <tr> <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/CustomerInquiry.php?CustomerID=' . $_SESSION['CustomerID'] . '">' . _('Account Status') . '</a></p>'; ?> + <p>• <a href="' . $rootpath . '/SupplierTenders.php?TenderType=1">' . _('View or Amend outstanding offers') . '</a></p> </td> </tr> <tr> <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SelectOrderItems.php?NewOrder=Yes">' . _('Place An Order') . '</a></p>'; ?> + <p>• <a href="' . $rootpath . '/SupplierTenders.php?TenderType=2">' . _('Create a new offer') . '</a></p> </td> </tr> <tr> <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SelectCompletedOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'] . '">' . _('Order Status') . '</a></p>'; ?> + <p>• <a href="' . $rootpath . '/SupplierTenders.php?TenderType=3">' . _('View any open tenders without an offer') . '</a></p> </td> </tr> - </table> - </td> -<?php + </table>'; 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"> +} elseif (isset($SupplierLogin) and $SupplierLogin==0){ + echo '<table class="table_index"> <tr> <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SupplierTenders.php">' . _('Supplier Tenders') . '</a></p>'; ?> + <p>• <a href="' . $rootpath . '/CustomerInquiry.php?CustomerID=' . $_SESSION['CustomerID'] . '">' . _('Account Status') . '</a></p> </td> </tr> - </table> - </td> -<?php -} else { /* Security settings DO allow seeing the main menu */ - -?> - <table width="100%"><td width="10%" valign="top"><table class="main_menu" width="100%" cellspacing="0" cellpadding="0" border="0"> - - <?php - - - $i=0; - - while ($i < count($ModuleLink)){ - - // This determines if the user has display access to the module see config.php and header.inc - // for the authorisation and security code - if ($_SESSION['ModulesEnabled'][$i]==1) { - - // If this is the first time the application is loaded then it is possible that - // SESSION['Module'] is not set if so set it to the first module that is enabled for the user - if (!isset($_SESSION['Module'])OR $_SESSION['Module']==''){ - $_SESSION['Module']=$ModuleLink[$i]; - } - if ($ModuleLink[$i] == $_SESSION['Module']){ - echo '<tr><td class="main_menu_selected"><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></td></tr>'; - } else { - echo '<tr><td class="main_menu_unselected"><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></td></tr>'; - } - } - $i++; - } - - ?> - </table></td><td> - <?php - - - switch ($_SESSION['Module']) { - - case 'orders': //Sales Orders - ?> - - <table width="100%"> <tr> - <td class="menu_group_area"> - <table width="100%" > - - <?php - // displays the main area headings - OptionHeadings(); - ?> - - <tr> - <td class="menu_group_items"> <!-- Orders transaction options --> - <table width="100%" class="table_index"> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SelectOrderItems.php?NewOrder=Yes">' . _('Enter An Order or Quotation') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/CounterSales.php">' . _('Enter Counter Sales') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PDFPickingList.php">' . _('Print Picking Lists') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders/Quotations') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SpecialOrder.php?NewSpecial=Yes">' . _('Special Order') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SelectRecurringSalesOrder.php">' . _('Recurring Order Template') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/RecurringSalesOrdersProcess.php">' . _('Process Recurring Orders') . '</a></p>'; ?> - </td> - </tr> - </table> - </td> - <td class="menu_group_items"> <!-- Orders Inquiry options --> - <table width="100%" class="table_index"> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SelectCompletedOrder.php">' . _('Order Inquiry') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PDFPriceList.php">' . _('Print Price Lists') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PDFOrderStatus.php">' . _('Order Status Report') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PDFOrdersInvoiced.php">' . _('Orders Invoiced Reports') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/DailySalesInquiry.php">' . _('Daily Sales Inquiry') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SalesByTypePeriodInquiry.php">' . _('Sales By Sales Type Inquiry') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SalesCategoryPeriodInquiry.php">' . _('Sales By Category Inquiry') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SalesTopItemsInquiry.php">' . _('Top Sellers Inquiry') . '</a></p>'; ?> - </td> - </tr> - - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PDFDeliveryDifferences.php">' . _('Order Delivery Differences Report') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PDFDIFOT.php">' . _('Delivery In Full On Time (DIFOT) Report') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SalesInquiry.php">' . _('Sales Order Detail Or Summary Inquiries') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/TopItems.php">' . _('Top Sales Items Report') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PDFLowGP.php">' . _('Sales With Low Gross Profit Report') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo GetRptLinks('ord'); ?> - </td> - </tr> - </table> - </td> - - <td class="menu_group_items"> <!-- Orders Maintenance options --> - <table width="100%" class="table_index" > - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SelectContract.php">' . _('Select Contract') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/Contracts.php">' . _('Create Contract') . '</a></p>'; ?> - </td> - </tr> - </table> - </td> - </tr> - </table> + <td class="menu_group_item"> + <p>• <a href="' . $rootpath . '/SelectOrderItems.php?NewOrder=Yes">' . _('Place An Order') . '</a></p> </td> </tr> - </table> - <?php - break; - /* ****************** END OF ORDERS MENU ITEMS **************************** */ - - - Case 'AR': //Debtors Module - - unset($ReceiptBatch); - unset($AllocTrans); - - ?> - <table width="100%"> <tr> - <td valign="top" class="menu_group_area"> - <table width="100%"> - - <?php OptionHeadings(); ?> - - <tr> - <td class="menu_group_items"> - <table width="100%" class="table_index"> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SelectSalesOrder.php">' . _('Select Order to Invoice') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SelectCreditItems.php?NewCredit=Yes">' . _('Create A Credit Note') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/CustomerReceipt.php?NewReceipt=Yes&Type=Customer">' . _('Enter Receipts') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - - <?php echo '<p>• <a href="' . $rootpath . '/CustomerAllocations.php">' . _('Allocate Receipts or Credit Notes') . '</a></p>'; ?> - </td> - </tr> - </table> - </td> - <td class="menu_group_items"> - <table width="100%" class="table_index"> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/CustWhereAlloc.php">' . _('Where Allocated Inquiry') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php - if ($_SESSION['InvoicePortraitFormat']==0){ - echo '<p>• <a href="' . $rootpath . '/PrintCustTrans.php">' . _('Print Invoices or Credit Notes') . '</a></p>'; - } else { - echo '<p>• <a href="' . $rootpath . '/PrintCustTransPortrait.php">' . _('Print Invoices or Credit Notes') . '</a></p>'; - } - ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PrintCustStatements.php">' . _('Print Statements') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SalesAnalRepts.php">' . _('Sales Analysis Reports') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/AgedDebtors.php">' . _('Aged Customer Balances/Overdues Report') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PDFBankingSummary.php">' . _('Re-Print A Deposit Listing') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/DebtorsAtPeriodEnd.php">' . _('Debtor Balances At A Prior Month End') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PDFCustomerList.php">' . _('Customer Listing By Area/Salesperson') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SalesGraph.php">' . _('Sales Graphs') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PDFCustTransListing.php">' . _('List Daily Transactions') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/CustomerTransInquiry.php">' . _('Customer Transaction Inquiries') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo GetRptLinks('ar'); ?> - </td> - </tr> - </table> - </td> - <td class="menu_group_items"> - <table width="100%" class="table_index"> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/Customers.php">' . _('Add Customer') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SelectCustomer.php">' . _('Customers') . '</a></p>'; ?> - </td> - </tr> - </table> - </td> - </tr> - </table> + <td class="menu_group_item"> + <p>• <a href="' . $rootpath . '/SelectCompletedOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'] . '">' . _('Order Status') . '</a></p> </td> </tr> - </table> - <?php + </table>'; + include('includes/footer.inc'); + exit; +} - /* ********************* END OF AR OPTIONS **************************** */ - break; +if (isset($_GET['Application'])){ /*This is sent by this page (to itself) when the user clicks on a tab */ + $_SESSION['Module'] = $_GET['Application']; +} - Case 'AP': //Creditors Module +echo '<table width="99%"> + <tr> + <td style="width:10%" valign="top">'; +echo '<table class="main_menu" width="100%" cellspacing="0" cellpadding="0" border="0">'; - ?> - <table width="100%"> - <tr> - <td valign="top" class="menu_group_area"> - <table width="100%"> + $i=0; - <?php OptionHeadings(); ?> +while ($i < count($ModuleLink)){ - <tr> - <td class="menu_group_items"> <!-- AP transaction options --> - <table width="100%" class="table_index"> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SelectSupplier.php">' . _('Select Supplier') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SupplierAllocations.php">' . _('Supplier Allocations') . '</a></p>'; ?> - </td> - </tr> - </table> - </td> - <td class="menu_group_items"> <!-- AP Inquiries --> - <table width="100%" class="table_index"> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/AgedSuppliers.php">' . _('Aged Supplier Report') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SuppPaymentRun.php">' . _('Payment Run Report') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PDFRemittanceAdvice.php">' . _('Remittance Advices') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/OutstandingGRNs.php">' . _('Outstanding GRNs Report') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SupplierBalsAtPeriodEnd.php">' . _('Supplier Balances At A Prior Month End') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PDFSuppTransListing.php">' . _('List Daily Transactions') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SupplierTransInquiry.php">' . _('Supplier Transaction Inquiries') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo GetRptLinks('ap'); ?> - </td> - </tr> - </table> - </td> - <td class="menu_group_items"> <!-- AP Maintenance Options --> - <table width="100%" class="table_index"> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/Suppliers.php">' . _('Add Supplier') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/Factors.php">' . _('Maintain Factor Companies') . '</a></p>'; ?> - </td> - </tr> - </table> - </td> - </tr> - </table> - </td> - </tr> - </table> - <?php - break; + // This determines if the user has display access to the module see config.php and header.inc + // for the authorisation and security code + if ($_SESSION['ModulesEnabled'][$i]==1) { + // If this is the first time the application is loaded then it is possible that + // SESSION['Module'] is not set if so set it to the first module that is enabled for the user + if (!isset($_SESSION['Module'])OR $_SESSION['Module']==''){ + $_SESSION['Module']=$ModuleLink[$i]; + } + if ($ModuleLink[$i] == $_SESSION['Module']){ + echo '<tr><td class="main_menu_selected"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></td></tr>'; + } else { + echo '<tr><td class="main_menu_unselected"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></td></tr>'; + } + } + $i++; +} - Case 'PO': /* Purchase Ordering */ +echo '</table>'; - ?> - <table width="100%"> +echo '</td>'; +echo '<td style="width:30%" valign="top">'; +if ($_SESSION['Module']=='system') { + $Header='<img src="' . $rootpath . '/css/' . $theme . '/images/company.png" title="' . _('General Setup Options') . '" alt="' . _('General Setup Options') . '" /><b>' . _('General Setup Options') . '</b>'; +} else { + $Header='<img src="' . $rootpath . '/css/' . $theme . '/images/transactions.png" title="' . _('Transactions') . '" alt="' . _('Transactions') . '" /><b>'. _('Transactions') . '</b>'; +} +echo ' <table width="100%" class="selection"> <tr> - <td valign="top" class="menu_group_area"> - <table width="100%"> + <td class="menu_group_headers"> + <div class="centre"> + ' . $Header . ' + </div> + </td> + </tr>'; - <?php OptionHeadings(); ?> +$i=0; +foreach ($MenuItems[$_SESSION['Module']]['Transactions']['Caption'] as $Caption) { +/* Transactions Menu Item */ + $ScriptNameArray = explode('?', substr($MenuItems[$_SESSION['Module']]['Transactions']['URL'][$i],1)); + $PageSecurity = $_SESSION['PageSecurityArray'][$ScriptNameArray[0]]; + if ((in_array($PageSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PageSecurity))) { + echo '<tr> + <td class="menu_group_item"> + <p>• <a href="' . $rootpath . $MenuItems[$_SESSION['Module']]['Transactions']['URL'][$i] .'">' . $Caption . '</a></p> + </td> + </tr>'; + } + $i++; +} +echo '</table>'; +echo '</td>'; - <tr> - <td class="menu_group_items"> <!-- PO Transactions --> - <table width="100%" class="table_index"> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PO_SelectOSPurchOrder.php">' . _('Purchase Orders') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PO_Header.php?&NewOrder=Yes">' . _('Add Purchase Order') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SupplierTenderCreate.php?New=Yes">' . _('Create a New Tender') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SupplierTenderCreate.php?Edit=Yes">' . _('Edit Existing Tenders') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/OffersReceived.php">' . _('Process Tenders and Offers') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PO_AuthoriseMyOrders.php">' . _('Orders to Authorise') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SelectSupplier.php">' . _('Shipment Entry') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/Shipt_Select.php">' . _('Select A Shipment') . '</a></p>'; ?> - </td> - </tr> - </table> - </td> - <td class="menu_group_items"> <!-- PO Inquiries and Reports --> - <table width="100%" class="table_index"> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PO_SelectPurchOrder.php">' . _('Purchase Order Inquiry') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/POReport.php">' . _('Purchase Order Detail Or Summary Inquiries') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SuppPriceList.php">' . _('Supplier Price List') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo GetRptLinks('prch'); ?> - </td> - </tr> - </table> - </td> - <td class="menu_group_items"> <!-- PO Maintenance --> - <table width="100%" class="table_index"> - </table> - </td> - </tr> - </table> - </td> - </tr> - </table> - <?php - break; - /* ****************************** END OF PURCHASING OPTIONS ******************************** */ - - - Case 'stock': //Inventory Module - - ?> - <table width="100%"> +echo '<td style="width:30%" valign="top">'; +if ($_SESSION['Module']=='system') { + $Header='<img src="' . $rootpath . '/css/' . $theme . '/images/ar.png" title="' . _('Receivables/Payables Setup') . '" alt="' . _('Receivables/Payables Setup') . '" /><b>' . _('Receivables/Payables Setup') . '</b>'; +} else { + $Header='<img src="' . $rootpath . '/css/' . $theme . '/images/reports.png" title="' . _('Inquiries and Reports') . '" alt="' . _('Inquiries and Reports') . '" /><b>'. _('Inquiries and Reports') . '</b>'; +} +echo ' <table width="100%" class="selection"> <tr> - <td valign="top" class="menu_group_area"> - <table width="100%"> + <td class="menu_group_headers"> + <div class="centre"> + ' . $Header . ' + </div> + </td> + </tr>'; +$i=0; +foreach ($MenuItems[$_SESSION['Module']]['Reports']['Caption'] as $Caption) { +/* Transactions Menu Item */ + $ScriptNameArray = explode('?', substr($MenuItems[$_SESSION['Module']]['Reports']['URL'][$i],1)); + $PageSecurity = $_SESSION['PageSecurityArray'][$ScriptNameArray[0]]; + if ((in_array($PageSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PageSecurity))) { + echo '<tr> + <td class="menu_group_item"> + <p>• <a href="' . $rootpath . $MenuItems[$_SESSION['Module']]['Reports']['URL'][$i] .'">' . $Caption . '</a></p> + </td> + </tr>'; + } + $i++; +} +echo GetRptLinks($_SESSION['Module']); +echo '</table>'; +echo '</td>'; - <?php OptionHeadings(); ?> - <tr> - <td class="menu_group_items"> - <table width="100%" class="table_index"> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PO_SelectOSPurchOrder.php">' . _('Receive Purchase Orders') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/StockLocTransfer.php">' . _('Bulk Inventory Transfer') . ' - ' . _('Dispatch') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/StockLocTransferReceive.php">' . _('Bulk Inventory Transfer') . ' - ' . _('Receive') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/StockTransfers.php?New=Yes">' . _('Inventory Location Transfers') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/StockAdjustments.php?NewAdjustment=Yes">' . _('Inventory Adjustments') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/ReverseGRN.php">' . _('Reverse Goods Received') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/StockCounts.php">' . _('Enter Stock Counts') . '</a></p>'; ?> - </td> - </tr> - </table> - </td> - <td class="menu_group_items"> - <table width="100%" class="table_index"> - <tr> -... [truncated message content] |
From: <tim...@us...> - 2012-02-15 16:24:52
|
Revision: 4909 http://web-erp.svn.sourceforge.net/web-erp/?rev=4909&view=rev Author: tim_schofield Date: 2012-02-15 16:24:39 +0000 (Wed, 15 Feb 2012) Log Message: ----------- Upload new menuing system moving menu items to an array, only showing items that the user has access to Modified Paths: -------------- trunk/UpgradeDatabase.php trunk/includes/ConnectDB.inc trunk/includes/footer.inc trunk/includes/header.inc trunk/includes/session.inc trunk/index.php Added Paths: ----------- trunk/includes/IndexArray.php trunk/sql/mysql/upgrade4.07-4.08.sql Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2012-02-15 13:32:44 UTC (rev 4908) +++ trunk/UpgradeDatabase.php 2012-02-15 16:24:39 UTC (rev 4909) @@ -133,6 +133,8 @@ $SQLScripts[] = './sql/mysql/upgrade4.05-4.06.sql'; case '4.06.6': $SQLScripts[] = './sql/mysql/upgrade4.06-4.07.sql'; + case '4.06.7': + $SQLScripts[] = './sql/mysql/upgrade4.07-4.08.sql'; case '4.07.0': break; } //end switch Modified: trunk/includes/ConnectDB.inc =================================================================== --- trunk/includes/ConnectDB.inc 2012-02-15 13:32:44 UTC (rev 4908) +++ trunk/includes/ConnectDB.inc 2012-02-15 16:24:39 UTC (rev 4909) @@ -4,7 +4,7 @@ * this value is saved in the $_SESSION['Versionumber'] when includes/GetConfig.php is run * if VersionNumber is < $Version then the DB update script is run */ -$Version='4.06.7'; //must update manually every time there is a DB change +$Version='4.07.1'; //must update manually every time there is a DB change require_once ($PathPrefix .'includes/MiscFunctions.php'); Added: trunk/includes/IndexArray.php =================================================================== --- trunk/includes/IndexArray.php (rev 0) +++ trunk/includes/IndexArray.php 2012-02-15 16:24:39 UTC (rev 4909) @@ -0,0 +1,515 @@ +<?php +$ModuleLink = array('orders', 'AR', 'AP', 'PO', 'stock', 'manuf', 'GL', 'FA', 'PC', 'system'); +$ReportList = array('orders'=>'ord', + 'AR'=>'ar', + 'AP'=>'ap', + 'PO'=>'prch', + 'stock'=>'inv', + 'manuf'=>'man', + 'GL'=>'gl', + 'FA'=>'fa', + 'PC'=>'pc', + 'system'=>'sys' + ); + +/*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'), + _('Manufacturing'), + _('General Ledger'), + _('Asset Manager'), + _('Petty Cash'), + _('Setup')); + +$MenuItems['orders']['Transactions']['Caption'] = array( _('Enter An Order or Quotation'), + _('Enter Counter Sales'), + _('Print Picking Lists'), + _('Outstanding Sales Orders/Quotations'), + _('Special Order'), + _('Recurring Order Template'), + _('Process Recurring Orders') + ); +$MenuItems['orders']['Transactions']['URL'] = array( '/SelectOrderItems.php?NewOrder=Yes', + '/CounterSales.php', + '/PDFPickingList.php', + '/SelectSalesOrder.php', + '/SpecialOrder.php', + '/SelectRecurringSalesOrder.php', + '/RecurringSalesOrdersProcess.php' + ); + +$MenuItems['orders']['Reports']['Caption'] = array( _('Order Inquiry'), + _('Print Price Lists'), + _('Order Status Report'), + _('Orders Invoiced Reports'), + _('Daily Sales Inquiry'), + _('Sales By Sales Type Inquiry'), + _('Sales By Category Inquiry'), + _('Top Sellers Inquiry'), + _('Order Delivery Differences Report'), + _('Delivery In Full On Time (DIFOT) Report'), + _('Sales Order Detail Or Summary Inquiries'), + _('Top Sales Items Report'), + _('Sales With Low Gross Profit Report') + ); + +$MenuItems['orders']['Reports']['URL'] = array( '/SelectCompletedOrder.php', + '/PDFPriceList.php', + '/PDFOrderStatus.php', + '/PDFOrdersInvoiced.php', + '/DailySalesInquiry.php', + '/SalesByTypePeriodInquiry.php', + '/SalesCategoryPeriodInquiry.php', + '/SalesTopItemsInquiry.php', + '/PDFDeliveryDifferences.php', + '/PDFDIFOT.php', + '/SalesInquiry.php', + '/TopItems.php', + '/PDFLowGP.php' + ); + +$MenuItems['orders']['Maintenance']['Caption'] = array( _('Select Contract'), + _('Create Contract') + ); + +$MenuItems['orders']['Maintenance']['URL'] = array( '/SelectContract.php', + '/Contracts.php' + ); + +$MenuItems['AR']['Transactions']['Caption'] = array (_('Select Order to Invoice'), + _('Create A Credit Note'), + _('Enter Receipts'), + _('Allocate Receipts or Credit Notes') + ); +$MenuItems['AR']['Transactions']['URL'] = array ('/SelectSalesOrder.php', + '/SelectCreditItems.php?NewCredit=Yes', + '/CustomerReceipt.php?NewReceipt=Yes&Type=Customer', + '/CustomerAllocations.php' + ); + +$MenuItems['AR']['Reports']['Caption'] = array (_('Where Allocated Inquiry'), + _('Print Invoices or Credit Notes'), + _('Print Statements'), + _('Sales Analysis Reports'), + _('Aged Customer Balances/Overdues Report'), + _('Re-Print A Deposit Listing'), + _('Debtor Balances At A Prior Month End'), + _('Customer Listing By Area/Salesperson'), + _('Sales Graphs'), + _('List Daily Transactions'), + _('Customer Transaction Inquiries') + ); + +$MenuItems['AR']['Reports']['URL'] = array ('/CustWhereAlloc.php', + '/PrintCustTrans.php', + '/PrintCustStatements.php', + '/SalesAnalRepts.php', + '/AgedDebtors.php', + '/PDFBankingSummary.php', + '/DebtorsAtPeriodEnd.php', + '/PDFCustomerList.php', + '/SalesGraph.php', + '/PDFCustTransListing.php', + '/CustomerTransInquiry.php' + ); + +$MenuItems['AR']['Maintenance']['Caption'] = array (_('Add Customer'), + _('Customers') + ); +$MenuItems['AR']['Maintenance']['URL'] = array ('/Customers.php', + '/SelectCustomer.php' + ); + +$MenuItems['AP']['Transactions']['Caption'] = array (_('Select Supplier'), + _('Supplier Allocations') + ); +$MenuItems['AP']['Transactions']['URL'] = array ('/SelectSupplier.php', + '/SupplierAllocations.php' + ); + +$MenuItems['AP']['Reports']['Caption'] = array (_('Aged Supplier Report'), + _('Payment Run Report'), + _('Remittance Advices'), + _('Outstanding GRNs Report'), + _('Supplier Balances At A Prior Month End'), + _('List Daily Transactions'), + _('Supplier Transaction Inquiries') + ); + +$MenuItems['AP']['Reports']['URL'] = array ('/AgedSuppliers.php', + '/SuppPaymentRun.php', + '/PDFRemittanceAdvice.php', + '/OutstandingGRNs.php', + '/SupplierBalsAtPeriodEnd.php', + '/PDFSuppTransListing.php', + '/SupplierTransInquiry.php' + ); + +$MenuItems['AP']['Maintenance']['Caption'] = array (_('Add Supplier'), + _('Maintain Factor Companies') + ); +$MenuItems['AP']['Maintenance']['URL'] = array ('/Suppliers.php', + '/Factors.php' + ); + +$MenuItems['PO']['Transactions']['Caption'] = array (_('Purchase Orders'), + _('Add Purchase Order'), + _('Create a New Tender'), + _('Edit Existing Tenders'), + _('Process Tenders and Offers'), + _('Orders to Authorise'), + _('Shipment Entry'), + _('Select A Shipment') + ); +$MenuItems['PO']['Transactions']['URL'] = array ('/PO_SelectOSPurchOrder.php', + '/PO_Header.php?NewOrder=Yes', + '/SupplierTenderCreate.php?New=Yes', + '/SupplierTenderCreate.php?Edit=Yes', + '/OffersReceived.php', + '/PO_AuthoriseMyOrders.php', + '/SelectSupplier.php', + '/Shipt_Select.php' + ); + +$MenuItems['PO']['Reports']['Caption'] = array (_('Purchase Order Inquiry'), + _('Purchase Order Detail Or Summary Inquiries'), + _('Supplier Price List') + ); + +$MenuItems['PO']['Reports']['URL'] = array ('/PO_SelectPurchOrder.php', + '/POReport.php', + '/SuppPriceList.php' + ); + +$MenuItems['PO']['Maintenance']['Caption'] = array ( + ); +$MenuItems['PO']['Maintenance']['URL'] = array ( + ); +$MenuItems['stock']['Transactions']['Caption'] = array (_('Receive Purchase Orders'), + _('Bulk Inventory Transfer') . ' - ' . _('Dispatch'), + _('Bulk Inventory Transfer') . ' - ' . _('Receive'), + _('Inventory Location Transfers'), + _('Inventory Adjustments'), + _('Reverse Goods Received'), + _('Enter Stock Counts') + ); +$MenuItems['stock']['Transactions']['URL'] = array ('/PO_SelectOSPurchOrder.php', + '/StockLocTransfer.php', + '/StockLocTransferReceive.php', + '/StockTransfers.php?New=Yes', + '/StockAdjustments.php?NewAdjustment=Yes', + '/ReverseGRN.php', + '/StockCounts.php' + ); + +$MenuItems['stock']['Reports']['Caption'] = array (_('Serial Item Research Tool'), + _('Print Price Labels'), + _('Reprint GRN'), + _('Inventory Item Movements'), + _('Inventory Item Status'), + _('Inventory Item Usage'), + _('Inventory Quantities'), + _('Reorder Level'), + _('Stock Dispatch'), + _('Inventory Valuation Report'), + _('Inventory Planning Report'), + _('Inventory Planning Based On Preferred Supplier Data'), + _('Inventory Stock Check Sheets'), + _('Make Inventory Quantities CSV'), + _('Compare Counts Vs Stock Check Data'), + _('All Inventory Movements By Location/Date'), + _('List Inventory Status By Location/Category'), + _('Historical Stock Quantity By Location/Category'), + _('List Negative Stocks'), + _('Period Stock Transaction Listing'), + _('Stock Transfer Note') + ); + +$MenuItems['stock']['Reports']['URL'] = array ('/StockSerialItemResearch.php', + '/PDFPrintLabel.php', + '/ReprintGRN.php', + '/StockMovements.php', + '/StockStatus.php', + '/StockUsage.php', + '/InventoryQuantities.php', + '/ReorderLevel.php', + '/StockDispatch.php', + '/InventoryValuation.php', + '/InventoryPlanning.php', + '/InventoryPlanningPrefSupplier.php', + '/StockCheck.php', + '/StockQties_csv.php', + '/PDFStockCheckComparison.php', + '/StockLocMovements.php', + '/StockLocStatus.php', + '/StockQuantityByDate.php', + '/PDFStockNegatives.php', + '/PDFPeriodStockTransListing.php', + '/PDFStockTransfer.php' + ); + +$MenuItems['stock']['Maintenance']['Caption'] = array (_('Add A New Item'), + _('Select An Item'), + _('Sales Category Maintenance'), + _('Add or Update Prices Based On Costs'), + _('View or Update Prices Based On Costs'), + _('Reorder Level By Category/Location') + ); +$MenuItems['stock']['Maintenance']['URL'] = array ('/Stocks.php', + '/SelectProduct.php', + '/SalesCategories.php', + '/PricesBasedOnMarkUp.php', + '/PricesByCost.php', + '/ReorderLevelLocation.php' + ); + +$MenuItems['manuf']['Transactions']['Caption'] = array (_('Work Order Entry'), + _('Select A Work Order') + ); +$MenuItems['manuf']['Transactions']['URL'] = array ('/WorkOrderEntry.php', + '/SelectWorkOrder.php' + ); + +$MenuItems['manuf']['Reports']['Caption'] = array (_('Select A Work Order'), + _('Costed Bill Of Material Inquiry'), + _('Where Used Inquiry'), + _('Bill Of Material Listing'), + _('Indented Bill Of Material Listing'), + _('List Components Required'), + _('Indented Where Used Listing'), + _('MRP'), + _('MRP Shortages'), + _('MRP Suggested Purchase Orders'), + _('MRP Suggested Work Orders'), + _('MRP Reschedules Required') + ); + +$MenuItems['manuf']['Reports']['URL'] = array ('/WorkOrderEntry.php', + '/BOMInquiry.php', + '/WhereUsedInquiry.php', + '/BOMListing.php', + '/BOMIndented.php', + '/BOMExtendedQty.php', + '/BOMIndentedReverse.php', + '/MRPReport.php', + '/MRPShortages.php', + '/MRPPlannedPurchaseOrders.php', + '/MRPPlannedWorkOrders.php', + '/MRPReschedules.php' + ); + +$MenuItems['manuf']['Maintenance']['Caption'] = array (_('Work Centre'), + _('Bills Of Material'), + _('Master Schedule'), + _('Auto Create Master Schedule'), + _('MRP Calculation') + ); + +$MenuItems['manuf']['Maintenance']['URL'] = array ('/WorkCentres.php', + '/BOMs.php', + '/MRPDemands.php', + '/MRPCreateDemands.php', + '/MRP.php' + ); + +$MenuItems['GL']['Transactions']['Caption'] = array (_('Bank Account Payments Entry'), + _('Bank Account Receipts Entry'), + _('Journal Entry'), + _('Bank Account Payments Matching'), + _('Bank Account Receipts Matching') + ); + +$MenuItems['GL']['Transactions']['URL'] = array ('/Payments.php?NewPayment=Yes', + '/CustomerReceipt.php?NewReceipt=Yes&Type=GL', + '/GLJournal.php?NewJournal=Yes', + '/BankMatching.php?Type=Payments', + '/BankMatching.php?Type=Receipts' + ); + +$MenuItems['GL']['Reports']['Caption'] = array (_('Trial Balance'), + _('Account Inquiry'), + _('Account Listing'), + _('Account Listing to CSV File'), + _('Bank Account Reconciliation Statement'), + _('Cheque Payments Listing'), + _('Daily Bank Transactions'), + _('Profit and Loss Statement'), + _('Balance Sheet'), + _('Tag Reports'), + _('Tax Reports') + ); + +$MenuItems['GL']['Reports']['URL'] = array ('/GLTrialBalance.php', + '/SelectGLAccount.php', + '/GLAccountReport.php', + '/GLAccountCSV.php', + '/BankReconciliation.php', + '/PDFChequeListing.php', + '/DailyBankTransactions.php', + '/GLProfit_Loss.php', + '/GLBalanceSheet.php', + '/GLTagProfit_Loss.php', + '/Tax.php' + ); + +$MenuItems['GL']['Maintenance']['Caption'] = array (_('GL Account'), + _('GL Budgets'), + _('Account Groups'), + _('Account Sections'), + _('GL Tags') + ); + +$MenuItems['GL']['Maintenance']['URL'] = array ('/GLAccounts.php', + '/GLBudgets.php', + '/AccountGroups.php', + '/AccountSections.php', + '/GLTags.php' + ); + +$MenuItems['FA']['Transactions']['Caption'] = array (_('Add a new Asset'), + _('Select an Asset'), + _('Change Asset Location'), + _('Depreciation Journal') + ); + +$MenuItems['FA']['Transactions']['URL'] = array ('/FixedAssetItems.php', + '/SelectAsset.php', + '/FixedAssetTransfer.php', + '/FixedAssetDepreciation.php' + ); + +$MenuItems['FA']['Reports']['Caption'] = array (_('Asset Register'), + ); + +$MenuItems['FA']['Reports']['URL'] = array ('/FixedAssetRegister.php', + ); + +$MenuItems['FA']['Maintenance']['Caption'] = array (_('Asset Categories Maintenance'), + _('Add or Maintain Asset Locations') + ); + +$MenuItems['FA']['Maintenance']['URL'] = array ('/FixedAssetCategories.php', + '/FixedAssetLocations.php' + ); + +$MenuItems['PC']['Transactions']['Caption'] = array (_('Assign Cash to PC Tab'), + _('Claim Expenses From PC Tab'), + _('Expenses Authorisation') + ); + +$MenuItems['PC']['Transactions']['URL'] = array ('/PcAssignCashToTab.php', + '/PcClaimExpensesFromTab.php', + '/PcAuthorizeExpenses.php' + ); + +$MenuItems['PC']['Reports']['Caption'] = array (_('PC Tab General Report'), + ); + +$MenuItems['PC']['Reports']['URL'] = array ('/PcReportTab.php', + ); + +$MenuItems['PC']['Maintenance']['Caption'] = array (_('Types of PC Tabs'), + _('PC Tabs'), + _('PC Expenses'), + _('Expenses for Type of PC Tab') + ); + +$MenuItems['PC']['Maintenance']['URL'] = array ('/PcTypeTabs.php', + '/PcTabs.php', + '/PcExpenses.php', + '/PcExpensesTypeTab.php' + ); + +$MenuItems['system']['Transactions']['Caption'] = array (_('Company Preferences'), + _('Configuration Settings'), + _('User Maintenance'), + _('Maintain Security Tokens'), + _('Role Permissions'), + _('Page Security Settings'), + _('Bank Accounts'), + _('Currency Maintenance'), + _('Tax Authorities and Rates Maintenance'), + _('Tax Group Maintenance'), + _('Dispatch Tax Province Maintenance'), + _('Tax Category Maintenance'), + _('List Periods Defined'), + _('Report Builder Tool'), + _('View Audit Trail'), + _('Geocode Setup'), + _('Form Layout Editor'), + _('Label Templates Maintenance'), + _('SMTP Server Details') + ); + +$MenuItems['system']['Transactions']['URL'] = array ('/CompanyPreferences.php', + '/SystemParameters.php', + '/WWW_Users.php', + '/SecurityTokens.php', + '/WWW_Access.php', + '/PageSecurity.php', + '/BankAccounts.php', + '/Currencies.php', + '/TaxAuthorities.php', + '/TaxGroups.php', + '/TaxProvinces.php', + '/TaxCategories.php', + '/PeriodsInquiry.php', + '/reportwriter/admin/ReportCreator.php', + '/AuditTrail.php', + '/GeocodeSetup.php', + '/FormDesigner.php', + '/Labels.php', + '/SMTPServer.php' + ); + +$MenuItems['system']['Reports']['Caption'] = array (_('Sales Types'), + _('Customer Types'), + _('Supplier Types'), + _('Credit Status'), + _('Payment Terms'), + _('Set Purchase Order Authorisation levels'), + _('Payment Methods'), + _('Sales People'), + _('Sales Areas'), + _('Shippers'), + _('Sales GL Interface Postings'), + _('COGS GL Interface Postings'), + _('Freight Costs Maintenance'), + _('Discount Matrix') + ); + +$MenuItems['system']['Reports']['URL'] = array ('/SalesTypes.php', + '/CustomerTypes.php', + '/SupplierTypes.php', + '/CreditStatus.php', + '/PaymentTerms.php', + '/PO_AuthorisationLevels.php', + '/PaymentMethods.php', + '/SalesPeople.php', + '/Areas.php', + '/Shippers.php', + '/SalesGLPostings.php', + '/COGSGLPostings.php', + '/FreightCosts.php', + '/DiscountMatrix.php' + ); + +$MenuItems['system']['Maintenance']['Caption'] = array (_('Inventory Categories Maintenance'), + _('Inventory Locations Maintenance'), + _('Discount Category Maintenance'), + _('Units of Measure'), + _('MRP Available Production Days'), + _('MRP Demand Types') + ); + +$MenuItems['system']['Maintenance']['URL'] = array ('/StockCategories.php', + '/Locations.php', + '/DiscountCategories.php', + '/UnitsOfMeasure.php', + '/MRPCalendar.php', + '/MRPDemandTypes.php' + ); +?> \ No newline at end of file Modified: trunk/includes/footer.inc =================================================================== --- trunk/includes/footer.inc 2012-02-15 13:32:44 UTC (rev 4908) +++ trunk/includes/footer.inc 2012-02-15 16:24:39 UTC (rev 4909) @@ -2,34 +2,23 @@ /* $Id$*/ - echo '</td>'; - echo '</tr>'; - echo '</table>'; +echo '<table width="100%" id="footer">'; - echo '</td></tr>'; -/*Do the borders */ +echo '<tr>'; +echo '<td style="width:33%"></td><td class="footer">'; +echo '<img src="'. $rootpath . '/' . $_SESSION['LogoFile'] . '" width="120" alt="webERP" title="webERP ' . _('Copyright') . ' © webrp.org - ' . date('Y') . '" /></td>'; +echo '<td class="footer" style="text-align: right;width:33%">'.(strftime('%A')).', '.(date($_SESSION['DefaultDateFormat']).' | '.(strftime(($DefaultClock==12) ? '%I:%M %p' : '%H:%M'))).'</td>'; - echo '</table>'; - - echo '<table width="100%" id="footer">'; - echo '<tr> - <td width="29%"> </td> - <td class="footer"><a href="http://www.weberp.org" rel="external"><img src="'. $rootpath . '/' . $_SESSION['LogoFile'] . '" width="120" alt="webERP" title="webERP ' . _('Copyright') . ' © weberp.org - ' . date('Y') . '" /></a></td> - <td class="footer">'.(strftime('%A')).', '.(date($_SESSION['DefaultDateFormat']).' | '.(strftime(($DefaultClock==12) ? '%I:%M %p' : '%H:%M'))).'</td> - </tr>'; +echo '</tr>'; - echo '<tr> - <td class="footer"> </td> - <td class="footer">webERP v' . $_SESSION['VersionNumber'] . ' ' . _('Copyright') . ' © weberp.org 2002 - '.date('Y').'</td> - </tr>'; +echo '<tr><td colspan="3" class="footer">webERP v' . $_SESSION['VersionNumber'] . '</td></tr>'; - if(http_file_exists('http://sflogo.sourceforge.net/sflogo.php')) { - echo '<tr> - <td class="footer"></td> - <td class="footer"><a href="https://sourceforge.net/projects/web-erp"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=70949&type=12" width="120" height="30" border="0" alt="Get webERP web-based ERP Accounting at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a></td> - </tr>'; - } - echo '</table>'; - echo '</body>'; - echo '</html>'; -?> +// if(http_file_exists('http://sflogo.sourceforge.net/sflogo.php')) { +// echo '<tr><td class="footer"><a href="https://sourceforge.net/projects/weberp"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=391629&type=12" width="120" height="30" border="0" alt="Get webERP web-based ERP Accounting at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a></td></tr>'; +// } + +echo '</table>'; + +echo '</body>'; +echo '</html>'; +?> \ No newline at end of file Modified: trunk/includes/header.inc =================================================================== --- trunk/includes/header.inc 2012-02-15 13:32:44 UTC (rev 4908) +++ trunk/includes/header.inc 2012-02-15 16:24:39 UTC (rev 4909) @@ -3,13 +3,9 @@ // Titles and screen header // Needs the file config.php loaded where the variables are defined for + // $rootpath // $title - should be defined in the page this file is included with - if (!isset($rootpath)){ - $rootpath = dirname(htmlspecialchars($_SERVER['PHP_SELF'])); - if ($rootpath == '/' OR $rootpath == "\\") { - $rootpath = ''; - } - } + $StrictXHTML=False; if (!headers_sent()){ @@ -22,6 +18,7 @@ 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" />'; @@ -39,39 +36,32 @@ echo '<tr>'; echo '<td colspan="2" rowspan="2">'; - echo '<table class="main_page" cellpadding="0" cellspacing="0">'; - echo '<tr>'; - echo '<td>'; - echo '<table width="100%" border="0" cellpadding="0" cellspacing="0" >'; - echo '<tr>'; - echo '<td>'; - if (isset($title)) { echo '<table cellpadding="0" cellspacing="0" border="0" id="quick_menu" class="quick_menu">'; echo '<tr>'; echo '<td align="left" style="width:100%;" class="quick_menu_left">'; -// Use icons for company and user data, saves screen realestate, use ALT tag in case theme icon not avail. - echo '<img src="'.$rootpath.'/css/'.$theme.'/images/company.png" title="' . _('Company') . '" alt="' . _('Company') . '"></img>'; - echo ' ' . stripslashes($_SESSION['CompanyRecord']['coyname']) . ' <a href="' . $rootpath . '/UserSettings.php"><img src="'.$rootpath.'/css/'.$theme.'/images/user.png" title="User" alt="' . _('User') . '"></img>' . stripslashes($_SESSION['UsersRealName']) . '</a>'; +// Use icons for company and user data, saves screen realestate, use alt tag in case theme icon not avail. + echo '<img src="'.$rootpath.'/css/'.$theme.'/images/company.png" title="' . _('Company') . '" alt="' . _('Company') . '" />'; + echo ' ' . stripslashes($_SESSION['CompanyRecord']['coyname']) . ' <a href="' . $rootpath . '/UserSettings.php"><img src="'.$rootpath.'/css/'.$theme.'/images/user.png" title="User" alt="' . _('User') . '" />' . stripslashes($_SESSION['UsersRealName']) . '</a>'; // Make the title text a class, can be set to display:none is some themes - echo '<br /><p class="header_title"> ' . $title . '</p></td>'; + echo '<br />' . $title . '</td>'; echo '<td class="quick_menu_tabs">'; echo '<table cellpadding="0" cellspacing="0" class="quick_menu_tabs"><tr>'; - echo '<td class="quick_menu_tab" align="center"><a accesskey="1" href="' . $rootpath . '/index.php"><span style="text-decoration:underline;">1</span> ' . _('Main Menu') . '</a></td>'; + echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/index.php"><span style="text-decoration:underline;">1</span> ' . _('Main Menu') . '</a></td>'; if (count($_SESSION['AllowedPageSecurityTokens'])>1){ - echo '<td class="quick_menu_tab" align="center"><a accesskey="2" href="' . $rootpath . '/SelectCustomer.php"><span style="text-decoration:underline;">2</span> ' . _('Customers') . '</a></td>'; + echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/SelectCustomer.php"><span style="text-decoration:underline;">2</span> ' . _('Customers') . '</a></td>'; - echo '<td class="quick_menu_tab" align="center"><a accesskey="3" href="' . $rootpath . '/SelectProduct.php"><span style="text-decoration:underline;">3</span> ' . _('Items') . '</a></td>'; + echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/SelectProduct.php"><span style="text-decoration:underline;">3</span> ' . _('Items') . '</a></td>'; - echo '<td class="quick_menu_tab" align="center"><a accesskey="4" href="' . $rootpath . '/SelectSupplier.php"><span style="text-decoration:underline;">4</span> ' . _('Suppliers') . '</a></td>'; + echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/SelectSupplier.php"><span style="text-decoration:underline;">4</span> ' . _('Suppliers') . '</a></td>'; - $DefaultManualLink = '<td class="quick_menu_tab" align="center"><a rel="external" accesskey="8" href="' . $rootpath . '/doc/Manual/ManualContents.php"><span style="text-decoration:underline;">8</span> ' . _('Manual') . '</a></td>'; + $DefaultManualLink = '<td class="quick_menu_tab" align="center"><a rel="external" href="' . $rootpath . '/doc/Manual/ManualContents.php"><span style="text-decoration:underline;">8</span> ' . _('Manual') . '</a></td>'; if (mb_substr($_SESSION['Language'],0,2) !='en'){ if (file_exists('locale/' . $_SESSION['Language'] . '/Manual/ManualContents.php')){ - echo '<td class="quick_menu_tab" align="center"><a target="_blank" accesskey="8" href="' . $rootpath . '/locale/' . $_SESSION['Language'] . '/Manual/ManualContents.php"><span style="text-decoration:underline;">8</span> ' . _('Manual') . '</a></td>'; + echo '<td class="quick_menu_tab" align="center"><a target="_blank" href="' . $rootpath . '/locale/' . $_SESSION['Language'] . '/Manual/ManualContents.php"><span style="text-decoration:underline;">8</span> ' . _('Manual') . '</a></td>'; } else { echo $DefaultManualLink; } @@ -80,7 +70,7 @@ } } - echo '<td class="quick_menu_tab" align="center"><a accesskey="0" href="' . $rootpath . '/Logout.php" onclick="return confirm(\'' . _('Are you sure you wish to logout?') . '\');"><span style="text-decoration:underline;">0</span> ' . _('Logout') . '</a></td>'; + echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/Logout.php" onclick="return confirm(\'' . _('Are you sure you wish to logout?') . '\');"><span style="text-decoration:underline;">0</span> ' . _('Logout') . '</a></td>'; echo '</tr></table>'; echo '</td></tr></table>'; Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2012-02-15 13:32:44 UTC (rev 4908) +++ trunk/includes/session.inc 2012-02-15 16:24:39 UTC (rev 4909) @@ -21,10 +21,10 @@ ini_set('session.gc_Maxlifetime',$SessionLifeTime); -if( !ini_get('safe_mode') ){ - set_time_limit($MaximumExecutionTime); +if( !ini_get('safe_mode') ){ + set_time_limit($MaximumExecutionTime); ini_set('max_execution_time',$MaximumExecutionTime); -} +} session_write_close(); //in case a previous session is not closed session_start(); @@ -75,7 +75,7 @@ if (!isset($AllowAnyone)){ /* only do security checks if AllowAnyone is not true */ - + include $PathPrefix . 'includes/UserLogin.php'; /* Login checking and setup */ if (isset($_POST['UserNameEntryField']) and isset($_POST['Password'])) { @@ -125,9 +125,9 @@ include($PathPrefix . 'includes/GetConfig.php'); /*The page security variable is now retrieved from the database in GetConfig.php and stored in the $SESSION['PageSecurityArray'] array - * the key for the array is the script name - the script name is retrieved from the basename ($_SERVER['SCRIPT_NAME']) + * the key for the array is the script name - the script name is retrieved from the basename ($_SERVER['SCRIPT_NAME']) */ -if (!isset($PageSecurity)){ +if (!isset($PageSecurity)){ //only hardcoded in the UpgradeDatabase script - so old versions that don't have the scripts.pagesecurity field do not choke $PageSecurity = $_SESSION['PageSecurityArray'][basename($_SERVER['SCRIPT_NAME'])]; } @@ -273,17 +273,6 @@ 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'); @@ -305,12 +294,12 @@ } } -/* Nasty kludge to allow Supplier only logins as well as Customer logins - .... hmmmmm some work to do here then! */ -if ($SupplierLogin==1) { - $_SESSION['AllowedPageSecurityTokens'][0]=9; +if (in_array(9,$_SESSION['AllowedPageSecurityTokens']) and $PageSecurity==0 and count($_SESSION['AllowedPageSecurityTokens'])==2){ + $SupplierLogin=1; +} else if (in_array(1,$_SESSION['AllowedPageSecurityTokens']) and $PageSecurity==0 and count($_SESSION['AllowedPageSecurityTokens'])==2){ + $SupplierLogin=0; } - if (in_array(15, $_SESSION['AllowedPageSecurityTokens'])) { /*System administrator login */ $debug = 1; //allow debug messages } else { Modified: trunk/index.php =================================================================== --- trunk/index.php 2012-02-15 13:32:44 UTC (rev 4908) +++ trunk/index.php 2012-02-15 16:24:39 UTC (rev 4909) @@ -1,1533 +1,190 @@ <?php +$PageSecurity=0; -/* $Id$*/ - include('includes/session.inc'); $title=_('Main Menu'); +include('includes/header.inc'); /*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', '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'), - _('Manufacturing'), - _('General Ledger'), - _('Asset Manager'), - _('Petty Cash'), - _('Setup')); +include('includes/IndexArray.php'); -if (isset($_GET['Application'])){ /*This is sent by this page (to itself) when the user clicks on a tab */ - $_SESSION['Module'] = $_GET['Application']; -} - -include('includes/header.inc'); - -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 - */ -?> - - <tr> - <td class="menu_group_items"> <!-- Orders transaction options --> - <table class="table_index"> +if (isset($SupplierLogin) and $SupplierLogin==1){ + echo '<table class="table_index"> <tr> <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/CustomerInquiry.php?CustomerID=' . $_SESSION['CustomerID'] . '">' . _('Account Status') . '</a></p>'; ?> + <p>• <a href="' . $rootpath . '/SupplierTenders.php?TenderType=1">' . _('View or Amend outstanding offers') . '</a></p> </td> </tr> <tr> <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SelectOrderItems.php?NewOrder=Yes">' . _('Place An Order') . '</a></p>'; ?> + <p>• <a href="' . $rootpath . '/SupplierTenders.php?TenderType=2">' . _('Create a new offer') . '</a></p> </td> </tr> <tr> <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SelectCompletedOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'] . '">' . _('Order Status') . '</a></p>'; ?> + <p>• <a href="' . $rootpath . '/SupplierTenders.php?TenderType=3">' . _('View any open tenders without an offer') . '</a></p> </td> </tr> - </table> - </td> -<?php + </table>'; 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"> +} elseif (isset($SupplierLogin) and $SupplierLogin==0){ + echo '<table class="table_index"> <tr> <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SupplierTenders.php">' . _('Supplier Tenders') . '</a></p>'; ?> + <p>• <a href="' . $rootpath . '/CustomerInquiry.php?CustomerID=' . $_SESSION['CustomerID'] . '">' . _('Account Status') . '</a></p> </td> </tr> - </table> - </td> -<?php -} else { /* Security settings DO allow seeing the main menu */ - -?> - <table width="100%"><td width="10%" valign="top"><table class="main_menu" width="100%" cellspacing="0" cellpadding="0" border="0"> - - <?php - - - $i=0; - - while ($i < count($ModuleLink)){ - - // This determines if the user has display access to the module see config.php and header.inc - // for the authorisation and security code - if ($_SESSION['ModulesEnabled'][$i]==1) { - - // If this is the first time the application is loaded then it is possible that - // SESSION['Module'] is not set if so set it to the first module that is enabled for the user - if (!isset($_SESSION['Module'])OR $_SESSION['Module']==''){ - $_SESSION['Module']=$ModuleLink[$i]; - } - if ($ModuleLink[$i] == $_SESSION['Module']){ - echo '<tr><td class="main_menu_selected"><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></td></tr>'; - } else { - echo '<tr><td class="main_menu_unselected"><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></td></tr>'; - } - } - $i++; - } - - ?> - </table></td><td> - <?php - - - switch ($_SESSION['Module']) { - - case 'orders': //Sales Orders - ?> - - <table width="100%"> <tr> - <td class="menu_group_area"> - <table width="100%" > - - <?php - // displays the main area headings - OptionHeadings(); - ?> - - <tr> - <td class="menu_group_items"> <!-- Orders transaction options --> - <table width="100%" class="table_index"> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SelectOrderItems.php?NewOrder=Yes">' . _('Enter An Order or Quotation') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/CounterSales.php">' . _('Enter Counter Sales') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PDFPickingList.php">' . _('Print Picking Lists') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders/Quotations') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SpecialOrder.php?NewSpecial=Yes">' . _('Special Order') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SelectRecurringSalesOrder.php">' . _('Recurring Order Template') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/RecurringSalesOrdersProcess.php">' . _('Process Recurring Orders') . '</a></p>'; ?> - </td> - </tr> - </table> - </td> - <td class="menu_group_items"> <!-- Orders Inquiry options --> - <table width="100%" class="table_index"> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SelectCompletedOrder.php">' . _('Order Inquiry') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PDFPriceList.php">' . _('Print Price Lists') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PDFOrderStatus.php">' . _('Order Status Report') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PDFOrdersInvoiced.php">' . _('Orders Invoiced Reports') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/DailySalesInquiry.php">' . _('Daily Sales Inquiry') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SalesByTypePeriodInquiry.php">' . _('Sales By Sales Type Inquiry') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SalesCategoryPeriodInquiry.php">' . _('Sales By Category Inquiry') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SalesTopItemsInquiry.php">' . _('Top Sellers Inquiry') . '</a></p>'; ?> - </td> - </tr> - - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PDFDeliveryDifferences.php">' . _('Order Delivery Differences Report') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PDFDIFOT.php">' . _('Delivery In Full On Time (DIFOT) Report') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SalesInquiry.php">' . _('Sales Order Detail Or Summary Inquiries') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/TopItems.php">' . _('Top Sales Items Report') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PDFLowGP.php">' . _('Sales With Low Gross Profit Report') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo GetRptLinks('ord'); ?> - </td> - </tr> - </table> - </td> - - <td class="menu_group_items"> <!-- Orders Maintenance options --> - <table width="100%" class="table_index" > - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SelectContract.php">' . _('Select Contract') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/Contracts.php">' . _('Create Contract') . '</a></p>'; ?> - </td> - </tr> - </table> - </td> - </tr> - </table> + <td class="menu_group_item"> + <p>• <a href="' . $rootpath . '/SelectOrderItems.php?NewOrder=Yes">' . _('Place An Order') . '</a></p> </td> </tr> - </table> - <?php - break; - /* ****************** END OF ORDERS MENU ITEMS **************************** */ - - - Case 'AR': //Debtors Module - - unset($ReceiptBatch); - unset($AllocTrans); - - ?> - <table width="100%"> <tr> - <td valign="top" class="menu_group_area"> - <table width="100%"> - - <?php OptionHeadings(); ?> - - <tr> - <td class="menu_group_items"> - <table width="100%" class="table_index"> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SelectSalesOrder.php">' . _('Select Order to Invoice') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SelectCreditItems.php?NewCredit=Yes">' . _('Create A Credit Note') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/CustomerReceipt.php?NewReceipt=Yes&Type=Customer">' . _('Enter Receipts') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - - <?php echo '<p>• <a href="' . $rootpath . '/CustomerAllocations.php">' . _('Allocate Receipts or Credit Notes') . '</a></p>'; ?> - </td> - </tr> - </table> - </td> - <td class="menu_group_items"> - <table width="100%" class="table_index"> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/CustWhereAlloc.php">' . _('Where Allocated Inquiry') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php - if ($_SESSION['InvoicePortraitFormat']==0){ - echo '<p>• <a href="' . $rootpath . '/PrintCustTrans.php">' . _('Print Invoices or Credit Notes') . '</a></p>'; - } else { - echo '<p>• <a href="' . $rootpath . '/PrintCustTransPortrait.php">' . _('Print Invoices or Credit Notes') . '</a></p>'; - } - ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PrintCustStatements.php">' . _('Print Statements') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SalesAnalRepts.php">' . _('Sales Analysis Reports') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/AgedDebtors.php">' . _('Aged Customer Balances/Overdues Report') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PDFBankingSummary.php">' . _('Re-Print A Deposit Listing') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/DebtorsAtPeriodEnd.php">' . _('Debtor Balances At A Prior Month End') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PDFCustomerList.php">' . _('Customer Listing By Area/Salesperson') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SalesGraph.php">' . _('Sales Graphs') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PDFCustTransListing.php">' . _('List Daily Transactions') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/CustomerTransInquiry.php">' . _('Customer Transaction Inquiries') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo GetRptLinks('ar'); ?> - </td> - </tr> - </table> - </td> - <td class="menu_group_items"> - <table width="100%" class="table_index"> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/Customers.php">' . _('Add Customer') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SelectCustomer.php">' . _('Customers') . '</a></p>'; ?> - </td> - </tr> - </table> - </td> - </tr> - </table> + <td class="menu_group_item"> + <p>• <a href="' . $rootpath . '/SelectCompletedOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'] . '">' . _('Order Status') . '</a></p> </td> </tr> - </table> - <?php + </table>'; + include('includes/footer.inc'); + exit; +} - /* ********************* END OF AR OPTIONS **************************** */ - break; +if (isset($_GET['Application'])){ /*This is sent by this page (to itself) when the user clicks on a tab */ + $_SESSION['Module'] = $_GET['Application']; +} - Case 'AP': //Creditors Module +echo '<table width="99%"> + <tr> + <td style="width:10%" valign="top">'; +echo '<table class="main_menu" width="100%" cellspacing="0" cellpadding="0" border="0">'; - ?> - <table width="100%"> - <tr> - <td valign="top" class="menu_group_area"> - <table width="100%"> + $i=0; - <?php OptionHeadings(); ?> +while ($i < count($ModuleLink)){ - <tr> - <td class="menu_group_items"> <!-- AP transaction options --> - <table width="100%" class="table_index"> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SelectSupplier.php">' . _('Select Supplier') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SupplierAllocations.php">' . _('Supplier Allocations') . '</a></p>'; ?> - </td> - </tr> - </table> - </td> - <td class="menu_group_items"> <!-- AP Inquiries --> - <table width="100%" class="table_index"> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/AgedSuppliers.php">' . _('Aged Supplier Report') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SuppPaymentRun.php">' . _('Payment Run Report') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PDFRemittanceAdvice.php">' . _('Remittance Advices') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/OutstandingGRNs.php">' . _('Outstanding GRNs Report') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SupplierBalsAtPeriodEnd.php">' . _('Supplier Balances At A Prior Month End') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PDFSuppTransListing.php">' . _('List Daily Transactions') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SupplierTransInquiry.php">' . _('Supplier Transaction Inquiries') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo GetRptLinks('ap'); ?> - </td> - </tr> - </table> - </td> - <td class="menu_group_items"> <!-- AP Maintenance Options --> - <table width="100%" class="table_index"> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/Suppliers.php">' . _('Add Supplier') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/Factors.php">' . _('Maintain Factor Companies') . '</a></p>'; ?> - </td> - </tr> - </table> - </td> - </tr> - </table> - </td> - </tr> - </table> - <?php - break; + // This determines if the user has display access to the module see config.php and header.inc + // for the authorisation and security code + if ($_SESSION['ModulesEnabled'][$i]==1) { + // If this is the first time the application is loaded then it is possible that + // SESSION['Module'] is not set if so set it to the first module that is enabled for the user + if (!isset($_SESSION['Module'])OR $_SESSION['Module']==''){ + $_SESSION['Module']=$ModuleLink[$i]; + } + if ($ModuleLink[$i] == $_SESSION['Module']){ + echo '<tr><td class="main_menu_selected"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></td></tr>'; + } else { + echo '<tr><td class="main_menu_unselected"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></td></tr>'; + } + } + $i++; +} - Case 'PO': /* Purchase Ordering */ +echo '</table>'; - ?> - <table width="100%"> +echo '</td>'; +echo '<td style="width:30%" valign="top">'; +if ($_SESSION['Module']=='system') { + $Header='<img src="' . $rootpath . '/css/' . $theme . '/images/company.png" title="' . _('General Setup Options') . '" alt="' . _('General Setup Options') . '" /><b>' . _('General Setup Options') . '</b>'; +} else { + $Header='<img src="' . $rootpath . '/css/' . $theme . '/images/transactions.png" title="' . _('Transactions') . '" alt="' . _('Transactions') . '" /><b>'. _('Transactions') . '</b>'; +} +echo ' <table width="100%" class="selection"> <tr> - <td valign="top" class="menu_group_area"> - <table width="100%"> + <td class="menu_group_headers"> + <div class="centre"> + ' . $Header . ' + </div> + </td> + </tr>'; - <?php OptionHeadings(); ?> +$i=0; +foreach ($MenuItems[$_SESSION['Module']]['Transactions']['Caption'] as $Caption) { +/* Transactions Menu Item */ + $ScriptNameArray = explode('?', substr($MenuItems[$_SESSION['Module']]['Transactions']['URL'][$i],1)); + $PageSecurity = $_SESSION['PageSecurityArray'][$ScriptNameArray[0]]; + if ((in_array($PageSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PageSecurity))) { + echo '<tr> + <td class="menu_group_item"> + <p>• <a href="' . $rootpath . $MenuItems[$_SESSION['Module']]['Transactions']['URL'][$i] .'">' . $Caption . '</a></p> + </td> + </tr>'; + } + $i++; +} +echo '</table>'; +echo '</td>'; - <tr> - <td class="menu_group_items"> <!-- PO Transactions --> - <table width="100%" class="table_index"> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PO_SelectOSPurchOrder.php">' . _('Purchase Orders') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PO_Header.php?&NewOrder=Yes">' . _('Add Purchase Order') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SupplierTenderCreate.php?New=Yes">' . _('Create a New Tender') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SupplierTenderCreate.php?Edit=Yes">' . _('Edit Existing Tenders') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/OffersReceived.php">' . _('Process Tenders and Offers') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PO_AuthoriseMyOrders.php">' . _('Orders to Authorise') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SelectSupplier.php">' . _('Shipment Entry') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/Shipt_Select.php">' . _('Select A Shipment') . '</a></p>'; ?> - </td> - </tr> - </table> - </td> - <td class="menu_group_items"> <!-- PO Inquiries and Reports --> - <table width="100%" class="table_index"> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PO_SelectPurchOrder.php">' . _('Purchase Order Inquiry') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/POReport.php">' . _('Purchase Order Detail Or Summary Inquiries') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SuppPriceList.php">' . _('Supplier Price List') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo GetRptLinks('prch'); ?> - </td> - </tr> - </table> - </td> - <td class="menu_group_items"> <!-- PO Maintenance --> - <table width="100%" class="table_index"> - </table> - </td> - </tr> - </table> - </td> - </tr> - </table> - <?php - break; - /* ****************************** END OF PURCHASING OPTIONS ******************************** */ - - - Case 'stock': //Inventory Module - - ?> - <table width="100%"> +echo '<td style="width:30%" valign="top">'; +if ($_SESSION['Module']=='system') { + $Header='<img src="' . $rootpath . '/css/' . $theme . '/images/ar.png" title="' . _('Receivables/Payables Setup') . '" alt="' . _('Receivables/Payables Setup') . '" /><b>' . _('Receivables/Payables Setup') . '</b>'; +} else { + $Header='<img src="' . $rootpath . '/css/' . $theme . '/images/reports.png" title="' . _('Inquiries and Reports') . '" alt="' . _('Inquiries and Reports') . '" /><b>'. _('Inquiries and Reports') . '</b>'; +} +echo ' <table width="100%" class="selection"> <tr> - <td valign="top" class="menu_group_area"> - <table width="100%"> + <td class="menu_group_headers"> + <div class="centre"> + ' . $Header . ' + </div> + </td> + </tr>'; +$i=0; +foreach ($MenuItems[$_SESSION['Module']]['Reports']['Caption'] as $Caption) { +/* Transactions Menu Item */ + $ScriptNameArray = explode('?', substr($MenuItems[$_SESSION['Module']]['Reports']['URL'][$i],1)); + $PageSecurity = $_SESSION['PageSecurityArray'][$ScriptNameArray[0]]; + if ((in_array($PageSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PageSecurity))) { + echo '<tr> + <td class="menu_group_item"> + <p>• <a href="' . $rootpath . $MenuItems[$_SESSION['Module']]['Reports']['URL'][$i] .'">' . $Caption . '</a></p> + </td> + </tr>'; + } + $i++; +} +echo GetRptLinks($_SESSION['Module']); +echo '</table>'; +echo '</td>'; - <?php OptionHeadings(); ?> - <tr> - <td class="menu_group_items"> - <table width="100%" class="table_index"> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PO_SelectOSPurchOrder.php">' . _('Receive Purchase Orders') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/StockLocTransfer.php">' . _('Bulk Inventory Transfer') . ' - ' . _('Dispatch') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/StockLocTransferReceive.php">' . _('Bulk Inventory Transfer') . ' - ' . _('Receive') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/StockTransfers.php?New=Yes">' . _('Inventory Location Transfers') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/StockAdjustments.php?NewAdjustment=Yes">' . _('Inventory Adjustments') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/ReverseGRN.php">' . _('Reverse Goods Received') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/StockCounts.php">' . _('Enter Stock Counts') . '</a></p>'; ?> - </td> - </tr> - </table> - </td> - <td class="menu_group_items"> - <table width="100%" class="table_index"> - <tr> -... [truncated message content] |
From: <dai...@us...> - 2012-02-16 07:36:42
|
Revision: 4912 http://web-erp.svn.sourceforge.net/web-erp/?rev=4912&view=rev Author: daintree Date: 2012-02-16 07:36:36 +0000 (Thu, 16 Feb 2012) Log Message: ----------- Modified Paths: -------------- trunk/AccountGroups.php trunk/AccountSections.php trunk/AddCustomerContacts.php trunk/AddCustomerTypeNotes.php trunk/UpgradeDatabase.php trunk/index.php Modified: trunk/AccountGroups.php =================================================================== --- trunk/AccountGroups.php 2012-02-15 16:52:21 UTC (rev 4911) +++ trunk/AccountGroups.php 2012-02-16 07:36:36 UTC (rev 4912) @@ -52,7 +52,8 @@ $i=1; $sql="SELECT count(groupname) - FROM accountgroups WHERE groupname='".$_POST['GroupName']."'"; + FROM accountgroups + WHERE groupname='".$_POST['GroupName']."'"; $DbgMsg = _('The SQL that was used to retrieve the information was'); $ErrMsg = _('Could not check whether the group exists because'); @@ -115,7 +116,7 @@ $Errors[$i] = 'SequenceInTB'; $i++; } - if (!ctype_digit($_POST['SequenceInTB']) or $_POST['SequenceInTB'] > 10000) { + if (!ctype_digit($_POST['SequenceInTB']) OR $_POST['SequenceInTB'] > 10000) { $InputError = 1; prnMsg( _('The sequence in the TB must be numeric and less than') . ' 10,000','error'); $Errors[$i] = 'SequenceInTB'; Modified: trunk/AccountSections.php =================================================================== --- trunk/AccountSections.php 2012-02-15 16:52:21 UTC (rev 4911) +++ trunk/AccountSections.php 2012-02-16 07:36:36 UTC (rev 4912) @@ -14,9 +14,8 @@ if( DB_num_rows($result) == 0 ) { $sql = "INSERT INTO accountsection (sectionid, - sectionname - ) VALUES ( - 1, + sectionname) + VALUES (1, 'Income')"; $result = DB_query($sql,$db); } @@ -26,9 +25,8 @@ if( DB_num_rows($result) == 0 ) { $sql = "INSERT INTO accountsection (sectionid, - sectionname - ) VALUES ( - 2, + sectionname) + VALUES (2, 'Cost Of Sales')"; $result = DB_query($sql,$db); } @@ -58,7 +56,7 @@ WHERE sectionid='".$_POST['SectionID']."'"; $result=DB_query($sql, $db); - if ((DB_num_rows($result)!=0 and !isset($_POST['SelectedSectionID']))) { + if ((DB_num_rows($result)!=0 AND !isset($_POST['SelectedSectionID']))) { $InputError = 1; prnMsg( _('The account section already exists in the database'),'error'); $Errors[$i] = 'SectionID'; @@ -77,20 +75,20 @@ $Errors[$i] = 'SectionName'; $i++; } - if (isset($_POST['SectionID']) and (!is_numeric($_POST['SectionID']))) { + if (isset($_POST['SectionID']) AND (!is_numeric($_POST['SectionID']))) { $InputError = 1; prnMsg( _('The section number must be an integer'),'error'); $Errors[$i] = 'SectionID'; $i++; } - if (isset($_POST['SectionID']) and mb_strpos($_POST['SectionID'],".")>0) { + if (isset($_POST['SectionID']) AND mb_strpos($_POST['SectionID'],".")>0) { $InputError = 1; prnMsg( _('The section number must be an integer'),'error'); $Errors[$i] = 'SectionID'; $i++; } - if (isset($_POST['SelectedSectionID']) and $_POST['SelectedSectionID']!='' AND $InputError !=1) { + if (isset($_POST['SelectedSectionID']) AND $_POST['SelectedSectionID']!='' AND $InputError !=1) { /*SelectedSectionID 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*/ @@ -149,7 +147,7 @@ unset ($_POST['SectionName']); } -if (!isset($_GET['SelectedSectionID']) and !isset($_POST['SelectedSectionID'])) { +if (!isset($_GET['SelectedSectionID']) AND !isset($_POST['SelectedSectionID'])) { /* An account section could be posted when one has been edited and is being updated or GOT when selected for modification Modified: trunk/AddCustomerContacts.php =================================================================== --- trunk/AddCustomerContacts.php 2012-02-15 16:52:21 UTC (rev 4911) +++ trunk/AddCustomerContacts.php 2012-02-16 07:36:36 UTC (rev 4912) @@ -34,7 +34,7 @@ ie the page has called itself with some user input */ //first off validate inputs sensible - if (isset($_POST['Con_ID']) and !is_long((integer)$_POST['Con_ID'])) { + if (isset($_POST['Con_ID']) AND !is_long((integer)$_POST['Con_ID'])) { $InputError = 1; prnMsg( _('The Contact ID must be an integer.'), 'error'); } elseif (mb_strlen($_POST['ContactName']) >40) { @@ -43,12 +43,12 @@ } elseif( trim($_POST['ContactName']) == '' ) { $InputError = 1; prnMsg( _('The contact name may not be empty'), 'error'); - } elseif (!IsEmailAddress($_POST['ContactEmail']) and mb_strlen($_POST['ContactEmail'])>0){ + } elseif (!IsEmailAddress($_POST['ContactEmail']) AND mb_strlen($_POST['ContactEmail'])>0){ $InputError = 1; prnMsg( _('The contact email address is not a valid email address'), 'error'); } - if (isset($Id) and ($Id and $InputError !=1)) { + if (isset($Id) AND ($Id AND $InputError !=1)) { $sql = "UPDATE custcontacts SET contactname='" . $_POST['ContactName'] . "', role='" . $_POST['ContactRole'] . "', phoneno='" . $_POST['ContactPhone'] . "', @@ -89,7 +89,7 @@ unset($_POST['ContactEmail']); unset($_POST['Con_ID']); } -} elseif (isset($_GET['delete']) and $_GET['delete']) { +} elseif (isset($_GET['delete']) AND $_GET['delete']) { //the link to delete a selected record was clicked instead of the submit button // PREVENT DELETES IF DEPENDENT RECORDS IN 'SalesOrders' @@ -127,7 +127,8 @@ <th>' . _('Role') . '</th> <th>' . _('Phone no') . '</th> <th>' . _('Email') . '</th> - <th>' . _('Notes') . '</th>'; + <th>' . _('Notes') . '</th> + </tr>'; $k=0; //row colour counter @@ -208,7 +209,8 @@ echo '<table class="selection">'; } - echo '<tr><td>'. _('Contact Name') . '</td>'; + echo '<tr> + <td>'. _('Contact Name') . '</td>'; if (isset($_POST['ContactName'])) { echo '<td><input type="text" name="ContactName" value="' . $_POST['ContactName']. '" size="35" maxlength="40" /></td> </tr>'; @@ -225,7 +227,8 @@ echo '<td><input type="text" name="ContactRole" size="35" maxlength="40" /></td> </tr>'; } - echo '<tr><td>' . _('Phone') . '</td>'; + echo '<tr> + <td>' . _('Phone') . '</td>'; if (isset($_POST['ContactPhone'])) { echo '<td><input type="text" name="ContactPhone" value="' . $_POST['ContactPhone'] . '" size="35" maxlength="40" /></td> </tr>'; Modified: trunk/AddCustomerTypeNotes.php =================================================================== --- trunk/AddCustomerTypeNotes.php 2012-02-15 16:52:21 UTC (rev 4911) +++ trunk/AddCustomerTypeNotes.php 2012-02-16 07:36:36 UTC (rev 4912) @@ -111,7 +111,8 @@ <th>' . _('Date') . '</th> <th>' . _('Note') . '</th> <th>' . _('href') . '</th> - <th>' . _('Priority') . '</th>'; + <th>' . _('Priority') . '</th> + </tr>'; $k=0; //row colour counter Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2012-02-15 16:52:21 UTC (rev 4911) +++ trunk/UpgradeDatabase.php 2012-02-16 07:36:36 UTC (rev 4912) @@ -133,9 +133,9 @@ $SQLScripts[] = './sql/mysql/upgrade4.05-4.06.sql'; case '4.06.6': $SQLScripts[] = './sql/mysql/upgrade4.06-4.07.sql'; - case '4.06.7': + case '4.07.0': $SQLScripts[] = './sql/mysql/upgrade4.07-4.08.sql'; - case '4.07.0': + case '4.08': break; } //end switch } Modified: trunk/index.php =================================================================== --- trunk/index.php 2012-02-15 16:52:21 UTC (rev 4911) +++ trunk/index.php 2012-02-16 07:36:36 UTC (rev 4912) @@ -8,7 +8,7 @@ /*The module link codes are hard coded in a switch statement below to determine the options to show for each tab */ include('includes/IndexArray.php'); -if (isset($SupplierLogin) and $SupplierLogin==1){ +if (isset($SupplierLogin) AND $SupplierLogin==1){ echo '<table class="table_index"> <tr> <td class="menu_group_item"> @@ -28,7 +28,7 @@ </table>'; include('includes/footer.inc'); exit; -} elseif (isset($SupplierLogin) and $SupplierLogin==0){ +} elseif (isset($SupplierLogin) AND $SupplierLogin==0){ echo '<table class="table_index"> <tr> <td class="menu_group_item"> @@ -72,9 +72,13 @@ $_SESSION['Module']=$ModuleLink[$i]; } if ($ModuleLink[$i] == $_SESSION['Module']){ - echo '<tr><td class="main_menu_selected"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></td></tr>'; + echo '<tr> + <td class="main_menu_selected"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></td> + </tr>'; } else { - echo '<tr><td class="main_menu_unselected"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></td></tr>'; + echo '<tr> + <td class="main_menu_unselected"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></td> + </tr>'; } } $i++; @@ -199,13 +203,13 @@ $Title= array(_('Custom Reports'), _('Standard Reports and Forms')); $sql= "SELECT id, - reporttype, - defaultreport, - groupname, - reportname - FROM reports - ORDER BY groupname, - reportname"; + reporttype, + defaultreport, + groupname, + reportname + FROM reports + ORDER BY groupname, + reportname"; $Result=DB_query($sql,$db,'','',false,true); $ReportList = ''; while ($Temp = DB_fetch_array($Result)) $ReportList[] = $Temp; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-02-16 07:36:45
|
Revision: 4912 http://web-erp.svn.sourceforge.net/web-erp/?rev=4912&view=rev Author: daintree Date: 2012-02-16 07:36:36 +0000 (Thu, 16 Feb 2012) Log Message: ----------- Modified Paths: -------------- trunk/AccountGroups.php trunk/AccountSections.php trunk/AddCustomerContacts.php trunk/AddCustomerTypeNotes.php trunk/UpgradeDatabase.php trunk/index.php Modified: trunk/AccountGroups.php =================================================================== --- trunk/AccountGroups.php 2012-02-15 16:52:21 UTC (rev 4911) +++ trunk/AccountGroups.php 2012-02-16 07:36:36 UTC (rev 4912) @@ -52,7 +52,8 @@ $i=1; $sql="SELECT count(groupname) - FROM accountgroups WHERE groupname='".$_POST['GroupName']."'"; + FROM accountgroups + WHERE groupname='".$_POST['GroupName']."'"; $DbgMsg = _('The SQL that was used to retrieve the information was'); $ErrMsg = _('Could not check whether the group exists because'); @@ -115,7 +116,7 @@ $Errors[$i] = 'SequenceInTB'; $i++; } - if (!ctype_digit($_POST['SequenceInTB']) or $_POST['SequenceInTB'] > 10000) { + if (!ctype_digit($_POST['SequenceInTB']) OR $_POST['SequenceInTB'] > 10000) { $InputError = 1; prnMsg( _('The sequence in the TB must be numeric and less than') . ' 10,000','error'); $Errors[$i] = 'SequenceInTB'; Modified: trunk/AccountSections.php =================================================================== --- trunk/AccountSections.php 2012-02-15 16:52:21 UTC (rev 4911) +++ trunk/AccountSections.php 2012-02-16 07:36:36 UTC (rev 4912) @@ -14,9 +14,8 @@ if( DB_num_rows($result) == 0 ) { $sql = "INSERT INTO accountsection (sectionid, - sectionname - ) VALUES ( - 1, + sectionname) + VALUES (1, 'Income')"; $result = DB_query($sql,$db); } @@ -26,9 +25,8 @@ if( DB_num_rows($result) == 0 ) { $sql = "INSERT INTO accountsection (sectionid, - sectionname - ) VALUES ( - 2, + sectionname) + VALUES (2, 'Cost Of Sales')"; $result = DB_query($sql,$db); } @@ -58,7 +56,7 @@ WHERE sectionid='".$_POST['SectionID']."'"; $result=DB_query($sql, $db); - if ((DB_num_rows($result)!=0 and !isset($_POST['SelectedSectionID']))) { + if ((DB_num_rows($result)!=0 AND !isset($_POST['SelectedSectionID']))) { $InputError = 1; prnMsg( _('The account section already exists in the database'),'error'); $Errors[$i] = 'SectionID'; @@ -77,20 +75,20 @@ $Errors[$i] = 'SectionName'; $i++; } - if (isset($_POST['SectionID']) and (!is_numeric($_POST['SectionID']))) { + if (isset($_POST['SectionID']) AND (!is_numeric($_POST['SectionID']))) { $InputError = 1; prnMsg( _('The section number must be an integer'),'error'); $Errors[$i] = 'SectionID'; $i++; } - if (isset($_POST['SectionID']) and mb_strpos($_POST['SectionID'],".")>0) { + if (isset($_POST['SectionID']) AND mb_strpos($_POST['SectionID'],".")>0) { $InputError = 1; prnMsg( _('The section number must be an integer'),'error'); $Errors[$i] = 'SectionID'; $i++; } - if (isset($_POST['SelectedSectionID']) and $_POST['SelectedSectionID']!='' AND $InputError !=1) { + if (isset($_POST['SelectedSectionID']) AND $_POST['SelectedSectionID']!='' AND $InputError !=1) { /*SelectedSectionID 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*/ @@ -149,7 +147,7 @@ unset ($_POST['SectionName']); } -if (!isset($_GET['SelectedSectionID']) and !isset($_POST['SelectedSectionID'])) { +if (!isset($_GET['SelectedSectionID']) AND !isset($_POST['SelectedSectionID'])) { /* An account section could be posted when one has been edited and is being updated or GOT when selected for modification Modified: trunk/AddCustomerContacts.php =================================================================== --- trunk/AddCustomerContacts.php 2012-02-15 16:52:21 UTC (rev 4911) +++ trunk/AddCustomerContacts.php 2012-02-16 07:36:36 UTC (rev 4912) @@ -34,7 +34,7 @@ ie the page has called itself with some user input */ //first off validate inputs sensible - if (isset($_POST['Con_ID']) and !is_long((integer)$_POST['Con_ID'])) { + if (isset($_POST['Con_ID']) AND !is_long((integer)$_POST['Con_ID'])) { $InputError = 1; prnMsg( _('The Contact ID must be an integer.'), 'error'); } elseif (mb_strlen($_POST['ContactName']) >40) { @@ -43,12 +43,12 @@ } elseif( trim($_POST['ContactName']) == '' ) { $InputError = 1; prnMsg( _('The contact name may not be empty'), 'error'); - } elseif (!IsEmailAddress($_POST['ContactEmail']) and mb_strlen($_POST['ContactEmail'])>0){ + } elseif (!IsEmailAddress($_POST['ContactEmail']) AND mb_strlen($_POST['ContactEmail'])>0){ $InputError = 1; prnMsg( _('The contact email address is not a valid email address'), 'error'); } - if (isset($Id) and ($Id and $InputError !=1)) { + if (isset($Id) AND ($Id AND $InputError !=1)) { $sql = "UPDATE custcontacts SET contactname='" . $_POST['ContactName'] . "', role='" . $_POST['ContactRole'] . "', phoneno='" . $_POST['ContactPhone'] . "', @@ -89,7 +89,7 @@ unset($_POST['ContactEmail']); unset($_POST['Con_ID']); } -} elseif (isset($_GET['delete']) and $_GET['delete']) { +} elseif (isset($_GET['delete']) AND $_GET['delete']) { //the link to delete a selected record was clicked instead of the submit button // PREVENT DELETES IF DEPENDENT RECORDS IN 'SalesOrders' @@ -127,7 +127,8 @@ <th>' . _('Role') . '</th> <th>' . _('Phone no') . '</th> <th>' . _('Email') . '</th> - <th>' . _('Notes') . '</th>'; + <th>' . _('Notes') . '</th> + </tr>'; $k=0; //row colour counter @@ -208,7 +209,8 @@ echo '<table class="selection">'; } - echo '<tr><td>'. _('Contact Name') . '</td>'; + echo '<tr> + <td>'. _('Contact Name') . '</td>'; if (isset($_POST['ContactName'])) { echo '<td><input type="text" name="ContactName" value="' . $_POST['ContactName']. '" size="35" maxlength="40" /></td> </tr>'; @@ -225,7 +227,8 @@ echo '<td><input type="text" name="ContactRole" size="35" maxlength="40" /></td> </tr>'; } - echo '<tr><td>' . _('Phone') . '</td>'; + echo '<tr> + <td>' . _('Phone') . '</td>'; if (isset($_POST['ContactPhone'])) { echo '<td><input type="text" name="ContactPhone" value="' . $_POST['ContactPhone'] . '" size="35" maxlength="40" /></td> </tr>'; Modified: trunk/AddCustomerTypeNotes.php =================================================================== --- trunk/AddCustomerTypeNotes.php 2012-02-15 16:52:21 UTC (rev 4911) +++ trunk/AddCustomerTypeNotes.php 2012-02-16 07:36:36 UTC (rev 4912) @@ -111,7 +111,8 @@ <th>' . _('Date') . '</th> <th>' . _('Note') . '</th> <th>' . _('href') . '</th> - <th>' . _('Priority') . '</th>'; + <th>' . _('Priority') . '</th> + </tr>'; $k=0; //row colour counter Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2012-02-15 16:52:21 UTC (rev 4911) +++ trunk/UpgradeDatabase.php 2012-02-16 07:36:36 UTC (rev 4912) @@ -133,9 +133,9 @@ $SQLScripts[] = './sql/mysql/upgrade4.05-4.06.sql'; case '4.06.6': $SQLScripts[] = './sql/mysql/upgrade4.06-4.07.sql'; - case '4.06.7': + case '4.07.0': $SQLScripts[] = './sql/mysql/upgrade4.07-4.08.sql'; - case '4.07.0': + case '4.08': break; } //end switch } Modified: trunk/index.php =================================================================== --- trunk/index.php 2012-02-15 16:52:21 UTC (rev 4911) +++ trunk/index.php 2012-02-16 07:36:36 UTC (rev 4912) @@ -8,7 +8,7 @@ /*The module link codes are hard coded in a switch statement below to determine the options to show for each tab */ include('includes/IndexArray.php'); -if (isset($SupplierLogin) and $SupplierLogin==1){ +if (isset($SupplierLogin) AND $SupplierLogin==1){ echo '<table class="table_index"> <tr> <td class="menu_group_item"> @@ -28,7 +28,7 @@ </table>'; include('includes/footer.inc'); exit; -} elseif (isset($SupplierLogin) and $SupplierLogin==0){ +} elseif (isset($SupplierLogin) AND $SupplierLogin==0){ echo '<table class="table_index"> <tr> <td class="menu_group_item"> @@ -72,9 +72,13 @@ $_SESSION['Module']=$ModuleLink[$i]; } if ($ModuleLink[$i] == $_SESSION['Module']){ - echo '<tr><td class="main_menu_selected"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></td></tr>'; + echo '<tr> + <td class="main_menu_selected"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></td> + </tr>'; } else { - echo '<tr><td class="main_menu_unselected"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></td></tr>'; + echo '<tr> + <td class="main_menu_unselected"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></td> + </tr>'; } } $i++; @@ -199,13 +203,13 @@ $Title= array(_('Custom Reports'), _('Standard Reports and Forms')); $sql= "SELECT id, - reporttype, - defaultreport, - groupname, - reportname - FROM reports - ORDER BY groupname, - reportname"; + reporttype, + defaultreport, + groupname, + reportname + FROM reports + ORDER BY groupname, + reportname"; $Result=DB_query($sql,$db,'','',false,true); $ReportList = ''; while ($Temp = DB_fetch_array($Result)) $ReportList[] = $Temp; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-02-17 10:34:19
|
Revision: 4919 http://web-erp.svn.sourceforge.net/web-erp/?rev=4919&view=rev Author: daintree Date: 2012-02-17 10:34:08 +0000 (Fri, 17 Feb 2012) Log Message: ----------- bug fix Modified Paths: -------------- trunk/AccountGroups.php trunk/AddCustomerNotes.php trunk/AgedDebtors.php trunk/AgedSuppliers.php trunk/Areas.php trunk/SuppCreditGRNs.php trunk/SuppInvGRNs.php trunk/SupplierInvoice.php trunk/doc/Change.log trunk/includes/DefineSuppTransClass.php Modified: trunk/AccountGroups.php =================================================================== --- trunk/AccountGroups.php 2012-02-17 03:32:32 UTC (rev 4918) +++ trunk/AccountGroups.php 2012-02-17 10:34:08 UTC (rev 4919) @@ -61,7 +61,7 @@ $result=DB_query($sql, $db,$ErrMsg,$DbgMsg); $myrow=DB_fetch_row($result); - if ($myrow[0]!=0 and $_POST['SelectedAccountGroup']=='') { + if ($myrow[0]!=0 AND $_POST['SelectedAccountGroup']=='') { $InputError = 1; prnMsg( _('The account group name already exists in the database'),'error'); $Errors[$i] = 'GroupName'; @@ -201,7 +201,7 @@ } -if (!isset($_GET['SelectedAccountGroup']) and !isset($_POST['SelectedAccountGroup'])) { +if (!isset($_GET['SelectedAccountGroup']) AND !isset($_POST['SelectedAccountGroup'])) { /* An account group could be posted when one has been edited and is being updated or GOT when selected for modification SelectedAccountGroup will exist because it was sent with the page in a GET . @@ -359,7 +359,7 @@ while ( $grouprow = DB_fetch_array($groupresult) ) { - if (isset($_POST['ParentGroupName']) and $_POST['ParentGroupName']==$grouprow['groupname']) { + if (isset($_POST['ParentGroupName']) AND $_POST['ParentGroupName']==$grouprow['groupname']) { echo '<option selected="selected" value="'.htmlentities($grouprow['groupname'], ENT_QUOTES,'UTF-8').'">' .htmlentities($grouprow['groupname'], ENT_QUOTES,'UTF-8').'</option>'; } else { echo '<option value="'.htmlentities($grouprow['groupname'], ENT_QUOTES,'UTF-8').'">' .htmlentities($grouprow['groupname'], ENT_QUOTES,'UTF-8').'</option>'; Modified: trunk/AddCustomerNotes.php =================================================================== --- trunk/AddCustomerNotes.php 2012-02-17 03:32:32 UTC (rev 4918) +++ trunk/AddCustomerNotes.php 2012-02-17 10:34:08 UTC (rev 4919) @@ -29,23 +29,23 @@ ie the page has called itself with some user input */ //first off validate inputs sensible - if (!is_long((integer)$_POST['priority'])) { + if (!is_long((integer)$_POST['Priority'])) { $InputError = 1; prnMsg( _('The contact priority must be an integer.'), 'error'); - } elseif (mb_strlen($_POST['note']) >200) { + } elseif (mb_strlen($_POST['Note']) >200) { $InputError = 1; prnMsg( _('The contact\'s notes must be two hundred characters or less long'), 'error'); - } elseif( trim($_POST['note']) == '' ) { + } elseif( trim($_POST['Note']) == '' ) { $InputError = 1; prnMsg( _('The contact\'s notes may not be empty'), 'error'); } if (isset($Id) and $InputError !=1) { - $sql = "UPDATE custnotes SET note='" . $_POST['note'] . "', + $sql = "UPDATE custnotes SET note='" . $_POST['Note'] . "', date='" . FormatDateForSQL($_POST['date']) . "', - href='" . $_POST['href'] . "', - priority='" . $_POST['priority'] . "' + href='" . $_POST['Href'] . "', + priority='" . $_POST['Priority'] . "' WHERE debtorno ='".$DebtorNo."' AND noteid='".$Id."'"; $msg = _('Customer Notes') . ' ' . $DebtorNo . ' ' . _('has been updated'); @@ -57,10 +57,10 @@ date, priority) VALUES ('" . $DebtorNo. "', - '" . $_POST['href'] . "', - '" . $_POST['note'] . "', + '" . $_POST['Href'] . "', + '" . $_POST['Note'] . "', '" . FormatDateForSQL($_POST['date']) . "', - '" . $_POST['priority'] . "')"; + '" . $_POST['Priority'] . "')"; $msg = _('The contact notes record has been added'); } @@ -71,11 +71,11 @@ echo '<br />'; prnMsg($msg, 'success'); unset($Id); - unset($_POST['note']); - unset($_POST['noteid']); + unset($_POST['Note']); + unset($_POST['Noteid']); unset($_POST['date']); - unset($_POST['href']); - unset($_POST['priority']); + unset($_POST['Href']); + unset($_POST['Priority']); } } elseif (isset($_GET['delete'])) { //the link to delete a selected record was clicked instead of the submit button @@ -181,19 +181,19 @@ $myrow = DB_fetch_array($result); - $_POST['noteid'] = $myrow['noteid']; - $_POST['note'] = $myrow['note']; - $_POST['href'] = $myrow['href']; + $_POST['Noteid'] = $myrow['noteid']; + $_POST['Note'] = $myrow['note']; + $_POST['Href'] = $myrow['href']; $_POST['date'] = $myrow['date']; - $_POST['priority'] = $myrow['priority']; + $_POST['Priority'] = $myrow['priority']; $_POST['debtorno'] = $myrow['debtorno']; echo '<input type="hidden" name="Id" value="'. $Id .'" />'; - echo '<input type="hidden" name="Con_ID" value="' . $_POST['noteid'] . '" />'; + echo '<input type="hidden" name="Con_ID" value="' . $_POST['Noteid'] . '" />'; echo '<input type="hidden" name="DebtorNo" value="' . $_POST['debtorno'] . '" />'; echo '<table class="selection"> <tr> <td>'. _('Note ID').':</td> - <td>' . $_POST['noteid'] . '</td> + <td>' . $_POST['Noteid'] . '</td> </tr>'; } else { echo '<table class="selection">'; @@ -201,20 +201,20 @@ echo '<tr> <td>' . _('Contact Note'). '</td>'; - if (isset($_POST['note'])) { - echo '<td><textarea name="note">' .$_POST['note'] . '</textarea></td> + if (isset($_POST['Note'])) { + echo '<td><textarea name="Note">' .$_POST['Note'] . '</textarea></td> </tr>'; } else { - echo '<td><textarea name="note"></textarea></td> + 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> + 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> + echo '<td><input type="text" name="Href" size="35" maxlength="100" /></td> </tr>'; } echo '<tr> @@ -228,11 +228,11 @@ } echo '<tr> <td>'. _('Priority'). '</td>'; - if (isset($_POST['priority'])) { - echo '<td><input type="text" name="priority" value="' .$_POST['priority']. '" size="1" maxlength="3" /></td> + if (isset($_POST['Priority'])) { + echo '<td><input type="text" name="Priority" value="' .$_POST['Priority']. '" size="1" maxlength="3" /></td> </tr>'; } else { - echo '<td><input type="text" name="priority" size="1" maxlength="3" /></td> + echo '<td><input type="text" name="Priority" size="1" maxlength="3" /></td> </tr>'; } echo '<tr> Modified: trunk/AgedDebtors.php =================================================================== --- trunk/AgedDebtors.php 2012-02-17 03:32:32 UTC (rev 4918) +++ trunk/AgedDebtors.php 2012-02-17 10:34:08 UTC (rev 4919) @@ -186,82 +186,80 @@ debtorsmaster.creditlimit, holdreasons.dissallowinvoices, holdreasons.reasondescription, - SUM(debtortrans.ovamount + - debtortrans.ovgst + - debtortrans.ovfreight + - debtortrans.ovdiscount - - debtortrans.alloc) AS balance, - SUM( - CASE WHEN (paymentterms.daysbeforedue > 0) - THEN - CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= paymentterms.daysbeforedue - THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc - ELSE 0 END - ELSE - CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate," . INTERVAL('1', 'MONTH') . ")," . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))', 'DAY') . ")) >= 0) - THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc - ELSE 0 END - END - ) AS due, - SUM( - CASE WHEN (paymentterms.daysbeforedue > 0) - THEN - CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) > paymentterms.daysbeforedue - AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays1'] . ") - THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END - ELSE - CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, " . INTERVAL('1', 'MONTH') . "), " . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))', 'DAY') . ")) >= " . $_SESSION['PastDueDays1'] . ") - THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc - ELSE 0 END - END - ) AS overdue1, - SUM( - CASE WHEN (paymentterms.daysbeforedue > 0) - THEN - CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) > paymentterms.daysbeforedue - AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays2'] . ") - THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc - ELSE 0 END - ELSE - CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, " . INTERVAL('1', 'MONTH') . "), " . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))', 'DAY') . ")) >= ".$_SESSION['PastDueDays2'] . ") - THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc - ELSE 0 END - END - ) AS overdue2 - FROM debtorsmaster, - paymentterms, - holdreasons, - currencies, - debtortrans - WHERE debtorsmaster.paymentterms = paymentterms.termsindicator - AND debtorsmaster.currcode = currencies.currabrev - AND debtorsmaster.holdreason = holdreasons.reasoncode - AND debtorsmaster.debtorno = debtortrans.debtorno - AND holdreasons.dissallowinvoices=1 - AND debtorsmaster.debtorno >= '" . $_POST['FromCriteria'] . "' - AND debtorsmaster.debtorno <= '" . $_POST['ToCriteria'] . "' - AND debtorsmaster.currcode ='" . $_POST['Currency'] . "' - " . $SalesLimit . " - GROUP BY debtorsmaster.debtorno, - debtorsmaster.name, - currencies.currency, - paymentterms.terms, - paymentterms.daysbeforedue, - paymentterms.dayinfollowingmonth, - debtorsmaster.creditlimit, - holdreasons.dissallowinvoices, - holdreasons.reasondescription - HAVING ABS(SUM( - debtortrans.ovamount + - debtortrans.ovgst + - debtortrans.ovfreight + - debtortrans.ovdiscount - - debtortrans.alloc)) >0.005"; + SUM(debtortrans.ovamount + + debtortrans.ovgst + + debtortrans.ovfreight + + debtortrans.ovdiscount - + debtortrans.alloc) AS balance, + SUM( + CASE WHEN (paymentterms.daysbeforedue > 0) + THEN + CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= paymentterms.daysbeforedue + THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc + ELSE 0 END + ELSE + CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate," . INTERVAL('1', 'MONTH') . ")," . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))', 'DAY') . ")) >= 0) + THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc + ELSE 0 END + END + ) AS due, + SUM( + CASE WHEN (paymentterms.daysbeforedue > 0) + THEN + CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) > paymentterms.daysbeforedue + AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays1'] . ") + THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END + ELSE + CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, " . INTERVAL('1', 'MONTH') . "), " . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))', 'DAY') . ")) >= " . $_SESSION['PastDueDays1'] . ") + THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc + ELSE 0 END + END + ) AS overdue1, + SUM( + CASE WHEN (paymentterms.daysbeforedue > 0) + THEN + CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) > paymentterms.daysbeforedue + AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays2'] . ") + THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc + ELSE 0 END + ELSE + CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, " . INTERVAL('1', 'MONTH') . "), " . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))', 'DAY') . ")) >= ".$_SESSION['PastDueDays2'] . ") + THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc + ELSE 0 END + END + ) AS overdue2 + FROM debtorsmaster, + paymentterms, + holdreasons, + currencies, + debtortrans + WHERE debtorsmaster.paymentterms = paymentterms.termsindicator + AND debtorsmaster.currcode = currencies.currabrev + AND debtorsmaster.holdreason = holdreasons.reasoncode + AND debtorsmaster.debtorno = debtortrans.debtorno + AND holdreasons.dissallowinvoices=1 + AND debtorsmaster.debtorno >= '" . $_POST['FromCriteria'] . "' + AND debtorsmaster.debtorno <= '" . $_POST['ToCriteria'] . "' + AND debtorsmaster.currcode ='" . $_POST['Currency'] . "' + " . $SalesLimit . " + GROUP BY debtorsmaster.debtorno, + debtorsmaster.name, + currencies.currency, + paymentterms.terms, + paymentterms.daysbeforedue, + paymentterms.dayinfollowingmonth, + debtorsmaster.creditlimit, + holdreasons.dissallowinvoices, + holdreasons.reasondescription + HAVING ABS(SUM( + debtortrans.ovamount + + debtortrans.ovgst + + debtortrans.ovfreight + + debtortrans.ovdiscount - + debtortrans.alloc)) >0.005"; } $CustomerResult = DB_query($SQL,$db,'','',False,False); /*dont trap errors handled below*/ - //$ListCount = count ($CustomerResult); // Javier - if (DB_error_no($db) !=0) { $title = _('Aged Customer Account Analysis') . ' - ' . _('Problem Report') . '.... '; include('includes/header.inc'); Modified: trunk/AgedSuppliers.php =================================================================== --- trunk/AgedSuppliers.php 2012-02-17 03:32:32 UTC (rev 4918) +++ trunk/AgedSuppliers.php 2012-02-17 10:34:08 UTC (rev 4919) @@ -81,24 +81,24 @@ ELSE CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(supptrans.trandate, " . INTERVAL('1', 'MONTH') . "), " . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(supptrans.trandate))', 'DAY') . ")) >= " . $_SESSION['PastDueDays2'] . ") THEN supptrans.ovamount + supptrans.ovgst - supptrans.alloc ELSE 0 END END) AS overdue2 - FROM suppliers INNER JOIN paymentterms - ON suppliers.paymentterms = paymentterms.termsindicator - INNER JOIN currencies - ON suppliers.currcode = currencies.currabrev - INNER JOIN supptrans - ON suppliers.supplierid = supptrans.supplierno - WHERE suppliers.supplierid >= '" . $_POST['FromCriteria'] . "' - AND suppliers.supplierid <= '" . $_POST['ToCriteria'] . "' - AND suppliers.currcode ='" . $_POST['Currency'] . "' - GROUP BY suppliers.supplierid, - suppliers.suppname, - currencies.currency, - paymentterms.terms, - paymentterms.daysbeforedue, - paymentterms.dayinfollowingmonth - HAVING SUM(IF (paymentterms.daysbeforedue > 0, - CASE WHEN TO_DAYS(Now()) - TO_DAYS(supptrans.trandate) > paymentterms.daysbeforedue AND TO_DAYS(Now()) - TO_DAYS(supptrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays1'] . ") THEN supptrans.ovamount + supptrans.ovgst - supptrans.alloc ELSE 0 END, - CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(supptrans.trandate, " . INTERVAL('1', 'MONTH') . "), " . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(supptrans.trandate))', 'DAY') . ")) >= " . $_SESSION['PastDueDays1'] . ") THEN supptrans.ovamount + supptrans.ovgst - supptrans.alloc ELSE 0 END)) > 0"; + FROM suppliers INNER JOIN paymentterms + ON suppliers.paymentterms = paymentterms.termsindicator + INNER JOIN currencies + ON suppliers.currcode = currencies.currabrev + INNER JOIN supptrans + ON suppliers.supplierid = supptrans.supplierno + WHERE suppliers.supplierid >= '" . $_POST['FromCriteria'] . "' + AND suppliers.supplierid <= '" . $_POST['ToCriteria'] . "' + AND suppliers.currcode ='" . $_POST['Currency'] . "' + GROUP BY suppliers.supplierid, + suppliers.suppname, + currencies.currency, + paymentterms.terms, + paymentterms.daysbeforedue, + paymentterms.dayinfollowingmonth + HAVING SUM(IF (paymentterms.daysbeforedue > 0, + CASE WHEN TO_DAYS(Now()) - TO_DAYS(supptrans.trandate) > paymentterms.daysbeforedue AND TO_DAYS(Now()) - TO_DAYS(supptrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays1'] . ") THEN supptrans.ovamount + supptrans.ovgst - supptrans.alloc ELSE 0 END, + CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(supptrans.trandate, " . INTERVAL('1', 'MONTH') . "), " . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(supptrans.trandate))', 'DAY') . ")) >= " . $_SESSION['PastDueDays1'] . ") THEN supptrans.ovamount + supptrans.ovgst - supptrans.alloc ELSE 0 END)) > 0"; } Modified: trunk/Areas.php =================================================================== --- trunk/Areas.php 2012-02-17 03:32:32 UTC (rev 4918) +++ trunk/Areas.php 2012-02-17 10:34:08 UTC (rev 4919) @@ -39,7 +39,7 @@ prnMsg(_('The area code must be three characters or less long'),'error'); $Errors[$i] = 'AreaCode'; $i++; - } elseif (DB_num_rows($result)>0 and !isset($SelectedArea)){ + } elseif (DB_num_rows($result)>0 AND !isset($SelectedArea)){ $InputError = 1; prnMsg(_('The area code entered already exists'),'error'); $Errors[$i] = 'AreaCode'; Modified: trunk/SuppCreditGRNs.php =================================================================== --- trunk/SuppCreditGRNs.php 2012-02-17 03:32:32 UTC (rev 4918) +++ trunk/SuppCreditGRNs.php 2012-02-17 10:34:08 UTC (rev 4919) @@ -51,6 +51,7 @@ } if ($InputError==False){ + $_SESSION['SuppTrans']->Add_GRN_To_Trans($_POST['GRNNumber'], $_POST['PODetailItem'], $_POST['ItemCode'], @@ -67,7 +68,9 @@ $_POST['GLCode'], $_POST['PONo'], $_POST['AssetID'], - $_POST['DecimalPlaces']); + 0, + $_POST['DecimalPlaces'], + $_POST['GRNBatchNo']); } } @@ -236,6 +239,7 @@ if (isset($_POST['GRNNo']) AND $_POST['GRNNo']!=''){ $SQL = "SELECT grnno, + grns.grnbatch, grns.podetailitem, purchorderdetails.orderno, purchorderdetails.unitprice, @@ -320,6 +324,7 @@ echo '<input type="hidden" name="PONo" value="' . $myrow['orderno'] . '" />'; echo '<input type="hidden" name="AssetID" value="' . $myrow['assetid'] . '" />'; echo '<input type="hidden" name="DecimalPlaces" value="' . $myrow['decimalplaces'] . '" />'; + echo '<input type="hidden" name="GRNBatchNo" value="' . $myrow['grnbatch'] . '" />'; } } //end if there were GRNs to select echo '</form>'; Modified: trunk/SuppInvGRNs.php =================================================================== --- trunk/SuppInvGRNs.php 2012-02-17 03:32:32 UTC (rev 4918) +++ trunk/SuppInvGRNs.php 2012-02-17 10:34:08 UTC (rev 4919) @@ -236,7 +236,9 @@ $myrow['glcode'], $myrow['orderno'], $myrow['assetid'], - $myrow['decimalplaces']); + 0, + $myrow['decimalplaces'], + $myrow['grnbatch']); } } } Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2012-02-17 03:32:32 UTC (rev 4918) +++ trunk/SupplierInvoice.php 2012-02-17 10:34:08 UTC (rev 4919) @@ -1211,12 +1211,13 @@ /* First update the stockmoves delivery cost */ $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The stock movement record for the delivery could not have the cost updated to the actual cost'); - $result = DB_query("UPDATE stockmoves SET price = '" . $ActualCost . "' + $SQL = "UPDATE stockmoves SET price = '" . $ActualCost . "' WHERE stockid='" .$EnteredGRN->ItemCode . "' AND type=25 AND loccode='" . $LocCode . "' - AND transno='" . $EnteredGRN->GRNNo . "'", - $db,$ErrMsg,$DbgMsg,True); + AND transno='" . $EnteredGRN->GRNBatchNo . "'"; + + $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,True); if ($_SESSION['WeightedAverageCosting']==1){ /* Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-02-17 03:32:32 UTC (rev 4918) +++ trunk/doc/Change.log 2012-02-17 10:34:08 UTC (rev 4919) @@ -1,5 +1,10 @@ webERP Change Log +17/2/12 Phil: SuppCreditGRNs.php SuppInvGRNs.php DefineSuppTransClass.php SupplierInvoice.php stock movement was not being updated correctly with cost on purchase invoice entry as was using GRNNo not GRNBatchNo - which is used as the GRN transaction number in stock movements. +16/2/12 Tim: Modified index.php to use arrays of links rather than hard code all menus +16/2/12 Exson: Fixed StockAdjustments.php was not producing gltrans entries when stock code entered directly + + Release 4.07 11/2/12 Phil: Fix Prices.php for end dates when a new price with no end date is inserted with a start date in the future. Modified: trunk/includes/DefineSuppTransClass.php =================================================================== --- trunk/includes/DefineSuppTransClass.php 2012-02-17 03:32:32 UTC (rev 4918) +++ trunk/includes/DefineSuppTransClass.php 2012-02-17 10:34:08 UTC (rev 4919) @@ -100,7 +100,9 @@ $GLCode, $PONo, $AssetID=0, - $DecimalPlaces=2){ + $Hold=0, + $DecimalPlaces=2, + $GRNBatchNo){ if ($This_QuantityInv!=0 AND isset($This_QuantityInv)){ $this->GRNs[$GRNNo] = new GRNs($GRNNo, @@ -119,7 +121,9 @@ $GLCode, $PONo, $AssetID, - $DecimalPlaces); + $Hold, + $DecimalPlaces, + $GRNBatchNo); Return 1; } Return 0; @@ -181,7 +185,8 @@ $GRNSrc->PONo, $GRNSrc->AssetID, $GRNSrc->Hold, - $GRNSrc->DecimalPlaces); + $GRNSrc->DecimalPlaces, + $GRNSrc->GRNBatchNo); Return 1; } Return 0; @@ -317,6 +322,7 @@ var $Hold; var $AssetID; var $DecimalPlaces; + var $GRNBatchNo; function GRNs ($GRNNo, $PODetailItem, @@ -335,9 +341,11 @@ $PONo, $AssetID, $Hold=0, - $DecimalPlaces=2){ + $DecimalPlaces=2, + $GRNBatchNo){ + /* Constructor function to add a new GRNs object with passed params */ $this->GRNNo = $GRNNo; $this->PODetailItem = $PODetailItem; @@ -357,22 +365,23 @@ $this->AssetID = $AssetID; $this->Hold = $Hold; $this->DecimalPlaces = $DecimalPlaces; + $this->GRNBatchNo = $GRNBatchNo; } function Modify ($PODetailItem, - $ItemCode, - $ItemDescription, - $QtyRecd, - $Prev_QuantityInv, - $This_QuantityInv, - $OrderPrice, - $ChgPrice, - $Complete, - $StdCostUnit, - $ShiptRef, - $JobRef, - $GLCode, - $Hold){ + $ItemCode, + $ItemDescription, + $QtyRecd, + $Prev_QuantityInv, + $This_QuantityInv, + $OrderPrice, + $ChgPrice, + $Complete, + $StdCostUnit, + $ShiptRef, + $JobRef, + $GLCode, + $Hold){ /* Modify function to edit a GRNs object with passed params */ $this->PODetailItem = $PODetailItem; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-02-17 10:34:20
|
Revision: 4919 http://web-erp.svn.sourceforge.net/web-erp/?rev=4919&view=rev Author: daintree Date: 2012-02-17 10:34:08 +0000 (Fri, 17 Feb 2012) Log Message: ----------- bug fix Modified Paths: -------------- trunk/AccountGroups.php trunk/AddCustomerNotes.php trunk/AgedDebtors.php trunk/AgedSuppliers.php trunk/Areas.php trunk/SuppCreditGRNs.php trunk/SuppInvGRNs.php trunk/SupplierInvoice.php trunk/doc/Change.log trunk/includes/DefineSuppTransClass.php Modified: trunk/AccountGroups.php =================================================================== --- trunk/AccountGroups.php 2012-02-17 03:32:32 UTC (rev 4918) +++ trunk/AccountGroups.php 2012-02-17 10:34:08 UTC (rev 4919) @@ -61,7 +61,7 @@ $result=DB_query($sql, $db,$ErrMsg,$DbgMsg); $myrow=DB_fetch_row($result); - if ($myrow[0]!=0 and $_POST['SelectedAccountGroup']=='') { + if ($myrow[0]!=0 AND $_POST['SelectedAccountGroup']=='') { $InputError = 1; prnMsg( _('The account group name already exists in the database'),'error'); $Errors[$i] = 'GroupName'; @@ -201,7 +201,7 @@ } -if (!isset($_GET['SelectedAccountGroup']) and !isset($_POST['SelectedAccountGroup'])) { +if (!isset($_GET['SelectedAccountGroup']) AND !isset($_POST['SelectedAccountGroup'])) { /* An account group could be posted when one has been edited and is being updated or GOT when selected for modification SelectedAccountGroup will exist because it was sent with the page in a GET . @@ -359,7 +359,7 @@ while ( $grouprow = DB_fetch_array($groupresult) ) { - if (isset($_POST['ParentGroupName']) and $_POST['ParentGroupName']==$grouprow['groupname']) { + if (isset($_POST['ParentGroupName']) AND $_POST['ParentGroupName']==$grouprow['groupname']) { echo '<option selected="selected" value="'.htmlentities($grouprow['groupname'], ENT_QUOTES,'UTF-8').'">' .htmlentities($grouprow['groupname'], ENT_QUOTES,'UTF-8').'</option>'; } else { echo '<option value="'.htmlentities($grouprow['groupname'], ENT_QUOTES,'UTF-8').'">' .htmlentities($grouprow['groupname'], ENT_QUOTES,'UTF-8').'</option>'; Modified: trunk/AddCustomerNotes.php =================================================================== --- trunk/AddCustomerNotes.php 2012-02-17 03:32:32 UTC (rev 4918) +++ trunk/AddCustomerNotes.php 2012-02-17 10:34:08 UTC (rev 4919) @@ -29,23 +29,23 @@ ie the page has called itself with some user input */ //first off validate inputs sensible - if (!is_long((integer)$_POST['priority'])) { + if (!is_long((integer)$_POST['Priority'])) { $InputError = 1; prnMsg( _('The contact priority must be an integer.'), 'error'); - } elseif (mb_strlen($_POST['note']) >200) { + } elseif (mb_strlen($_POST['Note']) >200) { $InputError = 1; prnMsg( _('The contact\'s notes must be two hundred characters or less long'), 'error'); - } elseif( trim($_POST['note']) == '' ) { + } elseif( trim($_POST['Note']) == '' ) { $InputError = 1; prnMsg( _('The contact\'s notes may not be empty'), 'error'); } if (isset($Id) and $InputError !=1) { - $sql = "UPDATE custnotes SET note='" . $_POST['note'] . "', + $sql = "UPDATE custnotes SET note='" . $_POST['Note'] . "', date='" . FormatDateForSQL($_POST['date']) . "', - href='" . $_POST['href'] . "', - priority='" . $_POST['priority'] . "' + href='" . $_POST['Href'] . "', + priority='" . $_POST['Priority'] . "' WHERE debtorno ='".$DebtorNo."' AND noteid='".$Id."'"; $msg = _('Customer Notes') . ' ' . $DebtorNo . ' ' . _('has been updated'); @@ -57,10 +57,10 @@ date, priority) VALUES ('" . $DebtorNo. "', - '" . $_POST['href'] . "', - '" . $_POST['note'] . "', + '" . $_POST['Href'] . "', + '" . $_POST['Note'] . "', '" . FormatDateForSQL($_POST['date']) . "', - '" . $_POST['priority'] . "')"; + '" . $_POST['Priority'] . "')"; $msg = _('The contact notes record has been added'); } @@ -71,11 +71,11 @@ echo '<br />'; prnMsg($msg, 'success'); unset($Id); - unset($_POST['note']); - unset($_POST['noteid']); + unset($_POST['Note']); + unset($_POST['Noteid']); unset($_POST['date']); - unset($_POST['href']); - unset($_POST['priority']); + unset($_POST['Href']); + unset($_POST['Priority']); } } elseif (isset($_GET['delete'])) { //the link to delete a selected record was clicked instead of the submit button @@ -181,19 +181,19 @@ $myrow = DB_fetch_array($result); - $_POST['noteid'] = $myrow['noteid']; - $_POST['note'] = $myrow['note']; - $_POST['href'] = $myrow['href']; + $_POST['Noteid'] = $myrow['noteid']; + $_POST['Note'] = $myrow['note']; + $_POST['Href'] = $myrow['href']; $_POST['date'] = $myrow['date']; - $_POST['priority'] = $myrow['priority']; + $_POST['Priority'] = $myrow['priority']; $_POST['debtorno'] = $myrow['debtorno']; echo '<input type="hidden" name="Id" value="'. $Id .'" />'; - echo '<input type="hidden" name="Con_ID" value="' . $_POST['noteid'] . '" />'; + echo '<input type="hidden" name="Con_ID" value="' . $_POST['Noteid'] . '" />'; echo '<input type="hidden" name="DebtorNo" value="' . $_POST['debtorno'] . '" />'; echo '<table class="selection"> <tr> <td>'. _('Note ID').':</td> - <td>' . $_POST['noteid'] . '</td> + <td>' . $_POST['Noteid'] . '</td> </tr>'; } else { echo '<table class="selection">'; @@ -201,20 +201,20 @@ echo '<tr> <td>' . _('Contact Note'). '</td>'; - if (isset($_POST['note'])) { - echo '<td><textarea name="note">' .$_POST['note'] . '</textarea></td> + if (isset($_POST['Note'])) { + echo '<td><textarea name="Note">' .$_POST['Note'] . '</textarea></td> </tr>'; } else { - echo '<td><textarea name="note"></textarea></td> + 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> + 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> + echo '<td><input type="text" name="Href" size="35" maxlength="100" /></td> </tr>'; } echo '<tr> @@ -228,11 +228,11 @@ } echo '<tr> <td>'. _('Priority'). '</td>'; - if (isset($_POST['priority'])) { - echo '<td><input type="text" name="priority" value="' .$_POST['priority']. '" size="1" maxlength="3" /></td> + if (isset($_POST['Priority'])) { + echo '<td><input type="text" name="Priority" value="' .$_POST['Priority']. '" size="1" maxlength="3" /></td> </tr>'; } else { - echo '<td><input type="text" name="priority" size="1" maxlength="3" /></td> + echo '<td><input type="text" name="Priority" size="1" maxlength="3" /></td> </tr>'; } echo '<tr> Modified: trunk/AgedDebtors.php =================================================================== --- trunk/AgedDebtors.php 2012-02-17 03:32:32 UTC (rev 4918) +++ trunk/AgedDebtors.php 2012-02-17 10:34:08 UTC (rev 4919) @@ -186,82 +186,80 @@ debtorsmaster.creditlimit, holdreasons.dissallowinvoices, holdreasons.reasondescription, - SUM(debtortrans.ovamount + - debtortrans.ovgst + - debtortrans.ovfreight + - debtortrans.ovdiscount - - debtortrans.alloc) AS balance, - SUM( - CASE WHEN (paymentterms.daysbeforedue > 0) - THEN - CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= paymentterms.daysbeforedue - THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc - ELSE 0 END - ELSE - CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate," . INTERVAL('1', 'MONTH') . ")," . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))', 'DAY') . ")) >= 0) - THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc - ELSE 0 END - END - ) AS due, - SUM( - CASE WHEN (paymentterms.daysbeforedue > 0) - THEN - CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) > paymentterms.daysbeforedue - AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays1'] . ") - THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END - ELSE - CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, " . INTERVAL('1', 'MONTH') . "), " . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))', 'DAY') . ")) >= " . $_SESSION['PastDueDays1'] . ") - THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc - ELSE 0 END - END - ) AS overdue1, - SUM( - CASE WHEN (paymentterms.daysbeforedue > 0) - THEN - CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) > paymentterms.daysbeforedue - AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays2'] . ") - THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc - ELSE 0 END - ELSE - CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, " . INTERVAL('1', 'MONTH') . "), " . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))', 'DAY') . ")) >= ".$_SESSION['PastDueDays2'] . ") - THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc - ELSE 0 END - END - ) AS overdue2 - FROM debtorsmaster, - paymentterms, - holdreasons, - currencies, - debtortrans - WHERE debtorsmaster.paymentterms = paymentterms.termsindicator - AND debtorsmaster.currcode = currencies.currabrev - AND debtorsmaster.holdreason = holdreasons.reasoncode - AND debtorsmaster.debtorno = debtortrans.debtorno - AND holdreasons.dissallowinvoices=1 - AND debtorsmaster.debtorno >= '" . $_POST['FromCriteria'] . "' - AND debtorsmaster.debtorno <= '" . $_POST['ToCriteria'] . "' - AND debtorsmaster.currcode ='" . $_POST['Currency'] . "' - " . $SalesLimit . " - GROUP BY debtorsmaster.debtorno, - debtorsmaster.name, - currencies.currency, - paymentterms.terms, - paymentterms.daysbeforedue, - paymentterms.dayinfollowingmonth, - debtorsmaster.creditlimit, - holdreasons.dissallowinvoices, - holdreasons.reasondescription - HAVING ABS(SUM( - debtortrans.ovamount + - debtortrans.ovgst + - debtortrans.ovfreight + - debtortrans.ovdiscount - - debtortrans.alloc)) >0.005"; + SUM(debtortrans.ovamount + + debtortrans.ovgst + + debtortrans.ovfreight + + debtortrans.ovdiscount - + debtortrans.alloc) AS balance, + SUM( + CASE WHEN (paymentterms.daysbeforedue > 0) + THEN + CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= paymentterms.daysbeforedue + THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc + ELSE 0 END + ELSE + CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate," . INTERVAL('1', 'MONTH') . ")," . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))', 'DAY') . ")) >= 0) + THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc + ELSE 0 END + END + ) AS due, + SUM( + CASE WHEN (paymentterms.daysbeforedue > 0) + THEN + CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) > paymentterms.daysbeforedue + AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays1'] . ") + THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END + ELSE + CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, " . INTERVAL('1', 'MONTH') . "), " . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))', 'DAY') . ")) >= " . $_SESSION['PastDueDays1'] . ") + THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc + ELSE 0 END + END + ) AS overdue1, + SUM( + CASE WHEN (paymentterms.daysbeforedue > 0) + THEN + CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) > paymentterms.daysbeforedue + AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays2'] . ") + THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc + ELSE 0 END + ELSE + CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(debtortrans.trandate, " . INTERVAL('1', 'MONTH') . "), " . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(debtortrans.trandate))', 'DAY') . ")) >= ".$_SESSION['PastDueDays2'] . ") + THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc + ELSE 0 END + END + ) AS overdue2 + FROM debtorsmaster, + paymentterms, + holdreasons, + currencies, + debtortrans + WHERE debtorsmaster.paymentterms = paymentterms.termsindicator + AND debtorsmaster.currcode = currencies.currabrev + AND debtorsmaster.holdreason = holdreasons.reasoncode + AND debtorsmaster.debtorno = debtortrans.debtorno + AND holdreasons.dissallowinvoices=1 + AND debtorsmaster.debtorno >= '" . $_POST['FromCriteria'] . "' + AND debtorsmaster.debtorno <= '" . $_POST['ToCriteria'] . "' + AND debtorsmaster.currcode ='" . $_POST['Currency'] . "' + " . $SalesLimit . " + GROUP BY debtorsmaster.debtorno, + debtorsmaster.name, + currencies.currency, + paymentterms.terms, + paymentterms.daysbeforedue, + paymentterms.dayinfollowingmonth, + debtorsmaster.creditlimit, + holdreasons.dissallowinvoices, + holdreasons.reasondescription + HAVING ABS(SUM( + debtortrans.ovamount + + debtortrans.ovgst + + debtortrans.ovfreight + + debtortrans.ovdiscount - + debtortrans.alloc)) >0.005"; } $CustomerResult = DB_query($SQL,$db,'','',False,False); /*dont trap errors handled below*/ - //$ListCount = count ($CustomerResult); // Javier - if (DB_error_no($db) !=0) { $title = _('Aged Customer Account Analysis') . ' - ' . _('Problem Report') . '.... '; include('includes/header.inc'); Modified: trunk/AgedSuppliers.php =================================================================== --- trunk/AgedSuppliers.php 2012-02-17 03:32:32 UTC (rev 4918) +++ trunk/AgedSuppliers.php 2012-02-17 10:34:08 UTC (rev 4919) @@ -81,24 +81,24 @@ ELSE CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(supptrans.trandate, " . INTERVAL('1', 'MONTH') . "), " . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(supptrans.trandate))', 'DAY') . ")) >= " . $_SESSION['PastDueDays2'] . ") THEN supptrans.ovamount + supptrans.ovgst - supptrans.alloc ELSE 0 END END) AS overdue2 - FROM suppliers INNER JOIN paymentterms - ON suppliers.paymentterms = paymentterms.termsindicator - INNER JOIN currencies - ON suppliers.currcode = currencies.currabrev - INNER JOIN supptrans - ON suppliers.supplierid = supptrans.supplierno - WHERE suppliers.supplierid >= '" . $_POST['FromCriteria'] . "' - AND suppliers.supplierid <= '" . $_POST['ToCriteria'] . "' - AND suppliers.currcode ='" . $_POST['Currency'] . "' - GROUP BY suppliers.supplierid, - suppliers.suppname, - currencies.currency, - paymentterms.terms, - paymentterms.daysbeforedue, - paymentterms.dayinfollowingmonth - HAVING SUM(IF (paymentterms.daysbeforedue > 0, - CASE WHEN TO_DAYS(Now()) - TO_DAYS(supptrans.trandate) > paymentterms.daysbeforedue AND TO_DAYS(Now()) - TO_DAYS(supptrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays1'] . ") THEN supptrans.ovamount + supptrans.ovgst - supptrans.alloc ELSE 0 END, - CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(supptrans.trandate, " . INTERVAL('1', 'MONTH') . "), " . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(supptrans.trandate))', 'DAY') . ")) >= " . $_SESSION['PastDueDays1'] . ") THEN supptrans.ovamount + supptrans.ovgst - supptrans.alloc ELSE 0 END)) > 0"; + FROM suppliers INNER JOIN paymentterms + ON suppliers.paymentterms = paymentterms.termsindicator + INNER JOIN currencies + ON suppliers.currcode = currencies.currabrev + INNER JOIN supptrans + ON suppliers.supplierid = supptrans.supplierno + WHERE suppliers.supplierid >= '" . $_POST['FromCriteria'] . "' + AND suppliers.supplierid <= '" . $_POST['ToCriteria'] . "' + AND suppliers.currcode ='" . $_POST['Currency'] . "' + GROUP BY suppliers.supplierid, + suppliers.suppname, + currencies.currency, + paymentterms.terms, + paymentterms.daysbeforedue, + paymentterms.dayinfollowingmonth + HAVING SUM(IF (paymentterms.daysbeforedue > 0, + CASE WHEN TO_DAYS(Now()) - TO_DAYS(supptrans.trandate) > paymentterms.daysbeforedue AND TO_DAYS(Now()) - TO_DAYS(supptrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays1'] . ") THEN supptrans.ovamount + supptrans.ovgst - supptrans.alloc ELSE 0 END, + CASE WHEN (TO_DAYS(Now()) - TO_DAYS(DATE_ADD(DATE_ADD(supptrans.trandate, " . INTERVAL('1', 'MONTH') . "), " . INTERVAL('(paymentterms.dayinfollowingmonth - DAYOFMONTH(supptrans.trandate))', 'DAY') . ")) >= " . $_SESSION['PastDueDays1'] . ") THEN supptrans.ovamount + supptrans.ovgst - supptrans.alloc ELSE 0 END)) > 0"; } Modified: trunk/Areas.php =================================================================== --- trunk/Areas.php 2012-02-17 03:32:32 UTC (rev 4918) +++ trunk/Areas.php 2012-02-17 10:34:08 UTC (rev 4919) @@ -39,7 +39,7 @@ prnMsg(_('The area code must be three characters or less long'),'error'); $Errors[$i] = 'AreaCode'; $i++; - } elseif (DB_num_rows($result)>0 and !isset($SelectedArea)){ + } elseif (DB_num_rows($result)>0 AND !isset($SelectedArea)){ $InputError = 1; prnMsg(_('The area code entered already exists'),'error'); $Errors[$i] = 'AreaCode'; Modified: trunk/SuppCreditGRNs.php =================================================================== --- trunk/SuppCreditGRNs.php 2012-02-17 03:32:32 UTC (rev 4918) +++ trunk/SuppCreditGRNs.php 2012-02-17 10:34:08 UTC (rev 4919) @@ -51,6 +51,7 @@ } if ($InputError==False){ + $_SESSION['SuppTrans']->Add_GRN_To_Trans($_POST['GRNNumber'], $_POST['PODetailItem'], $_POST['ItemCode'], @@ -67,7 +68,9 @@ $_POST['GLCode'], $_POST['PONo'], $_POST['AssetID'], - $_POST['DecimalPlaces']); + 0, + $_POST['DecimalPlaces'], + $_POST['GRNBatchNo']); } } @@ -236,6 +239,7 @@ if (isset($_POST['GRNNo']) AND $_POST['GRNNo']!=''){ $SQL = "SELECT grnno, + grns.grnbatch, grns.podetailitem, purchorderdetails.orderno, purchorderdetails.unitprice, @@ -320,6 +324,7 @@ echo '<input type="hidden" name="PONo" value="' . $myrow['orderno'] . '" />'; echo '<input type="hidden" name="AssetID" value="' . $myrow['assetid'] . '" />'; echo '<input type="hidden" name="DecimalPlaces" value="' . $myrow['decimalplaces'] . '" />'; + echo '<input type="hidden" name="GRNBatchNo" value="' . $myrow['grnbatch'] . '" />'; } } //end if there were GRNs to select echo '</form>'; Modified: trunk/SuppInvGRNs.php =================================================================== --- trunk/SuppInvGRNs.php 2012-02-17 03:32:32 UTC (rev 4918) +++ trunk/SuppInvGRNs.php 2012-02-17 10:34:08 UTC (rev 4919) @@ -236,7 +236,9 @@ $myrow['glcode'], $myrow['orderno'], $myrow['assetid'], - $myrow['decimalplaces']); + 0, + $myrow['decimalplaces'], + $myrow['grnbatch']); } } } Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2012-02-17 03:32:32 UTC (rev 4918) +++ trunk/SupplierInvoice.php 2012-02-17 10:34:08 UTC (rev 4919) @@ -1211,12 +1211,13 @@ /* First update the stockmoves delivery cost */ $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The stock movement record for the delivery could not have the cost updated to the actual cost'); - $result = DB_query("UPDATE stockmoves SET price = '" . $ActualCost . "' + $SQL = "UPDATE stockmoves SET price = '" . $ActualCost . "' WHERE stockid='" .$EnteredGRN->ItemCode . "' AND type=25 AND loccode='" . $LocCode . "' - AND transno='" . $EnteredGRN->GRNNo . "'", - $db,$ErrMsg,$DbgMsg,True); + AND transno='" . $EnteredGRN->GRNBatchNo . "'"; + + $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,True); if ($_SESSION['WeightedAverageCosting']==1){ /* Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-02-17 03:32:32 UTC (rev 4918) +++ trunk/doc/Change.log 2012-02-17 10:34:08 UTC (rev 4919) @@ -1,5 +1,10 @@ webERP Change Log +17/2/12 Phil: SuppCreditGRNs.php SuppInvGRNs.php DefineSuppTransClass.php SupplierInvoice.php stock movement was not being updated correctly with cost on purchase invoice entry as was using GRNNo not GRNBatchNo - which is used as the GRN transaction number in stock movements. +16/2/12 Tim: Modified index.php to use arrays of links rather than hard code all menus +16/2/12 Exson: Fixed StockAdjustments.php was not producing gltrans entries when stock code entered directly + + Release 4.07 11/2/12 Phil: Fix Prices.php for end dates when a new price with no end date is inserted with a start date in the future. Modified: trunk/includes/DefineSuppTransClass.php =================================================================== --- trunk/includes/DefineSuppTransClass.php 2012-02-17 03:32:32 UTC (rev 4918) +++ trunk/includes/DefineSuppTransClass.php 2012-02-17 10:34:08 UTC (rev 4919) @@ -100,7 +100,9 @@ $GLCode, $PONo, $AssetID=0, - $DecimalPlaces=2){ + $Hold=0, + $DecimalPlaces=2, + $GRNBatchNo){ if ($This_QuantityInv!=0 AND isset($This_QuantityInv)){ $this->GRNs[$GRNNo] = new GRNs($GRNNo, @@ -119,7 +121,9 @@ $GLCode, $PONo, $AssetID, - $DecimalPlaces); + $Hold, + $DecimalPlaces, + $GRNBatchNo); Return 1; } Return 0; @@ -181,7 +185,8 @@ $GRNSrc->PONo, $GRNSrc->AssetID, $GRNSrc->Hold, - $GRNSrc->DecimalPlaces); + $GRNSrc->DecimalPlaces, + $GRNSrc->GRNBatchNo); Return 1; } Return 0; @@ -317,6 +322,7 @@ var $Hold; var $AssetID; var $DecimalPlaces; + var $GRNBatchNo; function GRNs ($GRNNo, $PODetailItem, @@ -335,9 +341,11 @@ $PONo, $AssetID, $Hold=0, - $DecimalPlaces=2){ + $DecimalPlaces=2, + $GRNBatchNo){ + /* Constructor function to add a new GRNs object with passed params */ $this->GRNNo = $GRNNo; $this->PODetailItem = $PODetailItem; @@ -357,22 +365,23 @@ $this->AssetID = $AssetID; $this->Hold = $Hold; $this->DecimalPlaces = $DecimalPlaces; + $this->GRNBatchNo = $GRNBatchNo; } function Modify ($PODetailItem, - $ItemCode, - $ItemDescription, - $QtyRecd, - $Prev_QuantityInv, - $This_QuantityInv, - $OrderPrice, - $ChgPrice, - $Complete, - $StdCostUnit, - $ShiptRef, - $JobRef, - $GLCode, - $Hold){ + $ItemCode, + $ItemDescription, + $QtyRecd, + $Prev_QuantityInv, + $This_QuantityInv, + $OrderPrice, + $ChgPrice, + $Complete, + $StdCostUnit, + $ShiptRef, + $JobRef, + $GLCode, + $Hold){ /* Modify function to edit a GRNs object with passed params */ $this->PODetailItem = $PODetailItem; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-02-21 15:56:20
|
Revision: 4947 http://web-erp.svn.sourceforge.net/web-erp/?rev=4947&view=rev Author: tim_schofield Date: 2012-02-21 15:56:08 +0000 (Tue, 21 Feb 2012) Log Message: ----------- Move CopyBOM.php from utilities to the main menu Modified Paths: -------------- trunk/UpgradeDatabase.php trunk/includes/ConnectDB.inc trunk/includes/IndexArray.php trunk/sql/mysql/upgrade4.07-4.08.sql Added Paths: ----------- trunk/CopyBOM.php Removed Paths: ------------- trunk/Z_CopyBOM.php Copied: trunk/CopyBOM.php (from rev 4937, trunk/Z_CopyBOM.php) =================================================================== --- trunk/CopyBOM.php (rev 0) +++ trunk/CopyBOM.php 2012-02-21 15:56:08 UTC (rev 4947) @@ -0,0 +1,168 @@ +<?php +/** + * Author: Ashish Shukla <gmail.com!wahjava> + * + * Script to duplicate BoMs. + */ +/* $Id$*/ + +$title = _('Copy a BOM to New Item Code'); + +include('includes/session.inc'); + +include('includes/header.inc'); + +include('includes/SQL_CommonFunctions.inc'); + +if(isset($_POST['Submit'])) { + $stkid = $_POST['stkid']; + $type = $_POST['type']; + $newstkid = ''; + + if($type == 'N') { + $newstkid = $_POST['tostkid']; + } else { + $newstkid = $_POST['exstkid']; + } + + $result = DB_query("begin", $db); + + if($type == 'N') { + /* duplicate rows into stockmaster */ + $sql = "INSERT INTO stockmaster + SELECT '".$newstkid."' AS stockid, + categoryid, + description, + longdescription, + units, + mbflag, + lastcurcostdate, + actualcost, + lastcost, + materialcost, + labourcost, + overheadcost, + lowestlevel, + discontinued, + controlled, + eoq, + volume, + kgs, + barcode, + discountcategory, + taxcatid, + serialised, + appendfile, + perishable, + decimalplaces, + nextserialno, + pansize, + shrinkfactor, + netweight + FROM stockmaster + WHERE stockid='".$stkid."';"; + $result = DB_query($sql, $db); + } else { + $sql = "SELECT lastcurcostdate, + actualcost, + lastcost, + materialcost, + labourcost, + overheadcost, + lowestlevel + FROM stockmaster + WHERE stockid='".$stkid."';"; + $result = DB_query($sql, $db); + + $row = DB_fetch_row($result); + + $sql = "UPDATE stockmaster set + lastcurcostdate = '".$row[0]."', + actualcost = ".$row[1].", + lastcost = ".$row[2].", + materialcost = ".$row[3].", + labourcost = ".$row[4].", + overheadcost = ".$row[5].", + lowestlevel = ".$row[6]." + WHERE stockid='".$newstkid."';"; + $result = DB_query($sql, $db); + } + + $sql = "INSERT INTO bom + SELECT '".$newstkid."' AS parent, + component, + workcentreadded, + loccode, + effectiveafter, + effectiveto, + quantity, + autoissue + FROM bom + WHERE parent='".$stkid."';"; + $result = DB_query($sql, $db); + + if($type == 'N') { + $sql = "INSERT INTO locstock + SELECT loccode, + '".$newstkid."' AS stockid, + 0 AS quantity, + reorderlevel + FROM locstock + WHERE stockid='".$stkid."';"; + $result = DB_query($sql, $db); + } + + $result = DB_query('commit', $db); + + UpdateCost($db, $newstkid); + + header('Location: BOMs.php?Select='.$newstkid); +} else { + + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Contract') . '" alt="" />' . ' ' . $title . '</p>'; + + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + + $sql = "SELECT stockid, + description + FROM stockmaster + WHERE stockid IN (SELECT DISTINCT parent FROM bom) + AND mbflag IN ('M', 'A', 'K');"; + $result = DB_query($sql, $db); + + echo '<table class="selection"> + <tr> + <td>' . _('From Stock ID') . '</td>'; + echo '<td><select name="stkid">'; + while($row = DB_fetch_row($result)) { + echo '<option value="'.$row[0].'">'.$row[0].' -- '.$row[1].'</option>'; + } + echo '</select></td> + </tr>'; + echo '<tr> + <td><input type="radio" name="type" value="N" checked="" />' . _(' To New Stock ID') . '</td></td><td>'; + echo '<input type="text" maxlength="20" name="tostkid" /></td></tr>'; + + $sql = "SELECT stockid, + description + FROM stockmaster + WHERE stockid NOT IN (SELECT DISTINCT parent FROM bom) + AND mbflag IN ('M', 'A', 'K');"; + $result = DB_query($sql, $db); + + if (DB_num_rows($result) > 0) { + echo '<tr> + <td><input type="radio" name="type" value="E" />'._('To Existing Stock ID') . '</td><td>'; + echo '<select name="exstkid">'; + while($row = DB_fetch_row($result)) { + echo '<option value="'.$row[0].'">'.$row[0].' -- '.$row[1].'</option>'; + } + echo '</select>'; + } + echo '</table>'; + echo '<br /><div class="centre"><input type="submit" name="Submit" value="Submit" /></div></form>'; + + include('includes/footer.inc'); +} +?> \ No newline at end of file Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2012-02-21 11:13:54 UTC (rev 4946) +++ trunk/UpgradeDatabase.php 2012-02-21 15:56:08 UTC (rev 4947) @@ -135,7 +135,8 @@ $SQLScripts[] = './sql/mysql/upgrade4.06-4.07.sql'; case '4.07.0': $SQLScripts[] = './sql/mysql/upgrade4.07-4.08.sql'; - case '4.08': + case '4.08.0': + $SQLScripts[] = './sql/mysql/upgrade4.07-4.08.sql'; break; } //end switch } Deleted: trunk/Z_CopyBOM.php =================================================================== --- trunk/Z_CopyBOM.php 2012-02-21 11:13:54 UTC (rev 4946) +++ trunk/Z_CopyBOM.php 2012-02-21 15:56:08 UTC (rev 4947) @@ -1,147 +0,0 @@ -<?php -/** - * Author: Ashish Shukla <gmail.com!wahjava> - * - * Script to duplicate BoMs. - */ -/* $Id$*/ - -include('includes/session.inc'); -include('includes/SQL_CommonFunctions.inc'); - -if(isset($_POST['Submit'])) { - $StkID = $_POST['StkID']; - $type = $_POST['type']; - $newStkID = ''; - - if($type == 'N') { - $newStkID = $_POST['toStkID']; - } else { - $newStkID = $_POST['exStkID']; - } - DB_Txn_Begin($db); - - if($type == 'N') { - /* duplicate rows into stockmaster */ - $sql = "INSERT INTO stockmaster - select '" . $newStkID . "' as stockid, - categoryid, - description, - longdescription, - units, - mbflag, - actualcost, - lastcost, - materialcost, - labourcost, - overheadcost, - lowestlevel, - discontinued, - controlled, - eoq, - volume, - kgs, - barcode, - discountcategory, - taxcatid, - serialised, - appendfile, - perishable, - decimalplaces - FROM stockmaster - WHERE stockid='".$StkID."';"; - $result = DB_query($sql, $db); - } - else - { - $sql = "SELECT actualcost, lastcost, materialcost, labourcost, overheadcost, lowestlevel - FROM stockmaster WHERE stockid='".$StkID."';"; - $result = DB_query($sql, $db); - - $row = DB_fetch_row($result); - - $sql = "UPDATE stockmaster SET - actualcost = ".$row[0].", - lastcost = ".$row[1].", - materialcost = ".$row[2].", - labourcost = ".$row[3].", - overheadcost = ".$row[4].", - lowestlevel = ".$row[5]." - WHERE stockid='".$newStkID."';"; - $result = DB_query($sql, $db); - } - - $sql = "INSERT INTO bom - SELECT '".$newStkID."' as parent, - component, - workcentreadded, - loccode, - effectiveafter, - effectiveto, - quantity, - autoissue - FROM bom - WHERE parent='".$StkID."';"; - $result = DB_query($sql, $db); - - if($type == 'N') - { - $sql = "INSERT INTO locstock - SELECT loccode, '".$newStkID."' as stockid,0 as quantity, - reorderlevel - FROM locstock - WHERE stockid='".$StkID."';"; - $result = DB_query($sql, $db); - } - - DB_Txn_Commit($db); - - UpdateCost($db, $newStkID); - - header('Location: BOMs.php?Select='.$newStkID); - } - - else - { - $title = _('UTILITY PAGE To Copy a BOM'); - include('includes/header.inc'); - - echo '<form method="post" action="Z_CopyBOM.php">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - - $sql = "SELECT stockid, description FROM stockmaster WHERE stockid IN (SELECT DISTINCT parent FROM bom) AND mbflag IN ('M', 'A', 'K');"; - $result = DB_query($sql, $db); - - echo '<br /> - <br />' . _('From Stock ID') . ': <select name="StkID">'; - while($row = DB_fetch_row($result)) { - echo '<option value="' . $row[0] . '">' . $row[0]. ' -- ' . $row[1] . '</option>'; - } - echo '</select> - <br/> - <input type="radio" name="type" value="N" checked="" />' ._('To New Stock ID') .': - <input type="text" maxlength="20" name="toStkID" />'; - - $sql = "SELECT stockid, - description - FROM stockmaster - WHERE stockid NOT IN (SELECT DISTINCT parent FROM bom) - AND mbflag IN ('M', 'A', 'K');"; - $result = DB_query($sql, $db); - - if(DB_num_rows($result) > 0) { - echo '<br/> - <input type="radio" name="type" value="E" />' . _('To Existing Stock ID') . ': - <select name="exStkID">'; - while($row = DB_fetch_row($result)){ - echo '<option value="' . $row[0] .'">' . $row[0] . ' -- ' . $row[1] . '</option>'; - } - echo '</select>'; - } - - echo '<br /> - <input type="submit" name="Submit" value="' . _('Submit') . '" />'; - - include('includes/footer.inc'); -} -?> Modified: trunk/includes/ConnectDB.inc =================================================================== --- trunk/includes/ConnectDB.inc 2012-02-21 11:13:54 UTC (rev 4946) +++ trunk/includes/ConnectDB.inc 2012-02-21 15:56:08 UTC (rev 4947) @@ -4,7 +4,7 @@ * this value is saved in the $_SESSION['Versionumber'] when includes/GetConfig.php is run * if VersionNumber is < $Version then the DB update script is run */ -$Version='4.07.1'; //must update manually every time there is a DB change +$Version='4.08.1'; //must update manually every time there is a DB change require_once ($PathPrefix .'includes/MiscFunctions.php'); Modified: trunk/includes/IndexArray.php =================================================================== --- trunk/includes/IndexArray.php 2012-02-21 11:13:54 UTC (rev 4946) +++ trunk/includes/IndexArray.php 2012-02-21 15:56:08 UTC (rev 4947) @@ -303,6 +303,7 @@ $MenuItems['manuf']['Maintenance']['Caption'] = array (_('Work Centre'), _('Bills Of Material'), + _('Copy a Bill Of Materials Between Items'), _('Master Schedule'), _('Auto Create Master Schedule'), _('MRP Calculation') @@ -310,6 +311,7 @@ $MenuItems['manuf']['Maintenance']['URL'] = array ('/WorkCentres.php', '/BOMs.php', + '/CopyBOM.php', '/MRPDemands.php', '/MRPCreateDemands.php', '/MRP.php' Modified: trunk/sql/mysql/upgrade4.07-4.08.sql =================================================================== --- trunk/sql/mysql/upgrade4.07-4.08.sql 2012-02-21 11:13:54 UTC (rev 4946) +++ trunk/sql/mysql/upgrade4.07-4.08.sql 2012-02-21 15:56:08 UTC (rev 4947) @@ -4,4 +4,6 @@ INSERT INTO `scripts` (`script` ,`pagesecurity` ,`description`) VALUES ('reportwriter/admin/ReportCreator.php', '15', 'Report Writer'); INSERT INTO `scripts` (`script` ,`pagesecurity` ,`description`) VALUES ('RecurringSalesOrdersProcess.php', '1', 'Process Recurring Sales Orders'); -UPDATE config SET confvalue='4.08.0' WHERE confname='VersionNumber'; \ No newline at end of file +UPDATE `scripts` SET `script`='CopyBOM.php' WHERE `script`='Z_CopyBOM.php'; + +UPDATE config SET confvalue='4.08.1' WHERE confname='VersionNumber'; \ 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...> - 2012-02-21 15:56:20
|
Revision: 4947 http://web-erp.svn.sourceforge.net/web-erp/?rev=4947&view=rev Author: tim_schofield Date: 2012-02-21 15:56:08 +0000 (Tue, 21 Feb 2012) Log Message: ----------- Move CopyBOM.php from utilities to the main menu Modified Paths: -------------- trunk/UpgradeDatabase.php trunk/includes/ConnectDB.inc trunk/includes/IndexArray.php trunk/sql/mysql/upgrade4.07-4.08.sql Added Paths: ----------- trunk/CopyBOM.php Removed Paths: ------------- trunk/Z_CopyBOM.php Copied: trunk/CopyBOM.php (from rev 4937, trunk/Z_CopyBOM.php) =================================================================== --- trunk/CopyBOM.php (rev 0) +++ trunk/CopyBOM.php 2012-02-21 15:56:08 UTC (rev 4947) @@ -0,0 +1,168 @@ +<?php +/** + * Author: Ashish Shukla <gmail.com!wahjava> + * + * Script to duplicate BoMs. + */ +/* $Id$*/ + +$title = _('Copy a BOM to New Item Code'); + +include('includes/session.inc'); + +include('includes/header.inc'); + +include('includes/SQL_CommonFunctions.inc'); + +if(isset($_POST['Submit'])) { + $stkid = $_POST['stkid']; + $type = $_POST['type']; + $newstkid = ''; + + if($type == 'N') { + $newstkid = $_POST['tostkid']; + } else { + $newstkid = $_POST['exstkid']; + } + + $result = DB_query("begin", $db); + + if($type == 'N') { + /* duplicate rows into stockmaster */ + $sql = "INSERT INTO stockmaster + SELECT '".$newstkid."' AS stockid, + categoryid, + description, + longdescription, + units, + mbflag, + lastcurcostdate, + actualcost, + lastcost, + materialcost, + labourcost, + overheadcost, + lowestlevel, + discontinued, + controlled, + eoq, + volume, + kgs, + barcode, + discountcategory, + taxcatid, + serialised, + appendfile, + perishable, + decimalplaces, + nextserialno, + pansize, + shrinkfactor, + netweight + FROM stockmaster + WHERE stockid='".$stkid."';"; + $result = DB_query($sql, $db); + } else { + $sql = "SELECT lastcurcostdate, + actualcost, + lastcost, + materialcost, + labourcost, + overheadcost, + lowestlevel + FROM stockmaster + WHERE stockid='".$stkid."';"; + $result = DB_query($sql, $db); + + $row = DB_fetch_row($result); + + $sql = "UPDATE stockmaster set + lastcurcostdate = '".$row[0]."', + actualcost = ".$row[1].", + lastcost = ".$row[2].", + materialcost = ".$row[3].", + labourcost = ".$row[4].", + overheadcost = ".$row[5].", + lowestlevel = ".$row[6]." + WHERE stockid='".$newstkid."';"; + $result = DB_query($sql, $db); + } + + $sql = "INSERT INTO bom + SELECT '".$newstkid."' AS parent, + component, + workcentreadded, + loccode, + effectiveafter, + effectiveto, + quantity, + autoissue + FROM bom + WHERE parent='".$stkid."';"; + $result = DB_query($sql, $db); + + if($type == 'N') { + $sql = "INSERT INTO locstock + SELECT loccode, + '".$newstkid."' AS stockid, + 0 AS quantity, + reorderlevel + FROM locstock + WHERE stockid='".$stkid."';"; + $result = DB_query($sql, $db); + } + + $result = DB_query('commit', $db); + + UpdateCost($db, $newstkid); + + header('Location: BOMs.php?Select='.$newstkid); +} else { + + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Contract') . '" alt="" />' . ' ' . $title . '</p>'; + + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + + $sql = "SELECT stockid, + description + FROM stockmaster + WHERE stockid IN (SELECT DISTINCT parent FROM bom) + AND mbflag IN ('M', 'A', 'K');"; + $result = DB_query($sql, $db); + + echo '<table class="selection"> + <tr> + <td>' . _('From Stock ID') . '</td>'; + echo '<td><select name="stkid">'; + while($row = DB_fetch_row($result)) { + echo '<option value="'.$row[0].'">'.$row[0].' -- '.$row[1].'</option>'; + } + echo '</select></td> + </tr>'; + echo '<tr> + <td><input type="radio" name="type" value="N" checked="" />' . _(' To New Stock ID') . '</td></td><td>'; + echo '<input type="text" maxlength="20" name="tostkid" /></td></tr>'; + + $sql = "SELECT stockid, + description + FROM stockmaster + WHERE stockid NOT IN (SELECT DISTINCT parent FROM bom) + AND mbflag IN ('M', 'A', 'K');"; + $result = DB_query($sql, $db); + + if (DB_num_rows($result) > 0) { + echo '<tr> + <td><input type="radio" name="type" value="E" />'._('To Existing Stock ID') . '</td><td>'; + echo '<select name="exstkid">'; + while($row = DB_fetch_row($result)) { + echo '<option value="'.$row[0].'">'.$row[0].' -- '.$row[1].'</option>'; + } + echo '</select>'; + } + echo '</table>'; + echo '<br /><div class="centre"><input type="submit" name="Submit" value="Submit" /></div></form>'; + + include('includes/footer.inc'); +} +?> \ No newline at end of file Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2012-02-21 11:13:54 UTC (rev 4946) +++ trunk/UpgradeDatabase.php 2012-02-21 15:56:08 UTC (rev 4947) @@ -135,7 +135,8 @@ $SQLScripts[] = './sql/mysql/upgrade4.06-4.07.sql'; case '4.07.0': $SQLScripts[] = './sql/mysql/upgrade4.07-4.08.sql'; - case '4.08': + case '4.08.0': + $SQLScripts[] = './sql/mysql/upgrade4.07-4.08.sql'; break; } //end switch } Deleted: trunk/Z_CopyBOM.php =================================================================== --- trunk/Z_CopyBOM.php 2012-02-21 11:13:54 UTC (rev 4946) +++ trunk/Z_CopyBOM.php 2012-02-21 15:56:08 UTC (rev 4947) @@ -1,147 +0,0 @@ -<?php -/** - * Author: Ashish Shukla <gmail.com!wahjava> - * - * Script to duplicate BoMs. - */ -/* $Id$*/ - -include('includes/session.inc'); -include('includes/SQL_CommonFunctions.inc'); - -if(isset($_POST['Submit'])) { - $StkID = $_POST['StkID']; - $type = $_POST['type']; - $newStkID = ''; - - if($type == 'N') { - $newStkID = $_POST['toStkID']; - } else { - $newStkID = $_POST['exStkID']; - } - DB_Txn_Begin($db); - - if($type == 'N') { - /* duplicate rows into stockmaster */ - $sql = "INSERT INTO stockmaster - select '" . $newStkID . "' as stockid, - categoryid, - description, - longdescription, - units, - mbflag, - actualcost, - lastcost, - materialcost, - labourcost, - overheadcost, - lowestlevel, - discontinued, - controlled, - eoq, - volume, - kgs, - barcode, - discountcategory, - taxcatid, - serialised, - appendfile, - perishable, - decimalplaces - FROM stockmaster - WHERE stockid='".$StkID."';"; - $result = DB_query($sql, $db); - } - else - { - $sql = "SELECT actualcost, lastcost, materialcost, labourcost, overheadcost, lowestlevel - FROM stockmaster WHERE stockid='".$StkID."';"; - $result = DB_query($sql, $db); - - $row = DB_fetch_row($result); - - $sql = "UPDATE stockmaster SET - actualcost = ".$row[0].", - lastcost = ".$row[1].", - materialcost = ".$row[2].", - labourcost = ".$row[3].", - overheadcost = ".$row[4].", - lowestlevel = ".$row[5]." - WHERE stockid='".$newStkID."';"; - $result = DB_query($sql, $db); - } - - $sql = "INSERT INTO bom - SELECT '".$newStkID."' as parent, - component, - workcentreadded, - loccode, - effectiveafter, - effectiveto, - quantity, - autoissue - FROM bom - WHERE parent='".$StkID."';"; - $result = DB_query($sql, $db); - - if($type == 'N') - { - $sql = "INSERT INTO locstock - SELECT loccode, '".$newStkID."' as stockid,0 as quantity, - reorderlevel - FROM locstock - WHERE stockid='".$StkID."';"; - $result = DB_query($sql, $db); - } - - DB_Txn_Commit($db); - - UpdateCost($db, $newStkID); - - header('Location: BOMs.php?Select='.$newStkID); - } - - else - { - $title = _('UTILITY PAGE To Copy a BOM'); - include('includes/header.inc'); - - echo '<form method="post" action="Z_CopyBOM.php">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - - $sql = "SELECT stockid, description FROM stockmaster WHERE stockid IN (SELECT DISTINCT parent FROM bom) AND mbflag IN ('M', 'A', 'K');"; - $result = DB_query($sql, $db); - - echo '<br /> - <br />' . _('From Stock ID') . ': <select name="StkID">'; - while($row = DB_fetch_row($result)) { - echo '<option value="' . $row[0] . '">' . $row[0]. ' -- ' . $row[1] . '</option>'; - } - echo '</select> - <br/> - <input type="radio" name="type" value="N" checked="" />' ._('To New Stock ID') .': - <input type="text" maxlength="20" name="toStkID" />'; - - $sql = "SELECT stockid, - description - FROM stockmaster - WHERE stockid NOT IN (SELECT DISTINCT parent FROM bom) - AND mbflag IN ('M', 'A', 'K');"; - $result = DB_query($sql, $db); - - if(DB_num_rows($result) > 0) { - echo '<br/> - <input type="radio" name="type" value="E" />' . _('To Existing Stock ID') . ': - <select name="exStkID">'; - while($row = DB_fetch_row($result)){ - echo '<option value="' . $row[0] .'">' . $row[0] . ' -- ' . $row[1] . '</option>'; - } - echo '</select>'; - } - - echo '<br /> - <input type="submit" name="Submit" value="' . _('Submit') . '" />'; - - include('includes/footer.inc'); -} -?> Modified: trunk/includes/ConnectDB.inc =================================================================== --- trunk/includes/ConnectDB.inc 2012-02-21 11:13:54 UTC (rev 4946) +++ trunk/includes/ConnectDB.inc 2012-02-21 15:56:08 UTC (rev 4947) @@ -4,7 +4,7 @@ * this value is saved in the $_SESSION['Versionumber'] when includes/GetConfig.php is run * if VersionNumber is < $Version then the DB update script is run */ -$Version='4.07.1'; //must update manually every time there is a DB change +$Version='4.08.1'; //must update manually every time there is a DB change require_once ($PathPrefix .'includes/MiscFunctions.php'); Modified: trunk/includes/IndexArray.php =================================================================== --- trunk/includes/IndexArray.php 2012-02-21 11:13:54 UTC (rev 4946) +++ trunk/includes/IndexArray.php 2012-02-21 15:56:08 UTC (rev 4947) @@ -303,6 +303,7 @@ $MenuItems['manuf']['Maintenance']['Caption'] = array (_('Work Centre'), _('Bills Of Material'), + _('Copy a Bill Of Materials Between Items'), _('Master Schedule'), _('Auto Create Master Schedule'), _('MRP Calculation') @@ -310,6 +311,7 @@ $MenuItems['manuf']['Maintenance']['URL'] = array ('/WorkCentres.php', '/BOMs.php', + '/CopyBOM.php', '/MRPDemands.php', '/MRPCreateDemands.php', '/MRP.php' Modified: trunk/sql/mysql/upgrade4.07-4.08.sql =================================================================== --- trunk/sql/mysql/upgrade4.07-4.08.sql 2012-02-21 11:13:54 UTC (rev 4946) +++ trunk/sql/mysql/upgrade4.07-4.08.sql 2012-02-21 15:56:08 UTC (rev 4947) @@ -4,4 +4,6 @@ INSERT INTO `scripts` (`script` ,`pagesecurity` ,`description`) VALUES ('reportwriter/admin/ReportCreator.php', '15', 'Report Writer'); INSERT INTO `scripts` (`script` ,`pagesecurity` ,`description`) VALUES ('RecurringSalesOrdersProcess.php', '1', 'Process Recurring Sales Orders'); -UPDATE config SET confvalue='4.08.0' WHERE confname='VersionNumber'; \ No newline at end of file +UPDATE `scripts` SET `script`='CopyBOM.php' WHERE `script`='Z_CopyBOM.php'; + +UPDATE config SET confvalue='4.08.1' WHERE confname='VersionNumber'; \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |