view_stock_status_cell($ln_itm->stock_id); if ($ln_itm->descr_editable) { text_cells(null, 'Line' . $line . 'Desc', $ln_itm->item_description, 30, 50); } else { label_cell($ln_itm->item_description); } $dec = get_qty_dec($ln_itm->stock_id); qty_cell($ln_itm->quantity, false, $dec); label_cell($ln_itm->units); qty_cell($ln_itm->qty_done, false, $dec); if (isset($_POST['clear_quantity'])) { $ln_itm->qty_dispatched = 0; } $_POST['Line' . $line] = $ln_itm->qty_dispatched; /// clear post so value displayed in the fiel is the 'new' quantity small_qty_cells(null, 'Line' . $line, qty_format($ln_itm->qty_dispatched, $ln_itm->stock_id, $dec), null, null, $dec); $display_discount_percent = percent_format($ln_itm->discount_percent * 100) . "%"; $line_total = $ln_itm->qty_dispatched * $ln_itm->price * (1 - $ln_itm->discount_percent); amount_cell($ln_itm->price); label_cell($ln_itm->tax_type_name); label_cell($display_discount_percent, "nowrap align=right"); amount_cell($line_total); end_row(); } $_POST['ChargeFreightCost'] = get_post('ChargeFreightCost', price_format($_SESSION['Items']->freight_cost)); $colspan = 9; start_row(); label_cell(_("Shipping Cost"), "colspan={$colspan} align=right"); small_amount_cells(null, 'ChargeFreightCost', $_SESSION['Items']->freight_cost); end_row(); $inv_items_total = $_SESSION['Items']->get_items_total_dispatch();
} if ($show_qoh && $ln_itm->qty_dispatched > $qoh) { // oops, we don't have enough of one of the component items start_row("class='stockmankobg'"); $has_marked = true; } else { alt_table_row_color($k); } view_stock_status_cell($ln_itm->stock_id); text_cells(null, 'Line' . $line . 'Desc', $ln_itm->item_description, 30, 50); label_cell($ln_itm->date_from); label_cell($ln_itm->notes); qty_cell($ln_itm->quantity); label_cell($ln_itm->units); qty_cell($ln_itm->qty_done); small_qty_cells(null, 'Line' . $line, qty_format($ln_itm->qty_dispatched)); $display_discount_percent = percent_format($ln_itm->discount_percent * 100) . "%"; $line_total = $ln_itm->qty_dispatched * $ln_itm->price * (1 - $ln_itm->discount_percent); amount_cell($ln_itm->price); label_cell($ln_itm->tax_type_name); label_cell($display_discount_percent, "nowrap align=right"); amount_cell($line_total); end_row(); } $_POST['ChargeFreightCost'] = price_format($_SESSION['Items']->freight_cost); if (!check_num('ChargeFreightCost')) { $_POST['ChargeFreightCost'] = price_format(0); } start_row(); small_amount_cells(tr("Shipping Cost"), 'ChargeFreightCost', $_SESSION['Items']->freight_cost, "colspan=11 align=right"); $inv_items_total = $_SESSION['Items']->get_items_total_dispatch();