From: <dai...@us...> - 2010-08-21 04:53:57
|
Revision: 3696 http://web-erp.svn.sourceforge.net/web-erp/?rev=3696&view=rev Author: daintree Date: 2010-08-21 04:53:42 +0000 (Sat, 21 Aug 2010) Log Message: ----------- Paul Thursby cleanup of msg replaced with prnMsg Modified Paths: -------------- trunk/BOMInquiry.php trunk/BOMs.php trunk/ContractBOM.php trunk/CustLoginSetup.php trunk/FixedAssetJournal.php trunk/GLJournal.php trunk/GeocodeSetup.php trunk/MRPReport.php trunk/PO_Items.php trunk/Payments.php trunk/PurchData.php trunk/SelectAssetType.php trunk/SelectCreditItems.php trunk/SelectSupplier.php trunk/SuppLoginSetup.php trunk/SupplierTenders.php trunk/WWW_Users.php trunk/build/make_release.sh trunk/doc/Change.log.html trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.mo trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.mo trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.mo trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po trunk/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Modified: trunk/BOMInquiry.php =================================================================== --- trunk/BOMInquiry.php 2010-08-18 19:26:27 UTC (rev 3695) +++ trunk/BOMInquiry.php 2010-08-21 04:53:42 UTC (rev 3696) @@ -32,10 +32,10 @@ $_POST['StockCode']='%'; } if ($_POST['Keywords'] AND $_POST['StockCode']) { - $msg=_('Stock description keywords have been used in preference to the Stock code extract entered'); + prnMsg( _('Stock description keywords have been used in preference to the Stock code extract entered'), 'info' ); } if ($_POST['Keywords']=='' AND $_POST['StockCode']=='') { - $msg=_('At least one stock description keyword or an extract of a stock code must be entered for the search'); + prnMsg( _('At least one stock description keyword or an extract of a stock code must be entered for the search'), 'info' ); } else { if (strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2010-08-18 19:26:27 UTC (rev 3695) +++ trunk/BOMs.php 2010-08-21 04:53:42 UTC (rev 3696) @@ -733,10 +733,10 @@ $_POST['StockCode']='%'; } if ($_POST['Keywords'] AND $_POST['StockCode']) { - $msg=_('Stock description keywords have been used in preference to the Stock code extract entered'); + prnMsg=( _('Stock description keywords have been used in preference to the Stock code extract entered'), 'info' ); } if ($_POST['Keywords']=='' AND $_POST['StockCode']=='') { - $msg=_('At least one stock description keyword or an extract of a stock code must be entered for the search'); + prnMsg( _('At least one stock description keyword or an extract of a stock code must be entered for the search'), 'info' ); } else { if (strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces @@ -789,7 +789,7 @@ if (!isset($SelectedParent)) { echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="">' . ' ' . $title; - echo "<form action=" . $_SERVER['PHP_SELF'] . "?" . SID ." method=post><b><br>" . $msg ."</b>" . + echo "<form action=" . $_SERVER['PHP_SELF'] . "?" . SID ." method=post>" . '<div class="page_help_text">'. _('Select a manufactured part') . " (" . _('or Assembly or Kit part') . ") " . _('to maintain the bill of material for using the options below') . "." . "<br><font size=1>" . _('Parts must be defined in the stock item entry') . "/" . _('modification screen as manufactured') . Modified: trunk/ContractBOM.php =================================================================== --- trunk/ContractBOM.php 2010-08-18 19:26:27 UTC (rev 3695) +++ trunk/ContractBOM.php 2010-08-21 04:53:42 UTC (rev 3696) @@ -47,10 +47,11 @@ if (isset($_POST['Search'])){ /*ie seach for stock items */ - If ($_POST['Keywords'] AND $_POST['StockCode']) { - $msg=_('Stock description keywords have been used in preference to the Stock code extract entered'); + if ($_POST['Keywords'] AND $_POST['StockCode']) { + prnMsg=(_('Stock description keywords have been used in preference to the Stock code extract entered'), 'info'); } - If ($_POST['Keywords']) { + + if ($_POST['Keywords']) { //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; Modified: trunk/CustLoginSetup.php =================================================================== --- trunk/CustLoginSetup.php 2010-08-18 19:26:27 UTC (rev 3695) +++ trunk/CustLoginSetup.php 2010-08-21 04:53:42 UTC (rev 3696) @@ -167,7 +167,7 @@ blocked='" . $_POST['Blocked'] . "' WHERE userid = '".$SelectedUser."'"; - $msg = _('The selected user record has been updated'); + prnMsg( _('The selected user record has been updated'), 'success' ); } elseif ($InputError !=1) { $sql = "INSERT INTO www_users (userid, @@ -200,7 +200,7 @@ '" . $_SESSION['DefaultDisplayRecordsMax'] . "', '" . $_POST['Theme'] . "', '". $_POST['UserLanguage'] ."')"; - $msg = _('A new user record has been inserted'); + prnMsg( _('A new user record has been inserted'), 'success' ); } if ($InputError!=1){ Modified: trunk/FixedAssetJournal.php =================================================================== --- trunk/FixedAssetJournal.php 2010-08-18 19:26:27 UTC (rev 3695) +++ trunk/FixedAssetJournal.php 2010-08-21 04:53:42 UTC (rev 3696) @@ -135,7 +135,7 @@ if (isset($_POST['JournalType'])){ $_SESSION['JournalDetail']->JournalType = $_POST['JournalType']; } -$msg=''; + if (isset($_POST['CommitBatch']) and $_POST['CommitBatch']==_('Accept and Process Journal')){ /* once the GL analysis of the journal is entered Modified: trunk/GLJournal.php =================================================================== --- trunk/GLJournal.php 2010-08-18 19:26:27 UTC (rev 3695) +++ trunk/GLJournal.php 2010-08-21 04:53:42 UTC (rev 3696) @@ -45,7 +45,6 @@ if (isset($_POST['JournalType'])){ $_SESSION['JournalDetail']->JournalType = $_POST['JournalType']; } -$msg=''; if (isset($_POST['CommitBatch']) and $_POST['CommitBatch']==_('Accept and Process Journal')){ Modified: trunk/GeocodeSetup.php =================================================================== --- trunk/GeocodeSetup.php 2010-08-18 19:26:27 UTC (rev 3695) +++ trunk/GeocodeSetup.php 2010-08-21 04:53:42 UTC (rev 3696) @@ -114,7 +114,7 @@ //the link to delete a selected record was clicked instead of the submit button $sql = "DELETE FROM geocode_param WHERE geocodeid = '" . $_GET['delete'] . "' LIMIT 1"; $result = DB_query($sql,$db); -$msg = _('Geocode deleted'); + prnMsg( _('Geocode deleted'), 'success' ); //end if status code used in customer or supplier accounts unset ($_GET['delete']); unset ($SelectedParam); Modified: trunk/MRPReport.php =================================================================== --- trunk/MRPReport.php 2010-08-18 19:26:27 UTC (rev 3695) +++ trunk/MRPReport.php 2010-08-21 04:53:42 UTC (rev 3696) @@ -585,7 +585,7 @@ $_POST['PageOffset'] = 1; } if ($_POST['Keywords'] AND $_POST['StockCode']) { - $msg = _('Stock description keywords have been used in preference to the Stock code extract entered'); + prnMsg( _('Stock description keywords have been used in preference to the Stock code extract entered'), 'info' ); } if ($_POST['Keywords']) { //insert wildcard characters in spaces Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2010-08-18 19:26:27 UTC (rev 3695) +++ trunk/PO_Items.php 2010-08-21 04:53:42 UTC (rev 3696) @@ -405,10 +405,10 @@ if (isset($_POST['Search'])){ /*ie seach for stock items */ - If ($_POST['Keywords'] AND $_POST['StockCode']) { - $msg=_('Stock description keywords have been used in preference to the Stock code extract entered'); + if ($_POST['Keywords'] AND $_POST['StockCode']) { + prnMsg( _('Stock description keywords have been used in preference to the Stock code extract entered'), 'info' ); } - If ($_POST['Keywords']) { + if ($_POST['Keywords']) { //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2010-08-18 19:26:27 UTC (rev 3695) +++ trunk/Payments.php 2010-08-21 04:53:42 UTC (rev 3696) @@ -190,8 +190,6 @@ } -$msg=''; - if (isset($_POST['CommitBatch'])){ /* once the GL analysis of the payment is entered (if the Creditors_GLLink is active), Modified: trunk/PurchData.php =================================================================== --- trunk/PurchData.php 2010-08-18 19:26:27 UTC (rev 3695) +++ trunk/PurchData.php 2010-08-21 04:53:42 UTC (rev 3696) @@ -236,7 +236,7 @@ if (isset($_POST['SearchSupplier'])) { if (isset($_POST['Keywords']) AND isset($_POST['SupplierCode'])) { - $msg = _('Supplier Name keywords have been used in preference to the Supplier Code extract entered') . '.'; + prnMsg( _('Supplier Name keywords have been used in preference to the Supplier Code extract entered') . '.', 'info' ); } if ($_POST['Keywords'] == '' AND $_POST['SupplierCode'] == '') { $_POST['Keywords'] = ' '; Modified: trunk/SelectAssetType.php =================================================================== --- trunk/SelectAssetType.php 2010-08-18 19:26:27 UTC (rev 3695) +++ trunk/SelectAssetType.php 2010-08-21 04:53:42 UTC (rev 3696) @@ -5,7 +5,7 @@ include ('includes/session.inc'); $title = _('Search Asset Types'); include ('includes/header.inc'); -$msg = ''; + if (isset($_GET['StockID'])) { //The page is called with a StockID $_GET['StockID'] = trim(strtoupper($_GET['StockID'])); @@ -74,7 +74,6 @@ // options (links) to pages. This requires stock id also to be passed. } // end displaying item options if there is one and only one record echo '<form action="SelectAssetType.php?' . SID . '" method=post>'; -echo '<b>' . $msg . '</b>'; echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="">' . ' ' . _('Search for Inventory Items'); echo '<table class=selection><tr>'; echo '<td>' . _('In Stock Category') . ':'; @@ -119,7 +118,7 @@ $_POST['PageOffset'] = 1; } if ($_POST['Keywords'] AND $_POST['StockCode']) { - $msg = _('Stock description keywords have been used in preference to the Stock code extract entered'); + prnMsg( _('Stock description keywords have been used in preference to the Stock code extract entered'), 'info' ); } if ($_POST['Keywords']) { //insert wildcard characters in spaces Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2010-08-18 19:26:27 UTC (rev 3695) +++ trunk/SelectCreditItems.php 2010-08-21 04:53:42 UTC (rev 3696) @@ -63,15 +63,14 @@ if (isset($_POST['SearchCust']) AND $_SESSION['RequireCustomerSelection']==1){ if ($_POST['Keywords'] AND $_POST['CustCode']) { - $msg=_('Customer name keywords have been used in preference to the customer code extract entered'); + prnMsg( _('Customer name keywords have been used in preference to the customer code extract entered'), 'info' ); } if ($_POST['Keywords']=='' AND $_POST['CustCode']=='') { - $msg=_('At least one Customer Name keyword OR an extract of a Customer Code must be entered for the search'); + prnMsg( _('At least one Customer Name keyword OR an extract of a Customer Code must be entered for the search'), 'info' ); } else { If (strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; - $msg=''; $SQL = 'SELECT custbranch.debtorno, @@ -85,7 +84,7 @@ AND custbranch.disabletrans=0"; } elseif (strlen($_POST['CustCode'])>0){ - $msg=''; + $SQL = 'SELECT custbranch.debtorno, custbranch.brname, @@ -198,12 +197,9 @@ if ($_SESSION['RequireCustomerSelection'] ==1 OR !isset($_SESSION['CreditItems']->DebtorNo) OR $_SESSION['CreditItems']->DebtorNo=='' ) { - if (!isset($msg)) { - $msg = ''; - } + echo '<font size=3><div class="centre"><b> - ' . _('Customer Selection') . '</b></font></div><br>'; echo '<form action="' . $_SERVER['PHP_SELF'] . '?' . SID . '" method=post>'; - echo '<b><br>' . $msg . '</b>'; echo '<table cellpadding=3 colspan=4>'; echo '<tr>'; echo '<td><font size=1>' . _('Enter text in the customer name') . ':</font></td>'; @@ -272,13 +268,13 @@ echo '<font size=4><b><U><div class="centre">' . $_SESSION['CreditItems']->CustomerName . ' - ' . $_SESSION['CreditItems']->DeliverTo . '</div></U></b></font><br>'; /* do the search for parts that might be being looked up to add to the credit note */ - If (isset($_POST['Search'])){ + if (isset($_POST['Search'])){ - If ($_POST['Keywords']!='' AND $_POST['StockCode']!='') { - $msg=_('Stock description keywords have been used in preference to the Stock code extract entered') . '.'; + if ($_POST['Keywords']!='' AND $_POST['StockCode']!='') { + prnMsg( _('Stock description keywords have been used in preference to the Stock code extract entered') . '.', 'info' ); } - If ($_POST['Keywords']!="") { + if ($_POST['Keywords']!="") { //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; @@ -677,15 +673,12 @@ if ($k==1){ $RowStarter = '<tr class="EvenTableRows">'; - } elseif ($k==1){ - $RowStarter = '<tr class="OddTableRows">'; $k=0; } else { - $RowStarter = '<tr bgcolor="#EEEEEE">'; - $k=1; + $RowStarter = '<tr class="OddTableRows">'; + $k++; } - - + echo $RowStarter . '<td>' . $LineItem->StockID . '</td> <td>' . $LineItem->ItemDescription . '</td>'; Modified: trunk/SelectSupplier.php =================================================================== --- trunk/SelectSupplier.php 2010-08-18 19:26:27 UTC (rev 3695) +++ trunk/SelectSupplier.php 2010-08-21 04:53:42 UTC (rev 3696) @@ -53,7 +53,7 @@ </script> <body onload="load()" onunload="GUnload()">'; } -$msg = ''; + /* if (!isset($_POST['Search'])){ $_POST['Search']=''; @@ -79,7 +79,7 @@ } if (isset($_POST['Search']) OR isset($_POST['Go']) OR isset($_POST['Next']) OR isset($_POST['Previous'])) { if (strlen($_POST['Keywords']) > 0 AND strlen($_POST['SupplierCode']) > 0) { - $msg = '<br>' . _('Supplier name keywords have been used in preference to the Supplier code extract entered'); + prnMsg( '<br>' . _('Supplier name keywords have been used in preference to the Supplier code extract entered'), 'info' ); } if ($_POST['Keywords'] == '' AND $_POST['SupplierCode'] == '') { $SQL = 'SELECT supplierid, @@ -191,7 +191,6 @@ echo '</td></tr></table>'; } echo "<form action='" . $_SERVER['PHP_SELF'] . '?' . SID . "' method=post>"; -echo '<b>' . $msg; echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="">' . ' ' . _('Search for Suppliers') . ' <table cellpadding=3 colspan=4 class=selection><tr><td>' . _('Enter a partial Name') . ':</font></td><td>'; Modified: trunk/SuppLoginSetup.php =================================================================== --- trunk/SuppLoginSetup.php 2010-08-18 19:26:27 UTC (rev 3695) +++ trunk/SuppLoginSetup.php 2010-08-21 04:53:42 UTC (rev 3696) @@ -134,7 +134,7 @@ blocked=" . $_POST['Blocked'] . " WHERE userid = '$SelectedUser'"; - $msg = _('The selected user record has been updated'); + prnMsg( _('The selected user record has been updated'), 'success' ); } elseif ($InputError !=1) { $sql = "INSERT INTO www_users (userid, @@ -165,7 +165,7 @@ " . $_SESSION['DefaultDisplayRecordsMax'] . ", '" . $_POST['Theme'] . "', '". $_POST['UserLanguage'] ."')"; - $msg = _('A new user record has been inserted'); + prnMsg( _('A new user record has been inserted'), 'success' ); } if ($InputError!=1){ Modified: trunk/SupplierTenders.php =================================================================== --- trunk/SupplierTenders.php 2010-08-18 19:26:27 UTC (rev 3695) +++ trunk/SupplierTenders.php 2010-08-21 04:53:42 UTC (rev 3696) @@ -371,7 +371,7 @@ _('Tenders') . '" alt="">' . ' ' . _('Select items to offer from').' '.$Supplier .'</p>'; if ($_POST['Keywords'] AND $_POST['StockCode']) { - $msg=_('Stock description keywords have been used in preference to the Stock code extract entered'); + prnMsg( _('Stock description keywords have been used in preference to the Stock code extract entered'), 'info' ); } if ($_POST['Keywords']) { //insert wildcard characters in spaces Modified: trunk/WWW_Users.php =================================================================== --- trunk/WWW_Users.php 2010-08-18 19:26:27 UTC (rev 3695) +++ trunk/WWW_Users.php 2010-08-21 04:53:42 UTC (rev 3696) @@ -149,7 +149,7 @@ pdflanguage=" . $_POST['PDFLanguage'] . " WHERE userid = '$SelectedUser'"; - $msg = _('The selected user record has been updated'); + prnMsg( _('The selected user record has been updated'), 'success' ); } elseif ($InputError !=1) { $sql = "INSERT INTO www_users (userid, @@ -186,7 +186,7 @@ '" . $_POST['Theme'] . "', '". $_POST['UserLanguage'] ."', " . $_POST['PDFLanguage'] . ")"; - $msg = _('A new user record has been inserted'); + prnMsg( _('A new user record has been inserted'), 'success' ); } if ($InputError!=1){ Modified: trunk/build/make_release.sh =================================================================== --- trunk/build/make_release.sh 2010-08-18 19:26:27 UTC (rev 3695) +++ trunk/build/make_release.sh 2010-08-21 04:53:42 UTC (rev 3696) @@ -1,6 +1,6 @@ #! /bin/bash -BASE_DIR=/root/httpd/hiawatha/webERP; +BASE_DIR=../; OUTPUT_DIR=/root/tmp; MYSQL_USER=root; MYSQL_PWD=woofwoof; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-08-18 19:26:27 UTC (rev 3695) +++ trunk/doc/Change.log.html 2010-08-21 04:53:42 UTC (rev 3696) @@ -1,12 +1,12 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>20/08/10 Paul Thursby: More $msg cleanup. Unused eliminated; Others replaced with prnMsg().</p> +<p>15/08/10 Phil: Decided to have contracts as part of orders module since not really enough links to warrant a new module changes to index.php WWW_Users.php and sql upgrade.</p> +<p>15/08/10 Phil: New script for ContractCosting.php comparison of contract costs budgeted vs incurred. Lot of work on contracts</p> +<p>13/08/10 Phil: DefineSuppTransClass.php SupplierInvoice.php and SupplierCredit.php now allow entry of contract charges. New script for SuppContractChgs.php</p> +<p>13/08/10 Phil: Fixes to show creditors transactions correctly in GLTransInquiry.php signs mixed up and period not shown previously</p> +<p>10/08/10 Russell (Regal Prods): Fix SelectOrderItems.php width of narrative box was making screen unusable!!</p> <p>18/08/10 Pak Ricard: Revised report writer with the ability for more fields</p> -<p>18/08/10 Paul Thursby: PO_Items.php - Eliminate query; Moves the ONE field into a query above this point.</p> -<p>15/08/10 Phil: Decided to have contracts as part of orders module since not really enough links to warrant a new module changes to index.php WWW_Users.php and sql upgrade. -<p>15/08/10 Phil: New script for ContractCosting.php comparison of contract costs budgeted vs incurred. Lot of work on contracts -<p>13/08/10 Phil: DefineSuppTransClass.php SupplierInvoice.php and SupplierCredit.php now allow entry of contract charges. New script for SuppContractChgs.php -<p>13/08/10 Phil: Fixes to show creditors transactions correctly in GLTransInquiry.php signs mixed up and period not shown previously -<p>10/08/10 Russell (Regal Prods): Fix SelectOrderItems.php width of narrative box was making screen unusable!! <p>07/08/10 Paul Thursby: SelectProduct.php - Variable $msg will never print. Elimnate to use function prnMsg() instead.</p> <p>08/08/10 Phil: Contracts.php SelectContracts.php DeliveryDetails.php - more work to convert Contracts to quotations and on conversion of contract quotations to orders to create contract work order to issue materials to <p>07/08/10 Tim: PDFLowGP.php - Sql quoting correction, layout changes, and assorted minor bug corrections</p> Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2010-08-18 19:26:27 UTC (rev 3695) +++ trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2010-08-21 04:53:42 UTC (rev 3696) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: webERP 3.08\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-14 19:49+1200\n" +"POT-Creation-Date: 2010-08-18 19:26+1200\n" "PO-Revision-Date: 2008-03-19 14:54+0100\n" "Last-Translator: Milan Horák <str...@ti...>\n" "Language-Team: Czech <cs...@li...>\n" @@ -18,7 +18,7 @@ "X-Poedit-Country: CZECH REPUBLIC\n" "X-Poedit-SourceCharset: utf-8\n" -#: AccountGroups.php:9 index.php:1203 +#: AccountGroups.php:9 index.php:1251 msgid "Account Groups" msgstr "Účetní skupiny" @@ -60,7 +60,7 @@ msgid "The account group name cannot contain the character" msgstr "Název účetní skupiny nemůže obsahovat znak" -#: AccountGroups.php:71 AccountSections.php:75 PaymentMethods.php:38 +#: AccountGroups.php:71 AccountSections.php:75 PaymentMethods.php:41 #: TaxCategories.php:30 TaxProvinces.php:30 UnitsOfMeasure.php:30 msgid "or the character" msgstr "nebo znak" @@ -105,7 +105,7 @@ "SQL příkaz použitý při získávání účetních skupin rodičovské účetní skupiny " "byl" -#: AccountGroups.php:139 AccountSections.php:106 PaymentMethods.php:88 +#: AccountGroups.php:139 AccountSections.php:106 PaymentMethods.php:91 msgid "Record Updated" msgstr "Záznam aktualizován" @@ -120,7 +120,7 @@ "SQL příkaz použitý při získávání účetních skupin rodičovské účetní skupiny " "byl" -#: AccountGroups.php:159 AccountSections.php:118 PaymentMethods.php:110 +#: AccountGroups.php:159 AccountSections.php:118 PaymentMethods.php:113 msgid "Record inserted" msgstr "Záznam vložen" @@ -138,26 +138,27 @@ msgstr "" #: AccountGroups.php:182 AccountGroups.php:192 AccountSections.php:139 -#: Areas.php:117 Areas.php:126 BankAccounts.php:163 CreditStatus.php:124 -#: Currencies.php:142 Currencies.php:150 Currencies.php:157 -#: CustomerBranches.php:294 CustomerBranches.php:304 CustomerBranches.php:314 -#: CustomerBranches.php:324 Customers.php:328 Customers.php:337 -#: Customers.php:345 Customers.php:353 CustomerTypes.php:151 -#: CustomerTypes.php:161 Factors.php:107 FixedAssetCategories.php:175 -#: FixedAssetItems.php:483 FixedAssetItems.php:492 FixedAssetItems.php:500 -#: FixedAssetItems.php:508 FixedAssetItems.php:516 FixedAssetItems.php:524 -#: GLAccounts.php:91 GLAccounts.php:105 Locations.php:246 Locations.php:254 -#: Locations.php:263 Locations.php:271 Locations.php:279 Locations.php:287 -#: Locations.php:295 Locations.php:303 MRPDemandTypes.php:85 -#: PaymentMethods.php:142 PaymentTerms.php:149 PaymentTerms.php:156 +#: Areas.php:117 Areas.php:126 BankAccounts.php:163 CreditStatus.php:125 +#: Currencies.php:144 Currencies.php:152 Currencies.php:159 +#: CustomerBranches.php:296 CustomerBranches.php:306 CustomerBranches.php:316 +#: CustomerBranches.php:326 Customers.php:316 Customers.php:325 +#: Customers.php:333 Customers.php:341 CustomerTypes.php:148 +#: CustomerTypes.php:158 Factors.php:136 FixedAssetCategories.php:136 +#: FixedAssetItems.php:490 FixedAssetItems.php:499 FixedAssetItems.php:507 +#: FixedAssetItems.php:515 FixedAssetItems.php:523 FixedAssetItems.php:531 +#: GLAccounts.php:95 GLAccounts.php:109 Locations.php:247 Locations.php:255 +#: Locations.php:264 Locations.php:272 Locations.php:280 Locations.php:288 +#: Locations.php:296 Locations.php:304 MRPDemandTypes.php:89 +#: PaymentMethods.php:146 PaymentTerms.php:147 PaymentTerms.php:154 #: PcExpenses.php:116 SalesCategories.php:125 SalesCategories.php:133 #: SalesPeople.php:142 SalesPeople.php:149 SalesTypes.php:145 #: SalesTypes.php:155 Shippers.php:82 Shippers.php:94 StockCategories.php:153 -#: Stocks.php:467 Stocks.php:476 Stocks.php:484 Stocks.php:492 Stocks.php:500 -#: Stocks.php:508 Suppliers.php:608 Suppliers.php:617 Suppliers.php:625 -#: TaxCategories.php:130 TaxGroups.php:128 TaxGroups.php:135 -#: TaxProvinces.php:125 UnitsOfMeasure.php:140 UnitsOfMeasure.php:147 -#: WorkCentres.php:90 WorkCentres.php:96 WWW_Access.php:84 +#: Stocks.php:471 Stocks.php:480 Stocks.php:488 Stocks.php:496 Stocks.php:504 +#: Stocks.php:512 Suppliers.php:613 Suppliers.php:622 Suppliers.php:630 +#: SupplierTypes.php:147 TaxCategories.php:130 TaxGroups.php:128 +#: TaxGroups.php:135 TaxProvinces.php:125 UnitsOfMeasure.php:140 +#: UnitsOfMeasure.php:147 WorkCentres.php:90 WorkCentres.php:96 +#: WWW_Access.php:84 msgid "There are" msgstr "Jsou zde" @@ -208,23 +209,36 @@ msgid "Could not get account groups because" msgstr "Nemohu získat účetní skupiny, protože" -#: AccountGroups.php:226 AccountSections.php:177 AddCustomerContacts.php:21 -#: AgedDebtors.php:467 AgedSuppliers.php:276 BOMListing.php:128 BOMs.php:214 -#: BOMs.php:792 CounterSales.php:1931 CounterSales.php:2053 -#: DiscountCategories.php:12 DiscountCategories.php:119 DiscountMatrix.php:18 -#: Factors.php:7 FixedAssetJournal.php:335 FixedAssetLocations.php:10 -#: FixedAssetRegister.php:20 FixedAssetRegister.php:212 -#: FixedAssetTransfer.php:32 FormDesigner.php:132 GLBalanceSheet.php:349 -#: GLBudgets.php:30 GLJournal.php:238 PDFPickingList.php:30 -#: PDFStockLocTransfer.php:21 PO_AuthorisationLevels.php:12 -#: PO_SelectOSPurchOrder.php:134 PurchData.php:133 PurchData.php:220 -#: SelectCompletedOrder.php:13 SelectCustomer.php:287 SelectGLAccount.php:19 -#: SelectGLAccount.php:79 SelectOrderItems.php:605 SelectOrderItems.php:1338 +#: AccountGroups.php:226 AccountSections.php:177 AddCustomerContacts.php:25 +#: AddCustomerContacts.php:28 AddCustomerNotes.php:97 +#: AddCustomerTypeNotes.php:94 AgedDebtors.php:467 AgedSuppliers.php:276 +#: Areas.php:144 BOMExtendedQty.php:285 BOMIndented.php:261 +#: BOMIndentedReverse.php:256 BOMInquiry.php:163 BOMListing.php:128 +#: BOMs.php:214 BOMs.php:791 COGSGLPostings.php:20 CompanyPreferences.php:158 +#: CounterSales.php:1936 CounterSales.php:2058 Credit_Invoice.php:257 +#: CreditStatus.php:21 Currencies.php:29 CustEDISetup.php:19 +#: DailyBankTransactions.php:9 DebtorsAtPeriodEnd.php:138 +#: DiscountCategories.php:12 DiscountCategories.php:120 DiscountMatrix.php:18 +#: EDIMessageFormat.php:105 FixedAssetJournal.php:314 FixedAssetList.php:8 +#: FixedAssetLocations.php:9 FixedAssetRegister.php:20 +#: FixedAssetRegister.php:181 FixedAssetTransfer.php:30 FormDesigner.php:132 +#: GLBalanceSheet.php:349 GLBudgets.php:30 GLJournal.php:239 +#: InventoryPlanning.php:365 InventoryPlanningPrefSupplier.php:460 +#: MRPReport.php:535 OutstandingGRNs.php:174 PcAssignCashToTab.php:39 +#: PcAssignCashToTab.php:113 PcAssignCashToTab.php:129 +#: PcAssignCashToTab.php:164 PDFPickingList.php:30 PDFStockLocTransfer.php:21 +#: PO_AuthorisationLevels.php:12 PO_SelectOSPurchOrder.php:135 +#: PurchData.php:133 PurchData.php:220 SalesGraph.php:33 +#: SelectAssetType.php:78 SelectCompletedOrder.php:13 SelectContract.php:80 +#: SelectCustomer.php:314 SelectGLAccount.php:19 SelectGLAccount.php:79 +#: SelectOrderItems.php:605 SelectOrderItems.php:1338 #: SelectOrderItems.php:1458 SelectProduct.php:457 SelectSalesOrder.php:152 -#: SelectSupplier.php:9 SelectSupplier.php:194 SelectWorkOrder.php:11 -#: SelectWorkOrder.php:147 Suppliers.php:306 TaxGroups.php:16 TopItems.php:57 -#: WhereUsedInquiry.php:18 WorkCentres.php:111 WorkCentres.php:158 -#: WorkOrderEntry.php:13 WWW_Users.php:38 Z_BottomUpCosts.php:50 +#: SelectSupplier.php:9 SelectSupplier.php:195 SelectWorkOrder.php:11 +#: SelectWorkOrder.php:147 StockLocMovements.php:14 StockLocStatus.php:26 +#: Suppliers.php:306 SupplierTenders.php:259 SupplierTenders.php:315 +#: TaxGroups.php:16 TopItems.php:57 WhereUsedInquiry.php:18 +#: WorkCentres.php:111 WorkCentres.php:158 WorkOrderEntry.php:12 +#: WWW_Users.php:38 Z_BottomUpCosts.php:50 msgid "Search" msgstr "" @@ -232,143 +246,148 @@ msgid "Group Name" msgstr "Název skupiny" -#: AccountGroups.php:231 EDIMessageFormat.php:141 +#: AccountGroups.php:231 EDIMessageFormat.php:130 msgid "Section" msgstr "Sekce" -#: AccountGroups.php:232 AccountGroups.php:389 +#: AccountGroups.php:232 AccountGroups.php:394 msgid "Sequence In TB" msgstr "" -#: AccountGroups.php:233 AccountGroups.php:373 GLProfit_Loss.php:8 +#: AccountGroups.php:233 AccountGroups.php:378 GLProfit_Loss.php:8 #: GLProfit_Loss.php:104 GLProfit_Loss.php:105 GLProfit_Loss.php:156 #: SelectGLAccount.php:45 SelectGLAccount.php:59 msgid "Profit and Loss" msgstr "Zisky a ztráty" -#: AccountGroups.php:234 AccountGroups.php:334 +#: AccountGroups.php:234 AccountGroups.php:339 msgid "Parent Group" msgstr "Rodičovská skupina" -#: AccountGroups.php:250 AccountGroups.php:253 AccountGroups.php:377 -#: AccountGroups.php:379 BankAccounts.php:217 BankAccounts.php:360 -#: BankAccounts.php:362 BankAccounts.php:366 BOMs.php:128 BOMs.php:712 -#: BOMs.php:714 CompanyPreferences.php:437 CompanyPreferences.php:439 +#: AccountGroups.php:250 AccountGroups.php:253 AccountGroups.php:382 +#: AccountGroups.php:384 BankAccounts.php:217 BankAccounts.php:360 +#: BankAccounts.php:362 BankAccounts.php:366 BOMs.php:128 BOMs.php:711 +#: BOMs.php:713 CompanyPreferences.php:437 CompanyPreferences.php:439 #: CompanyPreferences.php:449 CompanyPreferences.php:451 #: CompanyPreferences.php:461 CompanyPreferences.php:463 -#: CustLoginSetup.php:574 CustLoginSetup.php:576 CustomerBranches.php:407 -#: Customers.php:609 Customers.php:865 Customers.php:872 Customers.php:875 -#: DeliveryDetails.php:956 DeliveryDetails.php:996 DeliveryDetails.php:999 -#: GLTransInquiry.php:72 Locations.php:370 MRPCalendar.php:218 MRP.php:539 -#: MRP.php:543 MRP.php:547 MRP.php:551 PaymentMethods.php:198 -#: PaymentMethods.php:199 PaymentMethods.php:258 PaymentMethods.php:264 -#: PDFChequeListing.php:59 PDFDeliveryDifferences.php:60 PDFDIFOT.php:63 +#: ContractCosting.php:169 CustLoginSetup.php:589 CustLoginSetup.php:591 +#: CustomerBranches.php:420 Customers.php:598 Customers.php:854 +#: Customers.php:861 Customers.php:864 DeliveryDetails.php:1033 +#: DeliveryDetails.php:1073 DeliveryDetails.php:1076 GLTransInquiry.php:73 +#: Locations.php:373 MRPCalendar.php:222 MRP.php:542 MRP.php:546 MRP.php:550 +#: MRP.php:554 PaymentMethods.php:203 PaymentMethods.php:204 +#: PaymentMethods.php:263 PaymentMethods.php:269 PDFChequeListing.php:62 +#: PDFDeliveryDifferences.php:63 PDFDIFOT.php:66 #: PO_AuthorisationLevels.php:132 PO_AuthorisationLevels.php:137 -#: PO_Header.php:873 PO_PDFPurchOrder.php:367 PO_PDFPurchOrder.php:370 +#: PO_Header.php:883 PO_PDFPurchOrder.php:367 PO_PDFPurchOrder.php:370 #: PurchData.php:179 PurchData.php:442 PurchData.php:445 #: RecurringSalesOrders.php:473 RecurringSalesOrders.php:476 #: SalesAnalReptCols.php:278 SalesAnalReptCols.php:383 #: SalesAnalReptCols.php:386 SalesAnalRepts.php:404 SalesAnalRepts.php:407 #: SalesAnalRepts.php:430 SalesAnalRepts.php:433 SalesAnalRepts.php:456 #: SalesAnalRepts.php:459 SelectProduct.php:346 ShipmentCosting.php:612 -#: Stocks.php:837 Stocks.php:839 Stocks.php:857 Stocks.php:859 -#: SystemParameters.php:363 SystemParameters.php:395 SystemParameters.php:440 -#: SystemParameters.php:458 SystemParameters.php:466 SystemParameters.php:506 -#: SystemParameters.php:579 SystemParameters.php:587 SystemParameters.php:605 -#: SystemParameters.php:612 SystemParameters.php:736 SystemParameters.php:867 -#: SystemParameters.php:869 SystemParameters.php:879 SystemParameters.php:881 -#: SystemParameters.php:935 SystemParameters.php:947 SystemParameters.php:949 -#: TaxGroups.php:290 TaxGroups.php:293 TaxGroups.php:342 WWW_Users.php:593 -#: WWW_Users.php:595 +#: Stocks.php:866 Stocks.php:868 Stocks.php:886 Stocks.php:888 +#: SuppContractChgs.php:83 SuppLoginSetup.php:510 SuppLoginSetup.php:512 +#: SystemParameters.php:369 SystemParameters.php:401 SystemParameters.php:446 +#: SystemParameters.php:464 SystemParameters.php:472 SystemParameters.php:512 +#: SystemParameters.php:585 SystemParameters.php:593 SystemParameters.php:611 +#: SystemParameters.php:618 SystemParameters.php:742 SystemParameters.php:873 +#: SystemParameters.php:875 SystemParameters.php:885 SystemParameters.php:887 +#: SystemParameters.php:941 SystemParameters.php:953 SystemParameters.php:955 +#: TaxGroups.php:290 TaxGroups.php:293 TaxGroups.php:342 WWW_Users.php:609 +#: WWW_Users.php:611 msgid "Yes" msgstr "Ano" -#: AccountGroups.php:256 AccountGroups.php:382 AccountGroups.php:384 +#: AccountGroups.php:256 AccountGroups.php:387 AccountGroups.php:389 #: BankAccounts.php:215 BankAccounts.php:360 BankAccounts.php:362 -#: BankAccounts.php:366 BOMs.php:130 BOMs.php:711 BOMs.php:715 +#: BankAccounts.php:366 BOMs.php:130 BOMs.php:710 BOMs.php:714 #: CompanyPreferences.php:436 CompanyPreferences.php:440 #: CompanyPreferences.php:448 CompanyPreferences.php:452 #: CompanyPreferences.php:460 CompanyPreferences.php:464 -#: CustLoginSetup.php:573 CustLoginSetup.php:577 CustomerBranches.php:407 -#: Customers.php:608 Customers.php:863 Customers.php:871 Customers.php:874 -#: DeliveryDetails.php:957 DeliveryDetails.php:997 DeliveryDetails.php:1000 -#: GLTransInquiry.php:126 Locations.php:372 MRPCalendar.php:220 MRP.php:537 -#: MRP.php:541 MRP.php:545 MRP.php:549 PaymentMethods.php:198 -#: PaymentMethods.php:199 PaymentMethods.php:259 PaymentMethods.php:265 -#: PDFChequeListing.php:58 PDFDeliveryDifferences.php:59 PDFDIFOT.php:62 +#: ContractCosting.php:167 CustLoginSetup.php:588 CustLoginSetup.php:592 +#: CustomerBranches.php:420 Customers.php:597 Customers.php:852 +#: Customers.php:860 Customers.php:863 DeliveryDetails.php:1034 +#: DeliveryDetails.php:1074 DeliveryDetails.php:1077 GLTransInquiry.php:127 +#: Locations.php:375 MRPCalendar.php:224 MRP.php:540 MRP.php:544 MRP.php:548 +#: MRP.php:552 PaymentMethods.php:203 PaymentMethods.php:204 +#: PaymentMethods.php:264 PaymentMethods.php:270 PDFChequeListing.php:61 +#: PDFDeliveryDifferences.php:62 PDFDIFOT.php:65 #: PO_AuthorisationLevels.php:134 PO_AuthorisationLevels.php:139 -#: PO_Header.php:873 PO_PDFPurchOrder.php:368 PO_PDFPurchOrder.php:371 +#: PO_Header.php:883 PO_PDFPurchOrder.php:368 PO_PDFPurchOrder.php:371 #: PurchData.php:182 PurchData.php:443 PurchData.php:446 #: RecurringSalesOrders.php:472 RecurringSalesOrders.php:475 #: SalesAnalReptCols.php:276 SalesAnalReptCols.php:384 #: SalesAnalReptCols.php:387 SalesAnalRepts.php:403 SalesAnalRepts.php:406 #: SalesAnalRepts.php:429 SalesAnalRepts.php:432 SalesAnalRepts.php:455 #: SalesAnalRepts.php:458 SelectProduct.php:349 ShipmentCosting.php:613 -#: Stocks.php:832 Stocks.php:834 Stocks.php:852 Stocks.php:854 -#: SystemParameters.php:364 SystemParameters.php:396 SystemParameters.php:441 -#: SystemParameters.php:459 SystemParameters.php:467 SystemParameters.php:507 -#: SystemParameters.php:580 SystemParameters.php:588 SystemParameters.php:606 -#: SystemParameters.php:613 SystemParameters.php:737 SystemParameters.php:866 -#: SystemParameters.php:870 SystemParameters.php:878 SystemParameters.php:882 -#: SystemParameters.php:936 SystemParameters.php:946 SystemParameters.php:950 -#: TaxGroups.php:291 TaxGroups.php:294 TaxGroups.php:344 WWW_Users.php:592 -#: WWW_Users.php:596 includes/PDFLowGPPageHeader.inc:31 +#: Stocks.php:861 Stocks.php:863 Stocks.php:881 Stocks.php:883 +#: SuppContractChgs.php:85 SuppLoginSetup.php:509 SuppLoginSetup.php:513 +#: SystemParameters.php:370 SystemParameters.php:402 SystemParameters.php:447 +#: SystemParameters.php:465 SystemParameters.php:473 SystemParameters.php:513 +#: SystemParameters.php:586 SystemParameters.php:594 SystemParameters.php:612 +#: SystemParameters.php:619 SystemParameters.php:743 SystemParameters.php:872 +#: SystemParameters.php:876 SystemParameters.php:884 SystemParameters.php:888 +#: SystemParameters.php:942 SystemParameters.php:952 SystemParameters.php:956 +#: TaxGroups.php:291 TaxGroups.php:294 TaxGroups.php:344 WWW_Users.php:608 +#: WWW_Users.php:612 includes/PDFLowGPPageHeader.inc:44 #: includes/PDFTaxPageHeader.inc:35 msgid "No" msgstr "Ne" -#: AccountGroups.php:265 AccountSections.php:197 AddCustomerContacts.php:126 -#: AddCustomerNotes.php:125 AddCustomerTypeNotes.php:122 Areas.php:162 -#: BankAccounts.php:226 BOMs.php:150 COGSGLPostings.php:108 -#: COGSGLPostings.php:213 CreditStatus.php:173 Currencies.php:235 -#: CustLoginSetup.php:297 CustomerBranches.php:411 Customers.php:917 -#: Customers.php:949 CustomerTypes.php:206 EDIMessageFormat.php:162 -#: FixedAssetCategories.php:235 FixedAssetLocations.php:81 -#: FreightCosts.php:242 GeocodeSetup.php:166 GLAccounts.php:318 GLTags.php:59 -#: Locations.php:379 MRPDemands.php:301 MRPDemandTypes.php:117 -#: PaymentMethods.php:200 PaymentTerms.php:204 PcAssignCashToTab.php:239 +#: AccountGroups.php:265 AccountSections.php:197 AddCustomerContacts.php:131 +#: AddCustomerNotes.php:125 AddCustomerTypeNotes.php:122 Areas.php:164 +#: BankAccounts.php:226 BOMs.php:150 COGSGLPostings.php:112 +#: COGSGLPostings.php:217 CreditStatus.php:174 Currencies.php:239 +#: CustLoginSetup.php:312 CustomerBranches.php:424 Customers.php:906 +#: Customers.php:938 CustomerTypes.php:204 EDIMessageFormat.php:151 +#: Factors.php:207 FixedAssetCategories.php:196 FixedAssetLocations.php:114 +#: FreightCosts.php:242 GeocodeSetup.php:168 GLAccounts.php:318 GLTags.php:61 +#: Locations.php:382 MRPDemands.php:302 MRPDemandTypes.php:122 +#: PaymentMethods.php:205 PaymentTerms.php:203 PcAssignCashToTab.php:249 #: PcClaimExpensesFromTab.php:227 PcExpenses.php:173 PcTabs.php:185 #: PcTypeTabs.php:168 PO_AuthorisationLevels.php:148 Prices_Customer.php:271 -#: Prices.php:220 PurchData.php:191 SalesCategories.php:261 +#: Prices.php:223 PurchData.php:191 SalesCategories.php:261 #: SalesGLPostings.php:133 SalesGLPostings.php:245 SalesPeople.php:201 -#: SalesTypes.php:204 SelectCustomer.php:553 SelectCustomer.php:569 -#: SelectCustomer.php:591 SelectCustomer.php:607 SelectCustomer.php:629 -#: SelectCustomer.php:645 Shippers.php:142 StockCategories.php:215 -#: SupplierContacts.php:154 TaxAuthorities.php:164 TaxCategories.php:181 -#: TaxGroups.php:179 TaxProvinces.php:176 UnitsOfMeasure.php:199 -#: WorkCentres.php:138 WWW_Access.php:124 WWW_Users.php:305 -#: includes/InputSerialItems.php:82 +#: SalesTypes.php:204 SelectCustomer.php:606 SelectCustomer.php:622 +#: SelectCustomer.php:644 SelectCustomer.php:660 SelectCustomer.php:682 +#: SelectCustomer.php:698 Shippers.php:142 StockCategories.php:215 +#: SupplierContacts.php:154 SupplierTypes.php:192 SuppLoginSetup.php:274 +#: TaxAuthorities.php:164 TaxCategories.php:181 TaxGroups.php:179 +#: TaxProvinces.php:176 UnitsOfMeasure.php:199 WorkCentres.php:138 +#: WWW_Access.php:124 WWW_Users.php:312 includes/InputSerialItems.php:87 #, php-format msgid "Edit" msgstr "Upravit" -#: AccountGroups.php:266 AccountSections.php:201 AddCustomerContacts.php:127 -#: AddCustomerNotes.php:126 AddCustomerTypeNotes.php:123 Areas.php:163 -#: BankAccounts.php:227 BOMs.php:152 COGSGLPostings.php:109 -#: COGSGLPostings.php:214 CounterSales.php:737 Credit_Invoice.php:372 -#: CreditStatus.php:174 Currencies.php:238 CustLoginSetup.php:298 -#: CustomerReceipt.php:825 Customers.php:950 CustomerTypes.php:207 -#: DiscountCategories.php:201 DiscountMatrix.php:173 EDIMessageFormat.php:163 -#: FixedAssetCategories.php:236 FixedAssetJournal.php:393 -#: FixedAssetLocations.php:83 FreightCosts.php:243 GeocodeSetup.php:167 -#: GLAccounts.php:319 GLJournal.php:395 Locations.php:380 MRPDemands.php:302 -#: MRPDemandTypes.php:118 PaymentMethods.php:201 Payments.php:863 -#: PaymentTerms.php:205 PcAssignCashToTab.php:240 +#: AccountGroups.php:266 AccountSections.php:201 AddCustomerContacts.php:132 +#: AddCustomerNotes.php:126 AddCustomerTypeNotes.php:123 Areas.php:165 +#: BankAccounts.php:227 BOMs.php:152 COGSGLPostings.php:113 +#: COGSGLPostings.php:218 ContractBOM.php:269 ContractOtherReqts.php:120 +#: CounterSales.php:738 Credit_Invoice.php:385 CreditStatus.php:175 +#: Currencies.php:242 CustLoginSetup.php:313 CustomerReceipt.php:836 +#: Customers.php:939 CustomerTypes.php:205 DiscountCategories.php:202 +#: DiscountMatrix.php:175 EDIMessageFormat.php:152 +#: FixedAssetCategories.php:197 FixedAssetJournal.php:371 FreightCosts.php:243 +#: GeocodeSetup.php:169 GLAccounts.php:319 GLJournal.php:398 Locations.php:383 +#: MRPDemands.php:303 MRPDemandTypes.php:123 PaymentMethods.php:206 +#: Payments.php:946 PaymentTerms.php:204 PcAssignCashToTab.php:253 #: PcClaimExpensesFromTab.php:228 PcExpenses.php:174 PcExpensesTypeTab.php:158 #: PcTabs.php:186 PcTypeTabs.php:169 PO_AuthorisationLevels.php:150 -#: PO_Items.php:960 Prices_Customer.php:272 Prices.php:221 PurchData.php:192 +#: PO_Items.php:967 Prices_Customer.php:272 Prices.php:224 PurchData.php:192 #: SalesAnalReptCols.php:293 SalesAnalRepts.php:303 SalesCategories.php:262 #: SalesGLPostings.php:134 SalesGLPostings.php:246 SalesPeople.php:202 -#: SalesTypes.php:205 SelectCreditItems.php:746 SelectCustomer.php:554 -#: SelectCustomer.php:570 SelectCustomer.php:592 SelectCustomer.php:608 -#: SelectCustomer.php:630 SelectCustomer.php:646 SelectOrderItems.php:1272 +#: SalesTypes.php:205 SelectCreditItems.php:746 SelectCustomer.php:607 +#: SelectCustomer.php:623 SelectCustomer.php:645 SelectCustomer.php:661 +#: SelectCustomer.php:683 SelectCustomer.php:699 SelectOrderItems.php:1272 #: Shipments.php:422 Shippers.php:143 SpecialOrder.php:587 -#: StockCategories.php:216 StockCategories.php:497 SuppCreditGRNs.php:89 -#: SuppInvGLAnalysis.php:65 SuppInvGRNs.php:132 SupplierContacts.php:155 -#: SuppShiptChgs.php:79 SuppTransGLAnalysis.php:107 TaxAuthorities.php:165 -#: TaxCategories.php:182 TaxGroups.php:180 TaxProvinces.php:177 -#: UnitsOfMeasure.php:200 WorkCentres.php:139 WOSerialNos.php:296 -#: WWW_Access.php:125 WWW_Users.php:306 includes/InputSerialItemsKeyed.php:53 +#: StockCategories.php:216 StockCategories.php:497 SuppContractChgs.php:91 +#: SuppCreditGRNs.php:89 SuppInvGRNs.php:132 SupplierContacts.php:155 +#: SupplierTypes.php:194 SuppLoginSetup.php:275 SuppShiptChgs.php:78 +#: SuppTransGLAnalysis.php:105 TaxAuthorities.php:165 TaxCategories.php:182 +#: TaxGroups.php:180 TaxProvinces.php:177 UnitsOfMeasure.php:200 +#: WorkCentres.php:139 WOSerialNos.php:296 WWW_Access.php:125 +#: WWW_Users.php:313 includes/InputSerialItemsKeyed.php:54 #, php-format msgid "Delete" msgstr "Smazat" @@ -393,42 +412,48 @@ "SQL příkaz použitý při získávání účetních skupin rodičovské účetní skupiny " "byl" -#: AccountGroups.php:307 GLAccounts.php:245 GLAccounts.php:298 +#: AccountGroups.php:296 +#, fuzzy +msgid "The account group name does not exist in the database" +msgstr "Název účetní skupiny nemůže obsahovat znak" + +#: AccountGroups.php:312 GLAccounts.php:249 GLAccounts.php:298 #: Z_ImportGLAccountGroups.php:28 msgid "Account Group" msgstr "Účetní skupina" -#: AccountGroups.php:331 +#: AccountGroups.php:336 #, fuzzy msgid "Account Group Name" msgstr "Název účetní skupiny" -#: AccountGroups.php:341 AccountGroups.php:343 +#: AccountGroups.php:346 AccountGroups.php:348 msgid "Top Level Group" msgstr "" -#: AccountGroups.php:357 +#: AccountGroups.php:362 msgid "Section In Accounts" msgstr "Sekce v účtech" -#: AccountGroups.php:396 AccountSections.php:263 AddCustomerContacts.php:202 -#: AddCustomerNotes.php:201 AddCustomerTypeNotes.php:184 Areas.php:218 -#: BankAccounts.php:372 BOMs.php:724 COGSGLPostings.php:342 -#: CreditStatus.php:244 Currencies.php:334 CustLoginSetup.php:595 -#: DiscountMatrix.php:136 EDIMessageFormat.php:254 -#: FixedAssetCategories.php:459 FixedAssetLocations.php:127 -#: FreightCosts.php:338 GeocodeSetup.php:262 GLAccounts.php:268 -#: Locations.php:557 MRPDemands.php:417 MRPDemandTypes.php:176 -#: PaymentMethods.php:270 PaymentTerms.php:278 PO_AuthorisationLevels.php:216 -#: Prices_Customer.php:344 SalesAnalReptCols.php:465 SalesAnalRepts.php:494 -#: SalesGLPostings.php:412 SalesPeople.php:292 Shippers.php:195 -#: StockCategories.php:516 SupplierContacts.php:248 TaxAuthorities.php:302 +#: AccountGroups.php:399 AccountSections.php:263 AddCustomerContacts.php:207 +#: AddCustomerNotes.php:200 AddCustomerTypeNotes.php:190 Areas.php:220 +#: BankAccounts.php:372 BOMs.php:723 COGSGLPostings.php:345 +#: CreditStatus.php:245 Currencies.php:338 CustLoginSetup.php:610 +#: DiscountMatrix.php:138 EDIMessageFormat.php:248 +#: FixedAssetCategories.php:365 FixedAssetLocations.php:163 +#: FreightCosts.php:340 GeocodeSetup.php:264 GLAccounts.php:268 +#: Locations.php:552 MRPDemands.php:399 MRPDemandTypes.php:181 +#: OffersReceived.php:51 OffersReceived.php:126 PaymentMethods.php:275 +#: PaymentTerms.php:281 PO_AuthorisationLevels.php:216 Prices_Customer.php:344 +#: SalesAnalReptCols.php:465 SalesAnalRepts.php:494 SalesGLPostings.php:412 +#: SalesPeople.php:292 Shippers.php:195 StockCategories.php:516 +#: SupplierContacts.php:248 SuppLoginSetup.php:531 TaxAuthorities.php:302 #: TaxCategories.php:231 TaxProvinces.php:226 UnitsOfMeasure.php:250 -#: WorkCentres.php:260 WWW_Users.php:626 +#: WorkCentres.php:260 WWW_Users.php:642 msgid "Enter Information" msgstr "Vložit informace" -#: AccountSections.php:9 index.php:1208 +#: AccountSections.php:9 index.php:1256 msgid "Account Sections" msgstr "Sekce účtu" @@ -488,110 +513,114 @@ msgid "Could not retrieve the requested section please try again." msgstr "" -#: AddCustomerContacts.php:6 AddCustomerContacts.php:50 SelectCustomer.php:547 -#: SelectCustomer.php:576 +#: AddCustomerContacts.php:6 AddCustomerContacts.php:59 SelectCustomer.php:600 +#: SelectCustomer.php:629 #, fuzzy msgid "Customer Contacts" msgstr "Kód zákazníka" -#: AddCustomerContacts.php:20 CustEDISetup.php:11 CustLoginSetup.php:21 +#: AddCustomerContacts.php:20 CustEDISetup.php:11 CustLoginSetup.php:24 #: Z_CheckDebtorsControl.php:20 msgid "Back to Customers" msgstr "Zpět k zákazníkům" -#: AddCustomerContacts.php:32 +#: AddCustomerContacts.php:26 #, fuzzy +msgid "Contacts for Customer: <b>" +msgstr "Kontaktní telefonní číslo" + +#: AddCustomerContacts.php:29 +#, fuzzy +msgid "Edit contact for <b>" +msgstr "Kontaktní telefonní číslo" + +#: AddCustomerContacts.php:41 +#, fuzzy msgid "The Contact must be an integer." msgstr "Sekce v účtech musí být celé kladné číslo" -#: AddCustomerContacts.php:35 +#: AddCustomerContacts.php:44 #, fuzzy msgid "The contact's name must be forty characters or less long" msgstr "Název měny může být dlouhý maximálně 20 znaků" -#: AddCustomerContacts.php:38 +#: AddCustomerContacts.php:47 #, fuzzy msgid "The contact's name may not be empty" msgstr "Kód dlužníka nemůže být prázdný" -#: AddCustomerContacts.php:50 AddCustomerNotes.php:49 -#: AddCustomerTypeNotes.php:49 Areas.php:74 CustomerTypes.php:68 -#: DeliveryDetails.php:671 Factors.php:47 FixedAssetItems.php:351 -#: PcAssignCashToTab.php:70 PcClaimExpensesFromTab.php:61 PcExpenses.php:57 -#: PcTabs.php:57 PcTypeTabs.php:56 PO_Items.php:393 SalesAnalReptCols.php:128 -#: SalesPeople.php:92 SalesTypes.php:61 Stocks.php:353 Suppliers.php:512 +#: AddCustomerContacts.php:59 AddCustomerNotes.php:49 +#: AddCustomerTypeNotes.php:49 Areas.php:74 CustomerTypes.php:70 +#: DeliveryDetails.php:748 Factors.php:117 FixedAssetItems.php:357 +#: PcAssignCashToTab.php:73 PcClaimExpensesFromTab.php:61 PcExpenses.php:57 +#: PcTabs.php:57 PcTypeTabs.php:56 PO_Items.php:391 SalesAnalReptCols.php:128 +#: SalesPeople.php:92 SalesTypes.php:61 Stocks.php:355 Suppliers.php:514 +#: SupplierTypes.php:69 msgid "has been updated" msgstr "" -#: AddCustomerContacts.php:61 +#: AddCustomerContacts.php:70 msgid "The contact record has been added" msgstr "" -#: AddCustomerContacts.php:88 +#: AddCustomerContacts.php:98 #, fuzzy msgid "The contact record has been deleted" msgstr "sekce byla smazána" -#: AddCustomerContacts.php:98 -#, fuzzy -msgid "Contacts for Customer: <b>" -msgstr "Kontaktní telefonní číslo" - -#: AddCustomerContacts.php:107 CompanyPreferences.php:227 -#: CustomerBranches.php:374 Customers.php:907 Customers.php:913 -#: Customers.php:978 SalesPeople.php:183 SelectCustomer.php:549 -#: StockDispatch.php:181 StockDispatch.php:193 SuppInvGLAnalysis.php:49 -#: SuppInvGLAnalysis.php:73 SupplierContacts.php:142 SupplierCredit.php:331 -#: SupplierInvoice.php:308 SuppTransGLAnalysis.php:91 +#: AddCustomerContacts.php:112 CompanyPreferences.php:227 +#: CustomerBranches.php:377 Customers.php:896 Customers.php:902 +#: Customers.php:967 SalesPeople.php:183 SelectCustomer.php:602 +#: StockDispatch.php:181 StockDispatch.php:193 SupplierContacts.php:142 +#: SupplierCredit.php:381 SupplierInvoice.php:353 SuppTransGLAnalysis.php:91 #: includes/InputSerialItemsFile.php:84 includes/InputSerialItemsFile.php:124 #: includes/PDFTaxPageHeader.inc:37 msgid "Name" msgstr "Název" -#: AddCustomerContacts.php:108 AddCustomerContacts.php:184 Customers.php:908 -#: Customers.php:914 Customers.php:979 SelectCustomer.php:550 +#: AddCustomerContacts.php:113 AddCustomerContacts.php:189 Customers.php:897 +#: Customers.php:903 Customers.php:968 SelectCustomer.php:603 #: WWW_Access.php:108 WWW_Access.php:168 msgid "Role" msgstr "" -#: AddCustomerContacts.php:109 Customers.php:980 +#: AddCustomerContacts.php:114 Customers.php:969 #, fuzzy msgid "Phone no" msgstr "Telefon" -#: AddCustomerContacts.php:110 AddCustomerContacts.php:196 Customers.php:910 -#: Customers.php:916 Customers.php:981 PcAssignCashToTab.php:205 -#: PcAssignCashToTab.php:332 PcAuthorizeExpenses.php:84 +#: AddCustomerContacts.php:115 AddCustomerContacts.php:201 Customers.php:899 +#: Customers.php:905 Customers.php:970 PcAssignCashToTab.php:214 +#: PcAssignCashToTab.php:338 PcAuthorizeExpenses.php:84 #: PcClaimExpensesFromTab.php:193 PcClaimExpensesFromTab.php:345 -#: PcReportTab.php:340 SelectCustomer.php:552 SystemParameters.php:303 +#: PcReportTab.php:340 SelectCustomer.php:605 SystemParameters.php:309 #: WOSerialNos.php:273 WOSerialNos.php:275 msgid "Notes" msgstr "" -#: AddCustomerContacts.php:144 +#: AddCustomerContacts.php:149 msgid "Review all contacts for this Customer" msgstr "" -#: AddCustomerContacts.php:173 +#: AddCustomerContacts.php:178 #, fuzzy msgid "Contact Code" msgstr "Kontakt" -#: AddCustomerContacts.php:178 Factors.php:180 Factors.php:195 -#: SupplierContacts.php:216 +#: AddCustomerContacts.php:183 Factors.php:277 SupplierContacts.php:216 msgid "Contact Name" msgstr "" -#: AddCustomerContacts.php:190 Contracts.php:672 PDFRemittanceAdvice.php:246 -#: PO_Header.php:1078 PO_Header.php:1153 SelectCreditItems.php:226 -#: SelectCustomer.php:407 SelectOrderItems.php:635 +#: AddCustomerContacts.php:195 Contracts.php:761 PDFRemittanceAdvice.php:246 +#: PO_Header.php:1088 PO_Header.php:1163 SelectCreditItems.php:226 +#: SelectCustomer.php:460 SelectOrderItems.php:635 #: includes/PDFStatementPageHeader.inc:63 includes/PDFTransPageHeader.inc:113 #: includes/PDFTransPageHeaderPortrait.inc:105 msgid "Phone" msgstr "Telefon" -#: AddCustomerNotes.php:6 AddCustomerNotes.php:49 SelectCustomer.php:584 -#: SelectCustomer.php:614 +#: AddCustomerNotes.php:6 AddCustomerNotes.php:49 SelectCustomer.php:637 +#: SelectCustomer.php:667 #, fuzzy msgid "Customer Notes" msgstr "Kód zákazníka" @@ -626,22 +655,23 @@ msgid "The contact note record has been deleted" msgstr "sekce byla smazána" -#: AddCustomerNotes.php:97 +#: AddCustomerNotes.php:98 #, fuzzy msgid "Notes for Customer: <b>" msgstr "Kontaktní telefonní číslo" #: AddCustomerNotes.php:106 AddCustomerNotes.php:188 -#: AddCustomerTypeNotes.php:103 AddCustomerTypeNotes.php:178 -#: BankMatching.php:222 BankReconciliation.php:182 BankReconciliation.php:254 -#: CustomerAllocations.php:348 CustomerAllocations.php:374 -#: CustomerInquiry.php:190 CustomerTransInquiry.php:86 -#: GLAccountInquiry.php:157 GLAccountReport.php:368 GLTransInquiry.php:47 -#: MRPCalendar.php:213 PaymentAllocations.php:77 PcAssignCashToTab.php:201 +#: AddCustomerTypeNotes.php:103 AddCustomerTypeNotes.php:184 +#: BankMatching.php:222 BankReconciliation.php:183 BankReconciliation.php:255 +#: ContractCosting.php:144 CustomerAllocations.php:332 +#: CustomerAllocations.php:357 CustomerInquiry.php:190 +#: CustomerTransInquiry.php:85 GLAccountInquiry.php:153 +#: GLAccountReport.php:368 GLTransInquiry.php:45 MRPCalendar.php:217 +#: PaymentAllocations.php:77 PcAssignCashToTab.php:210 #: PcAuthorizeExpenses.php:80 PDFRemittanceAdvice.php:307 -#: PrintCustTrans.php:674 PrintCustTransPortrait.php:859 ReverseGRN.php:329 +#: PrintCustTrans.php:676 PrintCustTransPortrait.php:861 ReverseGRN.php:329 #: ShipmentCosting.php:494 ShipmentCosting.php:565 Shipments.php:463 -#: StockDispatch.php:183 StockDispatch.php:195 StockLocMovements.php:80 +#: StockDispatch.php:183 StockDispatch.php:195 StockLocMovements.php:84 #: StockMovements.php:98 StockSerialItemResearch.php:74 #: SupplierAllocations.php:465 SupplierAllocations.php:577 #: SupplierAllocations.php:647 SupplierInquiry.php:194 @@ -653,7 +683,7 @@ msgstr "Datum" #: AddCustomerNotes.php:107 AddCustomerTypeNotes.php:104 PcReportTab.php:171 -#: Stocks.php:841 Z_Upgrade_3.10-3.11.php:61 Z_Upgrade_3.10-3.11.php:65 +#: Stocks.php:870 Z_Upgrade_3.10-3.11.php:61 Z_Upgrade_3.10-3.11.php:65 #: Z_Upgrade_3.10-3.11.php:69 Z_Upgrade_3.10-3.11.php:73 #: Z_Upgrade_3.10-3.11.php:77 msgid "Note" @@ -664,7 +694,7 @@ msgstr "" #: AddCustomerNotes.php:109 AddCustomerNotes.php:194 -#: AddCustomerTypeNotes.php:106 AddCustomerTypeNotes.php:181 +#: AddCustomerTypeNotes.php:106 AddCustomerTypeNotes.php:187 msgid "Priority" msgstr "" @@ -683,7 +713,7 @@ msgid "Contact Note" msgstr "Kontakt" -#: AddCustomerTypeNotes.php:6 SelectCustomer.php:622 +#: AddCustomerTypeNotes.php:6 SelectCustomer.php:675 #, fuzzy msgid "Customer Type (Group) Notes" msgstr "Zákazník aktualizován" @@ -693,7 +723,7 @@ msgid "The Contact priority must be an integer." msgstr "Sekce v účtech musí být celé kladné číslo" -#: AddCustomerTypeNotes.php:49 SelectCustomer.php:652 +#: AddCustomerTypeNotes.php:49 SelectCustomer.php:705 #, fuzzy msgid "Customer Group Notes" msgstr "Zákazník aktualizován" @@ -713,7 +743,7 @@ msgid "Notes for Customer Type: <b>" msgstr "Kontaktní telefonní číslo" -#: AddCustomerTypeNotes.php:105 AddCustomerTypeNotes.php:176 +#: AddCustomerTypeNotes.php:105 msgid "href" msgstr "" @@ -721,11 +751,15 @@ msgid "Review all notes for this Customer Type" msgstr "" -#: AddCustomerTypeNotes.php:174 +#: AddCustomerTypeNotes.php:180 #, fuzzy msgid "Contact Group Note" msgstr "Název účetní skupiny" +#: AddCustomerTypeNotes.php:182 +msgid "Web site" +msgstr "" + #: AgedDebtors.php:17 msgid "Aged Customer Balance Listing" msgstr "" @@ -741,23 +775,24 @@ #: AgedDebtors.php:267 AgedDebtors.php:365 AgedDebtors.php:436 #: AgedSuppliers.php:105 BOMExtendedQty.php:156 BOMIndented.php:149 #: BOMIndentedReverse.php:148 BOMListing.php:48 BOMListing.php:59 -#: DebtorsAtPeriodEnd.php:58 DebtorsAtPeriodEnd.php:70 GLBalanceSheet.php:88 -#: GLBalanceSheet.php:126 GLProfit_Loss.php:156 GLTagProfit_Loss.php:167 -#: GLTrialBalance.php:140 InventoryPlanning.php:99 InventoryPlanning.php:174 +#: DebtorsAtPeriodEnd.php:58 DebtorsAtPeriodEnd.php:70 GLBalanceSheet.php:89 +#: GLBalanceSheet.php:127 GLProfit_Loss.php:156 GLTagProfit_Loss.php:173 +#: GLTrialBalance.php:150 InventoryPlanning.php:99 InventoryPlanning.php:174 #: InventoryPlanning.php:209 InventoryPlanning.php:252 #: InventoryPlanning.php:286 InventoryPlanningPrefSupplier.php:208 #: InventoryPlanningPrefSupplier.php:276 InventoryPlanningPrefSupplier.php:310 #: InventoryPlanningPrefSupplier.php:353 InventoryPlanningPrefSupplier.php:387 #: InventoryQuantities.php:81 InventoryValuation.php:76 #: MailInventoryValuation.php:115 MRPPlannedPurchaseOrders.php:111 -#: MRPPlannedWorkOrders.php:105 MRPReport.php:133 MRPReschedules.php:46 -#: MRPReschedules.php:58 MRPShortages.php:137 MRPShortages.php:149 -#: OutstandingGRNs.php:51 OutstandingGRNs.php:63 PDFCustomerList.php:20 -#: PDFCustomerList.php:232 PDFCustomerList.php:244 PDFLowGP.php:23 -#: PDFStockCheckComparison.php:35 PDFStockCheckComparison.php:61 -#: PDFStockCheckComparison.php:262 ReorderLevel.php:57 SelectProduct.php:37 -#: StockCheck.php:63 StockCheck.php:135 SuppPriceList.php:118 -#: includes/PDFPaymentRun_PymtFooter.php:148 +#: MRPPlannedWorkOrders.php:105 MRPReport.php:147 MRPReport.php:529 +#: MRPReschedules.php:46 MRPReschedules.php:58 MRPShortages.php:137 +#: MRPShortages.php:149 OutstandingGRNs.php:51 OutstandingGRNs.php:63 +#: PDFCustomerList.php:20 PDFCustomerList.php:232 PDFCustomerList.php:244 +#: PDFLowGP.php:23 PDFStockCheckComparison.php:35 +#: PDFStockCheckComparison.php:61 PDFStockCheckComparison.php:262 +#: ReorderLevel.php:57 SelectAssetType.php:38 SelectProduct.php:37 +#: StockCheck.php:63 StockCheck.php:136 SupplierTenders.php:322 +#: SuppPriceList.php:118 includes/PDFPaymentRun_PymtFooter.php:148 msgid "Problem Report" msgstr "Problém" @@ -771,10 +806,10 @@ #: BOMExtendedQty.php:263 BOMIndented.php:152 BOMIndented.php:238 #: BOMIndentedReverse.php:151 BOMIndentedReverse.php:235 BOMListing.php:51 #: Credit_Invoice.php:186 DebtorsAtPeriodEnd.php:61 DebtorsAtPeriodEnd.php:73 -#: FTP_RadioBeacon.php:188 GetStockImage.php:154 GLBalanceSheet.php:91 -#: GLBalanceSheet.php:129 GLBalanceSheet.php:292 GLProfit_Loss.php:159 -#: GLProfit_Loss.php:171 GLTagProfit_Loss.php:170 GLTagProfit_Loss.php:182 -#: GLTrialBalance.php:143 GLTrialBalance.php:155 InventoryPlanning.php:102 +#: FTP_RadioBeacon.php:188 GetStockImage.php:154 GLBalanceSheet.php:92 +#: GLBalanceSheet.php:130 GLBalanceSheet.php:293 GLProfit_Loss.php:159 +#: GLProfit_Loss.php:171 GLTagProfit_Loss.php:176 GLTagProfit_Loss.php:188 +#: GLTrialBalance.php:153 GLTrialBalance.php:165 InventoryPlanning.php:102 #: InventoryPlannin... [truncated message content] |
From: <dai...@us...> - 2010-08-22 08:06:21
|
Revision: 3697 http://web-erp.svn.sourceforge.net/web-erp/?rev=3697&view=rev Author: daintree Date: 2010-08-22 08:06:14 +0000 (Sun, 22 Aug 2010) Log Message: ----------- contract costing changes - quite a few scripts changed Modified Paths: -------------- trunk/ContractBOM.php trunk/ContractCosting.php trunk/Contracts.php trunk/CounterSales.php trunk/SelectContract.php trunk/SupplierCredit.php trunk/doc/Change.log.html trunk/includes/Contract_Readin.php trunk/includes/DefineContractClass.php trunk/includes/SQL_CommonFunctions.inc trunk/sql/mysql/upgrade3.11.1-3.12.sql Modified: trunk/ContractBOM.php =================================================================== --- trunk/ContractBOM.php 2010-08-21 04:53:42 UTC (rev 3696) +++ trunk/ContractBOM.php 2010-08-22 08:06:14 UTC (rev 3697) @@ -48,7 +48,7 @@ if (isset($_POST['Search'])){ /*ie seach for stock items */ if ($_POST['Keywords'] AND $_POST['StockCode']) { - prnMsg=(_('Stock description keywords have been used in preference to the Stock code extract entered'), 'info'); + prnMsg(_('Stock description keywords have been used in preference to the Stock code extract entered'), 'info'); } if ($_POST['Keywords']) { Modified: trunk/ContractCosting.php =================================================================== --- trunk/ContractCosting.php 2010-08-21 04:53:42 UTC (rev 3696) +++ trunk/ContractCosting.php 2010-08-22 08:06:14 UTC (rev 3697) @@ -9,7 +9,6 @@ /* Session started in header.inc for password checking and authorisation level check */ include('includes/header.inc'); - if (empty($_GET['identifier'])) { $identifier=date('U'); } else { @@ -53,8 +52,15 @@ } echo '<p class="page_title_text"> - <img src="'.$rootpath.'/css/'.$theme.'/images/contract.png" title="' . _('Contract') . '" alt=""> - ' . $_SESSION['Contract'.$identifier]->CustomerName . '<br>' . $_SESSION['Contract'.$identifier]->ContractDescription; + <img src="'.$rootpath.'/css/'.$theme.'/images/contract.png" title="' . _('Contract') . '" alt="">'; +if ($_SESSION['Contract'.$identifier]->Status==3){ + echo _('Closed') . ' '; +} elseif ($_SESSION['Contract'.$identifier]->Status==2){ + echo _('Current Confirmed') . ' '; +} elseif ($_SESSION['Contract'.$identifier]->Status==1){ + echo _('Quoted') . ' '; +} +echo _('Contract') . '<br>' . $_SESSION['Contract'.$identifier]->CustomerName . '<br>' . $_SESSION['Contract'.$identifier]->ContractDescription; echo '<table> <tr> @@ -185,6 +191,226 @@ <td class="number"><b>' . number_format($OtherReqtsActual+$ContractBOMActual,2) . '</b></td></tr>'; echo '</table>'; + + +//Do the processing here after the variances are all calculated above +if (isset($_POST['CloseContract']) AND $_SESSION['Contract'.$identifier]->Status==2){ + + include('includes/SQL_CommonFunctions.inc'); + $GLCodes = GetStockGLCode($_SESSION['Contract'.$identifier]->ContractRef,$db); +//Compare actual costs to original budgeted contract costs - if actual > budgeted - CR WIP and DR usage variance + $Variance = ($OtherReqtsBudget+$ContractBOMBudget)-($OtherReqtsActual+$ContractBOMActual); + + $ContractCloseNo = GetNextTransNo( 32 ,$db); + $PeriodNo = GetPeriod(Date($_SESSION['DefaultDateFormat']), $db); + + DB_Txn_Begin($db); + + $SQL = "INSERT INTO gltrans ( type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES ( 32, + " . $ContractCloseNo . ", + '" . Date('Y-m-d') . "', + '" . $PeriodNo . "', + '" . $GLCodes['wipact'] . "', + '" . _('Variance on contract') . ' ' . $_SESSION['Contract'.$identifier]->ContractRef . "', + '" . -$Variance . "')"; + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The gl entry of WIP for the variance on closing the contract could not be inserted because'); + $DbgMsg = _('The following SQL to insert the GLTrans record was used'); + $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + $SQL = "INSERT INTO gltrans ( type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES ( 32, + " . $ContractCloseNo . ", + '" . Date('Y-m-d') . "', + '" . $PeriodNo . "', + '" . $GLCodes['materialuseagevarac'] . "', + '" . _('Variance on contract') . ' ' . $_SESSION['Contract'.$identifier]->ContractRef . "', + '" . $Variance . "')"; + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The gl entry of WIP for the variance on closing the contract could not be inserted because'); + $DbgMsg = _('The following SQL to insert the GLTrans record was used'); + $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + +//Now update the status of the contract to closed + $SQL = "UPDATE contracts SET status=3 WHERE contractref='" . $_SESSION['Contract'.$identifier]->ContractRef . "'"; + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The status of the contract could not be updated to closed because'); + $DbgMsg = _('The following SQL to change the status of the contract was used'); + $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + +/*Check if the contract work order is still open */ + $CheckIfWOOpenResult = DB_query("SELECT closed + FROM workorders + WHERE wo='" . $_SESSION['Contract'.$identifier]->WO . "'", + $db); + $CheckWORow=DB_fetch_row($CheckIfWOOpenResult); + if ($CheckWORow[0]==0){ + //then close the work order + $CloseWOResult =DB_query("UPDATE workorders + SET closed=1 + WHERE wo='" . $_SESSION['Contract'.$identifier]->WO . "'", + $db, + _('Could not update the work order to closed because:'), + _('The SQL used to close the work order was:'), + true); + + + /* Check if the contract BOM has received the contract item manually + * If not then process this as by closing the contract the user is saying it is complete + * If work done on the contract is a write off then the user must also write off the stock of the contract item as a separate job + */ + + $result =DB_query("SELECT qtyrecd FROM woitems + WHERE stockid='" . $_SESSION['Contract'.$identifier]->ContractRef . "' + AND wo='" . $_SESSION['Contract'.$identifier]->WO . "'",$db); + if (DB_num_rows($result)==1) { + $myrow=DB_fetch_row($result); + if ($myrow[0]==0){ //then the contract wo has not been received (it will only ever be for 1 item) + + $WOReceiptNo = GetNextTransNo(26, $db); + + /* Need to get the current location quantity will need it later for the stock movement */ + $SQL = "SELECT locstock.quantity + FROM locstock + WHERE locstock.stockid='" . $_SESSION['Contract'.$identifier]->ContractRef . "' + AND loccode= '" . $_SESSION['Contract'.$identifier]->LocCode . "'"; + + $Result = DB_query($SQL, $db); + if (DB_num_rows($Result)==1){ + $LocQtyRow = DB_fetch_row($Result); + $QtyOnHandPrior = $LocQtyRow[0]; + } else { + /*There must actually be some error this should never happen */ + $QtyOnHandPrior = 0; + } + + $SQL = "UPDATE locstock + SET quantity = locstock.quantity + 1 + WHERE locstock.stockid = '" . $_SESSION['Contract'.$identifier]->ContractRef . "' + AND loccode= '" . $_SESSION['Contract'.$identifier]->LocCode . "'"; + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The location stock record could not be updated because'); + $DbgMsg = _('The following SQL to update the location stock record was used'); + $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); + + /*Insert stock movements - with unit cost */ + + $SQL = "INSERT INTO stockmoves (stockid, + type, + transno, + loccode, + trandate, + price, + prd, + reference, + qty, + standardcost, + newqoh) + VALUES ('" . $_SESSION['Contract'.$identifier]->ContractRef . "', + 26, + " . $WOReceiptNo . ", + '" . $_SESSION['Contract'.$identifier]->LocCode . "', + '" . Date('Y-m-d') . "', + " . ($OtherReqtsBudget+$ContractBOMBudget) . ", + " . $PeriodNo . ", + '" . $_SESSION['Contract'.$identifier]->WO . "', + 1, + " . ($OtherReqtsBudget+$ContractBOMBudget) . ", + " . ($QtyOnHandPrior + 1) . ")"; + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('stock movement records could not be inserted when processing the work order receipt because'); + $DbgMsg = _('The following SQL to insert the stock movement records was used'); + $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); + + /*Get the ID of the StockMove... */ + $StkMoveNo = DB_Last_Insert_ID($db,'stockmoves','stkmoveno'); + + /* If GLLink_Stock then insert GLTrans to debit the GL Code and credit GRN Suspense account at standard cost*/ + if ($_SESSION['CompanyRecord']['gllink_stock']==1 AND ($OtherReqtsBudget+$ContractBOMBudget)!=0){ + /*GL integration with stock is activated so need the GL journals to make it so */ + + /*first the debit the finished stock of the item received from the WO + the appropriate account was already retrieved into the $StockGLCode variable as the Processing code is kicked off + it is retrieved from the stock category record of the item by a function in SQL_CommonFunctions.inc*/ + + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (26, + " . $WOReceiptNo . ", + '" . Date('Y-m-d') . "', + " . $PeriodNo . ", + " . $GLCodes['stockact'] . ", + '" . $_SESSION['Contract'.$identifier]->WO . ' ' . $_SESSION['Contract'.$identifier]->ContractRef . ' - x 1 @ ' . number_format(($OtherReqtsBudget+$ContractBOMBudget),2) . "', + " . ($OtherReqtsBudget+$ContractBOMBudget) . ')'; + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The receipt of contract work order finished stock GL posting could not be inserted because'); + $DbgMsg = _('The following SQL to insert the work order receipt of finished items GLTrans record was used'); + $Result = DB_query($SQL,$db,$ErrMsg, $DbgMsg, true); + + /*now the credit WIP entry*/ + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (26, + " . $WOReceiptNo . ", + '" . Date('Y-m-d') . "', + " . $PeriodNo . ", + " . $GLCodes['wipact'] . ", + '" . $_SESSION['Contract'.$identifier]->WO . ' ' . $_SESSION['Contract'.$identifier]->ContractRef . ' - x 1 @ ' . number_format(($OtherReqtsBudget+$ContractBOMBudget),2) . "', + " . -($OtherReqtsBudget+$ContractBOMBudget) . ")"; + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The WIP credit on receipt of finished items from a work order GL posting could not be inserted because'); + $DbgMsg = _('The following SQL to insert the WIP GLTrans record was used'); + $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg,true); + + } /* end of if GL and stock integrated and standard cost !=0 */ + + //update the wo with the new qtyrecd + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' ._('Could not update the work order item record with the total quantity received because'); + $DbgMsg = _('The following SQL was used to update the work order'); + $UpdateWOResult =DB_query("UPDATE woitems + SET qtyrecd=qtyrecd+1 + WHERE wo=" . $_SESSION['Contract'.$identifier]->WO . " + AND stockid='" . $_SESSION['Contract'.$identifier]->ContractRef . "'", + $db,$ErrMsg,$DbgMsg,true); + }//end if the contract wo was not received - work order item received/processed above if not + }//end if there was a row returned from the woitems query + } //end if the work order was still open (so end of closing it and processing receipt if necessary) + + DB_Txn_Commit($db); + + $_SESSION['Contract'.$identifier]->Status=3; + prnMsg(_('The contract has been closed. No further charges can be posted against this contract.'),'success'); + +} //end if Closing the contract Close Contract button hit + +if ($_SESSION['Contract'.$identifier]->Status ==2){//the contract is an order being processed now + + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '?' .SID .'&SelectedContract=' . $_SESSION['Contract'.$identifier]->ContractRef . '&identifier=' . $identifier . '">'; + echo '<br><div class="centre"><input type="submit" name="CloseContract" Value="' . _('Close Contract') . '" onclick="return confirm(\'' . _('Closing the contract will prevent further stock being issued to it and charges being made against it. Variances will be taken to the profit and loss account. Are You Sure?') . '\');"></div>'; + echo '</form>'; +} + include('includes/footer.inc'); ?> Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2010-08-21 04:53:42 UTC (rev 3696) +++ trunk/Contracts.php 2010-08-22 08:06:14 UTC (rev 3697) @@ -27,7 +27,7 @@ * unix timestamp will be sufficient. */ -if (empty($_GET['identifier'])) { +if (!isset($_GET['identifier'])) { $identifier=date('U'); } else { $identifier=$_GET['identifier']; @@ -65,6 +65,7 @@ $_SESSION['Contract'.$identifier]->ContractRef=$_POST['ContractRef']; $_SESSION['Contract'.$identifier]->ContractDescription=$_POST['ContractDescription']; $_SESSION['Contract'.$identifier]->CategoryID = $_POST['CategoryID']; + $_SESSION['Contract'.$identifier]->LocCode = $_POST['LocCode']; $_SESSION['Contract'.$identifier]->RequiredDate = $_POST['RequiredDate']; $_SESSION['Contract'.$identifier]->Margin = $_POST['Margin']; $_SESSION['Contract'.$identifier]->CustomerRef = $_POST['CustomerRef']; @@ -201,7 +202,6 @@ * code above if a modification to an existing contract. Also * $ExistingContract would be set to the ContractRef * */ - $_SESSION['ExistingContract']= 0; $_SESSION['Contract'.$identifier] = new Contract; @@ -256,6 +256,7 @@ $_SESSION['Contract'.$identifier]->ContractRef=$_POST['ContractRef']; $_SESSION['Contract'.$identifier]->ContractDescription=$_POST['ContractDescription']; $_SESSION['Contract'.$identifier]->CategoryID = $_POST['CategoryID']; + $_SESSION['Contract'.$identifier]->LocCode = $_POST['LocCode']; $_SESSION['Contract'.$identifier]->RequiredDate = $_POST['RequiredDate']; $_SESSION['Contract'.$identifier]->Margin = $_POST['Margin']; $_SESSION['Contract'.$identifier]->Status = $_POST['Status']; @@ -263,17 +264,17 @@ $_SESSION['Contract'.$identifier]->ExRate = $_POST['ExRate']; /*Get the first work centre for the users location - until we set this up properly */ - $result = DB_query("SELECT code FROM workcentres WHERE location='" . $_SESSION['UserStockLocation'] ."'",$db); + $result = DB_query("SELECT code FROM workcentres WHERE location='" . $_SESSION['Contract'.$identifier]->LocCode ."'",$db); if (DB_num_rows($result)>0){ $WorkCentreRow = DB_fetch_row($result); $WorkCentre = $WorkCentreRow[0]; } else { //need to add a default work centre for the location $result = DB_query("INSERT INTO workcentres (code, location, description, overheadrecoveryact) - VALUES ('" . $_SESSION['UserStockLocation'] . "', - '" . $_SESSION['UserStockLocation'] . "', - '" . _('Default for') . ' ' . $_SESSION['UserStockLocation'] . "', + VALUES ('" . $_SESSION['Contract'.$identifier]->LocCode . "', + '" . $_SESSION['Contract'.$identifier]->LocCode . "', + '" . _('Default for') . ' ' . $_SESSION['Contract'.$identifier]->LocCode . "', '" . '1' . "')",$db); - $WorkCentre = $_SESSION['UserStockLocation']; + $WorkCentre = $_SESSION['Contract'.$identifier]->LocCode; } /*The above is a bit of a hack to get a default workcentre for a location based on the users default location*/ @@ -283,6 +284,7 @@ debtorno, branchcode, categoryid, + loccode, requireddate, margin, customerref, @@ -303,6 +305,7 @@ //then we can accept any changes at all do an update on the whole lot $sql = "UPDATE contracts SET categoryid = '" . $_POST['CategoryID'] ."', requireddate = '" . FormatDateForSQL($_POST['RequiredDate']) . "', + loccode='" . $_POST['LocCode'] . "', margin = " . $_POST['Margin'] . ", customerref = '" . $_POST['CustomerRef'] . "', exrate = " . $_POST['ExRate'] . " @@ -386,23 +389,25 @@ } elseif (!$InputError) { /*Its a new contract - so insert */ $sql = "INSERT INTO contracts ( contractref, - debtorno, - branchcode, - contractdescription, - categoryid, - requireddate, - margin, - customerref, - exrate) + debtorno, + branchcode, + contractdescription, + categoryid, + loccode, + requireddate, + margin, + customerref, + exrate) VALUES ('" . $_POST['ContractRef'] . "', - '" . $_SESSION['Contract'.$identifier]->DebtorNo . "', - '" . $_SESSION['Contract'.$identifier]->BranchCode . "', - '" . $_POST['ContractDescription'] . "', - '" . $_POST['CategoryID'] . "', - '" . FormatDateForSQL($_POST['RequiredDate']) . "', - " . $_POST['Margin'] . ", - '" . $_POST['CustomerRef'] . "', - ". $_POST['ExRate'] .")"; + '" . $_SESSION['Contract'.$identifier]->DebtorNo . "', + '" . $_SESSION['Contract'.$identifier]->BranchCode . "', + '" . $_POST['ContractDescription'] . "', + '" . $_POST['CategoryID'] . "', + '" . $_POST['LocCode'] . "', + '" . FormatDateForSQL($_POST['RequiredDate']) . "', + " . $_POST['Margin'] . ", + '" . $_POST['CustomerRef'] . "', + ". $_POST['ExRate'] .")"; $ErrMsg = _('The new contract could not be added because'); $result = DB_query($sql,$db,$ErrMsg); @@ -411,26 +416,26 @@ $ErrMsg = _('Could not add a component to the contract bill of material'); foreach ($_SESSION['Contract'.$identifier]->ContractBOM as $Component){ $sql = "INSERT INTO contractbom (contractref, - stockid, - workcentreadded, - quantity) + stockid, + workcentreadded, + quantity) VALUES ( '" . $_POST['ContractRef'] . "', - '" . $Component->StockID . "', - '" . $WorkCentre . "', - " . $Component->Quantity . ")"; + '" . $Component->StockID . "', + '" . $WorkCentre . "', + " . $Component->Quantity . ")"; $result = DB_query($sql,$db,$ErrMsg); } $ErrMsg = _('Could not add a requirement to the contract requirements'); foreach ($_SESSION['Contract'.$identifier]->ContractReqts as $Requirement){ $sql = "INSERT INTO contractreqts (contractref, - requirement, - costperunit, - quantity) + requirement, + costperunit, + quantity) VALUES ( '" . $_POST['ContractRef'] . "', - '" . $Requirement->Requirement . "', - '" . $Requirement->CostPerUnit . "', - " . $Requirement->Quantity . ")"; + '" . $Requirement->Requirement . "', + '" . $Requirement->CostPerUnit . "', + " . $Requirement->Quantity . ")"; $result = DB_query($sql,$db,$ErrMsg); } prnMsg(_('The new contract has been added to the database'),'success'); @@ -554,7 +559,7 @@ '" . DB_escape_string($CustomerDetailsRow['braddress6']) . "', '" . DB_escape_string($CustomerDetailsRow['phoneno']) . "', '" . DB_escape_string($CustomerDetailsRow['email']) . "', - '" . DB_escape_string($CustomerDetailsRow['defaultlocation']) ."', + '" . DB_escape_string($_SESSION['Contract'.$identifier]->LocCode) ."', '" . FormatDateForSQL($_SESSION['Contract'.$identifier]->RequiredDate) . "', '" . Date('Y-m-d') . "', '1' )"; @@ -595,7 +600,6 @@ } //end of if making a quotation - if (isset($_POST['SearchCustomers'])){ if (($_POST['CustKeywords']!='') AND (($_POST['CustCode']!='') OR ($_POST['CustPhone']!=''))) { @@ -613,51 +617,51 @@ $SearchString = '%' . str_replace(' ', '%', $_POST['CustKeywords']) . '%'; $SQL = "SELECT custbranch.brname, - custbranch.contactname, - custbranch.phoneno, - custbranch.faxno, - custbranch.branchcode, - custbranch.debtorno, - debtorsmaster.name - FROM custbranch - LEFT JOIN debtorsmaster - ON custbranch.debtorno=debtorsmaster.debtorno - WHERE custbranch.brname " . LIKE . " '$SearchString' - AND custbranch.disabletrans=0 - ORDER BY custbranch.debtorno, custbranch.branchcode"; + custbranch.contactname, + custbranch.phoneno, + custbranch.faxno, + custbranch.branchcode, + custbranch.debtorno, + debtorsmaster.name + FROM custbranch + LEFT JOIN debtorsmaster + ON custbranch.debtorno=debtorsmaster.debtorno + WHERE custbranch.brname " . LIKE . " '$SearchString' + AND custbranch.disabletrans=0 + ORDER BY custbranch.debtorno, custbranch.branchcode"; } elseif (strlen($_POST['CustCode'])>0){ $_POST['CustCode'] = strtoupper(trim($_POST['CustCode'])); $SQL = "SELECT custbranch.brname, - custbranch.contactname, - custbranch.phoneno, - custbranch.faxno, - custbranch.branchcode, - custbranch.debtorno, - debtorsmaster.name - FROM custbranch - LEFT JOIN debtorsmaster - ON custbranch.debtorno=debtorsmaster.debtorno - WHERE custbranch.debtorno " . LIKE . " '%" . $_POST['CustCode'] . "%' OR custbranch.branchcode " . LIKE . " '%" . $_POST['CustCode'] . "%' - AND custbranch.disabletrans=0 - ORDER BY custbranch.debtorno"; - + custbranch.contactname, + custbranch.phoneno, + custbranch.faxno, + custbranch.branchcode, + custbranch.debtorno, + debtorsmaster.name + FROM custbranch + LEFT JOIN debtorsmaster + ON custbranch.debtorno=debtorsmaster.debtorno + WHERE custbranch.debtorno " . LIKE . " '%" . $_POST['CustCode'] . "%' OR custbranch.branchcode " . LIKE . " '%" . $_POST['CustCode'] . "%' + AND custbranch.disabletrans=0 + ORDER BY custbranch.debtorno"; + } elseif (strlen($_POST['CustPhone'])>0){ $SQL = "SELECT custbranch.brname, - custbranch.contactname, - custbranch.phoneno, - custbranch.faxno, - custbranch.branchcode, - custbranch.debtorno, - debtorsmaster.name - FROM custbranch - LEFT JOIN debtorsmaster - ON custbranch.debtorno=debtorsmaster.debtorno - WHERE custbranch.phoneno " . LIKE . " '%" . $_POST['CustPhone'] . "%' - AND custbranch.disabletrans=0 - ORDER BY custbranch.debtorno"; + custbranch.contactname, + custbranch.phoneno, + custbranch.faxno, + custbranch.branchcode, + custbranch.debtorno, + debtorsmaster.name + FROM custbranch + LEFT JOIN debtorsmaster + ON custbranch.debtorno=debtorsmaster.debtorno + WHERE custbranch.phoneno " . LIKE . " '%" . $_POST['CustPhone'] . "%' + AND custbranch.disabletrans=0 + ORDER BY custbranch.debtorno"; } $ErrMsg = _('The searched customer records requested cannot be retrieved because'); @@ -683,20 +687,20 @@ $_SESSION['Contract'.$identifier]->BranchCode = trim($CustomerBranchArray[1]); $sql = "SELECT debtorsmaster.name, - custbranch.brname, - debtorsmaster.currcode, - debtorsmaster.holdreason, - holdreasons.dissallowinvoices, - currencies.rate - FROM debtorsmaster INNER JOIN currencies - ON debtorsmaster.currcode=currencies.currabrev - INNER JOIN custbranch - ON debtorsmaster.debtorno=custbranch.debtorno - INNER JOIN holdreasons - ON debtorsmaster.holdreason=holdreasons.reasoncode - WHERE debtorsmaster.debtorno='" . $_SESSION['Contract'.$identifier]->DebtorNo . "' - AND custbranch.branchcode='" . $_SESSION['Contract'.$identifier]->BranchCode . "'" ; - + custbranch.brname, + debtorsmaster.currcode, + debtorsmaster.holdreason, + holdreasons.dissallowinvoices, + currencies.rate + FROM debtorsmaster INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + INNER JOIN custbranch + ON debtorsmaster.debtorno=custbranch.debtorno + INNER JOIN holdreasons + ON debtorsmaster.holdreason=holdreasons.reasoncode + WHERE debtorsmaster.debtorno='" . $_SESSION['Contract'.$identifier]->DebtorNo . "' + AND custbranch.branchcode='" . $_SESSION['Contract'.$identifier]->BranchCode . "'" ; + $ErrMsg = _('The customer record selected') . ': ' . $_POST['SelectedCustomer'] . ' ' . _('cannot be retrieved because'); $DbgMsg = _('The SQL used to retrieve the customer details and failed was'); @@ -825,7 +829,7 @@ echo '<input type="hidden" name="ContractRef" value="' . $_SESSION['Contract'.$identifier]->ContractRef . '">' . $_SESSION['Contract'.$identifier]->ContractRef; } echo '</td></tr>'; - echo '<tr><td>' . _('Category') . ':</td><td><select name="CategoryID" onChange="ReloadForm(ItemForm.UpdateCategories)">'; + echo '<tr><td>' . _('Category') . ':</td><td><select name="CategoryID" >'; $sql = 'SELECT categoryid, categorydescription FROM stockcategory WHERE stocktype!="A"'; $ErrMsg = _('The stock categories could not be retrieved because'); @@ -842,7 +846,22 @@ echo '</select><a target="_blank" href="'. $rootpath . '/StockCategories.php?' . SID . '">' . _('Add or Modify Contract Categories') . '</a></td></tr>'; + $sql = 'SELECT loccode, locationname FROM locations'; + $ErrMsg = _('The stock locations could not be retrieved because'); + $DbgMsg = _('The SQL used to retrieve stock locations and failed was'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); + + echo '<tr><td>' . _('Location') . ':</td><td><select name="LocCode" >'; + while ($myrow=DB_fetch_array($result)){ + if (!isset($_SESSION['Contract'.$identifier]->LocCode) or $myrow['loccode']==$_SESSION['Contract'.$identifier]->LocCode){ + echo '<option selected VALUE="'. $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } else { + echo '<option VALUE="'. $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } + } + echo '</select></td></tr>'; + echo '<tr><td>' . _('Contract Description'); echo ':</td><td><textarea name="ContractDescription" style="width:100%" rows=5>' . $_SESSION['Contract'.$identifier]->ContractDescription . '</textarea></td></tr>'; Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2010-08-21 04:53:42 UTC (rev 3696) +++ trunk/CounterSales.php 2010-08-22 08:06:14 UTC (rev 3697) @@ -1300,34 +1300,34 @@ $AssParts['standard']=0; } $SQL = "INSERT INTO stockmoves ( - stockid, - type, - transno, - loccode, - trandate, - debtorno, - branchcode, - prd, - reference, - qty, - standardcost, - show_on_inv_crds, - newqoh - ) VALUES ( - '" . $AssParts['component'] . "', - 10, - " . $InvoiceNo . ", - '" . $_SESSION['Items'.$identifier]->Location . "', - '" . $DefaultDispatchDate . "', - '" . $_SESSION['Items'.$identifier]->DebtorNo . "', - '" . $_SESSION['Items'.$identifier]->Branch . "', - " . $PeriodNo . ", - '" . _('Assembly') . ': ' . $OrderLine->StockID . ' ' . _('Order') . ': ' . $OrderNo . "', - " . -$AssParts['quantity'] * $OrderLine->Quantity . ", - " . $AssParts['standard'] . ", - 0, - newqoh-" . ($AssParts['quantity'] * $OrderLine->Quantity) . " - )"; + stockid, + type, + transno, + loccode, + trandate, + debtorno, + branchcode, + prd, + reference, + qty, + standardcost, + show_on_inv_crds, + newqoh + ) VALUES ( + '" . $AssParts['component'] . "', + 10, + " . $InvoiceNo . ", + '" . $_SESSION['Items'.$identifier]->Location . "', + '" . $DefaultDispatchDate . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', + " . $PeriodNo . ", + '" . _('Assembly') . ': ' . $OrderLine->StockID . ' ' . _('Order') . ': ' . $OrderNo . "', + " . -$AssParts['quantity'] * $OrderLine->Quantity . ", + " . $AssParts['standard'] . ", + 0, + newqoh-" . ($AssParts['quantity'] * $OrderLine->Quantity) . " + )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement records for the assembly components of'). ' '. $OrderLine->StockID . ' ' . _('could not be inserted because'); $DbgMsg = _('The following SQL to insert the assembly components stock movement records was used'); @@ -1357,70 +1357,70 @@ } if ($MBFlag=='B' OR $MBFlag=='M'){ $SQL = "INSERT INTO stockmoves ( - stockid, - type, - transno, - loccode, - trandate, - debtorno, - branchcode, - price, - prd, - reference, - qty, - discountpercent, - standardcost, - newqoh, - narrative ) + stockid, + type, + transno, + loccode, + trandate, + debtorno, + branchcode, + price, + prd, + reference, + qty, + discountpercent, + standardcost, + newqoh, + narrative ) VALUES ('" . $OrderLine->StockID . "', - 10, - " . $InvoiceNo . ", - '" . $_SESSION['Items'.$identifier]->Location . "', - '" . $DefaultDispatchDate . "', - '" . $_SESSION['Items'.$identifier]->DebtorNo . "', - '" . $_SESSION['Items'.$identifier]->Branch . "', - " . $LocalCurrencyPrice . ", - " . $PeriodNo . ", - '" . $OrderNo . "', - " . -$OrderLine->Quantity . ", - " . $OrderLine->DiscountPercent . ", - " . $OrderLine->StandardCost . ", - " . ($QtyOnHandPrior - $OrderLine->Quantity) . ", - '" . DB_escape_string($OrderLine->Narrative) . "' )"; + 10, + " . $InvoiceNo . ", + '" . $_SESSION['Items'.$identifier]->Location . "', + '" . $DefaultDispatchDate . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', + " . $LocalCurrencyPrice . ", + " . $PeriodNo . ", + '" . $OrderNo . "', + " . -$OrderLine->Quantity . ", + " . $OrderLine->DiscountPercent . ", + " . $OrderLine->StandardCost . ", + " . ($QtyOnHandPrior - $OrderLine->Quantity) . ", + '" . DB_escape_string($OrderLine->Narrative) . "' )"; } else { // its an assembly or dummy and assemblies/dummies always have nil stock (by definition they are made up at the time of dispatch so new qty on hand will be nil if (empty($OrderLine->StandardCost)) { $OrderLine->StandardCost = 0; } $SQL = "INSERT INTO stockmoves ( - stockid, - type, - transno, - loccode, - trandate, - debtorno, - branchcode, - price, - prd, - reference, - qty, - discountpercent, - standardcost, - narrative ) + stockid, + type, + transno, + loccode, + trandate, + debtorno, + branchcode, + price, + prd, + reference, + qty, + discountpercent, + standardcost, + narrative ) VALUES ('" . $OrderLine->StockID . "', - 10, - " . $InvoiceNo . ", - '" . $_SESSION['Items'.$identifier]->Location . "', - '" . $DefaultDispatchDate . "', - '" . $_SESSION['Items'.$identifier]->DebtorNo . "', - '" . $_SESSION['Items'.$identifier]->Branch . "', - " . $LocalCurrencyPrice . ", - " . $PeriodNo . ", - '" . $OrderNo . "', - " . -$OrderLine->Quantity . ", - " . $OrderLine->DiscountPercent . ", - " . $OrderLine->StandardCost . ", - '" . DB_escape_string($OrderLine->Narrative) . "')"; + 10, + " . $InvoiceNo . ", + '" . $_SESSION['Items'.$identifier]->Location . "', + '" . $DefaultDispatchDate . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', + " . $LocalCurrencyPrice . ", + " . $PeriodNo . ", + '" . $OrderNo . "', + " . -$OrderLine->Quantity . ", + " . $OrderLine->DiscountPercent . ", + " . $OrderLine->StandardCost . ", + '" . DB_escape_string($OrderLine->Narrative) . "')"; } $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement records could not be inserted because'); Modified: trunk/SelectContract.php =================================================================== --- trunk/SelectContract.php 2010-08-21 04:53:42 UTC (rev 3696) +++ trunk/SelectContract.php 2010-08-22 08:06:14 UTC (rev 3697) @@ -187,12 +187,15 @@ echo '<td>' . _('n/a') . '</td>'; } if ($myrow['status']==2){ //the customer has accepted the quote but not completed contract yet - echo '<td><a href="' . $IssueToWOPage . '">' . $myrow['wo'] . '</a></td> - <td><a href="' . $CostingPage . '">' . _('View') . '<a></td>'; + echo '<td><a href="' . $IssueToWOPage . '">' . $myrow['wo'] . '</a></td>'; } else { - echo '<td>' . _('n/a') . '</td> - <td>' . _('n/a') . '</td>'; + echo '<td>' . _('n/a') . '</td>'; } + if ($myrow['status']==2 OR $myrow['status']==3){ + echo '<td><a href="' . $CostingPage . '">' . _('View') . '<a></td>'; + } else { + echo '<td>' . _('n/a') . '</td>'; + } echo '<td>' . $myrow['contractref'] . '</td> <td>' . $myrow['contractdescription'] . '</td> <td>' . $myrow['customername'] . '</td> Modified: trunk/SupplierCredit.php =================================================================== --- trunk/SupplierCredit.php 2010-08-21 04:53:42 UTC (rev 3696) +++ trunk/SupplierCredit.php 2010-08-22 08:06:14 UTC (rev 3697) @@ -687,7 +687,7 @@ amount) VALUES (21, ' . $CreditNoteNo . ", - '" . SQLCreditNoteDate. "', + '" . $SQLCreditNoteDate. "', '" . $PeriodNo . "', '". $WIPAccount . "', '" . $_SESSION['SuppTrans']->SupplierID . ' ' . _('Contract charge against') . ' ' . $Contract->ContractRef . "', Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-08-21 04:53:42 UTC (rev 3696) +++ trunk/doc/Change.log.html 2010-08-22 08:06:14 UTC (rev 3697) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>21/08/10 Phil: Contract closing changes all the contracts scripts <p>20/08/10 Paul Thursby: More $msg cleanup. Unused eliminated; Others replaced with prnMsg().</p> <p>15/08/10 Phil: Decided to have contracts as part of orders module since not really enough links to warrant a new module changes to index.php WWW_Users.php and sql upgrade.</p> <p>15/08/10 Phil: New script for ContractCosting.php comparison of contract costs budgeted vs incurred. Lot of work on contracts</p> Modified: trunk/includes/Contract_Readin.php =================================================================== --- trunk/includes/Contract_Readin.php 2010-08-21 04:53:42 UTC (rev 3696) +++ trunk/includes/Contract_Readin.php 2010-08-22 08:06:14 UTC (rev 3697) @@ -5,6 +5,7 @@ $ContractHeaderSQL = "SELECT contractdescription, contracts.debtorno, contracts.branchcode, + contracts.loccode, status, categoryid, orderno, @@ -21,7 +22,8 @@ INNER JOIN currencies ON debtorsmaster.currcode=currencies.currabrev INNER JOIN custbranch - ON debtorsmaster.debtorno=custbranch.debtorno + ON debtorsmaster.debtorno=custbranch.debtorno + AND contracts.branchcode=custbranch.branchcode WHERE contractref= '" . $ContractRef . "'"; $ErrMsg = _('The contract cannot be retrieved because'); @@ -35,6 +37,7 @@ $_SESSION['Contract'.$identifier]->ContractDescription = $myrow['contractdescription']; $_SESSION['Contract'.$identifier]->DebtorNo = $myrow['debtorno']; $_SESSION['Contract'.$identifier]->BranchCode = $myrow['branchcode']; + $_SESSION['Contract'.$identifier]->LocCode = $myrow['loccode']; $_SESSION['Contract'.$identifier]->Status = $myrow['status']; $_SESSION['Contract'.$identifier]->CategoryID = $myrow['categoryid']; $_SESSION['Contract'.$identifier]->OrderNo = $myrow['orderno']; Modified: trunk/includes/DefineContractClass.php =================================================================== --- trunk/includes/DefineContractClass.php 2010-08-21 04:53:42 UTC (rev 3696) +++ trunk/includes/DefineContractClass.php 2010-08-22 08:06:14 UTC (rev 3697) @@ -11,9 +11,10 @@ var $CustomerName; var $BranchCode; var $BranchName; - var $Status; /* 100 = initiated - 1=quoted - 2=completed */ + var $Status; /* 100 = initiated - 1=quoted - 2=ordered - 3=completed */ var $CategoryID; /* the category where the contract will be when converted to an item for quotation*/ var $OrderNo; /* the order number created when the contract is quoted */ + var $LocCode; /* the inventory location where the contract is to be performed */ var $CustomerRef; var $Margin; /*the margin used in quoting for the contract */ var $WO; /*the wo created when the quotation is converted to an order */ Modified: trunk/includes/SQL_CommonFunctions.inc =================================================================== --- trunk/includes/SQL_CommonFunctions.inc 2010-08-21 04:53:42 UTC (rev 3696) +++ trunk/includes/SQL_CommonFunctions.inc 2010-08-22 08:06:14 UTC (rev 3697) @@ -41,14 +41,14 @@ /*Gets the GL Codes relevant to the stock item account from the stock category record */ $QuerySQL = "SELECT stockact, - adjglact, - purchpricevaract, - materialuseagevarac, - wipact - FROM stockmaster, - stockcategory - WHERE stockmaster.categoryid=stockcategory.categoryid - AND stockmaster.stockid = '" . $StockID . "'"; + adjglact, + purchpricevaract, + materialuseagevarac, + wipact + FROM stockmaster, + stockcategory + WHERE stockmaster.categoryid=stockcategory.categoryid + AND stockmaster.stockid = '" . $StockID . "'"; $ErrMsg = _('The stock GL codes could not be retrieved because'); $GetStkGLResult = DB_query($QuerySQL, $db, $ErrMsg); Modified: trunk/sql/mysql/upgrade3.11.1-3.12.sql =================================================================== --- trunk/sql/mysql/upgrade3.11.1-3.12.sql 2010-08-21 04:53:42 UTC (rev 3696) +++ trunk/sql/mysql/upgrade3.11.1-3.12.sql 2010-08-22 08:06:14 UTC (rev 3697) @@ -206,6 +206,7 @@ `contractdescription` text NOT NULL DEFAULT '', `debtorno` varchar(10) NOT NULL DEFAULT '', `branchcode` varchar(10) NOT NULL DEFAULT '', + `loccode` varchar(5) NOT NULL DEFAULT '', `status` tinyint NOT NULL DEFAULT 0, `categoryid` varchar(6) NOT NULL DEFAULT '', `orderno` int(11) NOT NULL DEFAULT '0', @@ -220,9 +221,11 @@ KEY `CategoryID` (`categoryid`), KEY `Status` (`status`), KEY `WO` (`wo`), + KEY `loccode` (`loccode`), KEY `DebtorNo` (`debtorno`,`branchcode`), CONSTRAINT `contracts_ibfk_1` FOREIGN KEY (`debtorno`, `branchcode`) REFERENCES `custbranch` (`debtorno`, `branchcode`), - CONSTRAINT `contracts_ibfk_2` FOREIGN KEY (`categoryid`) REFERENCES `stockcategory` (`categoryid`) + CONSTRAINT `contracts_ibfk_2` FOREIGN KEY (`categoryid`) REFERENCES `stockcategory` (`categoryid`), + CONSTRAINT `contracts_ibfk_3` FOREIGN KEY (`loccode`) REFERENCES `locations` (`loccode`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -297,3 +300,4 @@ CONSTRAINT `contractcharges_ibfk_2` FOREIGN KEY (`transtype`) REFERENCES `systypes` (`typeid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +INSERT INTO `systypes` (`typeid`, `typename`, `typeno`) VALUES ('32', 'Contract Close', '1'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2010-08-22 08:12:32
|
Revision: 3698 http://web-erp.svn.sourceforge.net/web-erp/?rev=3698&view=rev Author: daintree Date: 2010-08-22 08:12:26 +0000 (Sun, 22 Aug 2010) Log Message: ----------- Fix some incorrect prnMsg calls from Pauls patch Modified Paths: -------------- trunk/BOMs.php trunk/doc/Change.log.html Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2010-08-22 08:06:14 UTC (rev 3697) +++ trunk/BOMs.php 2010-08-22 08:12:26 UTC (rev 3698) @@ -733,7 +733,7 @@ $_POST['StockCode']='%'; } if ($_POST['Keywords'] AND $_POST['StockCode']) { - prnMsg=( _('Stock description keywords have been used in preference to the Stock code extract entered'), 'info' ); + prnMsg( _('Stock description keywords have been used in preference to the Stock code extract entered'), 'info' ); } if ($_POST['Keywords']=='' AND $_POST['StockCode']=='') { prnMsg( _('At least one stock description keyword or an extract of a stock code must be entered for the search'), 'info' ); Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-08-22 08:06:14 UTC (rev 3697) +++ trunk/doc/Change.log.html 2010-08-22 08:12:26 UTC (rev 3698) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>21/08/10 Phil: Fix bugs introduced by Paul's patch prnMsg= should be prnMsg() BOMs.php also did in Contracts.php <p>21/08/10 Phil: Contract closing changes all the contracts scripts <p>20/08/10 Paul Thursby: More $msg cleanup. Unused eliminated; Others replaced with prnMsg().</p> <p>15/08/10 Phil: Decided to have contracts as part of orders module since not really enough links to warrant a new module changes to index.php WWW_Users.php and sql upgrade.</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-08-27 10:06:14
|
Revision: 3699 http://web-erp.svn.sourceforge.net/web-erp/?rev=3699&view=rev Author: tim_schofield Date: 2010-08-27 10:06:07 +0000 (Fri, 27 Aug 2010) Log Message: ----------- Add requisition number into purchase order prints Modified Paths: -------------- trunk/SupplierInvoice.php trunk/companies/weberpdemo/FormDesigns/PurchaseOrder.xml trunk/doc/Change.log.html trunk/includes/PO_PDFOrderPageHeader.inc Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2010-08-22 08:12:26 UTC (rev 3698) +++ trunk/SupplierInvoice.php 2010-08-27 10:06:07 UTC (rev 3699) @@ -312,7 +312,7 @@ echo '<tr><td colspan=2 class=number><font size=4 color=blue>' . _('Total') . ':</font></td> <td class=number><font size=4 color=BLUE><U>' . number_format($TotalShiptValue,2) . '</U></font></td></tr></table>'; } - + if (count( $_SESSION['SuppTrans']->Contracts) > 0){ /*if there are any contract charges on the invoice*/ echo '<table cellpadding="2">'; @@ -326,7 +326,7 @@ foreach ($_SESSION['SuppTrans']->Contracts as $Contract){ echo '<tr><td>' . $Contract->ContractRef . '</td> - <td class=number>' . number_format($Contract->Amount,2) . '</td> + <td class=number>' . number_format($Contract->Amount,2) . '</td> <td>' . $Contract->Narrative . '</td> </tr>'; @@ -350,7 +350,7 @@ if (count($_SESSION['SuppTrans']->GLCodes) > 0){ echo '<br><table cellpadding=2>'; $TableHeader = '<tr><th>' . _('Account') . '</th> - <th>' . _('Name') . '</th> + <th>' . _('Name') . '</th> <th>' . _('Amount') . '<br>' . _('in') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th> <th>' . _('Shipment') . '</th> <th>' . _('Narrative') . '</th></tr>'; @@ -362,7 +362,7 @@ echo '<tr><td>' . $EnteredGLCode->GLCode . '</td> <td>' . $EnteredGLCode->GLActName . '</td> - <td class=number>' . number_format($EnteredGLCode->Amount,2) . '</td> + <td class=number>' . number_format($EnteredGLCode->Amount,2) . '</td> <td>' . $EnteredGLCode->ShiptRef . '</td> <td>' . $EnteredGLCode->Narrative . '</td></tr>'; @@ -461,15 +461,12 @@ $DisplayTotal = number_format(( $_SESSION['SuppTrans']->OvAmount + $TaxTotal), 2); - echo '<tr><td>' . _('Invoice Total') . ':</td> - <td colspan=2 class="number"><b>' . $DisplayTotal . '</b></td> - </tr></table>'; + echo '<tr><td>' . _('Invoice Total') . ':</td><td colspan=2 class=number><b>' . $DisplayTotal . '</b></td></tr></table>'; - echo '<table><tr><td>' . _('Comments') . '</td> - <td><textarea name="Comments" cols="40" rows="2">' . $_SESSION['SuppTrans']->Comments . '</textarea></td> - </tr></table>'; + echo '<table><tr><td>' . _('Comments') . '</td><td><TEXTAREA name=Comments COLS=40 ROWS=2>' . + $_SESSION['SuppTrans']->Comments . '</TEXTAREa></td></tr></table>'; - echo '<p><div class="centre"><input type="submit" name="PostInvoice" value="' . _('Enter Invoice') . '"></div>'; + echo "<p><div class='centre'><input type=submit name='PostInvoice' VALUE='" . _('Enter Invoice') . "'></div>"; } else { //do the postings -and dont show the button to process @@ -478,11 +475,13 @@ foreach ($_SESSION['SuppTrans']->Taxes as $Tax) { + /*Set the tax rate to what was entered */ if (isset($_POST['TaxRate' . $Tax->TaxCalculationOrder])){ $_SESSION['SuppTrans']->Taxes[$Tax->TaxCalculationOrder]->TaxRate = $_POST['TaxRate' . $Tax->TaxCalculationOrder]/100; } + if ($_POST['OverRideTax']=='Auto' OR !isset($_POST['OverRideTax'])){ /*Now recaluclate the tax depending on the method */ @@ -513,7 +512,7 @@ } $InputError = False; - if ( ($TaxTotal + $_SESSION['SuppTrans']->OvAmount) <= 0){ + if ( $TaxTotal + $_SESSION['SuppTrans']->OvAmount <= 0){ $InputError = True; prnMsg(_('The invoice as entered cannot be processed because the total amount of the invoice is less than or equal to 0') . '. ' . _('Invoices are expected to have a charge'),'error'); @@ -521,7 +520,7 @@ $InputError = True; prnMsg(_('The invoice as entered cannot be processed because the there is no suppliers invoice number or reference entered') . '. ' . _('The supplier invoice number must be entered'),'error'); - } elseif (!Is_Date( $_SESSION['SuppTrans']->TranDate)){ + } elseif (!is_date( $_SESSION['SuppTrans']->TranDate)){ $InputError = True; prnMsg( _('The invoice as entered cannot be processed because the invoice date entered is not in the format') . ' ' . $_SESSION['DefaultDateFormat'],'error'); @@ -529,19 +528,19 @@ $InputError = True; prnMsg(_('The invoice as entered cannot be processed because the invoice date is after today') . '. ' . _('Purchase invoices are expected to have a date prior to or today'),'error'); - } elseif ( $_SESSION['SuppTrans']->ExRate <= 0){ + }elseif ( $_SESSION['SuppTrans']->ExRate <= 0){ $InputError = True; prnMsg( _('The invoice as entered cannot be processed because the exchange rate for the invoice has been entered as a negative or zero number') . '. ' . _('The exchange rate is expected to show how many of the suppliers currency there are in 1 of the local currency'),'error'); - } elseif ( $_SESSION['SuppTrans']->OvAmount < round($TotalShiptValue + $TotalGLValue + $TotalGRNValue,2)){ + }elseif ( $_SESSION['SuppTrans']->OvAmount < round($TotalShiptValue + $TotalGLValue + $TotalGRNValue,2)){ prnMsg( _('The invoice total as entered is less than the sum of the shipment charges, the general ledger entries (if any) and the charges for goods received') . '. ' . _('There must be a mistake somewhere, the invoice as entered will not be processed'),'error'); $InputError = True; } else { $sql = "SELECT count(*) - FROM supptrans - WHERE supplierno='" . $_SESSION['SuppTrans']->SupplierID . "' - AND supptrans.suppreference='" . $_POST['SuppReference'] . "'"; + FROM supptrans + WHERE supplierno='" . $_SESSION['SuppTrans']->SupplierID . "' + AND supptrans.suppreference='" . $_POST['SuppReference'] . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sql to check for the previous entry of the same invoice failed'); $DbgMsg = _('The following SQL to start an SQL transaction was used'); @@ -561,7 +560,13 @@ /*Start an SQL transaction */ - DB_Txn_Begin($db); + $SQL = 'BEGIN'; + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The database does not support transactions'); + $DbgMsg = _('The following SQL to start an SQL transaction was used'); + + $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, True); + /*Get the next transaction number for internal purposes and the period to post GL transactions in based on the invoice date*/ $InvoiceNo = GetNextTransNo(20, $db); $PeriodNo = GetPeriod( $_SESSION['SuppTrans']->TranDate, $db); @@ -574,8 +579,6 @@ /*the postings here are a little tricky, the logic goes like this: if its a shipment entry then the cost must go against the GRN suspense account defined in the company record - if its a contract charge then a contract charge record is created - the work in progress account of the stock category of the contract item is debited - if its a general ledger amount it goes straight to the account specified if its a GRN amount invoiced then there are two possibilities: @@ -656,53 +659,30 @@ $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, True); - $LocalTotal += ($ShiptChg->Amount/ $_SESSION['SuppTrans']->ExRate); + $LocalTotal += $ShiptChg->Amount/ $_SESSION['SuppTrans']->ExRate; } - - foreach ($_SESSION['SuppTrans']->Contracts as $Contract){ + $sql='SELECT conversionfactor + FROM purchdata + WHERE supplierno="'.$_SESSION['SuppTrans']->SupplierID.'" + AND stockid="'.$EnteredGRN->ItemCode.'"'; + $result=DB_query($sql, $db); + if (DB_num_rows($result)>0) { + $myrow=DB_fetch_array($result); + $conversionfactor=$myrow['conversionfactor']; + } else { + $conversionfactor=1; + } - /*contract postings need to get the WIP from the contract item's stock category record - * debit postings to this WIP account - * the WIP account is tidied up when the contract is closed*/ - $result = DB_query("SELECT wipact FROM stockcategory - INNER JOIN stockmaster ON - stockcategory.categoryid=stockmaster.categoryid - WHERE stockmaster.stockid='" . $Contract->ContractRef . "'",$db); - $WIPRow = DB_fetch_row($result); - $WIPAccount = $WIPRow[0]; + foreach ($_SESSION['SuppTrans']->GRNs as $EnteredGRN){ - $SQL = 'INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES (20, ' . - $InvoiceNo . ", - '" . $SQLInvoiceDate . "', - '" . $PeriodNo . "', - '". $WIPAccount . "', - '" . $_SESSION['SuppTrans']->SupplierID . ' ' . _('Contract charge against') . ' ' . $Contract->ContractRef . "', - '" . ($Contract->Amount/ $_SESSION['SuppTrans']->ExRate) . "')"; - - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction for the contract') . ' ' . $Contract->ContractRef . ' ' . _('could not be added because'); - - $DbgMsg = _('The following SQL to insert the GL transaction was used'); - - $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, True); - - $LocalTotal += ($Contract->Amount/ $_SESSION['SuppTrans']->ExRate); - - } - foreach ($_SESSION['SuppTrans']->GRNs as $EnteredGRN){ - if (strlen($EnteredGRN->ShiptRef) == 0 OR $EnteredGRN->ShiptRef == 0){ /*so its not a shipment item enter the GL entry to reverse the GRN suspense entry created on delivery at standard cost used on delivery */ - - if ($EnteredGRN->StdCostUnit * $EnteredGRN->This_QuantityInv != 0) { + if ($_SESSION['WeightedAverageCosting']==1){ + $EnteredGRN->StdCostUnit=0; + } // If WeightedAverageCosting=1, directly posting purchasing cost to material + if ($EnteredGRN->StdCostUnit * ($EnteredGRN->This_QuantityInv * $conversionfactor) != 0) { $SQL = 'INSERT INTO gltrans (type, typeno, trandate, @@ -714,9 +694,9 @@ '" . $SQLInvoiceDate . "', " . $PeriodNo . ', ' . $_SESSION['SuppTrans']->GRNAct . ", - '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('GRN') . ' ' . $EnteredGRN->GRNNo . ' - ' . $EnteredGRN->ItemCode . ' x ' . $EnteredGRN->This_QuantityInv . ' @ ' . + '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('GRN') . ' ' . $EnteredGRN->GRNNo . ' - ' . $EnteredGRN->ItemCode . ' x ' . $EnteredGRN->This_QuantityInv * $conversionfactor . ' @ ' . _('std cost of') . ' ' . $EnteredGRN->StdCostUnit . "', - " . $EnteredGRN->StdCostUnit * $EnteredGRN->This_QuantityInv . ')'; + " . $EnteredGRN->StdCostUnit * $EnteredGRN->This_QuantityInv * $conversionfactor . ')'; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction could not be added because'); @@ -726,11 +706,18 @@ } - $PurchPriceVar = round($EnteredGRN->This_QuantityInv * (($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit),2); - /*Yes.... but where to post this difference to - if its a stock item the variance account must be retrieved from the stock category record if its a nominal purchase order item with no stock item then there will be no standard cost and it will all be variance so post it to the account specified in the purchase order detail record */ + $PurchPriceVar = round($EnteredGRN->This_QuantityInv * (($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit * $conversionfactor),2); + // echo "\$PurchPriceVar is: ".$PurchPriceVar."<br/>"; + // echo "\$EnteredGRN->StdCostUnit is:"."$EnteredGRN->StdCostUnit"."<br/>"; + // echo "\$EnteredGRN->ChgPrice is:".$EnteredGRN->ChgPrice."<br/>"; + + /*Yes.... but where to post this difference to - if its a stock item the variance account must be retrieved from the stock category record + if its a nominal purchase order item with no stock item then there will be no standard cost and it will all be variance so post it to the + account specified in the purchase order detail record */ + if ($PurchPriceVar !=0){ /* don't bother with this lot if there is no difference ! */ if (strlen($EnteredGRN->ItemCode)>0 OR $EnteredGRN->ItemCode != ''){ /*so it is a stock item */ @@ -764,30 +751,27 @@ $WriteOffToVariances =0; - if ($EnteredGRN->This_QuantityInv > $TotalQuantityOnHand){ + if ($EnteredGRN->This_QuantityInv * $conversionfactor > $TotalQuantityOnHand){ /*So we need to write off some of the variance to variances and only the balance of the quantity in stock to go to stock value */ - $WriteOffToVariances = ($EnteredGRN->This_QuantityInv + $WriteOffToVariances = ($EnteredGRN->This_QuantityInv * $conversionfactor - $TotalQuantityOnHand) - * (($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit); + * (($EnteredGRN->ChgPric / $conversionfactor/ $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit); $SQL = 'INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES (20, ' . - $InvoiceNo . ", - '" . $SQLInvoiceDate . "', - " . $PeriodNo . ', - ' . $StockGLCode['purchpricevaract'] . ", - '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('GRN') . ' ' . $EnteredGRN->GRNNo . - ' - ' . $EnteredGRN->ItemCode . ' x ' . ($EnteredGRN->This_QuantityInv-$TotalQuantityOnHand) . ' x ' . _('price var of') . ' ' . - number_format(($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . "', - " . $WriteOffToVariances . ')'; + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (20, ' . + $InvoiceNo . ", '" . $SQLInvoiceDate . "', " . $PeriodNo . ', ' . $StockGLCode['purchpricevaract'] . + ", '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('GRN') . ' ' . $EnteredGRN->GRNNo . + ' - ' . $EnteredGRN->ItemCode . ' x ' . ($EnteredGRN->This_QuantityInv * $conversionfactor-$TotalQuantityOnHand) . ' x ' . _('price var of') . ' ' . + number_format(($EnteredGRN->ChgPrice / $conversionfactor / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . + "', " . $WriteOffToVariances . ')'; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction could not be added for the price variance of the stock item because'); $DbgMsg = _('The following SQL to insert the GL transaction was used'); @@ -811,7 +795,7 @@ ' . $StockGLCode['stockact'] . ", '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('Average Cost Adj') . ' - ' . $EnteredGRN->ItemCode . ' x ' . $TotalQuantityOnHand . ' x ' . - number_format(($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . + number_format(($EnteredGRN->ChgPrice / $conversionfactor / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . "', " . ($PurchPriceVar - $WriteOffToVariances) . ')'; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction could not be added for the price variance of the stock item because'); @@ -822,6 +806,7 @@ /*Now to update the stock cost with the new weighted average */ /*Need to consider what to do if the cost has been changed manually between receiving the stock and entering the invoice - this code assumes there has been no cost updates made manually and all the price variance is posted to stock. + A nicety or important?? */ @@ -830,6 +815,7 @@ if ($TotalQuantityOnHand>0) { + $CostIncrement = ($PurchPriceVar - $WriteOffToVariances) / $TotalQuantityOnHand; $sql = "UPDATE stockmaster SET lastcost=materialcost+overheadcost+labourcost, @@ -837,7 +823,7 @@ $Result = DB_query($sql, $db, $ErrMsg, $DbgMsg, True); } else { $sql = "UPDATE stockmaster SET lastcost=materialcost+overheadcost+labourcost, - materialcost=" . ($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) . " WHERE stockid='" . $EnteredGRN->ItemCode . "'"; + materialcost=" . ($EnteredGRN->ChgPrice / $conversionfactor / $_SESSION['SuppTrans']->ExRate) . " WHERE stockid='" . $EnteredGRN->ItemCode . "'"; $Result = DB_query($sql, $db, $ErrMsg, $DbgMsg, True); } /* End of Weighted Average Costing Code */ @@ -865,7 +851,9 @@ } } else { - /* its a nominal purchase order item that is not on a shipment so post the whole lot to the GLCode specified in the order, the purchase price var is actually the diff between the order price and the actual invoice price since the std cost was made equal to the order price in local currency at the time the goods were received */ + /* its a nominal purchase order item that is not on a shipment so post the whole lot to the GLCode specified in the order, the purchase price var is actually the diff between the + order price and the actual invoice price since the std cost was made equal to the order price in local currency at the time + the goods were received */ $SQL = 'INSERT INTO gltrans (type, typeno, @@ -980,14 +968,6 @@ } /*Thats the end of the GL postings */ - /*Shoel the invoice be on hold */ - $Hold=0; - foreach ($_SESSION['SuppTrans']->GRNs as $EnteredGRN){ - if ($EnteredGRN->Hold) { - $Hold=1; - } - } - /*Now insert the invoice into the SuppTrans table*/ $SQL = 'INSERT INTO supptrans (transno, @@ -996,24 +976,20 @@ suppreference, trandate, duedate, - inputdate, ovamount, ovgst, rate, - transtext, - hold) + transtext) VALUES ('. $InvoiceNo . ", 20 , '" . $_SESSION['SuppTrans']->SupplierID . "', '" . $_SESSION['SuppTrans']->SuppReference . "', '" . $SQLInvoiceDate . "', '" . FormatDateForSQL($_SESSION['SuppTrans']->DueDate) . "', - '" . date('Y-m-d H-i-s') . "', - '" . round($_SESSION['SuppTrans']->OvAmount,2) . "', - '" . round($TaxTotal,2) . "', - '" . $_SESSION['SuppTrans']->ExRate . "', - '" . $_SESSION['SuppTrans']->Comments . "', - " . $Hold . ")"; + " . round($_SESSION['SuppTrans']->OvAmount,2) . ', + ' . round($TaxTotal,2) . ', + ' . $_SESSION['SuppTrans']->ExRate . ", + '" . $_SESSION['SuppTrans']->Comments . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The supplier invoice transaction could not be added to the database because'); @@ -1062,7 +1038,7 @@ $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, True); - if (strlen($EnteredGRN->ShiptRef)>0 AND $EnteredGRN->ShiptRef != '0'){ //if the the GRN is on a shipment + if (strlen($EnteredGRN->ShiptRef)>0 AND $EnteredGRN->ShiptRef != '0'){ /* insert the shipment charge records */ @@ -1088,35 +1064,37 @@ } /* end of the loop to do the updates for the quantity of order items the supplier has invoiced */ - /*Add contract charges records as necessary */ + /*Add shipment charges records as necessary */ - foreach ($_SESSION['SuppTrans']->Contracts as $Contract){ - - if($Contract->AnticipatedCost ==true){ - $Anticipated =1; - } else { - $Anticipated =0; - } - $SQL = "INSERT INTO contractcharges (contractref, - transtype, - transno, - amount, - narrative, - anticipated) - VALUES ('" . $Contract->ContractRef . "', - '20', - '" . $InvoiceNo . "', - '" . $Contract->Amount/ $_SESSION['SuppTrans']->ExRate . "', - '" . $Contract->Narrative . "', - '" . $Anticipated . "')"; + foreach ($_SESSION['SuppTrans']->Shipts as $ShiptChg){ - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The contract charge record for contract') . ' ' . $Contract->ContractRef . ' ' . _('could not be added because'); - $DbgMsg = _('The following SQL to insert the contract charge record was used'); + $SQL = 'INSERT INTO shipmentcharges (shiptref, + transtype, + transno, + value) + VALUES (' . $ShiptChg->ShiptRef . ', + 20, + ' . $InvoiceNo . ', + ' . $ShiptChg->Amount/ $_SESSION['SuppTrans']->ExRate . ')'; + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The shipment charge record for the shipment') . + ' ' . $ShiptChg->ShiptRef . ' ' . _('could not be added because'); + + $DbgMsg = _('The following SQL to insert the Shipment charge record was used'); + $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, True); + } - DB_Txn_Commit($db); + $SQL="COMMIT"; + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The SQL COMMIT failed because'); + + $DbgMsg = _('The SQL COMMIT failed'); + + $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, True); + prnMsg(_('Supplier invoice number') . ' ' . $InvoiceNo . ' ' . _('has been processed'),'success'); echo '<br><div class="centre"><a href="' . $rootpath . '/SupplierInvoice.php?&SupplierID=' .$_SESSION['SuppTrans']->SupplierID . '">' . _('Enter another Invoice for this Supplier') . '</a></div>'; unset( $_SESSION['SuppTrans']->GRNs); @@ -1129,4 +1107,4 @@ echo '</form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/companies/weberpdemo/FormDesigns/PurchaseOrder.xml =================================================================== --- trunk/companies/weberpdemo/FormDesigns/PurchaseOrder.xml 2010-08-22 08:12:26 UTC (rev 3698) +++ trunk/companies/weberpdemo/FormDesigns/PurchaseOrder.xml 2010-08-27 10:06:07 UTC (rev 3699) @@ -146,6 +146,11 @@ <y>274</y> </Line4> </SupplierAddress> + <RequisitionNumber type="SimpleText" name="Requisition Number" id="RequisitionNumber"> + <FontSize>12</FontSize> + <x>446</x> + <y>236</y> + </RequisitionNumber> <OrderDate type="SimpleText" name="Order date" id="OrderDate"> <FontSize>12</FontSize> <x>446</x> Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-08-22 08:12:26 UTC (rev 3698) +++ trunk/doc/Change.log.html 2010-08-27 10:06:07 UTC (rev 3699) @@ -1,7 +1,8 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> -<p>21/08/10 Phil: Fix bugs introduced by Paul's patch prnMsg= should be prnMsg() BOMs.php also did in Contracts.php -<p>21/08/10 Phil: Contract closing changes all the contracts scripts +<p>27/08/10 Tim: Add in rfequisition number into purchase order prints.</p> +<p>21/08/10 Phil: Fix bugs introduced by Paul's patch prnMsg= should be prnMsg() BOMs.php also did in Contracts.php</p> +<p>21/08/10 Phil: Contract closing changes all the contracts scripts</p> <p>20/08/10 Paul Thursby: More $msg cleanup. Unused eliminated; Others replaced with prnMsg().</p> <p>15/08/10 Phil: Decided to have contracts as part of orders module since not really enough links to warrant a new module changes to index.php WWW_Users.php and sql upgrade.</p> <p>15/08/10 Phil: New script for ContractCosting.php comparison of contract costs budgeted vs incurred. Lot of work on contracts</p> Modified: trunk/includes/PO_PDFOrderPageHeader.inc =================================================================== --- trunk/includes/PO_PDFOrderPageHeader.inc 2010-08-22 08:12:26 UTC (rev 3698) +++ trunk/includes/PO_PDFOrderPageHeader.inc 2010-08-27 10:06:07 UTC (rev 3699) @@ -44,6 +44,9 @@ $pdf->addText($FormDesign->SupplierAddress->Line2->x,$Page_Height - $FormDesign->SupplierAddress->Line2->y, $FormDesign->SupplierAddress->Line2->FontSize, $POHeader['address2']); $pdf->addText($FormDesign->SupplierAddress->Line3->x,$Page_Height - $FormDesign->SupplierAddress->Line3->y, $FormDesign->SupplierAddress->Line3->FontSize, $POHeader['address3']); $pdf->addText($FormDesign->SupplierAddress->Line4->x,$Page_Height - $FormDesign->SupplierAddress->Line4->y, $FormDesign->SupplierAddress->Line4->FontSize, $POHeader['address4']); +/*Now the Requisition Number */ +$pdf->addText($FormDesign->RequisitionNumber->x,$Page_Height - $FormDesign->RequisitionNumber->y, $FormDesign->RequisitionNumber->FontSize, _('Requisition Number') . ':' ); +$pdf->addText($FormDesign->RequisitionNumber->x+120,$Page_Height - $FormDesign->RequisitionNumber->y, $FormDesign->RequisitionNumber->FontSize, $POHeader['requisitionno']); /*Now the Order date */ $pdf->addText($FormDesign->OrderDate->x,$Page_Height - $FormDesign->OrderDate->y, $FormDesign->OrderDate->FontSize, _('Order Date') . ':' ); $pdf->addText($FormDesign->OrderDate->x+70,$Page_Height - $FormDesign->OrderDate->y, $FormDesign->OrderDate->FontSize, ConvertSQLDate($POHeader['orddate'])); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2010-08-27 21:24:16
|
Revision: 3700 http://web-erp.svn.sourceforge.net/web-erp/?rev=3700&view=rev Author: daintree Date: 2010-08-27 21:24:10 +0000 (Fri, 27 Aug 2010) Log Message: ----------- Marcos fix to assembly components stock quantities in stockmoves Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/doc/Change.log.html Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2010-08-27 10:06:07 UTC (rev 3699) +++ trunk/ConfirmDispatch_Invoice.php 2010-08-27 21:24:10 UTC (rev 3700) @@ -977,34 +977,34 @@ $AssParts['standard']=0; } $SQL = "INSERT INTO stockmoves ( - stockid, - type, - transno, - loccode, - trandate, - debtorno, - branchcode, - prd, - reference, - qty, - standardcost, - show_on_inv_crds, - newqoh - ) VALUES ( - '" . $AssParts['component'] . "', - 10, - '" . $InvoiceNo . "', - '" . $_SESSION['Items']->Location . "', - '" . $DefaultDispatchDate . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', - '" . $PeriodNo . "', - '" . _('Assembly') . ': ' . $OrderLine->StockID . ' ' . _('Order') . ': ' . $_SESSION['ProcessingOrder'] . "', - '" . -$AssParts['quantity'] * $OrderLine->QtyDispatched . "', - '" . $AssParts['standard'] . "', - 0, - newqoh-" . ($AssParts['quantity'] * $OrderLine->QtyDispatched) . "' - )"; + stockid, + type, + transno, + loccode, + trandate, + debtorno, + branchcode, + prd, + reference, + qty, + standardcost, + show_on_inv_crds, + newqoh + ) VALUES ( + '" . $AssParts['component'] . "', + 10, + '" . $InvoiceNo . "', + '" . $_SESSION['Items']->Location . "', + '" . $DefaultDispatchDate . "', + '" . $_SESSION['Items']->DebtorNo . "', + '" . $_SESSION['Items']->Branch . "', + '" . $PeriodNo . "', + '" . _('Assembly') . ': ' . $OrderLine->StockID . ' ' . _('Order') . ': ' . $_SESSION['ProcessingOrder'] . "', + '" . -$AssParts['quantity'] * $OrderLine->QtyDispatched . "', + '" . $AssParts['standard'] . "', + 0, + '" . ($QtyOnHandPrior - $AssParts['quantity'] * $OrderLine->QtyDispatched) . "' + )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement records for the assembly components of'). ' '. $OrderLine->StockID . ' ' . _('could not be inserted because'); $DbgMsg = _('The following SQL to insert the assembly components stock movement records was used'); @@ -1012,9 +1012,9 @@ $SQL = "UPDATE locstock - SET quantity = locstock.quantity - " . $AssParts['quantity'] * $OrderLine->QtyDispatched . " - WHERE locstock.stockid = '" . $AssParts['component'] . "' - AND loccode = '" . $_SESSION['Items']->Location . "'"; + SET quantity = locstock.quantity - " . $AssParts['quantity'] * $OrderLine->QtyDispatched . " + WHERE locstock.stockid = '" . $AssParts['component'] . "' + AND loccode = '" . $_SESSION['Items']->Location . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Location stock record could not be updated for an assembly component because'); $DbgMsg = _('The following SQL to update the locations stock record for the component was used'); @@ -1165,37 +1165,37 @@ /*Insert Sales Analysis records */ $SQL="SELECT COUNT(*), - salesanalysis.stockid, - salesanalysis.stkcategory, - salesanalysis.cust, - salesanalysis.custbranch, - salesanalysis.area, - salesanalysis.periodno, - salesanalysis.typeabbrev, - salesanalysis.salesperson - FROM salesanalysis, - custbranch, - stockmaster - WHERE salesanalysis.stkcategory=stockmaster.categoryid - AND salesanalysis.stockid=stockmaster.stockid - AND salesanalysis.cust=custbranch.debtorno - AND salesanalysis.custbranch=custbranch.branchcode - AND salesanalysis.area=custbranch.area - AND salesanalysis.salesperson=custbranch.salesman - AND salesanalysis.typeabbrev ='" . $_SESSION['Items']->DefaultSalesType . "' - AND salesanalysis.periodno='" . $PeriodNo . "' - AND salesanalysis.cust " . LIKE . " '" . $_SESSION['Items']->DebtorNo . "' - AND salesanalysis.custbranch " . LIKE . " '" . $_SESSION['Items']->Branch . "' - AND salesanalysis.stockid " . LIKE . " '" . $OrderLine->StockID . "' - AND salesanalysis.budgetoractual=1 - GROUP BY salesanalysis.stockid, - salesanalysis.stkcategory, - salesanalysis.cust, - salesanalysis.custbranch, - salesanalysis.area, - salesanalysis.periodno, - salesanalysis.typeabbrev, - salesanalysis.salesperson"; + salesanalysis.stockid, + salesanalysis.stkcategory, + salesanalysis.cust, + salesanalysis.custbranch, + salesanalysis.area, + salesanalysis.periodno, + salesanalysis.typeabbrev, + salesanalysis.salesperson + FROM salesanalysis, + custbranch, + stockmaster + WHERE salesanalysis.stkcategory=stockmaster.categoryid + AND salesanalysis.stockid=stockmaster.stockid + AND salesanalysis.cust=custbranch.debtorno + AND salesanalysis.custbranch=custbranch.branchcode + AND salesanalysis.area=custbranch.area + AND salesanalysis.salesperson=custbranch.salesman + AND salesanalysis.typeabbrev ='" . $_SESSION['Items']->DefaultSalesType . "' + AND salesanalysis.periodno='" . $PeriodNo . "' + AND salesanalysis.cust " . LIKE . " '" . $_SESSION['Items']->DebtorNo . "' + AND salesanalysis.custbranch " . LIKE . " '" . $_SESSION['Items']->Branch . "' + AND salesanalysis.stockid " . LIKE . " '" . $OrderLine->StockID . "' + AND salesanalysis.budgetoractual=1 + GROUP BY salesanalysis.stockid, + salesanalysis.stkcategory, + salesanalysis.cust, + salesanalysis.custbranch, + salesanalysis.area, + salesanalysis.periodno, + salesanalysis.typeabbrev, + salesanalysis.salesperson"; $ErrMsg = _('The count of existing Sales analysis records could not run because'); $DbgMsg = '<br>'. _('SQL to count the no of sales analysis records'); Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-08-27 10:06:07 UTC (rev 3699) +++ trunk/doc/Change.log.html 2010-08-27 21:24:10 UTC (rev 3700) @@ -1,8 +1,11 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> + +<p> 28/8/10 Marcos Garcia Trejo: Fix ConfirmDispatchInvoice.php assembly components new qty on hand </p> <p>27/08/10 Tim: Add in rfequisition number into purchase order prints.</p> <p>21/08/10 Phil: Fix bugs introduced by Paul's patch prnMsg= should be prnMsg() BOMs.php also did in Contracts.php</p> <p>21/08/10 Phil: Contract closing changes all the contracts scripts</p> +>>>>>>> .r3699 <p>20/08/10 Paul Thursby: More $msg cleanup. Unused eliminated; Others replaced with prnMsg().</p> <p>15/08/10 Phil: Decided to have contracts as part of orders module since not really enough links to warrant a new module changes to index.php WWW_Users.php and sql upgrade.</p> <p>15/08/10 Phil: New script for ContractCosting.php comparison of contract costs budgeted vs incurred. Lot of work on contracts</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-08-31 07:49:56
|
Revision: 3702 http://web-erp.svn.sourceforge.net/web-erp/?rev=3702&view=rev Author: tim_schofield Date: 2010-08-31 07:49:50 +0000 (Tue, 31 Aug 2010) Log Message: ----------- Change quantity input field to have more than 5 digits Modified Paths: -------------- trunk/StockLocTransfer.php trunk/doc/Change.log.html Modified: trunk/StockLocTransfer.php =================================================================== --- trunk/StockLocTransfer.php 2010-08-27 21:36:45 UTC (rev 3701) +++ trunk/StockLocTransfer.php 2010-08-31 07:49:50 UTC (rev 3702) @@ -191,7 +191,7 @@ } echo '<tr> <td><input type=text name="StockID' . $i .'" size=21 maxlength=20 value="' . $_POST['StockID' . $i] . '"></td> - <td><input type=text name="StockQTY' . $i .'" size=5 maxlength=4 class="number" value="' . $_POST['StockQTY' . $i] . '"></td> + <td><input type=text name="StockQTY' . $i .'" size=10 maxlength=10 class="number" value="' . $_POST['StockQTY' . $i] . '"></td> </tr>'; } }else { @@ -209,7 +209,7 @@ } echo '<tr> <td><input type=text name="StockID' . $i .'" size=21 maxlength=20 value="' . $_POST['StockID' . $i] . '"></td> - <td><input type=text name="StockQTY' . $i .'" size=5 maxlength=4 class="number" value="' . $_POST['StockQTY' . $i] . '"></td> + <td><input type=text name="StockQTY' . $i .'" size=10 maxlength=10 class="number" value="' . $_POST['StockQTY' . $i] . '"></td> </tr>'; $i++; } Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-08-27 21:36:45 UTC (rev 3701) +++ trunk/doc/Change.log.html 2010-08-31 07:49:50 UTC (rev 3702) @@ -1,7 +1,7 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> - -<p> 28/8/10 Marcos Garcia Trejo: Fix ConfirmDispatchInvoice.php assembly components new qty on hand </p> +<p>31/08/10 Tim: StockLocTransfer.php - Change quantity input field to have more than 5 digits</p> +<p>28/08/10 Marcos Garcia Trejo: Fix ConfirmDispatchInvoice.php assembly components new qty on hand </p> <p>27/08/10 Tim: Add in rfequisition number into purchase order prints.</p> <p>21/08/10 Phil: Fix bugs introduced by Paul's patch prnMsg= should be prnMsg() BOMs.php also did in Contracts.php</p> <p>21/08/10 Phil: Contract closing changes all the contracts scripts</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-09-05 09:32:15
|
Revision: 3703 http://web-erp.svn.sourceforge.net/web-erp/?rev=3703&view=rev Author: tim_schofield Date: 2010-09-05 09:32:08 +0000 (Sun, 05 Sep 2010) Log Message: ----------- Database changes required for report writer Modified Paths: -------------- trunk/doc/Change.log.html trunk/sql/mysql/upgrade3.11.1-3.12.sql Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-08-31 07:49:50 UTC (rev 3702) +++ trunk/doc/Change.log.html 2010-09-05 09:32:08 UTC (rev 3703) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>31/08/10 Ricard: upgrade3.11.1-3.12.sql - Database changes required for changes to report writer.</p> <p>31/08/10 Tim: StockLocTransfer.php - Change quantity input field to have more than 5 digits</p> <p>28/08/10 Marcos Garcia Trejo: Fix ConfirmDispatchInvoice.php assembly components new qty on hand </p> <p>27/08/10 Tim: Add in rfequisition number into purchase order prints.</p> Modified: trunk/sql/mysql/upgrade3.11.1-3.12.sql =================================================================== --- trunk/sql/mysql/upgrade3.11.1-3.12.sql 2010-08-31 07:49:50 UTC (rev 3702) +++ trunk/sql/mysql/upgrade3.11.1-3.12.sql 2010-09-05 09:32:08 UTC (rev 3703) @@ -301,3 +301,29 @@ ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `systypes` (`typeid`, `typename`, `typeno`) VALUES ('32', 'Contract Close', '1'); + +ALTER TABLE `reports` ADD `col9width` INT( 3 ) NOT NULL DEFAULT '25' AFTER `col8width` ; + +ALTER TABLE `reports` ADD `col10width` INT( 3 ) NOT NULL DEFAULT '25' AFTER `col9width` ; + +ALTER TABLE `reports` ADD `col11width` INT( 3 ) NOT NULL DEFAULT '25' AFTER `col10width` ; + +ALTER TABLE `reports` ADD `col12width` INT( 3 ) NOT NULL DEFAULT '25' AFTER `col11width` ; + +ALTER TABLE `reports` ADD `col13width` INT( 3 ) NOT NULL DEFAULT '25' AFTER `col12width` ; + +ALTER TABLE `reports` ADD `col14width` INT( 3 ) NOT NULL DEFAULT '25' AFTER `col13width` ; + +ALTER TABLE `reports` ADD `col15width` INT( 3 ) NOT NULL DEFAULT '25' AFTER `col14width` ; + +ALTER TABLE `reports` ADD `col16width` INT( 3 ) NOT NULL DEFAULT '25' AFTER `col15width` ; + +ALTER TABLE `reports` ADD `col17width` INT( 3 ) NOT NULL DEFAULT '25' AFTER `col16width` ; + +ALTER TABLE `reports` ADD `col18width` INT( 3 ) NOT NULL DEFAULT '25' AFTER `col17width` ; + +ALTER TABLE `reports` ADD `col19width` INT( 3 ) NOT NULL DEFAULT '25' AFTER `col18width` ; + +ALTER TABLE `reports` ADD `col20width` INT( 3 ) NOT NULL DEFAULT '25' AFTER `col19width` ; + +ALTER TABLE `reportfields` CHANGE `fieldname` `fieldname` VARCHAR( 80) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT ''; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-09-05 10:36:26
|
Revision: 3704 http://web-erp.svn.sourceforge.net/web-erp/?rev=3704&view=rev Author: tim_schofield Date: 2010-09-05 10:36:19 +0000 (Sun, 05 Sep 2010) Log Message: ----------- List stock transactions by transaction type. Modified Paths: -------------- trunk/doc/Change.log.html trunk/index.php Added Paths: ----------- trunk/PDFStockTransListing.php trunk/includes/PDFStockTransListingPageHeader.inc Added: trunk/PDFStockTransListing.php =================================================================== --- trunk/PDFStockTransListing.php (rev 0) +++ trunk/PDFStockTransListing.php 2010-09-05 10:36:19 UTC (rev 3704) @@ -0,0 +1,144 @@ +<?php + +/* $Id$*/ + +/* $Revision: 1.13 $ */ + +$PageSecurity = 3; +include('includes/SQL_CommonFunctions.inc'); +include ('includes/session.inc'); + +$InputError=0; +if (isset($_POST['Date']) AND !Is_Date($_POST['Date'])){ + $msg = _('The date must be specified in the format') . ' ' . $_SESSION['DefaultDateFormat']; + $InputError=1; + unset($_POST['Date']); +} + +if (!isset($_POST['Date'])){ + + $title = _('Stock Transaction Listing'); + include ('includes/header.inc'); + + echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="">' . ' ' + . _('Stock Transaction Listing').'</img></p></div>'; + + if ($InputError==1){ + prnMsg($msg,'error'); + } + + echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '>'; + echo '<table class=selection> + <tr> + <td>' . _('Enter the date for which the transactions are to be listed') . ":</td> + <td><input type=text name='Date' maxlength=10 size=10 class=date alt='" . $_SESSION['DefaultDateFormat'] . "' value='" . Date($_SESSION['DefaultDateFormat']) . "'></td> + </tr>"; + + echo '<tr><td>' . _('Transaction type') . '</td><td>'; + + echo "<select name='TransType'>"; + + echo '<option value=10>' . _('Sales Invoice').'</option>'; + echo '<option value=11>' . _('Sales Credit Note').'</option>'; + echo '<option value=16>' . _('Location Transfer').'</option>'; + echo '<option value=17>' . _('Stock Adjustment').'</option>'; + echo '<option value=25>' . _('Purchase Order Delivery').'</option>'; + echo '<option value=26>' . _('Work Order Receipt').'</option>'; + echo '<option value=28>' . _('Work Order Issue').'</option>'; + + echo '</select></td></tr>'; + + echo "</select></td></tr></table><br><div class='centre'><input type=submit name='Go' value='" . _('Create PDF') . "'></div>"; + + + include('includes/footer.inc'); + exit; +} else { + + include('includes/ConnectDB.inc'); +} + +$sql= "SELECT stockmoves.type, + stockmoves.stockid, + stockmaster.description, + stockmaster.decimalplaces, + stockmoves.transno, + stockmoves.trandate, + stockmoves.qty, + stockmoves.reference, + stockmoves.narrative, + locations.locationname + FROM stockmoves + LEFT JOIN stockmaster + ON stockmoves.stockid=stockmaster.stockid + LEFT JOIN locations + ON stockmoves.loccode=locations.loccode + WHERE type='" . $_POST['TransType'] . "' + AND date_format(trandate, '%Y-%m-%d')='".FormatDateForSQL($_POST['Date'])."'"; + +$result=DB_query($sql,$db,'','',false,false); + +if (DB_error_no($db)!=0){ + $title = _('Transaction Listing'); + include('includes/header.inc'); + prnMsg(_('An error occurred getting the transactions'),'error'); + include('includes/footer.inc'); + exit; +} elseif (DB_num_rows($result) == 0){ + $title = _('Transaction Listing'); + include('includes/header.inc'); + echo '<br>'; + prnMsg (_('There were no transactions found in the database for the date') . ' ' . $_POST['Date'] .'. '._('Please try again selecting a different date'), 'info'); + include('includes/footer.inc'); + exit; +} + +include('includes/PDFStarter.php'); + +/*PDFStarter.php has all the variables for page size and width set up depending on the users default preferences for paper size */ + +$pdf->addInfo('Title',_('Stock Transaction Listing')); +$pdf->addInfo('Subject',_('Stock transaction listing from') . ' ' . $_POST['Date'] ); +$line_height=12; +$PageNumber = 1; + +include ('includes/PDFStockTransListingPageHeader.inc'); + +while ($myrow=DB_fetch_array($result)){ + + $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,160,$FontSize,$myrow['description'], 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+162,$YPos,80,$FontSize,$myrow['transno'], 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+242,$YPos,70,$FontSize,ConvertSQLDate($myrow['trandate']), 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+312,$YPos,70,$FontSize,number_format($myrow['qty'],$myrow['decimalplaces']), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+382,$YPos,70,$FontSize,$myrow['locationname'], 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,$myrow['reference'], 'right'); + + $YPos -= ($line_height); + + if ($YPos - (2 *$line_height) < $Bottom_Margin){ + /*Then set up a new page */ + $PageNumber++; + include ('includes/PDFStockTransListingPageHeader.inc'); + } /*end of new page header */ +} /* end of while there are customer receipts in the batch to print */ + + +$YPos-=$line_height; + +/* UldisN +$pdfcode = $pdf->output(); +$len = strlen($pdfcode); +header('Content-type: application/pdf'); +header('Content-Length: ' . $len); +header('Content-Disposition: inline; filename=ChequeListing.pdf'); +header('Expires: 0'); +header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); +header('Pragma: public'); + +$pdf->stream(); +*/ +$ReportFileName = $_SESSION['DatabaseName'] . '_StockTransListing_' . date('Y-m-d').'.pdf'; +$pdf->OutputD($ReportFileName);//UldisN +$pdf->__destruct(); //UldisN + +?> \ No newline at end of file Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-09-05 09:32:08 UTC (rev 3703) +++ trunk/doc/Change.log.html 2010-09-05 10:36:19 UTC (rev 3704) @@ -1,6 +1,7 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> -<p>31/08/10 Ricard: upgrade3.11.1-3.12.sql - Database changes required for changes to report writer.</p> +<p>05/09/10 Tim: PDFStockTransListing.php - List stock transactions by transaction type.</p> +<p>05/09/10 Ricard: upgrade3.11.1-3.12.sql - Database changes required for changes to report writer.</p> <p>31/08/10 Tim: StockLocTransfer.php - Change quantity input field to have more than 5 digits</p> <p>28/08/10 Marcos Garcia Trejo: Fix ConfirmDispatchInvoice.php assembly components new qty on hand </p> <p>27/08/10 Tim: Add in rfequisition number into purchase order prints.</p> Added: trunk/includes/PDFStockTransListingPageHeader.inc =================================================================== --- trunk/includes/PDFStockTransListingPageHeader.inc (rev 0) +++ trunk/includes/PDFStockTransListingPageHeader.inc 2010-09-05 10:36:19 UTC (rev 3704) @@ -0,0 +1,79 @@ +<?php +/* $Id$*/ +if ($PageNumber>1){ + $pdf->newPage(); +} + +$YPos = $Page_Height - $Top_Margin - 50; + +$pdf->addJpegFromFile($_SESSION['LogoFile'],$Left_Margin,$YPos,0,50); + +$FontSize=15; + +Switch ($_POST['TransType']) { + case 10: + $TransType=_('Customer Invoices'); + break; + case 11: + $TransType=_('Customer Credit Notes'); + break; + case 16: + $TransType=_('Location Transfers'); + break; + case 17: + $TransType=_('Stock Adjustments'); + break; + case 25: + $TransType=_('Purchase Order Deliveries'); + break; + case 26: + $TransType=_('Work Order Receipts'); + break; + case 28: + $TransType=_('Work Order Issues'); + break; +} + +$XPos = $Page_Width/2; +$YPos += 30; +$pdf->addText($XPos, $YPos,$FontSize, $_SESSION['CompanyRecord']['coyname']); +$FontSize=12; +$pdf->addText($XPos, $YPos-20,$FontSize, $TransType . ' ' ._('dated') . ' ' . $_POST['Date']); + +$XPos = $Page_Width-$Right_Margin-50; +$YPos -=30; +$pdf->addText($XPos, $YPos+10,$FontSize, _('Page') . ': ' . $PageNumber); + +/*Now print out the company name and address */ +$XPos = $Left_Margin; +$YPos -= $line_height; + +/*draw a square grid for entering line items */ +$pdf->line($XPos, $YPos,$Page_Width-$Right_Margin, $YPos); +$pdf->line($Page_Width-$Right_Margin, $YPos,$Page_Width-$Right_Margin, $Bottom_Margin); +$pdf->line($Page_Width-$Right_Margin, $Bottom_Margin,$XPos, $Bottom_Margin); +$pdf->line($XPos, $Bottom_Margin,$XPos, $YPos); + +$pdf->line($Left_Margin+160, $YPos,$Left_Margin+160, $Bottom_Margin); +$pdf->line($Left_Margin+240, $YPos,$Left_Margin+240, $Bottom_Margin); +$pdf->line($Left_Margin+310, $YPos,$Left_Margin+310, $Bottom_Margin); +$pdf->line($Left_Margin+384, $YPos,$Left_Margin+384, $Bottom_Margin); +$pdf->line($Left_Margin+454, $YPos,$Left_Margin+454, $Bottom_Margin); + +$YPos -= $line_height; +/*Set up headings */ +$FontSize=8; + +$LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,160,$FontSize,_('Stock Item'), 'left'); +$LeftOvers = $pdf->addTextWrap($Left_Margin+162,$YPos,80,$FontSize,_('Reference'), 'left'); +$LeftOvers = $pdf->addTextWrap($Left_Margin+242,$YPos,70,$FontSize,_('Trans Date'), 'left'); +$LeftOvers = $pdf->addTextWrap($Left_Margin+312,$YPos,70,$FontSize,_('Quantity'), 'right'); +$LeftOvers = $pdf->addTextWrap($Left_Margin+382,$YPos,70,$FontSize,_('Location'), 'right'); +$LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,_('Reference'), 'right'); +$YPos-=$line_height; + +/*draw a line */ +$pdf->line($XPos, $YPos,$Page_Width-$Right_Margin, $YPos); + +$YPos -= ($line_height); +?> \ No newline at end of file Modified: trunk/index.php =================================================================== --- trunk/index.php 2010-09-05 09:32:08 UTC (rev 3703) +++ trunk/index.php 2010-09-05 10:36:19 UTC (rev 3704) @@ -226,7 +226,7 @@ <td class="menu_group_items"> <!-- Orders Maintenance options --> <table width="100%"> <tr> - <td class="menu_group_items"> + <td class="menu_group_items"> <table width="100%" class="table_index"> <tr> <td class="menu_group_item"> @@ -691,7 +691,13 @@ </td> </tr> <tr> + <tr> <td class="menu_group_item"> + <?php echo '<p>• <a href="' . $rootpath . '/PDFStockTransListing.php?' . SID . '">' . _('Daily Stock Transaction Listing') . '</a></p>'; ?> + </td> + </tr> + <tr> + <td class="menu_group_item"> <?php echo GetRptLinks('inv'); ?> </td> </tr> @@ -1342,7 +1348,7 @@ </table> <?php break; - + Case 'PC': /* Petty Cash Module */ ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-09-05 13:08:39
|
Revision: 3705 http://web-erp.svn.sourceforge.net/web-erp/?rev=3705&view=rev Author: tim_schofield Date: 2010-09-05 13:08:32 +0000 (Sun, 05 Sep 2010) Log Message: ----------- Show authorised, notes, and receipt fields correctly. Changed to use DB_fetch_array() rather than DB_fetch_row(). Modified Paths: -------------- trunk/PcAssignCashToTab.php trunk/doc/Change.log.html Modified: trunk/PcAssignCashToTab.php =================================================================== --- trunk/PcAssignCashToTab.php 2010-09-05 10:36:19 UTC (rev 3704) +++ trunk/PcAssignCashToTab.php 2010-09-05 13:08:32 UTC (rev 3705) @@ -217,7 +217,7 @@ $k=0; //row colour counter - while ($myrow = DB_fetch_row($result)) { + while ($myrow = DB_fetch_array($result)) { if ($k==1){ echo '<tr class="EvenTableRows">'; $k=0; @@ -237,28 +237,28 @@ $Description['0']='ASSIGNCASH'; } - if (($myrow['5'] == "0000-00-00") and ($Description['0'] == 'ASSIGNCASH')){ + if (($myrow['authorized'] == "0000-00-00") and ($Description['0'] == 'ASSIGNCASH')){ // only cash assignations NOT authorized can be modified or deleted - echo "<td>".ConvertSQLDate($myrow['2'])."</td> + echo "<td>".ConvertSQLDate($myrow['date'])."</td> <td>".$Description['0']."</td> - <td class=number>".number_format($myrow['4'],2)."</td> - <td>".ConvertSQLDate($myrow['5'])."</td> - <td>".$myrow['7']."</td> - <td>".$myrow['8']."</td> - <td><a href='".$_SERVER['PHP_SELF'] . '?' . SID ."SelectedIndex=".$myrow['0']."&SelectedTabs=" . + <td class=number>".number_format($myrow['amount'],2)."</td> + <td>".ConvertSQLDate($myrow['authorized'])."</td> + <td>".$myrow['notes']."</td> + <td>".$myrow['receipt']."</td> + <td><a href='".$_SERVER['PHP_SELF'] . '?' . SID ."SelectedIndex=".$myrow['counterindex']."&SelectedTabs=" . $SelectedTabs . "&Days=" . $Days . "&edit=yes'>" . _('Edit') . "</td> - <td><a href='".$_SERVER['PHP_SELF'] . '?' . SID ."SelectedIndex=".$myrow['0']."&SelectedTabs=" . + <td><a href='".$_SERVER['PHP_SELF'] . '?' . SID ."SelectedIndex=".$myrow['counterindex']."&SelectedTabs=" . $SelectedTabs . "&Days=" . $Days . "&delete=yes' onclick=\"return confirm('" . _('Are you sure you wish to delete this code and the expense it may have set up?') . "');\">" . _('Delete') . "</td> </tr>"; }else{ - echo "<td>".ConvertSQLDate($myrow['2'])."</td> + echo "<td>".ConvertSQLDate($myrow['date'])."</td> <td>".$Description['0']."</td> - <td class=number>".number_format($myrow['4'],2)."</td> - <td>".ConvertSQLDate($myrow['5'])."</td> - <td>".ConvertSQLDate($myrow['5'])."</td> - <td>".$myrow['7']."</td> + <td class=number>".number_format($myrow['amount'],2)."</td> + <td>".ConvertSQLDate($myrow['authorized'])."</td> + <td>".$myrow['notes']."</td> + <td>".$myrow['receipt']."</td> </tr>"; } } Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-09-05 10:36:19 UTC (rev 3704) +++ trunk/doc/Change.log.html 2010-09-05 13:08:32 UTC (rev 3705) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>05/09/10 Tim: PcAssignCashToTab.php - Show authorised, notes, and receipt fields correctly. Changed to use DB_fetch_array() rather than DB_fetch_row().</p> <p>05/09/10 Tim: PDFStockTransListing.php - List stock transactions by transaction type.</p> <p>05/09/10 Ricard: upgrade3.11.1-3.12.sql - Database changes required for changes to report writer.</p> <p>31/08/10 Tim: StockLocTransfer.php - Change quantity input field to have more than 5 digits</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-09-05 14:56:01
|
Revision: 3706 http://web-erp.svn.sourceforge.net/web-erp/?rev=3706&view=rev Author: tim_schofield Date: 2010-09-05 14:55:54 +0000 (Sun, 05 Sep 2010) Log Message: ----------- Update correct status when language not English Modified Paths: -------------- trunk/PO_AuthoriseMyOrders.php trunk/doc/Change.log.html Modified: trunk/PO_AuthoriseMyOrders.php =================================================================== --- trunk/PO_AuthoriseMyOrders.php 2010-09-05 13:08:32 UTC (rev 3705) +++ trunk/PO_AuthoriseMyOrders.php 2010-09-05 14:55:54 UTC (rev 3706) @@ -85,10 +85,10 @@ echo '<td><a href="mailto:'.$myrow['email'].'">'.$myrow['realname'].'</td>'; echo '<td>'.ConvertSQLDate($myrow['deliverydate']).'</td>'; echo '<td><select name=status'.$myrow['orderno'].'>'; - echo '<option selected value="'._('Pending').'">'._('Pending').'</option>'; - echo '<option value="'._('Authorised').'">'._('Authorised').'</option>'; - echo '<option value="'._('Rejected').'">'._('Rejected').'</option>'; - echo '<option value="'._('Cancelled').'">'._('Cancelled').'</option>'; + echo '<option selected value="Pending">'._('Pending').'</option>'; + echo '<option value="Authorised">'._('Authorised').'</option>'; + echo '<option value="Rejected">'._('Rejected').'</option>'; + echo '<option value="Cancelled">'._('Cancelled').'</option>'; echo '</select></td>'; echo '</tr>'; echo "<input type='hidden' name='comment' value='".$myrow['stat_comment']."'>"; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-09-05 13:08:32 UTC (rev 3705) +++ trunk/doc/Change.log.html 2010-09-05 14:55:54 UTC (rev 3706) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>05/09/10 Tim: PO_AuthoriseMyOrders.php - Update correct status when language not English</p> <p>05/09/10 Tim: PcAssignCashToTab.php - Show authorised, notes, and receipt fields correctly. Changed to use DB_fetch_array() rather than DB_fetch_row().</p> <p>05/09/10 Tim: PDFStockTransListing.php - List stock transactions by transaction type.</p> <p>05/09/10 Ricard: upgrade3.11.1-3.12.sql - Database changes required for changes to report writer.</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-09-06 07:15:26
|
Revision: 3707 http://web-erp.svn.sourceforge.net/web-erp/?rev=3707&view=rev Author: tim_schofield Date: 2010-09-06 07:15:20 +0000 (Mon, 06 Sep 2010) Log Message: ----------- Correct the roundings so that the double entry balances Modified Paths: -------------- trunk/SupplierInvoice.php trunk/doc/Change.log.html Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2010-09-05 14:55:54 UTC (rev 3706) +++ trunk/SupplierInvoice.php 2010-09-06 07:15:20 UTC (rev 3707) @@ -650,7 +650,7 @@ " . $PeriodNo . ', ' . $_SESSION['SuppTrans']->GRNAct . ", '" . $_SESSION['SuppTrans']->SupplierID . ' ' . _('Shipment charge against') . ' ' . $ShiptChg->ShiptRef . "', - " . $ShiptChg->Amount/ $_SESSION['SuppTrans']->ExRate . ')'; + " . round($ShiptChg->Amount/ $_SESSION['SuppTrans']->ExRate,2) . ')'; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction for the shipment') . ' ' . $ShiptChg->ShiptRef . ' ' . _('could not be added because'); @@ -659,7 +659,7 @@ $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, True); - $LocalTotal += $ShiptChg->Amount/ $_SESSION['SuppTrans']->ExRate; + $LocalTotal += round($ShiptChg->Amount/ $_SESSION['SuppTrans']->ExRate,2); } $sql='SELECT conversionfactor @@ -696,7 +696,7 @@ ' . $_SESSION['SuppTrans']->GRNAct . ", '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('GRN') . ' ' . $EnteredGRN->GRNNo . ' - ' . $EnteredGRN->ItemCode . ' x ' . $EnteredGRN->This_QuantityInv * $conversionfactor . ' @ ' . _('std cost of') . ' ' . $EnteredGRN->StdCostUnit . "', - " . $EnteredGRN->StdCostUnit * $EnteredGRN->This_QuantityInv * $conversionfactor . ')'; + " . round($EnteredGRN->StdCostUnit * $EnteredGRN->This_QuantityInv * $conversionfactor,2) . ')'; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction could not be added because'); @@ -770,7 +770,7 @@ $InvoiceNo . ", '" . $SQLInvoiceDate . "', " . $PeriodNo . ', ' . $StockGLCode['purchpricevaract'] . ", '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('GRN') . ' ' . $EnteredGRN->GRNNo . ' - ' . $EnteredGRN->ItemCode . ' x ' . ($EnteredGRN->This_QuantityInv * $conversionfactor-$TotalQuantityOnHand) . ' x ' . _('price var of') . ' ' . - number_format(($EnteredGRN->ChgPrice / $conversionfactor / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . + round(($EnteredGRN->ChgPrice / $conversionfactor / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . "', " . $WriteOffToVariances . ')'; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction could not be added for the price variance of the stock item because'); @@ -795,7 +795,7 @@ ' . $StockGLCode['stockact'] . ", '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('Average Cost Adj') . ' - ' . $EnteredGRN->ItemCode . ' x ' . $TotalQuantityOnHand . ' x ' . - number_format(($EnteredGRN->ChgPrice / $conversionfactor / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . + round(($EnteredGRN->ChgPrice / $conversionfactor / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . "', " . ($PurchPriceVar - $WriteOffToVariances) . ')'; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction could not be added for the price variance of the stock item because'); @@ -841,7 +841,7 @@ $InvoiceNo . ", '" . $SQLInvoiceDate . "', " . $PeriodNo . ', ' . $StockGLCode['purchpricevaract'] . ", '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('GRN') . ' ' . $EnteredGRN->GRNNo . ' - ' . $EnteredGRN->ItemCode . ' x ' . $EnteredGRN->This_QuantityInv . ' x ' . _('price var of') . ' ' . - number_format(($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . + round(($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . "', " . $PurchPriceVar . ')'; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction could not be added for the price variance of the stock item because'); @@ -869,7 +869,7 @@ ' . $EnteredGRN->GLCode . ", '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('GRN') . ' ' . $EnteredGRN->GRNNo . ' - ' . $EnteredGRN->ItemDescription . ' x ' . $EnteredGRN->This_QuantityInv . ' x ' . _('price var') . - ' ' . number_format(($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . "', + ' ' . round(($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . "', " . $PurchPriceVar . ')'; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction could not be added for the price variance of the stock item because'); @@ -1107,4 +1107,4 @@ echo '</form>'; include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-09-05 14:55:54 UTC (rev 3706) +++ trunk/doc/Change.log.html 2010-09-06 07:15:20 UTC (rev 3707) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>06/09/10 Tim: SupplierInvoice.php - Correct the roundings so that the double entry balances</p> <p>05/09/10 Tim: PO_AuthoriseMyOrders.php - Update correct status when language not English</p> <p>05/09/10 Tim: PcAssignCashToTab.php - Show authorised, notes, and receipt fields correctly. Changed to use DB_fetch_array() rather than DB_fetch_row().</p> <p>05/09/10 Tim: PDFStockTransListing.php - List stock transactions by transaction type.</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-09-06 10:18:06
|
Revision: 3708 http://web-erp.svn.sourceforge.net/web-erp/?rev=3708&view=rev Author: tim_schofield Date: 2010-09-06 10:18:00 +0000 (Mon, 06 Sep 2010) Log Message: ----------- Change syntax to work in both windows and linux Modified Paths: -------------- trunk/doc/Change.log.html trunk/sql/mysql/upgrade3.11.1-3.12.sql Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-09-06 07:15:20 UTC (rev 3707) +++ trunk/doc/Change.log.html 2010-09-06 10:18:00 UTC (rev 3708) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>06/09/10 Tim: upgrade3.11.1-3.12.sql - Change syntax to work in both windows and linux</p> <p>06/09/10 Tim: SupplierInvoice.php - Correct the roundings so that the double entry balances</p> <p>05/09/10 Tim: PO_AuthoriseMyOrders.php - Update correct status when language not English</p> <p>05/09/10 Tim: PcAssignCashToTab.php - Show authorised, notes, and receipt fields correctly. Changed to use DB_fetch_array() rather than DB_fetch_row().</p> Modified: trunk/sql/mysql/upgrade3.11.1-3.12.sql =================================================================== --- trunk/sql/mysql/upgrade3.11.1-3.12.sql 2010-09-06 07:15:20 UTC (rev 3707) +++ trunk/sql/mysql/upgrade3.11.1-3.12.sql 2010-09-06 10:18:00 UTC (rev 3708) @@ -41,7 +41,7 @@ ALTER TABLE `purchorders` ADD COLUMN `tel` varchar(15) NOT NULL DEFAULT '' AFTER deladd6; ALTER TABLE `purchorders` ADD COLUMN `port` varchar(40) NOT NULL DEFAULT '' ; -ALTER TABLE `suppliers` DROP FOREIGN KEY `suppliers_ibfk_4`; +ALTER TABLE `suppliers` DROP KEY `suppliers_ibfk_4`; UPDATE `suppliers` SET `factorcompanyid`=0 WHERE `factorcompanyid`=1; DELETE FROM `factorcompanies` WHERE `coyname`='None'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-09-06 14:06:32
|
Revision: 3709 http://web-erp.svn.sourceforge.net/web-erp/?rev=3709&view=rev Author: tim_schofield Date: 2010-09-06 14:06:25 +0000 (Mon, 06 Sep 2010) Log Message: ----------- Move dummy status array from DefinePOClass.php Modified Paths: -------------- trunk/PO_Header.php trunk/doc/Change.log.html trunk/includes/DefinePOClass.php Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2010-09-06 10:18:00 UTC (rev 3708) +++ trunk/PO_Header.php 2010-09-06 14:06:25 UTC (rev 3709) @@ -6,6 +6,18 @@ include('includes/DefinePOClass.php'); include('includes/session.inc'); +/* Dummy for gettext */ + +$sDummy = _('New Order') . + _('Pending') . + _('Authorised') . + _('Rejected') . + _('Cancelled') . + _('Printed') . + _('Completed'); + +unset($sDummy); + if (isset($_GET['ModifyOrderNumber'])) { $title = _('Modify Purchase Order') . ' ' . $_GET['ModifyOrderNumber']; } else { Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-09-06 10:18:00 UTC (rev 3708) +++ trunk/doc/Change.log.html 2010-09-06 14:06:25 UTC (rev 3709) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>06/09/10 Tim: PO_Header.php - Move dummy status array from DefinePOClass.php</p> <p>06/09/10 Tim: upgrade3.11.1-3.12.sql - Change syntax to work in both windows and linux</p> <p>06/09/10 Tim: SupplierInvoice.php - Correct the roundings so that the double entry balances</p> <p>05/09/10 Tim: PO_AuthoriseMyOrders.php - Update correct status when language not English</p> Modified: trunk/includes/DefinePOClass.php =================================================================== --- trunk/includes/DefinePOClass.php 2010-09-06 10:18:00 UTC (rev 3708) +++ trunk/includes/DefinePOClass.php 2010-09-06 14:06:25 UTC (rev 3709) @@ -3,19 +3,7 @@ /* Definition of the PurchOrder class to hold all the information for a purchase order and delivery */ -/* Dummy for gettext */ -$sDummy = _('New Order') . - _('Pending') . - _('Authorised') . - _('Rejected') . - _('Cancelled') . - _('Printed') . - _('Completed'); - -unset($sDummy); - - Class PurchOrder { const STATUS_NEW_ORDER = 'New Order'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-09-07 15:29:30
|
Revision: 3710 http://web-erp.svn.sourceforge.net/web-erp/?rev=3710&view=rev Author: tim_schofield Date: 2010-09-07 15:29:23 +0000 (Tue, 07 Sep 2010) Log Message: ----------- Improve report layout for readability Modified Paths: -------------- trunk/PDFOrdersInvoiced.php trunk/doc/Change.log.html trunk/includes/PDFOrdersInvoicedPageHeader.inc Modified: trunk/PDFOrdersInvoiced.php =================================================================== --- trunk/PDFOrdersInvoiced.php 2010-09-06 14:06:25 UTC (rev 3709) +++ trunk/PDFOrdersInvoiced.php 2010-09-07 15:29:23 UTC (rev 3710) @@ -28,74 +28,87 @@ } if (!isset($_POST['FromDate']) OR !isset($_POST['ToDate']) OR $InputError==1){ - include ('includes/header.inc'); + include ('includes/header.inc'); if ($InputError==1){ prnMsg($msg,'error'); } - echo "<form method='post' action='" . $_SERVER['PHP_SELF'] . '?' . sid . "'>"; - echo '<table><tr><td>' . _('Enter the date from which orders are to be listed') . ":</td><td><input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='FromDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . "'></td></tr>"; - echo '<tr><td>' . _('Enter the date to which orders are to be listed') . ":</td> - <td><input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td></tr>"; - echo '<tr><td>' . _('Inventory Category') . '</td><td>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt=""></img>' . ' ' + . _('Orders Invoiced Report') . '</p>'; - $sql = "SELECT categorydescription, categoryid FROM stockcategory WHERE stocktype<>'D' AND stocktype<>'L'"; - $result = DB_query($sql,$db); + echo "<form method='post' action='" . $_SERVER['PHP_SELF'] . '?' . sid . "'>"; + echo '<table class=selection><tr><td>' . _('Enter the date from which orders are to be listed') . ":</td><td><input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='FromDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . "'></td></tr>"; + echo '<tr><td>' . _('Enter the date to which orders are to be listed') . ":</td> + <td><input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td></tr>"; + echo '<tr><td>' . _('Inventory Category') . '</td><td>'; + $sql = "SELECT categorydescription, categoryid FROM stockcategory WHERE stocktype<>'D' AND stocktype<>'L'"; + $result = DB_query($sql,$db); - echo "<select name='CategoryID'>"; - echo "<option selected VALUE='All'>" . _('Over All Categories'); - while ($myrow=DB_fetch_array($result)){ + echo "<select name='CategoryID'>"; + echo "<option selected VALUE='All'>" . _('Over All Categories'); + + while ($myrow=DB_fetch_array($result)){ echo '<option VALUE=' . $myrow['categoryid'] . '>' . $myrow['categorydescription']; - } - echo '</select></td></tr>'; + } + echo '</select></td></tr>'; - echo '<tr><td>' . _('Inventory Location') . ":</td><td><select name='Location'>"; - echo "<option selected VALUE='All'>" . _('All Locations'); + echo '<tr><td>' . _('Inventory Location') . ":</td><td><select name='Location'>"; + echo "<option selected VALUE='All'>" . _('All Locations'); - $result= DB_query('SELECT loccode, locationname FROM locations',$db); - while ($myrow=DB_fetch_array($result)){ + $result= DB_query('SELECT loccode, locationname FROM locations',$db); + while ($myrow=DB_fetch_array($result)){ echo "<option VALUE='" . $myrow['loccode'] . "'>" . $myrow['locationname']; - } - echo '</select></td></tr>'; + } + echo '</select></td></tr>'; - echo "</table><div class='centre'><input type=submit name='Go' VALUE='" . _('Create PDF') . "'></div>"; + echo "</table><br><div class='centre'><input type=submit name='Go' VALUE='" . _('Create PDF') . "'></div>"; - include('includes/footer.inc'); - exit; + include('includes/footer.inc'); + exit; } else { include('includes/PDFStarter.php'); - $pdf->addinfo('Title',_('Orders Invoiced Report')); - $pdf->addinfo('Subject',_('Orders from') . ' ' . $_POST['FromDate'] . ' ' . _('to') . ' ' . $_POST['ToDate']); - $line_height=12; - $PageNumber = 1; - $TotalDiffs = 0; + $pdf->addinfo('Title',_('Orders Invoiced Report')); + $pdf->addinfo('Subject',_('Orders from') . ' ' . $_POST['FromDate'] . ' ' . _('to') . ' ' . $_POST['ToDate']); + $line_height=12; + $PageNumber = 1; + $TotalDiffs = 0; } if ($_POST['CategoryID']=='All' AND $_POST['Location']=='All'){ $sql= "SELECT salesorders.orderno, - salesorders.debtorno, - salesorders.branchcode, - salesorders.customerref, - salesorders.orddate, - salesorders.fromstkloc, - salesorders.printedpackingslip, - salesorders.datepackingslipprinted, - salesorderdetails.stkcode, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces, - SUM(salesorderdetails.quantity) AS totqty, - SUM(salesorderdetails.qtyinvoiced) AS totqtyinvoiced - FROM salesorders - INNER JOIN salesorderdetails - ON salesorders.orderno = salesorderdetails.orderno - INNER JOIN stockmaster - ON salesorderdetails.stkcode = stockmaster.stockid - WHERE orddate >='" . FormatDateForSQL($_POST['FromDate']) . "' - AND orddate <='" . FormatDateForSQL($_POST['ToDate']) . "' - GROUP BY salesorders.orderno, + salesorders.debtorno, + salesorders.branchcode, + salesorders.customerref, + salesorders.orddate, + salesorders.fromstkloc, + salesorders.printedpackingslip, + salesorders.datepackingslipprinted, + salesorderdetails.stkcode, + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces, + debtorsmaster.name, + custbranch.brname, + locations.locationname, + SUM(salesorderdetails.quantity) AS totqty, + SUM(salesorderdetails.qtyinvoiced) AS totqtyinvoiced + FROM salesorders + INNER JOIN salesorderdetails + ON salesorders.orderno = salesorderdetails.orderno + INNER JOIN stockmaster + ON salesorderdetails.stkcode = stockmaster.stockid + INNER JOIN debtorsmaster + ON salesorders.debtorno=debtorsmaster.debtorno + INNER JOIN custbranch + ON custbranch.debtorno=salesorders.debtorno + AND custbranch.branchcode=salesorders.branchcode + INNER JOIN locations + ON salesorders.fromstkloc=locations.loccode + WHERE orddate >='" . FormatDateForSQL($_POST['FromDate']) . "' + AND orddate <='" . FormatDateForSQL($_POST['ToDate']) . "' + GROUP BY salesorders.orderno, salesorders.debtorno, salesorders.branchcode, salesorders.customerref, @@ -109,28 +122,38 @@ } elseif ($_POST['CategoryID']!='All' AND $_POST['Location']=='All') { $sql= "SELECT salesorders.orderno, - salesorders.debtorno, - salesorders.branchcode, - salesorders.customerref, - salesorders.orddate, - salesorders.fromstkloc, - salesorders.printedpackingslip, - salesorders.datepackingslipprinted, - salesorderdetails.stkcode, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces, - SUM(salesorderdetails.quantity) AS totqty, - SUM(salesorderdetails.qtyinvoiced) AS totqtyinvoiced - FROM salesorders - INNER JOIN salesorderdetails - ON salesorders.orderno = salesorderdetails.orderno - INNER JOIN stockmaster - ON salesorderdetails.stkcode = stockmaster.stockid - WHERE stockmaster.categoryid ='" . $_POST['CategoryID'] . "' - AND orddate >='" . FormatDateForSQL($_POST['FromDate']) . "' - AND orddate <='" . FormatDateForSQL($_POST['ToDate']) . "' - GROUP BY salesorders.orderno, + salesorders.debtorno, + salesorders.branchcode, + salesorders.customerref, + salesorders.orddate, + salesorders.fromstkloc, + salesorders.printedpackingslip, + salesorders.datepackingslipprinted, + salesorderdetails.stkcode, + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces, + debtorsmaster.name, + custbranch.brname, + locations.locationname, + SUM(salesorderdetails.quantity) AS totqty, + SUM(salesorderdetails.qtyinvoiced) AS totqtyinvoiced + FROM salesorders + INNER JOIN salesorderdetails + ON salesorders.orderno = salesorderdetails.orderno + INNER JOIN stockmaster + ON salesorderdetails.stkcode = stockmaster.stockid + INNER JOIN debtorsmaster + ON salesorders.debtorno=debtorsmaster.debtorno + INNER JOIN custbranch + ON custbranch.debtorno=salesorders.debtorno + AND custbranch.branchcode=salesorders.branchcode + INNER JOIN locations + ON salesorders.fromstkloc=locations.loccode + WHERE stockmaster.categoryid ='" . $_POST['CategoryID'] . "' + AND orddate >='" . FormatDateForSQL($_POST['FromDate']) . "' + AND orddate <='" . FormatDateForSQL($_POST['ToDate']) . "' + GROUP BY salesorders.orderno, salesorders.debtorno, salesorders.branchcode, salesorders.customerref, @@ -143,28 +166,38 @@ } elseif ($_POST['CategoryID']=='All' AND $_POST['Location']!='All') { $sql= "SELECT salesorders.orderno, - salesorders.debtorno, - salesorders.branchcode, - salesorders.customerref, - salesorders.orddate, - salesorders.fromstkloc, - salesorders.printedpackingslip, - salesorders.datepackingslipprinted, - salesorderdetails.stkcode, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces, - SUM(salesorderdetails.quantity) AS totqty, - SUM(salesorderdetails.qtyinvoiced) AS totqtyinvoiced - FROM salesorders - INNER JOIN salesorderdetails - ON salesorders.orderno = salesorderdetails.orderno - INNER JOIN stockmaster - ON salesorderdetails.stkcode = stockmaster.stockid - WHERE salesorders.fromstkloc ='" . $_POST['Location'] . "' - AND orddate >='" . FormatDateForSQL($_POST['FromDate']) . "' - AND orddate <='" . FormatDateForSQL($_POST['ToDate']) . "' - GROUP BY salesorders.orderno, + salesorders.debtorno, + salesorders.branchcode, + salesorders.customerref, + salesorders.orddate, + salesorders.fromstkloc, + salesorders.printedpackingslip, + salesorders.datepackingslipprinted, + salesorderdetails.stkcode, + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces, + debtorsmaster.name, + custbranch.brname, + locations.locationname, + SUM(salesorderdetails.quantity) AS totqty, + SUM(salesorderdetails.qtyinvoiced) AS totqtyinvoiced + FROM salesorders + INNER JOIN salesorderdetails + ON salesorders.orderno = salesorderdetails.orderno + INNER JOIN stockmaster + ON salesorderdetails.stkcode = stockmaster.stockid + INNER JOIN debtorsmaster + ON salesorders.debtorno=debtorsmaster.debtorno + INNER JOIN custbranch + ON custbranch.debtorno=salesorders.debtorno + AND custbranch.branchcode=salesorders.branchcode + INNER JOIN locations + ON salesorders.fromstkloc=locations.loccode + WHERE salesorders.fromstkloc ='" . $_POST['Location'] . "' + AND orddate >='" . FormatDateForSQL($_POST['FromDate']) . "' + AND orddate <='" . FormatDateForSQL($_POST['ToDate']) . "' + GROUP BY salesorders.orderno, salesorders.debtorno, salesorders.branchcode, salesorders.customerref, @@ -178,26 +211,36 @@ } elseif ($_POST['CategoryID']!='All' AND $_POST['location']!='All'){ $sql= "SELECT salesorders.orderno, - salesorders.debtorno, - salesorders.branchcode, - salesorders.customerref, - salesorders.orddate, - salesorders.fromstkloc, - salesorderdetails.stkcode, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces, - SUM(salesorderdetails.quantity) AS totqty, - SUM(salesorderdetails.qtyinvoiced) AS totqtyinvoiced - FROM salesorders - INNER JOIN salesorderdetails - ON salesorders.orderno = salesorderdetails.orderno - INNER JOIN stockmaster - ON salesorderdetails.stkcode = stockmaster.stockid - WHERE stockmaster.categoryid ='" . $_POST['CategoryID'] . "' - AND salesorders.fromstkloc ='" . $_POST['Location'] . "' - AND orddate >='" . FormatDateForSQL($_POST['FromDate']) . "' - AND orddate <='" . FormatDateForSQL($_POST['ToDate']) . "' + salesorders.debtorno, + salesorders.branchcode, + salesorders.customerref, + salesorders.orddate, + salesorders.fromstkloc, + salesorderdetails.stkcode, + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces, + debtorsmaster.name, + custbranch.brname, + locations.locationname, + SUM(salesorderdetails.quantity) AS totqty, + SUM(salesorderdetails.qtyinvoiced) AS totqtyinvoiced + INNER JOIN locations + ON salesorders.fromstkloc=locations.loccode + FROM salesorders + INNER JOIN salesorderdetails + ON salesorders.orderno = salesorderdetails.orderno + INNER JOIN stockmaster + ON salesorderdetails.stkcode = stockmaster.stockid + INNER JOIN debtorsmaster + ON salesorders.debtorno=debtorsmaster.debtorno + INNER JOIN custbranch + ON custbranch.debtorno=salesorders.debtorno + AND custbranch.branchcode=salesorders.branchcode + WHERE stockmaster.categoryid ='" . $_POST['CategoryID'] . "' + AND salesorders.fromstkloc ='" . $_POST['Location'] . "' + AND orddate >='" . FormatDateForSQL($_POST['FromDate']) . "' + AND orddate <='" . FormatDateForSQL($_POST['ToDate']) . "' GROUP BY salesorders.orderno, salesorders.debtorno, salesorders.branchcode, @@ -239,119 +282,141 @@ $AccumOrderTotal =0; while ($myrow=DB_fetch_array($Result)){ - - if($OrderNo != $myrow['orderno']){ - if ($AccumOrderTotal !=0){ + + if($OrderNo != $myrow['orderno']){ + if ($AccumOrderTotal !=0){ $LeftOvers = $pdf->addTextWrap($Left_Margin+250,$YPos,120,$FontSize,_('Total Invoiced for order') . ' ' . $OrderNo , 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+360,$YPos,80,$FontSize,number_format($AccumOrderTotal,2), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+360,$YPos,80,$FontSize,number_format($AccumOrderTotal,2), 'right'); $YPos -= ($line_height); $AccumOrderTotal =0; - } + } + $pdf->line($XPos, $YPos,$Page_Width-$Right_Margin, $YPos); + $YPos -= $line_height; + /*Set up headings */ + /*draw a line */ + + $LeftOvers = $pdf->addTextWrap($Left_Margin+2,$YPos,40,$FontSize,_('Order'), 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+40,$YPos,150,$FontSize,_('Customer'), 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+190,$YPos,110,$FontSize,_('Branch'), 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+300,$YPos,60,$FontSize,_('Customer Ref'), 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+360,$YPos,60,$FontSize,_('Ord Date'), 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+420,$YPos,80,$FontSize,_('Location'), 'left'); + + $YPos-=$line_height; + + /*draw a line */ + $pdf->line($XPos, $YPos,$Page_Width-$Right_Margin, $YPos); + $pdf->line($XPos, $YPos-$line_height*2,$XPos, $YPos+$line_height*2); + $pdf->line($Page_Width-$Right_Margin, $YPos-$line_height*2,$Page_Width-$Right_Margin, $YPos+$line_height*2); + + $YPos -= ($line_height); if ($YPos - (2 *$line_height) < $Bottom_Margin){ - /*Then set up a new page */ - $PageNumber++; - include ('includes/PDFOrdersInvoicedPageHeader.inc'); + /*Then set up a new page */ + $PageNumber++; + include ('includes/PDFOrdersInvoicedPageHeader.inc'); } /*end of new page header */ - } + } if ($myrow['orderno']!=$OrderNo OR $NewPage){ - - $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,40,$FontSize,$myrow['orderno'], 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+40,$YPos,80,$FontSize,$myrow['debtorno'], 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+120,$YPos,80,$FontSize,$myrow['branchcode'], 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+200,$YPos,100,$FontSize,$myrow['customerref'], 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+300,$YPos,80,$FontSize,ConvertSQLDate($myrow['orddate']), 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+380,$YPos,20,$FontSize,$myrow['fromstkloc'], 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+2,$YPos,40,$FontSize,$myrow['orderno'], 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+40,$YPos,150,$FontSize,html_entity_decode($myrow['name']), 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+190,$YPos,110,$FontSize,$myrow['brname'], 'left'); - if (isset($PackingSlipPrinted)) { - $LeftOvers = $pdf->addTextWrap($Left_Margin+400,$YPos,100,$FontSize,$PackingSlipPrinted, 'left'); - } - - $YPos -= ($line_height); + $LeftOvers = $pdf->addTextWrap($Left_Margin+300,$YPos,60,$FontSize,$myrow['customerref'], 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+360,$YPos,60,$FontSize,ConvertSQLDate($myrow['orddate']), 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+420,$YPos,80,$FontSize,$myrow['locationname'], 'left'); - $OrderNo = $myrow['orderno']; - /*Set up the headings for the order */ - $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,_('Code'), 'center'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+60,$YPos,120,$FontSize,_('Description'), 'center'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+180,$YPos,60,$FontSize,_('Ordered'), 'center'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+240,$YPos,60,$FontSize,_('Invoiced'), 'centre'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+320,$YPos,60,$FontSize,_('Outstanding'), 'center'); - $YPos -= ($line_height); - $NewPage = false; - } - - $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,$myrow['stkcode'], 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+60,$YPos,120,$FontSize,$myrow['description'], 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+180,$YPos,60,$FontSize,number_format($myrow['totqty'],$myrow['decimalplaces']), 'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+240,$YPos,60,$FontSize,number_format($myrow['totqtyinvoiced'],$myrow['decimalplaces']), 'right'); + if (isset($PackingSlipPrinted)) { + $LeftOvers = $pdf->addTextWrap($Left_Margin+400,$YPos,100,$FontSize,$PackingSlipPrinted, 'left'); + } - if ($myrow['totqty']>$myrow['totqtyinvoiced']){ - $LeftOvers = $pdf->addTextWrap($Left_Margin+320,$YPos,60,$FontSize,number_format($myrow['totqty']-$myrow['totqtyinvoiced'],$myrow['decimalplaces']), 'right'); - } else { - $LeftOvers = $pdf->addTextWrap($Left_Margin+320,$YPos,60,$FontSize,_('Complete'), 'left'); - } - + $YPos -= ($line_height); + $pdf->line($XPos, $YPos,$Page_Width-$Right_Margin, $YPos); + $YPos -= ($line_height); + + } + $OrderNo = $myrow['orderno']; + /*Set up the headings for the order */ + $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,_('Code'), 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+60,$YPos,120,$FontSize,_('Description'), 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+180,$YPos,60,$FontSize,_('Ordered'), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+240,$YPos,60,$FontSize,_('Invoiced'), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+320,$YPos,60,$FontSize,_('Outstanding'), 'left'); $YPos -= ($line_height); + $NewPage = false; + + $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,$myrow['stkcode'], 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+60,$YPos,120,$FontSize,$myrow['description'], 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+180,$YPos,60,$FontSize,number_format($myrow['totqty'],$myrow['decimalplaces']), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+240,$YPos,60,$FontSize,number_format($myrow['totqtyinvoiced'],$myrow['decimalplaces']), 'right'); + + if ($myrow['totqty']>$myrow['totqtyinvoiced']){ + $LeftOvers = $pdf->addTextWrap($Left_Margin+320,$YPos,60,$FontSize,number_format($myrow['totqty']-$myrow['totqtyinvoiced'],$myrow['decimalplaces']), 'right'); + } else { + $LeftOvers = $pdf->addTextWrap($Left_Margin+320,$YPos,60,$FontSize,_('Complete'), 'left'); + } + + $YPos -= ($line_height); if ($YPos - (2 *$line_height) < $Bottom_Margin){ - /*Then set up a new page */ - $PageNumber++; + /*Then set up a new page */ + $PageNumber++; include ('includes/PDFOrdersInvoicedPageHeader.inc'); } /*end of new page header */ - - - /*OK now get the invoices where the item was charged */ - $sql = 'SELECT debtortrans.order_, + + + /*OK now get the invoices where the item was charged */ + $sql = "SELECT debtortrans.order_, systypes.typename, debtortrans.transno, - stockmoves.price, + stockmoves.price, -stockmoves.qty AS quantity - FROM debtortrans INNER JOIN stockmoves - ON debtortrans.type = stockmoves.type - AND debtortrans.transno=stockmoves.transno + FROM debtortrans INNER JOIN stockmoves + ON debtortrans.type = stockmoves.type + AND debtortrans.transno=stockmoves.transno INNER JOIN systypes ON debtortrans.type=systypes.typeid - WHERE debtortrans.order_ =' . $OrderNo . " + WHERE debtortrans.order_ ='" . $OrderNo . "' AND stockmoves.stockid ='" . $myrow['stkcode'] . "'"; - + $InvoicesResult =DB_query($sql,$db); if (DB_num_rows($InvoicesResult)>0){ $LeftOvers = $pdf->addTextWrap($Left_Margin+150,$YPos,90,$FontSize,_('Transaction Number'), 'center'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+240,$YPos,60,$FontSize,_('Quantity'), 'center'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+300,$YPos,60,$FontSize,_('Price'), 'center'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+380,$YPos,60,$FontSize,_('Total'), 'centre'); - $YPos -= ($line_height); - } - + $LeftOvers = $pdf->addTextWrap($Left_Margin+240,$YPos,60,$FontSize,_('Quantity'), 'center'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+300,$YPos,60,$FontSize,_('Price'), 'center'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+380,$YPos,60,$FontSize,_('Total'), 'centre'); + $YPos -= ($line_height); + } + while ($InvRow=DB_fetch_array($InvoicesResult)){ - + $ValueInvoiced = $InvRow['price']*$InvRow['quantity']; - + $LeftOvers = $pdf->addTextWrap($Left_Margin+150,$YPos,90,$FontSize,$InvRow['typename'] . ' ' . $InvRow['transno'], 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+240,$YPos,60,$FontSize,number_format($InvRow['quantity'],$myrow['decimalplaces']), 'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+300,$YPos,60,$FontSize,number_format($InvRow['price'],2), 'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+360,$YPos,80,$FontSize,number_format($ValueInvoiced,2), 'right'); - + $LeftOvers = $pdf->addTextWrap($Left_Margin+240,$YPos,60,$FontSize,number_format($InvRow['quantity'],$myrow['decimalplaces']), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+300,$YPos,60,$FontSize,number_format($InvRow['price'],2), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+360,$YPos,80,$FontSize,number_format($ValueInvoiced,2), 'right'); + $YPos -= ($line_height); - + if ($YPos - (2 *$line_height) < $Bottom_Margin){ - /*Then set up a new page */ - $PageNumber++; - include ('includes/PDFOrdersInvoicedPageHeader.inc'); + /*Then set up a new page */ + $PageNumber++; + include ('includes/PDFOrdersInvoicedPageHeader.inc'); } /*end of new page header */ $AccumOrderTotal += $ValueInvoiced; $AccumTotalInv += $ValueInvoiced; } - - - - $YPos -= ($line_height); - if ($YPos - (2 *$line_height) < $Bottom_Margin){ - /*Then set up a new page */ - $PageNumber++; - include ('includes/PDFOrdersInvoicedPageHeader.inc'); - } /*end of new page header */ + + + + $YPos -= ($line_height); + if ($YPos - (2 *$line_height) < $Bottom_Margin){ + /*Then set up a new page */ + $PageNumber++; + include ('includes/PDFOrdersInvoicedPageHeader.inc'); + } /*end of new page header */ } /* end of while there are invoiced orders to print */ $YPos -= ($line_height); Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-09-06 14:06:25 UTC (rev 3709) +++ trunk/doc/Change.log.html 2010-09-07 15:29:23 UTC (rev 3710) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>07/09/10 Tim: PDFOrdesInvoiced.php - Improve report layout for readability</p> <p>06/09/10 Tim: PO_Header.php - Move dummy status array from DefinePOClass.php</p> <p>06/09/10 Tim: upgrade3.11.1-3.12.sql - Change syntax to work in both windows and linux</p> <p>06/09/10 Tim: SupplierInvoice.php - Correct the roundings so that the double entry balances</p> Modified: trunk/includes/PDFOrdersInvoicedPageHeader.inc =================================================================== --- trunk/includes/PDFOrdersInvoicedPageHeader.inc 2010-09-06 14:06:25 UTC (rev 3709) +++ trunk/includes/PDFOrdersInvoicedPageHeader.inc 2010-09-07 15:29:23 UTC (rev 3710) @@ -10,8 +10,8 @@ $FontSize=15; -$XPos = $Left_Margin; -$YPos -= 40; +$XPos = $Page_Width/2; +$YPos = $Page_Height - $Top_Margin; $pdf->addText($XPos, $YPos,$FontSize, _('Orders Invoiced Listing')); $FontSize=12; @@ -25,31 +25,13 @@ } $XPos = $Page_Width-$Right_Margin-50; -$YPos -=30; +$YPos = $Page_Height - $Top_Margin - 50; $pdf->addText($XPos, $YPos,$FontSize, _('Page') . ': ' . $PageNumber); /*Now print out the company name and address */ $XPos = $Left_Margin; -$YPos -= $line_height; - - -$YPos -= $line_height; -/*Set up headings */ +$YPos -= $line_height*2; $FontSize=8; -$LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,40,$FontSize,_('Order'), 'center'); -$LeftOvers = $pdf->addTextWrap($Left_Margin+40,$YPos,80,$FontSize,_('Customer'), 'center'); -$LeftOvers = $pdf->addTextWrap($Left_Margin+120,$YPos,80,$FontSize,_('Branch'), 'center'); -$LeftOvers = $pdf->addTextWrap($Left_Margin+200,$YPos,100,$FontSize,_('Customer Ref'), 'centre'); -$LeftOvers = $pdf->addTextWrap($Left_Margin+300,$YPos,80,$FontSize,_('Ord Date'), 'center'); -$LeftOvers = $pdf->addTextWrap($Left_Margin+380,$YPos,20,$FontSize,_('Loc'), 'center'); - -$YPos-=$line_height; - -/*draw a line */ -$pdf->line($XPos, $YPos,$Page_Width-$Right_Margin, $YPos); - -$YPos -= ($line_height); - $NewPage=true; ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-09-07 18:41:31
|
Revision: 3711 http://web-erp.svn.sourceforge.net/web-erp/?rev=3711&view=rev Author: tim_schofield Date: 2010-09-07 18:41:24 +0000 (Tue, 07 Sep 2010) Log Message: ----------- Improve report layout for readability Modified Paths: -------------- trunk/PDFOrderStatus.php trunk/PDFOrdersInvoiced.php trunk/doc/Change.log.html trunk/includes/PDFOrderStatusPageHeader.inc Modified: trunk/PDFOrderStatus.php =================================================================== --- trunk/PDFOrderStatus.php 2010-09-07 15:29:23 UTC (rev 3710) +++ trunk/PDFOrderStatus.php 2010-09-07 18:41:24 UTC (rev 3711) @@ -23,169 +23,212 @@ if (!isset($_POST['FromDate']) OR !isset($_POST['ToDate'])){ - $title = _('Order Status Report'); - include ('includes/header.inc'); + $title = _('Order Status Report'); + include ('includes/header.inc'); - if ($InputError==1){ - prnMsg($msg,'error'); - } + if ($InputError==1){ + prnMsg($msg,'error'); + } - echo "<form method='post' action='" . $_SERVER['PHP_SELF'] . '?' . SID . "'>"; - echo '<<table><tr><td>' . _('Enter the date from which orders are to be listed') . ":</td><td><input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='FromDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . "'></td></tr>"; - echo '<tr><td>' . _('Enter the date to which orders are to be listed') . ":</td><td>"; - echo "<input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td></tr>"; - echo '<tr><td>' . _('Inventory Category') . '</td><td>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt=""></img>' . ' ' + . _('Order Status Report') . '</p>'; - $sql = "SELECT categorydescription, categoryid FROM stockcategory WHERE stocktype<>'D' AND stocktype<>'L'"; - $result = DB_query($sql,$db); + echo "<form method='post' action='" . $_SERVER['PHP_SELF'] . '?' . SID . "'>"; + echo '<table class=selection><tr><td>' . _('Enter the date from which orders are to be listed') . ":</td><td><input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='FromDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . "'></td></tr>"; + echo '<tr><td>' . _('Enter the date to which orders are to be listed') . ":</td><td>"; + echo "<input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td></tr>"; + echo '<tr><td>' . _('Inventory Category') . '</td><td>'; + $sql = "SELECT categorydescription, categoryid FROM stockcategory WHERE stocktype<>'D' AND stocktype<>'L'"; + $result = DB_query($sql,$db); - echo "<select name='CategoryID'>"; - echo "<option selected VALUE='All'>" . _('Over All Categories'); - while ($myrow=DB_fetch_array($result)){ - echo '<option VALUE=' . $myrow['categoryid'] . '>' . $myrow['categorydescription']; - } - echo '</select></td></tr>'; + echo "<select name='CategoryID'>"; + echo "<option selected VALUE='All'>" . _('Over All Categories'); - echo '<tr><td>' . _('Inventory Location') . ':</td><td><select name="Location">'; - echo '<option selected VALUE="All">' . _('All Locations'); + while ($myrow=DB_fetch_array($result)){ + echo '<option value=' . $myrow['categoryid'] . '>' . $myrow['categorydescription']; + } + echo '</select></td></tr>'; - $result= DB_query('SELECT loccode, locationname FROM locations',$db); - while ($myrow=DB_fetch_array($result)){ + echo '<tr><td>' . _('Inventory Location') . ':</td><td><select name="Location">'; + echo '<option selected value="All">' . _('All Locations'); + + $result= DB_query('SELECT loccode, locationname FROM locations',$db); + while ($myrow=DB_fetch_array($result)){ echo "<option VALUE='" . $myrow['loccode'] . "'>" . $myrow['locationname']; - } - echo '</select></td></tr>'; + } + echo '</select></td></tr>'; - echo '<tr><td>' . _('Back Order Only') . ":</td><td><select name='BackOrders'>"; - echo "<option selected VALUE='Yes'>" . _('Only Show Back Orders'); - echo "<option VALUE='No'>" . _('Show All Orders'); - echo "</select></td></tr></table><div class='centre'><input type=submit name='Go' VALUE='" . _('Create PDF') . "'></div>"; + echo '<tr><td>' . _('Back Order Only') . ":</td><td><select name='BackOrders'>"; + echo "<option selected VALUE='Yes'>" . _('Only Show Back Orders'); + echo "<option VALUE='No'>" . _('Show All Orders'); + echo "</select></td></tr></table><br><div class='centre'><input type=submit name='Go' value='" . _('Create PDF') . "'></div>"; - include('includes/footer.inc'); - exit; + include('includes/footer.inc'); + exit; } else { include('includes/ConnectDB.inc'); include('includes/PDFStarter.php'); - $pdf->addInfo('Title',_('Order Status Report')); - $pdf->addInfo('Subject',_('Orders from') . ' ' . $_POST['FromDate'] . ' ' . _('to') . ' ' . $_POST['ToDate']); - $line_height=12; - $PageNumber = 1; - $TotalDiffs = 0; + $pdf->addInfo('Title',_('Order Status Report')); + $pdf->addInfo('Subject',_('Orders from') . ' ' . $_POST['FromDate'] . ' ' . _('to') . ' ' . $_POST['ToDate']); + $line_height=12; + $PageNumber = 1; + $TotalDiffs = 0; } if ($_POST['CategoryID']=='All' AND $_POST['Location']=='All'){ $sql= "SELECT salesorders.orderno, - salesorders.debtorno, - salesorders.branchcode, - salesorders.customerref, - salesorders.orddate, - salesorders.fromstkloc, - salesorders.printedpackingslip, - salesorders.datepackingslipprinted, - salesorderdetails.stkcode, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces, - salesorderdetails.quantity, - salesorderdetails.qtyinvoiced, - salesorderdetails.completed - FROM salesorders - INNER JOIN salesorderdetails - ON salesorders.orderno = salesorderdetails.orderno - INNER JOIN stockmaster - ON salesorderdetails.stkcode = stockmaster.stockid - WHERE salesorders.orddate >='" . FormatDateForSQL($_POST['FromDate']) . "' - AND salesorders.orddate <='" . FormatDateForSQL($_POST['ToDate']) . "' - AND salesorders.quotation=0"; + salesorders.debtorno, + salesorders.branchcode, + salesorders.customerref, + salesorders.orddate, + salesorders.fromstkloc, + salesorders.printedpackingslip, + salesorders.datepackingslipprinted, + salesorderdetails.stkcode, + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces, + salesorderdetails.quantity, + salesorderdetails.qtyinvoiced, + salesorderdetails.completed, + debtorsmaster.name, + custbranch.brname, + locations.locationname + FROM salesorders + INNER JOIN salesorderdetails + ON salesorders.orderno = salesorderdetails.orderno + INNER JOIN stockmaster + ON salesorderdetails.stkcode = stockmaster.stockid + INNER JOIN debtorsmaster + ON salesorders.debtorno=debtorsmaster.debtorno + INNER JOIN custbranch + ON custbranch.debtorno=salesorders.debtorno + AND custbranch.branchcode=salesorders.branchcode + INNER JOIN locations + ON salesorders.fromstkloc=locations.loccode + WHERE salesorders.orddate >='" . FormatDateForSQL($_POST['FromDate']) . "' + AND salesorders.orddate <='" . FormatDateForSQL($_POST['ToDate']) . "' + AND salesorders.quotation=0"; } elseif ($_POST['CategoryID']!='All' AND $_POST['Location']=='All') { $sql= "SELECT salesorders.orderno, - salesorders.debtorno, - salesorders.branchcode, - salesorders.customerref, - salesorders.orddate, - salesorders.fromstkloc, - salesorders.printedpackingslip, - salesorders.datepackingslipprinted, - salesorderdetails.stkcode, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces, - salesorderdetails.quantity, - salesorderdetails.qtyinvoiced, - salesorderdetails.completed - FROM salesorders - INNER JOIN salesorderdetails - ON salesorders.orderno = salesorderdetails.orderno - INNER JOIN stockmaster - ON salesorderdetails.stkcode = stockmaster.stockid - WHERE stockmaster.categoryid ='" . $_POST['CategoryID'] . "' - AND orddate >='" . FormatDateForSQL($_POST['FromDate']) . "' - AND orddate <='" . FormatDateForSQL($_POST['ToDate']) . "' - AND salesorders.quotation=0"; + salesorders.debtorno, + salesorders.branchcode, + salesorders.customerref, + salesorders.orddate, + salesorders.fromstkloc, + salesorders.printedpackingslip, + salesorders.datepackingslipprinted, + salesorderdetails.stkcode, + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces, + salesorderdetails.quantity, + salesorderdetails.qtyinvoiced, + salesorderdetails.completed, + debtorsmaster.name, + custbranch.brname, + locations.locationname + FROM salesorders + INNER JOIN salesorderdetails + ON salesorders.orderno = salesorderdetails.orderno + INNER JOIN stockmaster + ON salesorderdetails.stkcode = stockmaster.stockid + INNER JOIN debtorsmaster + ON salesorders.debtorno=debtorsmaster.debtorno + INNER JOIN custbranch + ON custbranch.debtorno=salesorders.debtorno + AND custbranch.branchcode=salesorders.branchcode + INNER JOIN locations + ON salesorders.fromstkloc=locations.loccode + WHERE stockmaster.categoryid ='" . $_POST['CategoryID'] . "' + AND orddate >='" . FormatDateForSQL($_POST['FromDate']) . "' + AND orddate <='" . FormatDateForSQL($_POST['ToDate']) . "' + AND salesorders.quotation=0"; } elseif ($_POST['CategoryID']=='All' AND $_POST['Location']!='All') { $sql= "SELECT salesorders.orderno, - salesorders.debtorno, - salesorders.branchcode, - salesorders.customerref, - salesorders.orddate, - salesorders.fromstkloc, - salesorders.printedpackingslip, - salesorders.datepackingslipprinted, - salesorderdetails.stkcode, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces, - salesorderdetails.quantity, - salesorderdetails.qtyinvoiced, - salesorderdetails.completed - FROM salesorders - INNER JOIN salesorderdetails - ON salesorders.orderno = salesorderdetails.orderno - INNER JOIN stockmaster - ON salesorderdetails.stkcode = stockmaster.stockid - WHERE salesorders.fromstkloc ='" . $_POST['Location'] . "' - AND salesorders.orddate >='" . FormatDateForSQL($_POST['FromDate']) . "' - AND salesorders.orddate <='" . FormatDateForSQL($_POST['ToDate']) . "' - AND salesorders.quotation=0"; + salesorders.debtorno, + salesorders.branchcode, + salesorders.customerref, + salesorders.orddate, + salesorders.fromstkloc, + salesorders.printedpackingslip, + salesorders.datepackingslipprinted, + salesorderdetails.stkcode, + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces, + salesorderdetails.quantity, + salesorderdetails.qtyinvoiced, + salesorderdetails.completed, + debtorsmaster.name, + custbranch.brname, + locations.locationname + FROM salesorders + INNER JOIN salesorderdetails + ON salesorders.orderno = salesorderdetails.orderno + INNER JOIN stockmaster + ON salesorderdetails.stkcode = stockmaster.stockid + INNER JOIN debtorsmaster + ON salesorders.debtorno=debtorsmaster.debtorno + INNER JOIN custbranch + ON custbranch.debtorno=salesorders.debtorno + AND custbranch.branchcode=salesorders.branchcode + INNER JOIN locations + ON salesorders.fromstkloc=locations.loccode + WHERE salesorders.fromstkloc ='" . $_POST['Location'] . "' + AND salesorders.orddate >='" . FormatDateForSQL($_POST['FromDate']) . "' + AND salesorders.orddate <='" . FormatDateForSQL($_POST['ToDate']) . "' + AND salesorders.quotation=0"; } elseif ($_POST['CategoryID']!='All' AND $_POST['location']!='All'){ $sql= "SELECT salesorders.orderno, - salesorders.debtorno, - salesorders.branchcode, - salesorders.customerref, - salesorders.orddate, - salesorders.fromstkloc, - salesorders.printedpackingslip, - salesorders.datepackingslipprinted, - salesorderdetails.stkcode, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces, - salesorderdetails.quantity, - salesorderdetails.qtyinvoiced, - salesorderdetails.completed - FROM salesorders - INNER JOIN salesorderdetails - ON salesorders.orderno = salesorderdetails.orderno - INNER JOIN stockmaster - ON salesorderdetails.stkcode = stockmaster.stockid - WHERE stockmaster.categoryid ='" . $_POST['CategoryID'] . "' - AND salesorders.fromstkloc ='" . $_POST['Location'] . "' - AND salesorders.orddate >='" . FormatDateForSQL($_POST['FromDate']) . "' - AND salesorders.orddate <='" . FormatDateForSQL($_POST['ToDate']) . "' - AND salesorders.quotation=0"; + salesorders.debtorno, + salesorders.branchcode, + salesorders.customerref, + salesorders.orddate, + salesorders.fromstkloc, + salesorders.printedpackingslip, + salesorders.datepackingslipprinted, + salesorderdetails.stkcode, + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces, + salesorderdetails.quantity, + salesorderdetails.qtyinvoiced, + salesorderdetails.completed, + debtorsmaster.name, + custbranch.brname, + locations.locationname + FROM salesorders + INNER JOIN salesorderdetails + ON salesorders.orderno = salesorderdetails.orderno + INNER JOIN stockmaster + ON salesorderdetails.stkcode = stockmaster.stockid + INNER JOIN debtorsmaster + ON salesorders.debtorno=debtorsmaster.debtorno + INNER JOIN custbranch + ON custbranch.debtorno=salesorders.debtorno + AND custbranch.branchcode=salesorders.branchcode + INNER JOIN locations + ON salesorders.fromstkloc=locations.loccode + WHERE stockmaster.categoryid ='" . $_POST['CategoryID'] . "' + AND salesorders.fromstkloc ='" . $_POST['Location'] . "' + AND salesorders.orddate >='" . FormatDateForSQL($_POST['FromDate']) . "' + AND salesorders.orddate <='" . FormatDateForSQL($_POST['ToDate']) . "' + AND salesorders.quotation=0"; } if ($_POST['BackOrders']=='Yes'){ - $sql .= ' AND salesorderdetails.quantity-salesorderdetails.qtyinvoiced >0'; + $sql .= ' AND salesorderdetails.quantity-salesorderdetails.qtyinvoiced >0'; } $sql .= ' ORDER BY salesorders.orderno'; @@ -214,66 +257,84 @@ while ($myrow=DB_fetch_array($Result)){ + $pdf->line($XPos, $YPos,$Page_Width-$Right_Margin, $YPos); - if ($YPos - (2 *$line_height) < $Bottom_Margin){ - /*Then set up a new page */ - $PageNumber++; - include ('includes/PDFOrderStatusPageHeader.inc'); - $OrderNo=0; - } /*end of new page header */ - if($OrderNo!=0 AND $OrderNo != $myrow['orderno']){ + $YPos -= $line_height; + /*Set up headings */ + /*draw a line */ + + if ($myrow['orderno']!=$OrderNo ){ + $LeftOvers = $pdf->addTextWrap($Left_Margin+2,$YPos,40,$FontSize,_('Order'), 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+40,$YPos,150,$FontSize,_('Customer'), 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+190,$YPos,110,$FontSize,_('Branch'), 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+300,$YPos,60,$FontSize,_('Ord Date'), 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+360,$YPos,60,$FontSize,_('Location'), 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+420,$YPos,80,$FontSize,_('Status'), 'left'); + + $YPos-=$line_height; + + /*draw a line */ $pdf->line($XPos, $YPos,$Page_Width-$Right_Margin, $YPos); + $pdf->line($XPos, $YPos-$line_height*2,$XPos, $YPos+$line_height*2); + $pdf->line($Page_Width-$Right_Margin, $YPos-$line_height*2,$Page_Width-$Right_Margin, $YPos+$line_height*2); + + + if ($YPos - (2 *$line_height) < $Bottom_Margin){ + /*Then set up a new page */ + $PageNumber++; + include ('includes/PDFOrderStatusPageHeader.inc'); + $OrderNo=0; + } /*end of new page header */ $YPos -= $line_height; - } - if ($myrow['orderno']!=$OrderNo ){ - $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,40,$FontSize,$myrow['orderno'], 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+40,$YPos,80,$FontSize,$myrow['debtorno'], 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+120,$YPos,80,$FontSize,$myrow['branchcode'], 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+2,$YPos,40,$FontSize,$myrow['orderno'], 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+40,$YPos,150,$FontSize,html_entity_decode($myrow['name']), 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+190,$YPos,110,$FontSize,$myrow['brname'], 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+200,$YPos,100,$FontSize,$myrow['customerref'], 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+300,$YPos,80,$FontSize,ConvertSQLDate($myrow['orddate']), 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+380,$YPos,20,$FontSize,$myrow['fromstkloc'], 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+300,$YPos,60,$FontSize,ConvertSQLDate($myrow['orddate']), 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+360,$YPos,80,$FontSize,$myrow['locationname'], 'left'); - if ($myrow['printedpackingslip']==1){ - $PackingSlipPrinted = _('Printed') . ' ' . ConvertSQLDate($myrow['datepackingslipprinted']); - } else { - $PackingSlipPrinted =_('Not yet printed'); - } + if ($myrow['printedpackingslip']==1){ + $PackingSlipPrinted = _('Printed') . ' ' . ConvertSQLDate($myrow['datepackingslipprinted']); + } else { + $PackingSlipPrinted =_('Not yet printed'); + } - $LeftOvers = $pdf->addTextWrap($Left_Margin+400,$YPos,100,$FontSize,$PackingSlipPrinted, 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+420,$YPos,100,$FontSize,$PackingSlipPrinted, 'left'); + $YPos -= $line_height; + $pdf->line($XPos, $YPos,$Page_Width-$Right_Margin, $YPos); - $YPos -= ($line_height); + $YPos -= ($line_height); - /*Its not the first line */ - $OrderNo = $myrow['orderno']; - $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,_('Code'), 'center'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+60,$YPos,120,$FontSize,_('Description'), 'center'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+180,$YPos,60,$FontSize,_('Ordered'), 'center'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+240,$YPos,60,$FontSize,_('Invoiced'), 'centre'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+320,$YPos,60,$FontSize,_('Outstanding'), 'center'); - $YPos -= ($line_height); + /*Its not the first line */ + $OrderNo = $myrow['orderno']; + $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,_('Code'), 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+60,$YPos,120,$FontSize,_('Description'), 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+180,$YPos,60,$FontSize,_('Ordered'), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+240,$YPos,60,$FontSize,_('Invoiced'), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+320,$YPos,60,$FontSize,_('Outstanding'), 'center'); + $YPos -= ($line_height); - } + } - $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,$myrow['stkcode'], 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+60,$YPos,120,$FontSize,$myrow['description'], 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+180,$YPos,60,$FontSize,number_format($myrow['quantity'],$myrow['decimalplaces']), 'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+240,$YPos,60,$FontSize,number_format($myrow['qtyinvoiced'],$myrow['decimalplaces']), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,$myrow['stkcode'], 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+60,$YPos,120,$FontSize,$myrow['description'], 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+180,$YPos,60,$FontSize,number_format($myrow['quantity'],$myrow['decimalplaces']), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+240,$YPos,60,$FontSize,number_format($myrow['qtyinvoiced'],$myrow['decimalplaces']), 'right'); - if ($myrow['quantity']>$myrow['qtyinvoiced']){ - $LeftOvers = $pdf->addTextWrap($Left_Margin+320,$YPos,60,$FontSize,number_format($myrow['quantity']-$myrow['qtyinvoiced'],$myrow['decimalplaces']), 'right'); - } else { - $LeftOvers = $pdf->addTextWrap($Left_Margin+320,$YPos,60,$FontSize,_('Complete'), 'left'); - } + if ($myrow['quantity']>$myrow['qtyinvoiced']){ + $LeftOvers = $pdf->addTextWrap($Left_Margin+320,$YPos,60,$FontSize,number_format($myrow['quantity']-$myrow['qtyinvoiced'],$myrow['decimalplaces']), 'right'); + } else { + $LeftOvers = $pdf->addTextWrap($Left_Margin+320,$YPos,60,$FontSize,_('Complete'), 'left'); + } - $YPos -= ($line_height); - if ($YPos - (2 *$line_height) < $Bottom_Margin){ - /*Then set up a new page */ - $PageNumber++; - include ('includes/PDFOrderStatusPageHeader.inc'); + $YPos -= ($line_height); + if ($YPos - (2 *$line_height) < $Bottom_Margin){ + /*Then set up a new page */ + $PageNumber++; + include ('includes/PDFOrderStatusPageHeader.inc'); $OrderNo=0; - } /*end of new page header */ + } /*end of new page header */ } /* end of while there are delivery differences to print */ /* UldisN $pdfcode = $pdf->output(); Modified: trunk/PDFOrdersInvoiced.php =================================================================== --- trunk/PDFOrdersInvoiced.php 2010-09-07 15:29:23 UTC (rev 3710) +++ trunk/PDFOrdersInvoiced.php 2010-09-07 18:41:24 UTC (rev 3711) @@ -47,7 +47,7 @@ echo "<select name='CategoryID'>"; - echo "<option selected VALUE='All'>" . _('Over All Categories'); + echo "<option selected value='All'>" . _('Over All Categories'); while ($myrow=DB_fetch_array($result)){ echo '<option VALUE=' . $myrow['categoryid'] . '>' . $myrow['categorydescription']; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-09-07 15:29:23 UTC (rev 3710) +++ trunk/doc/Change.log.html 2010-09-07 18:41:24 UTC (rev 3711) @@ -1,6 +1,7 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> -<p>07/09/10 Tim: PDFOrdesInvoiced.php - Improve report layout for readability</p> +<p>07/09/10 Tim: PDFOrderStatus.php - Improve report layout for readability</p> +<p>07/09/10 Tim: PDFOrderInvoiced.php - Improve report layout for readability</p> <p>06/09/10 Tim: PO_Header.php - Move dummy status array from DefinePOClass.php</p> <p>06/09/10 Tim: upgrade3.11.1-3.12.sql - Change syntax to work in both windows and linux</p> <p>06/09/10 Tim: SupplierInvoice.php - Correct the roundings so that the double entry balances</p> Modified: trunk/includes/PDFOrderStatusPageHeader.inc =================================================================== --- trunk/includes/PDFOrderStatusPageHeader.inc 2010-09-07 15:29:23 UTC (rev 3710) +++ trunk/includes/PDFOrderStatusPageHeader.inc 2010-09-07 18:41:24 UTC (rev 3711) @@ -6,13 +6,13 @@ $YPos = $Page_Height - $Top_Margin - 50; -$pdf->addJpegFromFile($_SESSION['LogoFile'],$Left_Margin,$YPos,60); +$pdf->addJpegFromFile($_SESSION['LogoFile'],$Left_Margin,$YPos,0,50); $FontSize=15; -$XPos = $Left_Margin; -$YPos -= 40; -$pdf->addText($XPos, $YPos,$FontSize, _('Order Status Report')); +$XPos = $Page_Width/2; +$YPos = $Page_Height - $Top_Margin; +$pdf->addText($XPos, $YPos,$FontSize, _('Order Status Listing')); $FontSize=12; if ($_POST['CategoryID']!='All') { @@ -25,29 +25,13 @@ } $XPos = $Page_Width-$Right_Margin-50; -$YPos -=30; +$YPos = $Page_Height - $Top_Margin - 50; $pdf->addText($XPos, $YPos,$FontSize, _('Page') . ': ' . $PageNumber); /*Now print out the company name and address */ $XPos = $Left_Margin; -$YPos -= $line_height; - - -$YPos -= $line_height; -/*Set up headings */ +$YPos -= $line_height*2; $FontSize=8; -$LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,40,$FontSize,_('Order'), 'center'); -$LeftOvers = $pdf->addTextWrap($Left_Margin+40,$YPos,80,$FontSize,_('Customer'), 'center'); -$LeftOvers = $pdf->addTextWrap($Left_Margin+120,$YPos,80,$FontSize,_('Branch'), 'center'); -$LeftOvers = $pdf->addTextWrap($Left_Margin+200,$YPos,100,$FontSize,_('Customer Ref'), 'centre'); -$LeftOvers = $pdf->addTextWrap($Left_Margin+300,$YPos,80,$FontSize,_('Ord Date'), 'center'); -$LeftOvers = $pdf->addTextWrap($Left_Margin+380,$YPos,20,$FontSize,_('Loc'), 'center'); - -$YPos-=$line_height; - -/*draw a line */ -$pdf->line($XPos, $YPos,$Page_Width-$Right_Margin, $YPos); - -$YPos -= ($line_height); -?> \ No newline at end of file +$NewPage=true; +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-09-07 18:44:09
|
Revision: 3712 http://web-erp.svn.sourceforge.net/web-erp/?rev=3712&view=rev Author: tim_schofield Date: 2010-09-07 18:44:03 +0000 (Tue, 07 Sep 2010) Log Message: ----------- Correct the sql quoting Modified Paths: -------------- trunk/PDFPickingList.php trunk/doc/Change.log.html Modified: trunk/PDFPickingList.php =================================================================== --- trunk/PDFPickingList.php 2010-09-07 18:41:24 UTC (rev 3711) +++ trunk/PDFPickingList.php 2010-09-07 18:44:03 UTC (rev 3712) @@ -27,7 +27,7 @@ locationname FROM locations'; $result=DB_query($sql, $db); - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Search') . '" alt="">' . ' ' . $title.'<br></p>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Search') . '" alt=""></img>' . ' ' . $title.'<br></p>'; echo '<form action=' . $_SERVER['PHP_SELF'] . '?' . SID . ' method=post name="form">'; echo '<table class="selection"><tr>'; echo '<td>'._('Create picking lists for all deliveries to be made on').' : '.'</td>'; @@ -80,7 +80,7 @@ WHERE salesorders.debtorno=debtorsmaster.debtorno AND salesorders.shipvia=shippers.shipper_id AND salesorders.fromstkloc=locations.loccode - AND salesorders.orderno=" . $_GET['TransNo']; + AND salesorders.orderno='" . $_GET['TransNo']."'"; } else if (isset($_POST['TransDate']) or (isset($_GET['TransNo']) and $_GET['TransNo'] != 'Preview')) { /* We are printing picking lists for all orders on a day */ $sql = "SELECT salesorders.debtorno, @@ -220,7 +220,7 @@ FROM salesorderdetails INNER JOIN stockmaster ON salesorderdetails.stkcode=stockmaster.stockid - WHERE salesorderdetails.orderno=" . $OrdersToPick[$i]['orderno'] ;; + WHERE salesorderdetails.orderno='" . $OrdersToPick[$i]['orderno'] ."'"; } else { /* There are previous picking lists for this order so * need to take those quantities into account @@ -241,7 +241,7 @@ ON salesorderdetails.orderno=pickinglists.orderno LEFT JOIN pickinglistdetails ON pickinglists.pickinglistno=pickinglistdetails.pickinglistno - WHERE salesorderdetails.orderno=" . $OrdersToPick[$i]['orderno'] ." + WHERE salesorderdetails.orderno='" . $OrdersToPick[$i]['orderno'] ."' AND salesorderdetails.orderlineno=pickinglistdetails.orderlineno"; } $lineresult=DB_query($sql,$db, $ErrMsg); Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-09-07 18:41:24 UTC (rev 3711) +++ trunk/doc/Change.log.html 2010-09-07 18:44:03 UTC (rev 3712) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>07/09/10 Tim: PDFPickingList.php - Correct the sql quoting</p> <p>07/09/10 Tim: PDFOrderStatus.php - Improve report layout for readability</p> <p>07/09/10 Tim: PDFOrderInvoiced.php - Improve report layout for readability</p> <p>06/09/10 Tim: PO_Header.php - Move dummy status array from DefinePOClass.php</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-09-07 21:28:32
|
Revision: 3713 http://web-erp.svn.sourceforge.net/web-erp/?rev=3713&view=rev Author: tim_schofield Date: 2010-09-07 21:28:26 +0000 (Tue, 07 Sep 2010) Log Message: ----------- Correct the sql quoting Modified Paths: -------------- trunk/PDFQuotation.php trunk/doc/Change.log.html Modified: trunk/PDFQuotation.php =================================================================== --- trunk/PDFQuotation.php 2010-09-07 18:44:03 UTC (rev 3712) +++ trunk/PDFQuotation.php 2010-09-07 21:28:26 UTC (rev 3713) @@ -55,7 +55,7 @@ AND salesorders.shipvia=shippers.shipper_id AND salesorders.fromstkloc=locations.loccode AND salesorders.quotation=1 - AND salesorders.orderno=" . $_GET['QuotationNo']; + AND salesorders.orderno='" . $_GET['QuotationNo'] ."'"; $result=DB_query($sql,$db, $ErrMsg); @@ -104,7 +104,7 @@ salesorderdetails.narrative FROM salesorderdetails INNER JOIN stockmaster ON salesorderdetails.stkcode=stockmaster.stockid - WHERE salesorderdetails.orderno=" . $_GET['QuotationNo']; + WHERE salesorderdetails.orderno='" . $_GET['QuotationNo'] . "'"; $result=DB_query($sql,$db, $ErrMsg); @@ -145,7 +145,7 @@ $TaxAuth = $myrow3['taxauthid']; } - $sql4 = "SELECT * FROM taxauthrates WHERE dispatchtaxprovince=" .$TaxProv ." AND taxcatid=" .$TaxCat ." AND taxauthority=" .$TaxAuth; + $sql4 = "SELECT * FROM taxauthrates WHERE dispatchtaxprovince='" .$TaxProv ."' AND taxcatid='" .$TaxCat ."' AND taxauthority='" .$TaxAuth ."'"; $result4=DB_query($sql4,$db, $ErrMsg); while ($myrow4=DB_fetch_array($result4)){ $TaxClass = 100 * $myrow4['taxrate']; @@ -251,4 +251,4 @@ $pdf->OutputI($_SESSION['DatabaseName'] . '_Quotation_' . date('Y-m-d') . '.pdf');//UldisN $pdf->__destruct(); //UldisN } -?> +?> \ No newline at end of file Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-09-07 18:44:03 UTC (rev 3712) +++ trunk/doc/Change.log.html 2010-09-07 21:28:26 UTC (rev 3713) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>07/09/10 Tim: PDFQuotation.php - Correct the sql quoting</p> <p>07/09/10 Tim: PDFPickingList.php - Correct the sql quoting</p> <p>07/09/10 Tim: PDFOrderStatus.php - Improve report layout for readability</p> <p>07/09/10 Tim: PDFOrderInvoiced.php - Improve report layout for readability</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-09-07 21:31:07
|
Revision: 3714 http://web-erp.svn.sourceforge.net/web-erp/?rev=3714&view=rev Author: tim_schofield Date: 2010-09-07 21:31:01 +0000 (Tue, 07 Sep 2010) Log Message: ----------- Correct the sql quoting Modified Paths: -------------- trunk/PDFReceipt.php trunk/doc/Change.log.html Modified: trunk/PDFReceipt.php =================================================================== --- trunk/PDFReceipt.php 2010-09-07 21:28:26 UTC (rev 3713) +++ trunk/PDFReceipt.php 2010-09-07 21:31:01 UTC (rev 3714) @@ -47,45 +47,45 @@ $PageNumber++; -$sql='SELECT MIN(id) as start FROM debtortrans WHERE type=12 AND transno='.$_GET['BatchNumber']; +$sql="SELECT MIN(id) as start FROM debtortrans WHERE type=12 AND transno='".$_GET['BatchNumber']. "'"; $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); $StartReceiptNumber=$myrow['start']; -$sql='SELECT debtorno, - ovamount, - invtext - FROM debtortrans +$sql="SELECT debtorno, + ovamount, + invtext + FROM debtortrans WHERE type=12 - AND transno='.$_GET['BatchNumber'].' - AND id='.($StartReceiptNumber-1+$_GET['ReceiptNumber']); + AND transno='".$_GET['BatchNumber']."' + AND id='".($StartReceiptNumber-1+$_GET['ReceiptNumber']) ."'"; $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); $DebtorNo=$myrow['debtorno']; $Amount=$myrow['ovamount']; $Narrative=$myrow['invtext']; -$sql='SELECT currency, +$sql="SELECT currency, decimalplaces - FROM currencies + FROM currencies WHERE currabrev=(SELECT currcode FROM banktrans WHERE type=12 - AND transno='.$_GET['BatchNumber'].')'; + AND transno='".$_GET['BatchNumber']."')"; $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); $Currency=$myrow['currency']; $DecimalPlaces=$myrow['decimalplaces']; -$sql='SELECT name, +$sql="SELECT name, address1, address2, address3, address4, address5, address6 - FROM debtorsmaster - WHERE debtorno="'.$DebtorNo.'"'; + FROM debtorsmaster + WHERE debtorno='".$DebtorNo."'"; $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-09-07 21:28:26 UTC (rev 3713) +++ trunk/doc/Change.log.html 2010-09-07 21:31:01 UTC (rev 3714) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>07/09/10 Tim: PDFReceipt.php - Correct the sql quoting</p> <p>07/09/10 Tim: PDFQuotation.php - Correct the sql quoting</p> <p>07/09/10 Tim: PDFPickingList.php - Correct the sql quoting</p> <p>07/09/10 Tim: PDFOrderStatus.php - Improve report layout for readability</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-09-07 21:33:01
|
Revision: 3715 http://web-erp.svn.sourceforge.net/web-erp/?rev=3715&view=rev Author: tim_schofield Date: 2010-09-07 21:32:54 +0000 (Tue, 07 Sep 2010) Log Message: ----------- Correct the sql quoting Modified Paths: -------------- trunk/PDFRemittanceAdvice.php trunk/doc/Change.log.html Modified: trunk/PDFRemittanceAdvice.php =================================================================== --- trunk/PDFRemittanceAdvice.php 2010-09-07 21:31:01 UTC (rev 3714) +++ trunk/PDFRemittanceAdvice.php 2010-09-07 21:32:54 UTC (rev 3715) @@ -24,7 +24,7 @@ supptrans.id FROM supptrans INNER JOIN suppliers ON supptrans.supplierno = suppliers.supplierid INNER JOIN paymentterms ON suppliers.paymentterms = paymentterms.termsindicator - WHERE supptrans.type=22 + WHERE supptrans.type=22 AND trandate ='" . FormatDateForSQL($_POST['PaymentDate']) . "' AND supplierno >= '" . $_POST['FromCriteria'] . "' AND supplierno <= '" . $_POST['ToCriteria'] . "' @@ -39,7 +39,7 @@ prnMsg(_('There were no remittance advices to print out for the supplier range and payment date specified'),'warn'); echo '<br><a href="'.$_SERVER['PHP_SELF'] .'?' . SID . '">'. _('Back').'</a>'; include('includes/footer.inc'); - exit; + exit; } /*then print the report */ @@ -49,7 +49,7 @@ $line_height=12; - + $SupplierID =''; $RemittanceAdviceCounter =0; while ($SuppliersPaid = DB_fetch_array($SuppliersResult)){ @@ -60,7 +60,7 @@ $SupplierID = $SuppliersPaid['supplierid']; $SupplierName = $SuppliersPaid['suppname']; $AccumBalance = 0; - + /* Now get the transactions and amounts that the payment was allocated to */ $sql = "SELECT systypes.typename, supptrans.suppreference, @@ -68,14 +68,14 @@ supptrans.transno, suppallocs.amt, (supptrans.ovamount + supptrans.ovgst ) AS trantotal - FROM supptrans + FROM supptrans INNER JOIN systypes ON systypes.typeid = supptrans.type INNER JOIN suppallocs ON suppallocs.transid_allocto=supptrans.id - WHERE suppallocs.transid_allocfrom=" . $SuppliersPaid['id'] . " + WHERE suppallocs.transid_allocfrom='" . $SuppliersPaid['id'] . "' ORDER BY supptrans.type, supptrans.transno"; - - + + $TransResult = DB_query($sql,$db,'','',false,false); if (DB_error_no($db) !=0) { $title = _('Remittance Advice Problem Report'); @@ -100,7 +100,7 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin+255, $YPos, 80,$FontSize,number_format($DetailTrans['trantotal'],2), 'right'); $LeftOvers = $pdf->addTextWrap($Left_Margin+355, $YPos,80,$FontSize,number_format($DetailTrans['amt'],2), 'right'); $AccumBalance += $DetailTrans['amt']; - + $YPos -=$line_height; if ($YPos < $Bottom_Margin + $line_height){ $PageNumber++; @@ -110,7 +110,7 @@ PaymentFooter(); } /* end while there are supplier payments to retrieve allocations for */ - + $FileName=$_SESSION['DatabaseName']. '_' . _('Remittance_Advices') . '_' . date('Y-m-d').'.pdf'; $pdf->OutputD($FileName); $pdf->__destruct(); @@ -166,16 +166,16 @@ global $SupplierName; global $AccumBalance; global $TotalPayments; - + $YPos -= (0.5*$line_height); $pdf->line($Left_Margin, $YPos+$line_height,$Page_Width-$Right_Margin, $YPos+$line_height); - + $LeftOvers = $pdf->addTextWrap($Left_Margin+280,$YPos,75,$FontSize,_('Total Payment:'), 'right'); - + $TotalPayments += $AccumBalance; - + $LeftOvers = $pdf->addTextWrap($Left_Margin+355,$YPos,80,$FontSize,number_format($AccumBalance,2), 'right'); - + $YPos -= (1.5*$line_height); $pdf->line($Left_Margin, $YPos+$line_height,$Page_Width-$Right_Margin, $YPos+$line_height); } @@ -197,7 +197,7 @@ global $AccumBalance; global $RemittanceAdviceCounter; global $SuppliersPaid; - + if ($RemittanceAdviceCounter>0){ $pdf->newPage(); } @@ -205,31 +205,31 @@ $YPos = $Page_Height - $Top_Margin; $pdf->addJpegFromFile($_SESSION['LogoFile'],$Page_Width/2 -50,$YPos-50,0,30); - + // Title $FontSize =15; $XPos = $Page_Width/2 - 110; $pdf->addText($XPos, $YPos,$FontSize, _('Remittance Advice') ); - + $FontSize = 10; $pdf->addText($XPos + 150, $YPos,$FontSize, ' '. _('printed:').' ' . Date($_SESSION['DefaultDateFormat'])); - + $pdf->addText($XPos + 280, $YPos,$FontSize, _('Page').': ' . $PageNumber); - + /*Now print out company info at the top left */ - + $XPos = $Left_Margin; $YPos = $Page_Height - $Top_Margin - 20; - + $FontSize = 10; $LineHeight = 13; $LineCount = 0; - + $pdf->addText($XPos, $YPos-$LineCount*$LineHeight, $FontSize, $_SESSION['CompanyRecord']['coyname']); - + $FontSize = 8; $LineHeight = 10; - + if ($_SESSION['CompanyRecord']['regoffice1'] <> '') { $LineCount += 1; $pdf->addText($XPos, $YPos-$LineCount*$LineHeight,$FontSize, $_SESSION['CompanyRecord']['regoffice1']); @@ -238,7 +238,7 @@ $LineCount += 1; $pdf->addText($XPos, $YPos-$LineCount*$LineHeight,$FontSize, $_SESSION['CompanyRecord']['regoffice2']); } - if (($_SESSION['CompanyRecord']['regoffice3'] <> '') OR ($_SESSION['CompanyRecord']['regoffice4'] <> '') OR ($_SESSION['CompanyRecord']['regoffice5'] <> '')) { + if (($_SESSION['CompanyRecord']['regoffice3'] <> '') OR ($_SESSION['CompanyRecord']['regoffice4'] <> '') OR ($_SESSION['CompanyRecord']['regoffice5'] <> '')) { $LineCount += 1; $pdf->addText($XPos, $YPos-$LineCount*$LineHeight,$FontSize, $_SESSION['CompanyRecord']['regoffice3'] . ' ' . $_SESSION['CompanyRecord']['regoffice4'] . ' ' . $_SESSION['CompanyRecord']['regoffice5']); // country in 6 not printed } @@ -248,13 +248,13 @@ $pdf->addText($XPos, $YPos-$LineCount*$LineHeight,$FontSize, _('Fax') . ': ' . $_SESSION['CompanyRecord']['fax']); $LineCount += 1; $pdf->addText($XPos, $YPos-$LineCount*$LineHeight, $FontSize, _('Email') . ': ' . $_SESSION['CompanyRecord']['email']); - - + + /*Now the supplier details and remittance advice address */ - + $XPos = $Left_Margin+20; $YPos = $Page_Height - $Top_Margin - 120; - + $LineCount = 0; $FontSize = 10; $pdf->addText($XPos, $YPos-$LineCount*$LineHeight, $FontSize, $SuppliersPaid['suppname']); @@ -266,19 +266,19 @@ $pdf->addText($XPos, $YPos-$LineCount*$LineHeight, $FontSize, $SuppliersPaid['address3'] . ' ' . $SuppliersPaid['address4'] . ' ' . $SuppliersPaid['address5'] . ' ' . $SuppliersPaid['address6']); $LineCount += 2; $pdf->addText($XPos, $YPos-$LineCount*$LineHeight, $FontSize, _('Our Code:') . ' ' .$SuppliersPaid['supplierid']); - + $YPos = $Page_Height - $Top_Margin - 120; - + $FontSize=8; $XPos = $Page_Width/2 - 60; $pdf->addText($XPos, $YPos,$FontSize, _('All amounts stated in') . ' - ' . $SuppliersPaid['currcode']); $YPos -= $line_height; $pdf->addText($XPos, $YPos,$FontSize, $SuppliersPaid['terms']); - + $YPos = $Page_Height - $Top_Margin - 180; //$YPos -= $line_height; $XPos = $Left_Margin; - + /*draw a nice curved corner box around the statement details */ /*from the top right */ $pdf->partEllipse($Page_Width-$Right_Margin-10,$YPos-10,0,90,10,10); @@ -296,10 +296,10 @@ $pdf->partEllipse($Page_Width-$Right_Margin-10, $Bottom_Margin+10,270,360,10,10); /*Finally join up to the top right corner where started */ $pdf->line($Page_Width-$Right_Margin, $Bottom_Margin+10,$Page_Width-$Right_Margin, $YPos-10); - + /*Finally join up to the top right corner where started */ $pdf->line($Page_Width-$Right_Margin, $Bottom_Margin+10,$Page_Width-$Right_Margin, $YPos-10); - + $YPos -= $line_height; $FontSize =10; /*Set up headings */ @@ -308,13 +308,13 @@ $pdf->addText($Left_Margin+180, $YPos,$FontSize, _('Reference') ); $pdf->addText($Left_Margin+310, $YPos,$FontSize, _('Total') ); $pdf->addText($Left_Margin+390, $YPos,$FontSize, _('This Payment') ); - + $YPos -= $line_height; /*draw a line */ $pdf->line($Page_Width-$Right_Margin, $YPos,$XPos, $YPos); - + $YPos -= $line_height; $XPos = $Left_Margin; - + } ?> \ No newline at end of file Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-09-07 21:31:01 UTC (rev 3714) +++ trunk/doc/Change.log.html 2010-09-07 21:32:54 UTC (rev 3715) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>07/09/10 Tim: PDFRemittanceAdvice.php - Correct the sql quoting</p> <p>07/09/10 Tim: PDFReceipt.php - Correct the sql quoting</p> <p>07/09/10 Tim: PDFQuotation.php - Correct the sql quoting</p> <p>07/09/10 Tim: PDFPickingList.php - Correct the sql quoting</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-09-08 19:25:35
|
Revision: 3717 http://web-erp.svn.sourceforge.net/web-erp/?rev=3717&view=rev Author: tim_schofield Date: 2010-09-08 19:25:29 +0000 (Wed, 08 Sep 2010) Log Message: ----------- Screen layout improvements. Correct the sql quoting Modified Paths: -------------- trunk/PDFStockCheckComparison.php trunk/doc/Change.log.html Modified: trunk/PDFStockCheckComparison.php =================================================================== --- trunk/PDFStockCheckComparison.php 2010-09-08 07:40:26 UTC (rev 3716) +++ trunk/PDFStockCheckComparison.php 2010-09-08 19:25:29 UTC (rev 3717) @@ -110,13 +110,13 @@ newqoh) VALUES ('" . $myrow['stockid'] . "', 17, - " . $AdjustmentNumber . ", + '" . $AdjustmentNumber . "', '" . $myrow['loccode'] . "', '" . $SQLAdjustmentDate . "', - " . $PeriodNo . ", + '" . $PeriodNo . "', '" . _('Inventory Check') . "', - " . $StockQtyDifference . ", - " . ($QtyOnHandPrior + $StockQtyDifference) . " + '" . $StockQtyDifference . "', + '" . ($QtyOnHandPrior + $StockQtyDifference) . "' )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The stock movement record cannot be inserted because'); @@ -124,7 +124,7 @@ $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg, true); $SQL = "UPDATE locstock - SET quantity = quantity + " . $StockQtyDifference . " + SET quantity = quantity + '" . $StockQtyDifference . "' WHERE stockid='" . $myrow['stockid'] . "' AND loccode='" . $myrow['loccode'] . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The location stock record could not be updated because'); @@ -145,11 +145,11 @@ amount, narrative) VALUES (17, - " .$AdjustmentNumber . ", + '" .$AdjustmentNumber . "', '" . $SQLAdjustmentDate . "', - " . $PeriodNo . ", - " . $StockGLCodes['adjglact'] . ", - " . $myrow['standardcost'] * -($StockQtyDifference) . ", + '" . $PeriodNo . "', + '" . $StockGLCodes['adjglact'] . "', + '" . $myrow['standardcost'] * -($StockQtyDifference) . "', '" . $myrow['stockid'] . " x " . $StockQtyDifference . " @ " . $myrow['standardcost'] . " - " . _('Inventory Check') . "')"; $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg, true); @@ -164,11 +164,11 @@ amount, narrative) VALUES (17, - " .$AdjustmentNumber . ", + '" .$AdjustmentNumber . "', '" . $SQLAdjustmentDate . "', - " . $PeriodNo . ", - " . $StockGLCodes['stockact'] . ", - " . $myrow['standardcost'] * $StockQtyDifference . ", '" . $myrow['stockid'] . " x " . $StockQtyDifference . " @ " . $myrow['standardcost'] . " - " . _('Inventory Check') . "')"; + '" . $PeriodNo . "', + '" . $StockGLCodes['stockact'] . "', + '" . $myrow['standardcost'] * $StockQtyDifference . ", '" . $myrow['stockid'] . " x " . $StockQtyDifference . " @ " . $myrow['standardcost'] . " - " . _('Inventory Check') . "')"; $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg, true); } //END INSERT GL TRANS @@ -347,8 +347,11 @@ $title= _('Inventory Comparison Report'); include('includes/header.inc'); - echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="POST"><table>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt=""></img>' . ' ' + . $title . '</p>'; + echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="POST"><table class=selection>'; + echo '<tr><td>' . _('Choose Option'). ':</font></td><td><select name="ReportOrClose">'; if ($_POST['ReportOrClose']=='ReportAndClose'){ @@ -372,10 +375,10 @@ echo '<option selected VALUE="Leave">' . _("Don't Adjust System stock to Nil"); } - echo '</table><div class="centre"><input type=Submit Name="PrintPDF" Value="' . _('Print PDF'). '"></div>'; + echo '</table><br><div class="centre"><input type=Submit Name="PrintPDF" Value="' . _('Print PDF'). '"></div>'; include('includes/footer.inc'); } /*end of else not PrintPDF */ -?> +?> \ No newline at end of file Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-09-08 07:40:26 UTC (rev 3716) +++ trunk/doc/Change.log.html 2010-09-08 19:25:29 UTC (rev 3717) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>08/09/10 Tim: PDFStockCheckComparison.php - Screen layout improvements. Correct the sql quoting</p> <p>07/09/10 Tim: PDFRemittanceAdvice.php - Correct the sql quoting</p> <p>07/09/10 Tim: PDFReceipt.php - Correct the sql quoting</p> <p>07/09/10 Tim: PDFQuotation.php - Correct the sql quoting</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-09-08 21:25:11
|
Revision: 3718 http://web-erp.svn.sourceforge.net/web-erp/?rev=3718&view=rev Author: tim_schofield Date: 2010-09-08 21:25:05 +0000 (Wed, 08 Sep 2010) Log Message: ----------- Correct the sql quoting Modified Paths: -------------- trunk/PDFStockLocTransfer.php trunk/doc/Change.log.html Modified: trunk/PDFStockLocTransfer.php =================================================================== --- trunk/PDFStockLocTransfer.php 2010-09-08 19:25:29 UTC (rev 3717) +++ trunk/PDFStockLocTransfer.php 2010-09-08 21:25:05 UTC (rev 3718) @@ -49,7 +49,7 @@ INNER JOIN stockmaster ON loctransfers.stockid=stockmaster.stockid INNER JOIN locations ON loctransfers.shiploc=locations.loccode INNER JOIN locations AS locationsrec ON loctransfers.recloc = locationsrec.loccode - WHERE loctransfers.reference=" . $_GET['TransferNo']; + WHERE loctransfers.reference='" . $_GET['TransferNo'] . "'"; $result = DB_query($sql,$db, $ErrMsg, $DbgMsg); Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-09-08 19:25:29 UTC (rev 3717) +++ trunk/doc/Change.log.html 2010-09-08 21:25:05 UTC (rev 3718) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>08/09/10 Tim: PDFStockLocTransfer.php - Correct the sql quoting</p> <p>08/09/10 Tim: PDFStockCheckComparison.php - Screen layout improvements. Correct the sql quoting</p> <p>07/09/10 Tim: PDFRemittanceAdvice.php - Correct the sql quoting</p> <p>07/09/10 Tim: PDFReceipt.php - Correct the sql quoting</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-09-08 21:29:05
|
Revision: 3719 http://web-erp.svn.sourceforge.net/web-erp/?rev=3719&view=rev Author: tim_schofield Date: 2010-09-08 21:28:59 +0000 (Wed, 08 Sep 2010) Log Message: ----------- Fix missing sql error message and correct the default date format in the heading Modified Paths: -------------- trunk/PDFStockNegatives.php trunk/doc/Change.log.html trunk/includes/PDFStockNegativesHeader.inc Modified: trunk/PDFStockNegatives.php =================================================================== --- trunk/PDFStockNegatives.php 2010-09-08 21:25:05 UTC (rev 3718) +++ trunk/PDFStockNegatives.php 2010-09-08 21:28:59 UTC (rev 3719) @@ -17,6 +17,7 @@ $title = _('Negative Stock Listing Error'); $ErrMsg = _('An error occurred retrieving the negative quantities.'); +$DbgMsg = _('The sql that failed to retrieve the negative quantities was'); $sql = "SELECT stockmaster.stockid, stockmaster.description, Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-09-08 21:25:05 UTC (rev 3718) +++ trunk/doc/Change.log.html 2010-09-08 21:28:59 UTC (rev 3719) @@ -1,6 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> -<p>08/09/10 Tim: PDFStockLocTransfer.php - Correct the sql quoting</p> +<p>08/09/10 Tim: PDFStockNegatives.php - Fix missing sql error message and correct the default date format in the heading</p> <p>08/09/10 Tim: PDFStockCheckComparison.php - Screen layout improvements. Correct the sql quoting</p> <p>07/09/10 Tim: PDFRemittanceAdvice.php - Correct the sql quoting</p> <p>07/09/10 Tim: PDFReceipt.php - Correct the sql quoting</p> Modified: trunk/includes/PDFStockNegativesHeader.inc =================================================================== --- trunk/includes/PDFStockNegativesHeader.inc 2010-09-08 21:25:05 UTC (rev 3718) +++ trunk/includes/PDFStockNegativesHeader.inc 2010-09-08 21:28:59 UTC (rev 3719) @@ -9,7 +9,7 @@ $FontSize=12; $YPos= $Page_Height-$Top_Margin; $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,300,$FontSize,$_SESSION['CompanyRecord']['coyname']); -$LeftOvers = $pdf->addTextWrap($Page_Width-$Right_Margin-120,$YPos,120,$FontSize, _('Printed'). ': ' . Date($DefaultDateFormat) . ' ' . _('Page'). ' ' . $PageNumber); +$LeftOvers = $pdf->addTextWrap($Page_Width-$Right_Margin-120,$YPos,120,$FontSize, _('Printed'). ': ' . Date($_SESSION['DefaultDateFormat']) . ' ' . _('Page'). ' ' . $PageNumber); $YPos -=15; $FontSize=12; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-09-08 21:32:31
|
Revision: 3720 http://web-erp.svn.sourceforge.net/web-erp/?rev=3720&view=rev Author: tim_schofield Date: 2010-09-08 21:32:24 +0000 (Wed, 08 Sep 2010) Log Message: ----------- Correct the sql quoting Modified Paths: -------------- trunk/PDFStockTransfer.php trunk/doc/Change.log.html Modified: trunk/PDFStockTransfer.php =================================================================== --- trunk/PDFStockTransfer.php 2010-09-08 21:28:59 UTC (rev 3719) +++ trunk/PDFStockTransfer.php 2010-09-08 21:32:24 UTC (rev 3720) @@ -18,7 +18,7 @@ /*Print out the category totals */ -$sql='SELECT stockid, transno, loccode, trandate, qty from stockmoves where transno='.$_GET['TransferNo'].' and type=16'; +$sql="SELECT stockid, transno, loccode, trandate, qty from stockmoves where transno='".$_GET['TransferNo']."' and type=16"; $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); $StockID=$myrow[0]; @@ -29,10 +29,10 @@ $ToCode=$myrow[2]; $Quantity=$myrow[4]; -$sql='select description from stockmaster where stockid="'.$StockID.'"'; +$sql="select description from stockmaster where stockid='".$StockID."'"; $result=DB_query($sql, $db); -If (DB_num_rows($result) == 0){ +if (DB_num_rows($result) == 0){ include ('includes/header.inc'); prnMsg(_('There are no decription for '.$StockID), 'warn'); include ('includes/footer.inc'); @@ -42,10 +42,10 @@ $myrow=DB_fetch_array($result); $Description=$myrow[0]; -$sql='select locationname from locations where loccode="'.$FromCode.'"'; +$sql="select locationname from locations where loccode='".$FromCode."'"; $result=DB_query($sql, $db); -If (DB_num_rows($result) == 0){ +if (DB_num_rows($result) == 0){ include ('includes/header.inc'); prnMsg(_('There are no location From for '.$StockID), 'warn'); include ('includes/footer.inc'); @@ -55,10 +55,10 @@ $myrow=DB_fetch_array($result); $From=$myrow[0]; -$sql='select locationname from locations where loccode="'.$ToCode.'"'; +$sql="select locationname from locations where loccode='".$ToCode."'"; $result=DB_query($sql, $db); -If (DB_num_rows($result) == 0){ +if (DB_num_rows($result) == 0){ include ('includes/header.inc'); prnMsg(_('There are no location To for '.$StockID), 'warn'); include ('includes/footer.inc'); Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-09-08 21:28:59 UTC (rev 3719) +++ trunk/doc/Change.log.html 2010-09-08 21:32:24 UTC (rev 3720) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>08/09/10 Tim: PDFStockTransfer.php - Correct the sql quoting</p> <p>08/09/10 Tim: PDFStockNegatives.php - Fix missing sql error message and correct the default date format in the heading</p> <p>08/09/10 Tim: PDFStockCheckComparison.php - Screen layout improvements. Correct the sql quoting</p> <p>07/09/10 Tim: PDFRemittanceAdvice.php - Correct the sql quoting</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-09-08 21:35:55
|
Revision: 3721 http://web-erp.svn.sourceforge.net/web-erp/?rev=3721&view=rev Author: tim_schofield Date: 2010-09-08 21:35:49 +0000 (Wed, 08 Sep 2010) Log Message: ----------- Screen layout improvements. Correct the sql quoting Modified Paths: -------------- trunk/PDFSuppTransListing.php trunk/doc/Change.log.html Modified: trunk/PDFSuppTransListing.php =================================================================== --- trunk/PDFSuppTransListing.php 2010-09-08 21:32:24 UTC (rev 3720) +++ trunk/PDFSuppTransListing.php 2010-09-08 21:35:49 UTC (rev 3721) @@ -28,7 +28,7 @@ } echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '>'; - echo '<table> + echo '<table class=selection> <tr> <td>' . _('Enter the date for which the transactions are to be listed') . ":</td> <td><input type=text name='Date' maxlength=10 size=10 class=date alt='" . $_SESSION['DefaultDateFormat'] . "' VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td> @@ -44,7 +44,7 @@ echo '</select></td></tr>'; - echo "</select></td></tr></table><div class='centre'><input type=submit name='Go' value='" . _('Create PDF') . "'></div>"; + echo "</select></td></tr></table><br><div class='centre'><input type=submit name='Go' value='" . _('Create PDF') . "'></div>"; include('includes/footer.inc'); @@ -62,7 +62,7 @@ ovgst, transtext FROM supptrans - WHERE type=" . $_POST['TransType'] . " + WHERE type='" . $_POST['TransType'] . "' AND date_format(inputdate, '%Y-%m-%d')='".FormatDateForSQL($_POST['Date'])."'"; $result=DB_query($sql,$db,'','',false,false); Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-09-08 21:32:24 UTC (rev 3720) +++ trunk/doc/Change.log.html 2010-09-08 21:35:49 UTC (rev 3721) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>08/09/10 Tim: PDFSuppTransListing.php - Screen layout improvements. Correct the sql quoting</p> <p>08/09/10 Tim: PDFStockTransfer.php - Correct the sql quoting</p> <p>08/09/10 Tim: PDFStockNegatives.php - Fix missing sql error message and correct the default date format in the heading</p> <p>08/09/10 Tim: PDFStockCheckComparison.php - Screen layout improvements. Correct the sql quoting</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-09-08 21:41:57
|
Revision: 3722 http://web-erp.svn.sourceforge.net/web-erp/?rev=3722&view=rev Author: tim_schofield Date: 2010-09-08 21:41:50 +0000 (Wed, 08 Sep 2010) Log Message: ----------- Correct the sql quoting Modified Paths: -------------- trunk/PDFTopItems.php trunk/doc/Change.log.html Modified: trunk/PDFTopItems.php =================================================================== --- trunk/PDFTopItems.php 2010-09-08 21:35:49 UTC (rev 3721) +++ trunk/PDFTopItems.php 2010-09-08 21:41:50 UTC (rev 3722) @@ -23,8 +23,8 @@ AND salesorders.debtorno = debtorsmaster.debtorno AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY) GROUP BY salesorderdetails.stkcode - ORDER BY " . $_GET['order'] . " DESC - LIMIT 0," . $_GET['NumberOfTopItems'] . ""; + ORDER BY '" . $_GET['order'] . "' DESC + LIMIT 0,'" . $_GET['NumberOfTopItems'] . "'"; } else { //the situation if only location type selected "All" if ($_GET["location"] == "All") { $SQL = "SELECT salesorderdetails.stkcode, @@ -39,8 +39,8 @@ AND debtorsmaster.typeid = '" . $_GET["customers"] . "' AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY) GROUP BY salesorderdetails.stkcode - ORDER BY " . $_GET['order'] . " DESC - LIMIT 0," . $_GET['NumberOfTopItems'] . ""; + ORDER BY '" . $_GET['order'] . "' DESC + LIMIT 0,'" . $_GET['NumberOfTopItems'] . "'"; } else { //the situation if the customer type selected "All" if ($_GET["customers"] == "All") { @@ -57,8 +57,8 @@ AND salesorders.fromstkloc = '" . $_GET["location"] . "' AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY) GROUP BY salesorderdetails.stkcode - ORDER BY " . $_GET['order'] . " DESC - LIMIT 0," . $_GET['NumberOfTopItems'] . ""; + ORDER BY '" . $_GET['order'] . "' DESC + LIMIT 0,'" . $_GET['NumberOfTopItems'] . "'"; } else { //the situation if the location and customer type not selected "All" $SQL = " @@ -75,8 +75,8 @@ AND debtorsmaster.typeid = '" . $_GET["customers"] . "' AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY) GROUP BY salesorderdetails.stkcode - ORDER BY " . $_GET['order'] . " DESC - LIMIT 0," . $_GET['NumberOfTopItems'] . ""; + ORDER BY '" . $_GET['order'] . "' DESC + LIMIT 0,'" . $_GET['NumberOfTopItems'] . "'"; } } } Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-09-08 21:35:49 UTC (rev 3721) +++ trunk/doc/Change.log.html 2010-09-08 21:41:50 UTC (rev 3722) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>08/09/10 Tim: PDFTopItems.php - Correct the sql quoting</p> <p>08/09/10 Tim: PDFSuppTransListing.php - Screen layout improvements. Correct the sql quoting</p> <p>08/09/10 Tim: PDFStockTransfer.php - Correct the sql quoting</p> <p>08/09/10 Tim: PDFStockNegatives.php - Fix missing sql error message and correct the default date format in the heading</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |