Skip to content

Commit

Permalink
Merge pull request #172 from webERP-team/release_4.15.1
Browse files Browse the repository at this point in the history
Release 4.15.1
  • Loading branch information
TurboPT authored Jun 23, 2019
2 parents abc1173 + cc91203 commit d0d79c2
Show file tree
Hide file tree
Showing 79 changed files with 84,414 additions and 258,344 deletions.
135 changes: 64 additions & 71 deletions GLTransInquiry.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<?php

include ('includes/session.php');
$Title = _('General Ledger Transaction Inquiry');
$ViewTopic = 'GeneralLedger';
$BookMark = 'GLTransInquiry';
include('includes/header.php');
include ('includes/header.php');

$MenuURL = '<div><a href="'. $RootPath . '/index.php?&amp;Application=GL">' . _('General Ledger Menu') . '</a></div>';
$MenuURL = '<div><a href="' . $RootPath . '/index.php?&amp;Application=GL">' . _('General Ledger Menu') . '</a></div>';

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,
Expand All @@ -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 '<p class="page_title_text"><img alt="" src="' . $RootPath, '/css/', $Theme, '/images/magnifier.png" title="' .
_('General Ledger Transaction Inquiry') . '" />' . ' ' .
_('General Ledger Transaction Inquiry') . '</p>';
echo '<p class="page_title_text"><img alt="" src="' . $RootPath, '/css/', $Theme, '/images/magnifier.png" title="' . _('General Ledger Transaction Inquiry') . '" />' . ' ' . _('General Ledger Transaction Inquiry') . '</p>';

echo '<table class="selection">'; //Main table
echo '<tr>
Expand Down Expand Up @@ -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 = '&nbsp;';
} 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 = '&nbsp;';
}
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 = '&amp;TransAfterDate=' . urlencode($TranDate);
if ($TransRow['account'] == $_SESSION['CompanyRecord']['debtorsact'] and $AnalysisCompleted == 'Not Yet') {
$URL = $RootPath . '/CustomerInquiry.php?CustomerID=';
$FromDate = '&amp;TransAfterDate=' . urlencode($TranDate);

$DetailSQL = "SELECT debtortrans.debtorno AS otherpartycode,
$DetailSQL = "SELECT debtortrans.debtorno AS otherpartycode,
debtortrans.ovamount,
debtortrans.ovgst,
debtortrans.ovfreight,
Expand All @@ -104,92 +101,90 @@
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 = '&amp;FromDate=' . urlencode($TranDate);
} elseif ($TransRow['account'] == $_SESSION['CompanyRecord']['creditorsact'] and $AnalysisCompleted == 'Not Yet') {
$URL = $RootPath . '/SupplierInquiry.php?SupplierID=';
$FromDate = '&amp;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'] = '&nbsp;';
}
if (mb_strlen($TransRow['narrative']) == 0) {
$TransRow['narrative'] = '&nbsp;';
}

echo '<tr class="striped_row">
echo '<tr class="striped_row">
<td>' . MonthAndYearFromSQLDate($TransRow['lastdate_in_period']) . '</td>
<td>' . $TranDate . '</td>';

if ($URL == "") {
// User is not allowed to see this GL account, don't show the details
echo ' <td>' . $AccountName . '</td>
if ($URL == "") {
// User is not allowed to see this GL account, don't show the details
echo ' <td>' . $AccountName . '</td>
<td>' . $AccountName . '</td>';
}else{
echo ' <td><a href="' . $URL . '">' . $AccountName . '</a></td>
} else {
echo ' <td><a href="' . $URL . '">' . $AccountName . '</a></td>
<td>' . $TransRow['narrative'] . '</td>';
}
}

echo ' <td class="number">' . $DebitAmount . '</td>
echo ' <td class="number">' . $DebitAmount . '</td>
<td class="number">' . $CreditAmount . '</td>
<td>' . $Posted . '</td>
</tr>';
}

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 = '&nbsp;';
} 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 = '&nbsp;';
}
} 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 = '&nbsp;';
} 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 = '&nbsp;';
}
}

echo '<tr class="striped_row">
<td>' . MonthAndYearFromSQLDate($TransRow['lastdate_in_period']) . '</td>
<td>' . $TranDate . '</td>
<td><a href="' . $URL . $DetailRow['otherpartycode'] . $FromDate . '">' .
$TransRow['accountname'] . ' - ' . $DetailRow['otherparty'] . '</a></td>
<td><a href="' . $URL . $DetailRow['otherpartycode'] . $FromDate . '">' . $TransRow['accountname'] . ' - ' . $DetailRow['otherparty'] . '</a></td>
<td>' . $TransRow['narrative'] . '</td>
<td class="number">' . $Debit . '</td>
<td class="number">' . $Credit . '</td>
Expand All @@ -204,16 +199,14 @@

echo '<tr style="background-color:#FFFFFF">
<td class="number" colspan="4"><b>' . _('Total') . '</b></td>
<td class="number"><b>' .
locale_number_format(($DebitTotal),$_SESSION['CompanyRecord']['decimalplaces']) . '</b></td>
<td class="number"><b>' .
locale_number_format((-$CreditTotal),$_SESSION['CompanyRecord']['decimalplaces']) . '</b></td>
<td class="number"><b>' . locale_number_format(($DebitTotal), $_SESSION['CompanyRecord']['decimalplaces']) . '</b></td>
<td class="number"><b>' . locale_number_format((-$CreditTotal), $_SESSION['CompanyRecord']['decimalplaces']) . '</b></td>
<td>&nbsp;</td>
</tr>
</table>';
}

}

include('includes/footer.php');
include ('includes/footer.php');
?>
2 changes: 2 additions & 0 deletions UpgradeDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
7 changes: 6 additions & 1 deletion build/make_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
19 changes: 19 additions & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) | |
Expand Down
2 changes: 1 addition & 1 deletion includes/ConnectDB.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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'])){
Expand Down
Loading

0 comments on commit d0d79c2

Please sign in to comment.