- amount_cells(null, "amount" . $id);//, input_num('amount' . $id));
- label_cell("<a href='#' name=Alloc$id onclick='allocate_all(this.name.substr(5));return true;'>"
- . _("All") . "</a>");
- label_cell("<a href='#' name=DeAll$id onclick='allocate_none(this.name.substr(5));return true;'>"
- . _("None") . "</a>".hidden("un_allocated" . $id,
- price_format($un_allocated), false));
+ if ($early_discount) {
+ $discount = price_format($alloc_item->early_discount*abs($alloc_item->amount));
+
+ if ($reallocation)
+ label_cell($discount, 'align=center');
+ else
+ check_cells(null, 'early_disc'.$id, $discount, false, false, 'align=center');
+ $total_discount += $discount;
+ } else {
+ label_cell(_("N/A"), 'align=center'); hidden('early_disc'.$id, 0);
+ }
+ amount_cells(null, "amount" . $id);
+ if (0) {
+ label_cells('', '', '', 'colspan=2');
+ } else {
+ label_cell("<a href='#' name=Alloc$id onclick='allocate_all(this.name.substr(5));return true;'>"
+ . _("All") . "</a>");
+ label_cell("<a href='#' name=DeAll$id onclick='allocate_none(this.name.substr(5));return true;'>"
+ . _("None") . "</a>".hidden("un_allocated" . $id,
+ price_format($un_allocated), false));
+ }