Пример #1
0
     $qty = $ln_itm->qty_dispatched;
     if ($check = check_negative_stock($ln_itm->stock_id, -$ln_itm->qty_dispatched, $_POST['Location'], $_POST['DispatchDate'])) {
         $qty = $check['qty'];
     }
     $q_class = hook_get_dispatchable_quantity($ln_itm, $_POST['Location'], $_POST['DispatchDate'], $qty);
     // Skip line if needed
     if ($q_class === 'skip') {
         continue;
     }
     if (is_array($q_class)) {
         list($ln_itm->qty_dispatched, $row_classes) = $q_class;
         $has_marked = true;
     }
 }
 alt_table_row_color($k, $row_classes);
 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);
Пример #2
0
 $modify_page = $path_to_root . "/manufacturing/work_order_entry.php?" . SID . "trans_no=" . $myrow["id"];
 $release_page = $path_to_root . "/manufacturing/work_order_release.php?" . SID . "trans_no=" . $myrow["id"];
 if ($myrow["closed"] == 0) {
     $issue = $path_to_root . "/manufacturing/work_order_issue.php?" . SID . "trans_no=" . $myrow["id"];
     $add_finished = $path_to_root . "/manufacturing/work_order_add_finished.php?" . SID . "trans_no=" . $myrow["id"];
     $costs = $path_to_root . "/gl/gl_payment.php?NewPayment=1&PayType=" . payment_person_types::WorkOrder() . "&PayPerson=" . $myrow["id"];
     $can_issue = $myrow["released"];
     $issue_link = $can_issue ? "<a href={$issue}>" . tr("Issue") . "</a></td>\n\t\t\t<td><a href={$add_finished}>" . tr("Produce") . "</a></td>\n\t\t\t<td><a href={$costs}>" . tr("Costs") . "</a>" : tr("Not Released");
 } else {
     $issue_link = "";
 }
 label_cell(get_trans_view_str(systypes::work_order(), $myrow["id"]));
 label_cell(get_trans_view_str(systypes::work_order(), $myrow["id"], $myrow["wo_ref"]));
 label_cell(wo_types::name($myrow["type"]));
 label_cell($myrow["location_name"]);
 view_stock_status_cell($myrow["stock_id"], $myrow["description"]);
 qty_cell($myrow["units_reqd"]);
 qty_cell($myrow["units_issued"]);
 label_cell(sql2date($myrow["date_"]));
 label_cell(sql2date($myrow["required_by"]));
 label_cell($myrow["closed"] ? tr("Yes") : tr("No"));
 if ($issue_link != "") {
     label_cell($issue_link);
 }
 if ($myrow["released"] == 0) {
     label_cell("<a href={$release_page}>" . tr("Release") . "</a>");
 }
 if ($myrow["closed"] == 0) {
     label_cell("<a href={$modify_page}>" . tr("Edit") . "</a>");
 }
 label_cell(get_gl_view_str(systypes::work_order(), $myrow["id"]));