From: <dai...@us...> - 2011-10-02 09:46:02
|
Revision: 4709 http://web-erp.svn.sourceforge.net/web-erp/?rev=4709&view=rev Author: daintree Date: 2011-10-02 09:45:55 +0000 (Sun, 02 Oct 2011) Log Message: ----------- number_formats Modified Paths: -------------- trunk/includes/Add_SerialItems.php trunk/includes/Add_SerialItemsOut.php trunk/includes/InputSerialItemsFile.php trunk/includes/InputSerialItemsKeyed.php trunk/includes/InputSerialItemsSequential.php trunk/includes/OutputSerialItems.php Modified: trunk/includes/Add_SerialItems.php =================================================================== --- trunk/includes/Add_SerialItems.php 2011-10-02 09:16:51 UTC (rev 4708) +++ trunk/includes/Add_SerialItems.php 2011-10-02 09:45:55 UTC (rev 4709) @@ -16,7 +16,7 @@ $AddThisBundle = true; /*If the user enters a duplicate serial number the later one over-writes the first entered one - no warning given though ? */ - if ($_POST['Qty' . $i] > $ExistingBundleQty){ + if (filter_number_format($_POST['Qty' . $i]) > $ExistingBundleQty){ if ($LineItem->Serialised ==1){ echo '<br />'; prnMsg ( $_POST['SerialNo' . $i] . ' ' . @@ -38,7 +38,7 @@ } } if ($AddThisBundle==true){ - $LineItem->SerialItems[$_POST['SerialNo' . $i]] = new SerialItem ($_POST['SerialNo' . $i], ($InOutModifier>0?1:-1) * $_POST['Qty' . $i]); + $LineItem->SerialItems[$_POST['SerialNo' . $i]] = new SerialItem ($_POST['SerialNo' . $i], ($InOutModifier>0?1:-1) * filter_number_format($_POST['Qty' . $i])); } } /*end if ExistingBundleQty >0 */ else { @@ -51,7 +51,7 @@ //Serialised items can not exist w/ Qty > 0 if we have an $NewQty of 1 //Serialised items must exist w/ Qty = 1 if we have $NewQty of -1 $SerialError = false; - $NewQty = ($InOutModifier>0?1:-1) * $_POST['Qty' . $i]; + $NewQty = ($InOutModifier>0?1:-1) * filter_number_format($_POST['Qty' . $i]); $NewSerialNo = $_POST['SerialNo' . $i]; if ($LineItem->Serialised){ @@ -124,7 +124,9 @@ Validate an uploaded FILE and save entries ********************************************/ $valid = true; -if (isset($_POST['EntryType']) and $_POST['EntryType']=='FILE' and isset($_POST['ValidateFile'])){ +if (isset($_POST['EntryType']) + AND $_POST['EntryType']=='FILE' + AND isset($_POST['ValidateFile'])){ $filename = $_SESSION['CurImportFile']['tmp_name']; @@ -134,7 +136,7 @@ while (!feof($handle)) { $contents = trim(fgets($handle, 4096)); //$valid = $LineItem->SerialItems[$i]->importFileLineItem($contents); - $pieces = explode(",",$contents); + $pieces = explode(',',$contents); if ($LineItem->Serialised == 1){ //for Serialised items, we are expecting the line to contain either just the serial no //OR a comma delimited file w/ the serial no FIRST @@ -155,12 +157,12 @@ } } else { //for controlled only items, we must receive: BatchID, Qty in a comma delimited file - if($pieces[0] != "" AND $pieces[1] != "" AND is_numeric($pieces[1]) AND $pieces[1] > 0 ){ + if($pieces[0] != '' AND $pieces[1] != '' AND is_numeric(filter_number_format($pieces[1])) AND filter_number_format($pieces[1]) > 0 ){ /*If the user enters a duplicate batch number the later one over-writes the first entered one - no warning given though ? */ //$LineItem->SerialItems[$pieces[0]] = new SerialItem ($pieces[0], $pieces[1] ); $NewSerialNo = $pieces[0]; - $NewQty = ($InOutModifier>0?1:-1) * $pieces[1]; + $NewQty = ($InOutModifier>0?1:-1) * filter_number_format($pieces[1]); } else { $valid = false; } @@ -203,10 +205,10 @@ if ($LineItem->Serialised){ $ExistingQty = ValidBundleRef($StockID, $LocationOut, $NewSerialNo); if ($NewQty == 1 AND $ExistingQty != 0){ - prnMsg( '<a href="'.$rootpath.'/StockSerialItemResearch.php?serialno='. $NewSerialNo . '" target=_blank>'.$NewSerialNo. '</a>: '. _("The Serial Number being added exists with a Quantity that is not Zero (0)!"), 'error' ); + prnMsg( '<a href="'.$rootpath.'/StockSerialItemResearch.php?serialno='. $NewSerialNo . '" target=_blank>'.$NewSerialNo. '</a>: '. _('The Serial Number being added exists with a Quantity that is not Zero (0)!'), 'error' ); $SerialError = true; } elseif ($NewQty == -1 AND $ExistingQty != 1){ - prnMsg( '<a href="'.$rootpath.'/StockSerialItemResearch.php?serialno='. $NewSerialNo . '" target=_blank>'.$NewSerialNo. '</a> : '. _("The Serial Number being removed exists with a Quantity that is not One (1)!"), 'error'); + prnMsg( '<a href="'.$rootpath.'/StockSerialItemResearch.php?serialno='. $NewSerialNo . '" target=_blank>'.$NewSerialNo. '</a> : '. _('The Serial Number being removed exists with a Quantity that is not One (1)!'), 'error'); $SerialError = true; } } @@ -269,19 +271,19 @@ $AddThisBundle = true; /*If the user enters a duplicate serial number the later one over-writes the first entered one - no warning given though ? */ if ($NewQty > $ExistingBundleQty){ - if ($LineItem->Serialised ==1){ - echo '<br />' . '<a href="'.$rootpath.'/StockSerialItemResearch.php?serialno='. $NewSerialNo . '" target=_blank>'.$NewSerialNo. '</a> '. _('has already been sold'). '.'; - $AddThisBundle = false; - } elseif ($ExistingBundleQty==0) { /* and its a batch */ - echo '<br />' . _('There is none of'). ' <a href="'.$rootpath.'/StockSerialItemResearch.php?serialno='. $NewSerialNo . '" target=_blank>'.$NewSerialNo. '</a> '. _('remaining') .'.'; - $AddThisBundle = false; - } else { - echo '<br />'. _('There is only') . ' ' . $ExistingBundleQty . ' '. _('of') . ' ' . - '<a href="'.$rootpath.'/StockSerialItemResearch.php?serialno='. $NewSerialNo . '" target=_blank>'.$NewSerialNo. '</a> ' . _('remaining') . '. '. - _('The entered quantity will be reduced to the remaining amount left of this batch/bundle/roll'); - $NewQty = $ExistingBundleQty; - $AddThisBundle = true; - } + if ($LineItem->Serialised ==1){ + echo '<br />' . '<a href="'.$rootpath.'/StockSerialItemResearch.php?serialno='. $NewSerialNo . '" target=_blank>'.$NewSerialNo. '</a> '. _('has already been sold'). '.'; + $AddThisBundle = false; + } elseif ($ExistingBundleQty==0) { /* and its a batch */ + echo '<br />' . _('There is none of'). ' <a href="'.$rootpath.'/StockSerialItemResearch.php?serialno='. $NewSerialNo . '" target=_blank>'.$NewSerialNo. '</a> '. _('remaining') .'.'; + $AddThisBundle = false; + } else { + echo '<br />'. _('There is only') . ' ' . $ExistingBundleQty . ' '. _('of') . ' ' . + '<a href="'.$rootpath.'/StockSerialItemResearch.php?serialno='. $NewSerialNo . '" target=_blank>'.$NewSerialNo. '</a> ' . _('remaining') . '. '. + _('The entered quantity will be reduced to the remaining amount left of this batch/bundle/roll'); + $NewQty = $ExistingBundleQty; + $AddThisBundle = true; + } } if ($AddThisBundle==true){ $LineItem->SerialItems[$NewSerialNo] = new SerialItem ($NewSerialNo, $NewQty); @@ -343,4 +345,4 @@ if (isset($_GET['Delete'])){ unset($LineItem->SerialItems[$_GET['Delete']]); } -?> +?> \ No newline at end of file Modified: trunk/includes/Add_SerialItemsOut.php =================================================================== --- trunk/includes/Add_SerialItemsOut.php 2011-10-02 09:16:51 UTC (rev 4708) +++ trunk/includes/Add_SerialItemsOut.php 2011-10-02 09:45:55 UTC (rev 4709) @@ -12,22 +12,25 @@ $AddThisBundle = true; /*If the user enters a duplicate serial number the later one over-writes the first entered one - no warning given though ? */ - if ($_POST['Qty' . $i] > $ExistingBundleQty){ + if (filter_number_format($_POST['Qty' . $i]) > $ExistingBundleQty){ if ($LineItem->Serialised ==1){ - echo "<br />" . $_POST['SerialNo' . $i] . " " . _('has already been sold'); + echo '<br />' . $_POST['SerialNo' . $i] . " " . _('has already been sold'); $AddThisBundle = false; } elseif ($ExistingBundleQty==0) { /* and its a batch */ - echo "<br />There is none of " . $_POST['SerialNo' . $i] . " left."; + echo '<br />' . _('There is none of') . ' ' . $_POST['SerialNo' . $i] . ' ' . _('left'); $AddThisBundle = false; } else { - echo '<br />' . _('There is only') . ' ' . $ExistingBundleQty . ' ' . _('of') . ' ' . $_POST['SerialNo' . $i] . - ' ' . _('remaining') . '. ' . _('The entered quantity will be reduced to the remaining amount left of this batch/bundle/roll'); + echo '<br />' . _('There is only') . ' ' . $ExistingBundleQty . ' ' . _('of') . ' ' . $_POST['SerialNo' . $i] . ' ' . _('remaining') . '. ' . _('The entered quantity will be reduced to the remaining amount left of this batch/bundle/roll'); $_POST['Qty' . $i] = $ExistingBundleQty; $AddThisBundle = true; } } - if ($AddThisBundle==true and $_POST['Qty' . $i]>0){ - $LineItem->SerialItems[$_POST['SerialNo' . $i]] = new SerialItem ($_POST['SerialNo' . $i], $_POST['Qty' . $i], $_POST['ExpiryDate' . $i]); + if ($AddThisBundle==true + AND filter_number_format($_POST['Qty' . $i])>0){ + + $LineItem->SerialItems[$_POST['SerialNo' . $i]] = new SerialItem ($_POST['SerialNo' . $i], + filter_number_format($_POST['Qty' . $i]), + $_POST['ExpiryDate' . $i]); } } /*end if ExistingBundleQty >0 */ } /* end if posted Serialno . i is not blank */ @@ -51,4 +54,4 @@ $LineItem->SerialItems=array(); } -?> +?> \ No newline at end of file Modified: trunk/includes/InputSerialItemsFile.php =================================================================== --- trunk/includes/InputSerialItemsFile.php 2011-10-02 09:16:51 UTC (rev 4708) +++ trunk/includes/InputSerialItemsFile.php 2011-10-02 09:45:55 UTC (rev 4709) @@ -71,7 +71,7 @@ $_SESSION['CurImportFile'] = ''; $LineItem->SerialItemsValid=false; } -if ($_FILES['ImportFile']['name'] == '' && $_SESSION['CurImportFile'] == ''){ +if ($_FILES['ImportFile']['name'] == '' AND $_SESSION['CurImportFile'] == ''){ $msg = _('Please Choose a file and then click Set Entry Type to upload a file for import'); prnMsg($msg); $LineItem->SerialItemsValid=false; @@ -125,14 +125,12 @@ <tr><td>'. _('Size') .':</td><td>' . locale_number_format($_SESSION['CurImportFile']['size']/1024,4) . 'kb</td></tr> <tr><td>'. _('Type') .':</td><td>' . $_SESSION['CurImportFile']['type'] . '</td></tr> <tr><td>'. _('TempName') .':</td><td>' . $_SESSION['CurImportFile']['tmp_name'] . '</td></tr> - <tr><td>'. _('Status') .':</td><td>' . - ($LineItem->SerialItemsValid?getMsg(_('Valid'),'success'):getMsg(_('Invalid'),'error')) . '</td></tr> - </table>'. - $invalid_imports.' '. _('out of') .' '.$TotalLines.' '. _('records are invalid').'<br />'; + <tr><td>'. _('Status') .':</td><td>' . ($LineItem->SerialItemsValid?getMsg(_('Valid'),'success'):getMsg(_('Invalid'),'error')) . '</td></tr> + </table>'. $invalid_imports.' '. _('out of') .' '.$TotalLines.' '. _('records are invalid').'<br />'; $filename = $_SESSION['CurImportFile']['tmp_name']; } -if (!$LineItem->SerialItemsValid && !$_SESSION['CurImportFile']['Processed']){ +if (!$LineItem->SerialItemsValid AND !$_SESSION['CurImportFile']['Processed']){ // If all items are not valid, show the raw first 10 lines of the file. maybe it will help. $filename = $_SESSION['CurImportFile']['tmp_name']; $handle = fopen($filename, 'r'); @@ -168,7 +166,7 @@ $i++; if ($i == 100) { break; - } + } } } Modified: trunk/includes/InputSerialItemsKeyed.php =================================================================== --- trunk/includes/InputSerialItemsKeyed.php 2011-10-02 09:16:51 UTC (rev 4708) +++ trunk/includes/InputSerialItemsKeyed.php 2011-10-02 09:45:55 UTC (rev 4709) @@ -22,7 +22,7 @@ /*Display the batches already entered with quantities if not serialised */ echo '<table class="selection"> - <tr><td valign=top> + <tr><td valign="top"> <table class="selection">'; echo $tableheader; @@ -64,9 +64,12 @@ /*Display the totals and rule off before allowing new entries */ if ($LineItem->Serialised==1){ - echo '<tr><td class="number"><B>'. _('Total Quantity'). ': ' . locale_number_format($TotalQuantity,$LineItem->DecimalPlaces) . '</b></td></tr>'; + echo '<tr><td class="number"><b>'. _('Total Quantity'). ': ' . locale_number_format($TotalQuantity,$LineItem->DecimalPlaces) . '</b></td></tr>'; } else { - echo '<tr><td class="number"><B>'. _('Total Quantity'). ':</b></td><td class="number"><b>' . locale_number_format($TotalQuantity,$LineItem->DecimalPlaces) . '</b></td></tr>'; + echo '<tr> + <td class="number"><b>'. _('Total Quantity'). ':</b></td> + <td class="number"><b>' . locale_number_format($TotalQuantity,$LineItem->DecimalPlaces) . '</b></td> + </tr>'; } /*Close off old table */ @@ -98,8 +101,7 @@ if ($EditControlled){ foreach ($LineItem->SerialItems as $Bundle){ - echo '<tr><td valign=top><input type="text" name="SerialNo'. $StartAddingAt .'" - value="'.$Bundle->BundleRef.'" size=21 maxlength=20></td>'; + echo '<tr><td valign=top><input type="text" name="SerialNo'. $StartAddingAt .'" value="' .$Bundle->BundleRef.'" size="21" maxlength="20" /></td>'; /*if the item is controlled not serialised - batch quantity required so just enter bundle refs into the form for entry of quantities manually */ @@ -120,25 +122,25 @@ for ($i=0;$i < 10;$i++){ - echo '<tr><td valign=top><input type="text" name="SerialNo'. ($StartAddingAt+$i) .'" size=21 maxlength=20></td>'; + echo '<tr><td valign=top><input type="text" name="SerialNo'. ($StartAddingAt+$i) .'" size="21" maxlength="20" /></td>'; /*if the item is controlled not serialised - batch quantity required so just enter bundle refs into the form for entry of quantities manually */ if ($LineItem->Serialised==1){ - echo '<input type=hidden name="Qty' . ($StartAddingAt+$i) .'" Value=1></tr>'; + echo '<input type=hidden name="Qty' . ($StartAddingAt+$i) .'" value=1></td></tr>'; } else if ($LineItem->Serialised==0 and $Perishable==1) { - echo '<td><input type="text" class="number" name="Qty' . ($StartAddingAt+$i) .'" size=11 maxlength=10></td>'; + echo '<td><input type="text" class="number" name="Qty' . ($StartAddingAt+$i) .'" size=11 maxlength="10" /></td>'; echo '<td><input type="text" class="date" name="ExpiryDate' . ($StartAddingAt+$i) .'" size=11 - value="" alt="'.$_SESSION['DefaultDateFormat'].'" maxlength=10></td></tr>'; + value="" alt="'.$_SESSION['DefaultDateFormat'].'" maxlength="10" /></td></tr>'; } else { - echo '<td><input type="text" class="number" name="Qty' . ($StartAddingAt+$i) .'" size=11 maxlength=10></tr>'; + echo '<td><input type="text" class="number" name="Qty' . ($StartAddingAt+$i) .'" size=11 maxlength="10"></td></tr>'; } } echo '</table>'; -echo '<br /><div class=centre><input type=submit name="AddBatches" value="'. _('Enter'). '"></div>'; -echo '</form></td><td valign=top>'; +echo '<br /><div class=centre><input type="submit" name="AddBatches" value="'. _('Enter'). '"></div>'; +echo '</form></td><td valign="top">'; if ($ShowExisting){ include('includes/InputSerialItemsExisting.php'); } Modified: trunk/includes/InputSerialItemsSequential.php =================================================================== --- trunk/includes/InputSerialItemsSequential.php 2011-10-02 09:16:51 UTC (rev 4708) +++ trunk/includes/InputSerialItemsSequential.php 2011-10-02 09:45:55 UTC (rev 4709) @@ -30,7 +30,7 @@ echo $tableheader; -echo '<form action="' . $_SERVER['PHP_SELF'] . '?=' . $SID . '" method="post"> +echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post"> <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> <input type="hidden" name="LineNo" value="' . $LineNo . '"> <input type="hidden" name="StockID" value="' . $StockID . '"> @@ -40,12 +40,17 @@ } elseif ( isset($_POST['EditControlled']) ){ $EditControlled = isset($_POST['EditControlled'])?$_POST['EditControlled']:false; } -echo '<tr><td valign="top">'. _('Begin:') . '</td><td> <input type="text" name="BeginNo" size="21" maxlength="20" value="'. $_POST['BeginNo']. '"></td></tr>'; -echo '<tr><td valign="top">'. _('End:') . '</td><td> <input type="text" name="EndNo" size="21" maxlength="20" value="'. $_POST['EndNo']. '"></td></tr>'; +echo '<tr> + <td valign="top">'. _('Begin:') . '</td> + <td> <input type="text" name="BeginNo" size="21" maxlength="20" value="'. $_POST['BeginNo']. '" /></td> + </tr>'; +echo '<tr> + <td valign="top">'. _('End:') . '</td> + <td> <input type="text" name="EndNo" size="21" maxlength="20" value="'. $_POST['EndNo']. '" /></td> + </tr>'; - echo '</table>'; echo '<br /><center><input type="submit" name="AddSequence" value="'. _('Enter'). '"></center><br />'; echo '</form></td><td valign="top">'; //echo '</td></tr></table>'; /*end of nested table */ -?> +?> \ No newline at end of file Modified: trunk/includes/OutputSerialItems.php =================================================================== --- trunk/includes/OutputSerialItems.php 2011-10-02 09:16:51 UTC (rev 4708) +++ trunk/includes/OutputSerialItems.php 2011-10-02 09:45:55 UTC (rev 4709) @@ -29,21 +29,21 @@ $Perishable=$myrow['perishable']; if ($LineItem->Serialised==1){ $tableheader .= '<tr> - <th>'. _('Serial No').'</th> - </tr>'; + <th>'. _('Serial No').'</th> + </tr>'; $listtableheader=$tableheader; } else if ($LineItem->Serialised==0 and $Perishable==1){ $tableheader = '<tr> - <th>'. _('Batch/Roll/Bundle'). ' #</th> - <th>'. _('Available'). '</th> - <th>'. _('Quantity'). '</th> - <th>'. _('Expiry Date'). '</th> - </tr>'; + <th>'. _('Batch/Roll/Bundle'). ' #</th> + <th>'. _('Available'). '</th> + <th>'. _('Quantity'). '</th> + <th>'. _('Expiry Date'). '</th> + </tr>'; $listtableheader = '<tr> - <th>'. _('Batch/Roll/Bundle'). ' #</th> - <th>'. _('Quantity'). '</th> - <th>'. _('Expiry Date'). '</th> - </tr>'; + <th>'. _('Batch/Roll/Bundle'). ' #</th> + <th>'. _('Quantity'). '</th> + <th>'. _('Expiry Date'). '</th> + </tr>'; } else { $tableheader = '<tr> <th>'. _('Batch/Roll/Bundle'). ' #</th> @@ -62,7 +62,9 @@ /*Display the batches already entered with quantities if not serialised */ -echo '<table class=selection><tr><td valign=top><table class=selection>'; +echo '<table class="selection"> + <tr> + <td valign="top"><table class="selection">'; echo $listtableheader; $TotalQuantity = 0; /*Variable to accumulate total quantity received */ @@ -89,10 +91,10 @@ echo '<td>' . $Bundle->BundleRef . '</td>'; if ($LineItem->Serialised==0 and $Perishable==0){ - echo '<td class=number>' . locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces) . '</td>'; + echo '<td class="number">' . locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces) . '</td>'; } else if ($LineItem->Serialised==0 and $Perishable==1){ - echo '<td class=number>' . locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces) . '</td>'; - echo '<td class=number>' . $Bundle->ExpiryDate . '</td>'; + echo '<td class="number">' . locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces) . '</td>'; + echo '<td class="number">' . $Bundle->ExpiryDate . '</td>'; } echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?Delete=' . $Bundle->BundleRef . '&StockID=' . $LineItem->StockID . '&LineNo=' . $LineNo .'">'. _('Delete'). '</a></td></tr>'; @@ -103,27 +105,30 @@ /*Display the totals and rule off before allowing new entries */ if ($LineItem->Serialised==1){ - echo '<tr><td class=number><B>'. _('Total Quantity'). ': ' . locale_number_format($TotalQuantity,$LineItem->DecimalPlaces) . '</b></td></tr>'; + echo '<tr><td class="number"><b>'. _('Total Quantity'). ': ' . locale_number_format($TotalQuantity,$LineItem->DecimalPlaces) . '</b></td></tr>'; } else { - echo '<tr><td class=number><B>'. _('Total Quantity'). ':</b></td><td class=number><b>' . locale_number_format($TotalQuantity,$LineItem->DecimalPlaces) . '</b></td></tr>'; + echo '<tr> + <td class="number"><b>'. _('Total Quantity'). ':</b></td> + <td class="number"><b>' . locale_number_format($TotalQuantity,$LineItem->DecimalPlaces) . '</b></td> + </tr>'; } /*Close off old table */ -echo '</table></td><td valign=top>'; +echo '</table></td><td valign="top">'; /*Start a new table for the Serial/Batch ref input in one column (as a sub table then the multi select box for selection of existing bundle/serial nos for dispatch if applicable*/ //echo '<TABLE><TR><TD valign=TOP>'; $TransferQuantity=$TotalQuantity; /*in the first column add a table for the input of newies */ -echo '<table class=selection>'; +echo '<table class="selection">'; echo $tableheader; echo '<form action="' . $_SERVER['PHP_SELF'] . '" name="Ga6uF5Wa" method="post"> - <input type=hidden name=LineNo value="' . $LineNo . '"> - <input type=hidden name=StockID value="' . $StockID . '"> - <input type=hidden name=EntryType value="KEYED">'; + <input type=hidden name="LineNo" value="' . $LineNo . '" /> + <input type=hidden name="StockID" value="' . $StockID . '" /> + <input type=hidden name="EntryType" value="KEYED" />'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if ( isset($_GET['EditControlled']) ) { $EditControlled = isset($_GET['EditControlled'])?$_GET['EditControlled']:false; @@ -141,20 +146,20 @@ if ($EditControlled){ foreach ($LineItem->SerialItems as $Bundle){ - echo '<tr><td valign=top><input type="text" name="SerialNo'. $StartAddingAt .'" - value="'.$Bundle->BundleRef.'" size=21 maxlength=20></td>'; + echo '<tr> + <td valign="top"><input type="text" name="SerialNo'. $StartAddingAt .'" value="'.$Bundle->BundleRef.'" size="21" maxlength="20" /></td>'; /*if the item is controlled not serialised - batch quantity required so just enter bundle refs into the form for entry of quantities manually */ if ($LineItem->Serialised==1){ - echo '<input type=hidden name="Qty' . $StartAddingAt .'" Value=1></TR>'; + echo '<input type=hidden name="Qty' . $StartAddingAt .'" value=1></tr>'; } else if ($LineItem->Serialised==0 and $Perishable==1) { echo '<td><input type="text" class="number" name="Qty' . $StartAddingAt .'" size=11 - value="'. locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces). '" maxlength=10></tr>'; + value="'. locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces). '" maxlength=10></td></tr>'; } else { echo '<td><input type="text" class="number" name="Qty' . $StartAddingAt .'" size=11 - value="'. locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces). '" maxlength=10></tr>'; + value="'. locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces). '" maxlength=10></td></tr>'; } $StartAddingAt++; @@ -184,25 +189,24 @@ into the form for entry of quantities manually */ if ($LineItem->Serialised==1){ - echo '<input type=hidden name="Qty' . ($StartAddingAt+$RowNumber) .'" Value=1></tr>'; + echo '<input type=hidden name="Qty' . ($StartAddingAt+$RowNumber) .'" value=1></tr>'; } else if ($LineItem->Serialised==0 and $Perishable==1) { if (isset($LineItem->SerialItems[$myrow['serialno']])) { - echo '<td class=number>'.locale_number_format($myrow['quantity']-$LineItem->SerialItems[$myrow['serialno']]->BundleQty,$LineItem->DecimalPlaces).'</td>'; + echo '<td class="number">'.locale_number_format($myrow['quantity']-$LineItem->SerialItems[$myrow['serialno']]->BundleQty,$LineItem->DecimalPlaces).'</td>'; } else { - echo '<td class=number>'.locale_number_format($myrow['quantity'],$LineItem->DecimalPlaces).'</td>'; + echo '<td class="number">'.locale_number_format($myrow['quantity'],$LineItem->DecimalPlaces).'</td>'; } - echo '<td><input type="text" class="number" name="Qty' . ($StartAddingAt+$RowNumber) .'" size=11 value="0" maxlength=10></td>'; - echo '<td><input type=hidden class="date" name="ExpiryDate' . ($StartAddingAt+$RowNumber) .'" size=11 - value="'.ConvertSQLDate($myrow['expirationdate']).'" alt="'.$_SESSION['DefaultDateFormat'].'" maxlength=10>'.ConvertSQLDate($myrow['expirationdate']).'</td></tr>'; + echo '<td><input type="text" class="number" name="Qty' . ($StartAddingAt+$RowNumber) .'" size=11 value="0" maxlength="10" /></td>'; + echo '<td><input type="hidden" class="date" name="ExpiryDate' . ($StartAddingAt+$RowNumber) .'" size="11" value="'.ConvertSQLDate($myrow['expirationdate']).'" alt="'.$_SESSION['DefaultDateFormat'].'" maxlength="10" />'.ConvertSQLDate($myrow['expirationdate']).'</td></tr>'; } else { - echo '<td><input type="text" class="number" name="Qty' . ($StartAddingAt+$RowNumber) .'" size=11 value="'.$myrow['quantity'].'" maxlength=10></tr>'; + echo '<td><input type="text" class="number" name="Qty' . ($StartAddingAt+$RowNumber) .'" size=11 value="'. locale_number_format($myrow['quantity'],$LineItem->DecimalPlaces).'" maxlength="10" /></td></tr>'; } $RowNumber++; } echo '</table>'; echo '<br /><div class=centre><input type=submit name="AddBatches" value="'. _('Enter'). '"></div>'; -echo '</form></td><td valign=top>'; +echo '</form></td><td valign="top">'; $ShowExisting=True; $_POST['EntryType']='Sequential'; if ($ShowExisting){ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |