';
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 '
' . $Bundle->BundleRef . ' | ';
if ($LineItem->Serialised==0){
echo '' . locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces) . ' | ';
}
if ($Perishable==1){
echo '' . $Bundle->ExpiryDate . ' | ';
}
echo '' . _('Delete'). ' |
';
$TotalQuantity += $Bundle->BundleQty;
}
/*Display the totals and rule off before allowing new entries */
if ($LineItem->Serialised==1){
echo '' . _('Total Quantity'). ': ' . locale_number_format($TotalQuantity,$LineItem->DecimalPlaces) . ' | ';
} else {
echo '
' . _('Total Quantity'). ': |
' . locale_number_format($TotalQuantity,$LineItem->DecimalPlaces) . ' |
';
}
/*Close off old table */
echo ' | ';
echo '
|
';
if ($ShowExisting){
include('includes/InputSerialItemsExisting.php');
}
echo ' |
'; /*end of nested table */
?>