LoteDocTransformacionCabecera.cs
1 using sage.ew.db;
2 using sage.ew.global;
3 using sage.ew.interficies;
4 using sage.ew.ewbase;
5 using System;
6 using System.Collections.Generic;
7 using System.Data;
8 using System.Linq;
9 using System.Text;
10 using System.Threading.Tasks;
11 
12 namespace sage.ew.lote.Clases
13 {
17  public class LoteDocTransformacionCabecera : Lote, IFabricacionExtendidas //IFabricacionExtendidasCabecera
18  {
19  #region Constructor
20 
25  {
26  _lDocEntrada = false;
27  }
28 
34  public LoteDocTransformacionCabecera(string tcLote, IDocLineaFabricacion toLinea = null)
35  {
36  _lDocEntrada = false;
37  }
38 
39  #endregion Constructor
40 
44  public decimal _Previstas { get; set; } = 0;
45 
49  protected override void _ComprobarBloqueos()
50  {
51  _ReadOnly = _ReadOnly || _oDocLin._Solo_Lectura;
52  }
53 
58  protected override bool _Es_Documento_Fabricacion()
59  {
60  return true;
61  }
62 
67  protected override void _Consultar_Lotes_Documento()
68  {
69  string lcSql = string.Empty;
70 
71  // Consultem els lots asociats al document
72  lcSql = "SELECT EMPRESA,space(2) as LETRA,NUMERO,FECHA,ARTICULO, 0 AS LINIA,LOTE,UNIDADES, " +
73  " PERIODO,ALMACEN,CADUCIDAD,UBICA,FECHA2,PESO, " +
74  " TALLA,COLOR,ASI, " +
75  " UNIDADES AS UNIASIG, 0.00000000000 AS UNI2, PESO AS PESASIG, 0.00000000000 AS PES2, " +
76  " cast(1 as bit) as SEL, cast(0 as bit) as AJENO, cast(0 as bit) as REGULA, space(80) as ORIGEN, 0.00000000000 AS COSTE " +
77  "FROM " + DB.SQLDatabase("LOTES", "LTCTRAN") + " " +
78  " WHERE PERIODO = " + DB.SQLString(_cPeriodo) + " " +
79  " AND EMPRESA = " + DB.SQLString(_oDocLin._Empresa) +
80  " AND NUMERO = " + DB.SQLString(_oDocLin._Numero);
81 
82  DB.SQLExec(lcSql, ref _oDataTable);
83  }
84 
89  protected override void _Consultar_Stock_Disponible(ref DataTable tdtStockLote)
90  {
91  string lcSql = string.Empty;
92 
93  string lcOn = EW_GLOBAL._Consolida("a.EMPRESA", true, false); // 99489
94 
95  // Consultem el Stock disponible de l'article
96  lcSql = "SELECT a.LOTE, a.CADUCIDAD, a.UNIDADES, a.PESO, a.UBICA, a.TALLA, a.COLOR, " +
97  " 0.00000000000 AS UNIASIG,0.00000000000 AS PESASIG, 0.00000000000 AS UNI2, 0.00000000000 AS PES2, space(20) as ASI, " +
98  " cast(0 as bit) as SEL, cast(0 as bit) as AJENO, cast(0 as bit) as REGULA, space(80) as ORIGEN, 0.00000000000 AS COSTE " +
99  "FROM " + DB.SQLDatabase("LOTES", "STOCKLOTES") + " a " +
100  " LEFT JOIN " + DB.SQLDatabase("LOTES", "LTCTRAN") + " b " +
101  " ON " + lcOn + // 99489
102  " AND a.ALMACEN = b.ALMACEN " +
103  " AND a.ARTICULO = b.ARTICULO " +
104  " AND a.LOTE = b.LOTE " +
105  " AND a.UBICA = b.UBICA " +
106  " AND a.TALLA = b.TALLA " +
107  " AND a.COLOR = b.COLOR " +
108  " AND b.NUMERO = " + DB.SQLString(_oDocLin._Numero) +
109  " WHERE " + lcOn + // 99489
110  " AND a.TALLA = " + DB.SQLString(_oDocLin._Talla) +
111  " AND a.COLOR = " + DB.SQLString(_oDocLin._Color) +
112  " AND a.ARTICULO = " + DB.SQLString(_oDocLin._Articulo) +
113  " AND a.ALMACEN = " + DB.SQLString(_oDocLin._Almacen) +
114  " AND a.FECHA <= " + DB.SQLString(_oDocLin._Fecha) +
115  " AND b.LOTE = null " +
116  " AND b.UBICA = null ";
117 
118  DB.SQLExec(lcSql, ref tdtStockLote);
119  }
120 
125  public override bool _Desactivar_Control_Stock()
126  {
127  return _oLotesConfig._SinMov_Ltctran;
128  }
129 
133  protected override void _DeleteLinDocStockLotes(LinVenDetLotes toDetCodigo)
134  {
135  if (_oLotesConfig._Mostrar_Rendimiento)
136  {
137  DataTable table = new DataTable();
138 
139  string lcSqlPrevistas = "SELECT PREVISTAS FROM " + DB.SQLDatabase("LOTES", "LTCTRAN") + " " +
140  " WHERE PERIODO = " + DB.SQLString(_cPeriodo) + " " +
141  " AND EMPRESA = " + DB.SQLString(_oDocLin._Empresa) + " " +
142  " AND NUMERO = " + DB.SQLString(_oDocLin._Numero) + " " +
143  " AND LOTE = " + DB.SQLString(toDetCodigo._Codigo) + " " +
144  " AND UBICA = " + DB.SQLString(toDetCodigo._Ubicacion) + " " +
145  " AND TALLA = " + DB.SQLString(toDetCodigo._Talla) + " " +
146  " AND COLOR = " + DB.SQLString(toDetCodigo._Color) + " ";
147 
148  //Executo la consulta
149  DB.SQLExec(lcSqlPrevistas, ref table);
150 
151  if (table != null && table.Rows.Count > 0)
152  {
153  _Previstas = Convert.ToDecimal(table.Rows[0]["PREVISTAS"]);
154  }
155  else
156  {
157  _Previstas = toDetCodigo._Unidades;
158  }
159  }
160 
161  string lcSql = " AND PERIODO = " + DB.SQLString(_cPeriodo) + " " +
162  " AND EMPRESA = " + DB.SQLString(_oDocLin._Empresa) + " " +
163  " AND NUMERO = " + DB.SQLString(_oDocLin._Numero) + " " +
164  " AND LOTE = " + DB.SQLString(toDetCodigo._Codigo) + " " +
165  " AND UBICA = " + DB.SQLString(toDetCodigo._Ubicacion) + " " +
166  " AND TALLA = " + DB.SQLString(toDetCodigo._Talla) + " " +
167  " AND COLOR = " + DB.SQLString(toDetCodigo._Color) + " ";
168 
169  _dOldCreated = Convert.ToDateTime(DB.SQLValor("LTCTRAN", "1=1 " + lcSql + " AND '' ", "", "CREATED", "LOTES"));
170 
171  // Taula LOTES!LTCTRAN
172  lcSql = "DELETE FROM " + DB.SQLDatabase("LOTES", "LTCTRAN") + " WHERE 1=1 " + lcSql;
173 
174  //Executo la consulta
175  DB.SQLExec(lcSql);
176  }
177 
181  protected override void _InsertLinDocStockLotes(LinVenDetLotes toDetCodigo)
182  {
183  string lcSql = string.Empty;
184 
185  lcSql = "INSERT INTO " + DB.SQLDatabase("LOTES", "LTCTRAN") + " " +
186  "(EMPRESA,NUMERO,FECHA,ARTICULO,LOTE,UNIDADES,PREVISTAS,ACABADO,PERIODO,ALMACEN,CADUCIDAD,UBICA,FECHA2,PESO,TALLA,COLOR,ASI" +
187  (_dOldCreated == DateTime.MinValue ? "" : ",CREATED") +
188  ") " +
189  "VALUES (" +
190  DB.SQLString(_oDocLin._Empresa) + ", " +
191  DB.SQLString(_oDocLin._Numero) + ", " +
192  DB.SQLString(_oDocLin._Fecha) + ", " +
193  DB.SQLString(_oDocLin._Articulo) + ", " +
194  DB.SQLString(toDetCodigo._Codigo) + ", " +
195  DB.SQLString(toDetCodigo._Unidades) + ", " +
196  DB.SQLString(_Previstas) + ", " +
197  DB.SQLString(false) + ", " +
198  DB.SQLString(_cPeriodo) + ", " +
199  DB.SQLString(_oDocLin._Almacen) + ", " +
200  DB.SQLString(toDetCodigo._Caducidad) + ", " +
201  DB.SQLString(toDetCodigo._Ubicacion) + ", " +
202  DB.SQLString(DateTime.Now) + ", " +
203  DB.SQLString(toDetCodigo._Peso) + ", " +
204  DB.SQLString(_oDocLin._Talla) + ", " +
205  DB.SQLString(_oDocLin._Color) + ", " +
206  DB.SQLString(toDetCodigo._Asi) + " " +
207  (_dOldCreated == DateTime.MinValue ? "" : ", " + DB.SQLString(_dOldCreated)) +
208  ") ";
209 
210  DB.SQLExec(lcSql);
211  }
212 
217  protected override string _Obtener_Nombre_Articulo()
218  {
219  return _oDocLin._NombreArticulo;
220  }
221 
228  {
229  //No se prevee que se necesite este método
230  return false;
231  }
232 
239  public bool _OperacionesDeCierre(IDocLineaFabricacion toLinea, bool deshacerCierre = false)
240  {
241  if (_oLotesConfig._Coste_Lote)
242  {
243  if (deshacerCierre)
244  {
245 
246  }
247  else //Operaciones de cierre
248  {
249  //Actualizar coste
250  _oDocLin = toLinea;
251  _Coste_Cargar_Datos();
252  _Coste_Actualitzar_Datos();
253  }
254  }
255  return true;
256  }
257 
262  protected override bool _Autocreacion()
263  {
264  return _oLotesConfig._Crear_Transformacion;
265  }
266 
272  protected override DataTable _Coste_Obtener_Datos(string lcConsulta)
273  {
274  DataTable ldtCosteLote = new DataTable();
275 
276  DB.SQLExec("SELECT ARTICULO,LOTE" + lcConsulta + " FROM " + DB.SQLDatabase("LOTES", "LTCTRAN") +
277  " WHERE PERIODO = " + DB.SQLString(_cPeriodo) + " " +
278  " AND EMPRESA = " + DB.SQLString(_oDocLin._Empresa) +
279  " AND NUMERO = " + DB.SQLString(_oDocLin._Numero) +
280  " AND LOTE!='' ", ref ldtCosteLote);
281 
282  return ldtCosteLote;
283  }
284 
289  protected override void _Coste_Actualizar_Lote(string lcAsi)
290  {
291  DB.SQLExec(" Update " + DB.SQLDatabase("LOTES", "LTCTRAN") +
292  " Set Asi = " + DB.SQLString(lcAsi) +
293  " WHERE PERIODO = " + DB.SQLString(_cPeriodo) + " " +
294  " AND EMPRESA = " + DB.SQLString(_oDocLin._Empresa) +
295  " AND NUMERO = " + DB.SQLString(_oDocLin._Numero) +
296  " And asi = '' ");
297  }
298 
299  #region IStockExtRegulari
300 
306  protected override void _Preparar_UpdateSilent_Unidades(decimal tnValor, ref Dictionary<String, Object> toDic)
307  {
308  toDic.Add("SALIDA", tnValor);
309  }
310 
316  protected override void _Preparar_UpdateSilent_Peso(decimal tnValor, ref Dictionary<String, Object> toDic)
317  {
318  toDic.Add("PESO", tnValor);
319  }
320 
321 
327  protected override void _Preparar_UpdateSilent_Cajas(decimal tnValor, ref Dictionary<string, object> toDic)
328  {
329  // En los traspaso de depositos, no tiene que modificar las cajas.
330  }
331 
332 
338  public bool _Delete(IDocLineaFabricacion toLinea)
339  {
340  DataTable ldtOldDades = new DataTable();
341  string lcSql = "";
342  bool llCamposAdicionales = Convert.ToBoolean(EW_GLOBAL._GetVariable("wl_mcampos2"));
343 
344  // Taula LOTES!LTCPROD
345  lcSql = "SELECT DISTINCT ASI, ARTICULO, ALMACEN, TALLA, COLOR " + (llCamposAdicionales ? ", LOTE" : "") +
346  " FROM " + DB.SQLDatabase("LOTES", "LTCTRAN") + " " +
347  " WHERE PERIODO = " + DB.SQLString(_cPeriodo) + " " +
348  " AND EMPRESA = " + DB.SQLString(toLinea._Empresa) + " " +
349  " AND NUMERO = " + DB.SQLString(toLinea._Numero);
350 
351  //Executo la consulta
352  if (!DB.SQLExec(lcSql, ref ldtOldDades))
353  return false;
354 
355  lcSql = "Delete From " + DB.SQLDatabase("LOTES", "LTCTRAN") +
356  " Where empresa = " + DB.SQLString(toLinea._Empresa) +
357  " And numero = " + DB.SQLString(toLinea._Numero) +
358  " And periodo = " + DB.SQLString(_cPeriodo);
359 
360  if (!DB.SQLExec(lcSql))
361  return false;
362 
363 
364  string lcArticulo = string.Empty;
365  string lcAlmacen = string.Empty;
366  string lcTalla = string.Empty;
367  string lcColor = string.Empty;
368 
369  if (ldtOldDades.Rows.Count > 0)
370  {
371  foreach (DataRow ldr in ldtOldDades.Rows)
372  {
373  lcArticulo = ldr["ARTICULO"].ToString().Trim();
374  lcAlmacen = ldr["ALMACEN"].ToString().Trim();
375  lcTalla = ldr["TALLA"].ToString().Trim();
376  lcColor = ldr["COLOR"].ToString().Trim();
377 
378  if (_oLotesConfig._Coste_Lote)
379  {
380  lcSql = "DELETE " + DB.SQLDatabase("LOTES", "COSTELOT") + " WHERE ASI = " + DB.SQLString(ldr["asi"]) + " ";
381  DB.SQLExec(lcSql);
382  }
383 
384  // Campos adicionales de los lotes
385  if (llCamposAdicionales)
386  {
387  // Comprobar si la pareja Articulo-Lote se utiliza en otros documentos
388  DataTable ldtStockPartidas = _Stocklote_Tabla(lcArticulo, ldr["LOTE"].ToString().Trim(), "", lcTalla, lcColor);
389  if (ldtStockPartidas.Rows.Count == 0)
390  {
391  string tcCodigoTmp = lcArticulo.PadRight(Convert.ToInt32(EW_GLOBAL._GetLenCampo(global.Diccionarios.KeyDiccionarioLenCampos.wn_articulo))) + ldr["LOTE"].ToString().Trim();
392 
396  }
397  }
398 
399 
400  _Refrescar_Stocks(lcArticulo, lcAlmacen, lcTalla, lcColor); // Valors anteriors
401  }
402  }
403 
404  // si els valors son identics, no m'ho cal tornar a fer.
405  if (lcArticulo != toLinea._Articulo.Trim() || lcAlmacen != toLinea._Almacen.Trim() || lcTalla != toLinea._Talla.Trim() || lcColor != toLinea._Color.Trim())
406  _Refrescar_Stocks(toLinea._Articulo, toLinea._Almacen, toLinea._Talla, toLinea._Color);
407 
408 
409  return true;
410  }
411 
418  public bool _Delete(string tcLote, IDocumentLinea toLinea)
419  {
420  return true;
421  }
422 
430  public bool _Show(object toPadre, IDocumentLinea toLinea, bool tlReadOnly = false)
431  {
432  return true;
433  }
434 
443  public bool _Show(IDocLineaFabricacion toLinea, eCampoDocumentLinea teCampo, object toValue, ref string tcMensajeError)
444  {
445  bool llGestionEspecial = false;
446 
447  switch (teCampo)
448  {
449  case eCampoDocumentLinea.Unidades:
450  case eCampoDocumentLinea.Peso:
451  case eCampoDocumentLinea.Cajas:
452  case eCampoDocumentLinea.Talla:
453  case eCampoDocumentLinea.Color:
454 
455  // Control especial para saber si el documento se consulta de sólo lectura (PE-90431)
456  if (toValue == null) _ReadOnly = true;
457 
458  if (!_ReadOnly)
459  {
460  if (((Sage.ES.S50.Fabricacion.Negocio.Documentos.AlbaranTransformacion)toLinea)._Validar_Solo_Lectura()) _ReadOnly = true;
461  }
462 
463  // Si el objecte toValue es false, vol dir que venim des del botó
464  if ((toValue is bool && (bool)toValue == false) || _ReadOnly) // PE-90431
465  _Iniciar_Asignacion_Lotes(toLinea, false);
466  else
467  _Iniciar_Asignacion_Lotes(toLinea, true);
468 
469  tcMensajeError = _Error_Message;
470  llGestionEspecial = true;
471  break;
472 
473  default:
474  break;
475  }
476 
477  return llGestionEspecial;
478  }
479 
485  public bool _Update(IDocLineaFabricacion toLinea)
486  {
487  string lcSql = "Update " + DB.SQLDatabase("LOTES", "LTCTRAN") +
488  " Set acabado = " + DB.SQLString(toLinea._Acabado) + ", fecha = " + DB.SQLString(toLinea._Fecha) +
489  " Where empresa = " + DB.SQLString(toLinea._Empresa) +
490  " And numero = " + DB.SQLString(toLinea._Numero) +
491  " And periodo = " + DB.SQLString(_cPeriodo);
492 
493  DB.SQLExec(lcSql);
494 
495  _Refrescar_Stocks(toLinea._Articulo, toLinea._Almacen, toLinea._Talla, toLinea._Color);
496 
497  return true;
498  }
499 
505  protected override void _Preparar_UpdateSilent_Coste(decimal tnValor, ref Dictionary<String, Object> toDic)
506  {
507  toDic.Add("COSTEUNIT", tnValor);
508  }
509 
516  public bool _Obtener_Detalle(IDocLineaFabricacion toLinea, ref DataTable tdtResultados)
517  {
518  bool llOk = false;
519  string lcSql = String.Empty;
520 
521  lcSql = "SELECT LOTE AS CODIGO, UNIDADES, PESO " +
522  "FROM " + DB.SQLDatabase("LOTES", "LTCTRAN") + " " +
523  "WHERE EMPRESA = " + DB.SQLString(toLinea._Empresa) +
524  " AND NUMERO = " + DB.SQLString(toLinea._Numero) +
525  " AND PERIODO = " + DB.SQLString(_cPeriodo);
526  llOk = DB.SQLExec(lcSql, ref tdtResultados);
527 
528  return llOk;
529  }
530 
539  public bool _Operacion_Permitida(IDocLineaFabricacion toLinea, eCampoDocumentLinea teCampo, object toValue, ref string tcMensajeRespuesta)
540  {
541  bool llCondicion = false;
542 
543  // 103484
544  llCondicion = llCondicion || teCampo == eCampoDocumentLinea.Articulo && !String.IsNullOrWhiteSpace(toLinea._Articulo) && String.Compare(toLinea._Articulo, (string)toValue) != 0;
545  llCondicion = llCondicion || teCampo == eCampoDocumentLinea.Talla && !String.IsNullOrWhiteSpace(toLinea._Talla) && String.Compare(toLinea._Talla, (string)toValue) != 0;
546  llCondicion = llCondicion || teCampo == eCampoDocumentLinea.Color && !String.IsNullOrWhiteSpace(toLinea._Color) && String.Compare(toLinea._Color, (string)toValue) != 0;
547  llCondicion = llCondicion && toLinea._Unidades > 0;
548  // fi 103484
549 
550 
551  //Sin restricciones específicas => Operaciones permitidas
552  if (llCondicion)
553  {
554  string lcDef = Convert.ToString(EW_GLOBAL._GetVariable("wc_deflote"));
555 
556  tcMensajeRespuesta = "No se puede modificar el artículo de la cabecera, porque existen unidades asignadas.";
557  return false;
558  }
559 
560  return true;
561  }
562 
569  {
570  return true;
571  }
572 
579  public bool _SePuedeAbrir(IDocLineaFabricacion toLinea, bool hayFormulario = false)
580  {
581  return true;
582  }
583 
584  #endregion IStockExtRegulari
585  }
586 
591  {
592  private string _cPeriodo = Convert.ToString(EW_GLOBAL._GetVariable("wc_any"));
593 
598  {
599 
600  }
601 
602 
610  {
611  DataTable table = new DataTable();
612 
613  int lnlinea = (toLinea._LineaReal < 0 ? toLinea._LineaReal * (-1) : toLinea._LineaReal);
614 
615  DB.SQLExec(" SELECT 1 FROM " + DB.SQLDatabase("LOTES", "LTCTRAN") + " " +
616  " WHERE PERIODO = " + DB.SQLString(_cPeriodo) +
617  " AND EMPRESA = " + DB.SQLString(toLinea._Empresa) +
618  " AND NUMERO = " + DB.SQLString(toLinea._Numero) +
619  " AND LINIA = " + DB.SQLString(lnlinea) +
620  " AND LOTE = " + DB.SQLString(toLote._Lote) +
621  " AND UBICA = " + DB.SQLString("") +
622  " AND TALLA = " + DB.SQLString(toLinea._Talla) +
623  " AND COLOR = " + DB.SQLString(toLinea._Color), ref table);
624 
625  if (table.Rows.Count == 0)
626  {
627  DB.SQLExec("INSERT INTO " + DB.SQLDatabase("LOTES", "LTCTRAN") + " " +
628  "(EMPRESA,NUMERO,FECHA,ARTICULO,LINIA,LOTE,UNIDADES,PERIODO,ALMACEN,CADUCIDAD,UBICA,FECHA2,PESO,TALLA,COLOR,ASI) " +
629  "VALUES (" +
630  DB.SQLString(toLinea._Empresa) + ", " +
631  DB.SQLString(toLinea._Numero) + ", " +
632  DB.SQLString(toLinea._Fecha) + ", " +
633  DB.SQLString(toLote._Articulo) + ", " +
634  DB.SQLString(lnlinea) + ", " +
635  DB.SQLString(toLote._Lote) + ", " +
636  DB.SQLString(toLote._Unidades) + ", " +
637  DB.SQLString(_cPeriodo) + ", " +
638  DB.SQLString(toLinea._Almacen) + ", " +
639  DB.SQLString(toLote._Caducidad) + ", " +
640  DB.SQLString(toLote._Ubicacion) + ", " +
641  DB.SQLString(DateTime.Now) + ", " +
642  DB.SQLString(toLote._Peso) + ", " +
643  DB.SQLString(toLinea._Talla) + ", " +
644  DB.SQLString(toLinea._Color) + ", " +
645  DB.SQLString(toLote._Asi) + ") ");
646  }
647 
648  return true;
649  }
650  }
651 }
bool _Delete(IDocLineaFabricacion toLinea)
Método delete en documentos de regularización
bool _Delete(string tcLote, IDocumentLinea toLinea)
Operaciones de borrado
Clase para controlar toda la gestion de venta de un lote/ubicacion de artículo
bool _Asignar_Articulos_Lote(sage.ew.lote.Clases.Lote toLote, IDocumentLinea toLinea)
Insertar la información en la tabla LOTES!LTCTRAN
Clase de negocio del albarán de transformación
bool _ObtenerCosteLinea(IDocLineaFabricacion toLinea)
Obtiene el coste de la línea
override bool _Desactivar_Control_Stock()
Nou metode buit que es sobreescriurà per cada document, per verificar el control d&#39;stock ...
bool _Show(IDocLineaFabricacion toLinea, eCampoDocumentLinea teCampo, object toValue, ref string tcMensajeError)
Método para tratar los cambios de valor en los campos
bool _Update(IDocLineaFabricacion toLinea)
Método _Update para documentos de regularización
Clase para la gestión de los lotes
Definition: Lote.cs:37
bool _Se_Puede_Borrar(IDocLineaFabricacion toLinea)
Método lineal para comprobar si la línea se puede borrar
override void _ComprobarBloqueos()
Comprobar si existe alguna restricción, para que se abra el formulario de asignación de lotes...
bool _Operacion_Permitida(IDocLineaFabricacion toLinea, eCampoDocumentLinea teCampo, object toValue, ref string tcMensajeRespuesta)
Método de comprobación de operaciones permitidas
string _Talla
Codigo de la talla
Interficie mínima de las líneas (Mantener lo mas reducida posible)
Definition: IDocument.cs:186
override void _DeleteLinDocStockLotes(LinVenDetLotes toDetCodigo)
Nou metode buit que es sobreescriurà per cada document, per eliminar els moviments a les taules de lo...
override void _InsertLinDocStockLotes(LinVenDetLotes toDetCodigo)
Nou metode buit que es sobreescriurà per cada document, per insertar els moviments a les taules de lo...
eCampoDocumentLinea
Definición del enumerado de los campos de una linea de documento
Definition: IDocument.cs:134
override void _Preparar_UpdateSilent_Unidades(decimal tnValor, ref Dictionary< String, Object > toDic)
Preparar las unidades a utilizar en el _UpdateSilent
Clase de lotes para las cabeceras documentos de fabricación (transformación)
Nullable< DateTime > _Caducidad
Fecha de caducidad del lote (Accepta NULL)
override void _Preparar_UpdateSilent_Coste(decimal tnValor, ref Dictionary< String, Object > toDic)
Preparar el coste a utilizar en el _UpdateSilent
override bool _Autocreacion()
Indica si está activada la creación automática dependiendo del tipo de documento
LoteDocTransformacionCabecera(string tcLote, IDocLineaFabricacion toLinea=null)
Constructor de la clase LoteDocTransformacionCabecera con parametros
bool _SePuedeAbrir(IDocLineaFabricacion toLinea, bool hayFormulario=false)
Método para comprobar si se puede abrir
Interficie para operaciones extendidas de fabricación
LoteDocTransformacionCabecera()
Constructor de la clase LoteDocTransformacionCabecera
virtual Boolean _Delete()
Elimina los valores de los campos adicionales
string _Codigo
Código de lote asociado
override void _Preparar_UpdateSilent_Peso(decimal tnValor, ref Dictionary< String, Object > toDic)
Preparar el peso a utilizar en el _UpdateSilent
bool _OperacionesDeCierre(IDocLineaFabricacion toLinea, bool deshacerCierre=false)
Método para llamar a la función de operaciones de cierre
Classe Robot (Comportamiento) para la cabecera de transformación
override void _Preparar_UpdateSilent_Cajas(decimal tnValor, ref Dictionary< string, object > toDic)
Preparar las cajas a utilizar en el _UpdateSilent
bool _Show(object toPadre, IDocumentLinea toLinea, bool tlReadOnly=false)
Nos presenta el formulario para visualizar/operar con las series
override string _Obtener_Nombre_Articulo()
Obtener el nombre del artículo de la linea actual
bool _Obtener_Detalle(IDocLineaFabricacion toLinea, ref DataTable tdtResultados)
Método que obtiene los lotes asociados a la línea
decimal _Peso
Peso asignado a la venta
string _Ubicacion
Código de la ubicación
TipoDocumento
Enum del tipo de codumento
override void _Consultar_Stock_Disponible(ref DataTable tdtStockLote)
Consultar stock disponible
Definición de la interfície necesaria para los objetos de documento utilizados en el formulario FormD...
override DataTable _Coste_Obtener_Datos(string lcConsulta)
Obtener datos de las tablas del módulo de Lotes, para la gestión de los costes específicos ...
string _Asi
Asi del registro
override void _Consultar_Lotes_Documento()
Nou metode buit que es sobreescriurà per cada document
int _LineaReal
Devuelve el campo linia: para todos los documentos sera el mismo valor que la linea pero en el docume...
Definition: IDocument.cs:207
decimal _Unidades
Unidades asignadas a la venta
override bool _Es_Documento_Fabricacion()
Indica si es un documento de fabricacion (Producción, Transformación)
override void _Coste_Actualizar_Lote(string lcAsi)
Actualizar las tablas del módulo de Lotes, con el Asi relativo a los costes específicos ...