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: <rc...@us...> - 2015-11-03 15:30:13
|
Revision: 7380 http://sourceforge.net/p/web-erp/reponame/7380 Author: rchacon Date: 2015-11-03 15:30:05 +0000 (Tue, 03 Nov 2015) Log Message: ----------- In GLAccountInquiry.php, add ViewTopic and BookMark, fix some colspan, and add thead and column classes. Modified Paths: -------------- trunk/GLAccountInquiry.php trunk/doc/Change.log Modified: trunk/GLAccountInquiry.php =================================================================== --- trunk/GLAccountInquiry.php 2015-11-03 11:13:33 UTC (rev 7379) +++ trunk/GLAccountInquiry.php 2015-11-03 15:30:05 UTC (rev 7380) @@ -3,6 +3,8 @@ include ('includes/session.inc'); $Title = _('General Ledger Account Inquiry'); +$ViewTopic = 'GeneralLedger'; +$BookMark = 'GLAccountInquiry'; include('includes/header.inc'); include('includes/GLPostings.inc'); @@ -163,26 +165,25 @@ echo '<br /> <table class="selection"> - <tr> - <th colspan="8"><b>' ._('Transactions for account').' '.$SelectedAccount. ' - '. $SelectedAccountName . '</b></th> - </tr>'; + <thead> + <tr> + <th colspan="11"><b>', _('Transactions for account'), ' ', $SelectedAccount, ' - ', $SelectedAccountName, '</b></th> + </tr> + <tr> + <th class="text">', _('Type'), '</th> + <th class="number">', _('Number'), '</th> + <th class="centre">', ('Date'), '</th> + <th class="number">', _('Debit'), '</th> + <th class="number">', _('Credit'), '</th> + <th class="text">', _('Org Currency'), '</th> + <th class="number">', _('Amount in Org Currency'), '</th> + <th class="text">', _('Bank Reference'), '</th> + <th class="text">', _('Narrative'), '</th> + <th class="number">', _('Balance'), '</th> + <th class="text">', _('Tag'), '</th> + </tr> + </thead><tbody>'; - $TableHeader = '<tr> - <th>' . _('Type') . '</th> - <th>' . _('Number') . '</th> - <th>' . _('Date') . '</th> - <th>' . _('Debit') . '</th> - <th>' . _('Credit') . '</th> - <th>' . _('Org Currency') . '</th> - <th>' . _('Amount in Org Currency') . '</th> - <th>' . _('Bank Ref') .'</th> - <th>' . _('Narrative') . '</th> - <th>' . _('Balance') . '</th> - <th>' . _('Tag') . '</th> - </tr>'; - - echo $TableHeader; - if ($PandLAccount==True) { $RunningTotal = 0; } else { @@ -198,19 +199,18 @@ $ChartDetailsResult = DB_query($sql,$ErrMsg); $ChartDetailRow = DB_fetch_array($ChartDetailsResult); - $RunningTotal =$ChartDetailRow['bfwd']; + $RunningTotal = $ChartDetailRow['bfwd']; echo '<tr> - <td colspan="3"><b>' . _('Brought Forward Balance') . '</b></td>'; - if ($RunningTotal < 0 ){ //its a credit balance b/fwd - echo ' - <td></td> - <td class="number"><b>' . locale_number_format(-$RunningTotal,$_SESSION['CompanyRecord']['decimalplaces']) . '</b></td> - <td colspan="3"> </td> + <td colspan="3"><b>', _('Brought Forward Balance'), '</b></td> + '; + if($RunningTotal < 0 ) {// It is a credit balance b/fwd + echo ' <td> </td> + <td class="number"><b>', locale_number_format(-$RunningTotal,$_SESSION['CompanyRecord']['decimalplaces']), '</b></td> + <td colspan="6"> </td> </tr>'; - } else { //its a debit balance b/fwd - echo ' - <td class="number"><b>' . locale_number_format($RunningTotal,$_SESSION['CompanyRecord']['decimalplaces']) . '</b></td> - <td colspan="4"> </td> + } else {// It is a debit balance b/fwd + echo ' <td class="number"><b>', locale_number_format($RunningTotal,$_SESSION['CompanyRecord']['decimalplaces']), '</b></td> + <td colspan="7"> </td> </tr>'; } } @@ -238,21 +238,21 @@ echo '<tr> <td colspan="3"><b>' . _('Total for period') . ' ' . $PeriodNo . '</b></td>'; - if ($PeriodTotal < 0 ){ //its a credit balance b/fwd + if($PeriodTotal < 0 ) {// It is a credit balance b/fwd if ($PandLAccount==True) { $RunningTotal = 0; } - echo '<td></td> - <td class="number"><b>' . locale_number_format(-$PeriodTotal,$_SESSION['CompanyRecord']['decimalplaces']) . '</b></td> - <td colspan="3"> </td> - </tr>'; - } else { //its a debit balance b/fwd - if ($PandLAccount==True) { + echo ' <td> </td> + <td class="number"><b>', locale_number_format(-$PeriodTotal,$_SESSION['CompanyRecord']['decimalplaces']), '</b></td> + <td colspan="6"> </td> + </tr>'; + } else {// It is a debit balance b/fwd + if($PandLAccount==True) { $RunningTotal = 0; } - echo '<td class="number"><b>' . locale_number_format($PeriodTotal,$_SESSION['CompanyRecord']['decimalplaces']) . '</b></td> - <td colspan="4"> </td> - </tr>'; + echo ' <td class="number"><b>', locale_number_format($PeriodTotal,$_SESSION['CompanyRecord']['decimalplaces']), '</b></td> + <td colspan="7"> </td> + </tr>'; } $IntegrityReport .= '<br />' . _('Period') . ': ' . $PeriodNo . _('Account movement per transaction') . ': ' . locale_number_format($PeriodTotal,$_SESSION['CompanyRecord']['decimalplaces']) . ' ' . _('Movement per ChartDetails record') . ': ' . locale_number_format($ChartDetailRow['actual'],$_SESSION['CompanyRecord']['decimalplaces']) . ' ' . _('Period difference') . ': ' . locale_number_format($PeriodTotal -$ChartDetailRow['actual'],3); @@ -301,17 +301,17 @@ $FormatedTranDate = ConvertSQLDate($myrow['trandate']); $URL_to_TransDetail = $RootPath . '/GLTransInquiry.php?TypeID=' . $myrow['type'] . '&TransNo=' . $myrow['typeno']; - printf('<td>%s</td> + printf('<td class="text">%s</td> <td class="number"><a href="%s">%s</a></td> - <td>%s</td> + <td class="centre">%s</td> <td class="number">%s</td> <td class="number">%s</td> - <td>%s</td> + <td class="text">%s</td> <td class="number"><b>%s</b></td> - <td>%s</td> - <td>%s</td> + <td class="text">%s</td> + <td class="text">%s</td> <td class="number">%s</td> - <td>%s</td> + <td class="text">%s</td> </tr>', _($myrow['typename']), $URL_to_TransDetail, @@ -338,16 +338,17 @@ } echo '</b></td>'; - if ($RunningTotal >0){ - echo '<td class="number"><b>' . locale_number_format(($RunningTotal),$_SESSION['CompanyRecord']['decimalplaces']) . '</b></td> - <td colspan="2"></td> + if($RunningTotal < 0) {// It is a debit Total Period Movement or Balance C/Fwd + echo ' <td> </td> + <td class="number"><b>', locale_number_format((-$RunningTotal),$_SESSION['CompanyRecord']['decimalplaces']), '</b></td> + <td colspan="6"></td> </tr>'; - }else { - echo '<td></td> - <td class="number"><b>' . locale_number_format((-$RunningTotal),$_SESSION['CompanyRecord']['decimalplaces']) . '</b></td><td colspan="2"></td> + } else {// It is a credit Total Period Movement or Balance C/Fwd + echo ' <td class="number"><b>', locale_number_format(($RunningTotal),$_SESSION['CompanyRecord']['decimalplaces']), '</b></td> + <td colspan="7"></td> </tr>'; } - echo '</table>'; + echo '</tbody></table>'; } /* end of if Show button hit */ Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-11-03 11:13:33 UTC (rev 7379) +++ trunk/doc/Change.log 2015-11-03 15:30:05 UTC (rev 7380) @@ -1,5 +1,6 @@ webERP Change Log +3/11/15 RChacon: In GLAccountInquiry.php, add ViewTopic and BookMark, fix some colspan, and add thead and column classes. 3/11/15 Exson: Tidy code up in StockClone.php. 3/11/15 Exson: Fixed typo in PriceMatrix.php. 30/10/15 Exson: Allow user input supplier's delivery note during goods receiving and make the inquiry script for it. So users can search corresponding GRN, PO and invoice with it. |
From: <ex...@us...> - 2015-11-03 11:13:35
|
Revision: 7379 http://sourceforge.net/p/web-erp/reponame/7379 Author: exsonqu Date: 2015-11-03 11:13:33 +0000 (Tue, 03 Nov 2015) Log Message: ----------- Modified Paths: -------------- trunk/doc/Change.log Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-11-03 11:10:28 UTC (rev 7378) +++ trunk/doc/Change.log 2015-11-03 11:13:33 UTC (rev 7379) @@ -1,4 +1,6 @@ webERP Change Log + +3/11/15 Exson: Tidy code up in StockClone.php. 3/11/15 Exson: Fixed typo in PriceMatrix.php. 30/10/15 Exson: Allow user input supplier's delivery note during goods receiving and make the inquiry script for it. So users can search corresponding GRN, PO and invoice with it. 29/10/15 Exson: Add gl narrative and account balance information to DailyBankTransactions.php. |
From: <ex...@us...> - 2015-11-03 11:10:30
|
Revision: 7378 http://sourceforge.net/p/web-erp/reponame/7378 Author: exsonqu Date: 2015-11-03 11:10:28 +0000 (Tue, 03 Nov 2015) Log Message: ----------- 3/11/15 Exson: Tidy code up in StockClone.php. Modified Paths: -------------- trunk/StockClone.php Modified: trunk/StockClone.php =================================================================== --- trunk/StockClone.php 2015-11-03 02:07:23 UTC (rev 7377) +++ trunk/StockClone.php 2015-11-03 11:10:28 UTC (rev 7378) @@ -510,7 +510,7 @@ prnMsg( _('New cloned Item') .' ' . '<a href="SelectProduct.php?StockID=' . $_POST['StockID'] . '">' . $_POST['StockID'] . '</a> '. _('has been added to the database') . '<br />' . _('We also attempted to setup item purchase data and pricing.')); - if ($NoPricingData==1) + if (!empty($NoPricingData)) { prnMsg(_('There is no pricing data to clone. Use the following link to add pricing.')); } @@ -572,12 +572,11 @@ <input type="hidden" name="New" value="'.$_POST['New'].'" /> <table class="selection">'; -if ($_POST['StockID'] == '' || ($_POST['StockID'] == $_POST['OldStockID']) || isset($_POST['UpdateCategories'])) { +if (empty($_POST['StockID']) || (isset($_POST['StockID']) AND $_POST['StockID'] == $_POST['OldStockID']) || isset($_POST['UpdateCategories'])) { /*If the page was called without $StockID or empty $StockID then a new cloned stock item is to be entered. Show a form with a part Code field, otherwise show form for editing with only a hidden OldStockID field. */ - //if ($_POST['New']==1) { $StockIDStyle= !empty($_POST['StockID']) && ($_POST['StockID'] != $_POST['OldStockID'])? '' : ' style="color:red;border: 2px solid red;background-color:#fddbdb;" '; $StockID= !empty($_POST['StockID'])? $_POST['StockID']:$_POST['OldStockID']; echo '<tr> @@ -587,7 +586,6 @@ </td> </tr>'; - //} } if ( (!isset($_POST['UpdateCategories']) AND ($InputError!=1)) OR $_POST['New']== 1 ) { // Must be modifying an existing item and no changes made yet @@ -673,12 +671,14 @@ if ($LanguageId!=''){ //unfortunately cannot have points in POST variables so have to mess with the language id $PostVariableName = 'Description_' . str_replace('.','_',$LanguageId); + $LongDescriptionTranslated = 'LongDescription_' . str_replace('.','_',$LanguageId); if (!isset($_POST[$PostVariableName])){ $_POST[$PostVariableName] =''; } echo '<tr> <td>' . $LanguagesArray[$LanguageId]['LanguageName'] . ' ' . _('Description') . ':</td> <td><input type="text" name="'. $PostVariableName . '" size="52" maxlength="50" value="' . $_POST[$PostVariableName] . '" /></td> + <td><input type="hidden" name="' . $LongDescriptionTranslated . '" value="' . $_POST['LongDescription_' . str_replace('.','_',$LanguageId)] . '" /> </tr>'; } } |
From: <ex...@us...> - 2015-11-03 02:07:25
|
Revision: 7377 http://sourceforge.net/p/web-erp/reponame/7377 Author: exsonqu Date: 2015-11-03 02:07:23 +0000 (Tue, 03 Nov 2015) Log Message: ----------- Modified Paths: -------------- trunk/doc/Change.log Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-11-03 01:50:36 UTC (rev 7376) +++ trunk/doc/Change.log 2015-11-03 02:07:23 UTC (rev 7377) @@ -1,5 +1,5 @@ webERP Change Log - +3/11/15 Exson: Fixed typo in PriceMatrix.php. 30/10/15 Exson: Allow user input supplier's delivery note during goods receiving and make the inquiry script for it. So users can search corresponding GRN, PO and invoice with it. 29/10/15 Exson: Add gl narrative and account balance information to DailyBankTransactions.php. 28/10/15 Exson: Add bank default currency, original amount and check no data to GL account inquiry in GLAccountInquiry.php. |
From: <ex...@us...> - 2015-11-03 01:50:38
|
Revision: 7376 http://sourceforge.net/p/web-erp/reponame/7376 Author: exsonqu Date: 2015-11-03 01:50:36 +0000 (Tue, 03 Nov 2015) Log Message: ----------- 3/11/15 Exson: Fixed typo in PriceMatrix.php. Modified Paths: -------------- trunk/PriceMatrix.php Modified: trunk/PriceMatrix.php =================================================================== --- trunk/PriceMatrix.php 2015-10-31 06:37:46 UTC (rev 7375) +++ trunk/PriceMatrix.php 2015-11-03 01:50:36 UTC (rev 7376) @@ -60,9 +60,9 @@ WHERE stockid='".$StockID."' AND startdate='".$SQLStartDate."' AND enddate='".$SQLEndDate."' - AND salestype='".$_POST['TypeAbbrev']."' - AND currabrev='".$_POST['currabrev']."' - AND quantitybreak='".$_POST['quantitybreak']."'"; + AND salestype='".$_POST['SalesType']."' + AND currabrev='".$_POST['CurrAbrev']."' + AND quantitybreak='".$_POST['QuantityBreak']."'"; $result = DB_query($sql); $myrow = DB_fetch_row($result); if ($myrow[0]!=0 AND !isset($_POST['OldTypeAbbrev']) AND !isset($_POST['OldCurrAbrev'])){ @@ -167,7 +167,7 @@ <td><select name="CurrAbrev">'; while ($myrow = DB_fetch_array($result)){ echo '<option'; - if ($myrow['currabrev']==$_POST['CurrAbrev']){ + if (isset($_POST['CurrAbrev']) AND $myrow['currabrev']==$_POST['CurrAbrev']){ echo ' selected="selected"'; } echo ' value="' . $myrow['currabrev'] . '">' . $CurrencyName[$myrow['currabrev']] . '</option>'; @@ -210,6 +210,12 @@ if (!isset($_POST['EndDate'])){ $_POST['EndDate'] = GetMySQLMaxDate(); } +if (!isset($_POST['QuantityBreak'])) { + $_POST['QuantityBreak'] = 0; +} +if (!isset($_POST['Price'])) { + $_POST['Price'] = 0; +} echo '<tr><td>'. _('Price Effective From Date') . ':</td> <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="StartDate" required="required" size="10" maxlength="10" title="' . _('Enter the date from which this price should take effect.') . '" value="' . $_POST['StartDate'] . '" /></td></tr>'; echo '<tr><td>' . _('Price Effective To Date') . ':</td> @@ -240,7 +246,7 @@ price, currencies.currabrev, currencies.currency, - currencies.decimalplaces AS currdecimalplace + currencies.decimalplaces AS currdecimalplaces FROM pricematrix INNER JOIN salestypes ON pricematrix.salestype=salestypes.typeabbrev INNER JOIN currencies @@ -382,4 +388,4 @@ } // end function ReSequenceEffectiveDates -?> \ No newline at end of file +?> |
From: <ex...@us...> - 2015-10-31 06:37:49
|
Revision: 7375 http://sourceforge.net/p/web-erp/reponame/7375 Author: exsonqu Date: 2015-10-31 06:37:46 +0000 (Sat, 31 Oct 2015) Log Message: ----------- 31/10/15 Exson: Tidy code up with Tim's suggestion in GoodsReceived.php and SupplierGRNAndInvoiceInquiry.php and SupplierInvoice.php. Modified Paths: -------------- trunk/GoodsReceived.php trunk/SupplierGRNAndInvoiceInquiry.php trunk/SupplierInvoice.php trunk/sql/mysql/upgrade4.12.3-4.13.sql Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2015-10-30 12:13:50 UTC (rev 7374) +++ trunk/GoodsReceived.php 2015-10-31 06:37:46 UTC (rev 7375) @@ -97,6 +97,7 @@ $_SESSION['PO' . $identifier]->SupplierReference = $_POST['SupplierReference']; } } + $SupplierReference = isset($_SESSION['PO' . $identifier]->SupplierReference)? $_SESSION['PO' . $identifier]->SupplierReference: $_POST['SupplierReference']; echo '<table class="selection"> <tr> @@ -104,7 +105,7 @@ <td><input type="text" class="date" alt="'. $_SESSION['DefaultDateFormat'] .'" maxlength="10" size="10" onchange="return isDate(this, this.value, '."'". $_SESSION['DefaultDateFormat']."'".')" name="DefaultReceivedDate" value="' . $_SESSION['PO' . $identifier]->DefaultReceivedDate . '" /></td> <td>' . _("Supplier's Reference") . ':</td> - <td><input type="text" name="SupplierReference" value="' . $_SESSION['PO' . $identifier]->SupplierReference. '" maxlength="30" size="20" onchange="ReloadForm(form1.Update)"/></td> + <td><input type="text" name="SupplierReference" value="' . $SupplierReference. '" maxlength="30" size="20" onchange="ReloadForm(form1.Update)"/></td> </tr> </table> <br />'; @@ -251,7 +252,6 @@ $InputError = true; prnMsg(_('The goods received date is not a date format'),'error'); -} else { } if (isset($_POST['SupplierReference']) AND mb_strlen(trim($_POST['SupplierReference']))>30) { Modified: trunk/SupplierGRNAndInvoiceInquiry.php =================================================================== --- trunk/SupplierGRNAndInvoiceInquiry.php 2015-10-30 12:13:50 UTC (rev 7374) +++ trunk/SupplierGRNAndInvoiceInquiry.php 2015-10-31 06:37:46 UTC (rev 7375) @@ -35,15 +35,16 @@ echo '<table class="selection"> <tr> - <td class="label">' . _('Part of Supplier\'s Delivery Note') . ':</td><td><input type="text" name="SupplierRef" value="' . $_POST['SupplierRef'] . '" size="20" maxlength="30" ></td> - <td class="label">' . _('GRN No') . ':</td><td><input type="text" name="GRNBatchNo" value="' . $_POST['GRNBatchNo'] . '" size="6" maxlength="6" /></td> - <td class="label">' . _('Invoice No') . ':</td><td><input type="text" name="InvoiceNo" value="' . $_POST['InvoiceNo'] . '" size="11" maxlength="11" /></td> + <td class="label">' . _('Part of Supplier\'s Delivery Note') . ':</td> + <td><input type="text" name="SupplierRef" value="' . $_POST['SupplierRef'] . '" size="20" maxlength="30" ></td> + <td class="label">' . _('GRN No') . ':</td><td><input type="text" name="GRNBatchNo" value="' . $_POST['GRNBatchNo'] . '" size="6" maxlength="6" /></td> + <td class="label">' . _('Invoice No') . ':</td><td><input type="text" name="InvoiceNo" value="' . $_POST['InvoiceNo'] . '" size="11" maxlength="11" /></td> </tr> </table>'; echo '<div class="center"> <input type="submit" name="Submit" value="' . _('Submit') . '" /> - </div>'; + </div>'; if (isset($_POST['Submit'])) { $Where = ''; if (isset($_POST['SupplierRef']) AND trim($_POST['SupplierRef']) != '') { @@ -82,10 +83,11 @@ echo '<tr class="OddTableRows">'; $k = 0; } - echo '<td class="ascending">' . $myrow['supplierref'] . '</td> - <td class="ascending"><a href="' . $RootPath .'/PDFGrn.php?GRNNo=' . $myrow['grnbatch'] . '&PONo=' . $myrow['orderno'] . '">' . $myrow['grnbatch']. '</td> - <td class="ascending">' . $myrow['orderno'] . '</td> - <td class="ascending">' . $myrow['suppinv'] . '</td></tr>'; + echo '<td class="ascending">' . $myrow['supplierref'] . '</td> + <td class="ascending"><a href="' . $RootPath .'/PDFGrn.php?GRNNo=' . $myrow['grnbatch'] . '&PONo=' . $myrow['orderno'] . '">' . $myrow['grnbatch']. '</td> + <td class="ascending">' . $myrow['orderno'] . '</td> + <td class="ascending">' . $myrow['suppinv'] . '</td> + </tr>'; } echo '</table><br/>'; Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2015-10-30 12:13:50 UTC (rev 7374) +++ trunk/SupplierInvoice.php 2015-10-31 06:37:46 UTC (rev 7375) @@ -1551,8 +1551,7 @@ $Result = DB_query($SQL, $ErrMsg, $DbgMsg, True); $SQL = "INSERT INTO suppinvstogrn VALUES ('" . $InvoiceNo . "', - '" . $EnteredGRN->GRNNo . "', - '" . $EnteredGRN->SupplierRef . "')"; + '" . $EnteredGRN->GRNNo . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The invoice could not be mapped to the goods received record because'); $DbgMsg = _('The following SQL to map the invoice to the GRN was used'); Modified: trunk/sql/mysql/upgrade4.12.3-4.13.sql =================================================================== --- trunk/sql/mysql/upgrade4.12.3-4.13.sql 2015-10-30 12:13:50 UTC (rev 7374) +++ trunk/sql/mysql/upgrade4.12.3-4.13.sql 2015-10-31 06:37:46 UTC (rev 7375) @@ -15,7 +15,6 @@ CREATE TABLE `suppinvstogrn` ( `suppinv` int(11) NOT NULL, `grnno` int(11) NOT NULL, - `supplierref` varchar(30) NOT NULL DEFAULT '', PRIMARY KEY (`suppinv`,`grnno`), KEY `suppinvstogrn_ibfk_2` (`grnno`), CONSTRAINT `suppinvstogrn_ibfk_1` FOREIGN KEY (`suppinv`) REFERENCES |
From: <ex...@us...> - 2015-10-30 12:13:53
|
Revision: 7374 http://sourceforge.net/p/web-erp/reponame/7374 Author: exsonqu Date: 2015-10-30 12:13:50 +0000 (Fri, 30 Oct 2015) Log Message: ----------- Modified Paths: -------------- trunk/doc/Change.log Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-10-30 12:12:52 UTC (rev 7373) +++ trunk/doc/Change.log 2015-10-30 12:13:50 UTC (rev 7374) @@ -1,5 +1,6 @@ webERP Change Log +30/10/15 Exson: Allow user input supplier's delivery note during goods receiving and make the inquiry script for it. So users can search corresponding GRN, PO and invoice with it. 29/10/15 Exson: Add gl narrative and account balance information to DailyBankTransactions.php. 28/10/15 Exson: Add bank default currency, original amount and check no data to GL account inquiry in GLAccountInquiry.php. 06/10/15 UK-Steven: Contribute email customer statements feature scripts. |
From: <ex...@us...> - 2015-10-30 12:12:55
|
Revision: 7373 http://sourceforge.net/p/web-erp/reponame/7373 Author: exsonqu Date: 2015-10-30 12:12:52 +0000 (Fri, 30 Oct 2015) Log Message: ----------- 30/10/15 Exson: Allow user input supplier's delivery note during goods receiving and make the inquiry script for it. So users can search corresponding GRN, PO and invoice with it. Modified Paths: -------------- trunk/GoodsReceived.php trunk/PDFGrn.php trunk/ReverseGRN.php trunk/SelectSupplier.php trunk/SuppInvGRNs.php trunk/SupplierInvoice.php trunk/companies/weberpdemo/FormDesigns/GoodsReceived.xml trunk/includes/DefineSuppTransClass.php trunk/includes/PDFGrnHeader.inc trunk/sql/mysql/upgrade4.12.3-4.13.sql Added Paths: ----------- trunk/SupplierGRNAndInvoiceInquiry.php Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2015-10-29 13:04:36 UTC (rev 7372) +++ trunk/GoodsReceived.php 2015-10-30 12:12:52 UTC (rev 7373) @@ -71,21 +71,40 @@ echo '<p class="page_title_text"> <img src="'.$RootPath.'/css/'.$Theme.'/images/supplier.png" title="' . _('Receive') . '" alt="" />' . ' ' . _('Receive Purchase Order') . ' : '. $_SESSION['PO'.$identifier]->OrderNo .' '. _('from'). ' ' . $_SESSION['PO'.$identifier]->SupplierName . '</p>'; -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier=' . $identifier . '" method="post">'; +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier=' . $identifier . '" id="form1" method="post">'; echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (!isset($_POST['ProcessGoodsReceived'])) { - if (!isset($_POST['DefaultReceivedDate'])){ + if (!isset($_POST['DefaultReceivedDate']) AND !isset($_SESSION['PO' . $identifier]->DefaultReceivedDate)){ /* This is meant to be the date the goods are received - it does not make sense to set this to the date that we requested delivery in the purchase order - I have not applied your change here Tim for this reason - let me know if I have it wrong - Phil */ $_POST['DefaultReceivedDate'] = Date($_SESSION['DefaultDateFormat']); + $_SESSION['PO' . $identifier]->DefaultReceivedDate = $_POST['DefaultReceivedDate']; + } else { + if (isset($_POST['DefaultReceivedDate']) AND is_date($_POST['DefaultReceivedDate'])) { + $_SESSION['PO' . $identifier]->DefaultReceivedDate = $_POST['DefaultReceivedDate']; + } elseif(isset($_POST['DefaultReceivedDate']) AND !is_date($_POST['DefaultReceivedDate'])) { + prnMsg(_('The default received date is not a date format'),'error'); + $_POST['DefaultReceivedDate'] = Date($_SESSION['DefaultDateFormat']); + } } + if (!isset($_POST['SupplierReference'])) { + $_POST['SupplierReference'] = ''; + } else { + if (isset($_POST['SupplierReference']) AND mb_strlen(trim($_POST['SupplierReference']))>30) { + prnMsg(_('The supplier\'s delivery note no should not be more than 30 characters'),'error'); + } else { + $_SESSION['PO' . $identifier]->SupplierReference = $_POST['SupplierReference']; + } + } echo '<table class="selection"> <tr> <td>' . _('Date Goods/Service Received'). ':</td> <td><input type="text" class="date" alt="'. $_SESSION['DefaultDateFormat'] .'" maxlength="10" size="10" onchange="return isDate(this, this.value, '."'". - $_SESSION['DefaultDateFormat']."'".')" name="DefaultReceivedDate" value="' . $_POST['DefaultReceivedDate'] . '" /></td> + $_SESSION['DefaultDateFormat']."'".')" name="DefaultReceivedDate" value="' . $_SESSION['PO' . $identifier]->DefaultReceivedDate . '" /></td> + <td>' . _("Supplier's Reference") . ':</td> + <td><input type="text" name="SupplierReference" value="' . $_SESSION['PO' . $identifier]->SupplierReference. '" maxlength="30" size="20" onchange="ReloadForm(form1.Update)"/></td> </tr> </table> <br />'; @@ -228,6 +247,17 @@ $NegativesFound = false; $InputError = false; +if (isset($_POST['DefaultReceivedDate']) AND !is_date($_POST['DefaultReceivedDate'])) { + $InputError = true; + prnMsg(_('The goods received date is not a date format'),'error'); + +} else { +} + +if (isset($_POST['SupplierReference']) AND mb_strlen(trim($_POST['SupplierReference']))>30) { + $InputError = true; + prnMsg(_('The delivery note of suppliers should not be more than 30 characters'),'error'); +} if (count($_SESSION['PO'.$identifier]->LineItems)>0){ foreach ($_SESSION['PO'.$identifier]->LineItems as $OrderLine) { @@ -474,7 +504,8 @@ deliverydate, qtyrecd, supplierid, - stdcostunit) + stdcostunit, + supplierref) VALUES ('" . $GRN . "', '" . $OrderLine->PODetailRec . "', '" . $OrderLine->StockID . "', @@ -482,7 +513,8 @@ '" . $_POST['DefaultReceivedDate'] . "', '" . $OrderLine->ReceiveQty . "', '" . $_SESSION['PO'.$identifier]->SupplierID . "', - '" . $CurrentStandardCost . "')"; + '" . $CurrentStandardCost . "', + '" . trim($_POST['SupplierReference']) ."')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('A GRN record could not be inserted') . '. ' . _('This receipt of goods has not been processed because'); $DbgMsg = _('The following SQL to insert the GRN record was used'); Modified: trunk/PDFGrn.php =================================================================== --- trunk/PDFGrn.php 2015-10-29 13:04:36 UTC (rev 7372) +++ trunk/PDFGrn.php 2015-10-30 12:12:52 UTC (rev 7373) @@ -46,6 +46,7 @@ grns.itemdescription, grns.qtyrecd, grns.supplierid, + grns.supplierref, purchorderdetails.suppliersunit, purchorderdetails.conversionfactor, stockmaster.units, @@ -77,6 +78,9 @@ } } // get data to print if ($NoOfGRNs >0){ + $SupplierRef = DB_fetch_array($GRNResult); + $SupplierRef = $SupplierRef['supplierref']; + DB_data_seek($GRNResult,0); include ('includes/PDFGrnHeader.inc'); //head up the page $FooterPrintedInPage= 0; Modified: trunk/ReverseGRN.php =================================================================== --- trunk/ReverseGRN.php 2015-10-29 13:04:36 UTC (rev 7372) +++ trunk/ReverseGRN.php 2015-10-30 12:12:52 UTC (rev 7373) @@ -39,6 +39,7 @@ grns.itemcode, grns.itemdescription, grns.deliverydate, + grns.supplierref, purchorderdetails.glcode, purchorderdetails.assetid, grns.qtyrecd, @@ -370,6 +371,7 @@ grns.itemcode, grns.itemdescription, grns.deliverydate, + grns.supplierref, qtyrecd, quantityinv, qtyrecd-quantityinv AS qtytoreverse @@ -393,6 +395,7 @@ $TableHeader = '<tr> <th>' . _('GRN') . ' #</th> <th>' . _('GRN Batch') . '</th> + <th>' . _('Supplier\' Ref') . '</th> <th>' . _('Item Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Date') . '<br />' . _('Received') . '</th> @@ -426,6 +429,7 @@ <td>%s</td> <td>%s</td> <td>%s</td> + <td>%s</td> <td class="number">%s</td> <td class="number">%s</td> <td class="number">%s</td> @@ -433,6 +437,7 @@ </tr>', $myrow['grnno'], $myrow['grnbatch'], + $myrow['supplierref'], $myrow['itemcode'], $myrow['itemdescription'], $DisplayDateDel, Modified: trunk/SelectSupplier.php =================================================================== --- trunk/SelectSupplier.php 2015-10-29 13:04:36 UTC (rev 7372) +++ trunk/SelectSupplier.php 2015-10-30 12:12:52 UTC (rev 7373) @@ -170,6 +170,8 @@ echo '<tr><td valign="top" class="select">'; /* Inquiry Options */ echo '<a href="' . $RootPath . '/SupplierInquiry.php?SupplierID=' . $_SESSION['SupplierID'] . '">' . _('Supplier Account Inquiry') . '</a> <br /> + <a href="' . $RootPath . '/SupplierGRNAndInvoiceInquiry.php?SelectedSupplier=' . $_SESSION['SupplierID'] . '&SupplierName='.urlencode($SupplierName).'">' . _('Supplier Delivery Note AND GRN inquiry') . '</a> + <br /> <br />'; echo '<br /><a href="' . $RootPath . '/PO_SelectOSPurchOrder.php?SelectedSupplier=' . $_SESSION['SupplierID'] . '">' . _('Add / Receive / View Outstanding Purchase Orders') . '</a>'; Modified: trunk/SuppInvGRNs.php =================================================================== --- trunk/SuppInvGRNs.php 2015-10-29 13:04:36 UTC (rev 7372) +++ trunk/SuppInvGRNs.php 2015-10-30 12:12:52 UTC (rev 7373) @@ -95,7 +95,8 @@ $_SESSION['SuppTrans']->GRNs[$_POST['GRNNo'.$i]]->ShiptRef, $_SESSION['SuppTrans']->GRNs[$_POST['GRNNo'.$i]]->JobRef, $_SESSION['SuppTrans']->GRNs[$_POST['GRNNo'.$i]]->GLCode, - $Hold); + $Hold, + $_SESSION['SuppTrans']->GRNs[$_POST['GRNNo'.$i]]->SupplierRef); } } } @@ -116,6 +117,7 @@ </tr> <tr> <th>' . _('Sequence') . ' #</th> + <th>' . _("Supplier's Ref") . '</th> <th>' . _('Item Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Quantity Yet To Inv') . '</th> @@ -137,6 +139,7 @@ echo '<tr> <td>' . $EnteredGRN->GRNNo . '</td> + <td>' . $EnteredGRN->SupplierRef . '</td> <td>' . $EnteredGRN->ItemCode . '</td> <td>' . $EnteredGRN->ItemDescription . '</td> <td class="number">' . locale_number_format($EnteredGRN->QtyRecd - $EnteredGRN->Prev_QuantityInv,'Variable') . '</td> @@ -177,6 +180,7 @@ grns.qtyrecd, grns.quantityinv, grns.stdcostunit, + grns.supplierref, purchorderdetails.glcode, purchorderdetails.shiptref, purchorderdetails.jobref, @@ -235,7 +239,8 @@ $myrow['assetid'], 0, $myrow['decimalplaces'], - $myrow['grnbatch']); + $myrow['grnbatch'], + $myrow['supplierref']); } } } @@ -253,6 +258,7 @@ <th class="ascending">' . _('Select') . '</th> <th class="ascending">' . _('Sequence') . ' #</th> <th class="ascending">' . _('GRN Number') . '</th> + <th class="ascending">' . _('Supplier\'s Ref') . '</th> <th class="ascending">' . _('Order') . '</th> <th class="ascending">' . _('Item Code') . '</th> <th class="ascending">' . _('Description') . '</th> @@ -285,6 +291,7 @@ } echo '<td>' . $GRNTmp->GRNNo . '</td> <td>' . $GRNTmp->GRNBatchNo . '</td> + <td>' . $GRNTmp->SupplierRef . '</td> <td>' . $GRNTmp->PONo . '</td> <td>' . $GRNTmp->ItemCode . '</td> <td>' . $GRNTmp->ItemDescription . '</td> Added: trunk/SupplierGRNAndInvoiceInquiry.php =================================================================== --- trunk/SupplierGRNAndInvoiceInquiry.php (rev 0) +++ trunk/SupplierGRNAndInvoiceInquiry.php 2015-10-30 12:12:52 UTC (rev 7373) @@ -0,0 +1,97 @@ +<?php +include('includes/session.inc'); +$Title = _('Supplier Invoice and GRN inquiry'); +include('includes/header.inc'); +if (isset($_GET['SelectedSupplier'])) { + $SupplierID= $_GET['SelectedSupplier']; +} elseif (isset($_POST['SelectedSupplier'])){ + $SupplierID = $_POST['SelectedSupplier']; +} else { + prnMsg(_('The page must be called from suppliers selected interface, please click following link to select the supplier'),'error'); + echo '<a href="' . $RootPath . '/SelectSupplier.php">'. _('Select Supplier') . '</a>'; + include('includes/footer.inc'); + exit; +} +if (isset($_GET['SupplierName'])) { + $SupplierName = $_GET['SupplierName']; +} +if (!isset($_POST['SupplierRef']) OR trim($_POST['SupplierRef'])=='') { + $_POST['SupplierRef'] = ''; + if (empty($_POST['GRNBatchNo']) AND empty($_POST['InvoiceNo'])) { + $_POST['GRNBatchNo'] = ''; + $_POST['InvoiceNo'] = ''; + } elseif (!empty($_POST['GRNBatchNo']) AND !empty($_POST['InvoiceNo'])) { + $_POST['InvoiceNo'] = ''; + } +} elseif (isset($_POST['GRNBatchNo']) OR isset($_POST['InvoiceNo'])) { + $_POST['GRNBatchNo'] = ''; + $_POST['InvoiceNo'] = ''; +} +echo '<p class="page_title_text">' . _('Supplier Invoice and Delivery Note Inquiry') . '<img src="' . $RootPath . '/css/' . $Theme . '/images/transactions.png" alt="" />' . _('Supplier') . ': ' . $SupplierName . '</p>'; +echo '<div class="page_help_text">' . _('The supplier\'s delivery note is prefer to GRN No, and GRN No is prefered to Invoice No').'</div>'; +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <input type="hidden" name="SelectedSupplier" value="' . $SupplierID . '" />'; + +echo '<table class="selection"> + <tr> + <td class="label">' . _('Part of Supplier\'s Delivery Note') . ':</td><td><input type="text" name="SupplierRef" value="' . $_POST['SupplierRef'] . '" size="20" maxlength="30" ></td> + <td class="label">' . _('GRN No') . ':</td><td><input type="text" name="GRNBatchNo" value="' . $_POST['GRNBatchNo'] . '" size="6" maxlength="6" /></td> + <td class="label">' . _('Invoice No') . ':</td><td><input type="text" name="InvoiceNo" value="' . $_POST['InvoiceNo'] . '" size="11" maxlength="11" /></td> + + </tr> + </table>'; +echo '<div class="center"> + <input type="submit" name="Submit" value="' . _('Submit') . '" /> + </div>'; +if (isset($_POST['Submit'])) { + $Where = ''; + if (isset($_POST['SupplierRef']) AND trim($_POST['SupplierRef']) != '') { + $SupplierRef = trim($_POST['SupplierRef']); + $WhereSupplierRef = " AND grns.supplierref LIKE '%" . $SupplierRef . "%'"; + $Where .= $WhereSupplierRef; + } elseif (isset($_POST['GRNBatchNo']) AND trim($_POST['GRNBatchNo']) != '') { + $GRNBatchNo = trim($_POST['GRNBatchNo']); + $WhereGRN = " AND grnbatch LIKE '%" . $GRNBatchNo . "%'"; + $Where .= $WhereGRN; + } elseif (isset($_POST['InvoiceNo']) AND (trim($_POST['InvoiceNo']) != '')) { + $InvoiceNo = trim($_POST['InvoiceNo']); + $WhereInvoiceNo = " AND suppinv LIKE '%" . $InvoiceNo . "%'"; + $Where .= $WhereInvoiceNo; + } + $sql = "SELECT grnbatch, grns.supplierref, suppinv,purchorderdetails.orderno + FROM grns INNER JOIN purchorderdetails ON grns.podetailitem=purchorderdetails.podetailitem + LEFT JOIN suppinvstogrn ON grns.grnno=suppinvstogrn.grnno + WHERE supplierid='" . $SupplierID . "'" . $Where; + $ErrMsg = _('Failed to retrieve supplier invoice and grn data'); + $result = DB_query($sql,$ErrMsg); + if (DB_num_rows($result)>0) { + echo '<table class="selection"> + <tr> + <th>' . _('Supplier Delivery Note') . '</th> + <th>' . _('GRN Batch No') . '</th> + <th>' . _('PO No') . '</th> + <th>' . _('Invoice No') . '</th> + </tr>'; + $k = 0; + while ($myrow = DB_fetch_array($result)){ + if ($k == 0) { + echo '<tr class="EvenTableRows">'; + $k = 1; + } else{ + echo '<tr class="OddTableRows">'; + $k = 0; + } + echo '<td class="ascending">' . $myrow['supplierref'] . '</td> + <td class="ascending"><a href="' . $RootPath .'/PDFGrn.php?GRNNo=' . $myrow['grnbatch'] . '&PONo=' . $myrow['orderno'] . '">' . $myrow['grnbatch']. '</td> + <td class="ascending">' . $myrow['orderno'] . '</td> + <td class="ascending">' . $myrow['suppinv'] . '</td></tr>'; + + } + echo '</table><br/>'; + + } + +} +include('includes/footer.inc'); +?> Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2015-10-29 13:04:36 UTC (rev 7372) +++ trunk/SupplierInvoice.php 2015-10-30 12:12:52 UTC (rev 7373) @@ -662,6 +662,8 @@ </tr>'; $tableheader = '<tr style="background-color:#800000"> <th>' . _('Seq') . ' #</th> + <th>' . _('GRN Batch') . '</th> + <th>' . _('Supplier Ref') . '</th> <th>' . _('Item Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Quantity Charged') . '</th> @@ -674,6 +676,8 @@ echo '<tr> <td>' . $EnteredGRN->GRNNo . '</td> + <td>' . $EnteredGRN->GRNBatchNo . '</td> + <td>' . $EnteredGRN->SupplierRef . '</td> <td>' . $EnteredGRN->ItemCode . '</td> <td>' . $EnteredGRN->ItemDescription . '</td> <td class="number">' . locale_number_format($EnteredGRN->This_QuantityInv,$EnteredGRN->DecimalPlaces) . '</td> @@ -1547,7 +1551,8 @@ $Result = DB_query($SQL, $ErrMsg, $DbgMsg, True); $SQL = "INSERT INTO suppinvstogrn VALUES ('" . $InvoiceNo . "', - '" .$EnteredGRN->GRNNo . "')"; + '" . $EnteredGRN->GRNNo . "', + '" . $EnteredGRN->SupplierRef . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The invoice could not be mapped to the goods received record because'); $DbgMsg = _('The following SQL to map the invoice to the GRN was used'); Modified: trunk/companies/weberpdemo/FormDesigns/GoodsReceived.xml =================================================================== --- trunk/companies/weberpdemo/FormDesigns/GoodsReceived.xml 2015-10-29 13:04:36 UTC (rev 7372) +++ trunk/companies/weberpdemo/FormDesigns/GoodsReceived.xml 2015-10-30 12:12:52 UTC (rev 7373) @@ -53,10 +53,15 @@ <x>625</x> <y>48</y> </GRNNumber> + <SupplierRef type="SimpleText" name="Supplier's Ref" id="SupplierRef"> + <FontSize>10</FontSize> + <x>625</x> + <y>60</y> + </SupplierRef> <OrderNumber type="SimpleText" name="Order Number" id="OrderNumber"> <FontSize>10</FontSize> <x>625</x> - <y>66</y> + <y>72</y> </OrderNumber> <PrintDate type="SimpleText" name="Date Printed" id="PrintDate"> <FontSize>10</FontSize> Modified: trunk/includes/DefineSuppTransClass.php =================================================================== --- trunk/includes/DefineSuppTransClass.php 2015-10-29 13:04:36 UTC (rev 7372) +++ trunk/includes/DefineSuppTransClass.php 2015-10-30 12:12:52 UTC (rev 7373) @@ -36,6 +36,7 @@ var $TaxGroupDescription; var $Taxes; var $Hold; + var $SupplierRef=''; function SuppTrans(){ /*Constructor function initialises a new Supplier Transaction object */ @@ -102,7 +103,8 @@ $AssetID=0, $Hold=0, $DecimalPlaces=2, - $GRNBatchNo){ + $GRNBatchNo, + $SupplierRef){ if ($This_QuantityInv!=0 AND isset($This_QuantityInv)){ $this->GRNs[$GRNNo] = new GRNs($GRNNo, @@ -123,7 +125,8 @@ $AssetID, $Hold, $DecimalPlaces, - $GRNBatchNo); + $GRNBatchNo, + $SupplierRef); Return 1; } Return 0; @@ -143,7 +146,8 @@ $ShiptRef, $JobRef, $GLCode, - $Hold){ + $Hold, + $SupplierRef){ if ($This_QuantityInv!=0 AND isset($This_QuantityInv)){ $this->GRNs[$GRNNo]->Modify($PODetailItem, @@ -159,7 +163,8 @@ $ShiptRef, $JobRef, $GLCode, - $Hold ); + $Hold, + $SupplierRef); Return 1; } Return 0; @@ -186,7 +191,8 @@ $GRNSrc->AssetID, $GRNSrc->Hold, $GRNSrc->DecimalPlaces, - $GRNSrc->GRNBatchNo); + $GRNSrc->GRNBatchNo, + $GRNSrc->SupplierRef); Return 1; } Return 0; @@ -325,6 +331,7 @@ var $AssetID; var $DecimalPlaces; var $GRNBatchNo; + var $SupplierRef; function GRNs ($GRNNo, $PODetailItem, @@ -344,7 +351,8 @@ $AssetID, $Hold=0, $DecimalPlaces=2, - $GRNBatchNo){ + $GRNBatchNo, + $SupplierRef=''){ @@ -368,6 +376,7 @@ $this->Hold = $Hold; $this->DecimalPlaces = $DecimalPlaces; $this->GRNBatchNo = $GRNBatchNo; + $this->SupplierRef = $SupplierRef; } function Modify ($PODetailItem, @@ -383,7 +392,8 @@ $ShiptRef, $JobRef, $GLCode, - $Hold){ + $Hold, + $SupplierRef){ /* Modify function to edit a GRNs object with passed params */ $this->PODetailItem = $PODetailItem; @@ -400,6 +410,7 @@ $this->JobRef = $JobRef; $this->Hold = $Hold; $this->GLCode = $GLCode; + $this->SupplierRef = $SupplierRef; } } Modified: trunk/includes/PDFGrnHeader.inc =================================================================== --- trunk/includes/PDFGrnHeader.inc 2015-10-29 13:04:36 UTC (rev 7372) +++ trunk/includes/PDFGrnHeader.inc 2015-10-30 12:12:52 UTC (rev 7373) @@ -18,6 +18,7 @@ $LeftOvers = $pdf->addText($FormDesign->CompanyName->x,$Page_Height-$FormDesign->CompanyName->y,$FormDesign->CompanyName->FontSize,$_SESSION['CompanyRecord']['coyname']); $LeftOvers = $pdf->addText($FormDesign->GRNNumber->x,$Page_Height-$FormDesign->GRNNumber->y,$FormDesign->GRNNumber->FontSize, _('GRN number ').' ' . $GRNNo ); +$LeftOvers = $pdf->addText($FormDesign->SupplierRef->x,$Page_Height-$FormDesign->SupplierRef->y,$FormDesign->SupplierRef->FontSize,_("Supplier's Ref") . ' ' . $SupplierRef); $LeftOvers = $pdf->addText($FormDesign->OrderNumber->x,$Page_Height-$FormDesign->OrderNumber->y,$FormDesign->OrderNumber->FontSize, _('PO number ').' ' . $_GET['PONo'] ); $LeftOvers = $pdf->addText($FormDesign->PrintDate->x,$Page_Height-$FormDesign->PrintDate->y,$FormDesign->PrintDate->FontSize, _('Printed').': ' . Date($_SESSION['DefaultDateFormat']) . ' '. _('Page'). ' ' . $PageNumber); @@ -45,4 +46,4 @@ $pdf->Line($FormDesign->Column5->startx, $Page_Height - $FormDesign->Column5->starty, $FormDesign->Column5->endx,$Page_Height - $FormDesign->Column5->endy); $PageNumber++; -?> \ No newline at end of file +?> Modified: trunk/sql/mysql/upgrade4.12.3-4.13.sql =================================================================== --- trunk/sql/mysql/upgrade4.12.3-4.13.sql 2015-10-29 13:04:36 UTC (rev 7372) +++ trunk/sql/mysql/upgrade4.12.3-4.13.sql 2015-10-30 12:12:52 UTC (rev 7373) @@ -15,6 +15,7 @@ CREATE TABLE `suppinvstogrn` ( `suppinv` int(11) NOT NULL, `grnno` int(11) NOT NULL, + `supplierref` varchar(30) NOT NULL DEFAULT '', PRIMARY KEY (`suppinv`,`grnno`), KEY `suppinvstogrn_ibfk_2` (`grnno`), CONSTRAINT `suppinvstogrn_ibfk_1` FOREIGN KEY (`suppinv`) REFERENCES @@ -23,5 +24,8 @@ `grns` (`grnno`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO scripts VALUES('EmailCustStatements.php','3','Email customer statement to customer'); +INSERT INTO scripts VALUES('SupplierGRNAndInvoiceInquiry.php',5,'Supplier\'s delivery note and grn relationship inquiry'); +ALTER table grns ADD supplierref varchar(30) NOT NULL DEFAULT ''; + -- Update version number: UPDATE config SET confvalue='4.13' WHERE confname='VersionNumber'; |
From: <ex...@us...> - 2015-10-29 13:04:38
|
Revision: 7372 http://sourceforge.net/p/web-erp/reponame/7372 Author: exsonqu Date: 2015-10-29 13:04:36 +0000 (Thu, 29 Oct 2015) Log Message: ----------- Modified Paths: -------------- trunk/doc/Change.log Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-10-29 13:03:58 UTC (rev 7371) +++ trunk/doc/Change.log 2015-10-29 13:04:36 UTC (rev 7372) @@ -1,5 +1,6 @@ webERP Change Log +29/10/15 Exson: Add gl narrative and account balance information to DailyBankTransactions.php. 28/10/15 Exson: Add bank default currency, original amount and check no data to GL account inquiry in GLAccountInquiry.php. 06/10/15 UK-Steven: Contribute email customer statements feature scripts. 06/10/15 Exson: Fixed the wrong unable to identify the selected customer warning at SelectOrderItems.php. |
From: <ex...@us...> - 2015-10-29 13:04:01
|
Revision: 7371 http://sourceforge.net/p/web-erp/reponame/7371 Author: exsonqu Date: 2015-10-29 13:03:58 +0000 (Thu, 29 Oct 2015) Log Message: ----------- 29/10/15 Exson: Add gl narrative and account balance information to DailyBankTransactions.php. Modified Paths: -------------- trunk/DailyBankTransactions.php Modified: trunk/DailyBankTransactions.php =================================================================== --- trunk/DailyBankTransactions.php 2015-10-28 09:29:43 UTC (rev 7370) +++ trunk/DailyBankTransactions.php 2015-10-29 13:03:58 UTC (rev 7371) @@ -91,7 +91,11 @@ WHERE bankaccounts.accountcode='" . $_POST['BankAccount'] . "'"; $BankResult = DB_query($SQL,_('Could not retrieve the bank account details')); - $sql="SELECT banktrans.currcode, + + $sql="SELECT (SELECT sum(banktrans.amount) FROM banktrans + WHERE transdate < '" . FormatDateForSQL($_POST['FromTransDate']) . "' + AND bankact='" . $_POST['BankAccount'] ."') AS prebalance, + banktrans.currcode, banktrans.amount, banktrans.amountcleared, banktrans.functionalexrate, @@ -114,14 +118,26 @@ ORDER BY banktrans.transdate ASC, banktrans.banktransid ASC"; $result = DB_query($sql); + $BankDetailRow = DB_fetch_array($BankResult); if (DB_num_rows($result)==0) { echo '<p class="page_title_text"><img alt="" src="'.$RootPath.'/css/'.$Theme. - '/images/bank.png" title="' .// Icon image. - _('Bank Transactions Inquiry') . '" /> ' .// Icon title. - _('Bank Transactions Inquiry') . '</p>';// Page title. + '/images/bank.png" title="' .// Icon image. + _('Bank Transactions Inquiry') . '" /> ' .// Icon title. + _('Bank Transactions Inquiry') . '</p>';// Page title. prnMsg(_('There are no transactions for this account in the date range selected'), 'info'); + + $sql = "SELECT sum(banktrans.amount) FROM banktrans WHERE bankact='" . $_POST['BankAccount'] . "'"; + $ErrMsg = _('Failed to retrive balance data'); + $balresult = DB_query($sql,$ErrMsg); + if (DB_num_rows($balresult)>0) { + $Balance = DB_fetch_row($balresult); + $Balance = $Balance[0]; + if (ABS($Balance)>0.001){ + echo '<p class="page_title_text">' . _('The Bank Account Balance Is in') . ' ' . $BankDetailRow['currcode'] . ' <span style="font-weight:bold">' . locale_number_format($Balance,$BankDetailRow['decimalplaces']) . '</span></p>'; + } + } + } else { - $BankDetailRow = DB_fetch_array($BankResult); echo '<div id="Report">';// Division to identify the report block. echo '<p class="page_title_text"><img alt="" src="'.$RootPath.'/css/'.$Theme. '/images/bank.png" title="' .// Icon image. @@ -136,42 +152,91 @@ <th class="number">' . _('Number') . '</th> <th class="text">' . _('Type') . '</th> <th class="text">' . _('Reference') . '</th> - <th class="number">' . _('Amount in').' '.$BankDetailRow['currcode'] . '</th> + <th class="number">' . _('Amount in org').' '.$BankDetailRow['currcode'] . '</th> + <th class="number">' . _('Balance in') . ' ' . $BankDetailRow['currcode'] . '</th> <th class="number">' . _('Running Total').' '.$BankDetailRow['currcode'] . '</th> <th class="number">' . _('Amount in').' '.$_SESSION['CompanyRecord']['currencydefault'] . '</th> <th class="number">' . _('Running Total').' '.$_SESSION['CompanyRecord']['currencydefault'] . '</th> - <th class="number">' . _('Cleared') . '</th> + <th class="text">' . _('Cleared') . '</th> + <th class="text">' . _('GL Narrative') . '</th> </tr> </thead><tbody>'; $AccountCurrTotal=0; $LocalCurrTotal =0; - + $Balance = 0; + $j = 0; + $k = 0; while ($myrow = DB_fetch_array($result)){ + + if ($j == 0) { + if (ABS($myrow['prebalance'])>0.0001) { + if ($k == 0) { + echo '<tr class="OddTableRows">'; + $k = 1; + } else { + echo '<tr class="EvenTableRows">'; + $k = 0; + } + $Balance += $myrow['prebalance']; + echo '<td colspan="6" style="font-weight:bold">' . _('Previous Balance') . '</td> + <td class="number">' . locale_number_format($myrow['prebalance'],$BankDetailRow['decimalplaces']) . '</td> + <td colspan="5"></td></tr>'; + $j++; + } + } + if ($k == 0) { + echo '<tr class="OddTableRows">'; + $k = 1; + } else { + echo '<tr class="EvenTableRows">'; + $k = 0; + } + //check the GL narrative + $sql = "SELECT narrative FROM gltrans WHERE type='" . $myrow['typeid'] . "' AND typeno='" . $myrow['transno'] . "'"; + $ErrMsg = _('Failed to retrieve gl narrative'); + $glresult = DB_query($sql,$ErrMsg); + if (DB_num_rows($glresult)>0) { + $GLNarrative = DB_fetch_array($glresult); + $GLNarrative = $GLNarrative[0]; + } else { + $GLNarrative = 'NA'; + } + $Balance += $myrow['amount']; + $AccountCurrTotal += $myrow['amount']; $LocalCurrTotal += $myrow['amount']/$myrow['functionalexrate']/$myrow['exrate']; - + if ($myrow['amount']==$myrow['amountcleared']) { $Matched=_('Yes'); } else { $Matched=_('No'); } - echo '<tr> + echo ' <td class="centre">' . ConvertSQLDate($myrow['transdate']) . '</td> <td>' . _($myrow['typename']) . '</td> <td class="number"><a href="' . $RootPath . '/GLTransInquiry.php?TypeID=' . $myrow['typeid'] . '&TransNo=' . $myrow['transno'] . '">' . $myrow['transno'] . '</a></td> <td>' . $myrow['banktranstype'] . '</td> <td>' . $myrow['ref'] . '</td> <td class="number">' . locale_number_format($myrow['amount'],$BankDetailRow['decimalplaces']) . '</td> + <td class="number">' . locale_number_format($Balance,$BankDetailRow['decimalplaces']) . '</td> <td class="number">' . locale_number_format($AccountCurrTotal,$BankDetailRow['decimalplaces']) . '</td> <td class="number">' . locale_number_format($myrow['amount']/$myrow['functionalexrate']/$myrow['exrate'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> <td class="number">' . locale_number_format($LocalCurrTotal,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> <td class="number">' . $Matched . '</td> + <td>' . $GLNarrative . '</td> </tr>'; } - echo '</tbody></table>'; + if ($k == 0 ) { + echo '<tr class="OddTableRows">'; + } else { + echo '<tr class="EvenTableRows">'; + } + + echo '<td colspan="6" style="font-weight:bold;">' . _('Account Balance') . '</td><td class="number" style="font-weight:bold;">' .locale_number_format($Balance,$BankDetailRow['decimalplaces']) . '</td><td colspan="5"></td></tr> + </tbody></table>'; echo '</div>';// div id="Report". } //end if no bank trans in the range to show @@ -192,4 +257,4 @@ </form>'; } include('includes/footer.inc'); -?> \ No newline at end of file +?> |
From: <ex...@us...> - 2015-10-28 09:29:46
|
Revision: 7370 http://sourceforge.net/p/web-erp/reponame/7370 Author: exsonqu Date: 2015-10-28 09:29:43 +0000 (Wed, 28 Oct 2015) Log Message: ----------- Modified Paths: -------------- trunk/doc/Change.log Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-10-28 09:28:30 UTC (rev 7369) +++ trunk/doc/Change.log 2015-10-28 09:29:43 UTC (rev 7370) @@ -1,4 +1,6 @@ webERP Change Log + +28/10/15 Exson: Add bank default currency, original amount and check no data to GL account inquiry in GLAccountInquiry.php. 06/10/15 UK-Steven: Contribute email customer statements feature scripts. 06/10/15 Exson: Fixed the wrong unable to identify the selected customer warning at SelectOrderItems.php. 23/09/2015 Tim: ADD invoice to grns mapping data in SupplierInvoice.php. |
From: <ex...@us...> - 2015-10-28 09:28:33
|
Revision: 7369 http://sourceforge.net/p/web-erp/reponame/7369 Author: exsonqu Date: 2015-10-28 09:28:30 +0000 (Wed, 28 Oct 2015) Log Message: ----------- 28/10/15 Exson: Add bank default currency, original amount and check no data to GL account inquiry in GLAccountInquiry.php. Modified Paths: -------------- trunk/GLAccountInquiry.php Modified: trunk/GLAccountInquiry.php =================================================================== --- trunk/GLAccountInquiry.php 2015-10-08 01:55:14 UTC (rev 7368) +++ trunk/GLAccountInquiry.php 2015-10-28 09:28:30 UTC (rev 7369) @@ -173,6 +173,9 @@ <th>' . _('Date') . '</th> <th>' . _('Debit') . '</th> <th>' . _('Credit') . '</th> + <th>' . _('Org Currency') . '</th> + <th>' . _('Amount in Org Currency') . '</th> + <th>' . _('Bank Ref') .'</th> <th>' . _('Narrative') . '</th> <th>' . _('Balance') . '</th> <th>' . _('Tag') . '</th> @@ -268,6 +271,21 @@ echo '<tr class="OddTableRows">'; $k++; } + if ($myrow['type'] == 12 OR $myrow['type'] == 22 OR $myrow['type'] == 2 OR $myrow['type'] == 1) { + $banksql = "SELECT ref,currcode,amount FROM banktrans WHERE type='" .$myrow['type']."' and transno='" . $myrow['typeno'] . "'"; + $ErrMsg = _('Failed to retrieve bank data'); + $bankresult = DB_query($banksql,$ErrMsg); + if (DB_num_rows($bankresult)>0) { + $bankrow = DB_fetch_array($bankresult); + $BankRef = $bankrow['ref']; + $OrgAmt = $bankrow['amount']; + $Currency = $bankrow['currcode']; + } + } else { + $BankRef = ''; + $OrgAmt = ''; + $Currency = ''; + } $RunningTotal += $myrow['amount']; $PeriodTotal += $myrow['amount']; @@ -291,6 +309,9 @@ <td>%s</td> <td class="number"><b>%s</b></td> <td>%s</td> + <td>%s</td> + <td class="number">%s</td> + <td>%s</td> </tr>', _($myrow['typename']), $URL_to_TransDetail, @@ -298,9 +319,13 @@ $FormatedTranDate, $DebitAmount, $CreditAmount, + $Currency, + locale_number_format($OrgAmt,$_SESSION['CompanyRecord']['decimalplaces']), + $BankRef, $myrow['narrative'], locale_number_format($RunningTotal,$_SESSION['CompanyRecord']['decimalplaces']), - $myrow['tagdescription']); + $myrow['tagdescription'] + ); } @@ -335,4 +360,4 @@ echo '<p>' . $IntegrityReport; } include('includes/footer.inc'); -?> \ No newline at end of file +?> |
From: <te...@us...> - 2015-10-08 01:55:17
|
Revision: 7368 http://sourceforge.net/p/web-erp/reponame/7368 Author: tehonu Date: 2015-10-08 01:55:14 +0000 (Thu, 08 Oct 2015) Log Message: ----------- Allow print of copies of the same label Modified Paths: -------------- trunk/PDFPrintLabel.php Modified: trunk/PDFPrintLabel.php =================================================================== --- trunk/PDFPrintLabel.php 2015-10-06 12:37:35 UTC (rev 7367) +++ trunk/PDFPrintLabel.php 2015-10-08 01:55:14 UTC (rev 7368) @@ -1,351 +1,359 @@ -<?php -/* $Id: PDFPriceLabels.php 5228 2012-04-06 02:48:00Z vvs2012 $*/ - -include('includes/session.inc'); -include('includes/barcodepack/class.code128.php'); - -$PtsPerMM = 2.83464567; //pdf points per mm (72 dpi / 25.4 mm per inch) - -if ((isset($_POST['ShowLabels']) OR isset($_POST['SelectAll'])) - AND isset($_POST['StockCategory']) - AND mb_strlen($_POST['StockCategory'])>=1){ - - $Title = _('Print Labels'); - include('includes/header.inc'); - - $SQL = "SELECT prices.stockid, - stockmaster.description, - stockmaster.barcode, - prices.price, - currencies.decimalplaces - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - INNER JOIN prices - ON stockmaster.stockid=prices.stockid - INNER JOIN currencies - ON prices.currabrev=currencies.currabrev - WHERE stockmaster.categoryid = '" . $_POST['StockCategory'] . "' - AND prices.typeabbrev='" . $_POST['SalesType'] . "' - AND prices.currabrev='" . $_POST['Currency'] . "' - AND prices.startdate<='" . FormatDateForSQL($_POST['EffectiveDate']) . "' - AND (prices.enddate='0000-00-00' OR prices.enddate>'" . FormatDateForSQL($_POST['EffectiveDate']) . "') - AND prices.debtorno='' - ORDER BY prices.currabrev, - stockmaster.categoryid, - stockmaster.stockid, - prices.startdate"; - - $LabelsResult = DB_query($SQL,'','',false,false); - - if (DB_error_no() !=0) { - prnMsg( _('The Price Labels could not be retrieved by the SQL because'). ' - ' . DB_error_msg(), 'error'); - echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu'). '</a>'; - if ($debug==1){ - prnMsg(_('For debugging purposes the SQL used was:') . $SQL,'error'); - } - include('includes/footer.inc'); - exit; - } - if (DB_num_rows($LabelsResult)==0){ - prnMsg(_('There were no price labels to print out for the category specified'),'warn'); - echo '<br /><a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Back') . '</a>'; - include('includes/footer.inc'); - exit; - } - - - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class="selection"> - <tr> - <th>' . _('Item Code') . '</th> - <th>' . _('Item Description') . '</th> - <th>' . _('Price') . '</th> - <th>' . _('Print') . ' ?</th> - </tr> - <tr> - <th colspan="4"><input type="submit" name="SelectAll" value="' . _('Select All Labels') . '" /><input type="checkbox" name="CheckAll" '; - if (isset($_POST['CheckAll'])){ - echo 'checked="checked" '; - } - echo 'onchange="ReloadForm(SelectAll)" /></td> - </tr>'; - - $i=0; - while ($LabelRow = DB_fetch_array($LabelsResult)){ - echo '<tr> - <td>' . $LabelRow['stockid'] . '</td> - <td>' . $LabelRow['description'] . '</td> - <td class="number">' . locale_number_format($LabelRow['price'],$LabelRow['decimalplaces']) . '</td> - <td>'; - if (isset($_POST['SelectAll']) AND isset($_POST['CheckAll'])) { - echo '<input type="checkbox" checked="checked" name="PrintLabel' . $i .'" />'; - } else { - echo '<input type="checkbox" name="PrintLabel' . $i .'" />'; - } - echo '</td> - </tr>'; - echo '<input type="hidden" name="StockID' . $i . '" value="' . $LabelRow['stockid'] . '" /> - <input type="hidden" name="Description' . $i . '" value="' . $LabelRow['description'] . '" /> - <input type="hidden" name="Barcode' . $i . '" value="' . $LabelRow['barcode'] . '" /> - <input type="hidden" name="Price' . $i . '" value="' . locale_number_format($LabelRow['price'],$LabelRow['decimalplaces']) . '" />'; - $i++; - } - $i--; - echo '</table> - <input type="hidden" name="NoOfLabels" value="' . $i . '" /> - <input type="hidden" name="LabelID" value="' . $_POST['LabelID'] . '" /> - <input type="hidden" name="StockCategory" value="' . $_POST['StockCategory'] . '" /> - <input type="hidden" name="SalesType" value="' . $_POST['SalesType'] . '" /> - <input type="hidden" name="Currency" value="' . $_POST['Currency'] . '" /> - <input type="hidden" name="EffectiveDate" value="' . $_POST['EffectiveDate'] . '" /> - <br /> - <div class="centre"> - - <input type="submit" name="PrintLabels" value="'. _('Print Labels'). '" /> - </div> - <br /> - <div class="centre"> - <a href="'. $RootPath . '/Labels.php">' . _('Label Template Maintenance'). '</a> - </div> - </form>'; - include('includes/footer.inc'); - exit; -} - -$NoOfLabels = 0; -if (isset($_POST['PrintLabels']) AND isset($_POST['NoOfLabels']) AND $_POST['NoOfLabels']>0){ - - for ($i=0;$i < $_POST['NoOfLabels'];$i++){ - if (isset($_POST['PrintLabel'.$i])){ - $NoOfLabels++; - } - } - if ($NoOfLabels ==0){ - prnMsg(_('There are no labels selected to print'),'info'); - } -} -if (isset($_POST['PrintLabels']) AND $NoOfLabels>0) { - - $result = DB_query("SELECT description, - pagewidth*" . $PtsPerMM . " as page_width, - pageheight*" . $PtsPerMM . " as page_height, - width*" . $PtsPerMM . " as label_width, - height*" . $PtsPerMM . " as label_height, - rowheight*" . $PtsPerMM . " as label_rowheight, - columnwidth*" . $PtsPerMM . " as label_columnwidth, - topmargin*" . $PtsPerMM . " as label_topmargin, - leftmargin*" . $PtsPerMM . " as label_leftmargin - FROM labels - WHERE labelid='" . $_POST['LabelID'] . "'"); - $LabelDimensions = DB_fetch_array($result); - - $result = DB_query("SELECT fieldvalue, - vpos, - hpos, - fontsize, - barcode - FROM labelfields - WHERE labelid = '" . $_POST['LabelID'] . "'"); - $LabelFields = array(); - $i=0; - while ($LabelFieldRow = DB_fetch_array($result)){ - if ($LabelFieldRow['fieldvalue'] == 'itemcode'){ - $LabelFields[$i]['FieldValue'] = 'stockid'; - } elseif ($LabelFieldRow['fieldvalue'] == 'itemdescription'){ - $LabelFields[$i]['FieldValue'] = 'description'; - } else { - $LabelFields[$i]['FieldValue'] = $LabelFieldRow['fieldvalue']; - } - $LabelFields[$i]['VPos'] = $LabelFieldRow['vpos']*$PtsPerMM; - $LabelFields[$i]['HPos'] = $LabelFieldRow['hpos']*$PtsPerMM; - $LabelFields[$i]['FontSize'] = $LabelFieldRow['fontsize']; - $LabelFields[$i]['Barcode'] = $LabelFieldRow['barcode']; - $i++; - } - - $PaperSize = 'Custom'; // so PDF starter wont default the DocumentPaper - $DocumentPaper = array($LabelDimensions['page_width'],$LabelDimensions['page_height']); - include('includes/PDFStarter.php'); - $Top_Margin = $LabelDimensions['label_topmargin']; - $Left_Margin = $LabelDimensions['label_leftmargin']; - $Page_Height = $LabelDimensions['page_height']; - $Page_Width = $LabelDimensions['page_width']; - $Right_Margin =0; - $Bottom_Margin =0; - - $pdf->addInfo('Title', $LabelDimensions['description'] . ' ' . _('Price Labels') ); - $pdf->addInfo('Subject', $LabelDimensions['description'] . ' ' . _('Price Labels') ); - $pdf->setPrintHeader(false); - $pdf->setPrintFooter(false); - - - $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - $pdf->setPrintHeader(false); - $pdf->setPrintFooter(false); - - $PageNumber=1; - //go down first then accross - $YPos = $Page_Height - $Top_Margin; //top of current label - $XPos = $Left_Margin; // left of current label - - for ($i=0;$i < $_POST['NoOfLabels'];$i++){ - if (isset($_POST['PrintLabel'.$i])){ - $NoOfLabels--; - foreach ($LabelFields as $Field){ - //print_r($Field); - if ($Field['FieldValue']== 'price'){ - $Value = $_POST['Price' . $i] . ' '. $_POST['Currency']; - } elseif ($Field['FieldValue']== 'stockid'){ - $Value = $_POST['StockID' . $i]; - } elseif ($Field['FieldValue']== 'description'){ - $Value = $_POST['Description' . $i]; - } elseif ($Field['FieldValue']== 'barcode'){ - $Value = $_POST['Barcode' . $i]; - } - if ($Field['FieldValue'] == 'price'){ //need to format for the number of decimal places -// $LeftOvers = $pdf->addTextWrap($XPos+$Field['HPos'],$YPos-$LabelDimensions['label_height']+$Field['VPos'],$LabelDimensions['label_width']-$Field['HPos'],$Field['FontSize'],$_POST['Price' . $i],'center'); - $LeftOvers = $pdf->addTextWrap($XPos+$Field['HPos'],$YPos-$LabelDimensions['label_height']+$Field['VPos'],$LabelDimensions['label_width']-$Field['HPos'],$Field['FontSize'],$Value); - }elseif ($Field['FieldValue'] == 'logo'){ - $pdf->addJpegFromFile($_SESSION['LogoFile'],$XPos+$Field['HPos'],$YPos-$LabelDimensions['label_height']+$Field['VPos'],'', $Field['FontSize']); - - }elseif($Field['Barcode']==1) { - - $BarcodeImage = new code128(str_replace('_','',$Value)); - - ob_start(); - imagepng(imagepng($BarcodeImage->draw())); - $Image_String = ob_get_contents(); - ob_end_clean(); - - $pdf->addJpegFromFile('@' . $Image_String,$XPos+$Field['HPos'],$YPos-$LabelDimensions['label_height']+$Field['VPos'],'', $Field['FontSize']); - - } else { - $LeftOvers = $pdf->addTextWrap($XPos+$Field['HPos'],$YPos-$LabelDimensions['label_height']+$Field['VPos'],$LabelDimensions['label_width']-$Field['HPos'],$Field['FontSize'],$Value); - } - } // end loop through label fields - if ($NoOfLabels>0) { - //setup $YPos and $XPos for the next label - if (($YPos - $LabelDimensions['label_rowheight']) < $LabelDimensions['label_height']){ - /* not enough space below the above label to print a new label - * so the above was the last label in the column - * need to start either a new column or new page - */ - if (($Page_Width - $XPos - $LabelDimensions['label_columnwidth']) < $LabelDimensions['label_width']) { - /* Not enough space to start a new column so we are into a new page - */ - $pdf->newPage(); - $PageNumber++; - $YPos = $Page_Height - $Top_Margin; //top of next label - $XPos = $Left_Margin; // left of next label - } else { - /* There is enough space for another column */ - $YPos = $Page_Height - $Top_Margin; //back to the top of next label column - $XPos += $LabelDimensions['label_columnwidth']; // left of next label - } - } else { - /* There is space below to print a label - */ - $YPos -= $LabelDimensions['label_rowheight']; //Top of next label - } - }//end if there is another label to print - } //this label is set to print - } //loop through labels selected to print - - - $FileName=$_SESSION['DatabaseName']. '_' . _('Price_Labels') . '_' . date('Y-m-d').'.pdf'; - ob_clean(); - $pdf->OutputI($FileName); - $pdf->__destruct(); - -} else { /*The option to print PDF was not hit */ - - $Title= _('Price Labels'); - include('includes/header.inc'); - - echo '<p class="page_title_text"><img src="' . $RootPath . '/css/' . $Theme . '/images/customer.png" title="' . _('Price Labels') . '" alt="" /> - ' . ' ' . _('Print Price Labels') . '</p>'; - - if (!function_exists('gd_info')) { - prnMsg(_('The GD module for PHP is required to print barcode labels. Your PHP installation is not capable currently. You will most likely experience problems with this script until the GD module is enabled.'),'error'); - } - - - if (!isset($_POST['StockCategory'])) { - - /*if $StockCategory is not set then show a form to allow input */ - - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> - <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> - <table class="selection"> - <tr> - <td>' . _('Label to print') . ':</td> - <td><select required="required" autofocus="autofocus" name="LabelID">'; - - $LabelResult = DB_query("SELECT labelid, description FROM labels"); - while ($LabelRow = DB_fetch_array($LabelResult)){ - echo '<option value="' . $LabelRow['labelid'] . '">' . $LabelRow['description'] . '</option>'; - } - echo '</select></td> - </tr> - <tr> - <td>' . _('For Stock Category') .':</td> - <td><select name="StockCategory">'; - - $CatResult= DB_query("SELECT categoryid, categorydescription FROM stockcategory ORDER BY categorydescription"); - while ($myrow = DB_fetch_array($CatResult)){ - echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; - } - echo '</select></td></tr>'; - - echo '<tr><td>' . _('For Sales Type/Price List').':</td> - <td><select name="SalesType">'; - $sql = "SELECT sales_type, typeabbrev FROM salestypes"; - $SalesTypesResult=DB_query($sql); - - while ($myrow=DB_fetch_array($SalesTypesResult)){ - if ($_SESSION['DefaultPriceList']==$myrow['typeabbrev']){ - echo '<option selected="selected" value="' . $myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>'; - } else { - echo '<option value="' . $myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>'; - } - } - echo '</select></td></tr>'; - - echo '<tr><td>' . _('For Currency').':</td> - <td><select name="Currency">'; - $sql = "SELECT currabrev, country, currency FROM currencies"; - $CurrenciesResult=DB_query($sql); - - while ($myrow=DB_fetch_array($CurrenciesResult)){ - if ($_SESSION['CompanyRecord']['currencydefault']==$myrow['currabrev']){ - echo '<option selected="selected" value="' . $myrow['currabrev'] . '">' . $myrow['country'] . ' - ' .$myrow['currency'] . '</option>'; - } else { - echo '<option value="' . $myrow['currabrev'] . '">' . $myrow['country'] . ' - ' .$myrow['currency'] . '</option>'; - } - } - echo '</select></td> - </tr> - <tr> - <td>' . _('Effective As At') . ':</td> - <td><input type="text" size="11" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="EffectiveDate" value="' . Date($_SESSION['DefaultDateFormat']) . '" />'; - echo '</td></tr>'; - - echo '</table> - <br /> - <div class="centre"> - <input type="submit" name="ShowLabels" value="'. _('Show Labels'). '" /> - </div> - <br /> - <div class="centre"> - <a href="'. $RootPath . '/Labels.php">' . _('Label Template Maintenance'). '</a> - </div> - </form>'; - - } - include('includes/footer.inc'); - -} /*end of else not PrintPDF */ - +<?php +/* $Id: PDFPriceLabels.php 5228 2012-04-06 02:48:00Z vvs2012 $*/ + +include('includes/session.inc'); +include('includes/barcodepack/class.code128.php'); + +$PtsPerMM = 2.83464567; //pdf points per mm (72 dpi / 25.4 mm per inch) + +if ((isset($_POST['ShowLabels']) OR isset($_POST['SelectAll'])) + AND isset($_POST['StockCategory']) + AND mb_strlen($_POST['StockCategory'])>=1){ + + $Title = _('Print Labels'); + include('includes/header.inc'); + + $SQL = "SELECT prices.stockid, + stockmaster.description, + stockmaster.barcode, + prices.price, + currencies.decimalplaces + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + INNER JOIN prices + ON stockmaster.stockid=prices.stockid + INNER JOIN currencies + ON prices.currabrev=currencies.currabrev + WHERE stockmaster.categoryid = '" . $_POST['StockCategory'] . "' + AND prices.typeabbrev='" . $_POST['SalesType'] . "' + AND prices.currabrev='" . $_POST['Currency'] . "' + AND prices.startdate<='" . FormatDateForSQL($_POST['EffectiveDate']) . "' + AND (prices.enddate='0000-00-00' OR prices.enddate>'" . FormatDateForSQL($_POST['EffectiveDate']) . "') + AND prices.debtorno='' + ORDER BY prices.currabrev, + stockmaster.categoryid, + stockmaster.stockid, + prices.startdate"; + + $LabelsResult = DB_query($SQL,'','',false,false); + + if (DB_error_no() !=0) { + prnMsg( _('The Price Labels could not be retrieved by the SQL because'). ' - ' . DB_error_msg(), 'error'); + echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu'). '</a>'; + if ($debug==1){ + prnMsg(_('For debugging purposes the SQL used was:') . $SQL,'error'); + } + include('includes/footer.inc'); + exit; + } + if (DB_num_rows($LabelsResult)==0){ + prnMsg(_('There were no price labels to print out for the category specified'),'warn'); + echo '<br /><a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Back') . '</a>'; + include('includes/footer.inc'); + exit; + } + + + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection"> + <tr> + <th>' . _('Item Code') . '</th> + <th>' . _('Item Description') . '</th> + <th>' . _('Price') . '</th> + <th>' . _('Print') . ' ?</th> + </tr> + <tr> + <th colspan="4"><input type="submit" name="SelectAll" value="' . _('Select All Labels') . '" /><input type="checkbox" name="CheckAll" '; + if (isset($_POST['CheckAll'])){ + echo 'checked="checked" '; + } + echo 'onchange="ReloadForm(SelectAll)" /></td> + </tr>'; + + $i=0; + while ($LabelRow = DB_fetch_array($LabelsResult)){ + echo '<tr> + <td>' . $LabelRow['stockid'] . '</td> + <td>' . $LabelRow['description'] . '</td> + <td class="number">' . locale_number_format($LabelRow['price'],$LabelRow['decimalplaces']) . '</td> + <td>'; + if (isset($_POST['SelectAll']) AND isset($_POST['CheckAll'])) { + echo '<input type="checkbox" checked="checked" name="PrintLabel' . $i .'" />'; + } else { + echo '<input type="checkbox" name="PrintLabel' . $i .'" />'; + } + echo '</td> + </tr>'; + echo '<input type="hidden" name="StockID' . $i . '" value="' . $LabelRow['stockid'] . '" /> + <input type="hidden" name="Description' . $i . '" value="' . $LabelRow['description'] . '" /> + <input type="hidden" name="Barcode' . $i . '" value="' . $LabelRow['barcode'] . '" /> + <input type="hidden" name="Price' . $i . '" value="' . locale_number_format($LabelRow['price'],$LabelRow['decimalplaces']) . '" />'; + $i++; + } + $i--; + echo '</table> + <input type="hidden" name="NoOfLabels" value="' . $i . '" /> + <input type="hidden" name="LabelID" value="' . $_POST['LabelID'] . '" /> + <input type="hidden" name="StockCategory" value="' . $_POST['StockCategory'] . '" /> + <input type="hidden" name="SalesType" value="' . $_POST['SalesType'] . '" /> + <input type="hidden" name="Currency" value="' . $_POST['Currency'] . '" /> + <input type="hidden" name="EffectiveDate" value="' . $_POST['EffectiveDate'] . '" /> + <input type="hidden" name="LabelsPerItem" value="' . $_POST['LabelsPerItem'] . '" /> + <br /> + <div class="centre"> + + <input type="submit" name="PrintLabels" value="'. _('Print Labels'). '" /> + </div> + <br /> + <div class="centre"> + <a href="'. $RootPath . '/Labels.php">' . _('Label Template Maintenance'). '</a> + </div> + </form>'; + include('includes/footer.inc'); + exit; +} + +$NoOfLabels = 0; +if (isset($_POST['PrintLabels']) AND isset($_POST['NoOfLabels']) AND $_POST['NoOfLabels']>0){ + + for ($i=0;$i < $_POST['NoOfLabels'];$i++){ + if (isset($_POST['PrintLabel'.$i])){ + $NoOfLabels++; + } + } + if ($NoOfLabels ==0){ + prnMsg(_('There are no labels selected to print'),'info'); + } +} +if (isset($_POST['PrintLabels']) AND $NoOfLabels>0) { + + $result = DB_query("SELECT description, + pagewidth*" . $PtsPerMM . " as page_width, + pageheight*" . $PtsPerMM . " as page_height, + width*" . $PtsPerMM . " as label_width, + height*" . $PtsPerMM . " as label_height, + rowheight*" . $PtsPerMM . " as label_rowheight, + columnwidth*" . $PtsPerMM . " as label_columnwidth, + topmargin*" . $PtsPerMM . " as label_topmargin, + leftmargin*" . $PtsPerMM . " as label_leftmargin + FROM labels + WHERE labelid='" . $_POST['LabelID'] . "'"); + $LabelDimensions = DB_fetch_array($result); + + $result = DB_query("SELECT fieldvalue, + vpos, + hpos, + fontsize, + barcode + FROM labelfields + WHERE labelid = '" . $_POST['LabelID'] . "'"); + $LabelFields = array(); + $i=0; + while ($LabelFieldRow = DB_fetch_array($result)){ + if ($LabelFieldRow['fieldvalue'] == 'itemcode'){ + $LabelFields[$i]['FieldValue'] = 'stockid'; + } elseif ($LabelFieldRow['fieldvalue'] == 'itemdescription'){ + $LabelFields[$i]['FieldValue'] = 'description'; + } else { + $LabelFields[$i]['FieldValue'] = $LabelFieldRow['fieldvalue']; + } + $LabelFields[$i]['VPos'] = $LabelFieldRow['vpos']*$PtsPerMM; + $LabelFields[$i]['HPos'] = $LabelFieldRow['hpos']*$PtsPerMM; + $LabelFields[$i]['FontSize'] = $LabelFieldRow['fontsize']; + $LabelFields[$i]['Barcode'] = $LabelFieldRow['barcode']; + $i++; + } + + $PaperSize = 'Custom'; // so PDF starter wont default the DocumentPaper + $DocumentPaper = array($LabelDimensions['page_width'],$LabelDimensions['page_height']); + include('includes/PDFStarter.php'); + $Top_Margin = $LabelDimensions['label_topmargin']; + $Left_Margin = $LabelDimensions['label_leftmargin']; + $Page_Height = $LabelDimensions['page_height']; + $Page_Width = $LabelDimensions['page_width']; + $Right_Margin =0; + $Bottom_Margin =0; + + $pdf->addInfo('Title', $LabelDimensions['description'] . ' ' . _('Price Labels') ); + $pdf->addInfo('Subject', $LabelDimensions['description'] . ' ' . _('Price Labels') ); + $pdf->setPrintHeader(false); + $pdf->setPrintFooter(false); + + + $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); + $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); + $pdf->setPrintHeader(false); + $pdf->setPrintFooter(false); + + $PageNumber=1; + //go down first then accross + $YPos = $Page_Height - $Top_Margin; //top of current label + $XPos = $Left_Margin; // left of current label + + $TotalLabels = $NoOfLabels * $_POST['LabelsPerItem']; + $LabelsPrinted = 0; + for ($i=0;$i < $_POST['NoOfLabels'];$i++){ + if (isset($_POST['PrintLabel'.$i])){ + $NoOfLabels--; + for ($LabelNumber=0; $LabelNumber < $_POST['LabelsPerItem'];$LabelNumber++){ + foreach ($LabelFields as $Field){ + //print_r($Field); + if ($Field['FieldValue']== 'price'){ + $Value = $_POST['Price' . $i] . ' '. $_POST['Currency']; + } elseif ($Field['FieldValue']== 'stockid'){ + $Value = $_POST['StockID' . $i]; + } elseif ($Field['FieldValue']== 'description'){ + $Value = $_POST['Description' . $i]; + } elseif ($Field['FieldValue']== 'barcode'){ + $Value = $_POST['Barcode' . $i]; + } + if ($Field['FieldValue'] == 'price'){ //need to format for the number of decimal places + $LeftOvers = $pdf->addTextWrap($XPos+$Field['HPos'],$YPos-$LabelDimensions['label_height']+$Field['VPos'],$LabelDimensions['label_width']-$Field['HPos'],$Field['FontSize'],$Value); + }elseif ($Field['FieldValue'] == 'logo'){ + $pdf->addJpegFromFile($_SESSION['LogoFile'],$XPos+$Field['HPos'],$YPos-$LabelDimensions['label_height']+$Field['VPos'],'', $Field['FontSize']); + + }elseif($Field['Barcode']==1) { + + $BarcodeImage = new code128(str_replace('_','',$Value)); + + ob_start(); + imagepng(imagepng($BarcodeImage->draw())); + $Image_String = ob_get_contents(); + ob_end_clean(); + + $pdf->addJpegFromFile('@' . $Image_String,$XPos+$Field['HPos'],$YPos-$LabelDimensions['label_height']+$Field['VPos'],'', $Field['FontSize']); + + } else { + $LeftOvers = $pdf->addTextWrap($XPos+$Field['HPos'],$YPos-$LabelDimensions['label_height']+$Field['VPos'],$LabelDimensions['label_width']-$Field['HPos'],$Field['FontSize'],$Value); + } + } // end loop through label fields + $LabelsPrinted++; + if ($LabelsPrinted < $TotalLabels){ // if there is another label to print + //setup $YPos and $XPos for the next label + if (($YPos - $LabelDimensions['label_rowheight']) < $LabelDimensions['label_height']){ + /* not enough space below the above label to print a new label + * so the above was the last label in the column + * need to start either a new column or new page + */ + if (($Page_Width - $XPos - $LabelDimensions['label_columnwidth']) < $LabelDimensions['label_width']) { + /* Not enough space to start a new column so we are into a new page + */ + $pdf->newPage(); + $PageNumber++; + $YPos = $Page_Height - $Top_Margin; //top of next label + $XPos = $Left_Margin; // left of next label + } else { + /* There is enough space for another column */ + $YPos = $Page_Height - $Top_Margin; //back to the top of next label column + $XPos += $LabelDimensions['label_columnwidth']; // left of next label + } + } else { + /* There is space below to print a label + */ + $YPos -= $LabelDimensions['label_rowheight']; //Top of next label + } + }//end if there is another label to print + } + } //this label is set to print + } //loop through labels selected to print + + + $FileName=$_SESSION['DatabaseName']. '_' . _('Price_Labels') . '_' . date('Y-m-d').'.pdf'; + ob_clean(); + $pdf->OutputI($FileName); + $pdf->__destruct(); + +} else { /*The option to print PDF was not hit */ + + $Title= _('Price Labels'); + include('includes/header.inc'); + + echo '<p class="page_title_text"><img src="' . $RootPath . '/css/' . $Theme . '/images/customer.png" title="' . _('Price Labels') . '" alt="" /> + ' . ' ' . _('Print Price Labels') . '</p>'; + + if (!function_exists('gd_info')) { + prnMsg(_('The GD module for PHP is required to print barcode labels. Your PHP installation is not capable currently. You will most likely experience problems with this script until the GD module is enabled.'),'error'); + } + + + if (!isset($_POST['StockCategory'])) { + + /*if $StockCategory is not set then show a form to allow input */ + + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <table class="selection"> + <tr> + <td>' . _('Label to print') . ':</td> + <td><select required="required" autofocus="autofocus" name="LabelID">'; + + $LabelResult = DB_query("SELECT labelid, description FROM labels"); + while ($LabelRow = DB_fetch_array($LabelResult)){ + echo '<option value="' . $LabelRow['labelid'] . '">' . $LabelRow['description'] . '</option>'; + } + echo '</select></td> + </tr> + <tr> + <td>' . _('For Stock Category') .':</td> + <td><select name="StockCategory">'; + + $CatResult= DB_query("SELECT categoryid, categorydescription FROM stockcategory ORDER BY categorydescription"); + while ($myrow = DB_fetch_array($CatResult)){ + echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; + } + echo '</select></td></tr>'; + + echo '<tr><td>' . _('For Sales Type/Price List').':</td> + <td><select name="SalesType">'; + $sql = "SELECT sales_type, typeabbrev FROM salestypes"; + $SalesTypesResult=DB_query($sql); + + while ($myrow=DB_fetch_array($SalesTypesResult)){ + if ($_SESSION['DefaultPriceList']==$myrow['typeabbrev']){ + echo '<option selected="selected" value="' . $myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>'; + } else { + echo '<option value="' . $myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>'; + } + } + echo '</select></td></tr>'; + + echo '<tr><td>' . _('For Currency').':</td> + <td><select name="Currency">'; + $sql = "SELECT currabrev, country, currency FROM currencies"; + $CurrenciesResult=DB_query($sql); + + while ($myrow=DB_fetch_array($CurrenciesResult)){ + if ($_SESSION['CompanyRecord']['currencydefault']==$myrow['currabrev']){ + echo '<option selected="selected" value="' . $myrow['currabrev'] . '">' . $myrow['country'] . ' - ' .$myrow['currency'] . '</option>'; + } else { + echo '<option value="' . $myrow['currabrev'] . '">' . $myrow['country'] . ' - ' .$myrow['currency'] . '</option>'; + } + } + echo '</select></td> + </tr> + <tr> + <td>' . _('Effective As At') . ':</td> + <td><input type="text" size="11" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="EffectiveDate" value="' . Date($_SESSION['DefaultDateFormat']) . '" />'; + echo '</td></tr>'; + + echo'<tr><td>' . _('Number of labels per item') . ':</td> + <td><input type="text" class="number" name="LabelsPerItem" size="3" value="1" /></tr>'; + + echo '</table> + <br /> + <div class="centre"> + <input type="submit" name="ShowLabels" value="'. _('Show Labels'). '" /> + </div> + <br /> + <div class="centre"> + <a href="'. $RootPath . '/Labels.php">' . _('Label Template Maintenance'). '</a> + </div> + </form>'; + + } + include('includes/footer.inc'); + +} /*end of else not PrintPDF */ + ?> \ No newline at end of file |
From: <ex...@us...> - 2015-10-06 12:37:38
|
Revision: 7367 http://sourceforge.net/p/web-erp/reponame/7367 Author: exsonqu Date: 2015-10-06 12:37:35 +0000 (Tue, 06 Oct 2015) Log Message: ----------- Modified Paths: -------------- trunk/doc/Change.log Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-10-06 12:36:57 UTC (rev 7366) +++ trunk/doc/Change.log 2015-10-06 12:37:35 UTC (rev 7367) @@ -1,5 +1,5 @@ webERP Change Log - +06/10/15 UK-Steven: Contribute email customer statements feature scripts. 06/10/15 Exson: Fixed the wrong unable to identify the selected customer warning at SelectOrderItems.php. 23/09/2015 Tim: ADD invoice to grns mapping data in SupplierInvoice.php. 21/09/15 RChacon: In StockLocStatus.php, add current date and time, and format to use print.css. |
From: <ex...@us...> - 2015-10-06 12:36:59
|
Revision: 7366 http://sourceforge.net/p/web-erp/reponame/7366 Author: exsonqu Date: 2015-10-06 12:36:57 +0000 (Tue, 06 Oct 2015) Log Message: ----------- 06/10/15 UK-Steven: Contribute email customer statements feature scripts. Modified Paths: -------------- trunk/sql/mysql/upgrade4.12.3-4.13.sql Modified: trunk/sql/mysql/upgrade4.12.3-4.13.sql =================================================================== --- trunk/sql/mysql/upgrade4.12.3-4.13.sql 2015-10-06 12:36:27 UTC (rev 7365) +++ trunk/sql/mysql/upgrade4.12.3-4.13.sql 2015-10-06 12:36:57 UTC (rev 7366) @@ -22,6 +22,6 @@ CONSTRAINT `suppinvstogrn_ibfk_2` FOREIGN KEY (`grnno`) REFERENCES `grns` (`grnno`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - +INSERT INTO scripts VALUES('EmailCustStatements.php','3','Email customer statement to customer'); -- Update version number: UPDATE config SET confvalue='4.13' WHERE confname='VersionNumber'; |
From: <ex...@us...> - 2015-10-06 12:36:29
|
Revision: 7365 http://sourceforge.net/p/web-erp/reponame/7365 Author: exsonqu Date: 2015-10-06 12:36:27 +0000 (Tue, 06 Oct 2015) Log Message: ----------- 06/10/15 UK-Steven: Contribute email customer statements feature scripts. Modified Paths: -------------- trunk/PrintCustStatements.php trunk/SelectCustomer.php Added Paths: ----------- trunk/EmailCustStatements.php Added: trunk/EmailCustStatements.php =================================================================== --- trunk/EmailCustStatements.php (rev 0) +++ trunk/EmailCustStatements.php 2015-10-06 12:36:27 UTC (rev 7365) @@ -0,0 +1,51 @@ +<?php + +/* $Id: EmailCustTrans.php 6310 2013-08-29 10:42:50Z daintree $*/ + +include ('includes/session.inc'); +include ('includes/SQL_CommonFunctions.inc'); +if (!isset($_GET['FromCust'])) { + $_GET['FromCust'] = $_SESSION['CustomerID']; +} +$Title=_('Email Customer Statement For Customer No.') . ' ' . $_GET['FromCust']; + +if (isset($_POST['DoIt']) AND IsEmailAddress($_POST['EmailAddr'])){ + echo '<meta http-equiv="Refresh" content="0; url=' . $RootPath . '/PrintCustStatements.php?FromCust=' . $_SESSION['CustomerID'] . '&ToCust='.$_SESSION['CustomerID'] . '&PrintPDF=Yes&Email=' . $_POST['EmailAddr'] . '">'; + prnMsg(_('The customer statement should have been emailed off') . '. ' . _('If this does not happen') . ' (' . _('if the browser does not support META Refresh') . ')' . '<a href="' . $RootPath . '/PrintCustStatements.php?FromCust=' . $_SESSION['CustomerID'] . '&PrintPDF=Yes&Email=' . $_POST['EmailAddr'] . '">' . _('click here') . '</a> ' . _('to email the customer statement'),'success'); + exit; +} elseif (isset($_POST['DoIt'])) { + prnMsg(_('The email address does not appear to be a valid email address. The statement was not emailed'),'warn'); +} +include ('includes/header.inc'); + +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; +echo '<div>'; +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; +echo '<br /><table>'; + +$SQL = "SELECT custbranch.email as email + FROM custbranch INNER JOIN debtorsmaster + ON custbranch.debtorno= debtorsmaster.debtorno + WHERE debtorsmaster.debtorno='" .$_SESSION['CustomerID'] . "' LIMIT 1"; + +$ErrMsg = _('There was a problem retrieving the contact details for the customer'); +$ContactResult=DB_query($SQL,$db,$ErrMsg); + +if (DB_num_rows($ContactResult)>0){ + $EmailAddrRow = DB_fetch_row($ContactResult); + $EmailAddress = $EmailAddrRow[0]; +} else { + $EmailAddress =''; +} + +echo '<tr><td>' . _('Email to') . ':</td> + <td><input type="email" name="EmailAddr" autofocus="autofocus" maxlength="60" size="60" value="' . $EmailAddress . '" /></td> + </tr> + </table>'; + +echo '<br /><div class="centre"><input type="submit" name="DoIt" value="' . _('OK') . '" />'; +echo '</div> + </div> + </form>'; +include ('includes/footer.inc'); +?> Modified: trunk/PrintCustStatements.php =================================================================== --- trunk/PrintCustStatements.php 2015-10-06 10:04:45 UTC (rev 7364) +++ trunk/PrintCustStatements.php 2015-10-06 12:36:27 UTC (rev 7365) @@ -7,7 +7,7 @@ $ViewTopic = 'ARReports'; $BookMark = 'CustomerStatements'; - +$Title = _('Print Customer Statements'); // If this file is called from another script, we set the required POST variables from the GET // We call this file from SelectCustomer.php when a customer is selected and we want a statement printed @@ -180,6 +180,8 @@ include('includes/PDFStatementPageHeader.inc'); + $Cust_Name = $StmtHeader['name']; + $Cust_No = $StmtHeader['debtorno']; if ($_SESSION['Show_Settled_LastMonth']==1){ if (DB_num_rows($SetldTrans)>=1) { @@ -434,8 +436,39 @@ } /* end loop to print statements */ if (isset($pdf)){ + if (isset($_GET['Email'])){ //email the invoice to address supplied + include ('includes/htmlMimeMail.php'); + $FileName = 'XXX_' . 'Statement_' . $Cust_No . '_' . $Cust_Name . '.pdf'; + $pdf->Output($FileName,'F'); + $mail = new htmlMimeMail(); - $pdf->OutputD($_SESSION['DatabaseName'] . '_CustStatements_' . date('Y-m-d') . '.pdf'); + $Attachment = $mail->getFile($FileName); + $mail->setText(_('Please find attached Statements') ); + $mail->SetSubject('Your Statement From XXX'); + $mail->addAttachment($Attachment, $FileName, 'application/pdf'); + if($_SESSION['SmtpSetting'] == 0){ + $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . ' <' . $_SESSION['CompanyRecord']['email'] . '>'); + $result = $mail->send(array($_GET['Email'])); + }else{ + $result = SendmailBySmtp($mail,array($_GET['Email'])); + } + + unlink($FileName); //delete the temporary file + + $Title = _('Emailing customer statements'); + include('includes/header.inc'); + echo '<p>' . _(' Customer statements has been emailed to') . ' ' . $_GET['Email']; + include('includes/footer.inc'); + exit; + + + } else { //its not an email just print the invoice to PDF + + $pdf->OutputD($_SESSION['DatabaseName'] . '_CustStatements_' . date('Y-m-d') . '.pdf'); + + + } + $pdf->__destruct(); } else { @@ -476,4 +509,4 @@ } /*end of else not PrintPDF */ -?> \ No newline at end of file +?> Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2015-10-06 10:04:45 UTC (rev 7364) +++ trunk/SelectCustomer.php 2015-10-06 12:36:27 UTC (rev 7365) @@ -222,6 +222,7 @@ echo '<a href="' . $RootPath . '/CustomerAccount.php?CustomerID=' . $_SESSION['CustomerID'] . '">' . _('Customer Account statement on screen') . '</a><br />'; echo '<a href="' . $RootPath . '/Customers.php?DebtorNo=' . $_SESSION['CustomerID'] . '&Modify=No">' . _('View Customer Details') . '</a><br />'; echo '<a href="' . $RootPath . '/PrintCustStatements.php?FromCust=' . $_SESSION['CustomerID'] . '&ToCust=' . $_SESSION['CustomerID'] . '&PrintPDF=Yes">' . _('Print Customer Statement') . '</a><br />'; + echo '<a href="' . $RootPath . '/EmailCustStatements.php?FromCust=' . $_SESSION['CustomerID'] . '&ToCust=' . $_SESSION['CustomerID'] . '&PrintPDF=Yes">' . _('Email Customer Statement') . '</a><br />'; echo '<a href="' . $RootPath . '/SelectCompletedOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'] . '">' . _('Order Inquiries') . '</a><br />'; echo '<a href="' . $RootPath . '/CustomerPurchases.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Show purchases from this customer') . '</a><br />'; wikiLink('Customer', $_SESSION['CustomerID']); |
From: <ex...@us...> - 2015-10-06 10:04:48
|
Revision: 7364 http://sourceforge.net/p/web-erp/reponame/7364 Author: exsonqu Date: 2015-10-06 10:04:45 +0000 (Tue, 06 Oct 2015) Log Message: ----------- Modified Paths: -------------- trunk/doc/Change.log Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-10-06 10:03:50 UTC (rev 7363) +++ trunk/doc/Change.log 2015-10-06 10:04:45 UTC (rev 7364) @@ -1,5 +1,6 @@ webERP Change Log +06/10/15 Exson: Fixed the wrong unable to identify the selected customer warning at SelectOrderItems.php. 23/09/2015 Tim: ADD invoice to grns mapping data in SupplierInvoice.php. 21/09/15 RChacon: In StockLocStatus.php, add current date and time, and format to use print.css. 21/09/15 Exson: Fix the wrong material cost updated in SupplierCredit.php. Reported by Akits. |
From: <ex...@us...> - 2015-10-06 10:03:53
|
Revision: 7363 http://sourceforge.net/p/web-erp/reponame/7363 Author: exsonqu Date: 2015-10-06 10:03:50 +0000 (Tue, 06 Oct 2015) Log Message: ----------- 06/10/15 Exson: Fixed the wrong unable to identify the selected customer warning at SelectOrderItems.php. Modified Paths: -------------- trunk/SelectOrderItems.php Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2015-09-30 12:36:52 UTC (rev 7362) +++ trunk/SelectOrderItems.php 2015-10-06 10:03:50 UTC (rev 7363) @@ -367,9 +367,9 @@ break; } } - if ($i==count($_POST)){ + if ($i==count($_POST) AND !isset($SelectedCustomer)){//if there is ONLY one customer searched at above, the $SelectedCustomer already setup, then there is a wrong warning prnMsg(_('Unable to identify the selected customer'),'error'); - } else { + } elseif(!isset($SelectedCustomer)) { $SelectedCustomer = $_POST['SelectedCustomer'.$i]; $SelectedBranch = $_POST['SelectedBranch'.$i]; } |
From: <te...@us...> - 2015-09-30 12:36:54
|
Revision: 7362 http://sourceforge.net/p/web-erp/reponame/7362 Author: tehonu Date: 2015-09-30 12:36:52 +0000 (Wed, 30 Sep 2015) Log Message: ----------- Clean up commented lines Modified Paths: -------------- trunk/MRPCreateDemands.php Modified: trunk/MRPCreateDemands.php =================================================================== --- trunk/MRPCreateDemands.php 2015-09-30 08:31:12 UTC (rev 7361) +++ trunk/MRPCreateDemands.php 2015-09-30 12:36:52 UTC (rev 7362) @@ -225,20 +225,6 @@ </td> </tr>'; -/* -echo '<tr><td>' . _('Inventory Category') . ':</td> - <td><select name="CategoryID">'; -echo '<option selected="selected" value="All">' . _('All Stock Categories') . '</option>'; -$sql = "SELECT categoryid, - categorydescription - FROM stockcategory"; -$result = DB_query($sql); -while ($myrow = DB_fetch_array($result)) { - echo '<option value="'. $myrow['categoryid'] . '">' . $myrow['categoryid'] . ' - ' .$myrow['categorydescription'] . '</option>'; -} //end while loop -echo '</select></td> - </tr>'; -*/ echo '<tr><td>' . _('Inventory Location') . ':</td> <td><select name="Location">'; echo '<option selected="selected" value="All">' . _('All Locations') . '</option>'; |
From: <te...@us...> - 2015-09-30 08:31:14
|
Revision: 7361 http://sourceforge.net/p/web-erp/reponame/7361 Author: tehonu Date: 2015-09-30 08:31:12 +0000 (Wed, 30 Sep 2015) Log Message: ----------- Allow selection of several stock categories Modified Paths: -------------- trunk/MRPCreateDemands.php Modified: trunk/MRPCreateDemands.php =================================================================== --- trunk/MRPCreateDemands.php 2015-09-28 00:57:25 UTC (rev 7360) +++ trunk/MRPCreateDemands.php 2015-09-30 08:31:12 UTC (rev 7361) @@ -46,10 +46,6 @@ prnMsg($msg,'error'); } - $WhereCategory = " "; - if ($_POST['CategoryID']!='All') { - $WhereCategory = " AND stockmaster.categoryid ='" . $_POST['CategoryID'] . "' "; - } $WhereLocation = " "; if ($_POST['Location']!='All') { $WhereLocation = " AND salesorders.fromstkloc ='" . $_POST['Location'] . "' "; @@ -67,7 +63,7 @@ WHERE orddate >='" . FormatDateForSQL($_POST['FromDate']) ."' AND orddate <='" . FormatDateForSQL($_POST['ToDate']) . "' " . $WhereLocation . " - " . $WhereCategory . " + AND stockmaster.categoryid IN ('". implode("','",$_POST['Categories'])."') AND stockmaster.discontinued = 0 AND salesorders.quotation=0 GROUP BY salesorderdetails.stkcode"; @@ -210,6 +206,26 @@ echo '<option value="' . $myrow['mrpdemandtype'] . '">' . $myrow['mrpdemandtype'] . ' - ' .$myrow['description'] . '</option>'; } //end while loop echo '</select></td></tr>'; + +echo '<tr> + <td>' . _('Inventory Categories') . ':</td> + <td><select autofocus="autofocus" required="required" minlength="1" size="12" name="Categories[]"multiple="multiple">'; + $SQL = 'SELECT categoryid, categorydescription + FROM stockcategory + ORDER BY categorydescription'; + $CatResult = DB_query($SQL); + while ($MyRow = DB_fetch_array($CatResult)) { + if (isset($_POST['Categories']) AND in_array($MyRow['categoryid'], $_POST['Categories'])) { + echo '<option selected="selected" value="' . $MyRow['categoryid'] . '">' . $MyRow['categorydescription'] .'</option>'; + } else { + echo '<option value="' . $MyRow['categoryid'] . '">' . $MyRow['categorydescription'] . '</option>'; + } + } + echo '</select> + </td> + </tr>'; + +/* echo '<tr><td>' . _('Inventory Category') . ':</td> <td><select name="CategoryID">'; echo '<option selected="selected" value="All">' . _('All Stock Categories') . '</option>'; @@ -222,6 +238,7 @@ } //end while loop echo '</select></td> </tr>'; +*/ echo '<tr><td>' . _('Inventory Location') . ':</td> <td><select name="Location">'; echo '<option selected="selected" value="All">' . _('All Locations') . '</option>'; |
From: <te...@us...> - 2015-09-28 00:57:27
|
Revision: 7360 http://sourceforge.net/p/web-erp/reponame/7360 Author: tehonu Date: 2015-09-28 00:57:25 +0000 (Mon, 28 Sep 2015) Log Message: ----------- Several fixes and add of logo (not labels can print company logo image) Modified Paths: -------------- trunk/Labels.php trunk/PDFPrintLabel.php Modified: trunk/Labels.php =================================================================== --- trunk/Labels.php 2015-09-23 13:53:26 UTC (rev 7359) +++ trunk/Labels.php 2015-09-28 00:57:25 UTC (rev 7360) @@ -6,7 +6,7 @@ $Title = _('Label Templates'); include('includes/header.inc'); -//define PaperSize array sizes in pdf points +//define PaperSize array sizes in mm $PaperSize = array(); $PaperSize['A4']['PageHeight'] = 297; $PaperSize['A4']['PageWidth'] = 210; @@ -114,7 +114,7 @@ echo '<p class="page_title_text"> <img src="'.$RootPath.'/css/'.$Theme.'/images/maintenance.png" title="' . _('Label Template Maintenance') - . '" alt="" />' . $Title . ' - ' . _('all measurements in PDF points') . + . '" alt="" />' . $Title . ' - ' . _('all measurements in mm.') . '</p>'; if (!function_exists('gd_info')) { @@ -591,6 +591,11 @@ } else { echo '<option value="price">' . _('Price') . '</option>'; } + if ($myrow['fieldvalue']=='logo'){ + echo '<option selected="selected" value="logo">' . _('Company Logo') . '</option>'; + } else { + echo '<option value="logo">' . _('Company Logo') . '</option>'; + } echo '</select></td> <td><input type="text" name="VPos' . $i . '" size="4" maxlength="4" value="' . $myrow['vpos'] . '" /></td> <td><input type="text" name="HPos' . $i . '" size="4" maxlength="4" value="' . $myrow['hpos'] . '" /></td> @@ -620,6 +625,7 @@ <option value="itemdescription">' . _('Item Descrption') . '</option> <option value="barcode">' . _('Item Barcode') . '</option> <option value="price">' . _('Price') . '</option> + <option value="logo">' . _('Company Logo') . '</option> </select></td> <td><input type="text" size="4" maxlength="4" name="VPos" /></td> <td><input type="text" size="4" maxlength="4" name="HPos" /></td> Modified: trunk/PDFPrintLabel.php =================================================================== --- trunk/PDFPrintLabel.php 2015-09-23 13:53:26 UTC (rev 7359) +++ trunk/PDFPrintLabel.php 2015-09-28 00:57:25 UTC (rev 7360) @@ -4,13 +4,11 @@ include('includes/session.inc'); include('includes/barcodepack/class.code128.php'); -$PtsPerMM = 2.83465; //pdf points per mm +$PtsPerMM = 2.83464567; //pdf points per mm (72 dpi / 25.4 mm per inch) if ((isset($_POST['ShowLabels']) OR isset($_POST['SelectAll'])) - AND isset($_POST['FromCriteria']) - AND mb_strlen($_POST['FromCriteria'])>=1 - AND isset($_POST['ToCriteria']) - AND mb_strlen($_POST['ToCriteria'])>=1){ + AND isset($_POST['StockCategory']) + AND mb_strlen($_POST['StockCategory'])>=1){ $Title = _('Print Labels'); include('includes/header.inc'); @@ -26,8 +24,7 @@ ON stockmaster.stockid=prices.stockid INNER JOIN currencies ON prices.currabrev=currencies.currabrev - WHERE stockmaster.categoryid >= '" . $_POST['FromCriteria'] . "' - AND stockmaster.categoryid <= '" . $_POST['ToCriteria'] . "' + WHERE stockmaster.categoryid = '" . $_POST['StockCategory'] . "' AND prices.typeabbrev='" . $_POST['SalesType'] . "' AND prices.currabrev='" . $_POST['Currency'] . "' AND prices.startdate<='" . FormatDateForSQL($_POST['EffectiveDate']) . "' @@ -98,8 +95,7 @@ echo '</table> <input type="hidden" name="NoOfLabels" value="' . $i . '" /> <input type="hidden" name="LabelID" value="' . $_POST['LabelID'] . '" /> - <input type="hidden" name="FromCriteria" value="' . $_POST['FromCriteria'] . '" /> - <input type="hidden" name="ToCriteria" value="' . $_POST['ToCriteria'] . '" /> + <input type="hidden" name="StockCategory" value="' . $_POST['StockCategory'] . '" /> <input type="hidden" name="SalesType" value="' . $_POST['SalesType'] . '" /> <input type="hidden" name="Currency" value="' . $_POST['Currency'] . '" /> <input type="hidden" name="EffectiveDate" value="' . $_POST['EffectiveDate'] . '" /> @@ -199,9 +195,8 @@ $NoOfLabels--; foreach ($LabelFields as $Field){ //print_r($Field); - if ($Field['FieldValue']== 'price'){ - $Value = $_POST['Price' . $i]; + $Value = $_POST['Price' . $i] . ' '. $_POST['Currency']; } elseif ($Field['FieldValue']== 'stockid'){ $Value = $_POST['StockID' . $i]; } elseif ($Field['FieldValue']== 'description'){ @@ -210,8 +205,12 @@ $Value = $_POST['Barcode' . $i]; } if ($Field['FieldValue'] == 'price'){ //need to format for the number of decimal places - $LeftOvers = $pdf->addTextWrap($XPos+$Field['HPos'],$YPos-$LabelDimensions['label_height']+$Field['VPos'],$LabelDimensions['label_width']-$Field['HPos'],$Field['FontSize'],$_POST['Price' . $i],'center'); - } elseif($Field['Barcode']==1) { +// $LeftOvers = $pdf->addTextWrap($XPos+$Field['HPos'],$YPos-$LabelDimensions['label_height']+$Field['VPos'],$LabelDimensions['label_width']-$Field['HPos'],$Field['FontSize'],$_POST['Price' . $i],'center'); + $LeftOvers = $pdf->addTextWrap($XPos+$Field['HPos'],$YPos-$LabelDimensions['label_height']+$Field['VPos'],$LabelDimensions['label_width']-$Field['HPos'],$Field['FontSize'],$Value); + }elseif ($Field['FieldValue'] == 'logo'){ + $pdf->addJpegFromFile($_SESSION['LogoFile'],$XPos+$Field['HPos'],$YPos-$LabelDimensions['label_height']+$Field['VPos'],'', $Field['FontSize']); + + }elseif($Field['Barcode']==1) { $BarcodeImage = new code128(str_replace('_','',$Value)); @@ -223,7 +222,7 @@ $pdf->addJpegFromFile('@' . $Image_String,$XPos+$Field['HPos'],$YPos-$LabelDimensions['label_height']+$Field['VPos'],'', $Field['FontSize']); } else { - $LeftOvers = $pdf->addTextWrap($XPos+$Field['HPos'],$YPos-$LabelDimensions['label_height']+$Field['VPos'],$LabelDimensions['label_width']-$Field['HPos']-20,$Field['FontSize'],$Value); + $LeftOvers = $pdf->addTextWrap($XPos+$Field['HPos'],$YPos-$LabelDimensions['label_height']+$Field['VPos'],$LabelDimensions['label_width']-$Field['HPos'],$Field['FontSize'],$Value); } } // end loop through label fields if ($NoOfLabels>0) { @@ -273,9 +272,9 @@ } - if (!isset($_POST['FromCriteria']) OR !isset($_POST['ToCriteria'])) { + if (!isset($_POST['StockCategory'])) { - /*if $FromCriteria is not set then show a form to allow input */ + /*if $StockCategory is not set then show a form to allow input */ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> @@ -291,26 +290,15 @@ echo '</select></td> </tr> <tr> - <td>' . _('From Inventory Category Code') .':</td> - <td><select name="FromCriteria">'; + <td>' . _('For Stock Category') .':</td> + <td><select name="StockCategory">'; - $CatResult= DB_query("SELECT categoryid, categorydescription FROM stockcategory ORDER BY categoryid"); + $CatResult= DB_query("SELECT categoryid, categorydescription FROM stockcategory ORDER BY categorydescription"); while ($myrow = DB_fetch_array($CatResult)){ - echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categoryid'] . ' - ' . $myrow['categorydescription'] . '</option>'; + echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } echo '</select></td></tr>'; - echo '<tr><td>' . _('To Inventory Category Code'). ':</td> - <td><select name="ToCriteria">'; - - /*Set the index for the categories result set back to 0 */ - DB_data_seek($CatResult,0); - - While ($myrow = DB_fetch_array($CatResult)){ - echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categoryid'] . ' - ' . $myrow['categorydescription'] . '</option>'; - } - echo '</select></td></tr>'; - echo '<tr><td>' . _('For Sales Type/Price List').':</td> <td><select name="SalesType">'; $sql = "SELECT sales_type, typeabbrev FROM salestypes"; |
From: <ex...@us...> - 2015-09-23 13:53:28
|
Revision: 7359 http://sourceforge.net/p/web-erp/reponame/7359 Author: exsonqu Date: 2015-09-23 13:53:26 +0000 (Wed, 23 Sep 2015) Log Message: ----------- 23/09/2015 Tim: ADD invoice to grns mapping data in SupplierInvoice.php. Modified Paths: -------------- trunk/sql/mysql/upgrade4.12.3-4.13.sql Modified: trunk/sql/mysql/upgrade4.12.3-4.13.sql =================================================================== --- trunk/sql/mysql/upgrade4.12.3-4.13.sql 2015-09-23 13:53:01 UTC (rev 7358) +++ trunk/sql/mysql/upgrade4.12.3-4.13.sql 2015-09-23 13:53:26 UTC (rev 7359) @@ -12,6 +12,16 @@ ('AnalysisHorizontalIncome.php', '8', 'Shows the horizontal analysis of the statement of comprehensive income'), ('AnalysisHorizontalPosition.php', '8', 'Shows the horizontal analysis of the statement of financial position'); +CREATE TABLE `suppinvstogrn` ( + `suppinv` int(11) NOT NULL, + `grnno` int(11) NOT NULL, + PRIMARY KEY (`suppinv`,`grnno`), + KEY `suppinvstogrn_ibfk_2` (`grnno`), + CONSTRAINT `suppinvstogrn_ibfk_1` FOREIGN KEY (`suppinv`) REFERENCES +`supptrans` (`id`), + CONSTRAINT `suppinvstogrn_ibfk_2` FOREIGN KEY (`grnno`) REFERENCES +`grns` (`grnno`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- Update version number: UPDATE config SET confvalue='4.13' WHERE confname='VersionNumber'; |
From: <ex...@us...> - 2015-09-23 13:53:04
|
Revision: 7358 http://sourceforge.net/p/web-erp/reponame/7358 Author: exsonqu Date: 2015-09-23 13:53:01 +0000 (Wed, 23 Sep 2015) Log Message: ----------- Modified Paths: -------------- trunk/doc/Change.log Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-09-23 13:51:07 UTC (rev 7357) +++ trunk/doc/Change.log 2015-09-23 13:53:01 UTC (rev 7358) @@ -1,5 +1,6 @@ webERP Change Log +23/09/2015 Tim: ADD invoice to grns mapping data in SupplierInvoice.php. 21/09/15 RChacon: In StockLocStatus.php, add current date and time, and format to use print.css. 21/09/15 Exson: Fix the wrong material cost updated in SupplierCredit.php. Reported by Akits. 19/9/15 Dongbak Cha:Korean translation via Google translate |
From: <ex...@us...> - 2015-09-23 13:51:10
|
Revision: 7357 http://sourceforge.net/p/web-erp/reponame/7357 Author: exsonqu Date: 2015-09-23 13:51:07 +0000 (Wed, 23 Sep 2015) Log Message: ----------- 23/09/2015 Tim: ADD invoice to grns mapping data in SupplierInvoice.php. Modified Paths: -------------- trunk/SupplierInvoice.php Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2015-09-21 17:30:10 UTC (rev 7356) +++ trunk/SupplierInvoice.php 2015-09-23 13:51:07 UTC (rev 7357) @@ -1546,6 +1546,13 @@ $DbgMsg = _('The following SQL to update the GRN quantity invoiced was used'); $Result = DB_query($SQL, $ErrMsg, $DbgMsg, True); + $SQL = "INSERT INTO suppinvstogrn VALUES ('" . $InvoiceNo . "', + '" .$EnteredGRN->GRNNo . "')"; + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The invoice could not be mapped to the + goods received record because'); + $DbgMsg = _('The following SQL to map the invoice to the GRN was used'); + $Result = DB_query($SQL, $ErrMsg, $DbgMsg, True); + if (mb_strlen($EnteredGRN->ShiptRef)>0 AND $EnteredGRN->ShiptRef != '0'){ /* insert the shipment charge records */ $SQL = "INSERT INTO shipmentcharges (shiptref, |
From: <rc...@us...> - 2015-09-21 17:30:12
|
Revision: 7356 http://sourceforge.net/p/web-erp/reponame/7356 Author: rchacon Date: 2015-09-21 17:30:10 +0000 (Mon, 21 Sep 2015) Log Message: ----------- In StockLocStatus.php, add current date and time, and format to use print.css. Modified Paths: -------------- trunk/StockLocStatus.php trunk/doc/Change.log trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po Modified: trunk/StockLocStatus.php =================================================================== --- trunk/StockLocStatus.php 2015-09-21 02:01:53 UTC (rev 7355) +++ trunk/StockLocStatus.php 2015-09-21 17:30:10 UTC (rev 7356) @@ -1,17 +1,23 @@ <?php - /* $Id$*/ +/* Shows the stock on hand together with outstanding sales orders and outstanding purchase orders by stock location for all items in the selected stock category */ include('includes/session.inc'); - $Title = _('All Stock Status By Location/Category'); +$ViewTopic = 'Inventory'; +$BookMark = 'StockLocStatus'; +include('includes/header.inc'); -include('includes/header.inc'); +echo '<p class="page_title_text"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/magnifier.png" title="',// Icon image. + $Title, '" /> ',// Icon title. + $Title, '</p>';// Page title. + include ('includes/SQL_CommonFunctions.inc'); -if (isset($_GET['StockID'])){ +if(isset($_GET['StockID'])) { $StockID = trim(mb_strtoupper($_GET['StockID'])); -} elseif (isset($_POST['StockID'])){ +} elseif(isset($_POST['StockID'])) { $StockID = trim(mb_strtoupper($_POST['StockID'])); } @@ -19,28 +25,24 @@ echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -$sql = "SELECT locations.loccode, - locationname - FROM locations - INNER JOIN locationusers ON locationusers.loccode=locations.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canview=1"; +$sql = "SELECT locations.loccode, locationname + FROM locations + INNER JOIN locationusers ON locationusers.loccode=locations.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canview=1"; $resultStkLocs = DB_query($sql); -echo '<p class="page_title_text"> - <img src="' . $RootPath . '/css/' . $Theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . $Title.' - </p>'; - echo '<table class="selection"> <tr> <td>' . _('From Stock Location') . ':</td> <td><select name="StockLocation"> '; -while ($myrow=DB_fetch_array($resultStkLocs)){ - if (isset($_POST['StockLocation']) AND $_POST['StockLocation']!='All'){ - if ($myrow['loccode'] == $_POST['StockLocation']){ - echo '<option selected="selected" value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + +while($myrow=DB_fetch_array($resultStkLocs)) { + if(isset($_POST['StockLocation']) AND $_POST['StockLocation']!='All') { + if($myrow['loccode'] == $_POST['StockLocation']) { + echo '<option selected="selected" value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } - } elseif ($myrow['loccode']==$_SESSION['UserStockLocation']){ + } elseif($myrow['loccode']==$_SESSION['UserStockLocation']) { echo '<option selected="selected" value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; $_POST['StockLocation']=$myrow['loccode']; } else { @@ -55,7 +57,7 @@ FROM stockcategory ORDER BY categorydescription"; $result1 = DB_query($SQL); -if (DB_num_rows($result1)==0){ +if(DB_num_rows($result1)==0) { echo '</table><p>'; prnMsg(_('There are no stock categories currently defined please use the link below to set them up'),'warn'); echo '<br /><a href="' . $RootPath . '/StockCategories.php">' . _('Define Stock Categories') . '</a>'; @@ -65,16 +67,16 @@ echo '<tr><td>' . _('In Stock Category') . ':</td> <td><select name="StockCat">'; -if (!isset($_POST['StockCat'])){ +if(!isset($_POST['StockCat'])) { $_POST['StockCat']='All'; } -if ($_POST['StockCat']=='All'){ +if($_POST['StockCat']=='All') { echo '<option selected="selected" value="All">' . _('All') . '</option>'; } else { echo '<option value="All">' . _('All') . '</option>'; } -while ($myrow1 = DB_fetch_array($result1)) { - if ($myrow1['categoryid']==$_POST['StockCat']){ +while($myrow1 = DB_fetch_array($result1)) { + if($myrow1['categoryid']==$_POST['StockCat']) { echo '<option selected="selected" value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } else { echo '<option value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; @@ -85,42 +87,42 @@ echo '<tr><td>' . _('Shown Only Items Where') . ':</td> <td><select name="BelowReorderQuantity">'; -if (!isset($_POST['BelowReorderQuantity'])){ +if(!isset($_POST['BelowReorderQuantity'])) { $_POST['BelowReorderQuantity']='All'; } -if ($_POST['BelowReorderQuantity']=='All'){ +if($_POST['BelowReorderQuantity']=='All') { echo '<option selected="selected" value="All">' . _('All') . '</option> - <option value="Below">' . _('Only items below re-order quantity') . '</option> - <option value="NotZero">' . _('Only items where stock is available') . '</option> - <option value="OnOrder">' . _('Only items currently on order') . '</option>'; -} else if ($_POST['BelowReorderQuantity']=='Below') { + <option value="Below">' . _('Only items below re-order quantity') . '</option> + <option value="NotZero">' . _('Only items where stock is available') . '</option> + <option value="OnOrder">' . _('Only items currently on order') . '</option>'; +} else if($_POST['BelowReorderQuantity']=='Below') { echo '<option value="All">' . _('All') . '</option> - <option selected="selected" value="Below">' . _('Only items below re-order quantity') . '</option> - <option value="NotZero">' . _('Only items where stock is available') . '</option> - <option value="OnOrder">' . _('Only items currently on order') . '</option>'; -} else if ($_POST['BelowReorderQuantity']=='OnOrder') { - echo '<option value="All">' . _('All') . '</option> - <option value="Below">' . _('Only items below re-order quantity') . '</option> - <option value="NotZero">' . _('Only items where stock is available') . '</option> - <option selected="selected" value="OnOrder">' . _('Only items currently on order') . '</option>'; -} else { + <option selected="selected" value="Below">' . _('Only items below re-order quantity') . '</option> + <option value="NotZero">' . _('Only items where stock is available') . '</option> + <option value="OnOrder">' . _('Only items currently on order') . '</option>'; +} else if($_POST['BelowReorderQuantity']=='OnOrder') { echo '<option value="All">' . _('All') . '</option> - <option value="Below">' . _('Only items below re-order quantity') . '</option> - <option selected="selected" value="NotZero">' . _('Only items where stock is available') . '</option> - <option value="OnOrder">' . _('Only items currently on order') . '</option>'; + <option value="Below">' . _('Only items below re-order quantity') . '</option> + <option value="NotZero">' . _('Only items where stock is available') . '</option> + <option selected="selected" value="OnOrder">' . _('Only items currently on order') . '</option>'; +} else { + echo '<option value="All">' . _('All') . '</option> + <option value="Below">' . _('Only items below re-order quantity') . '</option> + <option selected="selected" value="NotZero">' . _('Only items where stock is available') . '</option> + <option value="OnOrder">' . _('Only items currently on order') . '</option>'; } echo '</select></td></tr> - </table>'; + </table>'; echo '<br /> - <div class="centre"> - <input type="submit" name="ShowStatus" value="' . _('Show Stock Status') . '" /> - </div>'; + <div class="centre noprint"> + <input name="ShowStatus" type="submit" value="', _('Show Stock Status'), '" /> + </div>'; -if (isset($_POST['ShowStatus'])){ +if(isset($_POST['ShowStatus'])) { - if ($_POST['StockCat']=='All') { + if($_POST['StockCat']=='All') { $sql = "SELECT locstock.stockid, stockmaster.description, locstock.loccode, @@ -161,44 +163,44 @@ ORDER BY locstock.stockid"; } - $ErrMsg = _('The stock held at each location cannot be retrieved because'); + $ErrMsg = _('The stock held at each location cannot be retrieved because'); $DbgMsg = _('The SQL that failed was'); $LocStockResult = DB_query($sql, $ErrMsg, $DbgMsg); - echo '<br /> - <table cellpadding="5" cellspacing="4" class="selection">'; - $TableHeader = '<tr> - <th>' . _('StockID') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('Quantity On Hand') . '</th> - <th>' . _('Bin Loc') . '</th> - <th>' . _('Re-Order Level') . '</th> - <th>' . _('Demand') . '</th> - <th>' . _('Available') . '</th> - <th>' . _('On Order') . '</th> - </tr>'; - echo $TableHeader; + echo '<br />', DisplayDateTime(), // Display current date and time. + '<br /> + <table cellpadding="5" cellspacing="4" class="selection"> + <tr> + <th>', _('StockID'), '</th> + <th class="text">', _('Description'), '</th> + <th class="number">', _('Quantity On Hand'), '</th> + <th>', _('Bin Loc'), '</th> + <th class="number">', _('Re-Order Level'), '</th> + <th class="number">', _('Demand'), '</th> + <th class="number">', _('Available'), '</th> + <th class="number">', _('On Order'), '</th> + </tr>'; $k=0; //row colour counter - while ($myrow=DB_fetch_array($LocStockResult)) { + while($myrow=DB_fetch_array($LocStockResult)) { $StockID = $myrow['stockid']; $sql = "SELECT SUM(salesorderdetails.quantity-salesorderdetails.qtyinvoiced) AS dem - FROM salesorderdetails INNER JOIN salesorders - ON salesorders.orderno = salesorderdetails.orderno - WHERE salesorders.fromstkloc='" . $myrow['loccode'] . "' - AND salesorderdetails.completed=0 - AND salesorderdetails.stkcode='" . $StockID . "' - AND salesorders.quotation=0"; + FROM salesorderdetails INNER JOIN salesorders + ON salesorders.orderno = salesorderdetails.orderno + WHERE salesorders.fromstkloc='" . $myrow['loccode'] . "' + AND salesorderdetails.completed=0 + AND salesorderdetails.stkcode='" . $StockID . "' + AND salesorders.quotation=0"; $ErrMsg = _('The demand for this product from') . ' ' . $myrow['loccode'] . ' ' . _('cannot be retrieved because'); $DemandResult = DB_query($sql,$ErrMsg); - if (DB_num_rows($DemandResult)==1){ + if(DB_num_rows($DemandResult)==1) { $DemandRow = DB_fetch_row($DemandResult); - $DemandQty = $DemandRow[0]; + $DemandQty = $DemandRow[0]; } else { $DemandQty =0; } @@ -206,11 +208,11 @@ //Also need to add in the demand as a component of an assembly items if this items has any assembly parents. $sql = "SELECT SUM((salesorderdetails.quantity-salesorderdetails.qtyinvoiced)*bom.quantity) AS dem FROM salesorderdetails INNER JOIN salesorders - ON salesorders.orderno = salesorderdetails.orderno - INNER JOIN bom - ON salesorderdetails.stkcode=bom.parent + ON salesorders.orderno = salesorderdetails.orderno + INNER JOIN bom + ON salesorderdetails.stkcode=bom.parent INNER JOIN stockmaster - ON stockmaster.stockid=bom.parent + ON stockmaster.stockid=bom.parent WHERE salesorders.fromstkloc='" . $myrow['loccode'] . "' AND salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0 AND bom.component='" . $StockID . "' @@ -220,21 +222,21 @@ $ErrMsg = _('The demand for this product from') . ' ' . $myrow['loccode'] . ' ' . _('cannot be retrieved because'); $DemandResult = DB_query($sql, $ErrMsg); - if (DB_num_rows($DemandResult)==1){ + if(DB_num_rows($DemandResult)==1) { $DemandRow = DB_fetch_row($DemandResult); $DemandQty += $DemandRow[0]; } $sql = "SELECT SUM((woitems.qtyreqd-woitems.qtyrecd)*bom.quantity) AS dem FROM workorders INNER JOIN woitems - ON woitems.wo = workorders.wo - INNER JOIN bom - ON woitems.stockid = bom.parent + ON woitems.wo = workorders.wo + INNER JOIN bom + ON woitems.stockid = bom.parent WHERE workorders.closed=0 - AND bom.component = '". $StockID . "' - AND workorders.loccode='". $myrow['loccode'] ."'"; + AND bom.component = '". $StockID . "' + AND workorders.loccode='". $myrow['loccode'] ."'"; $DemandResult = DB_query($sql, $ErrMsg); - if (DB_num_rows($DemandResult)==1){ + if(DB_num_rows($DemandResult)==1) { $DemandRow = DB_fetch_row($DemandResult); $DemandQty += $DemandRow[0]; } @@ -244,13 +246,13 @@ // Get the QOO dues to Work Orders for all locations. Function defined in SQL_CommonFunctions.inc $QOO += GetQuantityOnOrderDueToWorkOrders($StockID, $myrow['loccode']); - if (($_POST['BelowReorderQuantity']=='Below' AND ($myrow['quantity']-$myrow['reorderlevel']-$DemandQty)<0) + if(($_POST['BelowReorderQuantity']=='Below' AND ($myrow['quantity']-$myrow['reorderlevel']-$DemandQty)<0) OR $_POST['BelowReorderQuantity']=='All' OR $_POST['BelowReorderQuantity']=='NotZero' - OR ($_POST['BelowReorderQuantity']=='OnOrder' AND $QOO != 0)){ + OR ($_POST['BelowReorderQuantity']=='OnOrder' AND $QOO != 0)) { - if (($_POST['BelowReorderQuantity']=='NotZero') AND (($myrow['quantity']-$DemandQty)>0)) { + if(($_POST['BelowReorderQuantity']=='NotZero') AND (($myrow['quantity']-$DemandQty)>0)) { - if ($k==1){ + if($k==1) { echo '<tr class="OddTableRows">'; $k=0; } else { @@ -259,33 +261,33 @@ } $tr = ($myrow['serialised'] or $myrow['controlled'])?'':'<tr>'; printf('<td><a target="_blank" href="' . $RootPath . '/StockStatus.php?StockID=%s">%s</a></td> - <td>%s</td> - <td class="number">%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number"><a target="_blank" href="' . $RootPath . '/SelectProduct.php?StockID=%s">%s</a></td> - <td class="number">%s</td> - ' . $tr, - mb_strtoupper($myrow['stockid']), - mb_strtoupper($myrow['stockid']), - $myrow['description'], - locale_number_format($myrow['quantity'],$myrow['decimalplaces']), - $myrow['bin'], - locale_number_format($myrow['reorderlevel'],$myrow['decimalplaces']), - locale_number_format($DemandQty,$myrow['decimalplaces']), - mb_strtoupper($myrow['stockid']), - locale_number_format($myrow['quantity'] - $DemandQty,$myrow['decimalplaces']), - locale_number_format($QOO,$myrow['decimalplaces'])); + <td class="text">%s</td> + <td class="number">%s</td> + <td>%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number"><a target="_blank" href="' . $RootPath . '/SelectProduct.php?StockID=%s">%s</a></td> + <td class="number">%s</td> + ' . $tr, + mb_strtoupper($myrow['stockid']), + mb_strtoupper($myrow['stockid']), + $myrow['description'], + locale_number_format($myrow['quantity'],$myrow['decimalplaces']), + $myrow['bin'], + locale_number_format($myrow['reorderlevel'],$myrow['decimalplaces']), + locale_number_format($DemandQty,$myrow['decimalplaces']), + mb_strtoupper($myrow['stockid']), + locale_number_format($myrow['quantity'] - $DemandQty,$myrow['decimalplaces']), + locale_number_format($QOO,$myrow['decimalplaces'])); - if ($myrow['serialised'] ==1){ /*The line is a serialised item*/ + if($myrow['serialised'] ==1) { /*The line is a serialised item*/ echo '<td><a target="_blank" href="' . $RootPath . '/StockSerialItems.php?Serialised=Yes&Location=' . $myrow['loccode'] . '&StockID=' . $StockID . '">' . _('Serial Numbers') . '</a></td></tr>'; - } elseif ($myrow['controlled']==1){ + } elseif($myrow['controlled']==1) { echo '<td><a target="_blank" href="' . $RootPath . '/StockSerialItems.php?Location=' . $myrow['loccode'] . '&StockID=' . $StockID . '">' . _('Batches') . '</a></td></tr>'; } - } else if ($_POST['BelowReorderQuantity']!='NotZero') { - if ($k==1){ + } else if($_POST['BelowReorderQuantity']!='NotZero') { + if($k==1) { echo '<tr class="OddTableRows">'; $k=0; } else { @@ -310,10 +312,10 @@ mb_strtoupper($myrow['stockid']), locale_number_format($myrow['quantity'] - $DemandQty,$myrow['decimalplaces']), locale_number_format($QOO,$myrow['decimalplaces'])); - if ($myrow['serialised'] ==1){ /*The line is a serialised item*/ + if($myrow['serialised'] ==1) { /*The line is a serialised item*/ echo '<td><a target="_blank" href="' . $RootPath . '/StockSerialItems.php?Serialised=Yes&Location=' . $myrow['loccode'] . '&StockID=' . $StockID . '">' . _('Serial Numbers') . '</a></td></tr>'; - } elseif ($myrow['controlled']==1){ + } elseif($myrow['controlled']==1) { echo '<td><a target="_blank" href="' . $RootPath . '/StockSerialItems.php?Location=' . $myrow['loccode'] . '&StockID=' . $StockID . '">' . _('Batches') . '</a></td></tr>'; } } //end of page full new headings if @@ -325,6 +327,6 @@ } /* Show status button hit */ echo '</div> </form>'; + include('includes/footer.inc'); - ?> Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-09-21 02:01:53 UTC (rev 7355) +++ trunk/doc/Change.log 2015-09-21 17:30:10 UTC (rev 7356) @@ -1,5 +1,7 @@ webERP Change Log -21/09/15 Exson: Fix the wrong material cost updated in SupplierCredit.php. Reported by Akits. + +21/09/15 RChacon: In StockLocStatus.php, add current date and time, and format to use print.css. +21/09/15 Exson: Fix the wrong material cost updated in SupplierCredit.php. Reported by Akits. 19/9/15 Dongbak Cha:Korean translation via Google translate 14/9/15 RChacon: Rebuild languages files *.pot, *.po and *.mo to includes new texts. 14/9/15 RChacon: In AnalysisHorizontalIncome.php, delete duplicated tag. Replaces text "Absolute/Relative variation" with "Absolute/Relative difference" to avoid confusions. Modified: trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po 2015-09-21 02:01:53 UTC (rev 7355) +++ trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po 2015-09-21 17:30:10 UTC (rev 7356) @@ -8,7 +8,7 @@ "Project-Id-Version: webERP 4.12.2\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-09-14 09:07-0600\n" -"PO-Revision-Date: 2015-09-14 10:03-0600\n" +"PO-Revision-Date: 2015-09-21 09:50-0600\n" "Last-Translator: Rafael Chacon <raf...@gm...>\n" "Language-Team: TecnoSoluciones.com <web...@te...>\n" "Language: es_ES\n" @@ -1488,7 +1488,7 @@ #: AnalysisHorizontalIncome.php:105 AnalysisHorizontalPosition.php:72 msgid "Detail or summary" -msgstr "" +msgstr "Detalle o resumen" #: AnalysisHorizontalIncome.php:106 AnalysisHorizontalPosition.php:73 #: GLBalanceSheet.php:60 @@ -1510,7 +1510,7 @@ #: AnalysisHorizontalIncome.php:112 AnalysisHorizontalPosition.php:79 msgid "Show all accounts including zero balances" -msgstr "" +msgstr "Mostrar todas las cuentas incluyendo saldos en cero" #: AnalysisHorizontalIncome.php:113 AnalysisHorizontalPosition.php:80 #: GLBalanceSheet.php:67 GLProfit_Loss.php:116 @@ -1525,14 +1525,14 @@ #: AnalysisHorizontalPosition.php:85 AnalysisHorizontalPosition.php:86 #: GLBalanceSheet.php:73 GLProfit_Loss.php:121 msgid "Show on Screen (HTML)" -msgstr "Mostrar en Pantalla (HTML)" +msgstr "Mostrar en pantalla (HTML)" #: AnalysisHorizontalIncome.php:121 AnalysisHorizontalIncome.php:521 #: AnalysisHorizontalPosition.php:88 AnalysisHorizontalPosition.php:370 #: DailyBankTransactions.php:190 GLBalanceSheet.php:718 GLProfit_Loss.php:1315 #: GLTrialBalance.php:736 msgid "Return" -msgstr "" +msgstr "Regresar" #: AnalysisHorizontalIncome.php:131 GLProfit_Loss.php:147 #: GLProfit_Loss.php:576 GLTagProfit_Loss.php:155 GLTagProfit_Loss.php:479 @@ -1678,7 +1678,7 @@ #: AnalysisHorizontalIncome.php:500 msgid "Net Profit" -msgstr "" +msgstr "Utilidad neta" #: AnalysisHorizontalIncome.php:517 AnalysisHorizontalPosition.php:366 #: DailyBankTransactions.php:184 GLBalanceSheet.php:714 GLProfit_Loss.php:1311 @@ -1693,7 +1693,7 @@ #: GLTrialBalance.php:733 GLTrialBalance.php:734 SalesGraph.php:20 #: SalesGraph.php:29 SalesGraph.php:34 msgid "Select A Different Period" -msgstr "Seleccione un Período distinto" +msgstr "Seleccione un período distinto" #: AnalysisHorizontalPosition.php:15 AnalysisHorizontalPosition.php:28 #: AnalysisHorizontalPosition.php:109 AnalysisHorizontalPosition.php:110 @@ -2836,7 +2836,7 @@ #: BOMs.php:452 msgid "Select a Different BOM" -msgstr "Seleccione una HCM diferente" +msgstr "Seleccione una HCM distinta" #: BOMs.php:468 msgid "Manufactured parent items" @@ -11355,7 +11355,7 @@ #: DeliveryDetails.php:844 msgid "Select A Different Order" -msgstr "Seleccione una Pedidos Diferente" +msgstr "Seleccione una orden distinta" #: DeliveryDetails.php:856 GoodsReceived.php:109 Shipments.php:489 #: SpecialOrder.php:627 @@ -19130,7 +19130,7 @@ #: PDFCustomerList.php:391 msgid "All sales folk" -msgstr "Todo el equipo de ventas" +msgstr "Todos los vendedores" #: PDFCustomerList.php:401 msgid "Level Of Activity" @@ -20252,7 +20252,7 @@ #: PDFStockLocTransfer.php:5 msgid "Stock Location Transfer Docket Error" -msgstr "Error de Expediente de Transferencia de Ubicación de Existencia" +msgstr "Error de Expediente de Transferencia de ubicación de inventario" #: PDFStockLocTransfer.php:17 msgid "Reprint transfer docket" @@ -22952,7 +22952,7 @@ #: PcReportTab.php:409 msgid "Select A Different Date" -msgstr "Seleccione una Fecha distinta" +msgstr "Seleccione una fecha distinta" #: PcTabs.php:5 msgid "Maintenance Of Petty Cash Tabs" @@ -25458,7 +25458,7 @@ #: StockLocMovements.php:19 StockLocStatus.php:34 StockLocTransfer.php:260 #: StockMovements.php:38 StockTransfers.php:576 StockUsage.php:66 msgid "From Stock Location" -msgstr "Desde la localización de existencias" +msgstr "Desde la ubicación de inventario" #: ReorderLevel.php:303 WOCanBeProducedNow.php:50 msgid "Needed" @@ -26930,7 +26930,7 @@ #: SalesInquiry.php:1188 msgid "All Salesmen" -msgstr "Todos los Vendedores" +msgstr "Todos los vendedores" #: SalesInquiry.php:1217 msgid "Transaction Number sort only valid for Invoice Date Type" @@ -29470,7 +29470,7 @@ #: Shipments.php:353 msgid "Stock Location" -msgstr "Ubicación de existencia" +msgstr "Ubicación de inventario" #: Shipments.php:394 msgid "Order Lines On This Shipment" @@ -29809,7 +29809,7 @@ #: ShopParameters.php:319 msgid "Stock Locations" -msgstr "Ubicaciones de inventarios" +msgstr "Ubicaciones de inventario" #: ShopParameters.php:330 msgid "" @@ -30174,7 +30174,7 @@ #: SpecialOrder.php:442 msgid "The item stock locations for the special order line" msgstr "" -"Las ubicaciones de existencias del artículo para la fila del pedido especial" +"Las ubicaciones de inventario del artículo para la fila del pedido especial" #: SpecialOrder.php:443 msgid "" @@ -31612,7 +31612,7 @@ #: StockLocStatus.php:7 msgid "All Stock Status By Location/Category" -msgstr "Todos los Estados de Existencias por Ubicación/Categoría" +msgstr "Todos los estados de inventario por ubicación/categoría" #: StockLocStatus.php:86 msgid "Shown Only Items Where" @@ -32001,7 +32001,7 @@ #: StockLocTransferReceive.php:614 msgid "Select A Different Transfer" -msgstr "Seleccione una transferencia diferente" +msgstr "Seleccione una transferencia distinta" #: StockLocTransferReceive.php:628 msgid "Select Location Receiving Into" @@ -37607,7 +37607,7 @@ #: TaxProvinces.php:129 msgid "stock locations that refer to this tax province" -msgstr "Ubicaciones de Almacenes en esta jurisdicción fiscal" +msgstr "Ubicaciones de inventario en esta jurisdicción fiscal" #: TaxProvinces.php:135 msgid "tax province and any tax rates set for it have been deleted" @@ -39603,7 +39603,7 @@ #: WorkOrderReceive.php:757 msgid "Select a different work order for receiving finished stock against" msgstr "" -"Seleccione una orden de trabajo diferente para la recepción de existencias " +"Seleccione una orden de trabajo distinta para la recepción de existencias " "terminadas en contra de" #: WorkOrderReceive.php:816 @@ -39877,7 +39877,7 @@ #: Z_ChangeBranchCode.php:217 msgid "New Branch Code" -msgstr "Nuevo Código de sucursal" +msgstr "Nuevo código de sucursal" #: Z_ChangeCustomerCode.php:6 msgid "UTILITY PAGE To Changes A Customer Code In All Tables" @@ -45109,7 +45109,7 @@ #: api/api_xml-rpc.php:1507 msgid "Stock Location Code" -msgstr "Código de Ubicación de Existencia" +msgstr "Código de ubicación de inventario" #: api/api_xml-rpc.php:1508 msgid "A stock location code as returned by the GetLocationList function." @@ -46269,7 +46269,7 @@ #: includes/PDFCustomerListPageHeader.inc:43 msgid "All Salespeople" -msgstr "Todos los Vendedores" +msgstr "Todos los vendedores" #: includes/PDFCustomerListPageHeader.inc:48 msgid "Salespeople" @@ -49409,7 +49409,7 @@ #: includes/MainMenuLinksArray.php:225 msgid "Reprint GRN" -msgstr "Reimprimir" +msgstr "Reimprimir " #: includes/MainMenuLinksArray.php:226 msgid "Inventory Item Movements" @@ -50559,7 +50559,7 @@ #: reportwriter/languages/en_US/reports.php:91 msgid "Reports" -msgstr "" +msgstr "Informes" #: reportwriter/languages/en_US/reports.php:94 msgid "Second" @@ -50575,7 +50575,7 @@ #: reportwriter/languages/en_US/reports.php:97 msgid "Select a field..." -msgstr "" +msgstr "Seleccione un campo..." #: reportwriter/languages/en_US/reports.php:99 msgid "Sixth" @@ -50607,7 +50607,7 @@ #: reportwriter/languages/en_US/reports.php:117 msgid "Report/Form: " -msgstr "" +msgstr "Informe/Formulario:" #: reportwriter/languages/en_US/reports.php:118 msgid "Report and Form Builder - " @@ -50639,7 +50639,7 @@ #: reportwriter/languages/en_US/reports.php:125 msgid "Reports Menu" -msgstr "" +msgstr "Menú de informes" #: reportwriter/languages/en_US/reports.php:126 #: reportwriter/languages/en_US/reports.php:139 @@ -50967,11 +50967,11 @@ #: reportwriter/languages/en_US/reports.php:222 msgid "Report Title 1" -msgstr "" +msgstr "Título 1 del informe" #: reportwriter/languages/en_US/reports.php:223 msgid "Report Title 2" -msgstr "" +msgstr "Título 2 del informe" #: reportwriter/languages/en_US/reports.php:224 msgid "Report Data" @@ -50979,7 +50979,7 @@ #: reportwriter/languages/en_US/reports.php:225 msgid "Report/Form Identification" -msgstr "" +msgstr "Identificación de informe/Formulario" #: reportwriter/languages/en_US/reports.php:226 msgid "Report Import" @@ -51015,7 +51015,7 @@ #: reportwriter/languages/en_US/reports.php:234 msgid "Report Totals" -msgstr "" +msgstr "Totales del informe" #: reportwriter/languages/en_US/reports.php:235 msgid "Enter fields to total (Table.Fieldname)" |