'; echo $TableHeader; $TotalQuantity = 0; /*Variable to accumulate total quantity received */ $RowCounter =0; foreach ($LineItem->SerialItems as $Bundle){ if ($RowCounter == 10){ echo $TableHeader; $RowCounter =0; } else { $RowCounter++; } echo ''; if ($LineItem->Serialised==0){ echo ''; } if ($Perishable==1){ echo ''; } echo ''; $TotalQuantity += $Bundle->BundleQty; } /*Display the totals and rule off before allowing new entries */ if ($LineItem->Serialised==1){ echo ''; } else { echo ''; } /*Close off old table */ echo '
' . $Bundle->BundleRef . '' . locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces) . '' . $Bundle->ExpiryDate . '' . _('Delete'). '
' . _('Total Quantity'). ': ' . locale_number_format($TotalQuantity,$LineItem->DecimalPlaces) . '
' . _('Total Quantity'). ': ' . locale_number_format($TotalQuantity,$LineItem->DecimalPlaces) . '
'; echo '
'; if (isset($_GET['CreditInvoice']) OR isset($_POST['CreditInvoice'])){ echo ''; } /*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*/ /*in the first column add a table for the input of newies */ echo ''; echo $TableHeader; if ( isset($_GET['EditControlled']) ) { $EditControlled = isset($_GET['EditControlled'])?$_GET['EditControlled']:false; } elseif ( isset($_POST['EditControlled']) ){ $EditControlled = isset($_POST['EditControlled'])?$_POST['EditControlled']:false; } else { $EditControlled=false; } $StartAddingAt = 0; if ($EditControlled){ foreach ($LineItem->SerialItems as $Bundle){ echo ''; /*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 ''; } else if ($LineItem->Serialised==0 and $Perishable==1) { echo ''; } else { echo ''; } $StartAddingAt++; } } for ($i=0;$i < 10;$i++){ echo ''; /*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){ if ($Perishable==0) { echo ''; } else { echo ''; } } else if ($LineItem->Serialised==0 and $Perishable==1) { echo ''; } else { echo ''; } } echo '

'; if ($ShowExisting){ include('includes/InputSerialItemsExisting.php'); } echo ' '; /*end of nested table */ ?>