
    >:hF                     P    d dl mZ d dlmZ d dlmZ  G d dej                  ZdS )    )models)UnidadMedida)
Referenciac                   v    e Zd Z ej        dd          Z ej        d          Z ej        e	ej
        ddid	          Z ej        d
          Z ej        eej        ddid	          Z ej        eej        ddid	          Z ej        eej        ddid	          Z ej        ddd          Z ej        ddd          Z ej        ddd          Z ej        dddd          Z ej        ddd          Z ej        d          Z ej        d          Z ej        dddd          Z ej        dd          Z ej        ddd d          Z ej        ddd!d          Zd"d#gZ ej        ded$d%&          Z  ej!        d'd(d(d)*          Z" G d+ d,          Z# fd-Z$d. Z% xZ&S )/EmpaqueDistribuciond   zNombre del empaque)
max_lengthverbose_nameu   Descripción)r
   tipoPTempaques_distribucion)	on_deletelimit_choices_torelated_namezUnidades por empaquelongitudempaques_longitudpesoempaques_pesovolumenempaques_volumen
      Largo)
max_digitsdecimal_placesr
   AnchoAltoVolumenF)r   r   r
   editablezPeso empaque llenou   Niveles máximos a apilarzEmpaques por nivel de estibau   Altura óptimau   Ítems por estiva)r
   r   zPeso por estiva completazVolumen por estiva)leanLean)no_leanzNo Leanr"   u   ¿Es empaque lean?)r	   choicesdefaultr
   zsimbolos_empaque/Tu   Símbolo del empaque)	upload_tonullblankr
   c                       e Zd ZdZdZdS )EmpaqueDistribucion.Metau   Empaque de Distribuciónu   Empaques de DistribuciónN)__name__
__module____qualname__r
   verbose_name_plural     <C:\Users\a_gir\Desktop\Interacto\siip\distribucion\models.pyMetar)   m   s        19r/   r1   c                 B   | j         | j        z  | j        z  | _        | j        | j        z  | _        | j        | j        z  | j        z  | _        | j	        | j        z  | j        z  | _
        | j        | j        z  | j        z  | _         t                      j        |i | d S )N)largoanchoaltor   niveles_maximos_estibaaltura_optimaunidades_por_empaqueempaques_por_nivelitems_por_estibapeso_empaque_llenopeso_estiva_completavolumen_estivasupersave)selfargskwargs	__class__s      r0   r?   zEmpaqueDistribucion.saveq   s    zDJ.:!Y)DD%#$'( 	 ##$'( 	! L#$'( 	
 	d%f%%%%%r/   c                 $    | j          d| j         S )Nz para )nombre
referencia)r@   s    r0   __str__zEmpaqueDistribucion.__str__   s    +66T_666r/   )'r*   r+   r,   r   	CharFieldrE   	TextFielddescripcion
ForeignKeyr   CASCADErF   PositiveIntegerFieldr8   r   PROTECTunidad_medida_longitudunidad_medida_pesounidad_medida_volumenDecimalFieldr3   r4   r5   r   r;   r6   r9   r7   r:   r<   r=   LEAN_CHOICESempaque_lean
ImageFieldsimbolor1   r?   rG   __classcell__)rC   s   @r0   r   r      s^       V;OPPPF"&"???K"". $,	  J 766+   /V.. *-(	   +*. &)$	   .F-. ),'	    F  E
  F  E
 6  D
 "f!	  G -,)  
 9V80   543   (F'%	  M 3v2(   /6./	   )V()	  N 	L
 $6#)	  L  f%+	  G: : : : : : : :& & & & &*7 7 7 7 7 7 7r/   r   N)	django.dbr   listas_configuracion.modelsr   referencias.modelsr   Modelr   r.   r/   r0   <module>r\      s{          4 4 4 4 4 4 ) ) ) ) ) )A7 A7 A7 A7 A7&, A7 A7 A7 A7 A7r/   