This list is closed, nobody may subscribe to it.
2011 |
Jan
(14) |
Feb
(42) |
Mar
(56) |
Apr
(60) |
May
(54) |
Jun
(48) |
Jul
(74) |
Aug
(52) |
Sep
(68) |
Oct
(64) |
Nov
(42) |
Dec
(62) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2012 |
Jan
(142) |
Feb
(270) |
Mar
(374) |
Apr
(230) |
May
(214) |
Jun
(116) |
Jul
(234) |
Aug
(66) |
Sep
(120) |
Oct
(16) |
Nov
(17) |
Dec
(41) |
2013 |
Jan
(19) |
Feb
(18) |
Mar
(8) |
Apr
(40) |
May
(121) |
Jun
(42) |
Jul
(127) |
Aug
(145) |
Sep
(27) |
Oct
(38) |
Nov
(83) |
Dec
(61) |
2014 |
Jan
(33) |
Feb
(35) |
Mar
(59) |
Apr
(41) |
May
(38) |
Jun
(45) |
Jul
(17) |
Aug
(58) |
Sep
(46) |
Oct
(51) |
Nov
(55) |
Dec
(36) |
2015 |
Jan
(57) |
Feb
(67) |
Mar
(70) |
Apr
(34) |
May
(32) |
Jun
(11) |
Jul
(3) |
Aug
(17) |
Sep
(16) |
Oct
(13) |
Nov
(30) |
Dec
(30) |
2016 |
Jan
(17) |
Feb
(12) |
Mar
(17) |
Apr
(20) |
May
(47) |
Jun
(15) |
Jul
(13) |
Aug
(30) |
Sep
(32) |
Oct
(20) |
Nov
(32) |
Dec
(24) |
2017 |
Jan
(16) |
Feb
|
Mar
(11) |
Apr
(11) |
May
(5) |
Jun
(42) |
Jul
(9) |
Aug
(10) |
Sep
(14) |
Oct
(15) |
Nov
(2) |
Dec
(29) |
2018 |
Jan
(28) |
Feb
(49) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <dai...@us...> - 2012-02-21 05:51:45
|
Revision: 4939 http://web-erp.svn.sourceforge.net/web-erp/?rev=4939&view=rev Author: daintree Date: 2012-02-21 05:51:38 +0000 (Tue, 21 Feb 2012) Log Message: ----------- fix ups Modified Paths: -------------- trunk/BankMatching.php Modified: trunk/BankMatching.php =================================================================== --- trunk/BankMatching.php 2012-02-20 16:50:06 UTC (rev 4938) +++ trunk/BankMatching.php 2012-02-21 05:51:38 UTC (rev 4939) @@ -6,8 +6,8 @@ $title = _('Bank Account Matching'); include('includes/header.inc'); -if ((isset($_GET['Type']) and $_GET['Type']=='Receipts') or - (isset($_POST['Type']) and $_POST['Type']=='Receipts')){ +if ((isset($_GET['Type']) AND $_GET['Type']=='Receipts') + OR (isset($_POST['Type']) AND $_POST['Type']=='Receipts')){ $Type = 'Receipts'; $TypeName =_('Receipts'); @@ -15,8 +15,8 @@ <img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Bank Matching') . '" alt="" />' . ' ' . _('Bank Account Matching - Receipts') . ' </p>'; -} elseif ((isset($_GET['Type']) and $_GET['Type']=='Payments') or - (isset($_POST['Type']) and $_POST['Type']=='Payments')) { +} elseif ((isset($_GET['Type']) AND $_GET['Type']=='Payments') + OR (isset($_POST['Type']) AND $_POST['Type']=='Payments')) { $Type = 'Payments'; $TypeName =_('Payments'); @@ -38,9 +38,9 @@ $_POST['First20_or_All']='All'; } -if (isset($_POST['Update']) and $_POST['RowCounter']>1){ +if (isset($_POST['Update']) AND $_POST['RowCounter']>1){ for ($Counter=1;$Counter <= $_POST['RowCounter']; $Counter++){ - if (isset($_POST['Clear_' . $Counter]) and $_POST['Clear_' . $Counter]==True){ + if (isset($_POST['Clear_' . $Counter]) AND $_POST['Clear_' . $Counter]==True){ /*Get amount to be cleared */ $sql = "SELECT amount, exrate @@ -56,8 +56,12 @@ $ErrMsg = _('Could not match off this payment because'); $result = DB_query($sql,$db,$ErrMsg); - } elseif ((isset($_POST['AmtClear_' . $Counter]) and filter_number_format($_POST['AmtClear_' . $Counter])<0 and $Type=='Payments') - or ($Type=='Receipts' and isset($_POST['AmtClear_' . $Counter]) and filter_number_format($_POST['AmtClear_' . $Counter])>0)) { + } elseif ((isset($_POST['AmtClear_' . $Counter]) + AND filter_number_format($_POST['AmtClear_' . $Counter])<0 + AND $Type=='Payments') + OR ($Type=='Receipts' AND isset($_POST['AmtClear_' . $Counter]) + AND filter_number_format($_POST['AmtClear_' . $Counter])>0)) { + /*if the amount entered was numeric and negative for a payment or positive for a receipt */ $sql = "UPDATE banktrans SET amountcleared=" . filter_number_format($_POST['AmtClear_' . $Counter]) . " @@ -66,7 +70,9 @@ $ErrMsg = _('Could not update the amount matched off this bank transaction because'); $result = DB_query($sql,$db,$ErrMsg); - } elseif (isset($_POST['Unclear_' . $Counter]) and $_POST['Unclear_' . $Counter]==True){ + } elseif (isset($_POST['Unclear_' . $Counter]) + AND $_POST['Unclear_' . $Counter]==True){ + $sql = "UPDATE banktrans SET amountcleared = 0 WHERE banktransid='" . $_POST['BankTrans_' . $Counter]."'"; $ErrMsg = _('Could not unclear this bank transaction because'); @@ -92,7 +98,9 @@ $sql = "SELECT accountcode, bankaccountname FROM bankaccounts"; $resultBankActs = DB_query($sql,$db); while ($myrow=DB_fetch_array($resultBankActs)){ - if (isset($_POST['BankAccount']) and $myrow['accountcode']==$_POST['BankAccount']){ + if (isset($_POST['BankAccount']) + AND $myrow['accountcode']==$_POST['BankAccount']){ + echo '<option selected="selected" value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . '</option>'; } else { echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . '</option>'; @@ -102,10 +110,10 @@ echo '</select></td> </tr>'; -if (!isset($_POST['BeforeDate']) or !Is_Date($_POST['BeforeDate'])){ +if (!isset($_POST['BeforeDate']) OR !Is_Date($_POST['BeforeDate'])){ $_POST['BeforeDate'] = Date($_SESSION['DefaultDateFormat']); } -if (!isset($_POST['AfterDate']) or !Is_Date($_POST['AfterDate'])){ +if (!isset($_POST['AfterDate']) OR !Is_Date($_POST['AfterDate'])){ $_POST['AfterDate'] = Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-3,Date('d'),Date('y'))); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-02-20 16:50:17
|
Revision: 4938 http://web-erp.svn.sourceforge.net/web-erp/?rev=4938&view=rev Author: tim_schofield Date: 2012-02-20 16:50:06 +0000 (Mon, 20 Feb 2012) Log Message: ----------- Merge from Tims branch and bring Phils code in line with coding guidelines Modified Paths: -------------- trunk/BankMatching.php Modified: trunk/BankMatching.php =================================================================== --- trunk/BankMatching.php 2012-02-20 13:14:51 UTC (rev 4937) +++ trunk/BankMatching.php 2012-02-20 16:50:06 UTC (rev 4938) @@ -6,10 +6,8 @@ $title = _('Bank Account Matching'); include('includes/header.inc'); -if ((isset($_GET['Type']) - AND $_GET['Type']=='Receipts') - OR (isset($_POST['Type']) - AND $_POST['Type']=='Receipts')){ +if ((isset($_GET['Type']) and $_GET['Type']=='Receipts') or + (isset($_POST['Type']) and $_POST['Type']=='Receipts')){ $Type = 'Receipts'; $TypeName =_('Receipts'); @@ -17,12 +15,14 @@ <img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Bank Matching') . '" alt="" />' . ' ' . _('Bank Account Matching - Receipts') . ' </p>'; -} elseif ((isset($_GET['Type']) AND $_GET['Type']=='Payments') OR +} elseif ((isset($_GET['Type']) and $_GET['Type']=='Payments') or (isset($_POST['Type']) and $_POST['Type']=='Payments')) { $Type = 'Payments'; $TypeName =_('Payments'); - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_delete.png" title="' . _('Bank Matching') . '" alt="" />' . ' ' . _('Bank Account Matching - Payments') . '</p>'; + echo '<p class="page_title_text"> + <img src="'.$rootpath.'/css/'.$theme.'/images/money_delete.png" title="' . _('Bank Matching') . '" alt="" />' . ' ' . _('Bank Account Matching - Payments') . ' + </p>'; } else { @@ -38,38 +38,35 @@ $_POST['First20_or_All']='All'; } -if (isset($_POST['Update']) AND $_POST['RowCounter']>1){ +if (isset($_POST['Update']) and $_POST['RowCounter']>1){ for ($Counter=1;$Counter <= $_POST['RowCounter']; $Counter++){ - if (isset($_POST['Clear_' . $Counter]) AND $_POST['Clear_' . $Counter]==True){ + if (isset($_POST['Clear_' . $Counter]) and $_POST['Clear_' . $Counter]==True){ /*Get amount to be cleared */ $sql = "SELECT amount, - exrate - FROM banktrans - WHERE banktransid='" . $_POST['BankTrans_' . $Counter]."'"; + exrate + FROM banktrans + WHERE banktransid='" . $_POST['BankTrans_' . $Counter]."'"; $ErrMsg = _('Could not retrieve transaction information'); $result = DB_query($sql,$db,$ErrMsg); $myrow=DB_fetch_array($result); $AmountCleared = round($myrow[0] / $myrow[1],2); /*Update the banktrans recoord to match it off */ - $sql = "UPDATE banktrans SET amountcleared= ". $AmountCleared . - " WHERE banktransid='" . $_POST['BankTrans_' . $Counter] . "'"; + $sql = "UPDATE banktrans SET amountcleared= ". $AmountCleared . "' + WHERE banktransid='" . $_POST['BankTrans_' . $Counter] . "'"; $ErrMsg = _('Could not match off this payment because'); $result = DB_query($sql,$db,$ErrMsg); - } elseif ((isset($_POST['AmtClear_' . $Counter]) - AND filter_number_format($_POST['AmtClear_' . $Counter])<0 AND $Type=='Payments') - OR ($Type=='Receipts' AND isset($_POST['AmtClear_' . $Counter]) AND filter_number_format($_POST['AmtClear_' . $Counter])>0)){ + } elseif ((isset($_POST['AmtClear_' . $Counter]) and filter_number_format($_POST['AmtClear_' . $Counter])<0 and $Type=='Payments') + or ($Type=='Receipts' and isset($_POST['AmtClear_' . $Counter]) and filter_number_format($_POST['AmtClear_' . $Counter])>0)) { /*if the amount entered was numeric and negative for a payment or positive for a receipt */ - + $sql = "UPDATE banktrans SET amountcleared=" . filter_number_format($_POST['AmtClear_' . $Counter]) . " WHERE banktransid='" . $_POST['BankTrans_' . $Counter]."'"; $ErrMsg = _('Could not update the amount matched off this bank transaction because'); $result = DB_query($sql,$db,$ErrMsg); - } elseif (isset($_POST['Unclear_' . $Counter]) - AND $_POST['Unclear_' . $Counter]==True){ - + } elseif (isset($_POST['Unclear_' . $Counter]) and $_POST['Unclear_' . $Counter]==True){ $sql = "UPDATE banktrans SET amountcleared = 0 WHERE banktransid='" . $_POST['BankTrans_' . $Counter]."'"; $ErrMsg = _('Could not unclear this bank transaction because'); @@ -82,7 +79,7 @@ echo '<div class="page_help_text">' . _('Use this screen to match webERP Receipts and Payments to your Bank Statement. Check your bank statement and click the check-box when you find the matching transaction.') . '</div><br />'; -echo '<form action="'. htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post">'; +echo '<form action="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="Type" value="' . $Type . '" />'; @@ -105,20 +102,22 @@ echo '</select></td> </tr>'; -if (!isset($_POST['BeforeDate']) OR !Is_Date($_POST['BeforeDate'])){ +if (!isset($_POST['BeforeDate']) or !Is_Date($_POST['BeforeDate'])){ $_POST['BeforeDate'] = Date($_SESSION['DefaultDateFormat']); } -if (!isset($_POST['AfterDate']) OR !Is_Date($_POST['AfterDate'])){ +if (!isset($_POST['AfterDate']) or !Is_Date($_POST['AfterDate'])){ $_POST['AfterDate'] = Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-3,Date('d'),Date('y'))); } // Change to allow input of FROM DATE and then TO DATE, instead of previous back-to-front method, add datepicker echo '<tr> <td>' . _('Show') . ' ' . $TypeName . ' ' . _('from') . ':</td> - <td><input tabindex="3" type="text" name="AfterDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size="12" maxlength="10" onChange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . $_POST['AfterDate'] . '" /></td></tr>'; + <td><input tabindex="3" type="text" name="AfterDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size="12" maxlength="10" onChange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . $_POST['AfterDate'] . '" /></td> + </tr>'; echo '<td>' . _('to') . ':</td> - <td><input tabindex="2" type="text" name="BeforeDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size="12" maxlength="10" onChange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . $_POST['BeforeDate'] . '" /></td>'; + <td><input tabindex="2" type="text" name="BeforeDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size="12" maxlength="10" onChange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . $_POST['BeforeDate'] . '" /></td> + </tr>'; echo '<tr> <td colspan="3">' . _('Choose outstanding') . ' ' . $TypeName . ' ' . _('only or all') . ' ' . $TypeName . ' ' . _('in the date range') . ':</td> <td><select tabindex="4" name="Ostg_or_All">'; @@ -134,8 +133,7 @@ </tr>'; echo '<tr> - <td colspan="3">' . _('Choose to display only the first 20 matching') . ' ' . $TypeName . ' ' . - _('or all') . ' ' . $TypeName . ' ' . _('meeting the criteria') . ':</td> + <td colspan="3">' . _('Choose to display only the first 20 matching') . ' ' . $TypeName . ' ' . _('or all') . ' ' . $TypeName . ' ' . _('meeting the criteria') . ':</td> <td><select tabindex="5" name="First20_or_All">'; if ($_POST['First20_or_All']=='All'){ echo '<option selected="selected" value="All">' . _('Show all') . ' ' . $TypeName . ' ' . _('in the date range') . '</option>'; @@ -144,10 +142,10 @@ echo '<option value="All">' . _('Show all') . ' ' . $TypeName . ' ' . _('in the date range') . '</option>'; echo '<option selected="selected" value="First20">' . _('Show only the first 20') . ' ' . $TypeName . '</option>'; } + echo '</select></td> </tr>'; - echo '</table> <br /> <div class="centre"> @@ -155,8 +153,7 @@ <p> <a href="' . $rootpath . '/BankReconciliation.php">' . _('Show reconciliation') . '</a> </p> - </div> - <hr />'; + </div>'; $InputError=0; if (!Is_Date($_POST['BeforeDate'])){ @@ -172,9 +169,9 @@ $_SESSION['DefaultDateFormat'],'error'); } -if ($InputError !=1 - AND isset($_POST['BankAccount']) - AND $_POST['BankAccount']!='' +if ($InputError !=1 + AND isset($_POST['BankAccount']) + AND $_POST['BankAccount']!='' AND isset($_POST['ShowTransactions'])){ $SQLBeforeDate = FormatDateForSQL($_POST['BeforeDate']); @@ -200,9 +197,9 @@ banktranstype FROM banktrans WHERE amount < 0 - AND transdate >= '". $SQLAfterDate . "' - AND transdate <= '" . $SQLBeforeDate . "' - AND bankact='" .$_POST['BankAccount'] . "' + AND transdate >= '". $SQLAfterDate . "' + AND transdate <= '" . $SQLBeforeDate . "' + AND bankact='" . $_POST['BankAccount'] . "' ORDER BY transdate"; } else { /* Type must == Receipts */ @@ -213,10 +210,10 @@ amount/exrate as amt, banktranstype FROM banktrans - WHERE amount >0 - AND transdate >= '". $SQLAfterDate . "' - AND transdate <= '" . $SQLBeforeDate . "' - AND bankact='" .$_POST['BankAccount'] . "' + WHERE amount > 0 + AND transdate >= '". $SQLAfterDate . "' + AND transdate <= '" . $SQLBeforeDate . "' + AND bankact='" . $_POST['BankAccount'] . "' ORDER BY transdate"; } } else { /*it must be only the outstanding bank trans required */ @@ -228,11 +225,11 @@ amount/exrate as amt, banktranstype FROM banktrans - WHERE amount <0 - AND transdate >= '". $SQLAfterDate . "' - AND transdate <= '" . $SQLBeforeDate . "' - AND bankact=" .$_POST['BankAccount'] . " - AND ABS(amountcleared - (amount / exrate)) > 0.009 + WHERE amount < 0 + AND transdate >= '". $SQLAfterDate . "' + AND transdate <= '" . $SQLBeforeDate . "' + AND bankact=" . $_POST['BankAccount'] . " + AND ABS(amountcleared - (amount / exrate)) > 0.009 ORDER BY transdate"; } else { /* Type must == Receipts */ $sql = "SELECT banktransid, @@ -242,11 +239,11 @@ amount/exrate as amt, banktranstype FROM banktrans - WHERE amount >0 - AND transdate >= '". $SQLAfterDate . "' - AND transdate <= '" . $SQLBeforeDate . "' - AND bankact='" .$_POST['BankAccount'] . "' - AND ABS(amountcleared - (amount / exrate)) > 0.009 + WHERE amount > 0 + AND transdate >= '". $SQLAfterDate . "' + AND transdate <= '" . $SQLBeforeDate . "' + AND bankact='" . $_POST['BankAccount'] . "' + AND ABS(amountcleared - (amount / exrate)) > 0.009 ORDER BY transdate"; } } @@ -257,19 +254,18 @@ $ErrMsg = _('The payments with the selected criteria could not be retrieved because'); $PaymentsResult = DB_query($sql, $db, $ErrMsg); - $TableHeader = '<tr> - <th>'. _('Ref'). '</th> - <th>' . $TypeName . '</th> - <th>' . _('Date') . '</th> - <th>' . _('Amount') . ' ' . $CurrCode .'</th> - <th>' . _('Outstanding') . ' ' . $CurrCode . '</th> - <th colspan="3">' . _('Clear') . ' / ' . _('Unclear') . '</th> - </tr>'; - echo '<table class="selection">' . $TableHeader; + echo '<table cellpadding="2" class="selection"> + <tr> + <th>'. _('Cheque No') . '</th> + <th>' . _('Ref') . '</th> + <th>' . $TypeName . '</th> + <th>' . _('Date') . '</th> + <th>' . _('Amount') . '</th> + <th>' . _('Outstanding') . '</th> + <th colspan="3">' . _('Clear') . ' / ' . _('Unclear') . '</th> + </tr>'; - - $j = 1; //page length counter - $k=0; //row colour counter + $k = 0; //row colour counter $i = 1; //no of rows counter while ($myrow=DB_fetch_array($PaymentsResult)) { @@ -279,23 +275,23 @@ if (ABS($Outstanding)<0.009){ /*the payment is cleared dont show the check box*/ printf('<tr bgcolor="#CCCEEE"> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td colspan="2">%s</td> - <td><input type="checkbox" name="Unclear_%s" /><input type="hidden" name="BankTrans_%s" value="%s" /></td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td colspan="2">%s</td> + <td><input type="checkbox" name="Unclear_%s" /><input type="hidden" name="BankTrans_%s" value="%s" /></td> </tr>', - $myrow['ref'], - $myrow['banktranstype'], - $DisplayTranDate, - locale_number_format($myrow['amt'],$CurrDecimalPlaces), - locale_number_format($Outstanding,$CurrDecimalPlaces), - _('Unclear'), - $i, - $i, - $myrow['banktransid']); + $myrow['ref'], + $myrow['banktranstype'], + $DisplayTranDate, + locale_number_format($myrow['amt'],$CurrDecimalPlaces), + locale_number_format($Outstanding,$CurrDecimalPlaces), + _('Unclear'), + $i, + $i, + $myrow['banktransid']); } else{ if ($k==1){ @@ -305,36 +301,28 @@ echo '<tr class="OddTableRows">'; $k=1; } - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td><input type="checkbox" name="Clear_%s" /><input type="hidden" name="BankTrans_%s" value="%s" /></td> - <td colspan="2"><input type="text" maxlength="15" size="15" class="number" name="AmtClear_%s" /></td> + printf('<td>%s</td> + <td>%s</td> + <td>%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td><input type="checkbox" name="Clear_%s" /><input type="hidden" name="BankTrans_%s" value="%s" /></td> + <td colspan="2"><input type="text" maxlength="15" size="15" class="number" name="AmtClear_%s" /></td> </tr>', - $myrow['ref'], - $myrow['banktranstype'], - $DisplayTranDate, - locale_number_format($myrow['amt'],$CurrDecimalPlaces), - locale_number_format($Outstanding,$CurrDecimalPlaces), - $i, - $i, - $myrow['banktransid'], - $i + $myrow['ref'], + $myrow['banktranstype'], + $DisplayTranDate, + locale_number_format($myrow['amt'],$CurrDecimalPlaces), + locale_number_format($Outstanding,$CurrDecimalPlaces), + $i, + $i, + $myrow['banktransid'], + $i ); } - - $j++; - If ($j == 12){ - $j=1; - echo $TableHeader; - } - //end of page full new headings if $i++; } //end of while loop - echo '</table> <br /> <div class="centre"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-02-20 16:50:17
|
Revision: 4938 http://web-erp.svn.sourceforge.net/web-erp/?rev=4938&view=rev Author: tim_schofield Date: 2012-02-20 16:50:06 +0000 (Mon, 20 Feb 2012) Log Message: ----------- Merge from Tims branch and bring Phils code in line with coding guidelines Modified Paths: -------------- trunk/BankMatching.php Modified: trunk/BankMatching.php =================================================================== --- trunk/BankMatching.php 2012-02-20 13:14:51 UTC (rev 4937) +++ trunk/BankMatching.php 2012-02-20 16:50:06 UTC (rev 4938) @@ -6,10 +6,8 @@ $title = _('Bank Account Matching'); include('includes/header.inc'); -if ((isset($_GET['Type']) - AND $_GET['Type']=='Receipts') - OR (isset($_POST['Type']) - AND $_POST['Type']=='Receipts')){ +if ((isset($_GET['Type']) and $_GET['Type']=='Receipts') or + (isset($_POST['Type']) and $_POST['Type']=='Receipts')){ $Type = 'Receipts'; $TypeName =_('Receipts'); @@ -17,12 +15,14 @@ <img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Bank Matching') . '" alt="" />' . ' ' . _('Bank Account Matching - Receipts') . ' </p>'; -} elseif ((isset($_GET['Type']) AND $_GET['Type']=='Payments') OR +} elseif ((isset($_GET['Type']) and $_GET['Type']=='Payments') or (isset($_POST['Type']) and $_POST['Type']=='Payments')) { $Type = 'Payments'; $TypeName =_('Payments'); - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_delete.png" title="' . _('Bank Matching') . '" alt="" />' . ' ' . _('Bank Account Matching - Payments') . '</p>'; + echo '<p class="page_title_text"> + <img src="'.$rootpath.'/css/'.$theme.'/images/money_delete.png" title="' . _('Bank Matching') . '" alt="" />' . ' ' . _('Bank Account Matching - Payments') . ' + </p>'; } else { @@ -38,38 +38,35 @@ $_POST['First20_or_All']='All'; } -if (isset($_POST['Update']) AND $_POST['RowCounter']>1){ +if (isset($_POST['Update']) and $_POST['RowCounter']>1){ for ($Counter=1;$Counter <= $_POST['RowCounter']; $Counter++){ - if (isset($_POST['Clear_' . $Counter]) AND $_POST['Clear_' . $Counter]==True){ + if (isset($_POST['Clear_' . $Counter]) and $_POST['Clear_' . $Counter]==True){ /*Get amount to be cleared */ $sql = "SELECT amount, - exrate - FROM banktrans - WHERE banktransid='" . $_POST['BankTrans_' . $Counter]."'"; + exrate + FROM banktrans + WHERE banktransid='" . $_POST['BankTrans_' . $Counter]."'"; $ErrMsg = _('Could not retrieve transaction information'); $result = DB_query($sql,$db,$ErrMsg); $myrow=DB_fetch_array($result); $AmountCleared = round($myrow[0] / $myrow[1],2); /*Update the banktrans recoord to match it off */ - $sql = "UPDATE banktrans SET amountcleared= ". $AmountCleared . - " WHERE banktransid='" . $_POST['BankTrans_' . $Counter] . "'"; + $sql = "UPDATE banktrans SET amountcleared= ". $AmountCleared . "' + WHERE banktransid='" . $_POST['BankTrans_' . $Counter] . "'"; $ErrMsg = _('Could not match off this payment because'); $result = DB_query($sql,$db,$ErrMsg); - } elseif ((isset($_POST['AmtClear_' . $Counter]) - AND filter_number_format($_POST['AmtClear_' . $Counter])<0 AND $Type=='Payments') - OR ($Type=='Receipts' AND isset($_POST['AmtClear_' . $Counter]) AND filter_number_format($_POST['AmtClear_' . $Counter])>0)){ + } elseif ((isset($_POST['AmtClear_' . $Counter]) and filter_number_format($_POST['AmtClear_' . $Counter])<0 and $Type=='Payments') + or ($Type=='Receipts' and isset($_POST['AmtClear_' . $Counter]) and filter_number_format($_POST['AmtClear_' . $Counter])>0)) { /*if the amount entered was numeric and negative for a payment or positive for a receipt */ - + $sql = "UPDATE banktrans SET amountcleared=" . filter_number_format($_POST['AmtClear_' . $Counter]) . " WHERE banktransid='" . $_POST['BankTrans_' . $Counter]."'"; $ErrMsg = _('Could not update the amount matched off this bank transaction because'); $result = DB_query($sql,$db,$ErrMsg); - } elseif (isset($_POST['Unclear_' . $Counter]) - AND $_POST['Unclear_' . $Counter]==True){ - + } elseif (isset($_POST['Unclear_' . $Counter]) and $_POST['Unclear_' . $Counter]==True){ $sql = "UPDATE banktrans SET amountcleared = 0 WHERE banktransid='" . $_POST['BankTrans_' . $Counter]."'"; $ErrMsg = _('Could not unclear this bank transaction because'); @@ -82,7 +79,7 @@ echo '<div class="page_help_text">' . _('Use this screen to match webERP Receipts and Payments to your Bank Statement. Check your bank statement and click the check-box when you find the matching transaction.') . '</div><br />'; -echo '<form action="'. htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post">'; +echo '<form action="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="Type" value="' . $Type . '" />'; @@ -105,20 +102,22 @@ echo '</select></td> </tr>'; -if (!isset($_POST['BeforeDate']) OR !Is_Date($_POST['BeforeDate'])){ +if (!isset($_POST['BeforeDate']) or !Is_Date($_POST['BeforeDate'])){ $_POST['BeforeDate'] = Date($_SESSION['DefaultDateFormat']); } -if (!isset($_POST['AfterDate']) OR !Is_Date($_POST['AfterDate'])){ +if (!isset($_POST['AfterDate']) or !Is_Date($_POST['AfterDate'])){ $_POST['AfterDate'] = Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-3,Date('d'),Date('y'))); } // Change to allow input of FROM DATE and then TO DATE, instead of previous back-to-front method, add datepicker echo '<tr> <td>' . _('Show') . ' ' . $TypeName . ' ' . _('from') . ':</td> - <td><input tabindex="3" type="text" name="AfterDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size="12" maxlength="10" onChange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . $_POST['AfterDate'] . '" /></td></tr>'; + <td><input tabindex="3" type="text" name="AfterDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size="12" maxlength="10" onChange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . $_POST['AfterDate'] . '" /></td> + </tr>'; echo '<td>' . _('to') . ':</td> - <td><input tabindex="2" type="text" name="BeforeDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size="12" maxlength="10" onChange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . $_POST['BeforeDate'] . '" /></td>'; + <td><input tabindex="2" type="text" name="BeforeDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size="12" maxlength="10" onChange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . $_POST['BeforeDate'] . '" /></td> + </tr>'; echo '<tr> <td colspan="3">' . _('Choose outstanding') . ' ' . $TypeName . ' ' . _('only or all') . ' ' . $TypeName . ' ' . _('in the date range') . ':</td> <td><select tabindex="4" name="Ostg_or_All">'; @@ -134,8 +133,7 @@ </tr>'; echo '<tr> - <td colspan="3">' . _('Choose to display only the first 20 matching') . ' ' . $TypeName . ' ' . - _('or all') . ' ' . $TypeName . ' ' . _('meeting the criteria') . ':</td> + <td colspan="3">' . _('Choose to display only the first 20 matching') . ' ' . $TypeName . ' ' . _('or all') . ' ' . $TypeName . ' ' . _('meeting the criteria') . ':</td> <td><select tabindex="5" name="First20_or_All">'; if ($_POST['First20_or_All']=='All'){ echo '<option selected="selected" value="All">' . _('Show all') . ' ' . $TypeName . ' ' . _('in the date range') . '</option>'; @@ -144,10 +142,10 @@ echo '<option value="All">' . _('Show all') . ' ' . $TypeName . ' ' . _('in the date range') . '</option>'; echo '<option selected="selected" value="First20">' . _('Show only the first 20') . ' ' . $TypeName . '</option>'; } + echo '</select></td> </tr>'; - echo '</table> <br /> <div class="centre"> @@ -155,8 +153,7 @@ <p> <a href="' . $rootpath . '/BankReconciliation.php">' . _('Show reconciliation') . '</a> </p> - </div> - <hr />'; + </div>'; $InputError=0; if (!Is_Date($_POST['BeforeDate'])){ @@ -172,9 +169,9 @@ $_SESSION['DefaultDateFormat'],'error'); } -if ($InputError !=1 - AND isset($_POST['BankAccount']) - AND $_POST['BankAccount']!='' +if ($InputError !=1 + AND isset($_POST['BankAccount']) + AND $_POST['BankAccount']!='' AND isset($_POST['ShowTransactions'])){ $SQLBeforeDate = FormatDateForSQL($_POST['BeforeDate']); @@ -200,9 +197,9 @@ banktranstype FROM banktrans WHERE amount < 0 - AND transdate >= '". $SQLAfterDate . "' - AND transdate <= '" . $SQLBeforeDate . "' - AND bankact='" .$_POST['BankAccount'] . "' + AND transdate >= '". $SQLAfterDate . "' + AND transdate <= '" . $SQLBeforeDate . "' + AND bankact='" . $_POST['BankAccount'] . "' ORDER BY transdate"; } else { /* Type must == Receipts */ @@ -213,10 +210,10 @@ amount/exrate as amt, banktranstype FROM banktrans - WHERE amount >0 - AND transdate >= '". $SQLAfterDate . "' - AND transdate <= '" . $SQLBeforeDate . "' - AND bankact='" .$_POST['BankAccount'] . "' + WHERE amount > 0 + AND transdate >= '". $SQLAfterDate . "' + AND transdate <= '" . $SQLBeforeDate . "' + AND bankact='" . $_POST['BankAccount'] . "' ORDER BY transdate"; } } else { /*it must be only the outstanding bank trans required */ @@ -228,11 +225,11 @@ amount/exrate as amt, banktranstype FROM banktrans - WHERE amount <0 - AND transdate >= '". $SQLAfterDate . "' - AND transdate <= '" . $SQLBeforeDate . "' - AND bankact=" .$_POST['BankAccount'] . " - AND ABS(amountcleared - (amount / exrate)) > 0.009 + WHERE amount < 0 + AND transdate >= '". $SQLAfterDate . "' + AND transdate <= '" . $SQLBeforeDate . "' + AND bankact=" . $_POST['BankAccount'] . " + AND ABS(amountcleared - (amount / exrate)) > 0.009 ORDER BY transdate"; } else { /* Type must == Receipts */ $sql = "SELECT banktransid, @@ -242,11 +239,11 @@ amount/exrate as amt, banktranstype FROM banktrans - WHERE amount >0 - AND transdate >= '". $SQLAfterDate . "' - AND transdate <= '" . $SQLBeforeDate . "' - AND bankact='" .$_POST['BankAccount'] . "' - AND ABS(amountcleared - (amount / exrate)) > 0.009 + WHERE amount > 0 + AND transdate >= '". $SQLAfterDate . "' + AND transdate <= '" . $SQLBeforeDate . "' + AND bankact='" . $_POST['BankAccount'] . "' + AND ABS(amountcleared - (amount / exrate)) > 0.009 ORDER BY transdate"; } } @@ -257,19 +254,18 @@ $ErrMsg = _('The payments with the selected criteria could not be retrieved because'); $PaymentsResult = DB_query($sql, $db, $ErrMsg); - $TableHeader = '<tr> - <th>'. _('Ref'). '</th> - <th>' . $TypeName . '</th> - <th>' . _('Date') . '</th> - <th>' . _('Amount') . ' ' . $CurrCode .'</th> - <th>' . _('Outstanding') . ' ' . $CurrCode . '</th> - <th colspan="3">' . _('Clear') . ' / ' . _('Unclear') . '</th> - </tr>'; - echo '<table class="selection">' . $TableHeader; + echo '<table cellpadding="2" class="selection"> + <tr> + <th>'. _('Cheque No') . '</th> + <th>' . _('Ref') . '</th> + <th>' . $TypeName . '</th> + <th>' . _('Date') . '</th> + <th>' . _('Amount') . '</th> + <th>' . _('Outstanding') . '</th> + <th colspan="3">' . _('Clear') . ' / ' . _('Unclear') . '</th> + </tr>'; - - $j = 1; //page length counter - $k=0; //row colour counter + $k = 0; //row colour counter $i = 1; //no of rows counter while ($myrow=DB_fetch_array($PaymentsResult)) { @@ -279,23 +275,23 @@ if (ABS($Outstanding)<0.009){ /*the payment is cleared dont show the check box*/ printf('<tr bgcolor="#CCCEEE"> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td colspan="2">%s</td> - <td><input type="checkbox" name="Unclear_%s" /><input type="hidden" name="BankTrans_%s" value="%s" /></td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td colspan="2">%s</td> + <td><input type="checkbox" name="Unclear_%s" /><input type="hidden" name="BankTrans_%s" value="%s" /></td> </tr>', - $myrow['ref'], - $myrow['banktranstype'], - $DisplayTranDate, - locale_number_format($myrow['amt'],$CurrDecimalPlaces), - locale_number_format($Outstanding,$CurrDecimalPlaces), - _('Unclear'), - $i, - $i, - $myrow['banktransid']); + $myrow['ref'], + $myrow['banktranstype'], + $DisplayTranDate, + locale_number_format($myrow['amt'],$CurrDecimalPlaces), + locale_number_format($Outstanding,$CurrDecimalPlaces), + _('Unclear'), + $i, + $i, + $myrow['banktransid']); } else{ if ($k==1){ @@ -305,36 +301,28 @@ echo '<tr class="OddTableRows">'; $k=1; } - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td><input type="checkbox" name="Clear_%s" /><input type="hidden" name="BankTrans_%s" value="%s" /></td> - <td colspan="2"><input type="text" maxlength="15" size="15" class="number" name="AmtClear_%s" /></td> + printf('<td>%s</td> + <td>%s</td> + <td>%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td><input type="checkbox" name="Clear_%s" /><input type="hidden" name="BankTrans_%s" value="%s" /></td> + <td colspan="2"><input type="text" maxlength="15" size="15" class="number" name="AmtClear_%s" /></td> </tr>', - $myrow['ref'], - $myrow['banktranstype'], - $DisplayTranDate, - locale_number_format($myrow['amt'],$CurrDecimalPlaces), - locale_number_format($Outstanding,$CurrDecimalPlaces), - $i, - $i, - $myrow['banktransid'], - $i + $myrow['ref'], + $myrow['banktranstype'], + $DisplayTranDate, + locale_number_format($myrow['amt'],$CurrDecimalPlaces), + locale_number_format($Outstanding,$CurrDecimalPlaces), + $i, + $i, + $myrow['banktransid'], + $i ); } - - $j++; - If ($j == 12){ - $j=1; - echo $TableHeader; - } - //end of page full new headings if $i++; } //end of while loop - echo '</table> <br /> <div class="centre"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ex...@us...> - 2012-02-20 13:15:02
|
Revision: 4937 http://web-erp.svn.sourceforge.net/web-erp/?rev=4937&view=rev Author: ExsonQu Date: 2012-02-20 13:14:51 +0000 (Mon, 20 Feb 2012) Log Message: ----------- Bug fixed for not to be able to store email server setting information to database. Modified Paths: -------------- trunk/SMTPServer.php Modified: trunk/SMTPServer.php =================================================================== --- trunk/SMTPServer.php 2012-02-20 09:45:54 UTC (rev 4936) +++ trunk/SMTPServer.php 2012-02-20 13:14:51 UTC (rev 4937) @@ -7,8 +7,10 @@ include('includes/header.inc'); echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/email.gif" title="' . _('SMTP Server') . '" alt="" />' . ' ' . _('SMTP Server Settings') . '</p>'; +// First check if there are smtp server data or not -if (isset($_POST['submit'])) { + +if (isset($_POST['submit']) AND $_POST['MailServerSetting']==1) {//If there are already data setup, Update the table $sql="UPDATE emailsettings SET host='".$_POST['Host']."', port='".$_POST['Port']."', @@ -16,27 +18,70 @@ username='".$_POST['UserName']."', password='".$_POST['Password']."', auth='".$_POST['Auth']."'"; - $result=DB_query($sql, $db); + $ErrMsg = _('The email setting information is failed to update'); + $DbgMsg = _('The SQL failed to update is '); + $result1=DB_query($sql, $db, $ErrMsg, $DbgMsg); + unset($_POST['MailServerSetting']); prnMsg(_('The settings for the SMTP server have been successfully updated'), 'success'); echo '<br />'; + DB_free_result($result1); + +}elseif(isset($_POST['submit']) and $_POST['MailServerSetting']==0){//There is no data setup yet + $sql = "INSERT INTO emailsettings(host, + port, + heloaddress, + username, + password, + auth) + VALUES ( + '".$_POST['Host']."', + '".$_POST['Port']."', + '".$_POST['HeloAddress']."', + '".$_POST['UserName']."', + '".$_POST['Password']."', + '".$_POST['Auth']."')"; + $ErrMsg = _('The email settings are failed to be inserted'); + $DbgMsg = _('The SQL failed to insert the email information is'); + $result2 = DB_query($sql,$db); + DB_free_result($result2); + unset($_POST['MailServerSetting']); + prnMsg(_('The settings for the SMTP server have been sucessfully inserted'),'success'); + echo '<br/>'; } -$sql="SELECT id, - host, - port, - heloaddress, - username, - password, - timeout, - auth - FROM emailsettings"; + // Check the mail server setting status -$result=DB_query($sql, $db); + $sql="SELECT id, + host, + port, + heloaddress, + username, + password, + timeout, + auth + FROM emailsettings"; + $ErrMsg = _('The email settings information cannot be retrieved'); + $DbgMsg = _('The SQL that faild was'); -$myrow=DB_fetch_array($result); - + $result=DB_query($sql, $db,$ErrMsg,$DbgMsg); + if(DB_num_rows($result)!=0){ + $MailServerSetting = 1; + $myrow=DB_fetch_array($result); + }else{ + DB_free_result($result); + $MailServerSetting = 0; + $myrow['host']=''; + $myrow['port']=''; + $myrow['heloaddress']=''; + $myrow['username']=''; + $myrow['password']=''; + $myrow['timeout']=5; + } + + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; +echo '<input type="hidden" name="MailServerSetting" value="' . $MailServerSetting . '" />'; echo '<table class="selection">'; echo '<tr><td>'._('Server Host Name').'</td> <td><input type="text" name="Host" value="'.$myrow['host'].'" /></td></tr>'; @@ -47,11 +92,11 @@ echo '<tr><td>'._('Authorisation Required').'</td><td>'; echo '<select name="Auth">'; if ($myrow['auth']==1) { - echo '<option selected="selected" value="1">'._('True').'</option>'; - echo '<option value="0">'._('False').'</option>'; + echo '<option selected value=1>'._('True').'</option>'; + echo '<option value=0>'._('False').'</option>'; } else { - echo '<option value="1">'._('True').'</option>'; - echo '<option selected="selected" value="0">'._('False').'</option>'; + echo '<option value=1>'._('True').'</option>'; + echo '<option selected value=0>'._('False').'</option>'; } echo '</select></td></tr>'; echo '<tr><td>'._('User Name').'</td> @@ -65,4 +110,4 @@ include('includes/footer.inc'); -?> \ 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: <Ex...@us...> - 2012-02-20 13:15:01
|
Revision: 4937 http://web-erp.svn.sourceforge.net/web-erp/?rev=4937&view=rev Author: ExsonQu Date: 2012-02-20 13:14:51 +0000 (Mon, 20 Feb 2012) Log Message: ----------- Bug fixed for not to be able to store email server setting information to database. Modified Paths: -------------- trunk/SMTPServer.php Modified: trunk/SMTPServer.php =================================================================== --- trunk/SMTPServer.php 2012-02-20 09:45:54 UTC (rev 4936) +++ trunk/SMTPServer.php 2012-02-20 13:14:51 UTC (rev 4937) @@ -7,8 +7,10 @@ include('includes/header.inc'); echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/email.gif" title="' . _('SMTP Server') . '" alt="" />' . ' ' . _('SMTP Server Settings') . '</p>'; +// First check if there are smtp server data or not -if (isset($_POST['submit'])) { + +if (isset($_POST['submit']) AND $_POST['MailServerSetting']==1) {//If there are already data setup, Update the table $sql="UPDATE emailsettings SET host='".$_POST['Host']."', port='".$_POST['Port']."', @@ -16,27 +18,70 @@ username='".$_POST['UserName']."', password='".$_POST['Password']."', auth='".$_POST['Auth']."'"; - $result=DB_query($sql, $db); + $ErrMsg = _('The email setting information is failed to update'); + $DbgMsg = _('The SQL failed to update is '); + $result1=DB_query($sql, $db, $ErrMsg, $DbgMsg); + unset($_POST['MailServerSetting']); prnMsg(_('The settings for the SMTP server have been successfully updated'), 'success'); echo '<br />'; + DB_free_result($result1); + +}elseif(isset($_POST['submit']) and $_POST['MailServerSetting']==0){//There is no data setup yet + $sql = "INSERT INTO emailsettings(host, + port, + heloaddress, + username, + password, + auth) + VALUES ( + '".$_POST['Host']."', + '".$_POST['Port']."', + '".$_POST['HeloAddress']."', + '".$_POST['UserName']."', + '".$_POST['Password']."', + '".$_POST['Auth']."')"; + $ErrMsg = _('The email settings are failed to be inserted'); + $DbgMsg = _('The SQL failed to insert the email information is'); + $result2 = DB_query($sql,$db); + DB_free_result($result2); + unset($_POST['MailServerSetting']); + prnMsg(_('The settings for the SMTP server have been sucessfully inserted'),'success'); + echo '<br/>'; } -$sql="SELECT id, - host, - port, - heloaddress, - username, - password, - timeout, - auth - FROM emailsettings"; + // Check the mail server setting status -$result=DB_query($sql, $db); + $sql="SELECT id, + host, + port, + heloaddress, + username, + password, + timeout, + auth + FROM emailsettings"; + $ErrMsg = _('The email settings information cannot be retrieved'); + $DbgMsg = _('The SQL that faild was'); -$myrow=DB_fetch_array($result); - + $result=DB_query($sql, $db,$ErrMsg,$DbgMsg); + if(DB_num_rows($result)!=0){ + $MailServerSetting = 1; + $myrow=DB_fetch_array($result); + }else{ + DB_free_result($result); + $MailServerSetting = 0; + $myrow['host']=''; + $myrow['port']=''; + $myrow['heloaddress']=''; + $myrow['username']=''; + $myrow['password']=''; + $myrow['timeout']=5; + } + + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; +echo '<input type="hidden" name="MailServerSetting" value="' . $MailServerSetting . '" />'; echo '<table class="selection">'; echo '<tr><td>'._('Server Host Name').'</td> <td><input type="text" name="Host" value="'.$myrow['host'].'" /></td></tr>'; @@ -47,11 +92,11 @@ echo '<tr><td>'._('Authorisation Required').'</td><td>'; echo '<select name="Auth">'; if ($myrow['auth']==1) { - echo '<option selected="selected" value="1">'._('True').'</option>'; - echo '<option value="0">'._('False').'</option>'; + echo '<option selected value=1>'._('True').'</option>'; + echo '<option value=0>'._('False').'</option>'; } else { - echo '<option value="1">'._('True').'</option>'; - echo '<option selected="selected" value="0">'._('False').'</option>'; + echo '<option value=1>'._('True').'</option>'; + echo '<option selected value=0>'._('False').'</option>'; } echo '</select></td></tr>'; echo '<tr><td>'._('User Name').'</td> @@ -65,4 +110,4 @@ include('includes/footer.inc'); -?> \ 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-20 09:46:06
|
Revision: 4936 http://web-erp.svn.sourceforge.net/web-erp/?rev=4936&view=rev Author: daintree Date: 2012-02-20 09:45:54 +0000 (Mon, 20 Feb 2012) Log Message: ----------- review Modified Paths: -------------- trunk/StockAdjustments.php Modified: trunk/StockAdjustments.php =================================================================== --- trunk/StockAdjustments.php 2012-02-20 09:24:43 UTC (rev 4935) +++ trunk/StockAdjustments.php 2012-02-20 09:45:54 UTC (rev 4936) @@ -10,83 +10,79 @@ include('includes/header.inc'); include('includes/SQL_CommonFunctions.inc'); +if (empty($_GET['identifier'])) { + /*unique session identifier to ensure that there is no conflict with other adjustment sessions on the same machine */ + $identifier=date('U'); +} else { + $identifier=$_GET['identifier']; +} + if (isset($_GET['NewAdjustment'])){ - unset($_SESSION['Adjustment']); - $_SESSION['Adjustment'] = new StockAdjustment(); + unset($_SESSION['Adjustment' . $identifier]); + $_SESSION['Adjustment' . $identifier] = new StockAdjustment(); } -if (!isset($_SESSION['Adjustment'])){ - $_SESSION['Adjustment'] = new StockAdjustment(); +if (!isset($_SESSION['Adjustment' . $identifier])){ + $_SESSION['Adjustment' . $identifier] = new StockAdjustment(); } $NewAdjustment = false; if (isset($_GET['StockID'])){ + $NewAdjustment = true; $StockID = trim(mb_strtoupper($_GET['StockID'])); - $_SESSION['Adjustment']->StockID = trim(mb_strtoupper($StockID)); +} elseif (isset($_POST['StockID'])){ + if($_POST['StockID'] != $_SESSION['Adjustment' . $identifier]->StockID){ + $NewAdjustment = true; + $StockID = trim(mb_strtoupper($_POST['StockID'])); + } +} +if ($NewAdjustment==true){ + + $_SESSION['Adjustment' . $identifier]->StockID = trim(mb_strtoupper($StockID)); $result = DB_query("SELECT description, controlled, serialised, decimalplaces, - perishable + perishable, + materialcost+labourcost+overheadcost AS totalcost, + units FROM stockmaster - WHERE stockid='" . $_SESSION['Adjustment']->StockID . "'",$db); + WHERE stockid='" . $_SESSION['Adjustment' . $identifier]->StockID . "'",$db); $myrow = DB_fetch_array($result); - $_SESSION['Adjustment']->ItemDescription = $myrow['description']; - $_SESSION['Adjustment']->Controlled = $myrow['controlled']; - $_SESSION['Adjustment']->Serialised = $myrow['serialised']; - $_SESSION['Adjustment']->DecimalPlaces = $myrow['decimalplaces']; - $_SESSION['Adjustment']->SerialItems = array(); - if (!isset($_SESSION['Adjustment']->Quantity) OR !is_numeric($_SESSION['Adjustment']->Quantity)){ - $_SESSION['Adjustment']->Quantity=0; + $_SESSION['Adjustment' . $identifier]->ItemDescription = $myrow['description']; + $_SESSION['Adjustment' . $identifier]->Controlled = $myrow['controlled']; + $_SESSION['Adjustment' . $identifier]->Serialised = $myrow['serialised']; + $_SESSION['Adjustment' . $identifier]->DecimalPlaces = $myrow['decimalplaces']; + $_SESSION['Adjustment' . $identifier]->SerialItems = array(); + if (!isset($_SESSION['Adjustment' . $identifier]->Quantity) OR !is_numeric($_SESSION['Adjustment' . $identifier]->Quantity)){ + $_SESSION['Adjustment' . $identifier]->Quantity=0; } - $NewAdjustment = true; -} elseif (isset($_POST['StockID'])){ - if(isset($_POST['StockID']) - AND $_POST['StockID'] != $_SESSION['Adjustment']->StockID){ - - $NewAdjustment = true; - $_SESSION['Adjustment']->StockID = trim(mb_strtoupper($_POST['StockID'])); - $StockID = trim(mb_strtoupper($_POST['StockID'])); - } - //Get item data - $result = DB_query("SELECT description, - controlled, - serialised, - decimalplaces, - perishable - FROM stockmaster - WHERE stockid=' " . $_SESSION['Adjustment']->StockID . "'",$db); - $myrow = DB_fetch_array($result); - $_SESSION['Adjustment']->ItemDescription = $myrow['description']; - $_SESSION['Adjustment']->Controlled = $myrow['controlled']; - $_SESSION['Adjustment']->Serialised = $myrow['serialised']; - $_SESSION['Adjustment']->DecimalPlaces = $myrow['decimalplaces']; - DB_free_result($result); - $sql="SELECT materialcost, - labourcost, - overheadcost, - units, - decimalplaces - FROM stockmaster - WHERE stockid='".$_SESSION['Adjustment']->StockID . "'"; - - $result=DB_query($sql, $db); - $myrow=DB_fetch_array($result); - $_SESSION['Adjustment']->PartUnit=$myrow['units']; - $_SESSION['Adjustment']->StandardCost=$myrow['materialcost']+$myrow['labourcost']+$myrow['overheadcost']; + $_SESSION['Adjustment' . $identifier]->PartUnit=$myrow['units']; + $_SESSION['Adjustment' . $identifier]->StandardCost=$myrow['totalcost']; $DecimalPlaces = $myrow['decimalplaces']; DB_free_result($result); - $_SESSION['Adjustment']->tag = $_POST['tag']; - $_SESSION['Adjustment']->Narrative = $_POST['Narrative']; - $_SESSION['Adjustment']->StockLocation = $_POST['StockLocation']; + +} //end if it's a new adjustment +if (isset($_POST['tag'])){ + $_SESSION['Adjustment' . $identifier]->tag = $_POST['tag']; +} +if (isset($_POST['Narrative'])){ + $_SESSION['Adjustment' . $identifier]->Narrative = $_POST['Narrative']; +} +if (isset($_POST['StockLocation'])){ + $_SESSION['Adjustment' . $identifier]->StockLocation = $_POST['StockLocation']; +} +if (isset($_POST['Quantity'])){ if ($_POST['Quantity']=='' OR !is_numeric(filter_number_format($_POST['Quantity']))){ $_POST['Quantity']=0; } - $_SESSION['Adjustment']->Quantity = filter_number_format($_POST['Quantity']); +} else { + $_POST['Quantity']=0; } +$_SESSION['Adjustment' . $identifier]->Quantity = filter_number_format($_POST['Quantity']); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Inventory Adjustment') . '" alt="" />' . ' ' . _('Inventory Adjustment') . '</p>'; @@ -128,29 +124,29 @@ if (isset($_POST['EnterAdjustment']) AND $_POST['EnterAdjustment']!= ''){ $InputError = false; /*Start by hoping for the best */ - $result = DB_query("SELECT * FROM stockmaster WHERE stockid='" . $_SESSION['Adjustment']->StockID . "'",$db); + $result = DB_query("SELECT * FROM stockmaster WHERE stockid='" . $_SESSION['Adjustment' . $identifier]->StockID . "'",$db); $myrow = DB_fetch_row($result); if (DB_num_rows($result)==0) { prnMsg( _('The entered item code does not exist'),'error'); $InputError = true; - } elseif (!is_numeric($_SESSION['Adjustment']->Quantity)){ + } elseif (!is_numeric($_SESSION['Adjustment' . $identifier]->Quantity)){ prnMsg( _('The quantity entered must be numeric'),'error'); $InputError = true; - } elseif ($_SESSION['Adjustment']->Quantity==0){ + } elseif ($_SESSION['Adjustment' . $identifier]->Quantity==0){ prnMsg( _('The quantity entered cannot be zero') . '. ' . _('There would be no adjustment to make'),'error'); $InputError = true; - } elseif ($_SESSION['Adjustment']->Controlled==1 AND count($_SESSION['Adjustment']->SerialItems)==0) { + } elseif ($_SESSION['Adjustment' . $identifier]->Controlled==1 AND count($_SESSION['Adjustment' . $identifier]->SerialItems)==0) { prnMsg( _('The item entered is a controlled item that requires the detail of the serial numbers or batch references to be adjusted to be entered'),'error'); $InputError = true; } if ($_SESSION['ProhibitNegativeStock']==1){ $SQL = "SELECT quantity FROM locstock - WHERE stockid='" . $_SESSION['Adjustment']->StockID . "' - AND loccode='" . $_SESSION['Adjustment']->StockLocation . "'"; + WHERE stockid='" . $_SESSION['Adjustment' . $identifier]->StockID . "' + AND loccode='" . $_SESSION['Adjustment' . $identifier]->StockLocation . "'"; $CheckNegResult=DB_query($SQL,$db); $CheckNegRow = DB_fetch_array($CheckNegResult); - if ($CheckNegRow['quantity']+$_SESSION['Adjustment']->Quantity <0){ + if ($CheckNegRow['quantity']+$_SESSION['Adjustment' . $identifier]->Quantity <0){ $InputError=true; prnMsg(_('The system parameters are set to prohibit negative stocks. Processing this stock adjustment would result in negative stock at this location. This adjustment will not be processed.'),'error'); } @@ -169,8 +165,8 @@ // Need to get the current location quantity will need it later for the stock movement $SQL="SELECT locstock.quantity FROM locstock - WHERE locstock.stockid='" . $_SESSION['Adjustment']->StockID . "' - AND loccode= '" . $_SESSION['Adjustment']->StockLocation . "'"; + WHERE locstock.stockid='" . $_SESSION['Adjustment' . $identifier]->StockID . "' + AND loccode= '" . $_SESSION['Adjustment' . $identifier]->StockLocation . "'"; $Result = DB_query($SQL, $db); if (DB_num_rows($Result)==1){ $LocQtyRow = DB_fetch_row($Result); @@ -190,15 +186,15 @@ qty, newqoh) VALUES ( - '" . $_SESSION['Adjustment']->StockID . "', + '" . $_SESSION['Adjustment' . $identifier]->StockID . "', 17, '" . $AdjustmentNumber . "', - '" . $_SESSION['Adjustment']->StockLocation . "', + '" . $_SESSION['Adjustment' . $identifier]->StockLocation . "', '" . $SQLAdjustmentDate . "', '" . $PeriodNo . "', - '" . $_SESSION['Adjustment']->Narrative ."', - '" . $_SESSION['Adjustment']->Quantity . "', - '" . ($QtyOnHandPrior + $_SESSION['Adjustment']->Quantity) . "' + '" . $_SESSION['Adjustment' . $identifier]->Narrative ."', + '" . $_SESSION['Adjustment' . $identifier]->Quantity . "', + '" . ($QtyOnHandPrior + $_SESSION['Adjustment' . $identifier]->Quantity) . "' )"; @@ -211,16 +207,16 @@ /*Insert the StockSerialMovements and update the StockSerialItems for controlled items*/ - if ($_SESSION['Adjustment']->Controlled ==1){ - foreach($_SESSION['Adjustment']->SerialItems as $Item){ + if ($_SESSION['Adjustment' . $identifier]->Controlled ==1){ + foreach($_SESSION['Adjustment' . $identifier]->SerialItems as $Item){ /*We need to add or update the StockSerialItem record and The StockSerialMoves as well */ /*First need to check if the serial items already exists or not */ $SQL = "SELECT COUNT(*) FROM stockserialitems - WHERE stockid='" . $_SESSION['Adjustment']->StockID . "' - AND loccode='" . $_SESSION['Adjustment']->StockLocation . "' + WHERE stockid='" . $_SESSION['Adjustment' . $identifier]->StockID . "' + AND loccode='" . $_SESSION['Adjustment' . $identifier]->StockLocation . "' AND serialno='" . $Item->BundleRef . "'"; $ErrMsg = _('Unable to determine if the serial item exists'); $Result = DB_query($SQL,$db,$ErrMsg); @@ -229,8 +225,8 @@ if ($SerialItemExistsRow[0]==1){ $SQL = "UPDATE stockserialitems SET quantity= quantity + " . $Item->BundleQty . " - WHERE stockid='" . $_SESSION['Adjustment']->StockID . "' - AND loccode='" . $_SESSION['Adjustment']->StockLocation . "' + WHERE stockid='" . $_SESSION['Adjustment' . $identifier]->StockID . "' + AND loccode='" . $_SESSION['Adjustment' . $identifier]->StockLocation . "' AND serialno='" . $Item->BundleRef . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The serial stock item record could not be updated because'); @@ -244,8 +240,8 @@ qualitytext, quantity, expirationdate) - VALUES ('" . $_SESSION['Adjustment']->StockID . "', - '" . $_SESSION['Adjustment']->StockLocation . "', + VALUES ('" . $_SESSION['Adjustment' . $identifier]->StockID . "', + '" . $_SESSION['Adjustment' . $identifier]->StockLocation . "', '" . $Item->BundleRef . "', '', '" . $Item->BundleQty . "', @@ -264,7 +260,7 @@ serialno, moveqty) VALUES ('" . $StkMoveNo . "', - '" . $_SESSION['Adjustment']->StockID . "', + '" . $_SESSION['Adjustment' . $identifier]->StockID . "', '" . $Item->BundleRef . "', '" . $Item->BundleQty . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The serial stock movement record could not be inserted because'); @@ -276,18 +272,18 @@ - $SQL = "UPDATE locstock SET quantity = quantity + '" . $_SESSION['Adjustment']->Quantity . "' - WHERE stockid='" . $_SESSION['Adjustment']->StockID . "' - AND loccode='" . $_SESSION['Adjustment']->StockLocation . "'"; + $SQL = "UPDATE locstock SET quantity = quantity + '" . $_SESSION['Adjustment' . $identifier]->Quantity . "' + WHERE stockid='" . $_SESSION['Adjustment' . $identifier]->StockID . "' + AND loccode='" . $_SESSION['Adjustment' . $identifier]->StockLocation . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' ._('The location stock record could not be updated because'); $DbgMsg = _('The following SQL to update the stock record was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); - if ($_SESSION['CompanyRecord']['gllink_stock']==1 AND $_SESSION['Adjustment']->StandardCost > 0){ + if ($_SESSION['CompanyRecord']['gllink_stock']==1 AND $_SESSION['Adjustment' . $identifier]->StandardCost > 0){ - $StockGLCodes = GetStockGLCode($_SESSION['Adjustment']->StockID,$db); + $StockGLCodes = GetStockGLCode($_SESSION['Adjustment' . $identifier]->StockID,$db); $SQL = "INSERT INTO gltrans (type, typeno, @@ -302,10 +298,10 @@ '" . $SQLAdjustmentDate . "', '" . $PeriodNo . "', '" . $StockGLCodes['adjglact'] . "', - '" . round($_SESSION['Adjustment']->StandardCost * -($_SESSION['Adjustment']->Quantity), $_SESSION['CompanyRecord']['decimalplaces']) . "', - '" . $_SESSION['Adjustment']->StockID . " x " . $_SESSION['Adjustment']->Quantity . " @ " . - $_SESSION['Adjustment']->StandardCost . " " . $_SESSION['Adjustment']->Narrative . "', - '" . $_SESSION['Adjustment']->tag . "' + '" . round($_SESSION['Adjustment' . $identifier]->StandardCost * -($_SESSION['Adjustment' . $identifier]->Quantity), $_SESSION['CompanyRecord']['decimalplaces']) . "', + '" . $_SESSION['Adjustment' . $identifier]->StockID . " x " . $_SESSION['Adjustment' . $identifier]->Quantity . " @ " . + $_SESSION['Adjustment' . $identifier]->StandardCost . " " . $_SESSION['Adjustment' . $identifier]->Narrative . "', + '" . $_SESSION['Adjustment' . $identifier]->tag . "' )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction entries could not be added because'); @@ -325,9 +321,9 @@ '" . $SQLAdjustmentDate . "', '" . $PeriodNo . "', '" . $StockGLCodes['stockact'] . "', - '" . round($_SESSION['Adjustment']->StandardCost * $_SESSION['Adjustment']->Quantity,$_SESSION['CompanyRecord']['decimalplaces']) . "', - '" . $_SESSION['Adjustment']->StockID . " x " . $_SESSION['Adjustment']->Quantity . " @ " . $_SESSION['Adjustment']->StandardCost . " " . $_SESSION['Adjustment']->Narrative . "', - '" . $_SESSION['Adjustment']->tag . "' + '" . round($_SESSION['Adjustment' . $identifier]->StandardCost * $_SESSION['Adjustment' . $identifier]->Quantity,$_SESSION['CompanyRecord']['decimalplaces']) . "', + '" . $_SESSION['Adjustment' . $identifier]->StockID . " x " . $_SESSION['Adjustment' . $identifier]->Quantity . " @ " . $_SESSION['Adjustment' . $identifier]->StandardCost . " " . $_SESSION['Adjustment' . $identifier]->Narrative . "', + '" . $_SESSION['Adjustment' . $identifier]->tag . "' )"; $Errmsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction entries could not be added because'); @@ -339,16 +335,16 @@ $Result = DB_Txn_Commit($db); - $ConfirmationText = _('A stock adjustment for'). ' ' . $_SESSION['Adjustment']->StockID . ' - ' . $_SESSION['Adjustment']->ItemDescription . ' '._('has been created from location').' ' . $_SESSION['Adjustment']->StockLocation .' '. _('for a quantity of') . ' ' . locale_number_format($_SESSION['Adjustment']->Quantity,$_SESSION['Adjustment']->DecimalPlaces) ; + $ConfirmationText = _('A stock adjustment for'). ' ' . $_SESSION['Adjustment' . $identifier]->StockID . ' - ' . $_SESSION['Adjustment' . $identifier]->ItemDescription . ' '._('has been created from location').' ' . $_SESSION['Adjustment' . $identifier]->StockLocation .' '. _('for a quantity of') . ' ' . locale_number_format($_SESSION['Adjustment' . $identifier]->Quantity,$_SESSION['Adjustment' . $identifier]->DecimalPlaces) ; prnMsg( $ConfirmationText,'success'); if ($_SESSION['InventoryManagerEmail']!=''){ $ConfirmationText = $ConfirmationText . ' ' . _('by user') . ' ' . $_SESSION['UserID'] . ' ' . _('at') . ' ' . Date('Y-m-d H:i:s'); - $EmailSubject = _('Stock adjustment for'). ' ' . $_SESSION['Adjustment']->StockID; + $EmailSubject = _('Stock adjustment for'). ' ' . $_SESSION['Adjustment' . $identifier]->StockID; mail($_SESSION['InventoryManagerEmail'],$EmailSubject,$ConfirmationText); } - unset ($_SESSION['Adjustment']); + unset ($_SESSION['Adjustment' . $identifier]); } /* end if there was no input error */ }/* end if the user hit enter the adjustment */ @@ -357,15 +353,15 @@ echo '<form action="'. htmlspecialchars($_SERVER['PHP_SELF']) . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -if (!isset($_SESSION['Adjustment'])) { +if (!isset($_SESSION['Adjustment' . $identifier])) { $StockID=''; $Controlled= 0; $Quantity = 0; $DecimalPlaces =2; } else { - $StockID = $_SESSION['Adjustment']->StockID; - $Controlled = $_SESSION['Adjustment']->Controlled; - $Quantity = $_SESSION['Adjustment']->Quantity; + $StockID = $_SESSION['Adjustment' . $identifier]->StockID; + $Controlled = $_SESSION['Adjustment' . $identifier]->Controlled; + $Quantity = $_SESSION['Adjustment' . $identifier]->Quantity; $sql="SELECT materialcost, labourcost, overheadcost, @@ -376,8 +372,8 @@ $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); - $_SESSION['Adjustment']->PartUnit=$myrow['units']; - $_SESSION['Adjustment']->StandardCost=$myrow['materialcost']+$myrow['labourcost']+$myrow['overheadcost']; + $_SESSION['Adjustment' . $identifier]->PartUnit=$myrow['units']; + $_SESSION['Adjustment' . $identifier]->StandardCost=$myrow['materialcost']+$myrow['labourcost']+$myrow['overheadcost']; $DecimalPlaces = $myrow['decimalplaces']; } echo '<br /> @@ -406,9 +402,9 @@ echo '</td> <td><input type="submit" name="CheckCode" value="'._('Check Part').'" /></td> </tr>'; -if (isset($_SESSION['Adjustment']) AND mb_strlen($_SESSION['Adjustment']->ItemDescription)>1){ +if (isset($_SESSION['Adjustment' . $identifier]) AND mb_strlen($_SESSION['Adjustment' . $identifier]->ItemDescription)>1){ echo '<tr> - <td colspan="3"><font color="blue" size="3">' . $_SESSION['Adjustment']->ItemDescription . ' ('._('In Units of').' ' . $_SESSION['Adjustment']->PartUnit . ' ) - ' . _('Unit Cost').' = ' . locale_number_format($_SESSION['Adjustment']->StandardCost,4) . '</font></td> + <td colspan="3"><font color="blue" size="3">' . $_SESSION['Adjustment' . $identifier]->ItemDescription . ' ('._('In Units of').' ' . $_SESSION['Adjustment' . $identifier]->PartUnit . ' ) - ' . _('Unit Cost').' = ' . locale_number_format($_SESSION['Adjustment' . $identifier]->StandardCost,4) . '</font></td> </tr>'; } @@ -418,8 +414,8 @@ $sql = "SELECT loccode, locationname FROM locations"; $resultStkLocs = DB_query($sql,$db); while ($myrow=DB_fetch_array($resultStkLocs)){ - if (isset($_SESSION['Adjustment']->StockLocation)){ - if ($myrow['loccode'] == $_SESSION['Adjustment']->StockLocation){ + if (isset($_SESSION['Adjustment' . $identifier]->StockLocation)){ + if ($myrow['loccode'] == $_SESSION['Adjustment' . $identifier]->StockLocation){ echo '<option selected="selected" value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; @@ -433,8 +429,8 @@ } echo '</select></td></tr>'; -if (isset($_SESSION['Adjustment']) AND !isset($_SESSION['Adjustment']->Narrative)) { - $_SESSION['Adjustment']->Narrative = ''; +if (isset($_SESSION['Adjustment' . $identifier]) AND !isset($_SESSION['Adjustment' . $identifier]->Narrative)) { + $_SESSION['Adjustment' . $identifier]->Narrative = ''; $Narrative =''; } else { $Narrative =''; @@ -449,11 +445,11 @@ echo '<td>'; if ($Controlled==1){ - if ($_SESSION['Adjustment']->StockLocation == ''){ - $_SESSION['Adjustment']->StockLocation = $_SESSION['UserStockLocation']; + if ($_SESSION['Adjustment' . $identifier]->StockLocation == ''){ + $_SESSION['Adjustment' . $identifier]->StockLocation = $_SESSION['UserStockLocation']; } - echo '<input type="hidden" name="Quantity" value="' . $_SESSION['Adjustment']->Quantity . '" /> - '.locale_number_format($_SESSION['Adjustment']->Quantity,$DecimalPlaces) .' + echo '<input type="hidden" name="Quantity" value="' . $_SESSION['Adjustment' . $identifier]->Quantity . '" /> + '.locale_number_format($_SESSION['Adjustment' . $identifier]->Quantity,$DecimalPlaces) .' [<a href="'.$rootpath.'/StockAdjustmentsControlled.php?AdjType=REMOVE">'._('Remove').'</a>] [<a href="'.$rootpath.'/StockAdjustmentsControlled.php?AdjType=ADD">'._('Add').'</a>]'; } else { @@ -473,7 +469,7 @@ $result=DB_query($SQL,$db); echo '<option value="0">0 - ' . _('None') . '</option>'; while ($myrow=DB_fetch_array($result)){ - if (isset($_SESSION['Adjustment']->tag) AND $_SESSION['Adjustment']->tag==$myrow['tagref']){ + if (isset($_SESSION['Adjustment' . $identifier]->tag) AND $_SESSION['Adjustment' . $identifier]->tag==$myrow['tagref']){ echo '<option selected="selected" value="' . $myrow['tagref'] . '">' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; } else { echo '<option value="' . $myrow['tagref'] . '">' . $myrow['tagref'].' - ' .$myrow['tagdescription']. '</option>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-02-20 09:46:05
|
Revision: 4936 http://web-erp.svn.sourceforge.net/web-erp/?rev=4936&view=rev Author: daintree Date: 2012-02-20 09:45:54 +0000 (Mon, 20 Feb 2012) Log Message: ----------- review Modified Paths: -------------- trunk/StockAdjustments.php Modified: trunk/StockAdjustments.php =================================================================== --- trunk/StockAdjustments.php 2012-02-20 09:24:43 UTC (rev 4935) +++ trunk/StockAdjustments.php 2012-02-20 09:45:54 UTC (rev 4936) @@ -10,83 +10,79 @@ include('includes/header.inc'); include('includes/SQL_CommonFunctions.inc'); +if (empty($_GET['identifier'])) { + /*unique session identifier to ensure that there is no conflict with other adjustment sessions on the same machine */ + $identifier=date('U'); +} else { + $identifier=$_GET['identifier']; +} + if (isset($_GET['NewAdjustment'])){ - unset($_SESSION['Adjustment']); - $_SESSION['Adjustment'] = new StockAdjustment(); + unset($_SESSION['Adjustment' . $identifier]); + $_SESSION['Adjustment' . $identifier] = new StockAdjustment(); } -if (!isset($_SESSION['Adjustment'])){ - $_SESSION['Adjustment'] = new StockAdjustment(); +if (!isset($_SESSION['Adjustment' . $identifier])){ + $_SESSION['Adjustment' . $identifier] = new StockAdjustment(); } $NewAdjustment = false; if (isset($_GET['StockID'])){ + $NewAdjustment = true; $StockID = trim(mb_strtoupper($_GET['StockID'])); - $_SESSION['Adjustment']->StockID = trim(mb_strtoupper($StockID)); +} elseif (isset($_POST['StockID'])){ + if($_POST['StockID'] != $_SESSION['Adjustment' . $identifier]->StockID){ + $NewAdjustment = true; + $StockID = trim(mb_strtoupper($_POST['StockID'])); + } +} +if ($NewAdjustment==true){ + + $_SESSION['Adjustment' . $identifier]->StockID = trim(mb_strtoupper($StockID)); $result = DB_query("SELECT description, controlled, serialised, decimalplaces, - perishable + perishable, + materialcost+labourcost+overheadcost AS totalcost, + units FROM stockmaster - WHERE stockid='" . $_SESSION['Adjustment']->StockID . "'",$db); + WHERE stockid='" . $_SESSION['Adjustment' . $identifier]->StockID . "'",$db); $myrow = DB_fetch_array($result); - $_SESSION['Adjustment']->ItemDescription = $myrow['description']; - $_SESSION['Adjustment']->Controlled = $myrow['controlled']; - $_SESSION['Adjustment']->Serialised = $myrow['serialised']; - $_SESSION['Adjustment']->DecimalPlaces = $myrow['decimalplaces']; - $_SESSION['Adjustment']->SerialItems = array(); - if (!isset($_SESSION['Adjustment']->Quantity) OR !is_numeric($_SESSION['Adjustment']->Quantity)){ - $_SESSION['Adjustment']->Quantity=0; + $_SESSION['Adjustment' . $identifier]->ItemDescription = $myrow['description']; + $_SESSION['Adjustment' . $identifier]->Controlled = $myrow['controlled']; + $_SESSION['Adjustment' . $identifier]->Serialised = $myrow['serialised']; + $_SESSION['Adjustment' . $identifier]->DecimalPlaces = $myrow['decimalplaces']; + $_SESSION['Adjustment' . $identifier]->SerialItems = array(); + if (!isset($_SESSION['Adjustment' . $identifier]->Quantity) OR !is_numeric($_SESSION['Adjustment' . $identifier]->Quantity)){ + $_SESSION['Adjustment' . $identifier]->Quantity=0; } - $NewAdjustment = true; -} elseif (isset($_POST['StockID'])){ - if(isset($_POST['StockID']) - AND $_POST['StockID'] != $_SESSION['Adjustment']->StockID){ - - $NewAdjustment = true; - $_SESSION['Adjustment']->StockID = trim(mb_strtoupper($_POST['StockID'])); - $StockID = trim(mb_strtoupper($_POST['StockID'])); - } - //Get item data - $result = DB_query("SELECT description, - controlled, - serialised, - decimalplaces, - perishable - FROM stockmaster - WHERE stockid=' " . $_SESSION['Adjustment']->StockID . "'",$db); - $myrow = DB_fetch_array($result); - $_SESSION['Adjustment']->ItemDescription = $myrow['description']; - $_SESSION['Adjustment']->Controlled = $myrow['controlled']; - $_SESSION['Adjustment']->Serialised = $myrow['serialised']; - $_SESSION['Adjustment']->DecimalPlaces = $myrow['decimalplaces']; - DB_free_result($result); - $sql="SELECT materialcost, - labourcost, - overheadcost, - units, - decimalplaces - FROM stockmaster - WHERE stockid='".$_SESSION['Adjustment']->StockID . "'"; - - $result=DB_query($sql, $db); - $myrow=DB_fetch_array($result); - $_SESSION['Adjustment']->PartUnit=$myrow['units']; - $_SESSION['Adjustment']->StandardCost=$myrow['materialcost']+$myrow['labourcost']+$myrow['overheadcost']; + $_SESSION['Adjustment' . $identifier]->PartUnit=$myrow['units']; + $_SESSION['Adjustment' . $identifier]->StandardCost=$myrow['totalcost']; $DecimalPlaces = $myrow['decimalplaces']; DB_free_result($result); - $_SESSION['Adjustment']->tag = $_POST['tag']; - $_SESSION['Adjustment']->Narrative = $_POST['Narrative']; - $_SESSION['Adjustment']->StockLocation = $_POST['StockLocation']; + +} //end if it's a new adjustment +if (isset($_POST['tag'])){ + $_SESSION['Adjustment' . $identifier]->tag = $_POST['tag']; +} +if (isset($_POST['Narrative'])){ + $_SESSION['Adjustment' . $identifier]->Narrative = $_POST['Narrative']; +} +if (isset($_POST['StockLocation'])){ + $_SESSION['Adjustment' . $identifier]->StockLocation = $_POST['StockLocation']; +} +if (isset($_POST['Quantity'])){ if ($_POST['Quantity']=='' OR !is_numeric(filter_number_format($_POST['Quantity']))){ $_POST['Quantity']=0; } - $_SESSION['Adjustment']->Quantity = filter_number_format($_POST['Quantity']); +} else { + $_POST['Quantity']=0; } +$_SESSION['Adjustment' . $identifier]->Quantity = filter_number_format($_POST['Quantity']); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Inventory Adjustment') . '" alt="" />' . ' ' . _('Inventory Adjustment') . '</p>'; @@ -128,29 +124,29 @@ if (isset($_POST['EnterAdjustment']) AND $_POST['EnterAdjustment']!= ''){ $InputError = false; /*Start by hoping for the best */ - $result = DB_query("SELECT * FROM stockmaster WHERE stockid='" . $_SESSION['Adjustment']->StockID . "'",$db); + $result = DB_query("SELECT * FROM stockmaster WHERE stockid='" . $_SESSION['Adjustment' . $identifier]->StockID . "'",$db); $myrow = DB_fetch_row($result); if (DB_num_rows($result)==0) { prnMsg( _('The entered item code does not exist'),'error'); $InputError = true; - } elseif (!is_numeric($_SESSION['Adjustment']->Quantity)){ + } elseif (!is_numeric($_SESSION['Adjustment' . $identifier]->Quantity)){ prnMsg( _('The quantity entered must be numeric'),'error'); $InputError = true; - } elseif ($_SESSION['Adjustment']->Quantity==0){ + } elseif ($_SESSION['Adjustment' . $identifier]->Quantity==0){ prnMsg( _('The quantity entered cannot be zero') . '. ' . _('There would be no adjustment to make'),'error'); $InputError = true; - } elseif ($_SESSION['Adjustment']->Controlled==1 AND count($_SESSION['Adjustment']->SerialItems)==0) { + } elseif ($_SESSION['Adjustment' . $identifier]->Controlled==1 AND count($_SESSION['Adjustment' . $identifier]->SerialItems)==0) { prnMsg( _('The item entered is a controlled item that requires the detail of the serial numbers or batch references to be adjusted to be entered'),'error'); $InputError = true; } if ($_SESSION['ProhibitNegativeStock']==1){ $SQL = "SELECT quantity FROM locstock - WHERE stockid='" . $_SESSION['Adjustment']->StockID . "' - AND loccode='" . $_SESSION['Adjustment']->StockLocation . "'"; + WHERE stockid='" . $_SESSION['Adjustment' . $identifier]->StockID . "' + AND loccode='" . $_SESSION['Adjustment' . $identifier]->StockLocation . "'"; $CheckNegResult=DB_query($SQL,$db); $CheckNegRow = DB_fetch_array($CheckNegResult); - if ($CheckNegRow['quantity']+$_SESSION['Adjustment']->Quantity <0){ + if ($CheckNegRow['quantity']+$_SESSION['Adjustment' . $identifier]->Quantity <0){ $InputError=true; prnMsg(_('The system parameters are set to prohibit negative stocks. Processing this stock adjustment would result in negative stock at this location. This adjustment will not be processed.'),'error'); } @@ -169,8 +165,8 @@ // Need to get the current location quantity will need it later for the stock movement $SQL="SELECT locstock.quantity FROM locstock - WHERE locstock.stockid='" . $_SESSION['Adjustment']->StockID . "' - AND loccode= '" . $_SESSION['Adjustment']->StockLocation . "'"; + WHERE locstock.stockid='" . $_SESSION['Adjustment' . $identifier]->StockID . "' + AND loccode= '" . $_SESSION['Adjustment' . $identifier]->StockLocation . "'"; $Result = DB_query($SQL, $db); if (DB_num_rows($Result)==1){ $LocQtyRow = DB_fetch_row($Result); @@ -190,15 +186,15 @@ qty, newqoh) VALUES ( - '" . $_SESSION['Adjustment']->StockID . "', + '" . $_SESSION['Adjustment' . $identifier]->StockID . "', 17, '" . $AdjustmentNumber . "', - '" . $_SESSION['Adjustment']->StockLocation . "', + '" . $_SESSION['Adjustment' . $identifier]->StockLocation . "', '" . $SQLAdjustmentDate . "', '" . $PeriodNo . "', - '" . $_SESSION['Adjustment']->Narrative ."', - '" . $_SESSION['Adjustment']->Quantity . "', - '" . ($QtyOnHandPrior + $_SESSION['Adjustment']->Quantity) . "' + '" . $_SESSION['Adjustment' . $identifier]->Narrative ."', + '" . $_SESSION['Adjustment' . $identifier]->Quantity . "', + '" . ($QtyOnHandPrior + $_SESSION['Adjustment' . $identifier]->Quantity) . "' )"; @@ -211,16 +207,16 @@ /*Insert the StockSerialMovements and update the StockSerialItems for controlled items*/ - if ($_SESSION['Adjustment']->Controlled ==1){ - foreach($_SESSION['Adjustment']->SerialItems as $Item){ + if ($_SESSION['Adjustment' . $identifier]->Controlled ==1){ + foreach($_SESSION['Adjustment' . $identifier]->SerialItems as $Item){ /*We need to add or update the StockSerialItem record and The StockSerialMoves as well */ /*First need to check if the serial items already exists or not */ $SQL = "SELECT COUNT(*) FROM stockserialitems - WHERE stockid='" . $_SESSION['Adjustment']->StockID . "' - AND loccode='" . $_SESSION['Adjustment']->StockLocation . "' + WHERE stockid='" . $_SESSION['Adjustment' . $identifier]->StockID . "' + AND loccode='" . $_SESSION['Adjustment' . $identifier]->StockLocation . "' AND serialno='" . $Item->BundleRef . "'"; $ErrMsg = _('Unable to determine if the serial item exists'); $Result = DB_query($SQL,$db,$ErrMsg); @@ -229,8 +225,8 @@ if ($SerialItemExistsRow[0]==1){ $SQL = "UPDATE stockserialitems SET quantity= quantity + " . $Item->BundleQty . " - WHERE stockid='" . $_SESSION['Adjustment']->StockID . "' - AND loccode='" . $_SESSION['Adjustment']->StockLocation . "' + WHERE stockid='" . $_SESSION['Adjustment' . $identifier]->StockID . "' + AND loccode='" . $_SESSION['Adjustment' . $identifier]->StockLocation . "' AND serialno='" . $Item->BundleRef . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The serial stock item record could not be updated because'); @@ -244,8 +240,8 @@ qualitytext, quantity, expirationdate) - VALUES ('" . $_SESSION['Adjustment']->StockID . "', - '" . $_SESSION['Adjustment']->StockLocation . "', + VALUES ('" . $_SESSION['Adjustment' . $identifier]->StockID . "', + '" . $_SESSION['Adjustment' . $identifier]->StockLocation . "', '" . $Item->BundleRef . "', '', '" . $Item->BundleQty . "', @@ -264,7 +260,7 @@ serialno, moveqty) VALUES ('" . $StkMoveNo . "', - '" . $_SESSION['Adjustment']->StockID . "', + '" . $_SESSION['Adjustment' . $identifier]->StockID . "', '" . $Item->BundleRef . "', '" . $Item->BundleQty . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The serial stock movement record could not be inserted because'); @@ -276,18 +272,18 @@ - $SQL = "UPDATE locstock SET quantity = quantity + '" . $_SESSION['Adjustment']->Quantity . "' - WHERE stockid='" . $_SESSION['Adjustment']->StockID . "' - AND loccode='" . $_SESSION['Adjustment']->StockLocation . "'"; + $SQL = "UPDATE locstock SET quantity = quantity + '" . $_SESSION['Adjustment' . $identifier]->Quantity . "' + WHERE stockid='" . $_SESSION['Adjustment' . $identifier]->StockID . "' + AND loccode='" . $_SESSION['Adjustment' . $identifier]->StockLocation . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' ._('The location stock record could not be updated because'); $DbgMsg = _('The following SQL to update the stock record was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); - if ($_SESSION['CompanyRecord']['gllink_stock']==1 AND $_SESSION['Adjustment']->StandardCost > 0){ + if ($_SESSION['CompanyRecord']['gllink_stock']==1 AND $_SESSION['Adjustment' . $identifier]->StandardCost > 0){ - $StockGLCodes = GetStockGLCode($_SESSION['Adjustment']->StockID,$db); + $StockGLCodes = GetStockGLCode($_SESSION['Adjustment' . $identifier]->StockID,$db); $SQL = "INSERT INTO gltrans (type, typeno, @@ -302,10 +298,10 @@ '" . $SQLAdjustmentDate . "', '" . $PeriodNo . "', '" . $StockGLCodes['adjglact'] . "', - '" . round($_SESSION['Adjustment']->StandardCost * -($_SESSION['Adjustment']->Quantity), $_SESSION['CompanyRecord']['decimalplaces']) . "', - '" . $_SESSION['Adjustment']->StockID . " x " . $_SESSION['Adjustment']->Quantity . " @ " . - $_SESSION['Adjustment']->StandardCost . " " . $_SESSION['Adjustment']->Narrative . "', - '" . $_SESSION['Adjustment']->tag . "' + '" . round($_SESSION['Adjustment' . $identifier]->StandardCost * -($_SESSION['Adjustment' . $identifier]->Quantity), $_SESSION['CompanyRecord']['decimalplaces']) . "', + '" . $_SESSION['Adjustment' . $identifier]->StockID . " x " . $_SESSION['Adjustment' . $identifier]->Quantity . " @ " . + $_SESSION['Adjustment' . $identifier]->StandardCost . " " . $_SESSION['Adjustment' . $identifier]->Narrative . "', + '" . $_SESSION['Adjustment' . $identifier]->tag . "' )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction entries could not be added because'); @@ -325,9 +321,9 @@ '" . $SQLAdjustmentDate . "', '" . $PeriodNo . "', '" . $StockGLCodes['stockact'] . "', - '" . round($_SESSION['Adjustment']->StandardCost * $_SESSION['Adjustment']->Quantity,$_SESSION['CompanyRecord']['decimalplaces']) . "', - '" . $_SESSION['Adjustment']->StockID . " x " . $_SESSION['Adjustment']->Quantity . " @ " . $_SESSION['Adjustment']->StandardCost . " " . $_SESSION['Adjustment']->Narrative . "', - '" . $_SESSION['Adjustment']->tag . "' + '" . round($_SESSION['Adjustment' . $identifier]->StandardCost * $_SESSION['Adjustment' . $identifier]->Quantity,$_SESSION['CompanyRecord']['decimalplaces']) . "', + '" . $_SESSION['Adjustment' . $identifier]->StockID . " x " . $_SESSION['Adjustment' . $identifier]->Quantity . " @ " . $_SESSION['Adjustment' . $identifier]->StandardCost . " " . $_SESSION['Adjustment' . $identifier]->Narrative . "', + '" . $_SESSION['Adjustment' . $identifier]->tag . "' )"; $Errmsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction entries could not be added because'); @@ -339,16 +335,16 @@ $Result = DB_Txn_Commit($db); - $ConfirmationText = _('A stock adjustment for'). ' ' . $_SESSION['Adjustment']->StockID . ' - ' . $_SESSION['Adjustment']->ItemDescription . ' '._('has been created from location').' ' . $_SESSION['Adjustment']->StockLocation .' '. _('for a quantity of') . ' ' . locale_number_format($_SESSION['Adjustment']->Quantity,$_SESSION['Adjustment']->DecimalPlaces) ; + $ConfirmationText = _('A stock adjustment for'). ' ' . $_SESSION['Adjustment' . $identifier]->StockID . ' - ' . $_SESSION['Adjustment' . $identifier]->ItemDescription . ' '._('has been created from location').' ' . $_SESSION['Adjustment' . $identifier]->StockLocation .' '. _('for a quantity of') . ' ' . locale_number_format($_SESSION['Adjustment' . $identifier]->Quantity,$_SESSION['Adjustment' . $identifier]->DecimalPlaces) ; prnMsg( $ConfirmationText,'success'); if ($_SESSION['InventoryManagerEmail']!=''){ $ConfirmationText = $ConfirmationText . ' ' . _('by user') . ' ' . $_SESSION['UserID'] . ' ' . _('at') . ' ' . Date('Y-m-d H:i:s'); - $EmailSubject = _('Stock adjustment for'). ' ' . $_SESSION['Adjustment']->StockID; + $EmailSubject = _('Stock adjustment for'). ' ' . $_SESSION['Adjustment' . $identifier]->StockID; mail($_SESSION['InventoryManagerEmail'],$EmailSubject,$ConfirmationText); } - unset ($_SESSION['Adjustment']); + unset ($_SESSION['Adjustment' . $identifier]); } /* end if there was no input error */ }/* end if the user hit enter the adjustment */ @@ -357,15 +353,15 @@ echo '<form action="'. htmlspecialchars($_SERVER['PHP_SELF']) . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -if (!isset($_SESSION['Adjustment'])) { +if (!isset($_SESSION['Adjustment' . $identifier])) { $StockID=''; $Controlled= 0; $Quantity = 0; $DecimalPlaces =2; } else { - $StockID = $_SESSION['Adjustment']->StockID; - $Controlled = $_SESSION['Adjustment']->Controlled; - $Quantity = $_SESSION['Adjustment']->Quantity; + $StockID = $_SESSION['Adjustment' . $identifier]->StockID; + $Controlled = $_SESSION['Adjustment' . $identifier]->Controlled; + $Quantity = $_SESSION['Adjustment' . $identifier]->Quantity; $sql="SELECT materialcost, labourcost, overheadcost, @@ -376,8 +372,8 @@ $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); - $_SESSION['Adjustment']->PartUnit=$myrow['units']; - $_SESSION['Adjustment']->StandardCost=$myrow['materialcost']+$myrow['labourcost']+$myrow['overheadcost']; + $_SESSION['Adjustment' . $identifier]->PartUnit=$myrow['units']; + $_SESSION['Adjustment' . $identifier]->StandardCost=$myrow['materialcost']+$myrow['labourcost']+$myrow['overheadcost']; $DecimalPlaces = $myrow['decimalplaces']; } echo '<br /> @@ -406,9 +402,9 @@ echo '</td> <td><input type="submit" name="CheckCode" value="'._('Check Part').'" /></td> </tr>'; -if (isset($_SESSION['Adjustment']) AND mb_strlen($_SESSION['Adjustment']->ItemDescription)>1){ +if (isset($_SESSION['Adjustment' . $identifier]) AND mb_strlen($_SESSION['Adjustment' . $identifier]->ItemDescription)>1){ echo '<tr> - <td colspan="3"><font color="blue" size="3">' . $_SESSION['Adjustment']->ItemDescription . ' ('._('In Units of').' ' . $_SESSION['Adjustment']->PartUnit . ' ) - ' . _('Unit Cost').' = ' . locale_number_format($_SESSION['Adjustment']->StandardCost,4) . '</font></td> + <td colspan="3"><font color="blue" size="3">' . $_SESSION['Adjustment' . $identifier]->ItemDescription . ' ('._('In Units of').' ' . $_SESSION['Adjustment' . $identifier]->PartUnit . ' ) - ' . _('Unit Cost').' = ' . locale_number_format($_SESSION['Adjustment' . $identifier]->StandardCost,4) . '</font></td> </tr>'; } @@ -418,8 +414,8 @@ $sql = "SELECT loccode, locationname FROM locations"; $resultStkLocs = DB_query($sql,$db); while ($myrow=DB_fetch_array($resultStkLocs)){ - if (isset($_SESSION['Adjustment']->StockLocation)){ - if ($myrow['loccode'] == $_SESSION['Adjustment']->StockLocation){ + if (isset($_SESSION['Adjustment' . $identifier]->StockLocation)){ + if ($myrow['loccode'] == $_SESSION['Adjustment' . $identifier]->StockLocation){ echo '<option selected="selected" value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; @@ -433,8 +429,8 @@ } echo '</select></td></tr>'; -if (isset($_SESSION['Adjustment']) AND !isset($_SESSION['Adjustment']->Narrative)) { - $_SESSION['Adjustment']->Narrative = ''; +if (isset($_SESSION['Adjustment' . $identifier]) AND !isset($_SESSION['Adjustment' . $identifier]->Narrative)) { + $_SESSION['Adjustment' . $identifier]->Narrative = ''; $Narrative =''; } else { $Narrative =''; @@ -449,11 +445,11 @@ echo '<td>'; if ($Controlled==1){ - if ($_SESSION['Adjustment']->StockLocation == ''){ - $_SESSION['Adjustment']->StockLocation = $_SESSION['UserStockLocation']; + if ($_SESSION['Adjustment' . $identifier]->StockLocation == ''){ + $_SESSION['Adjustment' . $identifier]->StockLocation = $_SESSION['UserStockLocation']; } - echo '<input type="hidden" name="Quantity" value="' . $_SESSION['Adjustment']->Quantity . '" /> - '.locale_number_format($_SESSION['Adjustment']->Quantity,$DecimalPlaces) .' + echo '<input type="hidden" name="Quantity" value="' . $_SESSION['Adjustment' . $identifier]->Quantity . '" /> + '.locale_number_format($_SESSION['Adjustment' . $identifier]->Quantity,$DecimalPlaces) .' [<a href="'.$rootpath.'/StockAdjustmentsControlled.php?AdjType=REMOVE">'._('Remove').'</a>] [<a href="'.$rootpath.'/StockAdjustmentsControlled.php?AdjType=ADD">'._('Add').'</a>]'; } else { @@ -473,7 +469,7 @@ $result=DB_query($SQL,$db); echo '<option value="0">0 - ' . _('None') . '</option>'; while ($myrow=DB_fetch_array($result)){ - if (isset($_SESSION['Adjustment']->tag) AND $_SESSION['Adjustment']->tag==$myrow['tagref']){ + if (isset($_SESSION['Adjustment' . $identifier]->tag) AND $_SESSION['Adjustment' . $identifier]->tag==$myrow['tagref']){ echo '<option selected="selected" value="' . $myrow['tagref'] . '">' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; } else { echo '<option value="' . $myrow['tagref'] . '">' . $myrow['tagref'].' - ' .$myrow['tagdescription']. '</option>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-02-20 09:24:54
|
Revision: 4935 http://web-erp.svn.sourceforge.net/web-erp/?rev=4935&view=rev Author: daintree Date: 2012-02-20 09:24:43 +0000 (Mon, 20 Feb 2012) Log Message: ----------- review Modified Paths: -------------- trunk/StockAdjustmentsControlled.php Modified: trunk/StockAdjustmentsControlled.php =================================================================== --- trunk/StockAdjustmentsControlled.php 2012-02-20 07:43:39 UTC (rev 4934) +++ trunk/StockAdjustmentsControlled.php 2012-02-20 09:24:43 UTC (rev 4935) @@ -10,8 +10,14 @@ /* Session started in header.inc for password checking and authorisation level check */ include('includes/header.inc'); +if (empty($_GET['identifier'])) { + /*unique session identifier to ensure that there is no conflict with other stock adjustment sessions on the same machine */ + $identifier=date('U'); +} else { + $identifier=$_GET['identifier']; +} -if (!isset($_SESSION['Adjustment'])) { +if (!isset($_SESSION['Adjustment'.$identifier])) { /* This page can only be called when a stock adjustment is pending */ echo '<div class="centre"><a href="' . $rootpath . '/StockAdjustments.php?NewAdjustment=Yes">'. _('Enter A Stock Adjustment'). '</a><br />'; prnMsg( _('This page can only be opened if a stock adjustment for a controlled item has been entered').'<br />','error'); @@ -19,14 +25,14 @@ include('includes/footer.inc'); exit; } -if (isset($_SESSION['Adjustment'])){ +if (isset($_SESSION['Adjustment'.$identifier])){ if (isset($_GET['AdjType']) and $_GET['AdjType']!=''){ - $_SESSION['Adjustment']->AdjustmentType = $_GET['AdjType']; + $_SESSION['Adjustment'.$identifier]->AdjustmentType = $_GET['AdjType']; } } /*Save some typing by referring to the line item class object in short form */ -$LineItem = $_SESSION['Adjustment']; +$LineItem = $_SESSION['Adjustment'.$identifier]; //Make sure this item is really controlled if ( $LineItem->Controlled != 1 ){ @@ -44,7 +50,7 @@ echo '<br /><font size="2"><b>'. _('Adjustment of controlled item').' ' . $LineItem->StockID . ' - ' . $LineItem->ItemDescription ; /** vars needed by InputSerialItem : **/ -$LocationOut = $_SESSION['Adjustment']->StockLocation; +$LocationOut = $_SESSION['Adjustment'.$identifier]->StockLocation; $StockID = $LineItem->StockID; if ($LineItem->AdjustmentType == 'ADD'){ echo '<br />'. _('Adding Items').'...'; @@ -66,7 +72,7 @@ /*TotalQuantity set inside this include file from the sum of the bundles of the item selected for adjusting */ -$_SESSION['Adjustment']->Quantity = $TotalQuantity; +$_SESSION['Adjustment'.$identifier]->Quantity = $TotalQuantity; /*Also a multi select box for adding bundles to the adjustment without keying, showing only when keying */ include('includes/footer.inc'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-02-20 09:24:54
|
Revision: 4935 http://web-erp.svn.sourceforge.net/web-erp/?rev=4935&view=rev Author: daintree Date: 2012-02-20 09:24:43 +0000 (Mon, 20 Feb 2012) Log Message: ----------- review Modified Paths: -------------- trunk/StockAdjustmentsControlled.php Modified: trunk/StockAdjustmentsControlled.php =================================================================== --- trunk/StockAdjustmentsControlled.php 2012-02-20 07:43:39 UTC (rev 4934) +++ trunk/StockAdjustmentsControlled.php 2012-02-20 09:24:43 UTC (rev 4935) @@ -10,8 +10,14 @@ /* Session started in header.inc for password checking and authorisation level check */ include('includes/header.inc'); +if (empty($_GET['identifier'])) { + /*unique session identifier to ensure that there is no conflict with other stock adjustment sessions on the same machine */ + $identifier=date('U'); +} else { + $identifier=$_GET['identifier']; +} -if (!isset($_SESSION['Adjustment'])) { +if (!isset($_SESSION['Adjustment'.$identifier])) { /* This page can only be called when a stock adjustment is pending */ echo '<div class="centre"><a href="' . $rootpath . '/StockAdjustments.php?NewAdjustment=Yes">'. _('Enter A Stock Adjustment'). '</a><br />'; prnMsg( _('This page can only be opened if a stock adjustment for a controlled item has been entered').'<br />','error'); @@ -19,14 +25,14 @@ include('includes/footer.inc'); exit; } -if (isset($_SESSION['Adjustment'])){ +if (isset($_SESSION['Adjustment'.$identifier])){ if (isset($_GET['AdjType']) and $_GET['AdjType']!=''){ - $_SESSION['Adjustment']->AdjustmentType = $_GET['AdjType']; + $_SESSION['Adjustment'.$identifier]->AdjustmentType = $_GET['AdjType']; } } /*Save some typing by referring to the line item class object in short form */ -$LineItem = $_SESSION['Adjustment']; +$LineItem = $_SESSION['Adjustment'.$identifier]; //Make sure this item is really controlled if ( $LineItem->Controlled != 1 ){ @@ -44,7 +50,7 @@ echo '<br /><font size="2"><b>'. _('Adjustment of controlled item').' ' . $LineItem->StockID . ' - ' . $LineItem->ItemDescription ; /** vars needed by InputSerialItem : **/ -$LocationOut = $_SESSION['Adjustment']->StockLocation; +$LocationOut = $_SESSION['Adjustment'.$identifier]->StockLocation; $StockID = $LineItem->StockID; if ($LineItem->AdjustmentType == 'ADD'){ echo '<br />'. _('Adding Items').'...'; @@ -66,7 +72,7 @@ /*TotalQuantity set inside this include file from the sum of the bundles of the item selected for adjusting */ -$_SESSION['Adjustment']->Quantity = $TotalQuantity; +$_SESSION['Adjustment'.$identifier]->Quantity = $TotalQuantity; /*Also a multi select box for adding bundles to the adjustment without keying, showing only when keying */ include('includes/footer.inc'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ex...@us...> - 2012-02-20 07:43:48
|
Revision: 4934 http://web-erp.svn.sourceforge.net/web-erp/?rev=4934&view=rev Author: ExsonQu Date: 2012-02-20 07:43:39 +0000 (Mon, 20 Feb 2012) Log Message: ----------- Replace the file back since the revised one will lead to some Chinese Characters missing Modified Paths: -------------- trunk/includes/class.pdf.php Modified: trunk/includes/class.pdf.php =================================================================== --- trunk/includes/class.pdf.php 2012-02-20 07:22:30 UTC (rev 4933) +++ trunk/includes/class.pdf.php 2012-02-20 07:43:39 UTC (rev 4934) @@ -70,11 +70,11 @@ TCPDF::Line ($x1,$this->h-$y1,$x2,$this->h-$y2,$style); } - function addText($xb,$YPos,$size,$text)//,$angle=0,$wordSpaceAdjust=0) + function addText($xb,$yb,$size,$text)//,$angle=0,$wordSpaceAdjust=0) { // Javier $text = html_entity_decode($text); $this->SetFontSize($size); - $this->Text($xb, $this->h-$YPos, $text); + $this->Text($xb, $this->h-$yb, $text); } function addInfo($label, $value) { @@ -103,8 +103,8 @@ } - function addJpegFromFile($img,$XPos,$y,$Width=0,$Height=0){ - $this->Image($img, $XPos, $this->h-$y-$Height, $Width, $Height); + function addJpegFromFile($img,$x,$y,$w=0,$h=0){ + $this->Image($img, $x, $this->h-$y-$h, $w, $h); } /* @@ -242,38 +242,36 @@ $this->line($XPos, $YPos-$Height, $XPos, $YPos); } - function addTextWrap($XPos, $YPos, $Width, $Height, $Text, $Align='J', $border=0, $fill=0) { - - /* Returns the balance of the string that could not fit in the width - * XPos = pdf horizontal coordinate - * YPos = pdf vertical coordiante - */ + function addTextWrap($x, $yb, $w, $h, $txt, $align='J', $border=0, $fill=0) { + + //$txt = html_entity_decode($txt); + //some special characters are html encoded //this code serves to make them appear human readable in pdf file - $Text = html_entity_decode($Text, ENT_QUOTES, 'UTF-8'); + $txt = html_entity_decode($txt, ENT_QUOTES, 'UTF-8'); - $this->x = $XPos; - $this->y = $this->h - $YPos - $Height; + $this->x = $x; + $this->y = $this->h - $yb - $h; - switch($Align) { + switch($align) { case 'right': - $Align = 'R'; break; + $align = 'R'; break; case 'center': - $Align = 'C'; break; + $align = 'C'; break; default: - $Align = 'L'; + $align = 'L'; } - $this->SetFontSize($Height); - - if($Width==0) { - $Width=$this->w-$this->rMargin-$this->x; + $this->SetFontSize($h); + $cw=&$this->CurrentFont['cw']; + if($w==0) { + $w=$this->w-$this->rMargin-$this->x; } - $wmax=($Width-2*$this->cMargin); - $s=str_replace("\r",'',$Text); + $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; + $s=str_replace("\r",'',$txt); $s=str_replace("\n",' ',$s); $s = trim($s).' '; - $nb=mb_strlen($s); + $nb=strlen($s); $b=0; if ($border) { if ($border==1) { @@ -282,20 +280,19 @@ $b2='LR'; } else { $b2=''; - if(is_int(mb_strpos($border,'L'))) { + if(is_int(strpos($border,'L'))) { $b2.='L'; } - if(is_int(mb_strpos($border,'R'))) { + if(is_int(strpos($border,'R'))) { $b2.='R'; } - $b=is_int(mb_strpos($border,'T')) ? $b2.'T' : $b2; + $b=is_int(strpos($border,'T')) ? $b2.'T' : $b2; } } $sep=-1; $i=0; $l= $ls=0; $ns=0; - $cw = $this->GetStringWidth($s, '', '', 0, true); while($i<$nb) { $c=$s{$i}; if($c==' ' AND $i>0) { @@ -321,15 +318,15 @@ } $sep = $i; } else { - if($Align=='J') { - $this->ws=($ns>1) ? ($wmax-$ls)/($ns-1) : 0; + if($align=='J') { + $this->ws=($ns>1) ? ($wmax-$ls)/1000*$this->FontSize/($ns-1) : 0; $this->_out(sprintf('%.3f Tw',$this->ws*$this->k)); } } - $this->Cell($Width,$Height,mb_substr($s,0,$sep),$b,2,$Align,$fill); + $this->Cell($w,$h,substr($s,0,$sep),$b,2,$align,$fill); $this->x=$this->lMargin; - return mb_substr($s, $sep); + return substr($s, $sep); } //end function addTextWrap } // end of class This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ex...@us...> - 2012-02-20 07:43:45
|
Revision: 4934 http://web-erp.svn.sourceforge.net/web-erp/?rev=4934&view=rev Author: ExsonQu Date: 2012-02-20 07:43:39 +0000 (Mon, 20 Feb 2012) Log Message: ----------- Replace the file back since the revised one will lead to some Chinese Characters missing Modified Paths: -------------- trunk/includes/class.pdf.php Modified: trunk/includes/class.pdf.php =================================================================== --- trunk/includes/class.pdf.php 2012-02-20 07:22:30 UTC (rev 4933) +++ trunk/includes/class.pdf.php 2012-02-20 07:43:39 UTC (rev 4934) @@ -70,11 +70,11 @@ TCPDF::Line ($x1,$this->h-$y1,$x2,$this->h-$y2,$style); } - function addText($xb,$YPos,$size,$text)//,$angle=0,$wordSpaceAdjust=0) + function addText($xb,$yb,$size,$text)//,$angle=0,$wordSpaceAdjust=0) { // Javier $text = html_entity_decode($text); $this->SetFontSize($size); - $this->Text($xb, $this->h-$YPos, $text); + $this->Text($xb, $this->h-$yb, $text); } function addInfo($label, $value) { @@ -103,8 +103,8 @@ } - function addJpegFromFile($img,$XPos,$y,$Width=0,$Height=0){ - $this->Image($img, $XPos, $this->h-$y-$Height, $Width, $Height); + function addJpegFromFile($img,$x,$y,$w=0,$h=0){ + $this->Image($img, $x, $this->h-$y-$h, $w, $h); } /* @@ -242,38 +242,36 @@ $this->line($XPos, $YPos-$Height, $XPos, $YPos); } - function addTextWrap($XPos, $YPos, $Width, $Height, $Text, $Align='J', $border=0, $fill=0) { - - /* Returns the balance of the string that could not fit in the width - * XPos = pdf horizontal coordinate - * YPos = pdf vertical coordiante - */ + function addTextWrap($x, $yb, $w, $h, $txt, $align='J', $border=0, $fill=0) { + + //$txt = html_entity_decode($txt); + //some special characters are html encoded //this code serves to make them appear human readable in pdf file - $Text = html_entity_decode($Text, ENT_QUOTES, 'UTF-8'); + $txt = html_entity_decode($txt, ENT_QUOTES, 'UTF-8'); - $this->x = $XPos; - $this->y = $this->h - $YPos - $Height; + $this->x = $x; + $this->y = $this->h - $yb - $h; - switch($Align) { + switch($align) { case 'right': - $Align = 'R'; break; + $align = 'R'; break; case 'center': - $Align = 'C'; break; + $align = 'C'; break; default: - $Align = 'L'; + $align = 'L'; } - $this->SetFontSize($Height); - - if($Width==0) { - $Width=$this->w-$this->rMargin-$this->x; + $this->SetFontSize($h); + $cw=&$this->CurrentFont['cw']; + if($w==0) { + $w=$this->w-$this->rMargin-$this->x; } - $wmax=($Width-2*$this->cMargin); - $s=str_replace("\r",'',$Text); + $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; + $s=str_replace("\r",'',$txt); $s=str_replace("\n",' ',$s); $s = trim($s).' '; - $nb=mb_strlen($s); + $nb=strlen($s); $b=0; if ($border) { if ($border==1) { @@ -282,20 +280,19 @@ $b2='LR'; } else { $b2=''; - if(is_int(mb_strpos($border,'L'))) { + if(is_int(strpos($border,'L'))) { $b2.='L'; } - if(is_int(mb_strpos($border,'R'))) { + if(is_int(strpos($border,'R'))) { $b2.='R'; } - $b=is_int(mb_strpos($border,'T')) ? $b2.'T' : $b2; + $b=is_int(strpos($border,'T')) ? $b2.'T' : $b2; } } $sep=-1; $i=0; $l= $ls=0; $ns=0; - $cw = $this->GetStringWidth($s, '', '', 0, true); while($i<$nb) { $c=$s{$i}; if($c==' ' AND $i>0) { @@ -321,15 +318,15 @@ } $sep = $i; } else { - if($Align=='J') { - $this->ws=($ns>1) ? ($wmax-$ls)/($ns-1) : 0; + if($align=='J') { + $this->ws=($ns>1) ? ($wmax-$ls)/1000*$this->FontSize/($ns-1) : 0; $this->_out(sprintf('%.3f Tw',$this->ws*$this->k)); } } - $this->Cell($Width,$Height,mb_substr($s,0,$sep),$b,2,$Align,$fill); + $this->Cell($w,$h,substr($s,0,$sep),$b,2,$align,$fill); $this->x=$this->lMargin; - return mb_substr($s, $sep); + return substr($s, $sep); } //end function addTextWrap } // end of class This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ex...@us...> - 2012-02-20 07:22:39
|
Revision: 4933 http://web-erp.svn.sourceforge.net/web-erp/?rev=4933&view=rev Author: ExsonQu Date: 2012-02-20 07:22:30 +0000 (Mon, 20 Feb 2012) Log Message: ----------- Replace the file to 4.04, the new file caused some Chinese Characters missing. Modified Paths: -------------- branches/stable/includes/class.pdf.php Modified: branches/stable/includes/class.pdf.php =================================================================== --- branches/stable/includes/class.pdf.php 2012-02-20 07:19:43 UTC (rev 4932) +++ branches/stable/includes/class.pdf.php 2012-02-20 07:22:30 UTC (rev 4933) @@ -70,11 +70,11 @@ TCPDF::Line ($x1,$this->h-$y1,$x2,$this->h-$y2,$style); } - function addText($xb,$YPos,$size,$text)//,$angle=0,$wordSpaceAdjust=0) + function addText($xb,$yb,$size,$text)//,$angle=0,$wordSpaceAdjust=0) { // Javier $text = html_entity_decode($text); $this->SetFontSize($size); - $this->Text($xb, $this->h-$YPos, $text); + $this->Text($xb, $this->h-$yb, $text); } function addInfo($label, $value) { @@ -103,8 +103,8 @@ } - function addJpegFromFile($img,$XPos,$y,$Width=0,$Height=0){ - $this->Image($img, $XPos, $this->h-$y-$Height, $Width, $Height); + function addJpegFromFile($img,$x,$y,$w=0,$h=0){ + $this->Image($img, $x, $this->h-$y-$h, $w, $h); } /* @@ -242,38 +242,36 @@ $this->line($XPos, $YPos-$Height, $XPos, $YPos); } - function addTextWrap($XPos, $YPos, $Width, $Height, $Text, $Align='J', $border=0, $fill=0) { - - /* Returns the balance of the string that could not fit in the width - * XPos = pdf horizontal coordinate - * YPos = pdf vertical coordiante - */ + function addTextWrap($x, $yb, $w, $h, $txt, $align='J', $border=0, $fill=0) { + + //$txt = html_entity_decode($txt); + //some special characters are html encoded //this code serves to make them appear human readable in pdf file - $Text = html_entity_decode($Text, ENT_QUOTES, 'UTF-8'); + $txt = html_entity_decode($txt, ENT_QUOTES, 'UTF-8'); - $this->x = $XPos; - $this->y = $this->h - $YPos - $Height; + $this->x = $x; + $this->y = $this->h - $yb - $h; - switch($Align) { + switch($align) { case 'right': - $Align = 'R'; break; + $align = 'R'; break; case 'center': - $Align = 'C'; break; + $align = 'C'; break; default: - $Align = 'L'; + $align = 'L'; } - $this->SetFontSize($Height); - - if($Width==0) { - $Width=$this->w-$this->rMargin-$this->x; + $this->SetFontSize($h); + $cw=&$this->CurrentFont['cw']; + if($w==0) { + $w=$this->w-$this->rMargin-$this->x; } - $wmax=($Width-2*$this->cMargin); - $s=str_replace("\r",'',$Text); + $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; + $s=str_replace("\r",'',$txt); $s=str_replace("\n",' ',$s); $s = trim($s).' '; - $nb=mb_strlen($s); + $nb=strlen($s); $b=0; if ($border) { if ($border==1) { @@ -282,20 +280,19 @@ $b2='LR'; } else { $b2=''; - if(is_int(mb_strpos($border,'L'))) { + if(is_int(strpos($border,'L'))) { $b2.='L'; } - if(is_int(mb_strpos($border,'R'))) { + if(is_int(strpos($border,'R'))) { $b2.='R'; } - $b=is_int(mb_strpos($border,'T')) ? $b2.'T' : $b2; + $b=is_int(strpos($border,'T')) ? $b2.'T' : $b2; } } $sep=-1; $i=0; $l= $ls=0; $ns=0; - $cw = $this->GetStringWidth($s, '', '', 0, true); while($i<$nb) { $c=$s{$i}; if($c==' ' AND $i>0) { @@ -321,15 +318,15 @@ } $sep = $i; } else { - if($Align=='J') { - $this->ws=($ns>1) ? ($wmax-$ls)/($ns-1) : 0; + if($align=='J') { + $this->ws=($ns>1) ? ($wmax-$ls)/1000*$this->FontSize/($ns-1) : 0; $this->_out(sprintf('%.3f Tw',$this->ws*$this->k)); } } - $this->Cell($Width,$Height,mb_substr($s,0,$sep),$b,2,$Align,$fill); + $this->Cell($w,$h,substr($s,0,$sep),$b,2,$align,$fill); $this->x=$this->lMargin; - return mb_substr($s, $sep); + return substr($s, $sep); } //end function addTextWrap } // end of class This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ex...@us...> - 2012-02-20 07:22:39
|
Revision: 4933 http://web-erp.svn.sourceforge.net/web-erp/?rev=4933&view=rev Author: ExsonQu Date: 2012-02-20 07:22:30 +0000 (Mon, 20 Feb 2012) Log Message: ----------- Replace the file to 4.04, the new file caused some Chinese Characters missing. Modified Paths: -------------- branches/stable/includes/class.pdf.php Modified: branches/stable/includes/class.pdf.php =================================================================== --- branches/stable/includes/class.pdf.php 2012-02-20 07:19:43 UTC (rev 4932) +++ branches/stable/includes/class.pdf.php 2012-02-20 07:22:30 UTC (rev 4933) @@ -70,11 +70,11 @@ TCPDF::Line ($x1,$this->h-$y1,$x2,$this->h-$y2,$style); } - function addText($xb,$YPos,$size,$text)//,$angle=0,$wordSpaceAdjust=0) + function addText($xb,$yb,$size,$text)//,$angle=0,$wordSpaceAdjust=0) { // Javier $text = html_entity_decode($text); $this->SetFontSize($size); - $this->Text($xb, $this->h-$YPos, $text); + $this->Text($xb, $this->h-$yb, $text); } function addInfo($label, $value) { @@ -103,8 +103,8 @@ } - function addJpegFromFile($img,$XPos,$y,$Width=0,$Height=0){ - $this->Image($img, $XPos, $this->h-$y-$Height, $Width, $Height); + function addJpegFromFile($img,$x,$y,$w=0,$h=0){ + $this->Image($img, $x, $this->h-$y-$h, $w, $h); } /* @@ -242,38 +242,36 @@ $this->line($XPos, $YPos-$Height, $XPos, $YPos); } - function addTextWrap($XPos, $YPos, $Width, $Height, $Text, $Align='J', $border=0, $fill=0) { - - /* Returns the balance of the string that could not fit in the width - * XPos = pdf horizontal coordinate - * YPos = pdf vertical coordiante - */ + function addTextWrap($x, $yb, $w, $h, $txt, $align='J', $border=0, $fill=0) { + + //$txt = html_entity_decode($txt); + //some special characters are html encoded //this code serves to make them appear human readable in pdf file - $Text = html_entity_decode($Text, ENT_QUOTES, 'UTF-8'); + $txt = html_entity_decode($txt, ENT_QUOTES, 'UTF-8'); - $this->x = $XPos; - $this->y = $this->h - $YPos - $Height; + $this->x = $x; + $this->y = $this->h - $yb - $h; - switch($Align) { + switch($align) { case 'right': - $Align = 'R'; break; + $align = 'R'; break; case 'center': - $Align = 'C'; break; + $align = 'C'; break; default: - $Align = 'L'; + $align = 'L'; } - $this->SetFontSize($Height); - - if($Width==0) { - $Width=$this->w-$this->rMargin-$this->x; + $this->SetFontSize($h); + $cw=&$this->CurrentFont['cw']; + if($w==0) { + $w=$this->w-$this->rMargin-$this->x; } - $wmax=($Width-2*$this->cMargin); - $s=str_replace("\r",'',$Text); + $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; + $s=str_replace("\r",'',$txt); $s=str_replace("\n",' ',$s); $s = trim($s).' '; - $nb=mb_strlen($s); + $nb=strlen($s); $b=0; if ($border) { if ($border==1) { @@ -282,20 +280,19 @@ $b2='LR'; } else { $b2=''; - if(is_int(mb_strpos($border,'L'))) { + if(is_int(strpos($border,'L'))) { $b2.='L'; } - if(is_int(mb_strpos($border,'R'))) { + if(is_int(strpos($border,'R'))) { $b2.='R'; } - $b=is_int(mb_strpos($border,'T')) ? $b2.'T' : $b2; + $b=is_int(strpos($border,'T')) ? $b2.'T' : $b2; } } $sep=-1; $i=0; $l= $ls=0; $ns=0; - $cw = $this->GetStringWidth($s, '', '', 0, true); while($i<$nb) { $c=$s{$i}; if($c==' ' AND $i>0) { @@ -321,15 +318,15 @@ } $sep = $i; } else { - if($Align=='J') { - $this->ws=($ns>1) ? ($wmax-$ls)/($ns-1) : 0; + if($align=='J') { + $this->ws=($ns>1) ? ($wmax-$ls)/1000*$this->FontSize/($ns-1) : 0; $this->_out(sprintf('%.3f Tw',$this->ws*$this->k)); } } - $this->Cell($Width,$Height,mb_substr($s,0,$sep),$b,2,$Align,$fill); + $this->Cell($w,$h,substr($s,0,$sep),$b,2,$align,$fill); $this->x=$this->lMargin; - return mb_substr($s, $sep); + return substr($s, $sep); } //end function addTextWrap } // end of class This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ex...@us...> - 2012-02-20 07:19:54
|
Revision: 4932 http://web-erp.svn.sourceforge.net/web-erp/?rev=4932&view=rev Author: ExsonQu Date: 2012-02-20 07:19:43 +0000 (Mon, 20 Feb 2012) Log Message: ----------- Add statement to make upgrade to 4.08.0 possible Modified Paths: -------------- branches/stable/UpgradeDatabase.php Modified: branches/stable/UpgradeDatabase.php =================================================================== --- branches/stable/UpgradeDatabase.php 2012-02-20 06:10:47 UTC (rev 4931) +++ branches/stable/UpgradeDatabase.php 2012-02-20 07:19:43 UTC (rev 4932) @@ -134,6 +134,9 @@ case '4.06.6': $SQLScripts[] = './sql/mysql/upgrade4.06-4.07.sql'; case '4.07.0': + $SQLScripts[] = './sql/mysql/upgrade4.07-4.08.sql'; + case '4.08.0': + break; } //end switch } @@ -226,4 +229,4 @@ } /*Dont do upgrade */ include('includes/footer.inc'); -?> \ 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: <Ex...@us...> - 2012-02-20 07:19:53
|
Revision: 4932 http://web-erp.svn.sourceforge.net/web-erp/?rev=4932&view=rev Author: ExsonQu Date: 2012-02-20 07:19:43 +0000 (Mon, 20 Feb 2012) Log Message: ----------- Add statement to make upgrade to 4.08.0 possible Modified Paths: -------------- branches/stable/UpgradeDatabase.php Modified: branches/stable/UpgradeDatabase.php =================================================================== --- branches/stable/UpgradeDatabase.php 2012-02-20 06:10:47 UTC (rev 4931) +++ branches/stable/UpgradeDatabase.php 2012-02-20 07:19:43 UTC (rev 4932) @@ -134,6 +134,9 @@ case '4.06.6': $SQLScripts[] = './sql/mysql/upgrade4.06-4.07.sql'; case '4.07.0': + $SQLScripts[] = './sql/mysql/upgrade4.07-4.08.sql'; + case '4.08.0': + break; } //end switch } @@ -226,4 +229,4 @@ } /*Dont do upgrade */ include('includes/footer.inc'); -?> \ 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: <Ex...@us...> - 2012-02-20 06:10:54
|
Revision: 4931 http://web-erp.svn.sourceforge.net/web-erp/?rev=4931&view=rev Author: ExsonQu Date: 2012-02-20 06:10:47 +0000 (Mon, 20 Feb 2012) Log Message: ----------- Fixed SMTP server setting failure which cannot store the input data Modified Paths: -------------- branches/stable/SMTPServer.php Modified: branches/stable/SMTPServer.php =================================================================== --- branches/stable/SMTPServer.php 2012-02-20 01:41:10 UTC (rev 4930) +++ branches/stable/SMTPServer.php 2012-02-20 06:10:47 UTC (rev 4931) @@ -7,8 +7,10 @@ include('includes/header.inc'); echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/email.gif" title="' . _('SMTP Server') . '" alt="" />' . ' ' . _('SMTP Server Settings') . '</p>'; +// First check if there are smtp server data or not -if (isset($_POST['submit'])) { + +if (isset($_POST['submit']) AND $_POST['MailServerSetting']==1) {//If there are already data setup, Update the table $sql="UPDATE emailsettings SET host='".$_POST['Host']."', port='".$_POST['Port']."', @@ -16,27 +18,70 @@ username='".$_POST['UserName']."', password='".$_POST['Password']."', auth='".$_POST['Auth']."'"; - $result=DB_query($sql, $db); + $ErrMsg = _('The email setting information is failed to update'); + $DbgMsg = _('The SQL failed to update is '); + $result1=DB_query($sql, $db, $ErrMsg, $DbgMsg); + unset($_POST['MailServerSetting']); prnMsg(_('The settings for the SMTP server have been successfully updated'), 'success'); echo '<br />'; + DB_free_result($result1); + +}elseif(isset($_POST['submit']) and $_POST['MailServerSetting']==0){//There is no data setup yet + $sql = "INSERT INTO emailsettings(host, + port, + heloaddress, + username, + password, + auth) + VALUES ( + '".$_POST['Host']."', + '".$_POST['Port']."', + '".$_POST['HeloAddress']."', + '".$_POST['UserName']."', + '".$_POST['Password']."', + '".$_POST['Auth']."')"; + $ErrMsg = _('The email settings are failed to be inserted'); + $DbgMsg = _('The SQL failed to insert the email information is'); + $result2 = DB_query($sql,$db); + DB_free_result($result2); + unset($_POST['MailServerSetting']); + prnMsg(_('The settings for the SMTP server have been sucessfully inserted'),'success'); + echo '<br/>'; } -$sql="SELECT id, - host, - port, - heloaddress, - username, - password, - timeout, - auth - FROM emailsettings"; + // Check the mail server setting status -$result=DB_query($sql, $db); + $sql="SELECT id, + host, + port, + heloaddress, + username, + password, + timeout, + auth + FROM emailsettings"; + $ErrMsg = _('The email settings information cannot be retrieved'); + $DbgMsg = _('The SQL that faild was'); -$myrow=DB_fetch_array($result); - + $result=DB_query($sql, $db,$ErrMsg,$DbgMsg); + if(DB_num_rows($result)!=0){ + $MailServerSetting = 1; + $myrow=DB_fetch_array($result); + }else{ + DB_free_result($result); + $MailServerSetting = 0; + $myrow['host']=''; + $myrow['port']=''; + $myrow['heloaddress']=''; + $myrow['username']=''; + $myrow['password']=''; + $myrow['timeout']=5; + } + + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; +echo '<input type="hidden" name="MailServerSetting" value="' . $MailServerSetting . '" />'; echo '<table class="selection">'; echo '<tr><td>'._('Server Host Name').'</td> <td><input type="text" name="Host" value="'.$myrow['host'].'" /></td></tr>'; @@ -47,11 +92,11 @@ echo '<tr><td>'._('Authorisation Required').'</td><td>'; echo '<select name="Auth">'; if ($myrow['auth']==1) { - echo '<option selected="selected" value="1">'._('True').'</option>'; - echo '<option value="0">'._('False').'</option>'; + echo '<option selected value=1>'._('True').'</option>'; + echo '<option value=0>'._('False').'</option>'; } else { - echo '<option value="1">'._('True').'</option>'; - echo '<option selected="selected" value="0">'._('False').'</option>'; + echo '<option value=1>'._('True').'</option>'; + echo '<option selected value=0>'._('False').'</option>'; } echo '</select></td></tr>'; echo '<tr><td>'._('User Name').'</td> @@ -65,4 +110,4 @@ include('includes/footer.inc'); -?> \ 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: <Ex...@us...> - 2012-02-20 06:10:54
|
Revision: 4931 http://web-erp.svn.sourceforge.net/web-erp/?rev=4931&view=rev Author: ExsonQu Date: 2012-02-20 06:10:47 +0000 (Mon, 20 Feb 2012) Log Message: ----------- Fixed SMTP server setting failure which cannot store the input data Modified Paths: -------------- branches/stable/SMTPServer.php Modified: branches/stable/SMTPServer.php =================================================================== --- branches/stable/SMTPServer.php 2012-02-20 01:41:10 UTC (rev 4930) +++ branches/stable/SMTPServer.php 2012-02-20 06:10:47 UTC (rev 4931) @@ -7,8 +7,10 @@ include('includes/header.inc'); echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/email.gif" title="' . _('SMTP Server') . '" alt="" />' . ' ' . _('SMTP Server Settings') . '</p>'; +// First check if there are smtp server data or not -if (isset($_POST['submit'])) { + +if (isset($_POST['submit']) AND $_POST['MailServerSetting']==1) {//If there are already data setup, Update the table $sql="UPDATE emailsettings SET host='".$_POST['Host']."', port='".$_POST['Port']."', @@ -16,27 +18,70 @@ username='".$_POST['UserName']."', password='".$_POST['Password']."', auth='".$_POST['Auth']."'"; - $result=DB_query($sql, $db); + $ErrMsg = _('The email setting information is failed to update'); + $DbgMsg = _('The SQL failed to update is '); + $result1=DB_query($sql, $db, $ErrMsg, $DbgMsg); + unset($_POST['MailServerSetting']); prnMsg(_('The settings for the SMTP server have been successfully updated'), 'success'); echo '<br />'; + DB_free_result($result1); + +}elseif(isset($_POST['submit']) and $_POST['MailServerSetting']==0){//There is no data setup yet + $sql = "INSERT INTO emailsettings(host, + port, + heloaddress, + username, + password, + auth) + VALUES ( + '".$_POST['Host']."', + '".$_POST['Port']."', + '".$_POST['HeloAddress']."', + '".$_POST['UserName']."', + '".$_POST['Password']."', + '".$_POST['Auth']."')"; + $ErrMsg = _('The email settings are failed to be inserted'); + $DbgMsg = _('The SQL failed to insert the email information is'); + $result2 = DB_query($sql,$db); + DB_free_result($result2); + unset($_POST['MailServerSetting']); + prnMsg(_('The settings for the SMTP server have been sucessfully inserted'),'success'); + echo '<br/>'; } -$sql="SELECT id, - host, - port, - heloaddress, - username, - password, - timeout, - auth - FROM emailsettings"; + // Check the mail server setting status -$result=DB_query($sql, $db); + $sql="SELECT id, + host, + port, + heloaddress, + username, + password, + timeout, + auth + FROM emailsettings"; + $ErrMsg = _('The email settings information cannot be retrieved'); + $DbgMsg = _('The SQL that faild was'); -$myrow=DB_fetch_array($result); - + $result=DB_query($sql, $db,$ErrMsg,$DbgMsg); + if(DB_num_rows($result)!=0){ + $MailServerSetting = 1; + $myrow=DB_fetch_array($result); + }else{ + DB_free_result($result); + $MailServerSetting = 0; + $myrow['host']=''; + $myrow['port']=''; + $myrow['heloaddress']=''; + $myrow['username']=''; + $myrow['password']=''; + $myrow['timeout']=5; + } + + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; +echo '<input type="hidden" name="MailServerSetting" value="' . $MailServerSetting . '" />'; echo '<table class="selection">'; echo '<tr><td>'._('Server Host Name').'</td> <td><input type="text" name="Host" value="'.$myrow['host'].'" /></td></tr>'; @@ -47,11 +92,11 @@ echo '<tr><td>'._('Authorisation Required').'</td><td>'; echo '<select name="Auth">'; if ($myrow['auth']==1) { - echo '<option selected="selected" value="1">'._('True').'</option>'; - echo '<option value="0">'._('False').'</option>'; + echo '<option selected value=1>'._('True').'</option>'; + echo '<option value=0>'._('False').'</option>'; } else { - echo '<option value="1">'._('True').'</option>'; - echo '<option selected="selected" value="0">'._('False').'</option>'; + echo '<option value=1>'._('True').'</option>'; + echo '<option selected value=0>'._('False').'</option>'; } echo '</select></td></tr>'; echo '<tr><td>'._('User Name').'</td> @@ -65,4 +110,4 @@ include('includes/footer.inc'); -?> \ 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: <Ex...@us...> - 2012-02-20 01:41:16
|
Revision: 4930 http://web-erp.svn.sourceforge.net/web-erp/?rev=4930&view=rev Author: ExsonQu Date: 2012-02-20 01:41:10 +0000 (Mon, 20 Feb 2012) Log Message: ----------- Fixed the focus cannot be on User Name field Modified Paths: -------------- branches/stable/includes/Login.php Modified: branches/stable/includes/Login.php =================================================================== --- branches/stable/includes/Login.php 2012-02-20 01:29:05 UTC (rev 4929) +++ branches/stable/includes/Login.php 2012-02-20 01:41:10 UTC (rev 4930) @@ -9,16 +9,16 @@ } elseif (!isset($demo_text)) { $demo_text = _('Please login here'); } +echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'; ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> +<html> <head> - <title>webERP Login screen</title> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" /> - <link rel="stylesheet" href="css/<?php echo $theme;?>/login.css" type="text/css" /> + <title>webERP Login screen</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" /> + <link rel="stylesheet" href="css/<?php echo $theme;?>/login.css" type="text/css" /> </head> <body> @@ -33,21 +33,21 @@ <div id="container"> <div id="login_logo"></div> <div id="login_box"> - <form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']);?>" id="loginform" method="post"> - <p><input type="hidden" name="FormID" value="<?php echo $_SESSION['FormID']; ?>" /> + <form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8');?>" method="post"> + <input type="hidden" name="FormID" value="<?php echo $_SESSION['FormID']; ?>" /> <span><?php echo _('Company'); ?>:</span> - + <?php if ($AllowCompanySelectionBox == true){ echo '<select name="CompanyNameField">'; - + $Companies = scandir('companies/', 0); foreach ($Companies as $CompanyEntry){ if (is_dir('companies/' . $CompanyEntry) AND $CompanyEntry != '..' AND $CompanyEntry != '' AND $CompanyEntry!='.svn' AND $CompanyEntry!='.'){ if ($CompanyEntry==$DefaultCompany) { - echo '<option selected="selected" value="' . $CompanyEntry . '">' . $CompanyEntry . '</option>'; + echo '<option selected="selected" label="'.$CompanyEntry.'" value="'.$CompanyEntry.'">'.$CompanyEntry.'</option>'; } else { - echo '<option value="' . $CompanyEntry . '">' . $CompanyEntry . '</option>'; + echo '<option label="'.$CompanyEntry.'" value="'.$CompanyEntry.'">'.$CompanyEntry.'</option>'; } } } @@ -56,20 +56,21 @@ echo '<input type="text" name="CompanyNameField" value="' . $DefaultCompany . '" />'; } ?> - - <span><?php echo _('User name'); ?>:</span> - <input type="text" name="UserNameEntryField" /> - <span><?php echo _('Password'); ?>:</span> - <input type="password" name="Password" /></p> + + <br /> + <span><?php echo _('User name'); ?>:</span><br /> + <input type="text" name="UserNameEntryField" maxlength="20" /><br /> + <span><?php echo _('Password'); ?>:</span><br /> + <input type="password" name="Password" /><br /> <div id="demo_text"><?php echo $demo_text;?></div> - <p><input class="button" type="submit" value="<?php echo _('Login'); ?>" name="SubmitUser" /></p> + <input class="button" type="submit" value="<?php echo _('Login'); ?>" name="SubmitUser" /> </form> </div> </div> - <script type="text/javascript"> - <!-- - document.loginform.UserNameEntryField.focus(); - //--> - </script> + <script type="text/javascript"> + <!-- + document.forms[0].UserNameEntryField.focus(); + //--> + </script> </body> </html> \ 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: <Ex...@us...> - 2012-02-20 01:41:16
|
Revision: 4930 http://web-erp.svn.sourceforge.net/web-erp/?rev=4930&view=rev Author: ExsonQu Date: 2012-02-20 01:41:10 +0000 (Mon, 20 Feb 2012) Log Message: ----------- Fixed the focus cannot be on User Name field Modified Paths: -------------- branches/stable/includes/Login.php Modified: branches/stable/includes/Login.php =================================================================== --- branches/stable/includes/Login.php 2012-02-20 01:29:05 UTC (rev 4929) +++ branches/stable/includes/Login.php 2012-02-20 01:41:10 UTC (rev 4930) @@ -9,16 +9,16 @@ } elseif (!isset($demo_text)) { $demo_text = _('Please login here'); } +echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'; ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> +<html> <head> - <title>webERP Login screen</title> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" /> - <link rel="stylesheet" href="css/<?php echo $theme;?>/login.css" type="text/css" /> + <title>webERP Login screen</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" /> + <link rel="stylesheet" href="css/<?php echo $theme;?>/login.css" type="text/css" /> </head> <body> @@ -33,21 +33,21 @@ <div id="container"> <div id="login_logo"></div> <div id="login_box"> - <form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']);?>" id="loginform" method="post"> - <p><input type="hidden" name="FormID" value="<?php echo $_SESSION['FormID']; ?>" /> + <form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8');?>" method="post"> + <input type="hidden" name="FormID" value="<?php echo $_SESSION['FormID']; ?>" /> <span><?php echo _('Company'); ?>:</span> - + <?php if ($AllowCompanySelectionBox == true){ echo '<select name="CompanyNameField">'; - + $Companies = scandir('companies/', 0); foreach ($Companies as $CompanyEntry){ if (is_dir('companies/' . $CompanyEntry) AND $CompanyEntry != '..' AND $CompanyEntry != '' AND $CompanyEntry!='.svn' AND $CompanyEntry!='.'){ if ($CompanyEntry==$DefaultCompany) { - echo '<option selected="selected" value="' . $CompanyEntry . '">' . $CompanyEntry . '</option>'; + echo '<option selected="selected" label="'.$CompanyEntry.'" value="'.$CompanyEntry.'">'.$CompanyEntry.'</option>'; } else { - echo '<option value="' . $CompanyEntry . '">' . $CompanyEntry . '</option>'; + echo '<option label="'.$CompanyEntry.'" value="'.$CompanyEntry.'">'.$CompanyEntry.'</option>'; } } } @@ -56,20 +56,21 @@ echo '<input type="text" name="CompanyNameField" value="' . $DefaultCompany . '" />'; } ?> - - <span><?php echo _('User name'); ?>:</span> - <input type="text" name="UserNameEntryField" /> - <span><?php echo _('Password'); ?>:</span> - <input type="password" name="Password" /></p> + + <br /> + <span><?php echo _('User name'); ?>:</span><br /> + <input type="text" name="UserNameEntryField" maxlength="20" /><br /> + <span><?php echo _('Password'); ?>:</span><br /> + <input type="password" name="Password" /><br /> <div id="demo_text"><?php echo $demo_text;?></div> - <p><input class="button" type="submit" value="<?php echo _('Login'); ?>" name="SubmitUser" /></p> + <input class="button" type="submit" value="<?php echo _('Login'); ?>" name="SubmitUser" /> </form> </div> </div> - <script type="text/javascript"> - <!-- - document.loginform.UserNameEntryField.focus(); - //--> - </script> + <script type="text/javascript"> + <!-- + document.forms[0].UserNameEntryField.focus(); + //--> + </script> </body> </html> \ 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: <Ex...@us...> - 2012-02-20 01:29:11
|
Revision: 4929 http://web-erp.svn.sourceforge.net/web-erp/?rev=4929&view=rev Author: ExsonQu Date: 2012-02-20 01:29:05 +0000 (Mon, 20 Feb 2012) Log Message: ----------- Fixed stockmoves not updated correctly due to GRNBatchNo and GRNNo wrongly used. Modified Paths: -------------- branches/stable/SuppCreditGRNs.php branches/stable/SuppInvGRNs.php branches/stable/SupplierInvoice.php Modified: branches/stable/SuppCreditGRNs.php =================================================================== --- branches/stable/SuppCreditGRNs.php 2012-02-20 01:27:32 UTC (rev 4928) +++ branches/stable/SuppCreditGRNs.php 2012-02-20 01:29:05 UTC (rev 4929) @@ -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: branches/stable/SuppInvGRNs.php =================================================================== --- branches/stable/SuppInvGRNs.php 2012-02-20 01:27:32 UTC (rev 4928) +++ branches/stable/SuppInvGRNs.php 2012-02-20 01:29:05 UTC (rev 4929) @@ -236,7 +236,9 @@ $myrow['glcode'], $myrow['orderno'], $myrow['assetid'], - $myrow['decimalplaces']); + 0, + $myrow['decimalplaces'], + $myrow['grnbatch']); } } } Modified: branches/stable/SupplierInvoice.php =================================================================== --- branches/stable/SupplierInvoice.php 2012-02-20 01:27:32 UTC (rev 4928) +++ branches/stable/SupplierInvoice.php 2012-02-20 01:29:05 UTC (rev 4929) @@ -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){ /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ex...@us...> - 2012-02-20 01:29:11
|
Revision: 4929 http://web-erp.svn.sourceforge.net/web-erp/?rev=4929&view=rev Author: ExsonQu Date: 2012-02-20 01:29:05 +0000 (Mon, 20 Feb 2012) Log Message: ----------- Fixed stockmoves not updated correctly due to GRNBatchNo and GRNNo wrongly used. Modified Paths: -------------- branches/stable/SuppCreditGRNs.php branches/stable/SuppInvGRNs.php branches/stable/SupplierInvoice.php Modified: branches/stable/SuppCreditGRNs.php =================================================================== --- branches/stable/SuppCreditGRNs.php 2012-02-20 01:27:32 UTC (rev 4928) +++ branches/stable/SuppCreditGRNs.php 2012-02-20 01:29:05 UTC (rev 4929) @@ -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: branches/stable/SuppInvGRNs.php =================================================================== --- branches/stable/SuppInvGRNs.php 2012-02-20 01:27:32 UTC (rev 4928) +++ branches/stable/SuppInvGRNs.php 2012-02-20 01:29:05 UTC (rev 4929) @@ -236,7 +236,9 @@ $myrow['glcode'], $myrow['orderno'], $myrow['assetid'], - $myrow['decimalplaces']); + 0, + $myrow['decimalplaces'], + $myrow['grnbatch']); } } } Modified: branches/stable/SupplierInvoice.php =================================================================== --- branches/stable/SupplierInvoice.php 2012-02-20 01:27:32 UTC (rev 4928) +++ branches/stable/SupplierInvoice.php 2012-02-20 01:29:05 UTC (rev 4929) @@ -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){ /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ex...@us...> - 2012-02-20 01:27:39
|
Revision: 4928 http://web-erp.svn.sourceforge.net/web-erp/?rev=4928&view=rev Author: ExsonQu Date: 2012-02-20 01:27:32 +0000 (Mon, 20 Feb 2012) Log Message: ----------- Fix bug that Item Status place wrong position which should be href link Modified Paths: -------------- branches/stable/SelectProduct.php Modified: branches/stable/SelectProduct.php =================================================================== --- branches/stable/SelectProduct.php 2012-02-20 01:25:06 UTC (rev 4927) +++ branches/stable/SelectProduct.php 2012-02-20 01:27:32 UTC (rev 4928) @@ -79,7 +79,7 @@ <tr> <th colspan="3"><img src="' . $rootpath . '/css/' . $theme . '/images/inventory.png" title="' . _('Inventory') . '" alt="" /><b>' . ' ' . $StockID . ' - ' . $myrow['description'] . ' ' . $ItemStatus . '</b></th> </tr>'; - + echo '<tr> <td width="40%" valign="top"> <table align="left">'; //nested table @@ -129,12 +129,12 @@ if (in_array($PricesSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PricesSecurity)) { echo '<tr><th colspan="2">' . _('Sell Price') . ':</th> <td class="select">'; - $PriceResult = DB_query("SELECT typeabbrev, + $PriceResult = DB_query("SELECT typeabbrev, price FROM prices WHERE currabrev ='" . $_SESSION['CompanyRecord']['currencydefault'] . "' AND typeabbrev = '" . $_SESSION['DefaultPriceList'] . "' AND debtorno='' - AND branchcode='' + AND branchcode='' AND startdate <= '". Date('Y-m-d') ."' AND ( enddate >= '" . Date('Y-m-d') . "' OR enddate = '0000-00-00') AND stockid='" . $StockID . "'", $db); if ($myrow['mbflag'] == 'K' OR $myrow['mbflag'] == 'A') { @@ -273,7 +273,7 @@ FROM purchorders INNER JOIN purchorderdetails ON purchorders.orderno=purchorderdetails.orderno WHERE purchorderdetails.itemcode='" . $StockID . "' - AND purchorderdetails.completed =0 + AND purchorderdetails.completed =0 AND purchorders.status<>'Cancelled' AND purchorders.status<>'Pending' AND purchorders.status<>'Rejected'"; @@ -346,7 +346,7 @@ </table>'; //end of nested table echo '</td>'; //end cell of master table -if (($myrow['mbflag'] == 'B' OR ($myrow['mbflag'] == 'M')) +if (($myrow['mbflag'] == 'B' OR ($myrow['mbflag'] == 'M')) AND (in_array($SuppliersSecurity, $_SESSION['AllowedPageSecurityTokens']))){ echo '<td width="50%" valign="top"><table> @@ -368,7 +368,7 @@ purchdata.preferred, currencies.decimalplaces FROM purchdata INNER JOIN suppliers - ON purchdata.supplierno=suppliers.supplierid + ON purchdata.supplierno=suppliers.supplierid INNER JOIN currencies ON suppliers.currcode=currencies.currabrev WHERE purchdata.stockid = '" . $StockID . "' @@ -430,7 +430,7 @@ if( isset($StockID) AND file_exists($_SESSION['part_pics_dir'] . '/' .$StockID.'.jpg') ) { echo '<div class="centre"><img src="' . $rootpath . '/GetStockImage.php?automake=1&textcolor=FFFFF0&bgcolor=007F00&StockID=' . $StockID . '&text=' . $StockID . '&width=120&height=120" />'; } - if (($myrow['mbflag'] == 'B') + if (($myrow['mbflag'] == 'B') AND (in_array($SuppliersSecurity, $_SESSION['AllowedPageSecurityTokens'])) AND $myrow['discontinued']==0){ echo '<br />'; @@ -450,7 +450,7 @@ } echo '<a href="' . $rootpath . '/PO_Header.php?NewOrder=Yes' . '&SelectedSupplier=' . $SuppRow['supplierid'] . '&StockID=' . $StockID . '&Quantity='.$EOQ.'&LeadTime='.$SuppRow['leadtime'].'">'. _('Purchase this Item from') . ' ' . $SuppRow['suppname'] . '</a> <br />'; - + /**/ } /* end of while */ } /* end of $myrow['mbflag'] == 'B' */ @@ -469,8 +469,8 @@ } if (!$Its_A_Kitset) { echo '<a href="' . $rootpath . '/Prices.php?Item=' . $StockID . '">' . _('Maintain Pricing') . '</a><br />'; - if (isset($_SESSION['CustomerID']) - AND $_SESSION['CustomerID'] != '' + if (isset($_SESSION['CustomerID']) + AND $_SESSION['CustomerID'] != '' AND mb_strlen($_SESSION['CustomerID']) > 0) { echo '<a href="' . $rootpath . '/Prices_Customer.php?Item=' . $StockID . '">' . _('Special Prices for customer') . ' - ' . $_SESSION['CustomerID'] . '</a><br />'; } @@ -764,13 +764,13 @@ } else { $ItemStatus =''; } - + echo '<td><input type="submit" name="Select" value="' . $myrow['stockid'] . '" /></td> <td>'.$myrow['description'].'</td> <td class="number">' . $qoh . '</td> <td>' . $myrow['units'] . '</td> + <td>' . $ItemStatus . '</td> <td><a target="_blank" href="' . $rootpath . '/StockStatus.php?StockID=' . $myrow['stockid'].'">' . _('View') . '</a></td> - <td>' . $ItemStatus . '</td> </tr>'; $j++; if ($j == 20 AND ($RowIndex + 1 != $_SESSION['DisplayRecordsMax'])) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ex...@us...> - 2012-02-20 01:27:38
|
Revision: 4928 http://web-erp.svn.sourceforge.net/web-erp/?rev=4928&view=rev Author: ExsonQu Date: 2012-02-20 01:27:32 +0000 (Mon, 20 Feb 2012) Log Message: ----------- Fix bug that Item Status place wrong position which should be href link Modified Paths: -------------- branches/stable/SelectProduct.php Modified: branches/stable/SelectProduct.php =================================================================== --- branches/stable/SelectProduct.php 2012-02-20 01:25:06 UTC (rev 4927) +++ branches/stable/SelectProduct.php 2012-02-20 01:27:32 UTC (rev 4928) @@ -79,7 +79,7 @@ <tr> <th colspan="3"><img src="' . $rootpath . '/css/' . $theme . '/images/inventory.png" title="' . _('Inventory') . '" alt="" /><b>' . ' ' . $StockID . ' - ' . $myrow['description'] . ' ' . $ItemStatus . '</b></th> </tr>'; - + echo '<tr> <td width="40%" valign="top"> <table align="left">'; //nested table @@ -129,12 +129,12 @@ if (in_array($PricesSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PricesSecurity)) { echo '<tr><th colspan="2">' . _('Sell Price') . ':</th> <td class="select">'; - $PriceResult = DB_query("SELECT typeabbrev, + $PriceResult = DB_query("SELECT typeabbrev, price FROM prices WHERE currabrev ='" . $_SESSION['CompanyRecord']['currencydefault'] . "' AND typeabbrev = '" . $_SESSION['DefaultPriceList'] . "' AND debtorno='' - AND branchcode='' + AND branchcode='' AND startdate <= '". Date('Y-m-d') ."' AND ( enddate >= '" . Date('Y-m-d') . "' OR enddate = '0000-00-00') AND stockid='" . $StockID . "'", $db); if ($myrow['mbflag'] == 'K' OR $myrow['mbflag'] == 'A') { @@ -273,7 +273,7 @@ FROM purchorders INNER JOIN purchorderdetails ON purchorders.orderno=purchorderdetails.orderno WHERE purchorderdetails.itemcode='" . $StockID . "' - AND purchorderdetails.completed =0 + AND purchorderdetails.completed =0 AND purchorders.status<>'Cancelled' AND purchorders.status<>'Pending' AND purchorders.status<>'Rejected'"; @@ -346,7 +346,7 @@ </table>'; //end of nested table echo '</td>'; //end cell of master table -if (($myrow['mbflag'] == 'B' OR ($myrow['mbflag'] == 'M')) +if (($myrow['mbflag'] == 'B' OR ($myrow['mbflag'] == 'M')) AND (in_array($SuppliersSecurity, $_SESSION['AllowedPageSecurityTokens']))){ echo '<td width="50%" valign="top"><table> @@ -368,7 +368,7 @@ purchdata.preferred, currencies.decimalplaces FROM purchdata INNER JOIN suppliers - ON purchdata.supplierno=suppliers.supplierid + ON purchdata.supplierno=suppliers.supplierid INNER JOIN currencies ON suppliers.currcode=currencies.currabrev WHERE purchdata.stockid = '" . $StockID . "' @@ -430,7 +430,7 @@ if( isset($StockID) AND file_exists($_SESSION['part_pics_dir'] . '/' .$StockID.'.jpg') ) { echo '<div class="centre"><img src="' . $rootpath . '/GetStockImage.php?automake=1&textcolor=FFFFF0&bgcolor=007F00&StockID=' . $StockID . '&text=' . $StockID . '&width=120&height=120" />'; } - if (($myrow['mbflag'] == 'B') + if (($myrow['mbflag'] == 'B') AND (in_array($SuppliersSecurity, $_SESSION['AllowedPageSecurityTokens'])) AND $myrow['discontinued']==0){ echo '<br />'; @@ -450,7 +450,7 @@ } echo '<a href="' . $rootpath . '/PO_Header.php?NewOrder=Yes' . '&SelectedSupplier=' . $SuppRow['supplierid'] . '&StockID=' . $StockID . '&Quantity='.$EOQ.'&LeadTime='.$SuppRow['leadtime'].'">'. _('Purchase this Item from') . ' ' . $SuppRow['suppname'] . '</a> <br />'; - + /**/ } /* end of while */ } /* end of $myrow['mbflag'] == 'B' */ @@ -469,8 +469,8 @@ } if (!$Its_A_Kitset) { echo '<a href="' . $rootpath . '/Prices.php?Item=' . $StockID . '">' . _('Maintain Pricing') . '</a><br />'; - if (isset($_SESSION['CustomerID']) - AND $_SESSION['CustomerID'] != '' + if (isset($_SESSION['CustomerID']) + AND $_SESSION['CustomerID'] != '' AND mb_strlen($_SESSION['CustomerID']) > 0) { echo '<a href="' . $rootpath . '/Prices_Customer.php?Item=' . $StockID . '">' . _('Special Prices for customer') . ' - ' . $_SESSION['CustomerID'] . '</a><br />'; } @@ -764,13 +764,13 @@ } else { $ItemStatus =''; } - + echo '<td><input type="submit" name="Select" value="' . $myrow['stockid'] . '" /></td> <td>'.$myrow['description'].'</td> <td class="number">' . $qoh . '</td> <td>' . $myrow['units'] . '</td> + <td>' . $ItemStatus . '</td> <td><a target="_blank" href="' . $rootpath . '/StockStatus.php?StockID=' . $myrow['stockid'].'">' . _('View') . '</a></td> - <td>' . $ItemStatus . '</td> </tr>'; $j++; if ($j == 20 AND ($RowIndex + 1 != $_SESSION['DisplayRecordsMax'])) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ex...@us...> - 2012-02-20 01:25:12
|
Revision: 4927 http://web-erp.svn.sourceforge.net/web-erp/?rev=4927&view=rev Author: ExsonQu Date: 2012-02-20 01:25:06 +0000 (Mon, 20 Feb 2012) Log Message: ----------- Fixed stockmoves not updated correctly due to GRNBatchNo and GRNNo wrongly used. Modified Paths: -------------- branches/stable/includes/DefineSuppTransClass.php Modified: branches/stable/includes/DefineSuppTransClass.php =================================================================== --- branches/stable/includes/DefineSuppTransClass.php 2012-02-20 01:22:05 UTC (rev 4926) +++ branches/stable/includes/DefineSuppTransClass.php 2012-02-20 01:25:06 UTC (rev 4927) @@ -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: <Ex...@us...> - 2012-02-20 01:25:12
|
Revision: 4927 http://web-erp.svn.sourceforge.net/web-erp/?rev=4927&view=rev Author: ExsonQu Date: 2012-02-20 01:25:06 +0000 (Mon, 20 Feb 2012) Log Message: ----------- Fixed stockmoves not updated correctly due to GRNBatchNo and GRNNo wrongly used. Modified Paths: -------------- branches/stable/includes/DefineSuppTransClass.php Modified: branches/stable/includes/DefineSuppTransClass.php =================================================================== --- branches/stable/includes/DefineSuppTransClass.php 2012-02-20 01:22:05 UTC (rev 4926) +++ branches/stable/includes/DefineSuppTransClass.php 2012-02-20 01:25:06 UTC (rev 4927) @@ -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. |