|
From: <dai...@us...> - 2012-05-22 08:22:57
|
Revision: 5385
http://web-erp.svn.sourceforge.net/web-erp/?rev=5385&view=rev
Author: daintree
Date: 2012-05-22 08:22:49 +0000 (Tue, 22 May 2012)
Log Message:
-----------
fix labels on WO Status
Modified Paths:
--------------
trunk/PDFPrintLabel.php
trunk/WorkOrderEntry.php
trunk/WorkOrderStatus.php
trunk/doc/Change.log
trunk/includes/session.inc
trunk/includes/tcpdf/CHANGELOG.TXT
trunk/includes/tcpdf/README.TXT
trunk/includes/tcpdf/tcpdf.php
trunk/index.php
trunk/sql/mysql/upgrade4.07-4.08.sql
Modified: trunk/PDFPrintLabel.php
===================================================================
--- trunk/PDFPrintLabel.php 2012-05-22 08:12:20 UTC (rev 5384)
+++ trunk/PDFPrintLabel.php 2012-05-22 08:22:49 UTC (rev 5385)
@@ -180,6 +180,10 @@
$pdf->addInfo('Title', $LabelDimensions['description'] . ' ' . _('Price Labels') );
$pdf->addInfo('Subject', $LabelDimensions['description'] . ' ' . _('Price Labels') );
+ $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+ $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+ $pdf->setPrintHeader(false);
+ $pdf->setPrintFooter(false);
$style = array(
'position' => '',
@@ -187,7 +191,7 @@
'stretch' => false,
'fitwidth' => true,
'cellfitalign' => '',
- 'border' => false,
+ 'border' => true,
'hpadding' => 'auto',
'vpadding' => 'auto',
'fgcolor' => array(0,0,0),
@@ -203,7 +207,7 @@
$XPos = $Left_Margin; // left of current label
for ($i=0;$i < $_POST['NoOfLabels'];$i++){
- if ($_POST['PrintLabel'.$i]=='on'){
+ if (isset($_POST['PrintLabel'.$i])){
$NoOfLabels--;
foreach ($LabelFields as $Field){
//print_r($Field);
@@ -224,8 +228,12 @@
/* write1DBarcode($code, $type, $x='', $y='', $w='', $h='', $xres='', $style='', $align='')
* Note that the YPos for this function is based on the opposite origin for the Y axis i.e from the bottom not from the top!
*/
-
- $pdf->write1DBarcode(str_replace('_','',$Value), 'C39',$XPos+$Field['HPos'],$Page_Height - $YPos+$LabelDimensions['label_height']-$Field['VPos']-$Field['FontSize'],$LabelDimensions['label_width']-$Field['HPos'], $Field['FontSize'], 0.4, $style, 'N');
+ //$BarcodeFileName = $_SERVER['DOCUMENT_ROOT'] . $rootpath . '/' . $_SESSION['reports_dir'] .'/barcode_' . $i . '.jpg';
+ //Barcode39(str_replace('_', $Value),$BarcodeFileName, $LabelDimensions['label_width']-$Field['HPos']-$Left_Margin,$Field['FontSize']);
+ //$pdf->addJpegFromFile($BarcodeFileName, $XPos+$Field['HPos'],$YPos-$LabelDimensions['label_height']+$Field['VPos']);
+ //$pdf->Image('@' . , $XPos+$Field['HPos'], $Page_Height-($YPos+$LabelDimensions['label_height']-$Field['VPos']), $LabelDimensions['label_width']-$Field['HPos']-$Left_Margin, $Field['FontSize']);
+
+ $pdf->write1DBarcode(str_replace('_','',$Value), 'C39E',$XPos+$Field['HPos'],$Page_Height - $YPos+$LabelDimensions['label_height']-$Field['VPos']-$Field['FontSize'],$LabelDimensions['label_width']-$Field['HPos'], 40, 1, $style, 'N');
} else {
$LeftOvers = $pdf->addTextWrap($XPos+$Field['HPos'],$YPos-$LabelDimensions['label_height']+$Field['VPos'],$LabelDimensions['label_width']-$Field['HPos']-20,$Field['FontSize'],$Value);
}
@@ -261,7 +269,7 @@
$FileName=$_SESSION['DatabaseName']. '_' . _('Price_Labels') . '_' . date('Y-m-d').'.pdf';
ob_clean();
- $pdf->OutputD($FileName);
+ $pdf->OutputI($FileName);
$pdf->__destruct();
} else { /*The option to print PDF was not hit */
@@ -358,4 +366,179 @@
} /*end of else not PrintPDF */
+function Barcode39 ($barcode, $FileName='',$width=160, $height=80, $text='') {
+
+ /* Generate a Code 3 of 9 barcode */
+
+ $im = ImageCreate ($width, $height)
+ or die ("Cannot Initialize new GD image stream");
+ $White = ImageColorAllocate ($im, 255, 255, 255);
+ $Black = ImageColorAllocate ($im, 0, 0, 0);
+ //ImageColorTransparent ($im, $White);
+ ImageInterLace ($im, 1);
+
+ $NarrowRatio = 20;
+ $WideRatio = 55;
+ $QuietRatio = 35;
+
+ $nChars = (strlen($barcode)+2) * ((6 * $NarrowRatio) + (3 * $WideRatio) + ($QuietRatio));
+ $Pixels = $width / $nChars;
+ $NarrowBar = (int)(20 * $Pixels);
+ $WideBar = (int)(55 * $Pixels);
+ $QuietBar = (int)(35 * $Pixels);
+
+ $ActualWidth = (($NarrowBar * 6) + ($WideBar*3) + $QuietBar) * (strlen ($barcode)+2);
+
+ if (($NarrowBar == 0) || ($NarrowBar == $WideBar) || ($NarrowBar == $QuietBar) || ($WideBar == 0) || ($WideBar == $QuietBar) || ($QuietBar == 0)) {
+ ImageString ($im, 1, 0, 0, "Image is too small!", $Black);
+ ImageJPEG ($im, $FileName, 100);
+ exit;
+ }
+
+ $CurrentBarX = (int)(($width - $ActualWidth) / 2);
+ $Color = $White;
+ $BarcodeFull = "*".strtoupper ($barcode)."*";
+ settype ($BarcodeFull, "string");
+
+ $FontNum = 3;
+ $FontHeight = ImageFontHeight ($FontNum);
+ $FontWidth = ImageFontWidth ($FontNum);
+ if ($text != 0) {
+ $CenterLoc = (int)(($width-1) / 2) - (int)(($FontWidth * strlen($BarcodeFull)) / 2);
+ ImageString ($im, $FontNum, $CenterLoc, $height-$FontHeight, "$BarcodeFull", $Black);
+ } else {
+ $FontHeight=-2;
+ }
+
+
+ for ($i=0; $i<strlen($BarcodeFull); $i++) {
+ $StripeCode = Code39 ($BarcodeFull[$i]);
+
+ for ($n=0; $n < 9; $n++) {
+ if ($Color == $White){
+ $Color = $Black;
+ } else {
+ $Color = $White;
+ }
+
+ switch ($StripeCode[$n]) {
+ case '0':
+ ImageFilledRectangle ($im, $CurrentBarX, 0, $CurrentBarX+$NarrowBar, $height-1-$FontHeight-2, $Color);
+ $CurrentBarX += $NarrowBar;
+ break;
+
+ case '1':
+ ImageFilledRectangle ($im, $CurrentBarX, 0, $CurrentBarX+$WideBar, $height-1-$FontHeight-2, $Color);
+ $CurrentBarX += $WideBar;
+ break;
+ }
+ }
+
+ $Color = $White;
+ ImageFilledRectangle ($im, $CurrentBarX, 0, $CurrentBarX+$QuietBar, $height-1-$FontHeight-2, $Color);
+ $CurrentBarX += $QuietBar;
+ } //end loop around each character in barcode string
+
+ imagejpeg ($im, $FileName, 100);
+}//end Barcode39
+
+//-----------------------------------------------------------------------------
+// Returns the Code 3 of 9 value for a given ASCII character
+//-----------------------------------------------------------------------------
+function Code39 ($Asc) {
+ switch ($Asc) {
+ case ' ':
+ return "011000100";
+ case '$':
+ return "010101000";
+ case '%':
+ return "000101010";
+ case '*':
+ return "010010100"; // * Start/Stop
+ case '+':
+ return "010001010";
+ case '|':
+ return "010000101";
+ case '.':
+ return "110000100";
+ case '/':
+ return "010100010";
+ case '-':
+ return "010000101";
+ case '0':
+ return "000110100";
+ case '1':
+ return "100100001";
+ case '2':
+ return "001100001";
+ case '3':
+ return "101100000";
+ case '4':
+ return "000110001";
+ case '5':
+ return "100110000";
+ case '6':
+ return "001110000";
+ case '7':
+ return "000100101";
+ case '8':
+ return "100100100";
+ case '9':
+ return "001100100";
+ case 'A':
+ return "100001001";
+ case 'B':
+ return "001001001";
+ case 'C':
+ return "101001000";
+ case 'D':
+ return "000011001";
+ case 'E':
+ return "100011000";
+ case 'F':
+ return "001011000";
+ case 'G':
+ return "000001101";
+ case 'H':
+ return "100001100";
+ case 'I':
+ return "001001100";
+ case 'J':
+ return "000011100";
+ case 'K':
+ return "100000011";
+ case 'L':
+ return "001000011";
+ case 'M':
+ return "101000010";
+ case 'N':
+ return "000010011";
+ case 'O':
+ return "100010010";
+ case 'P':
+ return "001010010";
+ case 'Q':
+ return "000000111";
+ case 'R':
+ return "100000110";
+ case 'S':
+ return "001000110";
+ case 'T':
+ return "000010110";
+ case 'U':
+ return "110000001";
+ case 'V':
+ return "011000001";
+ case 'W':
+ return "111000000";
+ case 'X':
+ return "010010001";
+ case 'Y':
+ return "110010000";
+ case 'Z':
+ return "011010000";
+ default:
+ return "011000100";
+ }
+}
?>
\ No newline at end of file
Modified: trunk/WorkOrderEntry.php
===================================================================
--- trunk/WorkOrderEntry.php 2012-05-22 08:12:20 UTC (rev 5384)
+++ trunk/WorkOrderEntry.php 2012-05-22 08:22:49 UTC (rev 5385)
@@ -30,13 +30,13 @@
}
foreach ($_POST as $key=>$value) {
- if (substr($key, 0, 9)=='OutputQty' or substr($key, 0, 7)=='RecdQty') {
+ if (substr($key, 0, 9)=='OutputQty' OR substr($key, 0, 7)=='RecdQty') {
$_POST[$key] = filter_number_format($value);
}
}
// check for new or modify condition
-if (isset($_REQUEST['WO']) and $_REQUEST['WO']!=''){
+if (isset($_REQUEST['WO']) AND$_REQUEST['WO']!=''){
// modify
$_POST['WO'] = $_REQUEST['WO'];
$EditingExisting = true;
@@ -269,7 +269,7 @@
} //adding a new item to the work order
-if (isset($_POST['submit']) or isset($_POST['Search'])) { //The update button has been clicked
+if (isset($_POST['submit']) OR isset($_POST['Search'])) { //The update button has been clicked
echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') .'">' . _('Enter a new work order') . '</a>';
echo '<br /><a href="' . $rootpath . '/SelectWorkOrder.php">' . _('Select an existing work order') . '</a>';
@@ -316,10 +316,10 @@
if (!isset($_POST['NextLotSNRef'.$i])) {
$_POST['NextLotSNRef'.$i]='';
}
- if (isset($_POST['QtyRecd'.$i]) and $_POST['QtyRecd'.$i]>$_POST['OutputQty'.$i]){
+ if (isset($_POST['QtyRecd'.$i]) AND $_POST['QtyRecd'.$i]>$_POST['OutputQty'.$i]){
$_POST['OutputQty'.$i]=$_POST['QtyRecd'.$i]; //OutputQty must be >= Qty already reced
}
- if ($_POST['RecdQty'.$i]==0 AND (!isset($_POST['HasWOSerialNos'.$i]) or $_POST['HasWOSerialNos'.$i]==false)){
+ if ($_POST['RecdQty'.$i]==0 AND (!isset($_POST['HasWOSerialNos'.$i]) OR $_POST['HasWOSerialNos'.$i]==false)){
/* can only change location cost if QtyRecd=0 */
$CostResult = DB_query("SELECT SUM((materialcost+labourcost+overheadcost)*bom.quantity) AS cost
FROM stockmaster
@@ -340,7 +340,7 @@
stdcost ='" . $Cost . "'
WHERE wo='" . $_POST['WO'] . "'
AND stockid='" . $_POST['OutputItem'.$i] . "'";
- } elseif (isset($_POST['HasWOSerialNos'.$i]) and $_POST['HasWOSerialNos'.$i]==false) {
+ } elseif (isset($_POST['HasWOSerialNos'.$i]) AND $_POST['HasWOSerialNos'.$i]==false) {
$sql[] = "UPDATE woitems SET qtyreqd = '". $_POST['OutputQty' . $i] . "',
nextlotsnref = '". $_POST['NextLotSNRef'.$i] ."'
WHERE wo='" . $_POST['WO'] . "'
@@ -689,7 +689,7 @@
}#end if SearchResults to show
-if (!isset($_GET['NewItem']) or $_GET['NewItem']=='') {
+if (!isset($_GET['NewItem']) OR $_GET['NewItem']=='') {
echo '<script>defaultControl(document.forms[0].StockCode);</script>';
} else {
echo '<script>defaultControl(document.forms[0].OutputQty"'.$_GET['Line'].'");</script>';
Modified: trunk/WorkOrderStatus.php
===================================================================
--- trunk/WorkOrderStatus.php 2012-05-22 08:12:20 UTC (rev 5384)
+++ trunk/WorkOrderStatus.php 2012-05-22 08:22:49 UTC (rev 5385)
@@ -65,27 +65,9 @@
<td class="number">' . locale_number_format($WORow['qtyrecd'],$WORow['decimalplaces']) . '</td>
<td colspan="2">' . $WORow['units'] . '</td>
</tr>
- <tr>
- <td class="label">' . _('Date Material Issued') . ':</td>
- <td>' . Date($_SESSION['DefaultDateFormat']) . '</td>
- <td class="label">' . _('Issued From') . ':</td>
- <td>';
+ </table>
+ <br />';
- if (!isset($_POST['FromLocation'])){
- $_POST['FromLocation']=$WORow['loccode'];
- }
- $LocResult = DB_query("SELECT loccode, locationname
- FROM locations
- WHERE loccode='" . $_POST['FromLocation'] . "'",
- $db);
- $LocRow = DB_fetch_array($LocResult);
- echo $LocRow['locationname'];
-
- echo '</td>
- </tr>
- </table>
- <br />';
-
//set up options for selection of the item to be issued to the WO
echo '<table class="selection">
<tr>
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2012-05-22 08:12:20 UTC (rev 5384)
+++ trunk/doc/Change.log 2012-05-22 08:22:49 UTC (rev 5385)
@@ -1,5 +1,6 @@
webERP Change Log
+22/5/2012 Phil Klaus's spot - removed issue location (must always be the same as the manufacture location) and the issued date from WorkOrderStatus.php form - as materials could be issued on many different dates and incorrect to say they are always issued on the current date
20/5/2012 Klaus Beucher (Opto): move leadtime calculation into levelnetting function and resolve bug which does not use leadtime for highest level items of a BOM see also http://www.weberp.org/forum/showthread.php?tid=203
18/5/2012 Ahmed: Fixed bugs that the offer cannot store more than one item and remove function does not work in SupplierTenders.php and DefineOfferClass.php
18/5/2012 Ahmed.Fawzy: Fixed Branch code validation rule to rule out '-' in CustomerBranches.php.
Modified: trunk/includes/session.inc
===================================================================
--- trunk/includes/session.inc 2012-05-22 08:12:20 UTC (rev 5384)
+++ trunk/includes/session.inc 2012-05-22 08:22:49 UTC (rev 5385)
@@ -78,7 +78,7 @@
include $PathPrefix . 'includes/UserLogin.php'; /* Login checking and setup */
- if (isset($_POST['UserNameEntryField']) and isset($_POST['Password'])) {
+ if (isset($_POST['UserNameEntryField']) AND isset($_POST['Password'])) {
$rc = userLogin($_POST['UserNameEntryField'], $_POST['Password'], $db);
} elseif (empty($_SESSION['DatabaseName'])) {
$rc = UL_SHOWLOGIN;
Modified: trunk/includes/tcpdf/CHANGELOG.TXT
===================================================================
--- trunk/includes/tcpdf/CHANGELOG.TXT 2012-05-22 08:12:20 UTC (rev 5384)
+++ trunk/includes/tcpdf/CHANGELOG.TXT 2012-05-22 08:22:49 UTC (rev 5385)
@@ -1,3 +1,8 @@
+5.9.161 (2012-05-09)
+ - A bug on XREF table was fixed (Bug ID: 3525051).
+ - Deprecated Imagick:clone was replaced.
+ - Method objclone() was fixed for PHP4.
+
5.9.160 (2012-05-03)
- A bug on tcpdf_parser.php was fixed.
Modified: trunk/includes/tcpdf/README.TXT
===================================================================
--- trunk/includes/tcpdf/README.TXT 2012-05-22 08:12:20 UTC (rev 5384)
+++ trunk/includes/tcpdf/README.TXT 2012-05-22 08:22:49 UTC (rev 5385)
@@ -8,8 +8,8 @@
------------------------------------------------------------
Name: TCPDF
-Version: 5.9.160
-Release date: 2012-05-03
+Version: 5.9.161
+Release date: 2012-05-09
Author: Nicola Asuni
Copyright (c) 2002-2012:
Modified: trunk/includes/tcpdf/tcpdf.php
===================================================================
--- trunk/includes/tcpdf/tcpdf.php 2012-05-22 08:12:20 UTC (rev 5384)
+++ trunk/includes/tcpdf/tcpdf.php 2012-05-22 08:22:49 UTC (rev 5385)
@@ -1,9 +1,9 @@
<?php
//============================================================+
// File name : tcpdf.php
-// Version : 5.9.160
+// Version : 5.9.161
// Begin : 2002-08-03
-// Last Update : 2012-05-03
+// Last Update : 2012-05-09
// Author : Nicola Asuni - Tecnick.com LTD - Manor Coach House, Church Hill, Aldershot, Hants, GU12 4RQ, UK - www.tecnick.com - in...@te...
// License : http://www.tecnick.com/pagefiles/tcpdf/LICENSE.TXT GNU-LGPLv3
// -------------------------------------------------------------------
@@ -137,7 +137,7 @@
* Tools to encode your unicode fonts are on fonts/utils directory.</p>
* @package com.tecnick.tcpdf
* @author Nicola Asuni
- * @version 5.9.160
+ * @version 5.9.161
*/
// Main configuration file. Define the K_TCPDF_EXTERNAL_CONFIG constant to skip this file.
@@ -149,7 +149,7 @@
* TCPDF project (http://www.tcpdf.org) has been originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.<br>
* @package com.tecnick.tcpdf
* @brief PHP class for generating PDF documents without requiring external extensions.
- * @version 5.9.160
+ * @version 5.9.161
* @author Nicola Asuni - in...@te...
*/
class TCPDF {
@@ -160,7 +160,7 @@
* Current TCPDF version.
* @private
*/
- private $tcpdf_version = '5.9.160';
+ private $tcpdf_version = '5.9.161';
// Protected properties
@@ -180,9 +180,15 @@
* Array of object offsets.
* @protected
*/
- protected $offsets;
+ protected $offsets = array();
/**
+ * Array of object IDs for each page.
+ * @protected
+ */
+ protected $pageobjects = array();
+
+ /**
* Buffer holding in-memory PDF.
* @protected
*/
@@ -8407,7 +8413,7 @@
$img = new Imagick();
$img->readImage($file);
// clone image object
- $imga = $img->clone();
+ $imga = $this->objclone($img);
// extract alpha channel
$img->separateImageChannel(8); // 8 = (imagick::CHANNEL_ALPHA | imagick::CHANNEL_OPACITY | imagick::CHANNEL_MATTE);
$img->negateImage(true);
@@ -9509,9 +9515,11 @@
$annots .= ' /A <</S /URI /URI '.$this->_datastring($this->unhtmlentities($pl['txt']), $annot_obj_id).'>>';
} else {
// internal link
- $l = $this->links[$pl['txt']];
- if (isset($this->page_obj_id[($l[0])])) {
- $annots .= sprintf(' /Dest [%u 0 R /XYZ 0 %F null]', $this->page_obj_id[($l[0])], ($this->pagedim[$l[0]]['h'] - ($l[1] * $this->k)));
+ if (isset($this->links[$pl['txt']])) {
+ $l = $this->links[$pl['txt']];
+ if (isset($this->page_obj_id[($l[0])])) {
+ $annots .= sprintf(' /Dest [%u 0 R /XYZ 0 %F null]', $this->page_obj_id[($l[0])], ($this->pagedim[$l[0]]['h'] - ($l[1] * $this->k)));
+ }
}
}
$hmodes = array('N', 'I', 'O', 'P');
@@ -12855,11 +12863,14 @@
$this->_out('xref');
$this->_out('0 '.($this->n + 1));
$this->_out('0000000000 65535 f ');
+ $freegen = ($this->n + 2);
for ($i=1; $i <= $this->n; ++$i) {
if (!isset($this->offsets[$i]) AND ($i > 1)) {
- $this->offsets[$i] = $this->offsets[($i - 1)];
+ $this->_out(sprintf('0000000000 %05d f ', $freegen));
+ ++$freegen;
+ } else {
+ $this->_out(sprintf('%010d 00000 n ', $this->offsets[$i]));
}
- $this->_out(sprintf('%010d 00000 n ', $this->offsets[$i]));
}
// TRAILER
$out = 'trailer'."\n";
@@ -12899,6 +12910,7 @@
*/
protected function _beginpage($orientation='', $format='') {
++$this->page;
+ $this->pageobjects[$this->page] = array();
$this->setPageBuffer($this->page, '');
// initialize array for graphics tranformation positions inside a page buffer
$this->transfmrk[$this->page] = array();
@@ -12967,6 +12979,7 @@
$objid = $this->n;
}
$this->offsets[$objid] = $this->bufferlen;
+ $this->pageobjects[$this->page][] = $objid;
return $objid.' 0 obj';
}
@@ -25651,6 +25664,7 @@
$tmpintmrk = $this->intmrk[$frompage];
$tmpbordermrk = $this->bordermrk[$frompage];
$tmpcntmrk = $this->cntmrk[$frompage];
+ $tmppageobjects = $this->pageobjects[$frompage];
if (isset($this->footerpos[$frompage])) {
$tmpfooterpos = $this->footerpos[$frompage];
}
@@ -25686,6 +25700,7 @@
$this->intmrk[$i] = $this->intmrk[$j];
$this->bordermrk[$i] = $this->bordermrk[$j];
$this->cntmrk[$i] = $this->cntmrk[$j];
+ $this->pageobjects[$i] = $this->pageobjects[$j];
if (isset($this->footerpos[$j])) {
$this->footerpos[$i] = $this->footerpos[$j];
} elseif (isset($this->footerpos[$i])) {
@@ -25720,6 +25735,7 @@
$this->intmrk[$topage] = $tmpintmrk;
$this->bordermrk[$topage] = $tmpbordermrk;
$this->cntmrk[$topage] = $tmpcntmrk;
+ $this->pageobjects[$topage] = $tmppageobjects;
if (isset($tmpfooterpos)) {
$this->footerpos[$topage] = $tmpfooterpos;
} elseif (isset($this->footerpos[$topage])) {
@@ -25807,6 +25823,12 @@
unset($this->intmrk[$page]);
unset($this->bordermrk[$page]);
unset($this->cntmrk[$page]);
+ foreach ($this->pageobjects[$page] as $oid) {
+ if (isset($this->offsets[$oid])){
+ unset($this->offsets[$oid]);
+ }
+ }
+ unset($this->pageobjects[$page]);
if (isset($this->footerpos[$page])) {
unset($this->footerpos[$page]);
}
@@ -25841,6 +25863,7 @@
$this->intmrk[$i] = $this->intmrk[$j];
$this->bordermrk[$i] = $this->bordermrk[$j];
$this->cntmrk[$i] = $this->cntmrk[$j];
+ $this->pageobjects[$i] = $this->pageobjects[$j];
if (isset($this->footerpos[$j])) {
$this->footerpos[$i] = $this->footerpos[$j];
} elseif (isset($this->footerpos[$i])) {
@@ -25881,6 +25904,12 @@
unset($this->intmrk[$this->numpages]);
unset($this->bordermrk[$this->numpages]);
unset($this->cntmrk[$this->numpages]);
+ foreach ($this->pageobjects[$this->numpages] as $oid) {
+ if (isset($this->offsets[$oid])){
+ unset($this->offsets[$oid]);
+ }
+ }
+ unset($this->pageobjects[$this->numpages]);
if (isset($this->footerpos[$this->numpages])) {
unset($this->footerpos[$this->numpages]);
}
@@ -25982,6 +26011,7 @@
$this->intmrk[$this->page] = $this->intmrk[$page];
$this->bordermrk[$this->page] = $this->bordermrk[$page];
$this->cntmrk[$this->page] = $this->cntmrk[$page];
+ $this->pageobjects[$this->page] = $this->pageobjects[$page];
$this->pageopen[$this->page] = false;
if (isset($this->footerpos[$page])) {
$this->footerpos[$this->page] = $this->footerpos[$page];
@@ -26438,7 +26468,8 @@
* @since 4.5.029 (2009-03-19)
*/
public function objclone($object) {
- return @clone($object);
+ // clone is defined only in PHP 5
+ return (version_compare(phpversion(), '5.0') < 0) ? $object : clone($object);
}
/**
Modified: trunk/index.php
===================================================================
--- trunk/index.php 2012-05-22 08:12:20 UTC (rev 5384)
+++ trunk/index.php 2012-05-22 08:22:49 UTC (rev 5385)
@@ -59,7 +59,7 @@
<td style="width:10%" valign="top">';
echo '<table class="main_menu" width="100%" cellspacing="0" cellpadding="0" border="0">';
- $i=0;
+$i=0;
while ($i < count($ModuleLink)){
Modified: trunk/sql/mysql/upgrade4.07-4.08.sql
===================================================================
--- trunk/sql/mysql/upgrade4.07-4.08.sql 2012-05-22 08:12:20 UTC (rev 5384)
+++ trunk/sql/mysql/upgrade4.07-4.08.sql 2012-05-22 08:22:49 UTC (rev 5385)
@@ -77,15 +77,19 @@
ALTER TABLE `locations` ADD UNIQUE `locationname` (`locationname`);
ALTER TABLE `stockmaster` CHANGE `lastcostupdate` `lastcostupdate` DATE NOT NULL DEFAULT '0000-00-00';
-ALTER TABLE `labels` CHANGE `papersize` `pagewidth` FLOAT NOT NULL DEFAULT '0';
-ALTER TABLE `labels` ADD `pageheight` FLOAT NOT NULL DEFAULT '0' AFTER `pagewidth`;
-ALTER TABLE `labels` CHANGE `height` `height` FLOAT NOT NULL DEFAULT '0';
-ALTER TABLE `labels` CHANGE `width` `width` FLOAT NOT NULL DEFAULT '0';
-ALTER TABLE `labels` CHANGE `topmargin` `topmargin` FLOAT NOT NULL DEFAULT '0';
-ALTER TABLE `labels` CHANGE `leftmargin` `leftmargin` FLOAT NOT NULL DEFAULT '0';
-ALTER TABLE `labels` CHANGE `rowheight` `rowheight` FLOAT NOT NULL DEFAULT '0';
-ALTER TABLE `labels` CHANGE `columnwidth` `columnwidth` FLOAT NOT NULL DEFAULT '0';
+ALTER TABLE `labels` CHANGE `papersize` `pagewidth` DOUBLE NOT NULL DEFAULT '0';
+ALTER TABLE `labels` ADD `pageheight` DOUBLE NOT NULL DEFAULT '0' AFTER `pagewidth`;
+ALTER TABLE `labels` CHANGE `height` `height` DOUBLE NOT NULL DEFAULT '0';
+ALTER TABLE `labels` CHANGE `width` `width` DOUBLE NOT NULL DEFAULT '0';
+ALTER TABLE `labels` CHANGE `topmargin` `topmargin` DOUBLE NOT NULL DEFAULT '0';
+ALTER TABLE `labels` CHANGE `leftmargin` `leftmargin` DOUBLE NOT NULL DEFAULT '0';
+ALTER TABLE `labels` CHANGE `rowheight` `rowheight` DOUBLE NOT NULL DEFAULT '0';
+ALTER TABLE `labels` CHANGE `columnwidth` `columnwidth` DOUBLE NOT NULL DEFAULT '0';
+
+ALTER TABLE `labelfields` CHANGE `vpos` `vpos` DOUBLE NOT NULL DEFAULT '0';
+ALTER TABLE `labelfields` CHANGE `hpos` `hpos` DOUBLE NOT NULL DEFAULT '0';
+
ALTER TABLE paymentmethods ADD opencashdrawer tinyint NOT NULL default '0';
UPDATE config SET confvalue='4.08' WHERE confname='VersionNumber';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|