Hi!
In the transaction section, when the item is a "assembly" the code used to create the record in
"stockmoves" has a bug, because in the "VALUES" part is used "newqoh" in the expression to
evaluate this NEW field,  (line 1006 in trunk repository source)

                   $SQL = "INSERT INTO stockmoves (" .
                                "stockid,    type,     transno,      loccode, " .
                                "trandate,   debtorno, branchcode,   prd, " .
                                "reference,  qty,      standardcost, show_on_inv_crds, " .
                                "newqoh) " .
                            "VALUES ('" .
                                $AssParts['component'] . "', 10," .
                                $InvoiceNo . ", '" . $_SESSION['Items']->Location . "','" .
                                $DefaultDispatchDate . "','" . $_SESSION['Items']->DebtorNo . "','" .
                                $_SESSION['Items']->Branch . "', " . $PeriodNo . ",'" .
                                _('Assembly') . ': ' . $OrderLine->StockID . ' ' . _('Order') . ': ' .
                                    $_SESSION['ProcessingOrder'] . "', " .
                                -$AssParts['quantity'] * $OrderLine->QtyDispatched . "," .
                                $AssParts['standard'] . ", 0,
  **** Err ***              newqoh-" . ($AssParts['quantity'] * $OrderLine->QtyDispatched) . ")";

I guess it would be;
                      $AssParts['standard'] . ", 0,
                      " . $QtyOnHandPrior - ($AssParts['quantity'] * $OrderLine->QtyDispatched) . ")";

as is written in line 1065, for buyed items.

Saludos
--
Ing Marcos R Garcia Trejo
(52) 9991-513412