diff --git a/GLTransInquiry.php b/GLTransInquiry.php index 63baf7569..3e53b5bc1 100644 --- a/GLTransInquiry.php +++ b/GLTransInquiry.php @@ -1,15 +1,14 @@ ' . _('General Ledger Menu') . ''; +$MenuURL = '
' . _('General Ledger Menu') . '
'; -if( !isset($_GET['TypeID']) OR !isset($_GET['TransNo']) ) { - prnMsg(_('This page requires a valid transaction type and number'),'warn'); +if (!isset($_GET['TypeID']) or !isset($_GET['TransNo'])) { + prnMsg(_('This page requires a valid transaction type and number'), 'warn'); echo $MenuURL; } else { $typeSQL = "SELECT typename, @@ -19,22 +18,20 @@ $TypeResult = DB_query($typeSQL); - if( DB_num_rows($TypeResult) == 0 ) { - prnMsg(_('No transaction of this type with id') . ' ' . $_GET['TypeID'],'error'); - echo $MenuURL; + if (DB_num_rows($TypeResult) == 0) { + prnMsg(_('No transaction of this type with id') . ' ' . $_GET['TypeID'], 'error'); + echo $MenuURL; } else { - $myrow = DB_fetch_row($TypeResult); + $MyRow = DB_fetch_row($TypeResult); DB_free_result($TypeResult); - $TransName = $myrow[0]; + $TransName = $MyRow[0]; // Context Navigation and Title echo $MenuURL; // //========[ SHOW SYNOPSYS ]=========== // - echo '

' . ' ' . - _('General Ledger Transaction Inquiry') . '

'; + echo '

' . ' ' . _('General Ledger Transaction Inquiry') . '

'; echo ''; //Main table echo ' @@ -74,27 +71,27 @@ $DebitTotal = 0; $AnalysisCompleted = 'Not Yet'; - while( $TransRow = DB_fetch_array($TransResult) ) { + while ($TransRow = DB_fetch_array($TransResult)) { $TranDate = ConvertSQLDate($TransRow['trandate']); $DetailResult = false; - if( $TransRow['amount'] > 0) { - $DebitAmount = locale_number_format($TransRow['amount'],$_SESSION['CompanyRecord']['decimalplaces']); - $DebitTotal += $TransRow['amount']; + if ($TransRow['amount'] > 0) { + $DebitAmount = locale_number_format($TransRow['amount'], $_SESSION['CompanyRecord']['decimalplaces']); + $DebitTotal+= $TransRow['amount']; $CreditAmount = ' '; } else { - $CreditAmount = locale_number_format(-$TransRow['amount'],$_SESSION['CompanyRecord']['decimalplaces']); - $CreditTotal += $TransRow['amount']; + $CreditAmount = locale_number_format(-$TransRow['amount'], $_SESSION['CompanyRecord']['decimalplaces']); + $CreditTotal+= $TransRow['amount']; $DebitAmount = ' '; } - if( $TransRow['posted']==0 ) { + if ($TransRow['posted'] == 0) { $Posted = _('No'); } - if( $TransRow['account'] == $_SESSION['CompanyRecord']['debtorsact'] AND $AnalysisCompleted == 'Not Yet') { - $URL = $RootPath . '/CustomerInquiry.php?CustomerID='; - $FromDate = '&TransAfterDate=' . urlencode($TranDate); + if ($TransRow['account'] == $_SESSION['CompanyRecord']['debtorsact'] and $AnalysisCompleted == 'Not Yet') { + $URL = $RootPath . '/CustomerInquiry.php?CustomerID='; + $FromDate = '&TransAfterDate=' . urlencode($TranDate); - $DetailSQL = "SELECT debtortrans.debtorno AS otherpartycode, + $DetailSQL = "SELECT debtortrans.debtorno AS otherpartycode, debtortrans.ovamount, debtortrans.ovgst, debtortrans.ovfreight, @@ -104,83 +101,82 @@ FROM debtortrans INNER JOIN debtorsmaster ON debtortrans.debtorno = debtorsmaster.debtorno WHERE debtortrans.type = '" . $TransRow['type'] . "' - AND debtortrans.transno = '" . $_GET['TransNo']. "'"; - $DetailResult = DB_query($DetailSQL); + AND debtortrans.transno = '" . $_GET['TransNo'] . "'"; + $DetailResult = DB_query($DetailSQL); - } elseif( $TransRow['account'] == $_SESSION['CompanyRecord']['creditorsact'] AND $AnalysisCompleted == 'Not Yet' ) { - $URL = $RootPath . '/SupplierInquiry.php?SupplierID='; - $FromDate = '&FromDate=' . urlencode($TranDate); + } elseif ($TransRow['account'] == $_SESSION['CompanyRecord']['creditorsact'] and $AnalysisCompleted == 'Not Yet') { + $URL = $RootPath . '/SupplierInquiry.php?SupplierID='; + $FromDate = '&FromDate=' . urlencode($TranDate); - $DetailSQL = "SELECT supptrans.supplierno AS otherpartycode, + $DetailSQL = "SELECT supptrans.supplierno AS otherpartycode, supptrans.ovamount, supptrans.ovgst, supptrans.rate, - supptrans.ovdiscount, suppliers.suppname AS otherparty FROM supptrans INNER JOIN suppliers ON supptrans.supplierno = suppliers.supplierid WHERE supptrans.type = '" . $TransRow['type'] . "' AND supptrans.transno = '" . $_GET['TransNo'] . "'"; - $DetailResult = DB_query($DetailSQL); + $DetailResult = DB_query($DetailSQL); } else { - // if user is allowed to see the account we show it, other wise we show "OTHERS ACCOUNTS" - $CheckSql = "SELECT count(*) + // if user is allowed to see the account we show it, other wise we show "OTHERS ACCOUNTS" + $CheckSql = "SELECT count(*) FROM glaccountusers WHERE accountcode= '" . $TransRow['account'] . "' AND userid = '" . $_SESSION['UserID'] . "' AND canview = '1'"; - $CheckResult = DB_query($CheckSql); - $CheckRow = DB_fetch_row($CheckResult); - - if ($CheckRow[0] > 0) { - $AccountName = $TransRow['accountname']; - $URL = $RootPath . '/GLAccountInquiry.php?Account=' . urlencode($TransRow['account']); - }else{ - $AccountName = _('Other GL Accounts'); - $URL = ""; - } + $CheckResult = DB_query($CheckSql); + $CheckRow = DB_fetch_row($CheckResult); + + if ($CheckRow[0] > 0) { + $AccountName = $TransRow['accountname']; + $URL = $RootPath . '/GLAccountInquiry.php?Account=' . urlencode($TransRow['account']); + } else { + $AccountName = _('Other GL Accounts'); + $URL = ""; + } - if( mb_strlen($TransRow['narrative'])==0 ) { - $TransRow['narrative'] = ' '; - } + if (mb_strlen($TransRow['narrative']) == 0) { + $TransRow['narrative'] = ' '; + } - echo ' + echo ''; - if ($URL == "") { - // User is not allowed to see this GL account, don't show the details - echo ' + if ($URL == "") { + // User is not allowed to see this GL account, don't show the details + echo ' '; - }else{ - echo ' + } else { + echo ' '; - } + } - echo ' + echo ' '; } - if($DetailResult AND $AnalysisCompleted == 'Not Yet') { + if ($DetailResult and $AnalysisCompleted == 'Not Yet') { - while( $DetailRow = DB_fetch_array($DetailResult) ) { - if( $TransRow['amount'] > 0) { - if($TransRow['account'] == $_SESSION['CompanyRecord']['debtorsact']) { - $Debit = locale_number_format(($DetailRow['ovamount'] + $DetailRow['ovgst']+ $DetailRow['ovfreight']) / $DetailRow['rate'],$_SESSION['CompanyRecord']['decimalplaces']); + while ($DetailRow = DB_fetch_array($DetailResult)) { + if ($TransRow['amount'] > 0) { + if ($TransRow['account'] == $_SESSION['CompanyRecord']['debtorsact']) { + $Debit = locale_number_format(($DetailRow['ovamount'] + $DetailRow['ovgst'] + $DetailRow['ovfreight']) / $DetailRow['rate'], $_SESSION['CompanyRecord']['decimalplaces']); $Credit = ' '; } else { - $Debit = locale_number_format(-($DetailRow['ovamount'] + $DetailRow['ovgst']) / $DetailRow['rate'],$_SESSION['CompanyRecord']['decimalplaces']); + $Debit = locale_number_format(-($DetailRow['ovamount'] + $DetailRow['ovgst']) / $DetailRow['rate'], $_SESSION['CompanyRecord']['decimalplaces']); $Credit = ' '; } } else { - if($TransRow['account'] == $_SESSION['CompanyRecord']['debtorsact']) { - $Credit = locale_number_format(-($DetailRow['ovamount'] + $DetailRow['ovgst'] + $DetailRow['ovfreight'] + $DetailRow['ovdiscount']) / $DetailRow['rate'],$_SESSION['CompanyRecord']['decimalplaces']); + if ($TransRow['account'] == $_SESSION['CompanyRecord']['debtorsact']) { + $Credit = locale_number_format(-($DetailRow['ovamount'] + $DetailRow['ovgst'] + $DetailRow['ovfreight'] + $DetailRow['ovdiscount']) / $DetailRow['rate'], $_SESSION['CompanyRecord']['decimalplaces']); $Debit = ' '; } else { - $Credit = locale_number_format(($DetailRow['ovamount'] + $DetailRow['ovgst'] + $DetailRow['ovdiscount']) / $DetailRow['rate'],$_SESSION['CompanyRecord']['decimalplaces']); + $Credit = locale_number_format(($DetailRow['ovamount'] + $DetailRow['ovgst']) / $DetailRow['rate'], $_SESSION['CompanyRecord']['decimalplaces']); $Debit = ' '; } } @@ -188,8 +184,7 @@ echo ' - + @@ -204,10 +199,8 @@ echo ' - - + +
' . MonthAndYearFromSQLDate($TransRow['lastdate_in_period']) . ' ' . $TranDate . '' . $AccountName . '' . $AccountName . ' ' . $AccountName . '' . $AccountName . '' . $AccountName . ' ' . $TransRow['narrative'] . '' . $DebitAmount . '' . $DebitAmount . ' ' . $CreditAmount . ' ' . $Posted . '
' . MonthAndYearFromSQLDate($TransRow['lastdate_in_period']) . ' ' . $TranDate . '' . - $TransRow['accountname'] . ' - ' . $DetailRow['otherparty'] . '' . $TransRow['accountname'] . ' - ' . $DetailRow['otherparty'] . ' ' . $TransRow['narrative'] . ' ' . $Debit . ' ' . $Credit . '
' . _('Total') . '' . - locale_number_format(($DebitTotal),$_SESSION['CompanyRecord']['decimalplaces']) . '' . - locale_number_format((-$CreditTotal),$_SESSION['CompanyRecord']['decimalplaces']) . '' . locale_number_format(($DebitTotal), $_SESSION['CompanyRecord']['decimalplaces']) . '' . locale_number_format((-$CreditTotal), $_SESSION['CompanyRecord']['decimalplaces']) . '  
'; @@ -215,5 +208,5 @@ } -include('includes/footer.php'); +include ('includes/footer.php'); ?> diff --git a/UpgradeDatabase.php b/UpgradeDatabase.php index d4948b658..dfaeaa07e 100644 --- a/UpgradeDatabase.php +++ b/UpgradeDatabase.php @@ -201,6 +201,8 @@ $SQLScripts[] = './sql/mysql/upgrade4.14-4.14.1.sql'; case '4.14.1': $SQLScripts[] = './sql/mysql/upgrade4.14.1-4.15.sql'; + case '4.15': + $SQLScripts[] = './sql/mysql/upgrade4.15-4.15.1.sql'; break; } //end switch } diff --git a/build/make_release.sh b/build/make_release.sh index 7e44a0d16..6a90384bb 100755 --- a/build/make_release.sh +++ b/build/make_release.sh @@ -7,7 +7,11 @@ MYSQL_PWD=a; cd $BASE_DIR; -xgettext --no-wrap --from-code=utf-8 --language=PHP -o locale/en_GB.utf8/LC_MESSAGES/messages.pot *php includes/*.php includes/*.inc reportwriter/*.php reportwriter/*.inc reportwriter/forms/*.html reportwriter/admin/*.php reportwriter/admin/*.inc reportwriter/admin/forms/*.html api/*.php install/*.php ../webSHOP/*.php ../webSHOP/includes/*.php +# xgettext: Extracts translatable strings from given input file paths + +xgettext --no-wrap --from-code=utf-8 -L php -o locale/en_GB.utf8/LC_MESSAGES/messages.pot *.php api/*.php includes/*.inc includes/*.php install/*.php reportwriter/*.inc reportwriter/*.php reportwriter/admin/*.inc reportwriter/admin/*.php reportwriter/admin/forms/*.html reportwriter/forms/*.html reportwriter/languages/en_US/*.php ../webSHOP/*.php ../webSHOP/includes/*.php + +# msgmerge: Merges two Uniforum style .po files together msgmerge -U -N --backup=off --no-wrap locale/ar_EG.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot msgmerge -U -N --backup=off --no-wrap locale/ar_SY.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot @@ -45,6 +49,7 @@ msgmerge -U -N --backup=off --no-wrap locale/zh_CN.utf8/LC_MESSAGES/messages.po msgmerge -U -N --backup=off --no-wrap locale/zh_HK.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot msgmerge -U -N --backup=off --no-wrap locale/zh_TW.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +# msgfmt: Generates a binary message catalog from a textual translation description msgfmt -o locale/ar_EG.utf8/LC_MESSAGES/messages.mo locale/ar_EG.utf8/LC_MESSAGES/messages.po msgfmt -o locale/ar_SY.utf8/LC_MESSAGES/messages.mo locale/ar_SY.utf8/LC_MESSAGES/messages.po diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index c06762357..8a8612c73 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -15,8 +15,27 @@ For changelogs earlier than v4.14.1, please refer to [CHANGELOG_ARCHIVE.md]. | Description | Type | Author | Date | Details | Ref | |:-----------:|:----:|:------:|:----:|:-------:|:---:| + +## [v4.15.1] - 2019-06-16 + +| Description | Type | Author | Date | Details | Ref | +|:-----------:|:----:|:------:|:----:|:-------:|:---:| +| index.php: Properly check return from database before showing report links | Fixed | Tim Schofield | 2019-06-09 | [View](https://github.com/webERP-team/webERP/commit/44f680c34d76e2ae794e678335e5310ebad37aad) | [Forum](http://www.weberp.org/forum/showthread.php?tid=8345) | +| GLTransInquiry.php: Fix to previous commit - ovdiscount is not a field in supptrans table, only debtotrans | Fixed | Tim Schofield | 2019-05-25 | [View](https://github.com/webERP-team/webERP/commit/71db91d6f4fd67b65025a713c3d5c30ab99e59a3) | | +| Credit_Invoice.php: Enable the shipping to be reduced to zero in case where the original invoice included a value for shipping costs. (reported in the forums by HDeriauFF) | Changed | Tim Schofield | 2019-05-04 | [View](https://github.com/webERP-team/webERP/commit/20f24e86d43d90bf584e6c205e548bffab287711) | [Forum](http://www.weberp.org/forum/showthread.php?tid=8339&pid=15697#pid15697) | +| CustomerAllocations.php: Allow user to perform allocation on receipts with amount zero but discount is non zero | Changed | express achiever | 2019-04-18 | [View](https://github.com/webERP-team/webERP/commit/c3498d37f2da76238cc9113f61ff9992c6be9956) | | +| BOMs.php: Incorporate selection box to either show all levels of a BOM or just the top level | Changed | Tim Schofield | 2019-04-14 | [View](https://github.com/webERP-team/webERP/commit/faa70d7c68bfb5b761e504e2a2c2efeae5f3014c) | | +| Include the branch name in the inquiry (with standardized code updates) | Added/Changed | Tim Schofield/HDeriauFF | 2019-04-14 | [View](https://github.com/webERP-team/webERP/commit/14ccc08f8cdd4063f0971c891af6b877adb4101a) | [Forum](http://www.weberp.org/forum/showthread.php?tid=8325) | +| New GL journal templating system | Added | Tim Schofield | 2019-04-05 | [View](https://github.com/webERP-team/webERP/commit/621416105ff9ffe92f7e30a33687f81c224f5b82) | | +| Fix gettext calls and standardize code | Fixed | Paul Becker | 2019-04-05 | [View](https://github.com/webERP-team/webERP/commit/b902c3eba66cb265e81dcedc8fc9574e0915e6a2) | | +| SupplierTransInquiry.php: Fix sql search by supplier id condition | Fixed | express achiever | 2019-03-26 | [View](https://github.com/webERP-team/webERP/commit/1074421d4aa01dfea24462b83b1ae735d3165a70) | | | GLTransInquiry.php: Fix where discount is entered at payment but not included in the report line item calculation | Fixed | express achiever | 2019-03-24 | [View](https://github.com/webERP-team/webERP/commit/dd1895f74dab21ac30222bc11ee6379d6316a48e) | | | StockStatus.php: Table formatting issue | Fixed | express achiever | 2019-03-24 | [View](https://github.com/webERP-team/webERP/commit/0e982f34da72806e8d556126c6be7eeeaee364cc) | | +| French translation: Minor translation update | Changed | Rafael Chacón | 2019-03-21 | [View](https://github.com/webERP-team/webERP/commit/6b2fb4da40620147048502192de144e8d7e198af) | | +| Standardize code: To various files | Changed | Rafael Chacón | 2019-03-18 | [View](https://github.com/webERP-team/webERP/commit/1119ec935d2cf0783ea52f8514f8275e5ed2b1bd) | | +| Code updates: To various files | Changed | Rafael Chacón | 2019-03-18 | [View](https://github.com/webERP-team/webERP/commit/a632a84b6bf483f06fcb2e50f434bde1b4ab8c67) | | +| GLStatements.php: Script updates before upload | Changed | Rafael Chacón | 2019-03-14 | [View](https://github.com/webERP-team/webERP/commit/b872bec3de867e2227315f4346a5e8c5972ad99a) | | +| Rebuild language files and a few minor code changes | Changed | Rafael Chacón | 2019-02-24 | [View](https://github.com/webERP-team/webERP/commit/df22cd372c468f5e27646bde37d601e17e1f4240) | | | Replace texts with blanks with trimmed text | Changed | Rafael Chacón | 2019-02-21 | [View](https://github.com/webERP-team/webERP/commit/972c7c145649af2b141d0b17756a5fb1a0a7ed7e) | | | Fix country name in Currencies.php | Fixed | Rafael Chacón | 2019-02-20 | [View](https://github.com/webERP-team/webERP/commit/c6f4d97d496d3ee5289e7ef577b536e50782195a) | | | Fix height in #QuickMenuDiv li | Fixed | Rafael Chacón | 2019-02-20 | [View](https://github.com/webERP-team/webERP/commit/c8cb323b16105866c9d576b0d69c2969cee94962) | | diff --git a/includes/ConnectDB.inc b/includes/ConnectDB.inc index e28230b4f..9b31fcf70 100644 --- a/includes/ConnectDB.inc +++ b/includes/ConnectDB.inc @@ -3,7 +3,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.15'; //must update manually every time there is a DB change +$Version='4.15.1'; //must update manually every time there is a DB change require_once ($PathPrefix .'includes/MiscFunctions.php'); if (!isset($_SESSION['DatabaseName'])){ diff --git a/index.php b/index.php index 035188530..d52c95b89 100644 --- a/index.php +++ b/index.php @@ -1,16 +1,14 @@ @@ -28,9 +26,9 @@ '; - include('includes/footer.php'); + include ('includes/footer.php'); exit; -} elseif (isset($CustomerLogin) AND $CustomerLogin==1){ +} elseif (isset($CustomerLogin) and $CustomerLogin == 1) { echo '
'; - include('includes/footer.php'); + include ('includes/footer.php'); exit; } -if (isset($_GET['Application'])){ /*This is sent by this page (to itself) when the user clicks on a tab */ +if (isset($_GET['Application'])) { /*This is sent by this page (to itself) when the user clicks on a tab */ $_SESSION['Module'] = $_GET['Application']; } @@ -68,23 +66,23 @@ echo '