From: <tim...@us...> - 2010-09-30 16:14:33
|
Revision: 4032 http://web-erp.svn.sourceforge.net/web-erp/?rev=4032&view=rev Author: tim_schofield Date: 2010-09-30 16:14:24 +0000 (Thu, 30 Sep 2010) Log Message: ----------- Add form verification to prevent form spoofing Modified Paths: -------------- trunk/Z_ChangeCustomerCode.php trunk/Z_ChangeStockCategory.php Modified: trunk/Z_ChangeCustomerCode.php =================================================================== --- trunk/Z_ChangeCustomerCode.php 2010-09-30 16:13:43 UTC (rev 4031) +++ trunk/Z_ChangeCustomerCode.php 2010-09-30 16:14:24 UTC (rev 4032) @@ -220,6 +220,7 @@ } echo "<form action='" . $_SERVER['PHP_SELF'] . "?=" . $SID . "' method=post>"; +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p><table> <tr><td>' . _('Existing Debtor Code') . ":</td> Modified: trunk/Z_ChangeStockCategory.php =================================================================== --- trunk/Z_ChangeStockCategory.php 2010-09-30 16:13:43 UTC (rev 4031) +++ trunk/Z_ChangeStockCategory.php 2010-09-30 16:14:24 UTC (rev 4032) @@ -90,6 +90,7 @@ echo '<p>' . _('Stock Code') . ': ' . $_POST['OldStockCategory'] . ' ' . _('was successfully changed to') . ' : ' . $_POST['NewStockCategory']; } echo "<form action='" . $_SERVER['PHP_SELF'] . "?=" . $SID . "' method=post>"; +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p><table> <tr><td>' . _('Existing Inventory Category Code') . ":</td> <td><input type=Text name='OldStockCategory' size=20 maxlength=20></td></tr>"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-09-30 16:19:06
|
Revision: 4047 http://web-erp.svn.sourceforge.net/web-erp/?rev=4047&view=rev Author: tim_schofield Date: 2010-09-30 16:19:00 +0000 (Thu, 30 Sep 2010) Log Message: ----------- Add form verification to prevent form spoofing Modified Paths: -------------- trunk/Z_poEditLangModule.php trunk/Z_poEditLangRemaining.php Modified: trunk/Z_poEditLangModule.php =================================================================== --- trunk/Z_poEditLangModule.php 2010-09-30 16:18:44 UTC (rev 4046) +++ trunk/Z_poEditLangModule.php 2010-09-30 16:19:00 UTC (rev 4047) @@ -14,12 +14,12 @@ include('includes/header.inc'); -/* Your webserver user MUST have read/write access to here, +/* Your webserver user MUST have read/write access to here, otherwise you'll be wasting your time */ - + $PathToLanguage = './locale/' . $_SESSION['Language'] . '/LC_MESSAGES/messages.po'; $PathToNewLanguage = './locale/' . $_SESSION['Language'] . '/LC_MESSAGES/messages.po.new'; - + echo "<br> <a href='" . $rootpath . "/Z_poAdmin.php'>" . _('Back to the translation menu') . "</a>"; echo '<br><br> ' . _('Utility to edit a language file module'); echo '<br> ' . _('Current language is') . ' ' . $_SESSION['Language']; @@ -28,7 +28,7 @@ if (isset($_POST['ReMergePO'])){ -/*update the messages.po file with any new strings */ +/*update the messages.po file with any new strings */ /*first rebuild the en_GB default with xgettext */ @@ -38,17 +38,17 @@ system($xgettextCmd); /*now merge the translated file with the new template to get new strings*/ - + $msgMergeCmd = 'msgmerge --no-wrap --update ' . $PathToLanguage . ' ' . $PathToDefault; - + system($msgMergeCmd); //$Result = rename($PathToNewLanguage, $PathToLanguage); exit; } - -if (isset($_POST['module'])) { + +if (isset($_POST['module'])) { // a module has been selected and is being modified - + $PathToLanguage_mo = substr($PathToLanguage,0,strrpos($PathToLanguage,'.')) . '.mo'; /* now read in the language file */ @@ -58,9 +58,10 @@ if (isset($_POST['submit'])) { // save the modifications - + echo '<br><table><tr><td>'; echo '<form method="post" action=' . $_SERVER['PHP_SELF'] . '?' . SID . '>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; /* write the new language file */ @@ -76,7 +77,7 @@ $Result = fputs($fpOut, $LangFile[$i]); } $Result = fclose($fpOut); - + /* Done writing, now move the original file to a .old */ /* and the new one to the default */ @@ -88,7 +89,7 @@ if (file_exists($PathToLanguage . '.bak')) { $Result = unlink($PathToLanguage . '.bak'); } - + /*now need to create the .mo file from the .po file */ $msgfmtCommand = 'msgfmt ' . $PathToLanguage . ' -o ' . $PathToLanguage_mo; system($msgfmtCommand); @@ -97,7 +98,7 @@ echo '</form>'; echo '</td></tr></table>'; - + /* End of Submit block */ } else { @@ -117,7 +118,7 @@ } } $TotalLines = $j - 1; - + /* stick it on the screen */ echo '<br> ' . _('When finished modifying you must click on Modify at the bottom in order to save changes'); @@ -126,6 +127,7 @@ prnMsg (_('Your existing translation file (messages.po) will be saved as messages.po.old') . '<br>', 'info', _('PLEASE NOTE')); echo '<br>'; echo '<form method="post" action=' . $_SERVER['PHP_SELF'] . '?' . SID . '>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '</div'; echo '<table>'; echo '<tr><th ALIGN="center">' . _('Language File for') . ' "' . $_POST['language'] . '"</th></tr>'; @@ -165,7 +167,7 @@ echo '<br><div class="centre">'; echo '<input type="Submit" name="submit" VALUE="' . _('Modify') . '"> '; echo '<input type="hidden" name="module" VALUE="' . $_POST['module'] . '">'; - + echo '</form>'; echo '</div>'; } @@ -202,7 +204,7 @@ } closedir($handle); } - + sort($AvailableModules); $NumberOfModules = sizeof($AvailableModules) - 1; @@ -213,6 +215,7 @@ { echo '<br><table><tr><td>'; echo '<form method="post" action=' . $_SERVER['PHP_SELF'] . '?' . SID . '>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table>'; Modified: trunk/Z_poEditLangRemaining.php =================================================================== --- trunk/Z_poEditLangRemaining.php 2010-09-30 16:18:44 UTC (rev 4046) +++ trunk/Z_poEditLangRemaining.php 2010-09-30 16:19:00 UTC (rev 4047) @@ -14,17 +14,17 @@ include('includes/header.inc'); -/* Your webserver user MUST have read/write access to here, +/* Your webserver user MUST have read/write access to here, otherwise you'll be wasting your time */ - + $PathToLanguage = './locale/' . $_SESSION['Language'] . '/LC_MESSAGES/messages.po'; $PathToNewLanguage = './locale/' . $_SESSION['Language'] . '/LC_MESSAGES/messages.po.new'; - + echo "<br> <a href='" . $rootpath . "/Z_poAdmin.php'>" . _('Back to the translation menu') . "</a>"; echo '<br><br> ' . _('Utility to edit a language file module'); echo '<br> ' . _('Current language is') . ' ' . $_SESSION['Language']; - + $PathToLanguage_mo = substr($PathToLanguage,0,strrpos($PathToLanguage,'.')) . '.mo'; /* now read in the language file */ @@ -34,9 +34,10 @@ if (isset($_POST['submit'])) { // save the modifications - + echo '<br><table><tr><td>'; echo '<form method="post" action=' . $_SERVER['PHP_SELF'] . '?' . SID . '>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; /* write the new language file */ @@ -52,7 +53,7 @@ $Result = fputs($fpOut, $LangFile[$i]); } $Result = fclose($fpOut); - + /* Done writing, now move the original file to a .old */ /* and the new one to the default */ @@ -64,7 +65,7 @@ if (file_exists($PathToLanguage . '.bak')) { $Result = unlink($PathToLanguage . '.bak'); } - + /*now need to create the .mo file from the .po file */ $msgfmtCommand = 'msgfmt ' . $PathToLanguage . ' -o ' . $PathToLanguage_mo; system($msgfmtCommand); @@ -92,8 +93,8 @@ } } $TotalLines = $j - 1; - - + + /* stick it on the screen */ echo '<br> ' . _('When finished modifying you must click on Modify at the bottom in order to save changes'); @@ -103,6 +104,7 @@ echo '<br>'; echo '</div>'; echo '<form method="post" action=' . $_SERVER['PHP_SELF'] . '?' . SID . '>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table>'; echo '<tr><th ALIGN="center">' . _('Language File for') . ' "' . $_SESSION['Language'] . '"</th></tr>'; @@ -134,7 +136,7 @@ echo '<br><div class="centre">'; echo '<input type="Submit" name="submit" VALUE="' . _('Modify') . '"> '; echo '<input type="hidden" name="module" VALUE="' . $_POST['module'] . '">'; - + echo '</form>'; echo '</div>'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-09-30 16:20:15
|
Revision: 4051 http://web-erp.svn.sourceforge.net/web-erp/?rev=4051&view=rev Author: tim_schofield Date: 2010-09-30 16:20:09 +0000 (Thu, 30 Sep 2010) Log Message: ----------- Add form verification to prevent form spoofing Modified Paths: -------------- trunk/Z_RePostGLFromPeriod.php trunk/Z_ReverseSuppPaymentRun.php Modified: trunk/Z_RePostGLFromPeriod.php =================================================================== --- trunk/Z_RePostGLFromPeriod.php 2010-09-30 16:19:45 UTC (rev 4050) +++ trunk/Z_RePostGLFromPeriod.php 2010-09-30 16:20:09 UTC (rev 4051) @@ -9,6 +9,7 @@ include('includes/header.inc'); echo "<form method='POST' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (!isset($_POST['FromPeriod'])){ @@ -31,7 +32,7 @@ </tr> </table>'; - echo "<div class='centre'><input type=submit Name='recalc' Value='" . _('Do the Recalculation') . "' + echo "<div class='centre'><input type=submit Name='recalc' Value='" . _('Do the Recalculation') . "' onclick=\"return confirm('" . _('Are you sure you wish to re-post all general ledger transactions since the selected period .... this can take some time?') . '\');"></div></form>'; @@ -45,16 +46,16 @@ $sql = 'UPDATE chartdetails SET actual =0 WHERE period >= ' . $_POST['FromPeriod']; $UpdActualChartDetails = DB_query($sql,$db); - $ChartDetailBFwdResult = DB_query('SELECT accountcode, bfwd FROM chartdetails WHERE period=' . $_POST['FromPeriod'],$db); + $ChartDetailBFwdResult = DB_query('SELECT accountcode, bfwd FROM chartdetails WHERE period=' . $_POST['FromPeriod'],$db); while ($ChartRow=DB_fetch_array($ChartDetailBFwdResult)){ $sql = 'UPDATE chartdetails SET bfwd =' . $ChartRow['bfwd'] . ' WHERE period > ' . $_POST['FromPeriod'] . ' AND accountcode=' . $ChartRow['accountcode']; $UpdActualChartDetails = DB_query($sql,$db); } - + /*Now repost the lot */ include('includes/GLPostings.inc'); - + prnMsg(_('All general ledger postings have been reposted from period') . ' ' . $_POST['FromPeriod'],'success'); } include('includes/footer.inc'); Modified: trunk/Z_ReverseSuppPaymentRun.php =================================================================== --- trunk/Z_ReverseSuppPaymentRun.php 2010-09-30 16:19:45 UTC (rev 4050) +++ trunk/Z_ReverseSuppPaymentRun.php 2010-09-30 16:20:09 UTC (rev 4051) @@ -84,6 +84,7 @@ echo "<form method=post action='" . $_SERVER['PHP_SELF'] . '?' . SID . "'>"; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<br>' . _('Enter the date of the payment run') . ": <input type=text name='PaytDate' maxlength=11 size=11 value='" . $_POST['PaytDate'] . "'>"; echo "<input type=submit name='RevPayts' value='" . _('Reverse Supplier Payments on the Date Entered') . "'>"; echo '</form>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-09-30 16:20:29
|
Revision: 4052 http://web-erp.svn.sourceforge.net/web-erp/?rev=4052&view=rev Author: tim_schofield Date: 2010-09-30 16:20:23 +0000 (Thu, 30 Sep 2010) Log Message: ----------- Add form verification to prevent form spoofing Modified Paths: -------------- trunk/Z_UpdateChartDetailsBFwd.php trunk/Z_Upgrade3.10.php Modified: trunk/Z_UpdateChartDetailsBFwd.php =================================================================== --- trunk/Z_UpdateChartDetailsBFwd.php 2010-09-30 16:20:09 UTC (rev 4051) +++ trunk/Z_UpdateChartDetailsBFwd.php 2010-09-30 16:20:23 UTC (rev 4052) @@ -9,6 +9,7 @@ echo "<form method='POST' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if ($_POST['FromPeriod'] > $_POST['ToPeriod']){ prnMsg(_('The selected period from is actually after the period to') . '. ' . _('Please re-select the reporting period'),'error'); Modified: trunk/Z_Upgrade3.10.php =================================================================== --- trunk/Z_Upgrade3.10.php 2010-09-30 16:20:09 UTC (rev 4051) +++ trunk/Z_Upgrade3.10.php 2010-09-30 16:20:23 UTC (rev 4052) @@ -10,6 +10,7 @@ if (!isset($_POST['DoUpgrade'])) { echo "<br><form method='post' action='" . $_SERVER['PHP_SELF'] . '?' . SID . "'>"; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<div class="centre"><input type=submit name=DoUpgrade value="' . _('Perform Upgrade') . '"></div>'; echo '</form'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-09-30 16:21:49
|
Revision: 4058 http://web-erp.svn.sourceforge.net/web-erp/?rev=4058&view=rev Author: tim_schofield Date: 2010-09-30 16:21:43 +0000 (Thu, 30 Sep 2010) Log Message: ----------- Add form verification to prevent form spoofing Modified Paths: -------------- trunk/Z_Upgrade_3.10-3.11.php trunk/Z_UploadForm.php Modified: trunk/Z_Upgrade_3.10-3.11.php =================================================================== --- trunk/Z_Upgrade_3.10-3.11.php 2010-09-30 16:21:32 UTC (rev 4057) +++ trunk/Z_Upgrade_3.10-3.11.php 2010-09-30 16:21:43 UTC (rev 4058) @@ -10,6 +10,7 @@ prnMsg(_('This script will run perform any modifications to the database since v 3.10 required to allow the additional functionality in version 3.11 scripts'),'info'); echo "<p><form method='post' action='" . $_SERVER['PHP_SELF'] . '?' . SID . "'>"; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<div class="centre"?><input type=submit name=DoUpgrade VALUE="' . _('Perform Upgrade') . '"></div>'; echo '</form>'; } @@ -19,7 +20,7 @@ echo '<br>'; prnMsg(_('If there are any failures then please check with your system administrator'). '. '._('Please read all notes carefully to ensure they are expected'),'info'); - + $SQLScriptFile = file('./sql/mysql/upgrade3.10-3.11.sql'); $ScriptFileEntries = sizeof($SQLScriptFile); @@ -88,7 +89,7 @@ } //end if its a valid sql line not a comment } //end of for loop around the lines of the sql script echo '</table>'; - + /*Now run the data conversions required. */ } /*Dont do upgrade */ Modified: trunk/Z_UploadForm.php =================================================================== --- trunk/Z_UploadForm.php 2010-09-30 16:21:32 UTC (rev 4057) +++ trunk/Z_UploadForm.php 2010-09-30 16:21:43 UTC (rev 4058) @@ -9,8 +9,10 @@ include('includes/header.inc'); -echo "<form ENCtype='multipart/form-data' action='Z_UploadResult.php' method=post> - <input type='hidden' name='MAX_FILE_SIZE' value='1000000'>" . +echo "<form ENCtype='multipart/form-data' action='Z_UploadResult.php' method=post>"; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + +echo "<input type='hidden' name='MAX_FILE_SIZE' value='1000000'>" . _('Send this file') . ": <input name='userfile' type='file'> <input type='submit' VALUE='" . _('Send File') . "'> </form>"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-09-30 16:22:31
|
Revision: 4061 http://web-erp.svn.sourceforge.net/web-erp/?rev=4061&view=rev Author: tim_schofield Date: 2010-09-30 16:22:24 +0000 (Thu, 30 Sep 2010) Log Message: ----------- Add form verification to prevent form spoofing Modified Paths: -------------- trunk/install/index.php trunk/reportwriter/admin/forms/ReportsCritSetup.html trunk/reportwriter/admin/forms/ReportsDBSetup.html trunk/reportwriter/admin/forms/ReportsFieldSetup.html trunk/reportwriter/admin/forms/ReportsHome.html Modified: trunk/install/index.php =================================================================== --- trunk/install/index.php 2010-09-30 16:22:09 UTC (rev 4060) +++ trunk/install/index.php 2010-09-30 16:22:24 UTC (rev 4061) @@ -53,11 +53,11 @@ if(type == 'demo') { document.getElementById('db_file_demo').checked = true; document.getElementById('db_file_new').checked = false; - + } else if(type == 'new') { document.getElementById('db_file_demo').checked = false; document.getElementById('db_file_new').checked = true; - + } } @@ -75,6 +75,7 @@ </table> <form name="weberp_installation_wizard" action="save.php" method="post" enctype="multipart/form-data"> +<input type="hidden" name="FormID" value="<?php echo $_SESSION['FormID']; ?>" /> <input type="hidden" name="url" value="" /> <input type="hidden" name="password_fieldname" value="admin_password" /> <input type="hidden" name="remember" id="remember" value="true" /> @@ -135,19 +136,19 @@ </tr> <tr> <td style="color: #666666;">Configuration file</td> - <td><?php if(is_writable($path_to_root)) { - echo '<font class="good">Writeable</font>'; - } else { - echo '<font class="bad">Unwriteable</font>'; + <td><?php if(is_writable($path_to_root)) { + echo '<font class="good">Writeable</font>'; + } else { + echo '<font class="bad">Unwriteable</font>'; } ?> </td> <td style="color: #666666;"><?php echo 'Company data dirs ('. $comp_path. '/*)'; ?> </td> - <td><?php if(is_writable($comp_path)) { - echo '<font class="good">Writeable</font>'; - } else { - echo '<font class="bad">Unwriteable</font>'; - } + <td><?php if(is_writable($comp_path)) { + echo '<font class="good">Writeable</font>'; + } else { + echo '<font class="bad">Unwriteable</font>'; + } ?> </td> </tr> @@ -186,11 +187,11 @@ <font style="cursor: pointer;" onclick="javascript: change_os('windows');">Windows</font> </td> <td> - <div name="file_perms_box" id="file_perms_box" style="margin: 0; padding: 0; display: <?php if(isset($_SESSION['operating_system']) AND $_SESSION['operating_system'] == 'windows') { - echo 'none'; - } else { - echo 'block'; - } + <div name="file_perms_box" id="file_perms_box" style="margin: 0; padding: 0; display: <?php if(isset($_SESSION['operating_system']) AND $_SESSION['operating_system'] == 'windows') { + echo 'none'; + } else { + echo 'block'; + } ?> ;"> <input type="checkbox" tabindex="42" name="world_writeable" id="world_writeable" value="true"<?php if(isset($_SESSION['world_writeable']) AND $_SESSION['world_writeable'] == true) { echo 'checked'; } ?> /> @@ -211,18 +212,18 @@ <td width="120" style="color: #666666;">Host Name:</td> <td width="230"> <input type="text" tabindex="43" name="database_host" style="width: 98%;" value="<?php if(isset($_SESSION['database_host'])) { - echo $_SESSION['database_host']; - } else { - echo 'localhost'; + echo $_SESSION['database_host']; + } else { + echo 'localhost'; } ?>" /> </td> <td width="7"> </td> <td width="70" style="color: #666666;">Username:</td> <td> - <input type="text" tabindex="44" name="database_username" style="width: 98%;" value="<?php if(isset($_SESSION['database_username'])) { - echo $_SESSION['database_username']; - } else { - echo 'root'; + <input type="text" tabindex="44" name="database_username" style="width: 98%;" value="<?php if(isset($_SESSION['database_username'])) { + echo $_SESSION['database_username']; + } else { + echo 'root'; } ?>" /> </td> </tr> @@ -233,18 +234,18 @@ <td> </td> <td style="color: #666666;">Password:</td> <td> - <input type="password" tabindex="45" name="database_password" style="width: 98%;"<?php if(isset($_SESSION['database_password'])) { - echo ' value = "'.$_SESSION['database_password'].'"'; + <input type="password" tabindex="45" name="database_password" style="width: 98%;"<?php if(isset($_SESSION['database_password'])) { + echo ' value = "'.$_SESSION['database_password'].'"'; } ?> /> </td> </tr> <tr> - + <td colspan="2"> - <input type="checkbox" tabindex="46" name="install_tables" id="install_tables" value="true"<?php if(!isset($_SESSION['install_tables'])) { - echo ' checked'; - } elseif($_SESSION['install_tables'] == 'true') { - echo ' checked'; + <input type="checkbox" tabindex="46" name="install_tables" id="install_tables" value="true"<?php if(!isset($_SESSION['install_tables'])) { + echo ' checked'; + } elseif($_SESSION['install_tables'] == 'true') { + echo ' checked'; } ?> /> <label for="install_tables" style="color: #666666;">Install Tables</label> <br /> @@ -264,7 +265,7 @@ <td width="170"> Install the test company : </td> - + <td width="180"> <input type="checkbox" tabindex="51" name="DemoData" id="db_file_demo" value="demo"<?php if(!isset($_SESSION['db_file']) OR $_SESSION['db_file'] == 'demo') { echo ' checked'; } ?> /> <font style="cursor: pointer;" onclick="javascript: change_data('demo');">weberpdemo company</font> @@ -274,13 +275,13 @@ <td width="170"> Time Zone </td> - + <td width="180"> <SELECT name='timezone' tabindex="52"> <?php include('timezone.php'); ?> - + </SELECT> </td> </tr> @@ -288,7 +289,7 @@ <td width="170"> Logo Image File (.jpg) </td> - + <td width="180"> <input type="hidden" name="MAX_FILE_SIZE" <?php echo "value=\"" . $_SESSION['MaxLogoSize'] . "\"" ?> /> <input type="FILE" size="50" ID="LogoFile" name="LogoFile" tabindex="53"> Modified: trunk/reportwriter/admin/forms/ReportsCritSetup.html =================================================================== --- trunk/reportwriter/admin/forms/ReportsCritSetup.html 2010-09-30 16:22:09 UTC (rev 4060) +++ trunk/reportwriter/admin/forms/ReportsCritSetup.html 2010-09-30 16:22:24 UTC (rev 4061) @@ -1,5 +1,6 @@ <h2 align="center"><?php echo $FormParams['heading'].$reportname.' - '.RPT_BTN_CRIT; ?></h2> <form name="CritFieldForm" method="post" action="ReportCreator.php?action=step7"> + <input type="hidden" name="FormID" value="<?php echo $_SESSION['FormID']; ?>" /> <input name="ReportID" type="hidden" value="<?php echo $ReportID; ?>"> <input name="Type" type="hidden" value="<?php echo $Type; ?>"> <input name="ReportName" type="hidden" value="<?php echo $reportname; ?>"> @@ -92,6 +93,7 @@ <td> </td> </tr> <tr><form name="CritFieldForm" method="post" action="ReportCreator.php?action=step7"> + <input type="hidden" name="FormID" value="<?php echo $_SESSION['FormID']; ?>" /> <input name="ReportID" type="hidden" value="<?php echo $ReportID ?>"> <input name="Type" type="hidden" value="<?php echo $Type; ?>"> <input name="ReportName" type="hidden" value="<?php echo $reportname; ?>"> @@ -120,10 +122,11 @@ </tr> <?php if (!$GroupListings['lists']) { echo '<tr><td align="center" colspan="7">'.RPT_NOFIELD.'</td></tr>'; - } else { + } else { foreach ($GroupListings['lists'] as $FieldDetails) { ?> <tr> <form name="CritFieldForm" method="post" action="ReportCreator.php?action=step7"> + <input type="hidden" name="FormID" value="<?php echo $_SESSION['FormID']; ?>" /> <input name="ReportID" type="hidden" value="<?php echo $ReportID ?>"> <input name="Type" type="hidden" value="<?php echo $Type; ?>"> <input name="ReportName" type="hidden" value="<?php echo $reportname; ?>"> @@ -138,14 +141,14 @@ <?php if ($FieldDetails['params']=='1') $selected=' checked'; else $selected=''; ?> <td align = "center"><input disabled type="checkbox"<?php echo $selected; ?>></td> <td> - <INPUT type=image name="up" value="up" src="../images/upicon.png" border="0"> - <INPUT type=image name="dn" value="down" src="../images/downicon.png" border="0"> - <INPUT type=image name="ed" value="edit" src="../images/editicon.png" border="0"> - <INPUT type=image name="rm" value="delete" src="../images/delicon.png" border="0" onClick="return confirm('Delete this field?')"> + <INPUT type=image name="up" value="up" src="../images/upicon.png" border="0"> + <INPUT type=image name="dn" value="down" src="../images/downicon.png" border="0"> + <INPUT type=image name="ed" value="edit" src="../images/editicon.png" border="0"> + <INPUT type=image name="rm" value="delete" src="../images/delicon.png" border="0" onClick="return confirm('Delete this field?')"> </td> </form> </tr> - <?php } // end foreach + <?php } // end foreach } // end else ?> <tr bgcolor="#CCCCCC"> <td colspan="5"><div align="center"><?php echo RPT_SORTLIST; ?></div></td> @@ -159,6 +162,7 @@ </tr> <tr> <form name="CritFieldForm" method="post" action="ReportCreator.php?action=step7"> + <input type="hidden" name="FormID" value="<?php echo $_SESSION['FormID']; ?>" /> <input name="ReportID" type="hidden" value="<?php echo $ReportID ?>"> <input name="Type" type="hidden" value="<?php echo $Type; ?>"> <input name="ReportName" type="hidden" value="<?php echo $reportname; ?>"> @@ -187,10 +191,11 @@ </tr> <?php if (!$SortListings['lists']) { echo '<tr><td align="center" colspan="7">'.RPT_NOFIELD.'</td></tr>'; - } else { + } else { foreach ($SortListings['lists'] as $FieldDetails) { ?> <tr> <form name="CritFieldForm" method="post" action="ReportCreator.php?action=step7"> + <input type="hidden" name="FormID" value="<?php echo $_SESSION['FormID']; ?>" /> <input name="ReportID" type="hidden" value="<?php echo $ReportID ?>"> <input name="Type" type="hidden" value="<?php echo $Type; ?>"> <input name="ReportName" type="hidden" value="<?php echo $reportname; ?>"> @@ -205,15 +210,15 @@ <?php if ($FieldDetails['params']=='1') $selected=' checked'; else $selected=''; ?> <td align = "center"><input disabled type="checkbox"<?php echo $selected; ?>></td> <td> - <INPUT type=image name="up" value="up" src="../images/upicon.png" border="0"> - <INPUT type=image name="dn" value="down" src="../images/downicon.png" border="0"> - <INPUT type=image name="ed" value="edit" src="../images/editicon.png" border="0"> - <INPUT type=image name="rm" value="delete" src="../images/delicon.png" border="0" onClick="return confirm('Delete this field?')"> + <INPUT type=image name="up" value="up" src="../images/upicon.png" border="0"> + <INPUT type=image name="dn" value="down" src="../images/downicon.png" border="0"> + <INPUT type=image name="ed" value="edit" src="../images/editicon.png" border="0"> + <INPUT type=image name="rm" value="delete" src="../images/delicon.png" border="0" onClick="return confirm('Delete this field?')"> </td> </form> </tr> - <?php } // end foreach - } // end else + <?php } // end foreach + } // end else } // end if ($Type<>'frm') ?> <tr bgcolor="#CCCCCC"> <td colspan="5"><div align="center"><?php echo RPT_BTN_CRIT; ?></div></td> @@ -227,6 +232,7 @@ </tr> <tr> <form name="CritFieldForm" method="post" action="ReportCreator.php?action=step7"> + <input type="hidden" name="FormID" value="<?php echo $_SESSION['FormID']; ?>" /> <input name="ReportID" type="hidden" value="<?php echo $ReportID ?>"> <input name="Type" type="hidden" value="<?php echo $Type; ?>"> <input name="ReportName" type="hidden" value="<?php echo $reportname; ?>"> @@ -260,10 +266,11 @@ </tr> <?php if (!$CritListings['lists']) { echo '<tr><td align="center" colspan="7">'.RPT_NOFIELD.'</td></tr>'; - } else { + } else { foreach ($CritListings['lists'] as $FieldDetails) { ?> <tr> <form name="CritFieldForm" method="post" action="ReportCreator.php?action=step7"> + <input type="hidden" name="FormID" value="<?php echo $_SESSION['FormID']; ?>" /> <input name="ReportID" type="hidden" value="<?php echo $ReportID ?>"> <input name="Type" type="hidden" value="<?php echo $Type; ?>"> <input name="ReportName" type="hidden" value="<?php echo $reportname; ?>"> @@ -277,13 +284,13 @@ <td><?php echo $FieldDetails['displaydesc']; ?></td> <td align = "center"><?php echo substr($CritChoices[$FieldDetails['params']],2); ?></td> <td> - <INPUT type=image name="up" value="up" src="../images/upicon.png" border="0"> - <INPUT type=image name="dn" value="down" src="../images/downicon.png" border="0"> - <INPUT type=image name="ed" value="edit" src="../images/editicon.png" border="0"> - <INPUT type=image name="rm" value="delete" src="../images/delicon.png" border="0" onClick="return confirm('Delete this field?')"> + <INPUT type=image name="up" value="up" src="../images/upicon.png" border="0"> + <INPUT type=image name="dn" value="down" src="../images/downicon.png" border="0"> + <INPUT type=image name="ed" value="edit" src="../images/editicon.png" border="0"> + <INPUT type=image name="rm" value="delete" src="../images/delicon.png" border="0" onClick="return confirm('Delete this field?')"> </td> </form> </tr> -<?php } // end foreach +<?php } // end foreach } // end else ?> </table> Modified: trunk/reportwriter/admin/forms/ReportsDBSetup.html =================================================================== --- trunk/reportwriter/admin/forms/ReportsDBSetup.html 2010-09-30 16:22:09 UTC (rev 4060) +++ trunk/reportwriter/admin/forms/ReportsDBSetup.html 2010-09-30 16:22:24 UTC (rev 4061) @@ -1,5 +1,6 @@ <h2 align="center"><?php echo $FormParams['heading'].$myrow['reportname'].' - '.RPT_BTN_DB; ?></h2> <form name="DBPageSetup" method="post" action="ReportCreator.php?action=step5"> + <input type="hidden" name="FormID" value="<?php echo $_SESSION['FormID']; ?>" /> <input name="ReportID" type="hidden" value="<?php echo $ReportID; ?>"> <input name="Type" type="hidden" value="<?php echo $Type; ?>"> <input name="ReportName" type="hidden" value="<?php echo $myrow['reportname']; ?>"> Modified: trunk/reportwriter/admin/forms/ReportsFieldSetup.html =================================================================== --- trunk/reportwriter/admin/forms/ReportsFieldSetup.html 2010-09-30 16:22:09 UTC (rev 4060) +++ trunk/reportwriter/admin/forms/ReportsFieldSetup.html 2010-09-30 16:22:24 UTC (rev 4061) @@ -72,6 +72,7 @@ <h2 align="center"><?php echo $FormParams['heading'].$reportname.' - '.RPT_BTN_FLDSETUP; ?></h2> <table align="center" width="550" border="0" cellspacing="1" cellpadding="1"> <form name="RptFieldForm" method="post" action="ReportCreator.php?action=step6"> + <input type="hidden" name="FormID" value="<?php echo $_SESSION['FormID']; ?>" /> <input name="ReportID" type="hidden" value="<?php echo $ReportID; ?>"> <input name="Type" type="hidden" value="<?php echo $Type; ?>"> <input name="ReportName" type="hidden" value="<?php echo $reportname; ?>"> @@ -96,6 +97,7 @@ </tr> <tr> <form name="RptFieldForm1" method="post" action="ReportCreator.php?action=step6"> + <input type="hidden" name="FormID" value="<?php echo $_SESSION['FormID']; ?>" /> <input name="ReportID" type="hidden" value="<?php echo $ReportID ?>"> <input name="Type" type="hidden" value="<?php echo $Type; ?>"> <input name="ReportName" type="hidden" value="<?php echo $reportname; ?>"> @@ -162,6 +164,7 @@ } else { foreach ($FieldListings['lists'] as $FieldDetails) { ?> <tr><form name="RptFieldForm" method="post" action="ReportCreator.php?action=step6"> + <input type="hidden" name="FormID" value="<?php echo $_SESSION['FormID']; ?>" /> <input name="ReportID" type="hidden" value="<?php echo $ReportID; ?>"> <input name="Type" type="hidden" value="<?php echo $Type; ?>"> <input name="ReportName" type="hidden" value="<?php echo $reportname; ?>"> @@ -201,6 +204,7 @@ </table> <table align="center" width="550" border="0" cellspacing="1" cellpadding="1"> <form name="RptFieldForm" method="post" action="ReportCreator.php?action=step6"> + <input type="hidden" name="FormID" value="<?php echo $_SESSION['FormID']; ?>" /> <input name="ReportID" type="hidden" value="<?php echo $ReportID; ?>"> <input name="Type" type="hidden" value="<?php echo $Type; ?>"> <input name="ReportName" type="hidden" value="<?php echo $reportname; ?>"> Modified: trunk/reportwriter/admin/forms/ReportsHome.html =================================================================== --- trunk/reportwriter/admin/forms/ReportsHome.html 2010-09-30 16:22:09 UTC (rev 4060) +++ trunk/reportwriter/admin/forms/ReportsHome.html 2010-09-30 16:22:24 UTC (rev 4061) @@ -1,5 +1,6 @@ <h2 align="center"><?php echo $FormParams['heading']; ?></h2> <form name="reporthome" method="post" action="ReportCreator.php?action=step2"> + <input type="hidden" name="FormID" value="<?php echo $_SESSION['FormID']; ?>" /> <table align="center" border="0" cellspacing="0" cellpadding="0"> <tr> <td> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-02 10:39:54
|
Revision: 4086 http://web-erp.svn.sourceforge.net/web-erp/?rev=4086&view=rev Author: tim_schofield Date: 2010-10-02 10:39:48 +0000 (Sat, 02 Oct 2010) Log Message: ----------- Show correct column headings. Fixes bug 3072507 Modified Paths: -------------- trunk/doc/Change.log.html trunk/includes/PDFGrnHeader.inc Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-09-30 16:26:40 UTC (rev 4085) +++ trunk/doc/Change.log.html 2010-10-02 10:39:48 UTC (rev 4086) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>02/10/10 Tim: PDFGrnHeader.php - Show correct column headings. Fixes bug 3072507</p> <p>30/09/10 Tim: Add form verification to prevent form spoofing</p> <p>30/09/10 Tim: WWW_Users.php - SQL quoting corrections and layout changes and improvements</p> <p>30/09/10 Tim: WWW_Access.php - SQL quoting corrections and layout changes and improvements</p> Modified: trunk/includes/PDFGrnHeader.inc =================================================================== --- trunk/includes/PDFGrnHeader.inc 2010-09-30 16:26:40 UTC (rev 4085) +++ trunk/includes/PDFGrnHeader.inc 2010-10-02 10:39:48 UTC (rev 4086) @@ -43,8 +43,8 @@ $LeftOvers = $pdf->addText($FormDesign->Headings->Column1->x,$Page_Height - $FormDesign->Headings->Column1->y, $FormDesign->Headings->Column1->FontSize, _('Item Number')); $LeftOvers = $pdf->addText($FormDesign->Headings->Column2->x,$Page_Height - $FormDesign->Headings->Column2->y, $FormDesign->Headings->Column2->FontSize, _('Description')); $LeftOvers = $pdf->addText($FormDesign->Headings->Column3->x,$Page_Height - $FormDesign->Headings->Column3->y, $FormDesign->Headings->Column3->FontSize, _('Date Recd')); -$LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column4->x,$Page_Height - $FormDesign->Headings->Column4->y, $FormDesign->Headings->Column4->Length, $FormDesign->Headings->Column4->FontSize, _('Supplier Details'), 'right'); -$LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column5->x,$Page_Height - $FormDesign->Headings->Column5->y, $FormDesign->Headings->Column5->Length, $FormDesign->Headings->Column5->FontSize, _('Stock Details'), 'right'); +$LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column4->x,$Page_Height - $FormDesign->Headings->Column4->y, $FormDesign->Headings->Column4->Length, $FormDesign->Headings->Column4->FontSize, _('Qty in Suppliers UOM'), 'right'); +$LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column5->x,$Page_Height - $FormDesign->Headings->Column5->y, $FormDesign->Headings->Column5->Length, $FormDesign->Headings->Column5->FontSize, _('Qty in Stock UOM'), 'right'); /*Draw a rectangle to put the data in */ $pdf->Rectangle($FormDesign->DataRectangle->x, $Page_Height - $FormDesign->DataRectangle->y, $FormDesign->DataRectangle->width,$FormDesign->DataRectangle->height); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-02 11:37:44
|
Revision: 4087 http://web-erp.svn.sourceforge.net/web-erp/?rev=4087&view=rev Author: tim_schofield Date: 2010-10-02 11:37:38 +0000 (Sat, 02 Oct 2010) Log Message: ----------- Fix to create a reversing journal even when non english language is used. Modified Paths: -------------- trunk/GLJournal.php trunk/doc/Change.log.html Modified: trunk/GLJournal.php =================================================================== --- trunk/GLJournal.php 2010-10-02 10:39:48 UTC (rev 4086) +++ trunk/GLJournal.php 2010-10-02 11:37:38 UTC (rev 4087) @@ -82,7 +82,7 @@ $DbgMsg = _('The SQL that failed to insert the GL Trans record was'); $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); - if ($_POST['JournalType']==_('Reversing')){ + if ($_POST['JournalType']=='Reversing'){ $SQL = "INSERT INTO gltrans (type, typeno, trandate, Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-02 10:39:48 UTC (rev 4086) +++ trunk/doc/Change.log.html 2010-10-02 11:37:38 UTC (rev 4087) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>02/10/10 Tim: GLJournal.php - Fix to create a reversing journal even when non english language is used.</p> <p>02/10/10 Tim: PDFGrnHeader.php - Show correct column headings. Fixes bug 3072507</p> <p>30/09/10 Tim: Add form verification to prevent form spoofing</p> <p>30/09/10 Tim: WWW_Users.php - SQL quoting corrections and layout changes and improvements</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-02 13:17:53
|
Revision: 4088 http://web-erp.svn.sourceforge.net/web-erp/?rev=4088&view=rev Author: tim_schofield Date: 2010-10-02 13:17:46 +0000 (Sat, 02 Oct 2010) Log Message: ----------- Make php 5.3 compatible Modified Paths: -------------- trunk/doc/Change.log.html trunk/fpdi/fpdf_tpl.php trunk/fpdi/fpdi.php Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-02 11:37:38 UTC (rev 4087) +++ trunk/doc/Change.log.html 2010-10-02 13:17:46 UTC (rev 4088) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>02/10/10 Tim: ppdf_tpl.php - Make php 5.3 compatible</p> <p>02/10/10 Tim: GLJournal.php - Fix to create a reversing journal even when non english language is used.</p> <p>02/10/10 Tim: PDFGrnHeader.php - Show correct column headings. Fixes bug 3072507</p> <p>30/09/10 Tim: Add form verification to prevent form spoofing</p> Modified: trunk/fpdi/fpdf_tpl.php =================================================================== --- trunk/fpdi/fpdf_tpl.php 2010-10-02 11:37:38 UTC (rev 4087) +++ trunk/fpdi/fpdf_tpl.php 2010-10-02 13:17:46 UTC (rev 4088) @@ -29,13 +29,13 @@ * @var int */ var $tpl = 0; - + /** * "In Template"-Flag * @var boolean */ var $_intpl = false; - + /** * Nameprefix of Templates used in Resources-Dictonary * @var string A String defining the Prefix used as Template-Object-Names. Have to beginn with an / @@ -47,14 +47,14 @@ * @var array */ var $_res = array(); - + /** * Last used Template data * * @var array */ var $lastUsedTemplateData = array(); - + /** * Start a Template * @@ -107,7 +107,7 @@ ); $this->SetAutoPageBreak(false); - + // Define own high and width to calculate possitions correct $this->h = $h; $this->w = $w; @@ -118,7 +118,7 @@ return $this->tpl; } - + /** * End Template * @@ -128,7 +128,7 @@ */ function endTemplate() { if ($this->_intpl) { - $this->_intpl = false; + $this->_intpl = false; $tpl =& $this->tpls[$this->tpl]; $this->SetXY($tpl['o_x'], $tpl['o_y']); $this->tMargin = $tpl['o_tMargin']; @@ -137,13 +137,13 @@ $this->h = $tpl['o_h']; $this->w = $tpl['o_w']; $this->SetAutoPageBreak($tpl['o_AutoPageBreak'], $tpl['o_bMargin']); - + return $this->tpl; } else { return false; } } - + /** * Use a Template in current Page or other Template * @@ -167,27 +167,27 @@ if (!isset($this->tpls[$tplidx])) $this->error("Template does not exist!"); - + if ($this->_intpl) { $this->_res['tpl'][$this->tpl]['tpls'][$tplidx] =& $this->tpls[$tplidx]; } - + $tpl =& $this->tpls[$tplidx]; $w = $tpl['w']; $h = $tpl['h']; - + if ($_x == null) $_x = 0; if ($_y == null) $_y = 0; - + $_x += $tpl['x']; $_y += $tpl['y']; - + $wh = $this->getTemplateSize($tplidx, $_w, $_h); $_w = $wh['w']; $_h = $wh['h']; - + $tData = array( 'x' => $this->x, 'y' => $this->y, @@ -199,15 +199,15 @@ 'ty' => ($this->h-$_y-$_h), 'lty' => ($this->h-$_y-$_h) - ($this->h-$h) * ($_h/$h) ); - - $this->_out(sprintf("q %.4F 0 0 %.4F %.4F %.4F cm", $tData['scaleX'], $tData['scaleY'], $tData['tx']*$this->k, $tData['ty']*$this->k)); // Translate + + $this->_out(sprintf("q %.4F 0 0 %.4F %.4F %.4F cm", $tData['scaleX'], $tData['scaleY'], $tData['tx']*$this->k, $tData['ty']*$this->k)); // Translate $this->_out(sprintf('%s%d Do Q', $this->tplprefix, $tplidx)); $this->lastUsedTemplateData = $tData; - + return array("w" => $_w, "h" => $_h); } - + /** * Get The calculated Size of a Template * @@ -225,7 +225,7 @@ $tpl =& $this->tpls[$tplidx]; $w = $tpl['w']; $h = $tpl['h']; - + if ($_w == 0 and $_h == 0) { $_w = $w; $_h = $h; @@ -235,10 +235,10 @@ $_w = $_h*$w/$h; if($_h==0) $_h = $_w*$h/$w; - + return array("w" => $_w, "h" => $_h); } - + /** * See FPDF/TCPDF-Documentation ;-) */ @@ -251,40 +251,40 @@ */ if ($this->_intpl) $this->FontFamily = ''; - + parent::SetFont($family, $style, $size, $fontfile); - + $fontkey = $this->FontFamily.$this->FontStyle; - + if ($this->_intpl) { $this->_res['tpl'][$this->tpl]['fonts'][$fontkey] =& $this->fonts[$fontkey]; } else { $this->_res['page'][$this->page]['fonts'][$fontkey] =& $this->fonts[$fontkey]; } } - + /** * See FPDF/TCPDF-Documentation ;-) */ - function Image($file, $x, $y, $w=0, $h=0, $type='', $link='', $align='', $resize=false, $dpi=300, $palign='', $ismask=false, $imgmask=false, $border=0) { - if (!is_subclass_of($this, 'TCPDF') && func_num_args() > 7) { + function Image($file, $x='', $y='', $w=0, $h=0, $type='', $link='', $align='', $resize=false, $dpi=300, $palign='', $ismask=false, $imgmask=false, $border=0, $fitbox=false, $hidden=false, $fitonpage=false) { + if (!is_subclass_of($this, 'TCPDF') && func_num_args() > 7) { $this->Error('More than 7 arguments for the Image method are only available in TCPDF.'); } - - parent::Image($file, $x, $y, $w, $h, $type, $link, $align, $resize, $dpi, $palign, $ismask, $imgmask, $border); + + parent::Image($file, $x, $y, $w, $h, $type, $link, $align, $resize, $dpi, $palign, $ismask, $imgmask, $border, $fitbox, $hidden, $fitonpage); if ($this->_intpl) { $this->_res['tpl'][$this->tpl]['images'][$file] =& $this->images[$file]; } else { $this->_res['page'][$this->page]['images'][$file] =& $this->images[$file]; } } - + /** * See FPDF-Documentation ;-) * * AddPage is not available when you're "in" a template. */ - function AddPage($orientation='', $format='') { + function AddPage($orientation='', $format='', $keepmargins=false) { if ($this->_intpl) $this->Error('Adding pages in templates isn\'t possible!'); parent::AddPage($orientation, $format); @@ -297,24 +297,24 @@ if (!is_subclass_of($this, 'TCPDF') && func_num_args() > 5) { $this->Error('More than 7 arguments for the Image method are only available in TCPDF.'); } - + if ($this->_intpl) $this->Error('Using links in templates aren\'t possible!'); parent::Link($x, $y, $w, $h, $link, $spaces); } - + function AddLink() { if ($this->_intpl) $this->Error('Adding links in templates aren\'t possible!'); return parent::AddLink(); } - + function SetLink($link, $y=0, $page=-1) { if ($this->_intpl) $this->Error('Setting links in templates aren\'t possible!'); parent::SetLink($link, $y, $page); } - + /** * Private Method that writes the form xobjects */ @@ -339,13 +339,13 @@ // ury ($tpl['h']-$tpl['y'])*$this->k )); - + if ($tpl['x'] != 0 || $tpl['y'] != 0) { $this->_out(sprintf('/Matrix [1 0 0 1 %.5F %.5F]', -$tpl['x']*$this->k*2, $tpl['y']*$this->k*2 )); } - + $this->_out('/Resources '); $this->_out('<</ProcSet [/PDF /Text /ImageB /ImageC /ImageI]'); @@ -355,7 +355,7 @@ $this->_out('/F'.$font['i'].' '.$font['n'].' 0 R'); $this->_out('>>'); } - if(isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images']) || + if(isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images']) || isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls'])) { $this->_out('/XObject <<'); @@ -370,13 +370,13 @@ $this->_out('>>'); } $this->_out('>>'); - + $this->_out('/Length '.strlen($p).' >>'); $this->_putstream($p); $this->_out('endobj'); } } - + /** * Overwritten to add _putformxobjects() after _putimages() * @@ -385,10 +385,10 @@ parent::_putimages(); $this->_putformxobjects(); } - + function _putxobjectdict() { parent::_putxobjectdict(); - + if (count($this->tpls)) { foreach($this->tpls as $tplidx => $tpl) { $this->_out(sprintf('%s%d %d 0 R', $this->tplprefix, $tplidx, $tpl['n'])); Modified: trunk/fpdi/fpdi.php =================================================================== --- trunk/fpdi/fpdi.php 2010-10-02 11:37:38 UTC (rev 4087) +++ trunk/fpdi/fpdi.php 2010-10-02 13:17:46 UTC (rev 4088) @@ -40,19 +40,19 @@ * @var array */ var $parsers; - + /** * Current parser * @var object */ var $current_parser; - + /** * object stack * @var array */ var $_obj_stack; - + /** * done object stack * @var array @@ -64,16 +64,16 @@ * @var integer */ var $_current_obj_id; - + /** * The name of the last imported page box * @var string */ var $lastUsedPageBox; - + var $_importedPages = array(); - - + + /** * Set a source-file * @@ -85,12 +85,12 @@ $fn =& $this->current_filename; if (!isset($this->parsers[$fn])) - $this->parsers[$fn] =& new fpdi_pdf_parser($fn, $this); + $this->parsers[$fn] = new fpdi_pdf_parser($fn, $this); $this->current_parser =& $this->parsers[$fn]; - + return $this->parsers[$fn]->getPageCount(); } - + /** * Import a page * @@ -101,14 +101,14 @@ if ($this->_intpl) { return $this->error('Please import the desired pages before creating a new template.'); } - + $fn =& $this->current_filename; - + // check if page already imported $pageKey = $fn.((int)$pageno).$boxName; if (isset($this->_importedPages[$pageKey])) return $this->_importedPages[$pageKey]; - + $parser =& $this->parsers[$fn]; $parser->setPageno($pageno); @@ -118,11 +118,11 @@ $tpl['parser'] =& $parser; $tpl['resources'] = $parser->getPageResources(); $tpl['buffer'] = $parser->getContent(); - + if (!in_array($boxName, $parser->availableBoxes)) return $this->Error(sprintf('Unknown box: %s', $boxName)); $pageboxes = $parser->getPageBoxes($pageno); - + /** * MediaBox * CropBox: Default -> MediaBox @@ -134,46 +134,46 @@ $boxName = '/CropBox'; if (!isset($pageboxes[$boxName]) && $boxName == '/CropBox') $boxName = '/MediaBox'; - + if (!isset($pageboxes[$boxName])) return false; $this->lastUsedPageBox = $boxName; - + $box = $pageboxes[$boxName]; $tpl['box'] = $box; - + // To build an array that can be used by PDF_TPL::useTemplate() $this->tpls[$this->tpl] = array_merge($this->tpls[$this->tpl],$box); - + // An imported page will start at 0,0 everytime. Translation will be set in _putformxobjects() $tpl['x'] = 0; $tpl['y'] = 0; - + $page =& $parser->pages[$parser->pageno]; - + // handle rotated pages $rotation = $parser->getPageRotation($pageno); $tpl['_rotationAngle'] = 0; if (isset($rotation[1]) && ($angle = $rotation[1] % 360) != 0) { $steps = $angle / 90; - + $_w = $tpl['w']; $_h = $tpl['h']; $tpl['w'] = $steps % 2 == 0 ? $_w : $_h; $tpl['h'] = $steps % 2 == 0 ? $_h : $_w; - + $tpl['_rotationAngle'] = $angle*-1; } - + $this->_importedPages[$pageKey] = $this->tpl; - + return $this->tpl; } - + function getLastUsedPageBox() { return $this->lastUsedPageBox; } - + function useTemplate($tplidx, $_x=null, $_y=null, $_w=0, $_h=0, $adjustPageSize=false) { if ($adjustPageSize == true && is_null($_x) && is_null($_y)) { $size = $this->getTemplateSize($tplidx, $_w, $_h); @@ -188,13 +188,13 @@ $this->PageSizes[$this->page]=array($this->wPt, $this->hPt); } } - + $this->_out('q 0 J 1 w 0 j 0 G 0 g'); // reset standard values $s = parent::useTemplate($tplidx, $_x, $_y, $_w, $_h); $this->_out('Q'); return $s; } - + /** * Private method, that rebuilds all needed objects of source files */ @@ -205,15 +205,15 @@ if (isset($this->_obj_stack[$filename]) && is_array($this->_obj_stack[$filename])) { while(($n = key($this->_obj_stack[$filename])) !== null) { $nObj = $this->current_parser->pdf_resolve_object($this->current_parser->c,$this->_obj_stack[$filename][$n][1]); - + $this->_newobj($this->_obj_stack[$filename][$n][0]); - + if ($nObj[0] == PDF_TYPE_STREAM) { $this->pdf_write_value ($nObj); } else { $this->pdf_write_value ($nObj[1]); } - + $this->_out('endobj'); $this->_obj_stack[$filename][$n] = null; // free memory unset($this->_obj_stack[$filename][$n]); @@ -223,8 +223,8 @@ } } } - - + + /** * Private Method that writes the form xobjects */ @@ -235,33 +235,33 @@ $p=($this->compress) ? gzcompress($tpl['buffer']) : $tpl['buffer']; $this->_newobj(); $cN = $this->n; // TCPDF/Protection: rem current "n" - + $this->tpls[$tplidx]['n'] = $this->n; $this->_out('<<'.$filter.'/Type /XObject'); $this->_out('/Subtype /Form'); $this->_out('/FormType 1'); - - $this->_out(sprintf('/BBox [%.2F %.2F %.2F %.2F]', + + $this->_out(sprintf('/BBox [%.2F %.2F %.2F %.2F]', (isset($tpl['box']['llx']) ? $tpl['box']['llx'] : $tpl['x'])*$this->k, (isset($tpl['box']['lly']) ? $tpl['box']['lly'] : -$tpl['y'])*$this->k, (isset($tpl['box']['urx']) ? $tpl['box']['urx'] : $tpl['w'] + $tpl['x'])*$this->k, (isset($tpl['box']['ury']) ? $tpl['box']['ury'] : $tpl['h']-$tpl['y'])*$this->k )); - + $c = 1; $s = 0; $tx = 0; $ty = 0; - + if (isset($tpl['box'])) { $tx = -$tpl['box']['llx']; $ty = -$tpl['box']['lly']; - + if ($tpl['_rotationAngle'] <> 0) { $angle = $tpl['_rotationAngle'] * M_PI/180; $c=cos($angle); $s=sin($angle); - + switch($tpl['_rotationAngle']) { case -90: $tx = -$tpl['box']['lly']; @@ -281,16 +281,16 @@ $tx = -$tpl['x']*2; $ty = $tpl['y']*2; } - + $tx *= $this->k; $ty *= $this->k; - + if ($c != 1 || $s != 0 || $tx != 0 || $ty != 0) { $this->_out(sprintf('/Matrix [%.5F %.5F %.5F %.5F %.5F %.5F]', $c, $s, -$s, $c, $tx, $ty )); } - + $this->_out('/Resources '); if (isset($tpl['resources'])) { @@ -304,7 +304,7 @@ $this->_out('/F'.$font['i'].' '.$font['n'].' 0 R'); $this->_out('>>'); } - if(isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images']) || + if(isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images']) || isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls'])) { $this->_out('/XObject <<'); @@ -328,7 +328,7 @@ $this->_out('endobj'); $this->n = $nN; // TCPDF: reset to new "n" } - + $this->_putimportedobjects(); } @@ -359,7 +359,7 @@ if (is_subclass_of($this, 'TCPDF')) { parent::pdf_write_value($value); } - + switch ($value[0]) { case PDF_TYPE_TOKEN : @@ -373,7 +373,7 @@ $this->_straightOut($value[1] . ' '); } break; - + case PDF_TYPE_ARRAY : // An array. Output the proper @@ -407,7 +407,7 @@ // An indirect object reference // Fill the object stack if needed $cpfn =& $this->current_parser->filename; - + if (!isset($this->_don_obj_stack[$cpfn][$value[1]])) { $this->_newobj(false,true); $this->_obj_stack[$cpfn][$value[1]] = array($this->n, $value); @@ -442,7 +442,7 @@ case PDF_TYPE_BOOLEAN : $this->_straightOut($value[1] ? 'true ' : 'false '); break; - + case PDF_TYPE_NULL : // The null object. @@ -450,8 +450,8 @@ break; } } - - + + /** * Modified so not each call will add a newline to the output. */ @@ -485,7 +485,7 @@ parent::_enddoc(); $this->_closeParsers(); } - + /** * close all files opened by parsers */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-02 13:26:46
|
Revision: 4089 http://web-erp.svn.sourceforge.net/web-erp/?rev=4089&view=rev Author: tim_schofield Date: 2010-10-02 13:26:40 +0000 (Sat, 02 Oct 2010) Log Message: ----------- Corrections to sql quoting. Resolves bug 3023782 Modified Paths: -------------- trunk/doc/Change.log.html trunk/includes/session.inc Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-02 13:17:46 UTC (rev 4088) +++ trunk/doc/Change.log.html 2010-10-02 13:26:40 UTC (rev 4089) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>02/10/10 Tim: session.inc - Corrections to sql quoting. Resolves bug 3023782</p> <p>02/10/10 Tim: ppdf_tpl.php - Make php 5.3 compatible</p> <p>02/10/10 Tim: GLJournal.php - Fix to create a reversing journal even when non english language is used.</p> <p>02/10/10 Tim: PDFGrnHeader.php - Show correct column headings. Fixes bug 3072507</p> Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2010-10-02 13:17:46 UTC (rev 4088) +++ trunk/includes/session.inc 2010-10-02 13:26:40 UTC (rev 4089) @@ -147,8 +147,8 @@ while ($CurrencyRow = DB_fetch_row($CurrenciesResult)){ if ($CurrencyRow[0]!=$_SESSION['CompanyRecord']['currencydefault']){ - $UpdateCurrRateResult = DB_query('UPDATE currencies SET - rate=' . GetCurrencyRate ($CurrencyRow[0],$CurrencyRates) . " ' + $UpdateCurrRateResult = DB_query("UPDATE currencies SET + rate='" . GetCurrencyRate($CurrencyRow[0],$CurrencyRates) . "' WHERE currabrev='" . $CurrencyRow[0] . "'",$db); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-02 15:04:51
|
Revision: 4090 http://web-erp.svn.sourceforge.net/web-erp/?rev=4090&view=rev Author: tim_schofield Date: 2010-10-02 15:04:45 +0000 (Sat, 02 Oct 2010) Log Message: ----------- Bug fixes and layout changes Modified Paths: -------------- trunk/DailySalesInquiry.php trunk/doc/Change.log.html Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2010-10-02 13:26:40 UTC (rev 4089) +++ trunk/DailySalesInquiry.php 2010-10-02 15:04:45 UTC (rev 4090) @@ -16,7 +16,7 @@ echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<table cellpadding=2><tr>'; +echo '<table cellpadding=2 class=selection><tr>'; echo '<td>' . _('Month to Show') . ':</td><td><select tabindex=1 name="MonthToShow">'; @@ -55,10 +55,9 @@ } echo '</select></td>'; -echo '</tr></table><div class="centre"><input tabindex=4 type=submit name="ShowResults" VALUE="' . _('Show Daily Sales For The Selected Month') . '">'; -echo '<hr>'; - +echo '</tr></table><br /><div class="centre"><input tabindex=4 type=submit name="ShowResults" VALUE="' . _('Show Daily Sales For The Selected Month') . '">'; echo '</form></div>'; +echo '<br />'; /*Now get and display the sales data returned */ if (strpos($EndDateSQL,'/')) { $Date_Array = explode('/',$EndDateSQL); @@ -93,7 +92,7 @@ $ErrMsg = _('The sales data could not be retrieved because') . ' - ' . DB_error_msg($db); $SalesResult = DB_query($sql, $db,$ErrMsg); -echo '<table cellpadding=2>'; +echo '<table cellpadding=2 class=selection>'; echo'<tr> <th>' . _('Sunday') . '</th> @@ -109,13 +108,16 @@ $BilledDays = 0; $DaySalesArray = array(); while ($DaySalesRow=DB_fetch_array($SalesResult)) { - if (isset($DaySalesRow['salesvalue'])) { - $DaySalesArray[DayOfMonthFromSQLDate($DaySalesRow['trandate'])]->Sales = $DaySalesRow['salesvalue']; - } + $DaySalesArray[DayOfMonthFromSQLDate($DaySalesRow['trandate'])] = new Cart; + if ($DaySalesRow['salesvalue'] > 0) { + $DaySalesArray[DayOfMonthFromSQLDate($DaySalesRow['trandate'])]->Sales = $DaySalesRow['salesvalue']; + } else { + $DaySalesArray[DayOfMonthFromSQLDate($DaySalesRow['trandate'])]->Sales = 0; + } if ($DaySalesRow['salesvalue'] > 0 ) { - $DaySalesArray[DayOfMonthFromSQLDate($DaySalesRow['trandate'])]->GPPercent = ($DaySalesRow['salesvalue']-$DaySalesRow['cost'])/$DaySalesRow['salesvalue']; + $DaySalesArray[DayOfMonthFromSQLDate($DaySalesRow['trandate'])]->GPPercent = ($DaySalesRow['salesvalue']-$DaySalesRow['cost'])/$DaySalesRow['salesvalue']; } else { - $DaySalesArray[DayOfMonthFromSQLDate($DaySalesRow['trandate'])]->GPPercent = 0; + $DaySalesArray[DayOfMonthFromSQLDate($DaySalesRow['trandate'])]->GPPercent = 0; } $BilledDays++; $CumulativeTotalSales += $DaySalesRow['salesvalue']; @@ -142,7 +144,9 @@ for ($i=1;$i<=$LastDayOfMonth;$i++){ $ColumnCounter++; if(isset($DaySalesArray[$i])) { - echo '<td class="number">' . number_format($DaySalesArray[$i]->Sales,0) . '<br />' . number_format($DaySalesArray[$i]->GPPercent*100,1) . '</td>'; + echo '<td class="number" style="outline: 1px solid gray;">' . number_format($DaySalesArray[$i]->Sales,0) . '<br />' . number_format($DaySalesArray[$i]->GPPercent*100,1) . '%</td>'; + } else { + echo '<td class="number" style="outline: 1px solid gray;">' . number_format(0,0) . '<br />' . number_format(0,1) . '%</td>'; } if ($ColumnCounter==7){ echo '</tr><tr>'; @@ -171,9 +175,9 @@ $AverageDailySales = 0; } -echo '<td colspan=7>' . _('Total Sales for month') . ': ' . number_format($CumulativeTotalSales,0) . ' ' . _('GP%') . ': ' . number_format($AverageGPPercent,1) . '% ' . _('Avg Daily Sales') . ': ' . number_format($AverageDailySales,0) . '</td></tr>'; +echo '<th colspan=7>' . _('Total Sales for month') . ': ' . number_format($CumulativeTotalSales,0) . ' ' . _('GP%') . ': ' . number_format($AverageGPPercent,1) . '% ' . _('Avg Daily Sales') . ': ' . number_format($AverageDailySales,0) . '</th></tr>'; echo '</table>'; include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-02 13:26:40 UTC (rev 4089) +++ trunk/doc/Change.log.html 2010-10-02 15:04:45 UTC (rev 4090) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>02/10/10 Tim: DailySalesInquiry.php - Bug fixes and layout changes</p> <p>02/10/10 Tim: session.inc - Corrections to sql quoting. Resolves bug 3023782</p> <p>02/10/10 Tim: ppdf_tpl.php - Make php 5.3 compatible</p> <p>02/10/10 Tim: GLJournal.php - Fix to create a reversing journal even when non english language is used.</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-02 15:52:35
|
Revision: 4091 http://web-erp.svn.sourceforge.net/web-erp/?rev=4091&view=rev Author: tim_schofield Date: 2010-10-02 15:52:29 +0000 (Sat, 02 Oct 2010) Log Message: ----------- Bug fixes and layout changes Modified Paths: -------------- trunk/AuditTrail.php trunk/doc/Change.log.html Modified: trunk/AuditTrail.php =================================================================== --- trunk/AuditTrail.php 2010-10-02 15:04:45 UTC (rev 4090) +++ trunk/AuditTrail.php 2010-10-02 15:52:29 UTC (rev 4091) @@ -10,6 +10,8 @@ include('includes/header.inc'); +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="">' . ' ' . $title.'</p>'; + if (!isset($_POST['FromDate'])){ $_POST['FromDate'] = Date($_SESSION['DefaultDateFormat'],mktime(0,0,0, Date('m')-$_SESSION['MonthsAuditTrail'])); } @@ -30,7 +32,7 @@ echo '<form action=' . $_SERVER['PHP_SELF'] . '?' . SID . ' method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<table>'; +echo '<table class=selection>'; echo '<tr><td>'. _('From Date') . ' ' . $_SESSION['DefaultDateFormat'] .'</td> <td><input tabindex="1" type=text class=date alt="'.$_SESSION['DefaultDateFormat'].'" name="FromDate" size="11" maxlength="10" value=' .$_POST['FromDate'].'></td></tr>'; @@ -62,8 +64,8 @@ } echo '</select></td></tr>'; -echo "<tr><td></td><td><input tabindex='5' type=submit name=View value='" . _('View') . "'></td></tr>"; -echo '</table></BR>'; +echo '</table><br />'; +echo "<div class=centre><input tabindex='5' type=submit name=View value='" . _('View') . "'></div>"; echo '</form>'; // View the audit trail @@ -138,7 +140,7 @@ } $result = DB_query($sql,$db); - echo '<table border=0 width="100%">'; + echo '<table border=0 width="98%" class=selection>'; echo '<tr><th>' . _('Date/Time') . '</th> <th>' . _('User') . '</th> <th>' . _('Type') . '</th> @@ -193,4 +195,4 @@ } include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-02 15:04:45 UTC (rev 4090) +++ trunk/doc/Change.log.html 2010-10-02 15:52:29 UTC (rev 4091) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>02/10/10 Tim: AuditTrail.php - Bug fixes and layout changes</p> <p>02/10/10 Tim: DailySalesInquiry.php - Bug fixes and layout changes</p> <p>02/10/10 Tim: session.inc - Corrections to sql quoting. Resolves bug 3023782</p> <p>02/10/10 Tim: ppdf_tpl.php - Make php 5.3 compatible</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-04 15:55:00
|
Revision: 4094 http://web-erp.svn.sourceforge.net/web-erp/?rev=4094&view=rev Author: tim_schofield Date: 2010-10-04 15:54:54 +0000 (Mon, 04 Oct 2010) Log Message: ----------- Matt Taylor: upgrade3.11.1-3.12.sql - Update tables to utf8 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-10-04 15:54:23 UTC (rev 4093) +++ trunk/doc/Change.log.html 2010-10-04 15:54:54 UTC (rev 4094) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>04/10/10 Matt Taylor: upgrade3.11.1-3.12.sql - Update tables to utf8</p> <p>03/10/10 Gabriel Olowo: ManualPurchaseOrdering.php - Manual for purchase ordering system</p> <p>02/10/10 Tim: AuditTrail.php - Bug fixes and layout changes</p> <p>02/10/10 Tim: DailySalesInquiry.php - Bug fixes and layout changes</p> Modified: trunk/sql/mysql/upgrade3.11.1-3.12.sql =================================================================== --- trunk/sql/mysql/upgrade3.11.1-3.12.sql 2010-10-04 15:54:23 UTC (rev 4093) +++ trunk/sql/mysql/upgrade3.11.1-3.12.sql 2010-10-04 15:54:54 UTC (rev 4094) @@ -1,4 +1,12 @@ SET FOREIGN_KEY_CHECKS=0; +ALTER TABLE `workcentres` CONVERT TO CHARACTER SET utf8; +ALTER TABLE `stockmaster` CONVERT TO CHARACTER SET utf8; +ALTER TABLE `custbranch` CONVERT TO CHARACTER SET utf8; +ALTER TABLE `stockcategory` CONVERT TO CHARACTER SET utf8; +ALTER TABLE `locations` CONVERT TO CHARACTER SET utf8; +ALTER TABLE `www_users` CONVERT TO CHARACTER SET utf8; +ALTER TABLE `currencies` CONVERT TO CHARACTER SET utf8; +ALTER TABLE `suppliers` CONVERT TO CHARACTER SET utf8; CREATE TABLE IF NOT EXISTS `fixedassetlocations` ( `locationid` char(6) NOT NULL default '', `locationdescription` char(20) NOT NULL default '', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2010-10-09 02:49:41
|
Revision: 4095 http://web-erp.svn.sourceforge.net/web-erp/?rev=4095&view=rev Author: daintree Date: 2010-10-09 02:49:35 +0000 (Sat, 09 Oct 2010) Log Message: ----------- added GetStockCategoryList xmlrpc-api method Modified Paths: -------------- trunk/api/api_login.php trunk/api/api_stockcategories.php trunk/api/api_xml-rpc.php trunk/doc/Change.log.html Modified: trunk/api/api_login.php =================================================================== --- trunk/api/api_login.php 2010-10-04 15:54:54 UTC (rev 4094) +++ trunk/api/api_login.php 2010-10-09 02:49:35 UTC (rev 4095) @@ -52,12 +52,12 @@ // Is this user logged in? if (isset ($_SESSION['db']) ) { - // Cleanup is about all there is to do. - session_unset(); - session_destroy(); - $RetCode = 0; + // Cleanup is about all there is to do. + session_unset(); + session_destroy(); + $RetCode = 0; } else { - $RetCode = NoAuthorisation; + $RetCode = NoAuthorisation; } return $RetCode; Modified: trunk/api/api_stockcategories.php =================================================================== --- trunk/api/api_stockcategories.php 2010-10-04 15:54:54 UTC (rev 4094) +++ trunk/api/api_stockcategories.php 2010-10-09 02:49:35 UTC (rev 4095) @@ -208,4 +208,22 @@ return $Errors; } + /* This function returns a list of the stock categories setup on webERP */ + + function GetStockCategoryList($user, $password) { + $Errors = array(); + $db = db($user, $password); + if (gettype($db)=='integer') { + $Errors[0]=NoAuthorisation; + return $Errors; + } + $sql = 'SELECT categoryid FROM stockcategory'; + $result = DB_query($sql, $db); + $i=0; + while ($myrow=DB_fetch_array($result)) { + $StockCategoryList[$i]=$myrow[0]; + $i++; + } + return $StockCategoryList; + } ?> \ No newline at end of file Modified: trunk/api/api_xml-rpc.php =================================================================== --- trunk/api/api_xml-rpc.php 2010-10-04 15:54:54 UTC (rev 4094) +++ trunk/api/api_xml-rpc.php 2010-10-09 02:49:35 UTC (rev 4095) @@ -1313,9 +1313,8 @@ function xmlrpc_GetLocationList($xmlrpcmsg){ ob_start('ob_file_callback'); -/*x*/ if ($xmlrpcmsg->getNumParams() == 2) -/*x*/ { -/*x*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(GetLocationList($xmlrpcmsg->getParam( 0 )->scalarval( ), +/*x*/ if ($xmlrpcmsg->getNumParams() == 2){ +/*x*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(GetLocationList($xmlrpcmsg->getParam( 0 )->scalarval( ), /*x*/ $xmlrpcmsg->getParam( 1 )->scalarval( ))) ); /*x*/ } else { /*e*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(GetLocationList( '', ''))); @@ -1827,7 +1826,34 @@ ob_end_flush(); return $rtn; } + unset($Description); + unset($Parameter); + unset($ReturnValue); + $Description = _('This function returns a list of stock category abbreviations.'); + $Parameter[0]['name'] = _('User name'); + $Parameter[0]['description'] = _('A valid weberp username. This user should have security access to this data.'); + $Parameter[1]['name'] = _('User password'); + $Parameter[1]['description'] = _('The weberp password associated with this user name. '); + $ReturnValue[0] = _('If successful, this function returns an array of stock category ids. ') + ._('Otherwise an array of error codes is returned and no stock categories are returned. '); + +/*E*/ $GetStockCategoryList_sig = array(array($xmlrpcStruct), +/*x*/ array($xmlrpcStruct,$xmlrpcString,$xmlrpcString)); + $GetStockCategoryList_doc = apiBuildDocHTML( $Description,$Parameter,$ReturnValue ); + + function xmlrpc_GetStockCategoryList($xmlrpcmsg){ + ob_start('ob_file_callback'); +/*x*/if ($xmlrpcmsg->getNumParams() == 2){ +/*x*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(GetStockCategoryList($xmlrpcmsg->getParam( 0 )->scalarval( ), +/*x*/ $xmlrpcmsg->getParam( 1 )->scalarval( ))) ); +/*x*/ } else { +/*e*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(GetStockCategoryList( '', ''))); +/*x*/ } + ob_end_flush(); + return $rtn; + } + unset($Description); unset($Parameter); unset($ReturnValue); @@ -2897,6 +2923,10 @@ "function" => "xmlrpc_StockCatPropertyList", "signature" => $StockCatPropertyList_sig, "docstring" => $StockCatPropertyList_doc), + "weberp.xmlrpc_GetStockCategoryList" => array( + "function" => "xmlrpc_GetStockCategoryList", + "signature" => $GetStockCategoryList_sig, + "docstring" => $GetStockCategoryList_doc), "weberp.xmlrpc_GetGLAccountList" => array( "function" => "xmlrpc_GetGLAccountList", "signature" => $GetGLAccountList_sig, Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-04 15:54:54 UTC (rev 4094) +++ trunk/doc/Change.log.html 2010-10-09 02:49:35 UTC (rev 4095) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>09/10/10 Phil: Added xmlrpc_GetStockCategoryList api method <p>04/10/10 Matt Taylor: upgrade3.11.1-3.12.sql - Update tables to utf8</p> <p>03/10/10 Gabriel Olowo: ManualPurchaseOrdering.php - Manual for purchase ordering system</p> <p>02/10/10 Tim: AuditTrail.php - Bug fixes and layout changes</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-13 09:13:16
|
Revision: 4096 http://web-erp.svn.sourceforge.net/web-erp/?rev=4096&view=rev Author: tim_schofield Date: 2010-10-13 09:13:10 +0000 (Wed, 13 Oct 2010) Log Message: ----------- Show the last visit date correctly. Fixes bug 3085860 Modified Paths: -------------- trunk/WWW_Users.php trunk/doc/Change.log.html Modified: trunk/WWW_Users.php =================================================================== --- trunk/WWW_Users.php 2010-10-09 02:49:35 UTC (rev 4095) +++ trunk/WWW_Users.php 2010-10-13 09:13:10 UTC (rev 4096) @@ -288,10 +288,10 @@ $k=1; } - if ($myrow[7]=='') { - $LastVisitDate = Date('Y-m-d'); + if ($myrow[8]=='') { + $LastVisitDate = Date($_SESSION['DefaultDateFormat']); } else { - $LastVisitDate = ConvertSQLDate($myrow[7]); + $LastVisitDate = ConvertSQLDate($myrow[8]); } /*The SecurityHeadings array is defined in config.php */ Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-09 02:49:35 UTC (rev 4095) +++ trunk/doc/Change.log.html 2010-10-13 09:13:10 UTC (rev 4096) @@ -1,6 +1,7 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> -<p>09/10/10 Phil: Added xmlrpc_GetStockCategoryList api method +<p>13/10/10 Tim: WWW_Users.php - Show the last visit date correctly. Fixes bug 3085860</p> +<p>09/10/10 Phil: Added xmlrpc_GetStockCategoryList api method</p> <p>04/10/10 Matt Taylor: upgrade3.11.1-3.12.sql - Update tables to utf8</p> <p>03/10/10 Gabriel Olowo: ManualPurchaseOrdering.php - Manual for purchase ordering system</p> <p>02/10/10 Tim: AuditTrail.php - Bug fixes and layout changes</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-14 07:21:10
|
Revision: 4097 http://web-erp.svn.sourceforge.net/web-erp/?rev=4097&view=rev Author: tim_schofield Date: 2010-10-14 07:21:04 +0000 (Thu, 14 Oct 2010) Log Message: ----------- Fix bug preventing download of ECB rates Modified Paths: -------------- trunk/doc/Change.log.html trunk/includes/MiscFunctions.php Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-13 09:13:10 UTC (rev 4096) +++ trunk/doc/Change.log.html 2010-10-14 07:21:04 UTC (rev 4097) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>14/10/10 Tim: MiscFunctions.php - Fix bug preventing download of ECB rates</p> <p>13/10/10 Tim: WWW_Users.php - Show the last visit date correctly. Fixes bug 3085860</p> <p>09/10/10 Phil: Added xmlrpc_GetStockCategoryList api method</p> <p>04/10/10 Matt Taylor: upgrade3.11.1-3.12.sql - Update tables to utf8</p> Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2010-10-13 09:13:10 UTC (rev 4096) +++ trunk/includes/MiscFunctions.php 2010-10-14 07:21:04 UTC (rev 4097) @@ -145,7 +145,7 @@ function GetECBCurrencyRates () { /* See http://www.ecb.int/stats/exchange/eurofxref/html/index.en.html for detail of the European Central Bank rates - published daily */ - if (file_exists('http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml')) { + if (http_file_exists('http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml')) { $xml = file_get_contents('http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml'); $parser = xml_parser_create(); xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2010-10-15 22:45:24
|
Revision: 4101 http://web-erp.svn.sourceforge.net/web-erp/?rev=4101&view=rev Author: daintree Date: 2010-10-15 22:45:17 +0000 (Fri, 15 Oct 2010) Log Message: ----------- mix up with commits repaired SupplierInvoice.php Modified Paths: -------------- trunk/SupplierInvoice.php trunk/doc/Change.log.html trunk/includes/Login.php Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2010-10-15 16:30:17 UTC (rev 4100) +++ trunk/SupplierInvoice.php 2010-10-15 22:45:17 UTC (rev 4101) @@ -561,13 +561,8 @@ /*Start an SQL transaction */ - $SQL = 'BEGIN'; + $Result = DB_Txn_Begin($db); - $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); @@ -663,20 +658,56 @@ $LocalTotal += round($ShiptChg->Amount/ $_SESSION['SuppTrans']->ExRate,2); } - $sql="SELECT conversionfactor + $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; - } + $result=DB_query($sql, $db); + if (DB_num_rows($result)>0) { + $myrow=DB_fetch_array($result); + $conversionfactor=$myrow['conversionfactor']; + } else { + $conversionfactor=1; + } - foreach ($_SESSION['SuppTrans']->GRNs as $EnteredGRN){ + foreach ($_SESSION['SuppTrans']->Contracts as $Contract){ + /*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]; + $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 */ @@ -1080,42 +1111,61 @@ } /* end of the loop to do the updates for the quantity of order items the supplier has invoiced */ /*Add shipment charges records as necessary */ - - foreach ($_SESSION['SuppTrans']->Shipts as $ShiptChg){ - - $SQL = "INSERT INTO shipmentcharges (shiptref, - transtype, - transno, - value) - VALUES ( - '" . $ShiptChg->ShiptRef . "', - 20, - '" . $InvoiceNo . "', - '" . $ShiptChg->Amount/ $_SESSION['SuppTrans']->ExRate . "')"; - + foreach ($_SESSION['SuppTrans']->Shipts as $ShiptChg){ + + $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'); - + ' ' . $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); + + } + /*Add contract 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 . "')"; + + $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'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, True); - } - $SQL="COMMIT"; + $Result = DB_Txn_Commit($db); - $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); unset( $_SESSION['SuppTrans']->Shipts); unset( $_SESSION['SuppTrans']->GLCodes); + unset( $_SESSION['SuppTrans']->Contracts); unset( $_SESSION['SuppTrans']); } Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-15 16:30:17 UTC (rev 4100) +++ trunk/doc/Change.log.html 2010-10-15 22:45:17 UTC (rev 4101) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>16/10/10 Phil: SupplierInvocie.php fixed for mix up with commits - now shipment charges added correctly and contract charges also <p>14/10/10 Tim: MiscFunctions.php - Fix bug preventing download of ECB rates</p> <p>13/10/10 Tim: WWW_Users.php - Show the last visit date correctly. Fixes bug 3085860</p> <p>09/10/10 Phil: Added xmlrpc_GetStockCategoryList api method</p> Modified: trunk/includes/Login.php =================================================================== --- trunk/includes/Login.php 2010-10-15 16:30:17 UTC (rev 4100) +++ trunk/includes/Login.php 2010-10-15 22:45:17 UTC (rev 4101) @@ -38,7 +38,7 @@ echo '<select name="CompanyNameField">'; $DirHandle = dir('companies/'); while (false != ($CompanyEntry = $DirHandle->read())){ - if (is_dir('companies/' . $CompanyEntry) AND $CompanyEntry != '..' AND $CompanyEntry != 'CVS' AND $CompanyEntry!='.svn' AND $CompanyEntry!='.'){ + if (is_dir('companies/' . $CompanyEntry) AND $CompanyEntry != '..' AND $CompanyEntry != '' AND $CompanyEntry!='.svn' AND $CompanyEntry!='.'){ if ($CompanyEntry==$DefaultCompany) { echo "<option selected value='$CompanyEntry'>$CompanyEntry</option>"; } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2010-10-22 04:40:23
|
Revision: 4104 http://web-erp.svn.sourceforge.net/web-erp/?rev=4104&view=rev Author: daintree Date: 2010-10-22 04:40:14 +0000 (Fri, 22 Oct 2010) Log Message: ----------- Fixed assets depreciation was posting to the credit of asset cost not accum depn - fixed Modified Paths: -------------- trunk/FixedAssetJournal.php trunk/Suppliers.php trunk/doc/Manual/ManualSalesOrders.html trunk/index.php trunk/sql/mysql/upgrade3.11.1-3.12.sql trunk/sql/mysql/weberp-new.sql Modified: trunk/FixedAssetJournal.php =================================================================== --- trunk/FixedAssetJournal.php 2010-10-21 00:24:11 UTC (rev 4103) +++ trunk/FixedAssetJournal.php 2010-10-22 04:40:14 UTC (rev 4104) @@ -33,7 +33,7 @@ /* Get list of assets for journal */ $sql='SELECT assetmanager.*, - stockcategory.stockact as bsdepn, + stockcategory.wipact as bsdepn, stockcategory.adjglact as pldepn, fixedassetlocations.locationdescription FROM assetmanager Modified: trunk/Suppliers.php =================================================================== --- trunk/Suppliers.php 2010-10-21 00:24:11 UTC (rev 4103) +++ trunk/Suppliers.php 2010-10-22 04:40:14 UTC (rev 4104) @@ -905,8 +905,7 @@ echo "<br><p><div class='centre'><input type='Submit' name='submit' VALUE='" . _('Update Supplier') . "'></div><br>"; // echo '<p><font color=red><b>' . _('WARNING') . ': ' . _('There is no second warning if you hit the delete button below') . '. ' . _('However checks will be made to ensure there are no outstanding purchase orders or existing accounts payable transactions before the deletion is processed') . '<br></font></b>'; prnMsg(_('WARNING') . ': ' . _('There is no second warning if you hit the delete button below') . '. ' . _('However checks will be made to ensure there are no outstanding purchase orders or existing accounts payable transactions before the deletion is processed'), 'Warn'); - echo "<br><div class=centre><input type='Submit' name='delete' VALUE='" . _('Delete Supplier') . "' onclick=\"return confirm('" . - _('Are you sure you wish to delete this supplier?') . "');\"></form>"; + echo "<br><div class=centre><input type='Submit' name='delete' VALUE='" . _('Delete Supplier') . "' onclick=\"return confirm('" . _('Are you sure you wish to delete this supplier?') . "');\"></form>"; echo "<br><a href='$rootpath/SupplierContacts.php?" . SID . "SupplierID=$SupplierID'>" . _('Review Contact Details') . '</a></div>'; } echo '</div>'; Modified: trunk/doc/Manual/ManualSalesOrders.html =================================================================== --- trunk/doc/Manual/ManualSalesOrders.html 2010-10-21 00:24:11 UTC (rev 4103) +++ trunk/doc/Manual/ManualSalesOrders.html 2010-10-22 04:40:14 UTC (rev 4104) @@ -71,8 +71,13 @@ <br><br> In version 3.12 of webERP a new feature was introduced which allowed for cash sales to be entered directly without first entering an order and then confirming a dispatch to invoice. This feature is known as "counter sales". From the main menu->Sales tab select Enter Counter Sales. Entry is similar to entering an order, by default the quick entry screen allows entry of item codes and quantities but it is also possible to select items by the search functions in much the same way as an order. The tax is calculated and the total amount to pay is shown. This page also expects the payment to be made and entered. The payment entered is automatically allocated to the sale. <br><br> -Behind the scenes this script produces all the database entries for an order and an invoice with sales analysis, stock movements etc etc all correctly created. The customer (and customer branch) used for the entries is derived from the user's default inventory location. webERP looks at the users default location and then looks up against the location record to find the cash sales debtor account (and branch) to use for counter sales entered this way. Obviously before the Counter Sales functionality is used the customer and branch must first be entered against the location records (Setup-> Inventory Location Maintenance) in the format customercode-branchcode in the field provided for this purpose. +Behind the scenes this script produces all the database entries for an order and an invoice with sales analysis, stock movements etc etc all correctly created. The customer (and customer branch) used for the entries is derived from the user's default inventory location. <br><br> +<font size="+1"><b>Setting Up Counter Sales</b></font> +<br><br> +webERP looks at the user's default location and then looks up against the location record to find the cash sales debtor account (and branch) to use for counter sales entered. Each location for which counter sales are required must first be set up with the cash sales customer and branch which is to be used for counter sales entered. Note that the default location of the customer branch is ignored - the user's default location (see Setup->General->User Maintenance - the script webERP/WWW_Users.php) is used as the location and stock movements are all created from this location against the customer specified in the location record (Setup - > Inventory Setup -> Location Maintenance - the script webERP/Locations.php). +To specify the customer and branch to use for counter sales for an inventory location (or warehouse), the customer code and branch code must be entered in the format customercode-branchcode in the field provided for this purpose. i.e. the customer code then a hyphen then the branch code. +<br><br> <!-- Help Begin: SelectSalesOrder --> <font size="+1"><b>Modfiying An Order</b></font> Modified: trunk/index.php =================================================================== --- trunk/index.php 2010-10-21 00:24:11 UTC (rev 4103) +++ trunk/index.php 2010-10-22 04:40:14 UTC (rev 4104) @@ -1292,8 +1292,19 @@ <tr> <td class="menu_group_items"> <!-- Fixed Asset transactions options --> <table width="100%" class="table_index"> + <tr> <tr> <td class="menu_group_item"> + <?php echo '<p>• <a href="' . $rootpath . '/FixedAssetItems.php?' . SID . '">' . _('Add a new Asset') . '</a></p>'; ?> + </td> + </tr> + <tr> + <td class="menu_group_item"> + <?php echo '<p>• <a href="' . $rootpath . '/SelectAssetType.php?' . SID . '">' . _('Select an Asset') . '</a></p>'; ?> + </td> + </tr> + <tr> + <td class="menu_group_item"> <?php echo '<p>• <a href="' . $rootpath . '/FixedAssetTransfer.php?' . SID . '">' . _('Change Asset Location') . '</a></p>'; ?> </td> </tr> @@ -1332,16 +1343,6 @@ </tr> <tr> <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/FixedAssetItems.php?' . SID . '">' . _('Add a new Asset Type') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SelectAssetType.php?' . SID . '">' . _('Select an Asset Type') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> <?php echo '<p>• <a href="' . $rootpath . '/FixedAssetLocations.php?' . SID . '">' . _('Add or Maintain Asset Locations') . '</a></p>'; ?> </td> </tr> Modified: trunk/sql/mysql/upgrade3.11.1-3.12.sql =================================================================== --- trunk/sql/mysql/upgrade3.11.1-3.12.sql 2010-10-21 00:24:11 UTC (rev 4103) +++ trunk/sql/mysql/upgrade3.11.1-3.12.sql 2010-10-22 04:40:14 UTC (rev 4104) @@ -1,15 +1,112 @@ SET FOREIGN_KEY_CHECKS=0; -ALTER TABLE `workcentres` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `stockmaster` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `custbranch` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `stockcategory` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `locations` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `www_users` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `currencies` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `suppliers` CONVERT TO CHARACTER SET utf8; +ALTER TABLE accountgroups CONVERT TO CHARACTER SET utf8; +ALTER TABLE accountsection CONVERT TO CHARACTER SET utf8; +ALTER TABLE areas CONVERT TO CHARACTER SET utf8; +ALTER TABLE audittrail CONVERT TO CHARACTER SET utf8; +ALTER TABLE bankaccounts CONVERT TO CHARACTER SET utf8; +ALTER TABLE banktrans CONVERT TO CHARACTER SET utf8; +ALTER TABLE bom CONVERT TO CHARACTER SET utf8; +ALTER TABLE buckets CONVERT TO CHARACTER SET utf8; +ALTER TABLE chartdetails CONVERT TO CHARACTER SET utf8; +ALTER TABLE chartmaster CONVERT TO CHARACTER SET utf8; +ALTER TABLE cogsglpostings CONVERT TO CHARACTER SET utf8; +ALTER TABLE companies CONVERT TO CHARACTER SET utf8; +ALTER TABLE config CONVERT TO CHARACTER SET utf8; +ALTER TABLE currencies CONVERT TO CHARACTER SET utf8; +ALTER TABLE custallocns CONVERT TO CHARACTER SET utf8; +ALTER TABLE custbranch CONVERT TO CHARACTER SET utf8; +ALTER TABLE custcontacts CONVERT TO CHARACTER SET utf8; +ALTER TABLE custnotes CONVERT TO CHARACTER SET utf8; +ALTER TABLE debtorsmaster CONVERT TO CHARACTER SET utf8; +ALTER TABLE debtortrans CONVERT TO CHARACTER SET utf8; +ALTER TABLE debtortranstaxes CONVERT TO CHARACTER SET utf8; +ALTER TABLE debtortype CONVERT TO CHARACTER SET utf8; +ALTER TABLE debtortypenotes CONVERT TO CHARACTER SET utf8; +ALTER TABLE deliverynotes CONVERT TO CHARACTER SET utf8; +ALTER TABLE discountmatrix CONVERT TO CHARACTER SET utf8; +ALTER TABLE edi_orders_seg_groups CONVERT TO CHARACTER SET utf8; +ALTER TABLE edi_orders_segs CONVERT TO CHARACTER SET utf8; +ALTER TABLE ediitemmapping CONVERT TO CHARACTER SET utf8; +ALTER TABLE edimessageformat CONVERT TO CHARACTER SET utf8; +ALTER TABLE factorcompanies CONVERT TO CHARACTER SET utf8; +ALTER TABLE freightcosts CONVERT TO CHARACTER SET utf8; +ALTER TABLE geocode_param CONVERT TO CHARACTER SET utf8; +ALTER TABLE gltrans CONVERT TO CHARACTER SET utf8; +ALTER TABLE grns CONVERT TO CHARACTER SET utf8; +ALTER TABLE holdreasons CONVERT TO CHARACTER SET utf8; +ALTER TABLE lastcostrollup CONVERT TO CHARACTER SET utf8; +ALTER TABLE locations CONVERT TO CHARACTER SET utf8; +ALTER TABLE locstock CONVERT TO CHARACTER SET utf8; +ALTER TABLE loctransfers CONVERT TO CHARACTER SET utf8; +ALTER TABLE mrpcalendar CONVERT TO CHARACTER SET utf8; +ALTER TABLE mrpdemands CONVERT TO CHARACTER SET utf8; +ALTER TABLE mrpdemandtypes CONVERT TO CHARACTER SET utf8; +ALTER TABLE orderdeliverydifferenceslog CONVERT TO CHARACTER SET utf8; +ALTER TABLE paymentmethods CONVERT TO CHARACTER SET utf8; +ALTER TABLE paymentterms CONVERT TO CHARACTER SET utf8; +ALTER TABLE periods CONVERT TO CHARACTER SET utf8; +ALTER TABLE prices CONVERT TO CHARACTER SET utf8; +ALTER TABLE purchdata CONVERT TO CHARACTER SET utf8; +ALTER TABLE purchorderauth CONVERT TO CHARACTER SET utf8; +ALTER TABLE purchorderdetails CONVERT TO CHARACTER SET utf8; +ALTER TABLE purchorders CONVERT TO CHARACTER SET utf8; +ALTER TABLE recurringsalesorders CONVERT TO CHARACTER SET utf8; +ALTER TABLE recurrsalesorderdetails CONVERT TO CHARACTER SET utf8; +ALTER TABLE reportcolumns CONVERT TO CHARACTER SET utf8; +ALTER TABLE reportfields CONVERT TO CHARACTER SET utf8; +ALTER TABLE reportheaders CONVERT TO CHARACTER SET utf8; +ALTER TABLE reportlinks CONVERT TO CHARACTER SET utf8; +ALTER TABLE reports CONVERT TO CHARACTER SET utf8; +ALTER TABLE salesanalysis CONVERT TO CHARACTER SET utf8; +ALTER TABLE salescat CONVERT TO CHARACTER SET utf8; +ALTER TABLE salescatprod CONVERT TO CHARACTER SET utf8; +ALTER TABLE salesglpostings CONVERT TO CHARACTER SET utf8; +ALTER TABLE salesman CONVERT TO CHARACTER SET utf8; +ALTER TABLE salesorderdetails CONVERT TO CHARACTER SET utf8; +ALTER TABLE salesorders CONVERT TO CHARACTER SET utf8; +ALTER TABLE salestypes CONVERT TO CHARACTER SET utf8; +ALTER TABLE scripts CONVERT TO CHARACTER SET utf8; +ALTER TABLE securitygroups CONVERT TO CHARACTER SET utf8; +ALTER TABLE securityroles CONVERT TO CHARACTER SET utf8; +ALTER TABLE securitytokens CONVERT TO CHARACTER SET utf8; +ALTER TABLE shipmentcharges CONVERT TO CHARACTER SET utf8; +ALTER TABLE shipments CONVERT TO CHARACTER SET utf8; +ALTER TABLE shippers CONVERT TO CHARACTER SET utf8; +ALTER TABLE stockcategory CONVERT TO CHARACTER SET utf8; +ALTER TABLE stockcatproperties CONVERT TO CHARACTER SET utf8; +ALTER TABLE stockcheckfreeze CONVERT TO CHARACTER SET utf8; +ALTER TABLE stockcounts CONVERT TO CHARACTER SET utf8; +ALTER TABLE stockitemproperties CONVERT TO CHARACTER SET utf8; +ALTER TABLE stockmaster CONVERT TO CHARACTER SET utf8; +ALTER TABLE stockmoves CONVERT TO CHARACTER SET utf8; +ALTER TABLE stockmovestaxes CONVERT TO CHARACTER SET utf8; +ALTER TABLE stockserialitems CONVERT TO CHARACTER SET utf8; +ALTER TABLE stockserialmoves CONVERT TO CHARACTER SET utf8; +ALTER TABLE suppallocs CONVERT TO CHARACTER SET utf8; +ALTER TABLE suppliercontacts CONVERT TO CHARACTER SET utf8; +ALTER TABLE suppliers CONVERT TO CHARACTER SET utf8; +ALTER TABLE supptrans CONVERT TO CHARACTER SET utf8; +ALTER TABLE supptranstaxes CONVERT TO CHARACTER SET utf8; +ALTER TABLE systypes CONVERT TO CHARACTER SET utf8; +ALTER TABLE tags CONVERT TO CHARACTER SET utf8; +ALTER TABLE taxauthorities CONVERT TO CHARACTER SET utf8; +ALTER TABLE taxauthrates CONVERT TO CHARACTER SET utf8; +ALTER TABLE taxcategories CONVERT TO CHARACTER SET utf8; +ALTER TABLE taxgroups CONVERT TO CHARACTER SET utf8; +ALTER TABLE taxgrouptaxes CONVERT TO CHARACTER SET utf8; +ALTER TABLE taxprovinces CONVERT TO CHARACTER SET utf8; +ALTER TABLE unitsofmeasure CONVERT TO CHARACTER SET utf8; +ALTER TABLE woitems CONVERT TO CHARACTER SET utf8; +ALTER TABLE worequirements CONVERT TO CHARACTER SET utf8; +ALTER TABLE workcentres CONVERT TO CHARACTER SET utf8; +ALTER TABLE workorders CONVERT TO CHARACTER SET utf8; +ALTER TABLE woserialnos CONVERT TO CHARACTER SET utf8; +ALTER TABLE www_users CONVERT TO CHARACTER SET utf8; + CREATE TABLE IF NOT EXISTS `fixedassetlocations` ( `locationid` char(6) NOT NULL default '', `locationdescription` char(20) NOT NULL default '', + `parentlocationid` char(6) DEFAULT '', PRIMARY KEY (`locationid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -23,15 +120,16 @@ `cost` double NOT NULL default '0', `depn` double NOT NULL default '0', `datepurchased` date NOT NULL default '0000-00-00', + `disposalvalue` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; UPDATE `www_users` SET `modulesallowed`=(SELECT insert(`modulesallowed`, 15,0,"1,")); INSERT INTO `config` (`confname`, `confvalue`) VALUES ('FrequentlyOrderedItems',0); ALTER TABLE `www_users` CHANGE COLUMN `language` `language` varchar(10) NOT NULL DEFAULT 'en_GB.utf8'; -ALTER TABLE `assetmanager` ADD COLUMN `disposalvalue` int(11) NOT NULL DEFAULT 0; + ALTER TABLE `currencies` ADD COLUMN `decimalplaces` tinyint(3) NOT NULL DEFAULT 2 AFTER `hundredsname`; -ALTER TABLE `fixedassetlocations` ADD COLUMN `parentlocationid` char(6) DEFAULT ''; + INSERT INTO `config` (`confname`, `confvalue`) VALUES ('NumberOfMonthMustBeShown', '6'); ALTER TABLE `holdreasons` DROP INDEX `ReasonCode`; Modified: trunk/sql/mysql/weberp-new.sql =================================================================== --- trunk/sql/mysql/weberp-new.sql 2010-10-21 00:24:11 UTC (rev 4103) +++ trunk/sql/mysql/weberp-new.sql 2010-10-22 04:40:14 UTC (rev 4104) @@ -2351,10 +2351,8 @@ PRIMARY KEY (`supplierid`), KEY `CurrCode` (`currcode`), KEY `PaymentTerms` (`paymentterms`), - KEY `SupplierID` (`supplierid`), KEY `SuppName` (`suppname`), KEY `taxgroupid` (`taxgroupid`), - KEY `suppliers_ibfk_4` (`factorcompanyid`), CONSTRAINT `suppliers_ibfk_1` FOREIGN KEY (`currcode`) REFERENCES `currencies` (`currabrev`), CONSTRAINT `suppliers_ibfk_2` FOREIGN KEY (`paymentterms`) REFERENCES `paymentterms` (`termsindicator`), CONSTRAINT `suppliers_ibfk_3` FOREIGN KEY (`taxgroupid`) REFERENCES `taxgroups` (`taxgroupid`) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tu...@us...> - 2010-10-19 01:17:15
|
Revision: 4102 http://web-erp.svn.sourceforge.net/web-erp/?rev=4102&view=rev Author: turbopt Date: 2010-10-19 01:17:08 +0000 (Tue, 19 Oct 2010) Log Message: ----------- WorkOrderReceive.php - Bug #3023776. Applied anonymous contribution. Modified Paths: -------------- trunk/WorkOrderReceive.php trunk/doc/Change.log.html Modified: trunk/WorkOrderReceive.php =================================================================== --- trunk/WorkOrderReceive.php 2010-10-15 22:45:17 UTC (rev 4101) +++ trunk/WorkOrderReceive.php 2010-10-19 01:17:08 UTC (rev 4102) @@ -523,7 +523,7 @@ } //end for all of the potential serialised fields received } else { //the item is just batch/lot controlled not serialised /*the form for entry of batch controlled items is only 15 possible fields */ - for($i=0;$i<$_POST['CountOfItems'];$i++){ + for($i=0;$i<$_POST['CountOfInputs'];$i++){ /* We need to add the StockSerialItem record and The StockSerialMoves as well */ //need to test if the batch/lot exists first already Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-15 22:45:17 UTC (rev 4101) +++ trunk/doc/Change.log.html 2010-10-19 01:17:08 UTC (rev 4102) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>18/10/10 Paul: WorkOrderReceive.php - Bug #3023776. Applied anonymous contribution.</p> <p>16/10/10 Phil: SupplierInvocie.php fixed for mix up with commits - now shipment charges added correctly and contract charges also <p>14/10/10 Tim: MiscFunctions.php - Fix bug preventing download of ECB rates</p> <p>13/10/10 Tim: WWW_Users.php - Show the last visit date correctly. Fixes bug 3085860</p> @@ -146,6 +147,7 @@ <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>07/08/10 Paul Thursby: PO_Items.php - Eliminate query; Moves the ONE field into a query above this point.</p> <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> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tu...@us...> - 2010-10-21 00:24:17
|
Revision: 4103 http://web-erp.svn.sourceforge.net/web-erp/?rev=4103&view=rev Author: turbopt Date: 2010-10-21 00:24:11 +0000 (Thu, 21 Oct 2010) Log Message: ----------- Correct condition check so the calendar will properly use date from the textbox. Modified Paths: -------------- trunk/doc/Change.log.html trunk/javascripts/MiscFunctions.js Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-19 01:17:08 UTC (rev 4102) +++ trunk/doc/Change.log.html 2010-10-21 00:24:11 UTC (rev 4103) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>20/10/10 Paul: MiscFunctions.js - Bug #3060329. Correct condition check. [allows the calendar to start with the textbox's date]</p> <p>18/10/10 Paul: WorkOrderReceive.php - Bug #3023776. Applied anonymous contribution.</p> <p>16/10/10 Phil: SupplierInvocie.php fixed for mix up with commits - now shipment charges added correctly and contract charges also <p>14/10/10 Tim: MiscFunctions.php - Fix bug preventing download of ECB rates</p> Modified: trunk/javascripts/MiscFunctions.js =================================================================== --- trunk/javascripts/MiscFunctions.js 2010-10-19 01:17:08 UTC (rev 4102) +++ trunk/javascripts/MiscFunctions.js 2010-10-21 00:24:11 UTC (rev 4103) @@ -148,8 +148,8 @@ } function convertDate(dS,dF){ var d,m,y; -if (dF="d.m.Y") -dA=dS.split(".") +if (dF=="d.m.Y") +dA=dS.split("."); else dA=dS.split("/"); switch (dF){ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2010-10-23 04:04:38
|
Revision: 4105 http://web-erp.svn.sourceforge.net/web-erp/?rev=4105&view=rev Author: daintree Date: 2010-10-23 04:04:32 +0000 (Sat, 23 Oct 2010) Log Message: ----------- PurchData.php search by supplier name SQL concatenation stuffed now repaired Modified Paths: -------------- trunk/PurchData.php trunk/doc/Change.log.html Modified: trunk/PurchData.php =================================================================== --- trunk/PurchData.php 2010-10-22 04:40:14 UTC (rev 4104) +++ trunk/PurchData.php 2010-10-23 04:04:32 UTC (rev 4105) @@ -257,7 +257,7 @@ suppliers.address1, suppliers.address2, suppliers.address3 - FROM suppliers WHERE suppliers.suppname LIKE . ".$SearchString; + FROM suppliers WHERE suppliers.suppname " . LIKE ."'" . $SearchString . "'"; } elseif (strlen($_POST['SupplierCode']) > 0) { $SQL = "SELECT suppliers.supplierid, suppliers.suppname, Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-22 04:40:14 UTC (rev 4104) +++ trunk/doc/Change.log.html 2010-10-23 04:04:32 UTC (rev 4105) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>23/10/10 Phil: PurchData.php - search by name failed concatenation of SQL stuffed now repaired. <p>20/10/10 Paul: MiscFunctions.js - Bug #3060329. Correct condition check. [allows the calendar to start with the textbox's date]</p> <p>18/10/10 Paul: WorkOrderReceive.php - Bug #3023776. Applied anonymous contribution.</p> <p>16/10/10 Phil: SupplierInvocie.php fixed for mix up with commits - now shipment charges added correctly and contract charges also This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-10-25 18:53:53
|
Revision: 4106 http://web-erp.svn.sourceforge.net/web-erp/?rev=4106&view=rev Author: tim_schofield Date: 2010-10-25 18:53:44 +0000 (Mon, 25 Oct 2010) Log Message: ----------- Marcos Garcia Trejo: New labelprinting functionality Modified Paths: -------------- trunk/doc/Change.log.html trunk/includes/PDFStarter.php trunk/index.php Added Paths: ----------- trunk/Labels.php trunk/PDFPrintLabel.php trunk/companies/weberpdemo/reportwriter/labels.xml trunk/css/labelsDim.png trunk/css/paramsLabel.png trunk/includes/DefineLabelClass.php Added: trunk/Labels.php =================================================================== --- trunk/Labels.php (rev 0) +++ trunk/Labels.php 2010-10-25 18:53:44 UTC (rev 4106) @@ -0,0 +1,552 @@ +<?php +/** + * <b>Labels XML file Managment</b> + * This programa maintains the XML file containing the label defintions + * used to print the products prices tickets + * @author Marcos R Garcia <addsmgt at gmail dot com> + * @version 1.1 + * Last changes: 2010-08-31 + * +**/ + +/* $Revision= 1.1; $ */ +$Version_adds= 1.1; + +$PageSecurity=15; +/** Error reporting */ + +include('includes/session.inc'); +$title=_('Label Templates Maintainance'); +include('includes/header.inc'); + +$debug=false; +include('includes/DefineLabelClass.php'); + +$allLabels = //!< The variable $allLabels is the global variable that contains the list + getXMLFile(LABELS_FILE); //!< of all the label objects defined until now. In case of a fresh + //!< installation or an empty XML labels file it holds a NULL value. + +if ($debug) { + echo "<br>" ; + echo "<pre>"; + print_r($_POST); + echo "</pre>"; +//exit(); +} + +/** Check if some action has been requested +*/ +$showList=true; // By default will show the tamplates list + +/** + * Save the changes in template? + */ +if (isset($_POST['Update'])) { + // Get the data from the user input & validate it (not new) + $label=getData($_POST, false, $ok); + // If all OK try to update the requested label + if (!$ok OR !updateLabel($label)) { + // show the data label from the input data as update data (id read only)} + showLabel($label, _('Correct data'), $theme, false); + $showList=false; + } + +/** + * Save the data for a new template? + */ +} elseif (isset($_POST['Save'])) { + // Get the data from the user input & validate it for new id + $label=getData($_POST, true, $ok); + if (!$ok OR !createLabel($label)) { // + showLabel($label, _('Correct data'), $theme, false); + $showList=false; + } + +/** + * Get the data from an old one to create a new template? + */ +} elseif (isset($_POST['Copy'])) { + $label=$allLabels->getLabel($_POST['labelID']); + $label->id = _('New ID'); // Well, where did I get it? of course from the user, but .. + showLabel($label, _('Edit data new label'), $theme, false); + $showList=false; + +/** + * Change some data from an old template? + */ +} elseif (isset($_POST['Edit'])) { + $label=$allLabels->getLabel($_POST['labelID']); + showLabel($label, _('Edit data label'), $theme, true); + $showList=false; + +/** + * Eliminate an unnecesary template? + */ +} elseif (isset($_POST['Delete'])) { + $allLabels=deleteLabel($allLabels, $_POST['labelID']); + +/** + * Create a new template? + */ +} elseif (isset($_POST['New'])) { + showLabel(null, _('New label'), $theme); + $showList=false; + +/** + * Do nothing? only show the list (if it exist)) + */ +} elseif (isset($_POST['Cancel'])) { + ; // showLabelList + +/** + * No action requested, show all or get the first one + */ +} else { + if ($allLabels==null OR count($allLabels->label)<1) { + showLabel(null, _('There is no labels, create a new one'), $theme); + $showList=false; + } +} + +/** + * The default is to show the list of labels templates yet defined, + * the exception occurs when previously has been selected a particular + * template, for edit, copy or to create a new one + */ +if ($showList) { + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="">' . ' ' . $title.'</p>'; + showLabelsList($allLabels->label); +} +include('includes/footer.inc'); +exit(); + +/*! \brief getData - Gets the input data from the user's submit + * + * This code constructs a new objet Label from the form's data + * provided by the user. It validates the data too. + * @param $data The array of strings gived by the user + * @param $new This flag indicates that the labels is new, so check no repeated id + * @param $ok The variable where the routine gives the validation result. + * @return The Label object constructed qith the data, included errors. + */ +function getData($data, $new, &$ok) { + $ok = validData($data, $new); + return newLabel($data); +} + +function validData($data, $new) { + global $allLabels, $DimensionTags, $DataTags; + +// Check the heading data + $errors=array(); + if ($new) { + if (empty($data['id'])) + $errors[]=_('Id required'); + elseif ($allLabels!=null AND $allLabels->findLabel($data['id'])!==false) + $errors[]=_('This id exist in previous list'); + } + if (empty($data['description'])) + $errors=_('the description is required'); + +// Check the dimensions data + foreach ($DimensionTags as $iTag=>$tag) { + if ($tag['type']=='s') continue; // select type does not require validation + $dd = trim($data[$iTag]); + $desc=$tag['desc']; + switch ($tag['type']) { + case 'n': + if (!is_numeric($dd)) + $errors[]= _('The value of').' '.$desc.' '._('would be numeric'); + elseif ((float)$data[$iTag]<=0) + $errors[]= _('The value of').' '.$desc.' '._('requires a positive value').$dd; + break; + case 'i': + if (!is_numeric($dd) OR (int)$data[$iTag]<=0) + $errors[]= _('The value of').' '.$tag['desc'].' '._('would be a positive integer'); + break; + } + } + // Checking consistency between data + // Rh > He + $tag = $DimensionTags[$iTag='Rh']; + if ((float)$data['Rh'] < (float)$data['He'] ) { + $desc=$tag['desc']; + $errors[]= _('The value of').' '.$desc.' '._('requires to be greater than the height of the labels'); + } + // Sh >= rows*Rh+Tm + $tag = $DimensionTags[$iTag='Sh']; + if ((float)$data['Sh'] <= (float)$data['Tm'] + ( (int)$data['Rows']*((float)$data['Rh']) ) ) { + $desc=$tag['desc']; + $errors[]= _('The value of').' '.$desc.' '._('requires to be greater than the height of all the rows, including the top margin'); + } + // Cw > Wi + $tag = $DimensionTags[$iTag='Cw']; + if ((float)$data['Cw'] < (float)$data['Wi'] ) { + $desc=$tag['desc']; + $errors[]= _('The value of').' '.$desc.' '._('requires to be greater than the width of the labels'); + } + // Sw >= Cols*Cw+Lm + $tag = $DimensionTags[$iTag='Sw']; + if ((float)$data['Sw'] <= (float)$data['Lm'] + ( (int)$data['Cols']*((float)$data['Cw']) ) ) { + $desc=$tag['desc']; + $errors[]= _('The value of').' '.$desc.' '._('requires to be greater than the width of all the cols, including the left margin'); + } + + $rowCount=0; + $jRow=0; + foreach ($data['row'] as $iRow=>$row) { + $jRow++; + if (empty($row)) continue; // The empty row indicates no data + $rowCount++; // we have data + + if (!is_numeric($row) ) $row=0; + else $row = (float)$row; + if ($row<=0) + $errors[]= _('The vert. pos. value would be positive') ." ($jRow)"; + elseif ((float)$row>(float)$data['He']) + $errors[]= _('The value of the vert. pos. would be less than')." ". $data['He'] ."($jRow)"; + + // now the rest of the line data is validated + foreach ($DataTags as $iTag=>$tag) { + if ($tag['type']=='s' // select type does not require validation + OR $iTag == 'row') continue; // the row is just validated + $dd = trim($data[$iTag][$iRow]); + $desc=$tag['desc']; + if ($tag['type']=='n') { + if (!is_numeric($dd)) + $errors[]= _('The value of').' '.$desc.' '._('would be numeric')." ($jRow)"; + elseif (empty($dd) OR (float)$dd<=0) + $errors[]= _('The value of').' '.$desc.' '._('requires a positive value')." ($jRow)"; + } + switch ($iTag) { + case 'font': + if ((float)$dd+$row >= (float)$data['He']) { + $errors[]= _('The value of').' '.$desc.' '._('in this position exceeds the label height'). + " ($jRow)"; + } + break; + case 'pos': + $posD = (float)$dd; + break; + case 'max': + if ((float)$dd+$posD >= (float)$data['Wi']) { + $errors[]= _('The position and lenght of the string leads the text to get out of the label'). + " ($jRow)"; + } + break; + } + } + } + // Display the errors detected + if (count($errors)>0) { + foreach($errors as $err) + prnMsg($err); + return false; + } + return true; // all data are valid! +} + +/*! \brief Shows the label requested + * + * It shows the data label from the input $data as update data (id read only) + * if the third parameter is true or a fresh data label (new label). It is + * possible that the combination $data valid and $readonly false occurs when + * invalid data needs to be recaptured because an error in a new label capture. + */ +function showLabel($label, $msg, $theme, $readonly=false) { + global $rootpath; + if ($label==null) + $label = newLabel(); + if ($readonly) { + $name = "Update"; + $value = _('Update'); + } else { + $name = "Save"; + $value = _('Save'); + } + + $vCancel = _('Cancel'); + + $tableGD = setTableGD($label, $readonly); + $tableLines = setTableLines($label->data->line); + + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="">' . ' ' . $msg.'</p>'; + + echo '<br> + <form action="'.$_SERVER['PHP_SELF'].'" method="POST"> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <div class="centre"> + <table border="2" cellspacing="4" class="selection"> + <tbody> + <tr> + <td align="center"><img src="'.$rootpath.'/css/paramsLabel.png" align="top" border="0"></td> + <td>'.$tableGD.'</td> + </tr> + <tr> + <td align="center"><IMG src="'.$rootpath.'/css/labelsDim.png" align="top" border="0"></td> + <td>'.$tableLines.'</td> + </tr> + </tbody> + </table> + <br /><input type="submit" name="'.$name.'" value="'.$value.'"> + <input type="submit" name="Cancel" value="'.$vCancel.'"> + </form>'; +} + +function setTableGD($label, $readonly) { + global $GlobalTags, $DimensionTags; + $html=' + <table border="0" cellspacing="1" class="selection">'; + $html .= setDataFields($GlobalTags, 0, $label, $specialTag='id', $readonly); + $html .= setDataFields($DimensionTags, 1, $label->dimensions); + $html .= ' + </table>'; + return $html; +} + +function setDataFields($tags, $withTagId, $data, $specialTag=false, $readonly=false) { + $iCol=0; + $html = ''; + foreach ($tags as $iTag=>$tag) { + $vDat = (is_object($data) AND isset($data->$iTag))?$data->$iTag:''; + if ($tag['type']=='s') { + $input ='<select name="'. $iTag . '">'; + foreach ($tag['values'] as $i=>$val) { + $xSel = ($vDat==$i)?' selected' : ''; + $input .= ' + <option value="'. $i .'"'. $xSel .'>'.$val.'</option>'; + } + $input .= ' + </select>'; + } else { + $ro=''; + if ($readonly AND $specialTag==$iTag) + $ro="readonly "; + $input = '<INPUT type="text" name="'. $iTag .'" value="'. $vDat .'" + size="'. $tag['sz'] .'" maxlength="'. $tag['maxsz'] .'"'. $ro .'>'; + } + if (!$iCol++) // when zero begins a line + $html .= ' + <tr>'; + else + $iCol=0; + $wTag= $withTagId ? (' ('.$iTag.')') :''; + $html .= ' + <td align="right">' . $tag['desc'] . $wTag . ':</td> + <td>' . $input . '</td>'; + if (!$iCol) + $html .= ' + </tr>'; + } + if ($iCol) // if the count ends in an odd count, add the end of line + $html .= ' + </tr>'; + + return $html; +} + +function setTableLines($lineArray) { + global $DataTags; + $html=' + <table border="0" cellspacing="1" class="selection">'; + $html .= setTableHeader($DataTags); + + $iCount=MAX_LINES_PER_LABEL; + foreach ($lineArray as $i=>$data) { + + $iCount--; + $html .= setLineFields($DataTags, $data); + } + while ($iCount-->0) + $html .= setLineFields($DataTags, null); + $html .= ' + </table>'; + return $html; +} + +function setTableHeader($tags) { + $html= ' + <tr>'; + foreach ($tags as $tit) + $html .= ' + <th>' . $tit['desc'] . '</th>'; + return $html . ' + </tr>'; +} + +function setLineFields($tags, $data) { + $html = ' + <tr>'; + foreach ($tags as $iTag=>$tag) { + $vDat = ($data!=null AND isset($data->$iTag))?$data->$iTag:''; + if ($tag['type']=='s') { + $input ='<select name="'. $iTag . '[]">'; + foreach ($tag['values'] as $kI=>$kVal) { + $xSel = ($vDat==$kI) ? ' selected':''; + $input .= ' + <option value="'. $kI .'"'. $xSel .'>'.$kVal.'</option>'; + } + $input .= ' + </select>'; + } else { + $input = '<INPUT type="text" name="'. $iTag .'[]" value="'. $vDat .'" + size="'. $tag['sz'] .'" maxlength="'. $tag['maxsz'] .'">'; + } + $html .= ' + <td align="center">' . $input . '</td>'; + } + $html .= ' + </tr>'; + return $html; +} + +/*! \brief Shows the current label list +* +* When the user begin or finishes an maintance action, the program +* shows the current list, in particular, the ID and the description of the label. +* +* @param $list The label object list to be displayed +* @return Nothing +*/ +function showLabelsList($list) { + $txt= //*< + array(_('Label id'),_('Description'), _('Label array'), + _('New'), _('Edit'), _('Copy'), _('Delete'), + _('Do you really want to erase the label') + ); + // The header of the list + echo '<script type="text/javascript"> + function submitForm(formID, action, value) { + document.getElementById(\'action\').name=action; + document.getElementById(\'labelID\').value=value; + document.getElementById(formID).submit(); + } + function areYouSure(form, action, value) { + var r=confirm("'.$txt[7].'"); + if (r) { + submitForm(form, action, value); + } + } + </script> + <form action="'.$_SERVER["PHP_SELF"].'" method="POST" id="form1" target="_self"> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <input type="hidden" name="action" id="action" value=""> + <input type="hidden" name="labelID" id="labelID" value=""> + </form> + <div class="centre"> + <table class=selection> + <thead> + <tr> + <th>'.$txt[0].'</th> + <th>'.$txt[1].'</th> + <th>'.$txt[2].'</th> + <th><input type="submit" name="new" onclick="submitForm(\'form1\',\'New\',\'\');" value="'.$txt[3].'"> + </th> + </tr> + </thead> + <tbody>'; + foreach ($list as $label) { + $dim = (string)$label->dimensions->Rows. " x ". (string)$label->dimensions->Cols; + echo ' + <tr><td>'. $label->id . '</td> + <td>'. $label->description . '</td> + <td><div class="centre">'. $dim . '</div></td> + <td><input type="submit" onclick="submitForm('. "'form1','Edit','". $label->id . "');" .'" value="' . + $txt[4]. '"> + <input type="submit" onclick="submitForm('. "'form1','Copy','". $label->id . "');" .'" value="' . + $txt[5]. '"> + <input type="submit" onclick="areYouSure('. "'form1','Delete','". $label->id . "');" .'" value="' . + $txt[6]. '"> + </td> + </tr>'; + } + echo ' + </tbody> + </table> + </div>'; +} + +/*! \brief Generates a new label +* +* After the user gives the label data, this routine tries to insert +* the new label in the current list. +* +* @param $label The object label that will replace an old one +* @return True when the update was ok +*/ +function createLabel($label) { + global $allLabels; + $new = emptyList(); + $done=false; + if ($allLabels!=null) { + foreach ($allLabels as $oldLabel) { + if (!$done AND (string)$oldLabel->id >= (string)$label->id) { + $new->addLabel($label); + $done=true; + } + $new->addLabel($oldLabel); // inser data in the list, replacing the old one + } + } + if (!$done) + $new->addLabel($label); + $allLabels = $new; + rewrite($allLabels); // rewrite it to the XML file + return true; +} + +/*! \brief Update the label data +* +* After the user modifies the label data this routine tries to update +* the corresponding structure in the label list with the object given. +* If the label with the id of the new one is found, the object could +* be accepted in the list and written to the XML file. +* +* @param $label The object label that will replace an old one +* @return True when the update was ok +*/ +function updateLabel($label) { + global $allLabels; + $new = emptyList(); + foreach ($allLabels as $oldLabel) { + if ((string)$oldLabel->id == (string)$label->id) + $new->addLabel($label); + else + $new->addLabel($oldLabel); // inser data in the list, replacing the old one + } + $allLabels = $new; + rewrite($allLabels); // rewrite it to the XML file + return true; +} + +/*! \brief Label elimination from the list. + * + * This routine eliminates one label from the global list $allLabels. It + * just find the index that correspond to the id given as input data. + * Because this function is called from the selection of a button with + * correct data, it would be unsual that some error exist, but it is + * included the code for the validation of some this strange case. + * + * @param $labelID is the identifier of the label to delete. + * @see $allLabels + * @return true in case of success + */ +function deleteLabel($list, $labelID) { + $new = emptyList(); + foreach ($list as $label) { + if ((string)$label->id!=$labelID) + $new->addLabel($label); + } + rewrite($new); + return $new; +} + +function rewrite($list) { + // First rename the previous XML file + if (is_file(LABELS_FILE) AND !rename(LABELS_FILE, LABELS_FILE.".bak")) + abortMsg(_('Could not rename the previous file.')); + $result=$list->asXML(LABELS_FILE); + if (!$result) + abortMsg(_('Could not create the new XML file.').': '.LABELS_FILE); +} + +?> \ No newline at end of file Added: trunk/PDFPrintLabel.php =================================================================== --- trunk/PDFPrintLabel.php (rev 0) +++ trunk/PDFPrintLabel.php 2010-10-25 18:53:44 UTC (rev 4106) @@ -0,0 +1,498 @@ +<?php +/* $Revision: 1.2 $ */ + +$PageSecurity = 10; + +$Version_adds= "1.2"; + +include('includes/session.inc'); +require_once("includes/DefineLabelClass.php"); + +$msgErr=null; +$decimalplaces=2; +$today = date('Y-m-d'); +$pdf= null; + + $allLabels = //!< The variable $allLabels is the global variable that contains the list + getXMLFile(LABELS_FILE); //!< of all the label objects defined until now. In case of a fresh + //!< installation or an empty XML labels file it holds a NULL value. + +// If there is no label templates, the user could select to set up a new one +if ($allLabels==null) { + echo '<br/><br/>'; + abortMsg( _("There isn't any label template to select for printing. Click") . + ' <a href="Labels.php"><b>' . _('HERE'). '</b></a> '. _('to set up a new one') ); +} + +/** + * The option print was selected, first it is checked if there are enough data + * to print the labels. + */ +if (isset($_POST['PrintPDF']) OR isset($_POST['PDFTest']) ) { + if (!isset($_POST['QtyByItem']) OR (int)$_POST['QtyByItem']<1) + $msgErr = _('You must specify the number of labels per item required'); + else { + if (count($_POST['StockID'])<1) + $msgErr = _('You must select the items to be printed'); + else { + // + $label = $allLabels->getLabel($_POST['labelID']); + list($dimensions, $lines) = resizeLabel($label); + $formatPage = getPageDimensions($dimensions); + list($Page_Width, + $Page_Height, + $Top_Margin, + $Bottom_Margin, + $Left_Margin, + $Right_Margin) = $formatPage; + + // Do it! + $PaperSize = 'User_special'; // Don't use any of the predefined sizes + $DocumentPaper='LETTER'; + $DocumentOrientation='P'; // Correccion para la version trunk :( + include('includes/PDFStarter.php'); + if ($Version>="3.12") + $pdf->setPageFormat($formatPage); + $ok = printLabels( + $dimensions, + $lines, + intval($_POST['QtyByItem']), + $_POST['Currency'], + $_POST['SalesType'], + $_POST['StockID']); + + if ($ok) + exit(); // the print was success + else // Has been ocurred an error + $msgErr = _('There were an error. Consult your IT staff'); + } + } +} + +/** + * There is not activated option print, then show the window for capture the printing + * options. + */ + +$title = _('Print Price Labels'); +include('includes/header.inc'); + +if ($msgErr!=null) + prnMsg($msgErr,'warn'); + +showLabelOptions(); + +include('includes/footer.inc'); +exit(); + +function showLabelOptions() { + global $allLabels, $decimalplaces, $rootpath, $theme; + $txt = array( + _('Label Sticker Printing'), + _('Select label type'), + _('Number of labels per item'), + _('Price list'), _('Currency'), + _('Category'), _('Update values') + ); + if (!isset($_POST['labelID'])) + $_POST['labelID']=(string)$allLabels->label[0]->id; + $optionLabels = selLabels($_POST['labelID']); + if (!isset($_POST['QtyByItem'])) + $_POST['QtyByItem']=1; + if (!isset($_POST['SalesType'])) + $_POST['SalesType']=$_SESSION['DefaultPriceList']; + $optionSales = selSalesType($_POST['SalesType']); + + if (!isset($_POST['Currency'])) + $_POST['Currency']=$_SESSION['CompanyRecord']['currencydefault']; + $decimalplaces=getDecimalPlaces($_POST['Currency']); + + $optionCurrency = selCurrency($_POST['Currency']); + if (!isset($_POST['Category'])) + $_POST['Category']=''; + $optionsCategory = selCategory($_POST['Category']); + + $tableItems = tableItems($_POST['Category'], $okItems); + + $sendButton = '<br /><div class=centre><input type="submit" name="PrintPDF" value="'. _('Print labels') .'"> + <input type="submit" name="PDFTest" value="'. _('Print labels with borders') .'"></div>'; + $iTxt=0; + + echo '<script type="text/javascript"> + function setAll(all) { + var x=document.getElementById("form1"); + for (var i=0;i<x.length;i++) { + if (x.elements[i].id==\'item\'); + x.elements[i].checked=all.checked; + } + } + </script>'; + + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="">' . ' ' .$txt[$iTxt++].'</p>'; + echo '<form name ="form1" action="'.$_SERVER['PHP_SELF'].'" method="POST" id="form1">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class=selection>'; + echo '<tbody>'; + echo '<tr> + <td class="number">'.$txt[$iTxt++].':</td> + <td><select name="labelID">'. + $optionLabels + .'</select></td> + </tr>'; + echo '<tr> + <td class="number">'.$txt[$iTxt++].':</td> + <td><input type="text" class=number name="QtyByItem" value="'.$_POST['QtyByItem'].'" size="2" + maxlength="4"></td> + </tr>'; + echo '<tr> + <td class="number">'.$txt[$iTxt++].':</td> + <td><select name="SalesType" onChange="ReloadForm(form1.refresh)"> + '.$optionSales.' + </select></td> + </tr>'; + echo '<td class="number">'.$txt[$iTxt++].':</td> + <td><select name="Currency" onChange="ReloadForm(form1.refresh)"> + '.$optionCurrency.' + </select></td> + </tr>'; + echo '<tr> + <td class="number">'.$txt[$iTxt++].':</td> + <td><select name="Category" onChange="ReloadForm(form1.refresh)"> + '.$optionsCategory.' + </select> </td> + </tr>'; + echo '<tr> + <th colspan="2"> + <input type="submit" name="refresh" value="Refresh options"> + </th>'; + echo '<tr> + <td colspan="2"> + '.$tableItems.' + </td> + </tr>'; + + echo '</tbody> + </table> + '.$sendButton.' + </form>'; +} + +function selLabels($type) { + global $allLabels; + $list=array(); + + foreach ($allLabels->label as $label) + $list[(string)$label->id] = (string)$label->description; + + return selectOptions($list, $type); +} + +function selSalesType($type) { + return selectTable("SELECT typeabbrev, sales_type FROM salestypes ORDER BY sales_type", $type); +} + +function selCurrency($curr) { + return selectTable("SELECT currabrev, currency FROM currencies", $curr); +} + +function selCategory(&$categ) { + return selectTable("SELECT categoryid, categorydescription FROM stockcategory ORDER BY categorydescription", $categ); +} + +function selectTable($sql, &$currentKey) { + global $db; + $result = DB_query($sql, $db); + while ($myrow=DB_fetch_row($result)) { + if (empty($currentKey)) + $currentKey=$myrow[0]; + $list[$myrow[0]] = $myrow[1]; + } + DB_free_result($result); + return selectOptions($list, $currentKey); +} + +function selectOptions($list, $currentKey) { + $html=''; + foreach ($list as $key=>$value) { + $xs = ($currentKey==$key) ? " selected":""; + $html .= ' + <option value="'. $key .'"'. $xs .'>'. $value. '</option>'; + } + return $html; +} + +function tableItems($category, &$ok) { + global $db, $decimalplaces; + + if (empty($category)) { + $ok=false; + return noneButton( _('Select a Category') ); + } + $result = getStockItems($category, $_POST['Currency'], $_POST['SalesType']); + if (!DB_num_rows($result)) { + $ok=false; + return noneButton( _('This category has no items to show') ); + } + + $txt=array( + _('Code'), _('Description'), _('Price').'<br>('.$_POST['Currency'].')', + _('All') + ); + $ix=0; + // The table's header + $html= '<table border="0" width="100%"> + <thead> + <tr> + <th>'.$txt[$ix++].'</th> + <th>'.$txt[$ix++].'</th> + <th>'.$txt[$ix++].'</th> + <th colspan="2" align="center">'.$txt[$ix++].' + <input type="checkbox" checked onclick="setAll(this);"> + </th> + </tr> + </thead> + + <tbody>'; + $ok=true; + $odd=true; + while ($myrow=DB_fetch_array($result)) { + $price = number_format($myrow['price'],$decimalplaces); + $oddEven=$odd?"Odd":"Even"; + $odd = !$odd; + $html .= <<<ZZZ + <tr class="{$oddEven}TableRows"> + <td>{$myrow['stockid']}</td> + <td>{$myrow['description']}</td> + <td class="number">{$price}</td> + <td><div class="centre"> + <INPUT type="checkbox" checked name="StockID[{$myrow['stockid']}]" id="item"> + </div> + </td> + <td> </td> + </tr> +ZZZ; + } + return $html . ' + </tbody> + </table> + </div>'; +} + +function noneButton($msg) { + return ' + <div class="centre"> + <INPUT type="button" disabled name="None" value="'. $msg . '"> + </div>'; +} + +/** + * This access to item data includes its price. + * The routine works in two contexts: when only the category is given + * it looks for all the items + */ +function getStockItems($category, $currAbrev, $typeSales, $stockID=false) { + global $db, $today; + if ($stockID!==false) { + $wS= "sm.stockid='$stockID' LIMIT 1"; + } else { + $wS= "sm.categoryid='$category' ORDER BY sm.stockid"; + } + + $sql="SELECT sm.stockid, sm.description, sm.longdescription, sm.barcode, pr.price ". + "FROM stockmaster AS sm LEFT JOIN prices AS pr ON sm.stockid=pr.stockid ". + "AND pr.currabrev = '$currAbrev' " . + "AND pr.typeabbrev= '$typeSales' " . + "AND ('$today' BETWEEN pr.startdate AND pr.enddate) " . + "AND pr.debtorno='' " . + "WHERE $wS"; + + return DB_query($sql, $db); +} + +function getStockData($stockID, $currency, $salesType) { + $result = getStockItems(null, $currency, $salesType, $stockID); + return DB_fetch_array($result); +} + +/** + * Change de scale of data given by points + * Returns two array for the dimension and lines of data + */ +function resizeLabel($label) { + global $DimensionTags, $DataTags; + + //<* Values required from the beggining + $scales=array('pt'=>1, 'in'=>72, 'mm'=>(float)72/25.4, 'cm'=>(float)72/2.54); + + $obj = $label->dimensions; + $unit = (string)$obj->Unit; + if ( array_key_exists($unit , $scales) ) + $factor = $scales[$unit]; + else + abortMsg( _('Unit not defined in scale operation! Correct the template') ); + + $dims = array(); + foreach ($DimensionTags as $iTag=>$tag) { + if ($tag['type']=='n') // it is a data numeric + $dims[$iTag] = round(((float)$obj->$iTag)*$factor, 3); + elseif ($tag['type']=='i') + $dims[$iTag] = (int)$obj->$iTag; + } + + $obj = $label->data; + $line = array(); + $i=0; + foreach ($obj->line as $labelLine) { + $line[$i] = array(); + foreach ($DataTags as $iTag=>$tag) { + if ($tag['type']=='n') // it is a data numeric + $line[$i][$iTag]= round(((float)$labelLine->$iTag)*$factor, 3); + else + $line[$i][$iTag]=(string)$labelLine->$iTag; // field to use in printing data + } + $i++; + } + return array($dims, $line); +} + +/** + * Returns the following data: + * $Page_Width, + * $Page_Height, + * $Top_Margin, + * $Bottom_Margin, + * $Left_Margin, + * $Right_Margin + */ +function getPageDimensions($dimensions) { + $bm =(float)$dimensions['Sh'] - ( (float)$dimensions['Tm'] + + (int)$dimensions['Rows']*(float)$dimensions['He']); + $rm =(float)$dimensions['Sw'] - ( (float)$dimensions['Lm'] + + (int)$dimensions['Cols']*(float)$dimensions['Wi']); + return array( + (float)$dimensions['Sw'], + (float)$dimensions['Sh'], + (float)$dimensions['Tm'], 0, +// ($bm>0?$bm:0), + (float)$dimensions['Lm'], 0 +// ($rm>0?$rm:0) + ); +} + +function printLabels($dimensions, $lines, $qtyByItem, $currency, $salesType, $stockIDList) { + global $pdf, $decimalplaces, $Version; + $row = $col = 0; + + $decimalplaces=getDecimalPlaces($currency); + + foreach ($stockIDList as $stockID=>$on) { // At least there is one item + $itemData = getStockData($stockID, $currency, $salesType); + $num=$qtyByItem; + while ($num-- > 0) { // Print $num labels per item + printStockid($itemData, $dimensions, $lines, $currency, $row, $col); + if (++$col>=$dimensions['Cols']) { + $col=0; + if (++$row>=$dimensions['Rows']) { + $row=0; + $pdf->newpage(); + } + } + } + } + /* if ($row OR $col) // it seems to be unnecesary. + $pdf->newpage(); */ + + // now, emit the PDF file (if not errors!) + if ($Version>="3.12") { + $pdf->OutputD($_SESSION['DatabaseName'] . '_Labels_' . date('Y-m-d') . '.pdf');//UldisN + $pdf->__destruct(); //UldisN + } else { + $pdfcode = $pdf->output(); + $len = strlen($pdfcode); + + if ($len<=20){ + return false; + } else{ + header('Content-type: application/pdf'); + header('Content-Length: ' . $len); + header('Content-Disposition: inline; filename=Labels.pdf'); + header('Expires: 0'); + header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + header('Pragma: public'); + + $pdf->Stream(); + } + } + return true; // All fine!! +} + +/*! \brief The heart of the program (perhaps the liver) + * + * It shows the data label from the input $data as update data (id read only) + * if the third parameter is true or a fresh data label (new label). It is + * possible that the combination $data valid and $readonly false occurs when + * invalid data needs to be recaptured because an error in a new label capture. + */ +function printStockid($itemData, $labelDim, $dataParams, $currency, $row, $col) { + global $pdf, $decimalplaces; +//echo $row.':'.$col.'<br>'; + // Calculate the bottom left corner position + $iX = $labelDim['Lm'] + $col * $labelDim['Cw']; + $iY = $labelDim['Sh'] - ($labelDim['Tm'] + ($row+1) * $labelDim['Rh']); + + if (isset($_POST['PDFTest'])) { + $pdf->line($iX, $iY+$labelDim['He'], $iX+$labelDim['Wi'], $iY+$labelDim['He']); // top + $pdf->line($iX, $iY, $iX+$labelDim['Wi'], $iY); // bottom + $pdf->line($iX, $iY, $iX, $iY+$labelDim['He']); // left + $pdf->line($iX+$labelDim['Wi'], $iY, $iX+$labelDim['Wi'], $iY+$labelDim['He']); + } + // Now, for every data, write down the correspondig text + $descrip= $ldescrip=''; + foreach ($dataParams as $line) { + unset($resid); // unlink the previous residue + unset($txt); + $adj='left'; + switch ($line['dat']) { + case 'code': + $txt = $itemData['stockid']; + break; + case 'name1': + $txt = $itemData['description']; + $resid = &$descrip; + break; + case 'name2': + $txt = $descrip; + unset($descrip); + break; + case 'lname1': + $txt = $itemData['longdescription']; + $resid = &$ldescrip; + break; + case 'lname2': + $txt = $ldescrip; + unset($ldescrip); + break; + case 'price': + $txt = number_format($itemData['price'], $decimalplaces). ' '. $currency; +// $adj='left'; + break; + case 'bcode': break; + } + $ix = $iX + $line['pos']; + $iy = $iY + $line['row']; + if (isset($txt)) { + $resid = $pdf->addTextWrap($ix,$iy,$line['max'],$line['font'],$txt, $adj); + } + } +} + +function getDecimalPlaces($currency) { + global $db; + $sql="SELECT decimalplaces FROM currencies WHERE currabrev='$currency'"; + $result = DB_query($sql, $db); + if (!DB_num_rows($result)) + abortMsg(_('Couldnt get the currency data')); + $myrow=DB_fetch_row($result); + return $myrow[0]; +} +?> Added: trunk/companies/weberpdemo/reportwriter/labels.xml =================================================================== --- trunk/companies/weberpdemo/reportwriter/labels.xml (rev 0) +++ trunk/companies/weberpdemo/reportwriter/labels.xml 2010-10-25 18:53:44 UTC (rev 4106) @@ -0,0 +1,2 @@ +<?xml version="1.0"?> +<labels><label><id>111-price</id><description>111-CodePrice</description><dimensions><Unit>mm</Unit><Rows>12</Rows><Cols>10</Cols><Sh>162</Sh><Sw>196</Sw><He>12</He><Wi>18</Wi><Tm>3</Tm><Lm>3</Lm><Rh>12.5</Rh><Cw>18.5</Cw></dimensions><data><line><row>7</row><pos>1</pos><max>15</max><font>2</font><dat>code</dat></line><line><row>2</row><pos>1</pos><max>15</max><font>2</font><dat>price</dat></line></data></label><label><id>130-price</id><description>130-CodePrice</description><dimensions><Unit>mm</Unit><Rows>8</Rows><Cols>6</Cols><Sh>170</Sh><Sw>205</Sw><He>18</He><Wi>31</Wi><Tm>3</Tm><Lm>2</Lm><Rh>20.5</Rh><Cw>33.5</Cw></dimensions><data><line><row>13</row><pos>2</pos><max>27</max><font>4</font><dat>code</dat></line><line><row>5</row><pos>2</pos><max>27</max><font>4</font><dat>price</dat></line></data></label></labels> Added: trunk/css/labelsDim.png =================================================================== --- trunk/css/labelsDim.png (rev 0) +++ trunk/css/labelsDim.png 2010-10-25 18:53:44 UTC (rev 4106) @@ -0,0 +1,108 @@ +\x89PNG + + |
From: <tim...@us...> - 2010-10-25 19:43:37
|
Revision: 4107 http://web-erp.svn.sourceforge.net/web-erp/?rev=4107&view=rev Author: tim_schofield Date: 2010-10-25 19:43:30 +0000 (Mon, 25 Oct 2010) Log Message: ----------- ChenJohn: class.pdf.php - correctly display some html encoded special characters, to make them human readeable in pdf file. Modified Paths: -------------- trunk/doc/Change.log.html trunk/includes/class.pdf.php Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-25 18:53:44 UTC (rev 4106) +++ trunk/doc/Change.log.html 2010-10-25 19:43:30 UTC (rev 4107) @@ -1,10 +1,11 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> <p>25/10/10 Marcos Garcia Trejo: New labelprinting functionality </p> -<p>23/10/10 Phil: PurchData.php - search by name failed concatenation of SQL stuffed now repaired. +<p>25/10/10 ChenJohn: class.pdf.php - correctly display some html encoded special characters, to make them human readeable in pdf file.</p> +<p>23/10/10 Phil: PurchData.php - search by name failed concatenation of SQL stuffed now repaired.</p> <p>20/10/10 Paul: MiscFunctions.js - Bug #3060329. Correct condition check. [allows the calendar to start with the textbox's date]</p> <p>18/10/10 Paul: WorkOrderReceive.php - Bug #3023776. Applied anonymous contribution.</p> -<p>16/10/10 Phil: SupplierInvocie.php fixed for mix up with commits - now shipment charges added correctly and contract charges also +<p>16/10/10 Phil: SupplierInvocie.php fixed for mix up with commits - now shipment charges added correctly and contract charges also</p> <p>14/10/10 Tim: MiscFunctions.php - Fix bug preventing download of ECB rates</p> <p>13/10/10 Tim: WWW_Users.php - Show the last visit date correctly. Fixes bug 3085860</p> <p>09/10/10 Phil: Added xmlrpc_GetStockCategoryList api method</p> Modified: trunk/includes/class.pdf.php =================================================================== --- trunk/includes/class.pdf.php 2010-10-25 18:53:44 UTC (rev 4106) +++ trunk/includes/class.pdf.php 2010-10-25 19:43:30 UTC (rev 4107) @@ -242,7 +242,13 @@ } function addTextWrap($xb, $yb, $w, $h, $txt, $align='J', $border=0, $fill=0) { -// $txt = html_entity_decode($txt); + + //$txt = html_entity_decode($txt); + + //some special characters are html encoded + //this code serves to make them appear human readable in pdf file + $txt = html_entity_decode($txt, ENT_QUOTES, UTF-8); + $this->x = $xb; $this->y = $this->h - $yb - $h; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2010-10-26 07:44:00
|
Revision: 4108 http://web-erp.svn.sourceforge.net/web-erp/?rev=4108&view=rev Author: daintree Date: 2010-10-26 07:43:54 +0000 (Tue, 26 Oct 2010) Log Message: ----------- Upgrade script to v4 Modified Paths: -------------- trunk/SalesCategories.php Added Paths: ----------- trunk/Z_Upgrade_3.11-4.00.php Modified: trunk/SalesCategories.php =================================================================== --- trunk/SalesCategories.php 2010-10-25 19:43:30 UTC (rev 4107) +++ trunk/SalesCategories.php 2010-10-26 07:43:54 UTC (rev 4108) @@ -170,7 +170,7 @@ // Calculate Path for navigation $CategoryPath = '<a href="'.$_SERVER['PHP_SELF'] . '?' . SID . - '&ParentCategory=0">' . _('Main') . '</a>' . " \\ "; + '&ParentCategory=NULL">' . _('Main') . '</a>' . " \\ "; $TempPath = ''; if (isset($ParentCategory)) { $TmpParentID = $ParentCategory; @@ -178,9 +178,9 @@ $LastParentName = ''; for($Buzy = (isset($TmpParentID) && ($TmpParentID <> '')); - $Buzy == true; - $Buzy = (isset($TmpParentID) && ($TmpParentID <> '')) ) { - $sql = "SELECT parentcatid, salescatname FROM salescat WHERE salescatid='".$TmpParentID."'"; + $Buzy == true; + $Buzy = (isset($TmpParentID) && ($TmpParentID <> '')) ) { + $sql = "SELECT parentcatid, salescatname FROM salescat WHERE salescatid='".$TmpParentID."'"; $result = DB_query($sql,$db); if( $result ) { if (DB_num_rows($result) > 0) { Added: trunk/Z_Upgrade_3.11-4.00.php =================================================================== --- trunk/Z_Upgrade_3.11-4.00.php (rev 0) +++ trunk/Z_Upgrade_3.11-4.00.php 2010-10-26 07:43:54 UTC (rev 4108) @@ -0,0 +1,98 @@ +<?php +/* $Id: $*/ +$PageSecurity = 15; +include('includes/session.inc'); +$title = _('Upgrade webERP 3.11 - 4.00'); +include('includes/header.inc'); + + +if (empty($_POST['DoUpgrade'])){ + prnMsg(_('This script will run perform any modifications to the database since v 3.11 required to allow the additional functionality in version 4.00 scripts'),'info'); + + echo "<p><form method='post' action='" . $_SERVER['PHP_SELF'] . '?' . SID . "'>"; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<div class="centre"?><input type=submit name=DoUpgrade VALUE="' . _('Perform Upgrade') . '"></div>'; + echo '</form>'; +} + +if ($_POST['DoUpgrade'] == _('Perform Upgrade')){ + + echo '<br>'; + prnMsg(_('If there are any failures then please check with your system administrator'). + '. '._('Please read all notes carefully to ensure they are expected'),'info'); + + $SQLScriptFile = file('./sql/mysql/upgrade3.11.1-4.00.sql'); + + $ScriptFileEntries = sizeof($SQLScriptFile); + $ErrMsg = _('The script to upgrade the database failed because'); + $sql =''; + $InAFunction = false; + echo '<br><table>'; + for ($i=0; $i<=$ScriptFileEntries; $i++) { + + $SQLScriptFile[$i] = trim($SQLScriptFile[$i]); + + if (substr($SQLScriptFile[$i], 0, 2) == '--') { + $comment=substr($SQLScriptFile[$i], 2); + } + + if (substr($SQLScriptFile[$i], 0, 2) != '--' + AND substr($SQLScriptFile[$i], 0, 3) != 'USE' + AND strstr($SQLScriptFile[$i],'/*')==FALSE + AND strlen($SQLScriptFile[$i])>1){ + + $sql .= ' ' . $SQLScriptFile[$i]; + + //check if this line kicks off a function definition - pg chokes otherwise + if (substr($SQLScriptFile[$i],0,15) == 'CREATE FUNCTION'){ + $InAFunction = true; + } + //check if this line completes a function definition - pg chokes otherwise + if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ + $InAFunction = false; + } + if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + $sql = substr($sql,0,strlen($sql)-1); + $result = DB_query($sql, $db, $ErrMsg, $DBMsg, false, false); + switch (DB_error_no($db)) { + case 0: + echo '<tr><td>'.$comment.'</td><td bgcolor="green">'._('Success').'</td></tr>'; + break; + case 1050: + echo '<tr><td>'.$comment.'</td><td bgcolor="yellow">'._('Note').' - '. + _('Table has already been created').'</td></tr>'; + break; + case 1060: + echo '<tr><td>'.$comment.'</td><td bgcolor="yellow">'._('Note').' - '. + _('Column has already been created').'</td></tr>'; + break; + case 1061: + echo '<tr><td>'.$comment.'</td><td bgcolor="yellow">'._('Note').' - '. + _('Index already exists').'</td></tr>'; + break; + case 1062: + echo '<tr><td>'.$comment.'</td><td bgcolor="yellow">'._('Note').' - '. + _('Entry has already been done').'</td></tr>'; + break; + case 1068: + echo '<tr><td>'.$comment.'</td><td bgcolor="yellow">'._('Note').' - '. + _('Primary key already exists').'</td></tr>'; + break; + default: + echo '<tr><td>'.$comment.'</td><td bgcolor="red">'._('Failure').' - '. + _('Error number').' - '.DB_error_no($db) .'</td></tr>'; + break; + } + unset($sql); + } + + } //end if its a valid sql line not a comment + } //end of for loop around the lines of the sql script + echo '</table>'; + + /*Now run the data conversions required. */ + +} /*Dont do upgrade */ + +include('includes/footer.inc'); +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2010-10-26 08:09:40
|
Revision: 4109 http://web-erp.svn.sourceforge.net/web-erp/?rev=4109&view=rev Author: daintree Date: 2010-10-26 08:09:34 +0000 (Tue, 26 Oct 2010) Log Message: ----------- Currencies manual Modified Paths: -------------- trunk/SupplierInvoice.php trunk/doc/Manual/ManualCurrencies.html Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2010-10-26 07:43:54 UTC (rev 4108) +++ trunk/SupplierInvoice.php 2010-10-26 08:09:34 UTC (rev 4109) @@ -959,21 +959,21 @@ /* Now the TAX account */ if ($Tax->TaxOvAmount <>0){ $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES (20, - '" . $InvoiceNo . "', - '" . $SQLInvoiceDate . "', - '" . $PeriodNo . "', - '" . $Tax->TaxGLCode . "', - '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('Inv') . ' ' . - $_SESSION['SuppTrans']->SuppReference . ' ' . $Tax->TaxAuthDescription . ' ' . number_format($Tax->TaxRate*100,2) . '% ' . $_SESSION['SuppTrans']->CurrCode . - $Tax->TaxOvAmount . ' @ ' . _('exch rate') . ' ' . $_SESSION['SuppTrans']->ExRate . "', - '" . round( $Tax->TaxOvAmount/ $_SESSION['SuppTrans']->ExRate,2) . "')"; + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (20, + '" . $InvoiceNo . "', + '" . $SQLInvoiceDate . "', + '" . $PeriodNo . "', + '" . $Tax->TaxGLCode . "', + '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('Inv') . ' ' . + $_SESSION['SuppTrans']->SuppReference . ' ' . $Tax->TaxAuthDescription . ' ' . number_format($Tax->TaxRate*100,2) . '% ' . $_SESSION['SuppTrans']->CurrCode . + $Tax->TaxOvAmount . ' @ ' . _('exch rate') . ' ' . $_SESSION['SuppTrans']->ExRate . "', + '" . round( $Tax->TaxOvAmount/ $_SESSION['SuppTrans']->ExRate,2) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction for the tax could not be added because'); @@ -986,22 +986,22 @@ /* Now the control account */ $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES (20, - '" . $InvoiceNo . "', - '" . $SQLInvoiceDate . "', - '" . $PeriodNo . "', - '" . $_SESSION['SuppTrans']->CreditorsAct . "', - '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('Inv') . ' ' . - $_SESSION['SuppTrans']->SuppReference . ' ' . $_SESSION['SuppTrans']->CurrCode . - number_format( $_SESSION['SuppTrans']->OvAmount + $TaxTotal,2) . - ' @ ' . _('a rate of') . ' ' . $_SESSION['SuppTrans']->ExRate . "', - '" . -round(($LocalTotal + ( $TaxTotal / $_SESSION['SuppTrans']->ExRate)),2) . "')"; + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (20, + '" . $InvoiceNo . "', + '" . $SQLInvoiceDate . "', + '" . $PeriodNo . "', + '" . $_SESSION['SuppTrans']->CreditorsAct . "', + '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('Inv') . ' ' . + $_SESSION['SuppTrans']->SuppReference . ' ' . $_SESSION['SuppTrans']->CurrCode . + number_format( $_SESSION['SuppTrans']->OvAmount + $TaxTotal,2) . + ' @ ' . _('a rate of') . ' ' . $_SESSION['SuppTrans']->ExRate . "', + '" . -round(($LocalTotal + ( $TaxTotal / $_SESSION['SuppTrans']->ExRate)),2) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction for the control total could not be added because'); @@ -1014,26 +1014,26 @@ /*Now insert the invoice into the SuppTrans table*/ $SQL = "INSERT INTO supptrans (transno, - type, - supplierno, - suppreference, - trandate, - duedate, - ovamount, - ovgst, - rate, - transtext) - VALUES ( - '". $InvoiceNo . "', - 20 , - '" . $_SESSION['SuppTrans']->SupplierID . "', - '" . $_SESSION['SuppTrans']->SuppReference . "', - '" . $SQLInvoiceDate . "', - '" . FormatDateForSQL($_SESSION['SuppTrans']->DueDate) . "', - '" . round($_SESSION['SuppTrans']->OvAmount,2) . "', - '" . round($TaxTotal,2) . "', - '" . $_SESSION['SuppTrans']->ExRate . "', - '" . $_SESSION['SuppTrans']->Comments . "')"; + type, + supplierno, + suppreference, + trandate, + duedate, + ovamount, + ovgst, + rate, + transtext) + VALUES ( + '". $InvoiceNo . "', + 20 , + '" . $_SESSION['SuppTrans']->SupplierID . "', + '" . $_SESSION['SuppTrans']->SuppReference . "', + '" . $SQLInvoiceDate . "', + '" . FormatDateForSQL($_SESSION['SuppTrans']->DueDate) . "', + '" . 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'); @@ -1047,12 +1047,12 @@ foreach ($_SESSION['SuppTrans']->Taxes AS $TaxTotals) { $SQL = "INSERT INTO supptranstaxes (supptransid, - taxauthid, - taxamount) - VALUES ( - '" . $SuppTransID . "', - '" . $TaxTotals->TaxAuthID . "', - '" . $TaxTotals->TaxOvAmount . "')"; + taxauthid, + taxamount) + VALUES ( + '" . $SuppTransID . "', + '" . $TaxTotals->TaxAuthID . "', + '" . $TaxTotals->TaxOvAmount . "')"; $ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The supplier transaction taxes records could not be inserted because'); $DbgMsg = _('The following SQL to insert the supplier transaction taxes record was used:'); Modified: trunk/doc/Manual/ManualCurrencies.html =================================================================== --- trunk/doc/Manual/ManualCurrencies.html 2010-10-26 07:43:54 UTC (rev 4108) +++ trunk/doc/Manual/ManualCurrencies.html 2010-10-26 08:09:34 UTC (rev 4109) @@ -5,20 +5,12 @@ <br><br> Any number of currencies can be defined in webERP. Every currency that is transacted with either in sales (AR) or purchasing (AP) needs to be defined in the system. To define currencies go to the Setup tab -> General -> Currency Maintenance. Only a few fields are required to be completed for each currency defined: <ul> -<li>The ISO 4217 code for the currency - this is the international standard 3 character code that is used worldwide to represent the currency. If the code entered exists then it is possible for webERP to retrieve exchange rates from either the European Central Bank or -<br><br> -Credit Status Ratings can be amended and created from the main menu set up tab from the link labelled Credit Status Maintenance. -<br><br> -<font size="+1"><b>Status Code</b></font> -<br><br> -This is any number from 1 to 100. A rating code is required to be held against every customer to identify the credit status of each. The code cannot be changed retrospectively. -<br><br> -<font size="+1"><b>Status Description</b></font> -<br><br> -This field is used in look ups both in the customers amendment/entry and also in the customer selection screen. This is a text field up to 30 characters long. -<br><br> -<font size="+1"><b>Disallow Invoices</b></font> -<br><br> -For all credit ratings set up, this field indicates whether or not the rating is serious enough to prohibit future invoicing to customers set up with this credit rating. +<li>The ISO 4217 code for the currency - this is the international standard 3 character code that is used worldwide to represent the currency. If the code entered exists then it is possible for webERP to retrieve exchange rates from either the European Central Bank. webERP is capable of updating exchange rates daily from the ECB if set to do so under Setup->Configuration. +</li> +<li>The name of the currency can be any description that describes the currency</li> +<lI>The country of the currency can be entered</li> +<li>The name of 100th of a single unit of the currency can be entered. e.g. pence for GBP or cents for USD</li> +<li>The rate. This must be the number of the local currency that can be purchased with one of this currency.</li> +</ul> <!-- Help End: Currencies --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |