예제 #1
0
        public void CreateProductoTerminado()
        {
            NewLotePT.CodigoLoteSalida = SelectedLote.CodLote;
            NewLotePT.CodigoPT         = SelectedPT.CodPT;
            InventoryQueries.updateLoteSalidaAmount(-PlaceHolder.EmptyAmount, SelectedLote.CodLote);



            ProductQueries.CreateProductoTerminado(NewLotePT, int.Parse(NewLotePT.CantidadOriginal));


            foreach (var element in NewLotePTDetalles)
            {
                element.CodigoLotePT = NewLotePT.CodigoCorrelativo;
                ProductQueries.CreateProductoTerminadoDetalle(element, int.Parse(NewLotePT.CantidadOriginal), element.CodigoMP);
            }



            MessageBox.Show("Lote Producto Terminado Creado");

            SelectedLote.CantidadActual -= PlaceHolder.EmptyAmount;

            loteModal.Close();
            amountModal.Close();
        }