+
    iH                    `   ^ RI Ht ^ RI HtHtHtHtHtHtHtHt ^ RI	H	t	 ^ RI
t
^ RIt^ RIt^ RIt^ RIHt ^ RIt^ RIt^ RIHt ^ RIHt ^ RIHt ^ R	IHtHtHt ^ R
I	H	t	Ht ^ RIHt ^ RIHt ^ RI H!t!H"t"H#t#H$t$H%t%H&t&H't'H(t(H)t)H*t*H+t+H,t,H-t-H.t.H/t/H0t0H1t1H2t2H3t3H4t4H5t5H6t6H7t7H8t8H9t9H:t:H;t;H<t<H=t=H>t>H?t?H@t@HAtAHBtBHCtCHDtDHEtEHFtFHGtGHHtHHItIHJtJHKtKHLtLHMtMHNtNHOtOHPtPHQtQHRtRHStSHTtTHUtUHVtVHWtWHXtXHYtYHZtZH[t[H\t\H]t]H^t^H_t_H`t`HataHbtbHctcHdtdHeteHftfHgtgHhthHitiHjtjHktkHltlHmtmHntnHotoHptpHqtqHrtrHstsHtttHutu ^ RIvHwtw ^ RIxHytyHztz R t{R# )    )current_app)jsonifyrequestredirecturl_forsessionr   render_templateflash)datetimeN)Decimal)send_activation_email)Message)NamedTemporaryFile)HostSCHEME
Productivo)r   date)FileStorage)subir_archivo_ftp_desde_request)Uget_fueltypeget_kw_by_fuelget_engine_brandsget_alternator_brandsget_voltagesget_certificationsget_breaker_catalogget_protection_typesget_control_brandsget_control_modelsget_preheater_voltagesget_battery_chargersget_enclosure_typesget_enclosure_materialsget_enclosure_lights_acget_enclosure_lights_dcget_enclosure_space_heatersget_enclosure_load_centersget_estop_catalogget_spring_catalogget_tank_capacity_catalogget_tank_type_catalogget_spill_containment_catalogget_warranty_catalogget_testing_catalog
save_quoteget_quote_dataget_genset_dataupdate_genset_pricingget_breaker_dataget_protection_dataupdate_breaker_pricingupdate_protection_pricingget_breaker_option_dataupdate_breaker_option_pricingget_controller_dataupdate_controller_pricingget_preheater_dataupdate_preheater_pricingget_battery_charger_dataupdate_battery_charger_pricingget_controller_option_qty_dataupdate_dse2157_pricingupdate_dse2548_pricingupdate_comap_dse2157_pricingupdate_comap_dse2548_pricingget_controller_option_data update_controller_option_pricingget_enclosure_dataget_light_dataget_space_heater_dataget_load_center_dataupdate_enclosure_pricing"update_enclosure_component_pricingget_enclosure_option_qty_dataget_enclosure_option_dataupdate_enclosure_option_pricingget_spring_isolator_dataget_estop_dataupdate_estop_pricingupdate_spring_isolator_pricingget_accessory_option_dataupdate_accessory_option_pricingget_tank_dataget_spill_containment_dataget_tank_option_dataupdate_tank_pricingupdate_tank_option_pricingget_warranty_dataget_testing_dataupdate_warranty_pricingupdate_testing_pricingget_Definitive_quote_dataget_genset_modelget_frecuencyget_seller_infoget_profile_infoupdate_RoutePDFget_RoutePDFget_countrysget_discount_country_value update_commercial_country_valuesgetAll_StopButtonEnclosuregetAll_louvers_ingetAll_louvers_out)CZE_Quotes_Controller)CZE_Quotes_Service"StopButtonEnclosureOptions_Servicec                    a aa$a%a&a'a(a)a*a+a,a-a.a/a0a1a2a3a4a5a6a7a8 S P                  R R.R7      R 4       pS P                  RR.R7      R 4       pS P                  RR.R7      R 4       pS P                  RR.R7      R	 4       pS P                  R
R.R7      R 4       pS P                  RR.R7      R 4       pS P                  RR.R7      R 4       pS P                  R4      R 4       p	S P                  R4      R 4       p
S P                  R4      R 4       pS P                  R4      R 4       pS P                  R4      R 4       pS P                  R4      R 4       pS P                  R4      R 4       pS P                  R4      R 4       pS P                  R 4      R! 4       pS P                  R"4      R# 4       pS P                  R$R.R7      R% 4       pS P                  R&R.R7      R' 4       pS P                  R(R.R7      R) 4       pS P                  R*R.R7      R+ 4       pS P                  R,R.R7      R- 4       pS P                  R.R.R7      R/ 4       pS P                  R04      R1 4       pS P                  R24      R3 4       pS P                  R4R.R7      R5 4       pS P                  R6R.R7      R7 4       pS P                  R8R.R7      R9 4       pS P                  R:4      R; 4       pS P                  R<R.R7      R= 4       pS P                  R>R?.R7      V73R@ l4       p RA o7S P                  RBRR?.R7      V$V%V&V'V(V)V*V+V/V0V1V2V3V4V5V6V83RC l4       p!V,3RD lo*V,3RE lo(V.3RF lo2V,3RG lo%V.3RH lo5V,3RI lo&V.3RJ lo0V,3RK lo$V.3RL lo/V,3RM lo'V.3RN lo1V,3RO lo)V.3RP lo3V,3RQ lo+RR o6V.3RS lo4RT o8RU o.RV o,S P                  RWR?.R7      V$V%V&V'V(V)V*V+V V-V/V0V1V2V3V4V5V6VV83RX l4       p"S P                  RYR.R7      RZ 4       p#R[ o-R\# )]z+/Ventas/Ventas_EUA/Cotizador_EUA/fuel-typesGET)methodsc                       \        4       p \        V 4      ^3#   \         d#   p\        R\        T4      /4      R3u Rp?# Rp?ii ; i   error  N)r   r   	Exceptionstr
fuel_typeses     dC:\Users\victor.barrera\Documents\proyectos\elepV3\Elep\src\App\Ventas_Module\VentasEUA\Cotizador.pyget_fuel_types(get_optionsimput.<locals>.get_fuel_types;   sG    	3%J:&++ 	3GSV,-s22	3    AAAAz4/Ventas/Ventas_EUA/Cotizador_EUA/StopButtonEnclosurec                       \        4       p \        V 4      ^3#   \         d#   p\        R\        T4      /4      R3u Rp?# Rp?ii ; irr   )rh   r   rv   rw   rx   s     r{   end_getAll_StopButtonEnclosure8get_optionsimput.<locals>.end_getAll_StopButtonEnclosureD   sH    	335J:&++ 	3GSV,-s22	3r~   z0/Ventas/Ventas_EUA/Cotizador_EUA/load_louvers_inc                       \        4       p \        V 4      ^3#   \         d#   p\        R\        T4      /4      R3u Rp?# Rp?ii ; irr   )ri   r   rv   rw   rx   s     r{   end_getAll_louvers_in/get_optionsimput.<locals>.end_getAll_louvers_inM   sH    	3*,J:&++ 	3GSV,-s22	3r~   z1/Ventas/Ventas_EUA/Cotizador_EUA/load_louvers_outc                       \        4       p \        V 4      ^3#   \         d#   p\        R\        T4      /4      R3u Rp?# Rp?ii ; irr   )rj   r   rv   rw   rx   s     r{   end_getAll_louvers_out0get_optionsimput.<locals>.end_getAll_louvers_outV   sH    	3+-J:&++ 	3GSV,-s22	3r~   z8/Ventas/Ventas_EUA/Cotizador_EUA/capacidades/<fuel_type>c                      \        V 4      p\        V4      ^3#   \         d#   p\        R\        T4      /4      R3u Rp?# Rp?ii ; irr   )r   r   rv   rw   )	fuel_typecapacidadesrz   s   &  r{   get_capacidades)get_optionsimput.<locals>.get_capacidades_   sJ    	3(3K;',, 	3GSV,-s22	3    AAAAzF/Ventas/Ventas_EUA/Cotizador_EUA/engine-brands/<fuel_type>/<kw_output>c                      \        W4      p\        V4      ^3#   \         d#   p\        R\        T4      /4      R3u Rp?# Rp?ii ; irr   )r   r   rv   rw   )r   	kw_outputbrandsrz   s   &&  r{   get_engine_brands_route1get_optionsimput.<locals>.get_engine_brands_routeh   sI    	3&y<F6?C'' 	3GSV,-s22	3r   z\/Ventas/Ventas_EUA/Cotizador_EUA/alternator-brands/<fuel_type>/<kw_output>/<engine_brand_id>c                      \        WV4      p\        V4      ^3#   \         d#   p\        R\        T4      /4      R3u Rp?# Rp?ii ; irr   )r   r   rv   rw   )r   r   engine_brand_idr   rz   s   &&&  r{   get_alternator_brands_route5get_optionsimput.<locals>.get_alternator_brands_routeq   sK    	3*9QF6?C'' 	3GSV,-s22	3    AAAAzi/Ventas/Ventas_EUA/Cotizador_EUA/voltages/<fuel_type>/<kw_output>/<engine_brand_id>/<alternator_brand_id>c                      \        WW#4      p\        V4      ^3#   \         d#   p\        R\        T4      /4      R3u Rp?# Rp?ii ; irr   )r   r   rv   rw   )r   r   r   alternator_brand_idvoltagesrz   s   &&&&  r{   get_voltages_route,get_optionsimput.<locals>.get_voltages_routez   sL    	3#I/_H8$c)) 	3GSV,-s22	3r   z|/Ventas/Ventas_EUA/Cotizador_EUA/certifications/<fuel_type>/<kw_output>/<engine_brand_id>/<alternator_brand_id>/<voltage_id>c                      \        WW#V4      p\        V4      #   \         d#   p\        R \        T4      /4      R3u Rp?# Rp?ii ; irt   ru   N)r   r   rv   rw   )r   r   r   r   
voltage_idcertificationsrz   s   &&&&&  r{   get_certifications_route2get_optionsimput.<locals>.get_certifications_route   sJ    	3/	olvwN>** 	3GSV,-s22	3r   z0/Ventas/Ventas_EUA/Cotizador_EUA/breaker-optionsc                       \        4       p \        V 4      #   \         d#   p\        R \        T4      /4      R3u Rp?# Rp?ii ; ir   )r   r   rv   rw   )breakersrz   s     r{   get_breaker_catalog_route3get_optionsimput.<locals>.get_breaker_catalog_route   sC    	3*,H8$$ 	3GSV,-s22	3s    A?AAz@/Ventas/Ventas_EUA/Cotizador_EUA/protection-types/<breaker_type>c                      \        V 4      p\        V4      #   \         d#   p\        R \        T4      /4      R3u Rp?# Rp?ii ; ir   )r   r   rv   rw   )breaker_typeprotectionsrz   s   &  r{   get_protection_types_route4get_optionsimput.<locals>.get_protection_types_route   sE    	3.|<K;'' 	3GSV,-s22	3    AA A Az/Ventas/Ventas_EUA/Cotizador_EUA/control-brands/<fuel_type>/<kw_output>/<engine_brand_id>/<alternator_brand_id>/<voltage_id>/<certification_id>c                      \        WW#WE4      p\        V4      #   \         d1   p\        R T 24       \        R\	        T4      /4      R3u Rp?# Rp?ii ; i)z$Error obteniendo marcas de control: rt   ru   N)r   r   rv   printrw   )r   r   r   r   r   certification_idr   rz   s   &&&&&&  r{   get_control_brands_route2get_optionsimput.<locals>.get_control_brands_route   s\    	3'	odn  BF6?" 	38<=GSV,-s22	3s    A%A
AAzB/Ventas/Ventas_EUA/Cotizador_EUA/control-models/<control_brand_id>c                      \        V 4      p\        V4      #   \         d#   p\        R \        T4      /4      R3u Rp?# Rp?ii ; ir   )r   r   rv   rw   )control_brand_idmodelsrz   s   &  r{   get_control_models_route2get_optionsimput.<locals>.get_control_models_route   sE    	3'(89F6?" 	3GSV,-s22	3r   z3/Ventas/Ventas_EUA/Cotizador_EUA/preheater-voltagesc                       \        4       p \        V 4      #   \         d1   p\        R T 24       \        R\	        T4      /4      R3u Rp?# Rp?ii ; i)z,Error obteniendo voltajes de precalentador: rt   ru   N)r    r   rv   r   rw   )r   rz   s     r{   get_preheater_voltages_route6get_optionsimput.<locals>.get_preheater_voltages_route   sS    	3-/H8$$ 	3@DEGSV,-s22	3    A%AAAz1/Ventas/Ventas_EUA/Cotizador_EUA/battery-chargersc                       \        4       p \        V 4      #   \         d1   p\        R T 24       \        R\	        T4      /4      R3u Rp?# Rp?ii ; i)u)   Error obteniendo cargadores de batería: rt   ru   N)r!   r   rv   r   rw   )chargersrz   s     r{   get_battery_chargers_route4get_optionsimput.<locals>.get_battery_chargers_route   sS    	3+-H8$$ 	3=aSABGSV,-s22	3r   z[/Ventas/Ventas_EUA/Cotizador_EUA/enclosure-types/<fuel_type>/<kw_output>/<certification_id>c                      \        WV4      p\        V4      #   \         d#   p\        R \        T4      /4      R3u Rp?# Rp?ii ; ir   )r"   r   rv   rw   )r   r   r   typesrz   s   &&&  r{   get_enclosure_types_route3get_optionsimput.<locals>.get_enclosure_types_route   sG    	3'	>NOE5>! 	3GSV,-s22	3r~   zp/Ventas/Ventas_EUA/Cotizador_EUA/enclosure-materials/<fuel_type>/<kw_output>/<certification_id>/<enclosure_type>c                      \        WW#4      p\        V4      #   \         d#   p\        R \        T4      /4      R3u Rp?# Rp?ii ; ir   )r#   r   rv   rw   )r   r   r   enclosure_type	materialsrz   s   &&&&  r{   get_enclosure_materials_route7get_optionsimput.<locals>.get_enclosure_materials_route   sH    	3/	FVgI9%% 	3GSV,-s22	3r~   z4/Ventas/Ventas_EUA/Cotizador_EUA/enclosure-lights-acc                       \        4       p \        V 4      #   \         d1   p\        R T 24       \        R\	        T4      /4      R3u Rp?# Rp?ii ; i)z%Error obteniendo luces AC de caseta: rt   ru   N)r$   r   rv   r   rw   lightsrz   s     r{   get_enclosure_lights_ac_route7get_optionsimput.<locals>.get_enclosure_lights_ac_route   R    	3,.F6?" 	39!=>GSV,-s22	3r   z4/Ventas/Ventas_EUA/Cotizador_EUA/enclosure-lights-dcc                       \        4       p \        V 4      #   \         d1   p\        R T 24       \        R\	        T4      /4      R3u Rp?# Rp?ii ; i)z%Error obteniendo luces DC de caseta: rt   ru   N)r%   r   rv   r   rw   r   s     r{   get_enclosure_lights_dc_route7get_optionsimput.<locals>.get_enclosure_lights_dc_route   r   r   z8/Ventas/Ventas_EUA/Cotizador_EUA/enclosure-space-heatersc                       \        4       p \        V 4      #   \         d1   p\        R T 24       \        R\	        T4      /4      R3u Rp?# Rp?ii ; i)z*Error obteniendo calentadores de espacio: rt   ru   N)r&   r   rv   r   rw   )heatersrz   s     r{   !get_enclosure_space_heaters_route;get_optionsimput.<locals>.get_enclosure_space_heaters_route   sS    	313G7## 	3>qcBCGSV,-s22	3r   z7/Ventas/Ventas_EUA/Cotizador_EUA/enclosure-load-centersc                       \        4       p \        V 4      #   \         d1   p\        R T 24       \        R\	        T4      /4      R3u Rp?# Rp?ii ; i)z#Error obteniendo centros de carga: rt   ru   N)r'   r   rv   r   rw   )centersrz   s     r{    get_enclosure_load_centers_route:get_optionsimput.<locals>.get_enclosure_load_centers_route   sS    	302G7## 	37s;<GSV,-s22	3r   z1/Ventas/Ventas_EUA/Cotizador_EUA/additional-estopc                       \        4       p \        V 4      ^3#   \         d1   p\        RT 24       \        R\	        T4      /4      R3u Rp?# Rp?ii ; i)rs   z%Error en ruta de paro de emergencia: rt   ru   N)r(   r   rv   r   rw   optionsrz   s     r{   get_estop_catalog_route1get_optionsimput.<locals>.get_estop_catalog_route   sX    	3')G7#S(( 	39!=>GSV,-s22	3    A%A	AAz2/Ventas/Ventas_EUA/Cotizador_EUA/additional-springc                       \        4       p \        V 4      ^3#   \         d1   p\        RT 24       \        R\	        T4      /4      R3u Rp?# Rp?ii ; i)rs   z&Error en ruta de resorte de aislador: rt   ru   N)r)   r   rv   r   rw   r   s     r{   get_spring_catalog_route2get_optionsimput.<locals>.get_spring_catalog_route   sX    	3(*G7#S(( 	3:1#>?GSV,-s22	3r   z:/Ventas/Ventas_EUA/Cotizador_EUA/tank-capacity/<kw_output>c                      \        V 4      p\        V4      #   \         d#   p\        R \        T4      /4      R3u Rp?# Rp?ii ; ir   )r*   r   rv   rw   )r   
capacitiesrz   s   &  r{   get_tank_capacity_route1get_optionsimput.<locals>.get_tank_capacity_route	  sE    	329=J:&& 	3GSV,-s22	3r   zF/Ventas/Ventas_EUA/Cotizador_EUA/tank-type/<kw_output>/<tank_autonomy>c                      \        W4      p\        V4      #   \         d#   p\        R \        T4      /4      R3u Rp?# Rp?ii ; ir   )r+   r   rv   rw   )r   tank_autonomyr   rz   s   &&  r{   get_tank_type_route-get_optionsimput.<locals>.get_tank_type_route  sD    	3))CE5>! 	3GSV,-s22	3r   z2/Ventas/Ventas_EUA/Cotizador_EUA/spill-containmentc                       \        4       p \        V 4      ^3#   \         d#   p\        R\        T4      /4      R3u Rp?# Rp?ii ; irr   )r,   r   rv   rw   r   s     r{   get_spill_containment_route5get_optionsimput.<locals>.get_spill_containment_route  sH    	335G7#S(( 	3GSV,-s22	3r~   z)/Ventas/Ventas_EUA/Cotizador_EUA/countrysc                       \        4       p \        V 4      ^3#   \         d#   p\        R\        T4      /4      R3u Rp?# Rp?ii ; irr   )re   r   rv   rw   r   s     r{   get_countrys_route,get_optionsimput.<locals>.get_countrys_route"  sG    	3"nG7#S(( 	3GSV,-s22	3r~   z1/Ventas/Ventas_EUA/Cotizador_EUA/warranty-optionsc                       \        4       p \        V 4      ^3#   \         d#   p\        R\        T4      /4      R3u Rp?# Rp?ii ; irr   )r-   r   rv   rw   r   s     r{   get_warranty_options_route4get_optionsimput.<locals>.get_warranty_options_route*  sH    	3*,G7#S(( 	3GSV,-s22	3r~   z</Ventas/Ventas_EUA/Cotizador_EUA/testing-options/<kw_output>c                      \        V 4      p\        V4      #   \         d#   p\        R \        T4      /4      R3u Rp?# Rp?ii ; ir   )r.   r   rv   rw   )r   r   rz   s   &  r{   get_testing_options_route3get_optionsimput.<locals>.get_testing_options_route2  sE    	3))4G7## 	3GSV,-s22	3r   z1/Ventas/Ventas_EUA/Cotizador_EUA/get-profile-infoc                      \         P                  ! R 4      p V '       g   \        RR/4      R3# \        V 4      pV'       g   \        RR/4      R3# VP                  R4      R9   d6   VP                  R4      '       d   \	        VR,          4      pV'       d   W!R&   \        V4      ^3#   \
         d1   p\        R	T 24       \        R\        T4      /4      R
3u Rp?# Rp?ii ; i)user_idrt   zUsuario no autenticadoi  zPerfil no encontrado  RequestTypeIDSellerUserID
SellerInfou*   Error obteniendo información del perfil: ru   N)DISEUADISCAN)r   getr   rb   ra   rv   r   rw   )r   profile_infoseller_inforz   s       r{   get_profile_info_route0get_optionsimput.<locals>.get_profile_info_route:  s    	3kk),G)ABCSHH+G4L)?@A3FF 04HH\M]M]^lMmMm-l>.JK1<.<(#-- 	3>qcBCGSV,-s22	3s3   B) B) !B) ,B) >*B) )C$4%CC$C$z+/Ventas/Ventas_EUA/Cotizador_EUA/save-quotePOSTc            	      6  <  \         P                  ! 4       p \        R 4       \        V 4       \        V 4      pS! V4       \	        RRRVRR/4      #   \
         d<   p\        R\        T4       24       \	        RRR\        T4      /4      R	3u R
p?# R
p?ii ; i)u)   Datos recibidos para guardar cotización:successTquote_idmessageu!   Cotización guardada exitosamenteu   Error al guardar cotización: Frt   ru   N)r   get_jsonr   r/   r   rv   rw   )datar  rz   pricing_Gensets      r{   save_quote_route*get_optionsimput.<locals>.save_quote_routeQ  s    	##%D=>$K!$'H8$4H>    	23q6(;<5Q   	s   AA B0BBBc                ^    \        V 4      pV'       g   \        R4      h\        V^ ,          V^,          V^,          V^,          V^,          V^,          V^,          V^,          V^,          4	      pV'       d   \        V VR,          VR,          VR,          VR,          VR,          VR,          VR,          VR	,          VR
,          VR,          VR,          VR,          VR,          VR,          VR,          VR,          VR,          VR,          VR,          VR,          VR,          VR,          VR,          VR,          VR,          4       V^,          pV^,          p^dV^,          ,
          ^d,          p^p^p\	        ^4       F  pWV,           ,          R8w  d5   \        WV,           ,          W54      p	V	'       d   \        W^,           V	4       WV,           ,          R8w  g   Ka  \        WV,           ,          W54      p
V
'       g   K  \        W^,           V
4       K  	  R. R/OR. R0OR. R1OR . R2OR!. R3OR". R4O/p\	        ^4       Fl  pVP                  4        FU  w  rW,          w  ppW,          pVV,          pVR#8w  g   K*  \        VW54      pV'       g   K@  \        V V^,           VV4       KW  	  Kn  	  V^2,          R$8w  d(   \        V^2,          W54      pV'       d   \        V V4       V^4,          R8w  d(   \        V^4,          W54      pV'       d   \        V V4       V^6,          R8w  d(   \!        V^6,          W54      pV'       d   \#        V V4       V^8,          pV^:,          pV^9,          R#8w  d*   \%        V^8,          VVV4      pV'       d   \'        V V4       V^<,          R#8w  d1   \%        V^;,          VV^=,          V4      pV'       d   \)        V V4       V^?,          R#8w  d1   \%        V^>,          VV^@,          V4      pV'       d   \+        V V4       V^B,          R#8w  d1   \%        V^A,          VV^C,          V4      pV'       d   \-        V V4       . R5OpV F?  w  rpVV,          R#8w  g   K  \/        W,          VV4      pV'       g   K3  \1        WV4       KA  	  \3        V^ ,          V^,          V^,          V^N,          V^O,          VV4      pV'       d   \5        V V4       V^P,          R8w  d4   \7        V^P,          VV^R,          VR%R&7      pV'       d   \9        V R'V4       V^S,          R8w  d4   \7        V^S,          VV^U,          VR(R&7      pV'       d   \9        V R)V4       V^V,          R8w  d2   \;        V^V,          VV^X,          V4      pV'       d   \9        V R*V4       V^Y,          R8w  d*   \=        V^Y,          VV4      pV'       d   \9        V R+V4       R6R7.pV^,          p V R,8w  d'   \>        P>                  ! 4       p!V!PA                  V 4       V^,          p"V"R,8w  d'   \>        P>                  ! 4       p#V#PC                  V 4       V^,          p$V$R,8w  d'   \>        P>                  ! 4       p#V#PE                  V 4       V FH  w  rpp%VV,          R#8w  g   K  \G        W,          VVV%,          V4      pV'       g   K<  \I        WV4       KJ  	  . R8Op&V& F?  w  rpVV,          R#8w  g   K  \K        W,          VV4      pV'       g   K3  \I        WV4       KA  	  V^g,          R8w  d1   \M        V^g,          VV^i,          V4      p'V''       d   \O        V V'4       V^j,          R8w  d)   \Q        V^j,          VV4      p(V('       d   \S        V V(4       . R9OpV F?  w  rpVV,          R#8w  g   K  \U        W,          VV4      pV'       g   K3  \W        WV4       KA  	  \Y        VV^,          V^,          VV4      p)V)'       d   \[        V V)4       V^,          R8w  d*   \]        V^,          VV4      p*V*'       d   \_        V R-V*4       . R:OpV F?  w  rpVV,          R#8w  g   K  \a        W,          VV4      pV'       g   K3  \_        WV4       KA  	  V^,          R8w  d*   \c        V^,          VVV4      p+V+'       d   \e        V V+4       \        V 4      pV^,          R8w  d1   \g        V^,          VV^,          V4      p,V,'       d   \i        V V,4       R%#   \         d   p-\k        R.T- 24       h R,p-?-ii ; i);uB   Procesa todos los precios y fichas técnicas para una cotización.u   Cotización no encontradacost_id
unit_price
tech_sheetGenset_PriceTotEngineModelEngineTSheetE_TierE_RpmE_PowerE_NumberOfCylinderE_AspirationE_Governor_typeE_Control_voltageE_Battery_typeE_Hotstart_modelE_RadiatorTempAlternatorModelAlternatorTSheetA_PowerfactorA_Insulation_SystemA_Control_SystemA_Protection
A_AvrModelA_Voltage_RegulationA_Class_temp_rise   Seleccione una opción"Seleccione un modelo de interrptorsunt_tsunt_wgfiaux_c	breaker_l	motorizedNoSelecciona la marca de controlT)is_aclight_acFlight_dcspace_heaterload_centerN
spill_contzError procesando precios: ))      )      )&   '   ))      )      )(   )   ))      )      )*   +   ))      )    !   ),   -   ))      )"   #   ).   /   ))      )$   %   )0   1   ))comap_dse890D   E   )panel_heaterF   G   )remote_displayH   I   )antenaJ   K   )dse890L   M   )panel_heaterCMP      )remote_displayCMP      )	antenaCMP      )gfci[   \   ]   )
receptable^   _   `   ))prewirea   b   )autolouversc   d   )receptautolouverse   f   )openingEnclousure      ))band_heaterl   m   )
pmg_updaten   o   )digital_regulatorp   q   )voltage_rheostatr   s   )thermal_wrapt   u   )base_heaterv   w   )battery_switchx   y   )battery_holderz   {   )
oil_heater|   }   )oil_level_switch~      )common_alarm_relay      )function_relay      )coolant      )oil      )disconnect_switch      )remote_estop      ))
break_tray      )
fuel_level      )overfill      )	dual_fuel      )	high_fuel      )remote_alarm      )	vent_pipe      )	flammable      )nfpa      )
no_smoking      )tank_number      )
fluid_cont      )6r0   rv   r1   r2   ranger3   r5   r4   r6   itemsr7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rJ   rG   rK   rH   rI   rl   updateQuote_stopButtonEnclosureupdate_quote_louvers_inupdate_quote_louvers_outrL   rN   rM   rP   rQ   rO   rR   rS   rT   rU   rX   rV   rY   rW   r[   r]   rZ   r\   r   ).r  
quote_datagenset_data
qty_gensetr   Discountbreaker_start_indexprotection_start_indexibreaker_dataprotection_databreaker_optionsbreaker_idxoption_typeindices_listitem_idxdesc_idx
item_value
desc_valueoption_datacontroller_datapreheater_datacharger_dataa56a58r   enclosure_datalight_ac_datalight_dc_dataheater_datacenter_dataqty_optionsstop_id
czeService
louvers_inlouversServicelouvers_outqty_idxsimple_options
estop_dataspring_data	tank_data
spill_datatesting_datawarranty_datarz   s.   &                                             r{   r
  (get_optionsimput.<locals>.pricing_Gensetj  s	   r	'1J ;<<
 *111111113
K %	*-- 12./)(	* 45/ 12 34 01 23 01 12 230 56 23/- 67 345< $AJ"1Iz#.#5H #$%'"1XA56:RR#3JUV?V4WYc#nL#.xQMq89=aa&9*^_E_:`bl&wO&1(E?S  8857;;O  %Qx1@1F1F1H-K)5)B&Hh!+!5J!+H!5J!T)&=j*&_&;9 ( +a + +	 2I  (& "~!AA"5jnj"["-hH "~!99!3JrNJ!Y!,X~F "~!997
2
]28\J BCBC"~%<rN	 *8[A "~%<rNrN	 *8[A "~%<rNrN	 0;G "~%<rNrN	 0;GG 4;/xh'4/"<"," #K
 #{8P[\ 4; 011122N (>B "~!99 .rNrN! !6x][ "~!99 .rNrN! !6x][ "~!993rNrN	 6xQ\] "~!992rN
 6xP[\ %*K %S/G$/BBD
::8D $CJT!!3!F!F!H66x@ %S/Kd"!3!F!F!H77A =H8xh'4/"?",""7+ 	#K #{7{[ =HN 4B/xh'4/";"," #K
 #{7{[ 4B #"::+sOsO	
 (:> #"::6sO
 28[IG& 4;/xh'4/";"," #K
 #{7{[ 4; &33I #Hi8 #"::7sO

 .xzRG 4;/xh'4/"6"," #K
 #{28+V 4; #"::/sO	   *8\B (1J #":: 1sOsO	! !+HmD 	.qc23	sr   Gd &d 	A4d d Gd 3d H
d  d 'd 0d Bd -d 
Bd d ;Bd d,d''d,z"/Ventas/VentasEUA/VEUcotizadorbasec                    < \         P                  R 8X  de   \         P                  P                  R4      p V '       g!   \	        RR4       \        \        R4      4      # V \        R&   \        \        R4      4      # \         P                  P                  R4      pV'       d
   V\        R&   \        P                  ! R4      p V '       g!   \	        RR4       \        \        R4      4      # S$! V 4      pS"! V 4      pS)! V4      pS.! V4      pS! V 4      pS,! V4      pS.! V4      pS ! V 4      p	S'! V	4      p
S.! V
4      pS!! V 4      pS(! V4      pS.! V4      pS! V 4      pS&! V4      pS.! V4      pS#! V 4      pS*! V4      pS.! V4      pWX,           V,           V,           V,           V,           pS%! V V4      pS+! V4      pS.! V4      pVV,           pS-! V V4      p\        \        V4      4      VR,          ,           p\        V VR,          V4       RR	0p/ R
VbRVbRVbRV
bRVbRVbRVbRVbRVbRVbRVbRVbRVbRVbRVbRVbRVbRVR\        P                  ! 4       P                  R4      RVRR RV /Cp\        R!/ VB # )"r  r  u/   No se proporcionó un ID de cotización válidort   indexcotizador_baseu/   No se encontró el ID de cotización en sesióntotalzalexis.moreno@igsa.com.mxzcarlos.velazquezm@igsa.com.mxr	  table_CotizacionGensettable_CotizacionBreakerstable_CotizacionControltable_CotizacionEnclosuretable_CotizacionAccesoriestable_CotizacionTanktable_WarrantyAndTestprice_CotizacionGensetprice_CotizacionBreakersprice_CotizacionControlprice_CotizacionEnclosureprice_CotizacionAccesoriesprice_CotizacionTankprice_WarrantyAndTest	GranTotalcountryDataofertaComercial
today_date%d/%m/%Yemails_Quotes_NrtAmeshow_send_buttonT)z&Ventas/VentasEUA/VEUcotizadorbase.html)r   methodformr   r
   r   r   r   argsr   rw   rg   r   nowstrftimer	   )/r  url_quote_idGeneral_InformationCotizacionGenset_datar  r  CotizacionBreakers_datar  r  CotizacionControl_datar  r  CotizacionEnclosure_datar  r  CotizacionAccesories_datar  r  CotizacionTank_datar  r  Genset_priceCotizacionWarrantyAndTest_datar  r  r  countryDiscountDatar  r"  contextGet_CotizacionAccesories_dataGet_CotizacionBreakers_dataGet_CotizacionControl_dataGet_CotizacionEnclosure_dataGet_CotizacionGenset_dataGet_CotizacionTank_dataGet_General_Information Get_warranty_and_testing_pricinggenerate_quote_table_Accesoriesgenerate_quote_table_Controlgenerate_quote_table_Enclosuregenerate_quote_table_Gensetgenerate_quote_table_Tankgenerate_quote_table_WTgenerate_quote_table_breakersget_country_discontsum_total_pricess/                                 r{   r  (get_optionsimput.<locals>.cotizador_base   sh   >>V#||''
3HGQ 011"*GJG$4566 ||''
3".GJ ;;z*CWMGG,-- 6h? !:( C!<=R!S!12H!I #>h"G#@AX#Y #34L#M  "<H!E">?U"V"23J"K $@#I $BC[$\!$45N$O! %B($K!%DE^%_"%56P%Q" 6h?89LM/0DE-HKbbe~~  B\  \  _s  s *J(T`)a& 78V W 01F G #88	 2(IF "#i.14G4PP 	)3Fw3OQ`a ;=\]
'
$'=
 '(@
 &'>	

 ()B
 )*D
 #$8
 $%:
 %&<
 '(@
 &'>
 ()B
 )*D
 #$8
 $%:
  !
" .#
$ (,,.11*="%9-
2 S7SS    c                    < \        V 4      pV'       g   RE# VP                  4        UUu/ uF  w  r#VS
! V4      bK  	  ppp\        P                  ! 4       P	                  R4      pVR,          p\        V4      pVR,          p\        V4      pRV RRVR,          RVR	,          /R
RV/RRVRVR,          RVR,           R2RVR,           R2RVR,           R2RVR,          RVR,          /RRVR,          RVR,          RRVR,          RVR,          RVR,          RVR,          RVR,          RVR,          R VR ,          R!VR!,          /R"VR",          /R#R$VR$,          R%VR%,          RR&VR&,          R'VR',          R(VR(,          R)VR),          R*VR*,          R+VR+,          R,VR,,          /R-VR-,          /R.R/R/VR/,          /R0R0VR0,          /R1R1VR1,          //R2R3VR3,          R4R5VR5,          //R6R7VR7,          R8VR8,          /R9R:VR:,          /R;R<VR<,          R=VR=,          R>VR>,          R?VR?,          R@VR@,          /RARBVRB,          RCVRC,          RDVRD,          //p	V	# u uppi )F2   Error: No se encontraron datos para la cotización%Y-%m-%dGenset_CostID	VoltageIDr  project_infoprojectProjectcustomer_requirementsReqCustomerr   DATEgeneral_infoGenset_modelFuelTypeFrontKWOutputz KW	Frecuencyz Hzz VPhasesCertificationengineEngineBrandr  specificationsEngine_Tier
Engine_RpmEngine_PowerEngine_NumberOfCylinderEngine_AspirationEngine_Governor_typeEngine_Control_voltageEngine_RadiatorTempEngine_TSheet
alternatorAlternatorBrandr  Altern_PowerfactorAltern_Insulation_SysAltern_Control_SystemAltern_ProtectionAltern_AvrModelAltern_VoltageRegulatAltern_Class_temp_riseAltern_TSheetBreakersBreaker1Breaker2Breaker3
controllerControlModelAdicionalyConfigControllerBateryChargerTankBaseTankTankAutonomy	EnclosureAcousticEnclosureCustomerCustomerCompanyCustomerAddressCustomerContactCustomerEmailCustomerTelSeller
SellerNameSellerEmailSellerPhonerI  r   )r^   r  r   r'  r(  r_   r`   )r  r  kvrR  rK  rT  rL  Datos_voltajesr*  convert_decimals   &         r{   r;  1get_optionsimput.<locals>.Get_General_Information  s>    /x8
LL8B8H8H8JK8Ja++8J
K||~&&z2 #?3'6{+	&y1 Hz)4+Z-F! D "L#Z%@:j#9":# >N;$?#@!DJ{$;#<B!?nX6#Z%@	! !:m#<!:m#<$%z-'@$j&>&
>(B1:>W3X+Z8K-L.
;Q0R0*=U2V-z:O/P	' $Z%@ %z2C'D%z2C'D$,j9M.N/<S1T/<S1T+Z8K-L):6G+H/<S1T0*=U2V' $Z%@ "Jz$:! "Jz$:! "Jz$:!
 "J~$>0'O)D3 
: 6"J~$> '4G)H %z2C'D%z2C'D%z2C'D#Z%@!:m#<  *\":!:m#<!:m#<_Tl #"E Ls   Ic                   < \        V 4      pV'       g   R# VP                  4        UUu/ uF  w  r#VS! V4      bK  	  ppp\        P                  ! 4       P	                  R4      pVR,          p\        V4      pVR,          p\        V4      pVP                  RR4       RV RVP                  RR4       R	VP                  R
R4       RVP                  RR4       RVP                  RR4       R	VP                  RR4       RVP                  RR4       R2p	VR,          p
RV RRVRV	RV
RVR,          RVR,          RVR,          //pV# u uppi )rI  rJ  rK  rL  rU   z GENERATOR SET MODEL z, STANDBY POWER rV  z, Voltage_Frontz. r[  z ENGINE r  rg  z ALTERNATOR r  z, STANDARD ACCESSORIES	QtyGensetr  GensetrT  
GensetDESCGensetQTYTOTGenset_Unit_PriceGenset_TSheetr  r  )r^   r  r   r'  r(  r_   r`   r   )r  r  r  r  rR  rK  rT  rL  r  r  r  r+  r  s   &           r{   r9  3get_optionsimput.<locals>.Get_CotizacionGenset_data  s    /x8
LL8B8H8H8JK8Ja++8J
K||~&&z2 #?3'6{+	&y1 ~~or233H W'^^J;<Bz~~o_a?b>cce~~mR01*..XZ:[9\\^~~/45\*..QbdfBgAh i## 	 "+. H"L *"L'4G)H#Z%@%z2C'D
! %$A Ls   E	c                j  < RpRV3R llpV P                  R/ 4      pV'       d   VP                  R4      '       dn   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R	4      4      ,          pVR
,          pV# )u   
Genera el HTML para la tabla del generador (Genset) con enlaces a fichas técnicas

Args:
    CotizacionGenset_data (dict): Datos del generador

Returns:
    str: HTML para la tabla del generador

        <tbody>
        c                   < Ve   VR8X  d   R# S	! V4      pS	! V4      pV'       d+   VP                  4       '       d   RT RT ;'       g    R R2pMT ;'       g    RpRT RT;'       g    R RT;'       g    R RV RV R2# Nr  	<a href="*" target="_blank" class="tech-sheet-link"></a>&
            <tr>
                <td></td>
                <td>$</td>
            </tr>
            strip
itemdescriptionqtyr  total_pricer  formatted_unit_priceformatted_total_price	item_cellformat_prices
   &&&&&&   r{   
render_rowIget_optionsimput.<locals>.generate_quote_table_Genset.<locals>.render_row+      "kR&7 $0
#; $0$=! j..00'
|3]^b^h^hfh]iimn	 JJB	K   &&B' (YYBK  )* +*+ , rG  r  r  rT  r  r  r  r  
        </tbody>
        Nr   )r+  htmlr  gensetr  s   &   r{   r@  5get_optionsimput.<locals>.generate_quote_table_Genset  s    
	2 '**8R8 fjj..J

>*

<(

>*

./

,-

?+ D 	  	 rG  c           3        < \        V 4      pV'       g   R# VP                  4        UUu/ uF  w  r#VS/! V4      bK  	  pppVR,          pRpVR,          pRpVR,          pRp	VR,          p
VR,          pRpVR,          pRpVR,          pRpVR,          pVR,          pRpVR,          pRpVR,          pRpVR,          pVR,          pRpVR,          pRpVR,          pRpVR,          pVR,          p Rp!VR,          p"Rp#VR,          p$Rp%VR,          p&VR,          p'Rp(VR,          p)Rp*VR,          p+Rp,VR,          p-RV R	R
RVR,          R
VR
,          RVRVR,          RVR,          RVR,          R/ RVR,          bRVR,          bRVbRVbRVR,          bRVR,          bRVR,          bRVR,          bRVR,          bRVbRVbRVR,          bRVR,          bRVR,          bRVR,          bR VR ,          bR!V	b/ R"V
bR#VR#,          bR$VR$,          bR%VR%,          bR&VR&,          bR'VR',          bR(VbR)VR),          bR*VR*,          bR+VR+,          bR,VR,,          bR-VR-,          bR.VbR/VbR0VR0,          bR1VR1,          bR2VR2,          bCRVR,          R3VR3,          R4VR5VR6VR6,          R7VR7,          R8VR8,          R9VR9,          R:VR:,          R;VR<VR=VR=,          R>VR>,          R?VR?,          /C/R@RAVRA,          R@VR@,          RBVRCVRC,          RDVRD,          REVRE,          RF/ RGVRG,          bRHVRH,          bRIVbRJVbRKVRK,          bRLVRL,          bRMVRM,          bRNVRN,          bROVRO,          bRPVbRQVbRRVRR,          bRSVRS,          bRTVRT,          bRUVRU,          bRVVRV,          bRWVb/ RXVbRYVRY,          bRZVRZ,          bR[VR[,          bR\VR\,          bR]VR],          bR^VbR_VR_,          bR`VR`,          bRaVRa,          bRbVRb,          bRcVRc,          bRdVbReVbRfVRf,          bRgVRg,          bRhVRh,          bCRiVRi,          RjVRj,          RkVRlVRmVRm,          RnVRn,          RoVRo,          RpVRp,          RqVRq,          RrVRsVRtVRt,          RuVRu,          RvVRv,          /C/RwRxVRx,          RwVRw,          RyV RzVRz,          R{VR{,          R|VR|,          R}/ R~VR~,          bRVR,          bRV!bRV"bRVR,          bRVR,          bRVR,          bRVR,          bRVR,          bRV#bRV$bRVR,          bRVR,          bRVR,          bRVR,          bRVR,          bRV%b/ RV&bRVR,          bRVR,          bRVR,          bRVR,          bRVR,          bRV'bRVR,          bRVR,          bRVR,          bRVR,          bRVR,          bRV(bRV)bRVR,          bRVR,          bRVR,          bCRVR,          RVR,          RV*RV+RVR,          RVR,          RVR,          RVR,          RVR,          RV,RV-RVR,          RVR,          RVR,          /C///p.V.# u uppi )rI  r  z
Shunt tripzShunt trip wiringzGFI (Ground fault indication)zAuxiliary contactsItem_Breaker_L1zMotorized Breakerr  rp  rq  Item_breaker1Breaker1QTYTOTBreaker1_PriceBreaker1_TSheetBreaker1_PriceTotConfigAndAccesories_Breaker1Item_Sunt_t1Shunt_trip1Shunt_trip1DESCShunt_trip1_QTYTOTSunt_t1_PriceSunt_t1_TSheetSunt_t1_PriceTotItem_Sunt_w1Shunt_trip_wiring1Shunt_trip_wiring1DESCShunt_trip_wiring1_QTYTOTSunt_w1_PriceSunt_w1_TSheetSunt_w1_PriceTot	Item_GFI1GFI1Item_GFI1DESCItem_GFI1_QTYTOT
GFI1_PriceGFI1_TSheetGFI1_PriceTotItem_Proyection_t1Protection_type1Protection_type1_QTYTOTProyection_t1_PriceProyection_t1_TSheetProyection_t1_PriceTotItem_Auxiliary_c1Auxiliary_contacts1Auxiliary_contactsDESCAuxiliary_contacts_QTYTOTAuxiliary_c1_PriceAuxiliary_c1_TSheetAuxiliary_c1_PriceTotBreaker_Lock1Breaker_LockDESCBreaker_Lock_QTYTOTBreaker_L1_PriceBreaker_L1_TSheetBreaker_L1_PriceTotItem_Motorized_B1Motorized_Breaker1Motorized_BreakerDESCMotorized_Breaker_QTYTOTMotorized_B1_PriceMotorized_B1_TSheetMotorized_B1_PriceTotrr  Item_breaker2Breaker2QTYTOTBreaker2_PriceBreaker2_TSheetBreaker2_PriceTotConfigAndAccesories_Breaker2Item_Sunt_t2Shunt_trip2Shunt_trip2DESCShunt_trip2_QTYTOTSunt_t2_PriceSunt_t2_TSheetSunt_t2_PriceTotItem_Sunt_w2Shunt_trip_wiring2Shunt_trip_wiring2DESCShunt_trip_wiring2_QTYTOTSunt_w2_PriceSunt_w2_TSheetSunt_w2_PriceTot	Item_GFI2GFI2Item_GFI2DESCItem_GFI2_QTYTOT
GFI2_PriceGFI2_TSheetGFI2_PriceTotItem_Proyection_t2Protection_type2Protection_type2_QTYTOTProyection_t2_PriceProyection_t2_TSheetProyection_t2_PriceTotItem_Auxiliary_c2Auxiliary_contacts2Auxiliary_contacts2DESCAuxiliary_contacts2_QTYTOTAuxiliary_c2_PriceAuxiliary_c2_TSheetAuxiliary_c2_PriceTotItem_Breaker_L2Breaker_Lock2Breaker_Lock2DESCBreaker_Lock2_QTYTOTBreaker_L2_PriceBreaker_L2_TSheetBreaker_L2_PriceTotItem_Motorized_B2Motorized_Breaker2Motorized_Breaker2DESCMotorized_Breaker2_QTYTOTMotorized_B2_PriceMotorized_B2_TSheetMotorized_B2_PriceTotrs  Item_breaker3Breaker3QTYTOTBreaker3_PriceBreaker3_TSheetBreaker3_PriceTotConfigAndAccesories_Breaker3Item_Sunt_t3Shunt_trip3Shunt_trip3DESCShunt_trip3_QTYTOTSunt_t3_PriceSunt_t3_TSheetSunt_t3_PriceTotItem_Sunt_w3Shunt_trip_wiring3Shunt_trip_wiring3DESCShunt_trip_wiring3_QTYTOTSunt_w3_PriceSunt_w3_TSheetSunt_w3_PriceTot	Item_GFI3GFI3Item_GFI3DESCItem_GFI3_QTYTOT
GFI3_PriceGFI3_TSheetGFI3_PriceTotItem_Proyection_t3Protection_type3Protection_type3_QTYTOTProyection_t3_PriceProyection_t3_TSheetProyection_t3_PriceTotItem_Auxiliary_c3Auxiliary_contacts3Auxiliary_contacts3DESCAuxiliary_contacts3_QTYTOTAuxiliary_c3_PriceAuxiliary_c3_TSheetAuxiliary_c3_PriceTotItem_Breaker_L3Breaker_Lock3Breaker_Lock3DESCBreaker_Lock3_QTYTOTBreaker_L3_PriceBreaker_L3_TSheetBreaker_L3_PriceTotItem_Motorized_B3Motorized_Breaker3Motorized_Breaker3DESCMotorized_Breaker3_QTYTOTMotorized_B3_PriceMotorized_B3_TSheetMotorized_B3_PriceTotr  r^   r  )0r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r	  r  r  r  r  r  r  r#  r*  r+  r1  r2  r8  r9  r?  rE  rF  rL  rM  rS  rT  r,  r  s0   &                                              r{   r6  5get_optionsimput.<locals>.Get_CotizacionBreakers_dataW  s6    /x8
LL8B8H8H8JK8Ja++8J
K $K0&'4!4$.{$;!7%k2",["9!5$.{$;!,(5 3#-k#: #K0&'4!4$.{$;!7%k2",["9"6%/%<"-)+6!4$.{$;! $K0&'4!4$.{$;!7%k2",["9"6%/%<"-)+6!4$.{$;! H'O)D"Jz$:(.(*5E*F):6G+H+Z8K-L6 ?8 +J~,F?8 *:m+D	?8
 .?8 12D?8 ,Z-H?8 -j9I.J?8 /
;M0N?8 +J~,F?8 1*=Q2R?8 56L?8 89R?8  ,Z-H!?8" -j9I.J#?8$ /
;M0N%?8* (K)@+?8, #Jv$6-?8. ,]/?80 /0@1?82 )*\*B3?84 *:m+D5?86 ,Z-H7?8< 1*=Q2R=?8> /
;M0N??8@ 67NA?8B 2:>S3TC?8D 3J?U4VE?8F 5jAY6ZG?8L 0<O1PM?8N 2:>S3TO?8P 56LQ?8R 89RS?8T 1*=Q2RU?8V 2:>S3TW?8X 4Z@W5XY?8^ .z:K/L+Z-H.0@13F.
;M0N/<O1P1:>S3T 0<O1P0*=Q2R35J68P0*=Q2R1:>S3T3Z@W5X}?8H!R 'O)D"Jz$:(.(*5E*F):6G+H+Z8K-L6 ?8 +J~,F?8 *:m+D	?8
 .?8 12D?8 ,Z-H?8 -j9I.J?8 /
;M0N?8 +J~,F?8 1*=Q2R?8 56L?8 89R?8  ,Z-H!?8" -j9I.J#?8$ /
;M0N%?8* (K)@+?8, #Jv$6-?8. ,]/?80 /0@1?82 )*\*B3?84 *:m+D5?86 ,Z-H7?8< 1*=Q2R=?8> /
;M0N??8@ 66MA?8B 2:>S3TC?8D 3J?U4VE?8F 5jAY6ZG?8L 0<O1PM?8N 2:>S3TO?8P 67NQ?8R 9:TS?8T 1*=Q2RU?8V 2:>S3TW?8X 4Z@W5XY?8^ .z:K/L+Z-H/1B24H.
;M0N/<O1P1:>S3T 0<O1P0*=Q2R46L79R0*=Q2R1:>S3T3Z@W5X}?8H!R 'O)D"Jz$:(.(*5E*F):6G+H+Z8K-L6 ?8 +J~,F?8 *:m+D	?8
 .?8 12D?8 ,Z-H?8 -j9I.J?8 /
;M0N?8 +J~,F?8 1*=Q2R?8 56L?8 89R?8  ,Z-H!?8" -j9I.J#?8$ /
;M0N%?8* (K)@+?8, #Jv$6-?8. ,]/?80 /0@1?82 )*\*B3?84 *:m+D5?86 ,Z-H7?8< 1*=Q2R=?8> /
;M0N??8@ 67NA?8B 2:>S3TC?8D 3J?U4VE?8F 5jAY6ZG?8L 0<O1PM?8N 2:>S3TO?8P 67NQ?8R 9:TS?8T 1*=Q2RU?8V 2:>S3TW?8X 4Z@W5XY?8^ .z:K/L+Z-H/0A24H.
;M0N/<O1P1:>S3T 0<O1P0*=Q2R45K79R0*=Q2R1:>S3T3Z@W5X}?8H!g\_#
B '&Q	 Ls   Yc                  < RpRV3R llpV P                  R/ 4      pVP                  R/ 4      pV'       Ed+   VP                  R4      R9  Ed   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R	4      4      ,          pR
V9   Ed   VR
,          pVP                  R4      R9  dn   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      4      ,          pVP                  R4      R9  dn   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      4      ,          pVP                  R4      R9  dn   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      4      ,          pVP                  R 4      R9  dn   W! VP                  R!4      VP                  R 4      VP                  R"4      VP                  R#4      VP                  R$4      VP                  R%4      4      ,          pVP                  R&4      R9  dn   W! VP                  R'4      VP                  R(4      VP                  R)4      VP                  R*4      VP                  R+4      VP                  R,4      4      ,          pVP                  R-4      R9  dn   W! VP                  R.4      VP                  R/4      VP                  R04      VP                  R14      VP                  R24      VP                  R34      4      ,          pVP                  R44      R9  dn   W! VP                  R54      VP                  R64      VP                  R74      VP                  R84      VP                  R94      VP                  R:4      4      ,          pVP                  R;/ 4      pV'       Ed+   VP                  R;4      R9  Ed   W! VP                  R<4      VP                  R;4      VP                  R=4      VP                  R>4      VP                  R?4      VP                  R@4      4      ,          pRAV9   Ed   VRA,          pVP                  RB4      R9  dn   W! VP                  RC4      VP                  RD4      VP                  RE4      VP                  RF4      VP                  RG4      VP                  RH4      4      ,          pVP                  RI4      R9  dn   W! VP                  RJ4      VP                  RK4      VP                  RL4      VP                  RM4      VP                  RN4      VP                  RO4      4      ,          pVP                  RP4      R9  dn   W! VP                  RQ4      VP                  RR4      VP                  RS4      VP                  RT4      VP                  RU4      VP                  RV4      4      ,          pVP                  RW4      R9  dn   W! VP                  RX4      VP                  RW4      VP                  RY4      VP                  RZ4      VP                  R[4      VP                  R\4      4      ,          pVP                  R]4      R9  dn   W! VP                  R^4      VP                  R_4      VP                  R`4      VP                  Ra4      VP                  Rb4      VP                  Rc4      4      ,          pVP                  Rd4      R9  dn   W! VP                  Re4      VP                  Rf4      VP                  Rg4      VP                  Rh4      VP                  Ri4      VP                  Rj4      4      ,          pVP                  Rk4      R9  dn   W! VP                  Rl4      VP                  Rm4      VP                  Rn4      VP                  Ro4      VP                  Rp4      VP                  Rq4      4      ,          pVP                  Rr/ 4      pV'       Ed+   VP                  Rr4      R9  Ed   W! VP                  Rs4      VP                  Rr4      VP                  Rt4      VP                  Ru4      VP                  Rv4      VP                  Rw4      4      ,          pRxV9   Ed   VRx,          pVP                  Ry4      R9  dn   W! VP                  Rz4      VP                  R{4      VP                  R|4      VP                  R}4      VP                  R~4      VP                  R4      4      ,          pVP                  R4      R9  dn   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      4      ,          pVP                  R4      R9  dn   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      4      ,          pVP                  R4      R9  dn   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      4      ,          pVP                  R4      R9  dn   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      4      ,          pVP                  R4      R9  dn   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      4      ,          pVP                  R4      R9  dn   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      4      ,          pVR,          pV# )u   
Genera el HTML para la tabla de breakers con enlaces a fichas técnicas

Args:
    CotizacionBreakers_data (dict): Datos de los breakers

Returns:
    str: HTML para la tabla de breakers
r  c                 &  < Ve   VR8X  g   VR8X  d   R# VR	9   d   R# S	! V4      pS	! V4      pV'       d+   VP                  4       '       d   RT RT ;'       g    R R2pMT ;'       g    RpRT RT;'       g    R RT;'       g    R RV RV R2# )
Nr  r/  r  r  r  r  r  r  )r'  Select an optionr(  Select a breaker modelr  r  s
   &&&&&&   r{   r  Kget_optionsimput.<locals>.generate_quote_table_breakers.<locals>.render_row      "kR&7;$;N \ \ $0
#; $0$=! j..00'
|3]^b^h^hfh]iimn	 JJB	K   &&B' (YYBK  )* +*+ , rG  rp  rq  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  rr  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r  r  r  r  r  r	  r
  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r!  r   rs  r"  r#  r$  r&  r%  r'  r)  r(  r*  r+  r,  r.  r-  r0  r/  r1  r2  r3  r5  r4  r7  r6  r8  r9  r:  r<  r;  r>  r=  r?  r@  rB  rA  rD  rC  rE  rF  rG  rI  rH  rK  rJ  rL  rM  rN  rP  rO  rR  rQ  rS  rT  rU  rW  rV  r  r  )Nr  r'  r\  r(  r]  Nr  r/  r  )	r,  r  r  r   breaker1accessoriesbreaker2breaker3r  s	   &       r{   rC  7get_optionsimput.<locals>.generate_quote_table_breakers  s   
	: +..z2> <<
B/8Z0  9p  pJ_-Z(-.-.01./ D .9&'EF ??=19IIJ#7#(9:#(<=#8#(:;#(89 D ??#78@PPJ#7#(@A#(CD#8#(:;#(89 D ??6*2BBJ#4#8#(:;#5#8#6 D ??#56  ?w  wJ#(<=#(:;#(AB#(=>#(@A#(>? D ??#89AQQJ#(;<#(@A#(CD#(<=#(?@#(=> D ???3;KKJ#(9:#(:;#(=>#(:;#(=>#(;< D ??#78@PPJ#(;<#(?@#(BC#(<=#(?@#(=> D <<
B/8Z0  9p  pJ_-Z(-.-.01./ D .9&'EF ??=19IIJ#7#(9:#(<=#8#(:;#(89 D ??#78@PPJ#7#(@A#(CD#8#(:;#(89 D ??6*2BBJ#4#8#(:;#5#8#6 D ??#56  ?w  wJ#(<=#(:;#(AB#(=>#(@A#(>? D ??#89AQQJ#(;<#(AB#(DE#(<=#(?@#(=> D ???3;KKJ#(9:#(;<#(>?#(:;#(=>#(;< D ??#78@PPJ#(;<#(@A#(CD#(<=#(?@#(=> D <<
B/8Z0  9p  pJ_-Z(-.-.01./ D .9&'EF ??=19IIJ#7#(9:#(<=#8#(:;#(89 D ??#78@PPJ#7#(@A#(CD#8#(:;#(89 D ??6*2BBJ#4#8#(:;#5#8#6 D ??#56  ?w  wJ#(<=#(:;#(AB#(=>#(@A#(>? D ??#89AQQJ#(;<#(AB#(DE#(<=#(?@#(=> D ???3;KKJ#(9:#(;<#(>?#(:;#(=>#(;< D ??#78@PPJ#(;<#(@A#(CD#(<=#(?@#(=> D 	  	 rG  c           -      	  < \        V 4      pV'       g   Ry# VP                  4        UUu/ uF  w  r#VS"! V4      bK  	  pppVR,          pRpVR,          pRpVR,          pRp	VR,          VR,          ,          p
RpVR,          VR,          ,          pRpRpVR	,          VR,          ,          pR
pVR,          VR,          ,          pRpVR,          pRpVR,          pRpVR,          pRpVR,          pRpVR,          pRpVR,          pRpVR,          pVR,          p RV RRVR,          RVR,          RVRVR,          RVR,          RVR,          R/ RVR,          bRVR,          bRVbRVbRVR,          bRVR,          bR VR ,          bR!VR!,          bR"VbR#VbR$VR$,          bR%VR%,          bR&VR&,          bR'VR',          bR(VbR)VbR*VR*,          b/ R+VR+,          bR,VR,,          bR-VR-,          bR.VR.,          bR/VbR0VbR1VR1,          bR2VR2,          bR3VR3,          bR4VR4,          bR5VR5,          bR6VbR7VbR8VR8,          bR9VR9,          bR:VR:,          bR;VR;,          bC/ R<VR<,          bR=VbR>VbR?VR?,          bR@VR@,          bRAVRA,          bRBVRB,          bRCVRC,          bRDVbREVbRFVRF,          bRGVRG,          bRHVRH,          bRCVRC,          bRDVbREVbRFVRF,          bC/ RGVRG,          bRHVRH,          bRIVRI,          bRJVRJ,          bRKVbRLVbRMVRM,          bRNVRN,          bROVRO,          bRP/ RQVRQ,          bRRVRR,          bRSVbRTVbRUVRU,          bRVVRV,          bRWVRW,          bRXVRX,          bRYVbRZVbR[VR[,          bR\VR\,          bR]VR],          bR^VR^,          bR_VR_,          bRVR,          bR`V	bRaV
RbVRb,          RcVRc,          RdVRd,          ReVRe,          RfVRf,          R	VR	,          RgVRhVRiVRi,          RjVRj,          RkVRk,          /CbRlVRl,          bRmVRm,          bRnVbRoVbRpVRp,          bRqVRq,          bRrVRr,          bCRsVRs,          RtVRt,          RuV RvVRv,          RwVRw,          RxVRx,          /C//p!V!# u uppi )zrI  r  zControl Panel Heaterz'DSE2157 Output Module  (8 dry contacts)
QtyDSE2157z$I-RB8 Output module (8 dry contacts)QtyComapDSE2157zDSE-2548zDSE2548 Remote Annunciator
QtyDSE2548zIGL-RA15 Remote AnnunciatorQtyComapDSE2548z!DSE890 Ethernet/4G gateway devicezCM3-ETHERNETz1GSM/GPS ANTENNA 3M RG-174, GSM-SMA(M), GPS-SMA(F)zRemote Display Module DSEzRemote Display Module COMAPr  rt  Item_controllerru  ControlModelQTYcontroller_Pricecontroller_TSheetControlModel_PriceTotConfigAndAccesories_ControllerCtrlPanelHeaterItem_CtrlPanelHeaterCPHDESC	CPHQTYTOTCtrlPanelHeater_PriceCtrlPanelHeater_TSheetCtrlPanelHeat_PriceTotItem_CtrlPanelHeaterCMPCMP_CPH_DESCRIPTIONCMP_CPH_QTYTOTALCtrlPanelHeaterCMP_PriceCtrlPanelHeaterCMP_TSheetCtrlPanelHeatCMP_PriceTotItem_RempteDisplModCMPCMP_RDMDSE_DESCRIPTIONCMP_RDMDSE_QTYTOTALRempteDisplModCMP_PriceRempteDisplModCMP_TSheetRempteDisplModCMP_PriceTotItem_AntenaCMP	AntenaCMPCMP_GSM_GSP_DESCRIPTIONCMP_GSM_GSP_QTYTOTALAntenaCMP_PriceAntenaCMP_TSheetAntenaCMP_PriceTotItem_ComapDSE2157ComapDSE2157CMP_2157_DESCRIPTIONCMP_2157_QTYTOTALComapDSE2157_PriceComapDSE2157_TSheetComapDSE2157_PriceTotItem_ComapDSE2548ComapDSE2548CMP_2548_DESCRIPTIONCMP_2548_QTYTOTOTALComapDSE2548_PriceComapDSE2548_TSheetComapDSE2548_PriceTotItem_RempteDisplModRemoteDisplayModule
RDMDSEDESCRDMDSEQTYTOTRempteDisplMod_PriceRempteDisplMod_TSheetRempteDisplMod_PriceTotItem_AntenaAntenaGSM_GSPDESCGSM_GSPQTYTOTAntena_PriceAntena_TSheetAntena_PriceTotConfigAndAccesories_DeepSeaItem_DSE890DSE890
DSE890DESCDSE890QTYTOTDSE890_PriceDSE890_TSheetDSE890_PriceTotItem_ComapDSE890CMP_890_DESCRIPTIONCMP_890_QTYTOTALComapDSE890_PriceComapDSE890_TSheetComapDSE890_PriceTotItem_DSE2157DSE2157DSE2157DESCDSE2157QTYTOTDSE2157_PriceDSE2157_TSheetDSE2157_PriceTotItem_DSE2548DSE2548DSE2548DESCDSE2548QTYTOTDSE2548_PriceDSE2548_TSheetDSE2548_PriceTotItem_CtrlVotlOperCtrlVotlOperCtrlVotlOperDESCCtrlVotlOperQTYTOTCtrlVotlOper_PriceCtrlVotlOper_TSheetCtrlVotlOper_PriceTotItem_BateryChargerrw  BateryChargerQTYTOTBateryCharger_PriceBateryCharger_TSheetBateryCharger_PriceTotr  rX  )#r  r  r  r  rl  rs  rt  ry  rz  r  r  r  r  Item_controller_options_DSE2548r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r-  r  s#   &                                 r{   r7  4get_optionsimput.<locals>.Get_CotizacionControl_data  s   .x8
LL8B8H8H8JK8Ja++8J
K &k2 ){+	4%k2?"<0:k3JJ  F&'89J{<SS*4'2"<0:k3JJ  =():;j>UU8
!+. -%k2I";/ #V)+60
!+.6'4!>(5(5 H%z2C'D"J~$>%&
3E(F'4G)H+Z8O-P4 I7 *:6L+MI7 *:6G+H	I7
 "7I7 $YI7 0<S1TI7 1*=U2VI7 1*=U2VI7 2:>W3XI7 ./BI7 +,<I7 3J?Y4ZI7 4Z@[5\I7  4Z@[5\!I7( 1*=U2V)I7* 12H+I7, ./B-I7. 2:>W3X/I70 3J?Y4Z1I72 5jA]6^3I78 )*5E*F9I7: $Z%<;I7< 23J=I7> /0D?I7@ *:6G+HAI7B +J7I,JCI7D -j9M.NEI7J ,Z8K-LKI7L '
>(BMI7N /0DOI7P ,->QI7R -j9M.NSI7T .z:O/PUI7V 0<S1TWI7\ ,Z8K-L]I7^ '
>(B_I7` /0DaI7b ./BcI7d -j9M.NeI7f .z:O/PgI7h 0<S1TiI7p .z:O/PqI7r .z:O/PsI7t %juI7v 'wI7x /
;Q0RyI7z 0<S1T{I7| 2:>W3X}I7@ .z:O/PAI7B %jCI7D 'EI7F /
;Q0RGI7H 0<S1TII7J 2:>W3XKI7P &z-'@QI7R !*X"6SI7T &{UI7V (WI7X '
>(BYI7Z (O)D[I7\ *:6G+H]I7` 6 '8 *:m+D'8 %j&:	'8
 )*'8 +L'8 +J~,F'8 ,Z-H'8 .z:K/L'8 /
;M0N'8 23F'8 /0@'8 0<O1P'8  1*=Q2R!'8" 3J?U4V#'8* +J~,F+'8, &z)'<-'8. )*\*B/'80 *;1'82 ,]+Z-H,j9I.J.
;M0N +J~,F%z)'<(*\*B);+]+Z-H,j9I.J.
;M0NM'8aI7t ,Z8K-LuI7v '
>(BwI7x +,<yI7z -.@{I7| -j9M.N}I7~ .z:O/PI7@ 0<S1TAI7F -j9M.N'O)D-/B-z:O/P.
;Q0R0*=U2VQI7RU"n &%W Ls   Rc                  < RpRkV3R llpV P                  R/ 4      pV'       Ed   VP                  R4      Rl9  Ed   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R	4      4      ,          pR
V9   EdE   VR
,          pVP                  R4      Rm9  dn   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      4      ,          pVP                  R4      Rm9  dn   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      4      ,          pVP                  R4      Rm9  dn   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      4      ,          pVP                  R4      Rm9  dn   W! VP                  R4      VP                  R 4      VP                  R!4      VP                  R"4      VP                  R#4      VP                  R$4      4      ,          pVP                  R%4      Rm9  dn   W! VP                  R&4      VP                  R'4      VP                  R(4      VP                  R)4      VP                  R*4      VP                  R+4      4      ,          pVP                  R,4      Rm9  dn   W! VP                  R-4      VP                  R.4      VP                  R/4      VP                  R04      VP                  R14      VP                  R24      4      ,          pR3V9   Ed   VR3,          pVP                  R44      Rm9  dn   W! VP                  R54      VP                  R64      VP                  R74      VP                  R84      VP                  R94      VP                  R:4      4      ,          pVP                  R;4      Rm9  dn   W! VP                  R;4      VP                  R<4      VP                  R=4      VP                  R>4      VP                  R?4      VP                  R@4      4      ,          pVP                  RA4      Rm9  dn   W! VP                  RB4      VP                  RC4      VP                  RD4      VP                  RE4      VP                  RF4      VP                  RG4      4      ,          pVP                  RH4      Rm9  dn   W! VP                  RI4      VP                  RJ4      VP                  RK4      VP                  RL4      VP                  RM4      VP                  RN4      4      ,          pVP                  RO4      Rm9  dn   W! VP                  RP4      VP                  RQ4      VP                  RR4      VP                  RS4      VP                  RT4      VP                  RU4      4      ,          pVP                  RV4      Rm9  dn   W! VP                  RW4      VP                  RX4      VP                  RY4      VP                  RZ4      VP                  R[4      VP                  R\4      4      ,          pVP                  R]4      Rn9  dn   W! VP                  R^4      VP                  R_4      VP                  R`4      VP                  Ra4      VP                  Rb4      VP                  Rc4      4      ,          pVP                  Rd4      Rm9  dn   W! VP                  Re4      VP                  Rd4      VP                  Rf4      VP                  Rg4      VP                  Rh4      VP                  Ri4      4      ,          pVRj,          pV# )ou   
Genera el HTML para la tabla de controladores con enlaces a fichas técnicas

Args:
    CotizacionControl_data (dict): Datos de los controladores

Returns:
    str: HTML para la tabla de controladores
r  c                 &  < Ve   VR8X  g   VR8X  d   R# VR	9   d   R# S	! V4      pS	! V4      pV'       d+   VP                  4       '       d   RT RT ;'       g    R R2pMT ;'       g    RpRT RT;'       g    R RT;'       g    R RV RV R2# )
Nr  r/  r  r  r  r  r  r  )r'  r\  r0  Select the cotroller brandr  r  s
   &&&&&&   r{   r  Jget_optionsimput.<locals>.generate_quote_table_Control.<locals>.render_row  r_  rG  rt  ru  rk  rl  rm  ro  rn  rp  rq  rr  rs  rt  ru  rw  rv  rx  ry  rz  r{  r}  r|  r  r  r  r  r  r  r  r~  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  rw  r  r  r  r  r  r  r  )Nr  r'  r\  r0  r  r`  Nr  r'  r\  r  )r-  r  r  rt  rb  deep_sear  s   &     r{   r>  6get_optionsimput.<locals>.generate_quote_table_Control  s   
	: ,//bA
 :*..8 A@ @J01~.01126723 D 0:=()IJ ??#45=MMJ#(>?#	2#4#(?@#(@A#(@A D ??#<=EUUJ#(AB#(=>#(:;#(BC#(CD#(CD D ??#89AQQJ#(=>#5#7#(>?#(AB#(?@ D ??#;<DTTJ'OO,DE'OO,DE'OO,AB'OO,EF'OO,HI'OO,FG D ??8,4DDJ#6#6#8#7#(9:#8 D ??;/7GGJ#(89#(AB#(>?#(9:#(<=#(:; D 1K?*+HIH  ||H-5EE
$LL7$LL6$LL8$LL8$LL):;$LL9!   ||$67?OO
$LL);<$LL)>?$LL);<$LL)<=$LL)?@$LL)=>!   ||I.6FF
$LL8$LL7$LL9$LL9$LL);<$LL)9:!  #~6>NN
'OO,?@'OO,BC'OO,?@'OO,@A'OO,CD'OO,AB!   ||I.6FF
$LL8$LL7$LL9$LL9$LL);<$LL)9:!  #~6>NN
'OO,?@'OO,BC'OO,AB'OO,@A'OO,CD'OO,AB!  ??>2:rrJ#(;<#(:;#(<=#(<=#(?@#(=> D ???3;KKJ#(<=#8#(=>#(=>#(@A#(>? D 	  	 rG  c                 
  < \        V 4      pV'       g   R# VP                  4        UUu/ uF  w  r#VS'! V4      bK  	  pppRpVR,          pRpVR,          pRpVR,          p	Rp
VR,          pRpVR,          pRpVR,          pRpVR,          pR	pVR,          pR
pVR,          pRpVR,          pRpVR,          pRpVR,          pRpVR,          pRpVR,          pRp VR,          p!VR,          p"Rp#VR,          p$VR,          p%RV R/ RVR,          bRVR,          bRVbRVbRVR,          bRVR,          bRVR,          bRVR,          bRVR,          bRVbRVbRVR,          bR VR ,          bR!VR!,          bR"VR",          bR#VR#,          bR$V	b/ R%VbR&VR&,          bR'VR',          bR(VR(,          bR)VR),          bR*VR*,          bR+VbR,V
bR-VR-,          bR.VR.,          bR/VR/,          bR0VR0,          bR1VR1,          bR2VbR3VbR4VR4,          bR5VR5,          bC/ R6VR6,          bR7VR7,          bR8VR8,          bR9VbR:VbR;VR;,          bR<VR<,          bR=VR=,          bR>VR>,          bR?VR?,          bR@VbRAVbRBVRB,          bRCVRC,          bRDVRD,          bREVRE,          bRFVRF,          bC/ RGVbRHVbRIVRI,          bRJVRJ,          bRKVRK,          bRLVRL,          bRMVRM,          bRNVbROVbRPVRP,          bRQVRQ,          bRRVRR,          bRSVRS,          bRTVRT,          bRUVbRVVbRWVRW,          bC/ RXVRX,          bRYVRY,          bRZVRZ,          bR[VR[,          bR\VbR]VbR^VR^,          bR_VR_,          bR`VR`,          bRaVRa,          bRbVRb,          bRcVbRdVbReVRe,          bRfVRf,          bRgVRg,          bRhVRh,          bC/ RiVRi,          bRjVbRkVbRlVRl,          bRmVRm,          bRnVRn,          bRoVRo,          bRpVRp,          bRqVbRrVbRsVRs,          bRtVRt,          bRuVRu,          bRvVRv,          bRwVRw,          bRxV!bRyV bC/ RzVRz,          bR{VR{,          bR|VR|,          bR}VR},          bR~VR~,          bRVR,          bRV"bRVR,          bRVR,          bRVR,          bRVR,          bRVR,          bRV$bRV#bRVR,          bRVR,          bRVR,          bCRVR,          RVR,          RV%RVR,          RVR,          RVR,          /C/p&V&# u uppi )rI  zAlternator strip heaterr  zMX321 - PMG UpgradezDM110 Digital voltage regulatorzVoltage adjust rheostatzBattery thermal wrapzBattery pad heaterzBattery disconnect switchzBattery restraintzOil pan heaterzOil level switch-murphy 129zRelay - 10A Common alarmzRelay - 10A Run relayzCoolant in Gen-setzOil in Gen-SetzHeater Disconnect Switchesz-Remote E-Stop - Visual / Plastic hinged coverr  AdditionalAccesories_GensetItem_BandHeater
BandHeaterBandHeaterQTYTOTBandHeaterDESCBandHeater_PriceBandHeater_TSheetBandHeater_PriceTotItem_PMGUpdate	PMGUpdatePMGUpdateQTYTOTPMGUpdateDESCPMGUpdate_PricePMGUpdate_TSheetPMGUpdate_PriceTotItem_DigitalRegulatorDigitalRegulatorDigitalRegulatorQTYTOTDigitalRegulatorDESCDigitalRegulator_PriceDigitalRegulator_TSheetDigitalRegulat_PriceTotItem_VoltageRheostatVoltageRheostatVoltageRheostatQTYTOTVoltageRheostatDESCVoltageRheostat_PriceVoltageRheostat_TSheetVoltageRheosta_PriceTotItem_ThermalWrapThermalWrapThermalWrapQTYTOTThermalWrapDESCThermalWrap_PriceThermalWrap_TSheetThermalWrap_PriceTotItem_BaseHeater
BaseHeaterBaseHeaterQTYTOTBaseHeaterDESCBaseHeater_PriceBaseHeater_TSheetBaseHeater_PriceTotItem_BatterySwitchBatterySwitchBatterySwitchQTYTOTBatterySwitchDESCBatterySwitch_PriceBatterySwitch_TSheetBatterySwitch_PriceTotItem_BatteryHolderBatteryHolderBatteryHolderQTYTOTBatteryHolderDESCBatteryHolder_PriceBatteryHolder_TSheetBatteryHolder_PriceTotItem_OilHeater	OilHeaterOilHeaterQTYTOTOilHeaterDESCOilHeater_PriceOilHeater_TSheetOilHeater_PriceTotItem_OilLevelSwitchOilLevelSwitchOilLevelSwitchQTYTOTOilLevelSwitchDESCOilLevelSwitch_PriceOilLevelSwitch_TSheetOilLevelSwitch_PriceTotItem_CommonAlarmRelayCommonAlarmRelayCommonAlarmRelayQTYTOTCommonAlarmRelayDESCCommonAlarmRelay_PriceCommonAlarmRelay_TSheetCommonAlarmRel_PriceTotItem_FunctionRelayFunctionRelayFunctionRelayQTYTOTFunctionRelayDESCFunctionRelay_PriceFunctionRelay_TSheetFunctionRelay_PriceTotItem_CoolantCoolantCoolantQTYTOTCoolantDESCCoolant_PriceCoolant_TSheetCoolant_PriceTotItem_OilOil	OilQTYTOTOilDESC	Oil_Price
Oil_TSheetOil_PriceTotItem_DisconnectSwitchesDisconnectSwitchesDisconnectSwitchesQTYTOTDisconnectSwitchesDESCDisconnectSwitch_PriceDisconnectSwitch_TSheetDisconnectSwit_PriceTotItem_AddAccesory_EstopEStopQtyEStopEStopQTYTOTEStop_priceEStop_TSheetEStop_PriceTotItem_RemoteEStopRemoteEStopRemoteEStopQTYTOTRemoteEStopDESCRemoteEStop_PriceRemoteEStop_TSheetRemoteEStop_PriceTotItem_AddAccesory_SpringSpringIsolatorSpringIsolatorQTYTOTSpringIsolator_priceSpringIsolator_TSheetSpringIsolator_PriceTotr  rX  )(r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r  r  r  r  r  r  r  r#  r"  r*  r)  r1  r0  r8  r7  r?  r>  rF  rM  rL  rS  r/  r  s(   &                                      r{   r5  7get_optionsimput.<locals>.Get_CotizacionAccesories_data  s
   .x8
LL8B8H8H8JK8Ja++8J
K 3%k2-$[1@!+K!87 *; 70&{3-%k27(5/(5($[1:)+69!+K!83(5*";/"{+	!=#-k#: !+.I&{3)+6 H- a0%z2C'Da0 !*\":a0 '(8	a0
 %na0 '
3E(Fa0 (4G)Ha0 *:6K+La0 %j1A&Ba0  K!8a0 &a0 $Ma0 &z2C'Da0  '
3E(F!a0" )*5I*J#a0( ,Z8O-P)a0* '
3E(F+a0, -.D-a0. +,@/a00 -j9Q.R1a02 .z:S/T3a04 .z:S/T5a0: +J7M,N;a0< &z2C'D=a0> ,-B?a0@ *+>Aa0B ,Z8O-PCa0D -j9Q.REa0F .z:S/TGa0L '
3E(FMa0N ":m#<Oa0P ():Qa0R &Sa0T (4G)HUa0V )*5I*JWa0X +J7M,NYa0^ &z2C'D_a0` !*\":aa0b '(8ca0d %nea0f '
3E(Fga0h (4G)Hia0j *:6K+Lka0p )*5I*Jqa0r $Z%@sa0t *+>ua0v ():wa0x *:6K+Lya0z +J7M,N{a0| -j9Q.R}a0B )*5I*JCa0D $Z%@Ea0F *+>Ga0H ():Ia0J *:6K+LKa0L +J7M,NMa0N -j9Q.ROa0T %j1A&BUa0V  K!8Wa0X &Ya0Z $][a0\ &z2C'D]a0^ '
3E(F_a0` )*5I*Jaa0f *:6K+Lga0h %j1A&Bia0j +,@ka0l )*<ma0n +J7M,Noa0p ,Z8O-Pqa0r .z:S/Tsa0x ,Z8O-Pya0z '
3E(F{a0| -.D}a0~ +,@a0@ -j9Q.RAa0B .z:S/TCa0D .z:S/TEa0J )*5I*JKa0L $Z%@Ma0N *+>Oa0P ():Qa0R *:6K+LSa0T +J7M,NUa0V -j9Q.RWa0\ #J~$>]a0^ z)4_a0` $]aa0b ";ca0d $Z%@ea0f %j1A&Bga0h '
3E(Fia0n 
: 6oa0p :e,qa0r  sa0t wua0v  K!8wa0x !*\":ya0z #J~$>{a0@ .z:S/TAa0B )*5I*JCa0D /0HEa0F -.DGa0H -j9Q.RIa0J .z:S/TKa0L .z:S/TMa0R -j9Q.RSa0T Z0Ua0V 
: 6Wa0X ";Ya0Z ":m#<[a0\ #J~$>]a0^ %j1A&B_a0d '
3E(Fea0f ":m#<ga0h ():ia0j &ka0l (4G)Hma0n )*5I*Joa0p +J7M,Nqa0v .z:S/T$j1A&B*,@*J7M,N+Z8O-P-z:S/TAa0d%!L )(} Ls   Tc                  < RpRV3R llpV P                  R/ 4      pVP                  R4      R9  dn   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R	4      VP                  R
4      4      ,          pVP                  R4      R9  dn   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      4      ,          pVP                  R4      R9  dn   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      4      ,          pVP                  R4      R9  dn   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      4      ,          pVP                  R 4      R9  dn   W! VP                  R!4      VP                  R"4      VP                  R#4      VP                  R$4      VP                  R%4      VP                  R&4      4      ,          pVP                  R'4      R9  dn   W! VP                  R(4      VP                  R)4      VP                  R*4      VP                  R+4      VP                  R,4      VP                  R-4      4      ,          pVP                  R.4      R9  dn   W! VP                  R/4      VP                  R04      VP                  R14      VP                  R24      VP                  R34      VP                  R44      4      ,          pVP                  R54      R9  dn   W! VP                  R64      VP                  R74      VP                  R84      VP                  R94      VP                  R:4      VP                  R;4      4      ,          pVP                  R<4      R9  dn   W! VP                  R=4      VP                  R>4      VP                  R?4      VP                  R@4      VP                  RA4      VP                  RB4      4      ,          pVP                  RC4      R9  dn   W! VP                  RD4      VP                  RE4      VP                  RF4      VP                  RG4      VP                  RH4      VP                  RI4      4      ,          pVP                  RJ4      R9  dn   W! VP                  RK4      VP                  RL4      VP                  RM4      VP                  RN4      VP                  RO4      VP                  RP4      4      ,          pVP                  RQ4      R9  dn   W! VP                  RR4      VP                  RS4      VP                  RT4      VP                  RU4      VP                  RV4      VP                  RW4      4      ,          pVP                  RX4      R9  dn   W! VP                  RY4      VP                  RZ4      VP                  R[4      VP                  R\4      VP                  R]4      VP                  R^4      4      ,          pVP                  R_4      R9  dn   W! VP                  R`4      VP                  Ra4      VP                  Rb4      VP                  Rc4      VP                  Rd4      VP                  Re4      4      ,          pVP                  Rf4      R9  dn   W! VP                  Rg4      VP                  Rh4      VP                  Ri4      VP                  Rj4      VP                  Rk4      VP                  Rl4      4      ,          pVP                  Rm4      R9  dn   W! VP                  Rn4      VP                  Rm4      VP                  Ro4      VP                  Rp4      VP                  Rq4      VP                  Rr4      4      ,          pVP                  Rs4      R9  dn   W! VP                  Rt4      VP                  Ru4      VP                  Rv4      VP                  Rw4      VP                  Rx4      VP                  Ry4      4      ,          pVP                  Rz4      R9  dn   W! VP                  R{4      VP                  Rz4      VP                  R|4      VP                  R}4      VP                  R~4      VP                  R4      4      ,          pVR,          pV# )u   
Genera el HTML para la tabla de accesorios adicionales con enlaces a fichas técnicas

Args:
    CotizacionAccesories_data (dict): Datos de los accesorios adicionales

Returns:
    str: HTML para la tabla de accesorios adicionales
r  c                 &  < Ve   VR8X  g   VR8X  d   R# VR	9   d   R# S	! V4      pS	! V4      pV'       d+   VP                  4       '       d   RT RT ;'       g    R R2pMT ;'       g    RpRT RT;'       g    R RT;'       g    R RV RV R2# )
Nr  r/  r  r  r  r  r  r  )r'  r\  r  r  s
   &&&&&&   r{   r  Mget_optionsimput.<locals>.generate_quote_table_Accesories.<locals>.render_row	  s    "kR&7;$;NLL $0
#; $0$=! j..00'
|3]^b^h^hfh]iimn	 JJB	K   &&B' (YYBK  )* +*+ , rG  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r  r  r  r  r  r  r  r
  r	  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r!  r   r#  r"  r$  r&  r%  r(  r'  r*  r)  r+  r-  r,  r/  r.  r1  r0  r2  r4  r3  r6  r5  r8  r7  r9  r;  r:  r=  r<  r?  r>  r@  rB  rA  rD  rC  rF  rG  rI  rH  rK  rJ  rM  rL  rN  rP  rO  rR  rQ  rS  rT  rV  rU  r  r  r`  r  r  )r/  r  r  rb  r  s   &   r{   r=  9get_optionsimput.<locals>.generate_quote_table_Accesoriesq	  sI   
	8 0334QSUV ??<(0@@J 12 01 23 23 56 34 D ??;'/??J 010 12 12 45 23 D ??-.6FFJ 78 67 89 89 9: 9: D ??,-5EEJ 67 56 78 78 9: 89 D ??=)1AAJ 23 12 34 34 67 45 D ??<(0@@J 12 01 23 23 56 34 D ???+3CCJ 45 34 56 56 89 67 D ???+3CCJ 45 34 56 56 89 67 D ??;'/??J 010 12 12 45 23 D ??+,4DDJ 56 45 67 67 9: 78 D ??-.6FFJ 78 67 89 89 9: 9: D ???+3CCJ 45 34 56 56 89 67 D ??9%-==J/.00 23 01 D ??5!)99J
+	*,,/- D ??/08HHJ 9: 89 :; 89 9: 9: D ??7#+ccJ 89(.. 01/ D ??=)1AAJ 23 12 34 34 67 45 D ??+,4llJ 9: 01 67 67 9: 78 D 	  	 rG  c                 	  < \         P                  ! 4       p\        V 4      pV'       g   Rm# VP                  4        UUu/ uF  w  r4VS! V4      bK  	  pppVP	                  RR4       RVP	                  RR4       2P                  4       pVR,          pRpVR,          VR,          ,          pRp	VR	,          VR,          ,          p
R
pVR,          pRpVR,          pRpVR,          pRpVR,          pVR,          VR,          ,          pVR,          VR,          ,          pVR,          VR,          ,          pVR,          pRpRV RRVR,          RVR,          RVRVRVR,          RVR,          RVR,          R/ RVR,          bRVR,          bRVR,          bRVbRVbRVR,          bR VR ,          bR!VR!,          bR"VR",          bR#VR#,          bR	VR	,          bR$V	bR%V
bR&VR&,          bR'VR',          bR(VR(,          bR)VR),          b/ R*VR*,          bRVR,          bR+VbR,VR,,          bR-VR-,          bR.VR.,          bR/VR/,          bR0VR0,          bRVR,          bR1VbR2VR2,          bR3VR3,          bR4VR4,          bR5VR5,          bR6VR6,          bRVR,          bR7VbC/ R8VR8,          bR9VR9,          bR:VR:,          bR;VR;,          bR<VR<,          bR=VbR>VR>,          bR?VR?,          bR@VR@,          bRAVRA,          bRBVRB,          bRCVbRDVbREVRE,          bRFVRF,          bRGVRG,          bRHVRH,          bC/ RIVRI,          bRJVbRKVbRLVRL,          bRMVRM,          bRNVRN,          bROVRO,          bRPVRP,          bRQVbRRVbRSVRS,          bRTVRT,          bRUVRU,          bRVVRV,          bRVR,          bRWVbRXVbC/ RYVRY,          bRZVRZ,          bR[VR[,          bR\VR\,          bR]VR],          bR^VR^,          bR_VR_,          bR`VR`,          bRaVRa,          bRbVRb,          bRcVRc,          bRdVRe,          bRfVRf,          bRgVRg,          bRhVRh,          bRiVRi,          bRjVRj,          bCRkVRk,          RlVRl,          /C//pV# u uppi )nrI  EnclosureTyper   - Enclosure_ConfigIDr  z120V GFCI ReceptacleQtyGFCI120Vz240V ReceptacleQtyReceptable120Vz)Prewire gen-set accesories to load centerzAutomatic LouverszOpening enclosurez*Louver fail contact wired to control panel
QtylightAC
QtylightDCQtySpaceHeaterOpeningEnclousurer  r{  Item_Enclosuree_typeEnclosureDESCEnclosureQTYTOTEnclosure_priceEnclosure_TSheetEnclosure_PriceTotConfigAndAccesories_EnclosureItem_GFCI120VGFCI120VGFCI120VDESCGFCI120VQTYTOTGFCI120V_PriceGFCI120V_TSheetGFCI120V_PriceTotItem_Receptable120VReceptable120VReceptable120VDESCReceptable120VQTYTOTReceptable120V_PriceReceptable120V_TSheetReceptable120V_PriceTotItem_Enclosure_ligthAClightACEnclosure_ligthACQTYTOTlightAC_pricelightAC_TSheetlightAC_PriceTotItem_Enclosure_ligthDClightDCEnclosure_ligthDCQTYTOTlightDC_pricelightDC_TSheetlightDC_PriceTotItem_Enclosure_SHeaterSpaceHeaterEnclosure_SHeaterQTYTOTSpaceHeater_priceSpaceHeater_TSheetSpaceHeater_PriceTotItem_Enclosure_LCenter
LoadCenterEnclosure_LCenterQTYTOTLoadCenter_priceLoadCenter_TSheetLoadCenter_PriceTotItem_PrewireAccsEnclPrewireAccsEnclousurePWCDESC	PWCQTYTOTPrewireAccsEnclo_PricePrewireAccsEnclo_TSheetPrewireAccsEnc_PriceTotItem_autolouversr~  AUTLOVEDESCAUTLOVEQTYTOTautolouvers_Priceautolouvers_TSheetautolouvers_PriceTotItem_ReceptautolouversReceptautolouversItem_ReceptautolouversDESCItem_ReceptautolouversQTYTOTReceptautolouver_PriceReceptautolouver_TSheetReceptautolouv_PriceTotItem_OpeningEnclousureOpeningEnclosure_DescriptionOpeningEnclosure_QtytotalOpeningEnclousure_PriceOpeningEnclousure_TSheetOpeningEnclousure_PriceTotItem_StopButtonEnclosureStopButtonEnclosureStopButtonEnclosure_QtyStopButtonEnclosure_PriceStopButtonEnclosure_TSheetStopButtonEnclosure_PriceTotItem_louvers_inr  zlouvers_in_price:louvers_in_pricelouvers_in_tsheetlouvers_in_pricetotItem_louvers_outr  louvers_out_pricelouvers_out_tsheetlouvers_out_pricetotr  )rm   !StopButtonEnclosureOptionsServicer^   r  r   r  )r  stop_servicer  r  r  rg  rh  ro  rp  rv  rw  r  r  r  r  r  r  r  r  r}  r  r  r  r.  r  s   &                       r{   r8  6get_optionsimput.<locals>.Get_CotizacionEnclosure_dataj
  sO   9[[] /x8
LL8B8H8H8JK8Ja++8J
K &>>/2>?s:>>RfhjCkBlmssu$[1-#M2Z5LL.)*=>KAXX={+	)";/(;$$.{$;!%Q"'1+'>$",\":Z=T"T",\":Z=T"T",-=">KAX"X",["9%8$ H*J7M,N#Z%@#]%%z2C'D&
3E(F(*5I*J3 n6 (O)Dn6 #Jz$:	n6
 &z-'@n6 'n6 ).n6 )*5E*Fn6 *:6G+Hn6 ,Z8K-Ln6 .z:O/Pn6 )*5E*Fn6 ,Z8K-Ln6  -.@!n6" /0D#n6$ /
;Q0R%n6& 0<S1T'n6( 2:>W3X)n6. 1*=U2V/n60 ":i#81n62 %j&>3n64 23J5n66 (O)D7n68 )*5E*F9n6: +J7I,J;n6@ 1*=U2VAn6B ":i#8Cn6D %j&>En6F 23JGn6H (O)DIn6J )*5E*FKn6L +J7I,JMn6R 1*=U2VSn6T &z-'@Un6V )*5E*FWn6X 23JYn6Z ,Z8K-L[n6\ -j9M.N]n6^ /
;Q0R_n6d 1*=U2Ven6f %j&>gn6h 23Jin6j +J7I,Jkn6l ,Z8K-Lmn6n .z:O/Pon6t /
;Q0Run6v 0<S1Twn6x "7yn6z $Y{n6| 1*=U2V}n6~ 2:>W3Xn6@ 2:>W3XAn6F +J7I,JGn6H &z-'@In6J &{Kn6L (Mn6N ,Z8K-LOn6P -j9M.NQn6R /
;Q0RSn6X 1*=U2VYn6Z ,Z8K-L[n6\ 56P]n6^ 78T_n6` 1*=U2Van6b 2:>W3Xcn6d 2:>W3Xen6h 1*=U2Vin6j ,Z8K-Lkn6l 78Tmn6n 45Non6p 2:>W3Xqn6r 3J?Y4Zsn6t 5jA]6^un6x 3J?Y4Zyn6z .z:O/P{n6| 2:>W3X}n6~ 4Z@[5\n6@ 5jA]6^An6B 7
Ca8bCn6F *:6G+HGn6H %z,'?In6J ,j9K.LKn6L ,j9L.MMn6N .
;P0QOn6R +J7I,JSn6T &
=(AUn6V ,j9L.MWn6X -z:N/O.<R1S[n6x{$ z ('A Ls   Q;c                  < RpR`V3R llpV P                  R/ 4      pV'       Ed   VP                  R4      Ra9  Ed   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R	4      VP                  R
4      4      ,          pRV9   Ed   VR,          pVP                  R4      Rb9  dn   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      4      ,          pVP                  R4      Rb9  dn   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      4      ,          pVP                  R4      Rc9  dn   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      4      ,          pVP                  R 4      Rc9  dn   W! VP                  R!4      VP                  R 4      VP                  R"4      VP                  R#4      VP                  R$4      VP                  R%4      4      ,          pVP                  R&4      Rc9  dn   W! VP                  R'4      VP                  R&4      VP                  R(4      VP                  R)4      VP                  R*4      VP                  R+4      4      ,          pVP                  R,4      Rc9  dn   W! VP                  R-4      VP                  R,4      VP                  R.4      VP                  R/4      VP                  R04      VP                  R14      4      ,          pVP                  R24      Rb9  dn   W! VP                  R34      VP                  R44      VP                  R54      VP                  R64      VP                  R74      VP                  R84      4      ,          pVP                  R94      Rb9  dn   W! VP                  R:4      VP                  R;4      VP                  R<4      VP                  R=4      VP                  R>4      VP                  R?4      4      ,          pVP                  R@4      Rb9  dn   W! VP                  RA4      VP                  R@4      VP                  RB4      VP                  RC4      VP                  RD4      VP                  RE4      4      ,          pVP                  RF4      Rb9  dn   W! VP                  RG4      VP                  RH4      VP                  RI4      VP                  RJ4      VP                  RK4      VP                  RL4      4      ,          pVP                  RM4      Rb9  dn   W! VP                  RN4      VP                  RO4      VP                  RP4      VP                  RQ4      VP                  RR4      VP                  RS4      4      ,          pVP                  RT4      Rb9  d_   W! VP                  RU4      VP                  RT4      RVVP                  RW4      VP                  RX4      VP                  RY4      4      ,          pVP                  RZ4      Rb9  d_   W! VP                  R[4      VP                  RZ4      RVVP                  R\4      VP                  R]4      VP                  R^4      4      ,          pVR_,          pV# )du   
Genera el HTML para la tabla de la caseta (enclosure) con enlaces a fichas técnicas

Args:
    CotizacionEnclosure_data (dict): Datos de la caseta y sus accesorios

Returns:
    str: HTML para la tabla de la caseta
r  c                 &  < Ve   VR8X  g   VR8X  d   R# VR	9   d   R# S	! V4      pS	! V4      pV'       d+   VP                  4       '       d   RT RT ;'       g    R R2pMT ;'       g    RpRT RT;'       g    R RT;'       g    R RV RV R2# )
Nr  r/  r  r  r  r  r  r  )r'  r\  Select the enclosureSeleccione el tipo de casetar  r  s
   &&&&&&   r{   r  Lget_optionsimput.<locals>.generate_quote_table_Enclosure.<locals>.render_row&  s    "kR&7;$;N T T $0
#; $0$=! j..00'
|3]^b^h^hfh]iimn	 JJB	K   &&B' (YYBK  )* +*+ , rG  r{  r]  rf  rg  rh  ri  rk  rj  rl  rn  rm  ro  rp  rq  rs  rr  ru  rt  rv  rw  rx  rz  ry  r|  r{  r}  r~  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  re  r  r  r  r  r  r  r  r  r  r  r  r  r~  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  1r  r  r  r  r  r  r  r  r  r  )Nr  r'  r\  r  r  r`  r  r  )r.  r  r  	enclosurerb  r  s   &    r{   r?  8get_optionsimput.<locals>.generate_quote_table_Enclosure  s   
	: -00bA	 97 @t tJ45o./0/02301 D /);'(GH ??:.6FFJ#8#7#(89#(89#(;<#(9: D ??#34<LLJ#(=>#(<=#(>?#(>?#(AB#(?@ D ??9-5mmJ#(@A#	2#(AB#8#(:;#(89 D ??9-5mmJ#(@A#	2#(AB#8#(:;#(89 D ??=19qqJ#(@A#6#(AB#(;<#(>?#(<= D ??<08ppJ#(@A#5#(AB#(:;#(=>#(;< D ??#:;CSSJ#(>?#	2#4#(@A#(AB#(AB D ??#67?OOJ#(@A#(FG#(CD#(AB#(DE#(BC D ??#89AQQJ#(BC#(=>#(AB#(CD#(FG#(DE D ??=19IIJ#(:;#6#8#(;<#(>?#(<= D ??#67?OOJ#(@A#(DE#(FG#(@A#(AB#(AB D ??<08HHJ#(9:#5#(:;#(=>#(;< D ??=19IIJ#(:;#6#(;<#(>?#(<= D 	  	 rG  c                 v  < \        V 4      pV'       g   Rw# VP                  4        UUu/ uF  w  r#VS ! V4      bK  	  pppVP                  RR4       RVP                  RR4       RVP                  RR4       R2P                  4       pVR,          pRpVR,          pR	pVR,          p	R
p
VR,          pRpVR,          pRpVR,          pRpVR,          pRpVR,          pRpVR,          pRpVR,          pRpVR,          pRpVR,          pRpVR,          pVR,          pRV RRVR,          RVR,          RVRVRVR,          RVR,          RVR,          R/ RVR,          bRVR,          bRVbR VbR!VR!,          bR"VR",          bR#VR#,          bR$VR$,          bR%VR%,          bR&VbR'V	bR(VR(,          bR)VR),          bR*VR*,          bR+VR+,          bR,VR,,          bR-Vb/ R.VR.,          bR/VR/,          bR0VR0,          bR1VR1,          bR2VR2,          bR3V
bR4VbR5VR5,          bR6VR6,          bR7VR7,          bR8VR8,          bR9VR9,          bR:VbR;VbR<VR<,          bR=VR=,          bR>VR>,          bC/ R?VR?,          bR@VR@,          bRAVbRBVbRCVRC,          bRDVRD,          bREVRE,          bRFVRF,          bRGVRG,          bRHVbRIVbRJVRJ,          bRKVRK,          bRLVRL,          bRMVRM,          bRNVRN,          bROVbC/ RPVbRQVRQ,          bRRVRR,          bRSVRS,          bRTVRT,          bRUVRU,          bRVVbRWVbRXVRX,          bRYVRY,          bRZVRZ,          bR[VR[,          bR\VR\,          bR]VbR^VbR_VR_,          bR`VR`,          bC/ RaVRa,          bRbVRb,          bRcVRc,          bRdVbReVbRfVRf,          bRgVRg,          bRhVRh,          bRiVRi,          bRjVRj,          bRkVbRlVbRmVRm,          bRnVRn,          bRoVRo,          bRpVRp,          bRqVRq,          bCRrVRsVRtVRt,          RuVRu,          RvVRv,          /C//pV# u uppi )xrI  TankCapacityr  r^  TankTypeTank_CapacityGALz galr  zRupture basin switchzFuel level sensorzOverfill protection valvezDual fuel switcheszHigh fuel level switch (FDEP)zRemote Alarm Panelz(12 Ft above grade (extended vent piping)z+Combustible liquids- Keep fire away (qty.2)z NFPA 7044 identification (qty 2)zNo Smoking (qty 2)z)TTank number and safe fill height (qty.2)z100% Engine containmentr  rx  Tank_ConfigIDTankDESC
TankQTYTOT
Tank_priceTank_TSheetTank_PriceTotConfigAndAccesories_TankItem_BreakTraySwitchBreakTraySwitchBreakTraySwitchDESCBreakTraySwitchQTYTOTBreakTraySwitch_PriceBreakTraySwitch_TSheetBreakTraySwitc_PriceTotItem_FuelLevelSensorFuelLevelSensorFuelLevelSensorDESCFuelLevelSensorQTYTOTFuelLevelSensor_PriceFuelLevelSensor_TSheetFuelLevelSenso_PriceTotItem_Tank_SpillContSpillContainmentTank_SpillContQTYTOTSpillContainment_PriceSpillContainment_TSheetSpillContainme_PriceTotItem_OverfillValveOverfillValveOverfillValveDESCOverfillValveQTYTOTOverfillValve_PriceOverfillValve_TSheetOverfillValve_PriceTotItem_DualFuelSwitchDualFuelSwitchesDualFuelSwitchDESCDualFuelSwitchQTYTOTDualFuelSwitches_PriceDualFuelSwitches_TSheetDualFuelSwitch_PriceTotItem_HighFuelSwitchHighFuelSwitchHighFuelSwitchDESCHighFuelSwitchQTYTOTHighFuelSwitch_PriceHighFuelSwitch_TSheetHighFuelSwitch_PriceTotItem_RemoteAlarmPRemoteAlarmPanelRemoteAlarmPDESCRemoteAlarmPQTYTOTRemoteAlarmPanel_PriceRemoteAlarmPanel_TSheetRemoteAlarmPan_PriceTotItem_VentPipeVentPipeVentPipeDESCVentPipeQTYTOTVentPipe_PriceVentPipe_TSheetVentPipe_PriceTotItem_FlammableLFlammableLiquidsFlammableLDESCFlammableLQTYTOTFlammableLiquids_PriceFlammableLiquids_TSheetFlammableLiqui_PriceTotItem_NFPAIdentificatNFPAIdentificationNFPAIdentificatDESCNFPAIdentificatQTYTOTNFPAIdentificat_PriceNFPAIdentificat_TSheetNFPAIdentifica_PriceTotItem_NoSmoking	NoSmokingNoSmokingDESCNoSmokingQTYTOTNoSmoking_PriceNoSmoking_TSheetNoSmoking_PriceTotItem_TankNumber
TankNumberTankNumberDESCTankNumberQTYTOTTankNumber_PriceTankNumber_TSheetTankNumber_PriceTotItem_FluidContainmentFluidContainmentFluidContainmentDESCFluidContainmentQTYTOTFluidContainment_PriceFluidContainment_TSheetFluidContainme_PriceTotr  )r^   r  r   r  )!r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r
  r  r  r  r  r  r  r   r&  r'  r  r0  r  s!   &                               r{   r:  1get_optionsimput.<locals>.Get_CotizacionTank_data  sy   .x8
LL8B8H8H8JK8Ja++8J
K !nn^R89Z^^JXZ=[<\\_`j`n`n  pB  DF  aG  `H  HL  M  S  S  U,
4 *; 71 *; 77(51)+6<)+6/'4A#K0F%k2@ *; 7,$[1D%k28!+K!8)+6 H
: 6#Z%@ : *\":!:m#<#Z%@. t1.
;Q0Rt1 *:6G+Ht1 ./B	t1
 01Ft1 0<S1Tt1 1*=U2Vt1 2:>W3Xt1 /
;Q0Rt1 *:6G+Ht1 ./Bt1 01Ft1 0<S1Tt1  1*=U2V!t1" 2:>W3X#t1( .z:O/P)t1* +J7I,J+t1, /0D-t1. 1*=U2V/t10 2:>W3X1t12 2:>W3X3t18 -j9M.N9t1: (O)D;t1< ,->=t1> ./B?t1@ .z:O/PAt1B /
;Q0RCt1D 1*=U2VEt1J .z:O/PKt1L +J7I,JMt1N -.@Ot1P /0DQt1R 1*=U2VSt1T 2:>W3XUt1V 2:>W3XWt1\ .z:O/P]t1^ )*5E*F_t1` -.@at1b /0Dct1d /
;Q0Ret1f 0<S1Tgt1h 2:>W3Xit1n ,Z8K-Lot1p +J7I,Jqt1r +,<st1t -.@ut1v 1*=U2Vwt1x 2:>W3Xyt1z 2:>W3X{t1@ (O)DAt1B #Jz$:Ct1D 'Et1F ).Gt1H )*5E*FIt1J *:6G+HKt1L ,Z8K-LMt1R *:6G+HSt1T +J7I,JUt1V ).Wt1X +,<Yt1Z 1*=U2V[t1\ 2:>W3X]t1^ 2:>W3X_t1d /
;Q0Ret1f -j9M.Ngt1h ./Bit1j 01Fkt1l 0<S1Tmt1n 1*=U2Vot1p 2:>W3Xqt1v )*5E*Fwt1x $Z%<yt1z ({t1| */}t1~ *:6G+Ht1@ +J7I,JAt1B -j9M.NCt1H *:6G+HIt1J %j&>Kt1L ).Mt1N +,<Ot1P +J7I,JQt1R ,Z8K-LSt1T .z:O/PUt1Z 0<S1T[t1\ +J7I,J]t1^ /0D02H0*=U2V1:>W3X1:>W3Xgt1~AF #"a Ls   P5c                  < RpRgV3R llpV P                  R/ 4      pV'       Ed=   VP                  R4      Rh9  Ed&   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R	4      VP                  R
4      4      ,          pRV9   Ed   VR,          pVP                  R4      Ri9  dn   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      4      ,          pVP                  R4      Ri9  dn   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      4      ,          pVP                  R4      Rj9  dn   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      4      ,          pVP                  R 4      Ri9  dn   W! VP                  R!4      VP                  R"4      VP                  R#4      VP                  R$4      VP                  R%4      VP                  R&4      4      ,          pVP                  R'4      Ri9  dn   W! VP                  R(4      VP                  R)4      VP                  R*4      VP                  R+4      VP                  R,4      VP                  R-4      4      ,          pVP                  R.4      Ri9  dn   W! VP                  R/4      VP                  R04      VP                  R14      VP                  R24      VP                  R34      VP                  R44      4      ,          pVP                  R54      Ri9  dn   W! VP                  R64      VP                  R74      VP                  R84      VP                  R94      VP                  R:4      VP                  R;4      4      ,          pVP                  R<4      Ri9  dn   W! VP                  R=4      VP                  R>4      VP                  R?4      VP                  R@4      VP                  RA4      VP                  RB4      4      ,          pVP                  RC4      Ri9  dn   W! VP                  RD4      VP                  RE4      VP                  RF4      VP                  RG4      VP                  RH4      VP                  RI4      4      ,          pVP                  RJ4      Ri9  dn   W! VP                  RK4      VP                  RL4      VP                  RM4      VP                  RN4      VP                  RO4      VP                  RP4      4      ,          pVP                  RQ4      Ri9  dn   W! VP                  RR4      VP                  RS4      VP                  RT4      VP                  RU4      VP                  RV4      VP                  RW4      4      ,          pVP                  RX4      Ri9  dn   W! VP                  RY4      VP                  RZ4      VP                  R[4      VP                  R\4      VP                  R]4      VP                  R^4      4      ,          pVP                  R_4      Ri9  dn   W! VP                  R`4      VP                  Ra4      VP                  Rb4      VP                  Rc4      VP                  Rd4      VP                  Re4      4      ,          pVRf,          pV# )ku   
Genera el HTML para la tabla del tanque de combustible con enlaces a fichas técnicas

Args:
    CotizacionTank_data (dict): Datos del tanque y sus accesorios

Returns:
    str: HTML para la tabla del tanque
r  c                 &  < Ve   VR8X  g   VR8X  d   R# VR	9   d   R# S	! V4      pS	! V4      pV'       d+   VP                  4       '       d   RT RT ;'       g    R R2pMT ;'       g    RpRT RT;'       g    R RT;'       g    R RV RV R2# )
Nr  r/  r  r  r  r  r  r  )r'  r\  z!Seleccionela capacidad del tanqueSelect the base tankr  r  s
   &&&&&&   r{   r  Gget_optionsimput.<locals>.generate_quote_table_Tank.<locals>.render_row  s    "kR&7;$;N Y Y $0
#; $0$=! j..00'
|3]^b^h^hfh]iimn	 JJB	K   &&B' (YYBK  )* +*+ , rG  rx  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r  r  r  r  r  r  r	  r  r
  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r!  r#  r"  r%  r$  r&  r'  r(  r*  r)  r  r  )Nr  r'  r\  z"Seleccione la capacidad del tanquer.  r`  r  r  )r0  r  r  tankrb  r  s   &    r{   rA  3get_optionsimput.<locals>.generate_quote_table_Tank  s   
	: #&&vr2 4DHHZ( 1j jJ)$&&)' D *T1"#=> ??#45=MMJ#(>?#(=>#(?@#(?@#(AB#(@A D ??#45=MMJ#(>?#(=>#(?@#(?@#(AB#(@A D ??#56>vvJ#(=>#(:;#(>?#(@A#(AB#(AB D ???3;KKJ#(<=#(;<#(=>#(=>#(@A#(>? D ??#56>NNJ#(=>#(<=#(>?#(@A#(AB#(AB D ??#34<LLJ#(=>#(<=#(>?#(>?#(AB#(?@ D ??#56>NNJ#(;<#(:;#(<=#(@A#(AB#(AB D ??:.6FFJ#8#7#(89#(89#(;<#(9: D ??#56>NNJ#(9:#(89#(:;#(@A#(AB#(AB D ??#78@PPJ#(>?#(=>#(?@#(?@#(AB#(@A D ??;/7GGJ#(89#8#(9:#(9:#(<=#(:; D ??<08HHJ#(9:#(89#(:;#(:;#(=>#(;< D ??#56>NNJ#(?@#(>?#(@A#(@A#(AB#(AB D 	  	 rG  c                h  < \        V 4      pV'       g   R# VP                  4        UUu/ uF  w  r4VS! V4      bK  	  ppp\        VR,          \        4      '       d   \	        VR,          4      MVR,          pVR,          pW,          pWu,          pWu,          V,          p	VR,          p
RV RRVR,          RVR,          RVRVR,          RVR	,          R	VR
VR,          RV	/RRVR,          RVR,          RVR,          RV
RVR,          RVR,          RVR,          /RWR,          ,           /pV# u uppi )u?   
Agrega información de garantías y pruebas a la cotización.
Garanty_Percentager  r  WarrantyItem_PrjWar_WarrantyGarantyGarantyQTYTOTGaranty_priceTABGaranty_priceGaranty_PriceTotTABGaranty_PriceTotTestingItem_PrjWar_TestingTeastingTeasting_ConfigIDTestingQTYTOTTeasting_priceTeasting_DocumentTeasting_PriceTotPriceWarrantyAndTestr  )r^   r  
isinstancerw   float)r  r1  r  r  r  r3  r7  unitaryprice_gensetr9  r;  r@  r2  r  s   &&          r{   r<  :get_optionsimput.<locals>.Get_warranty_and_testing_pricingt  s|    /x8
LL8B8H8H8JK8Ja++8J
KHRS]^rSsuxHyHyU:.B#CD  @J  K_  @`";/*:+@.CmS";/ H*J7M,Nz)4#](*5I*J&
?(C#]):6H+I&(8	 ):6K+L
: 6'4G)H#m$j1A&B'4G)H'4G)H '(8FY;Z(Z+*&0 .-K Ls   D.c           	        \        V 4      pV'       g   R	# \        V 4      pRV^,          RV^,          RV^,          RV^,          /p^ pVR,          \        R4      8  d\   \        \        V4      4      pVR,          V,          pVR,          R8X  d
   Wg,
          pMWg,           pRVRVR,          RVR,          /pV# RV/pV# )
z 
Retorna el valor del descuento
isoCodestate
isDiscount	descuento0Tr  discount)u2   Error: No se encontraron datos para al cotizaciónr   )r^   rf   r   rw   )	r  r  r  country_discount_datarCountryDatar  granTotalDecimalrM  payloads	   &&       r{   rD  -get_optionsimput.<locals>.get_country_discont  s     /x8
LL "<H!E ,Q/*1-/2.q1	
 %4&s9~6%k25EEI L)T1*6 )4 L5|L9G 	 G
 rG  c                  < RpRV3R llpV P                  R/ 4      pV'       dv   VP                  R4      '       d_   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R	4      R4      ,          pV P                  R
/ 4      pV'       d   VP                  R4      '       dn   W! VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      4      ,          pVR,          pV# )u   
Genera el HTML para la tabla de garantía y pruebas con enlaces a fichas técnicas

Args:
    CotizacionWarrantyAndTest_data (dict): Datos de garantía y pruebas

Returns:
    str: HTML para la tabla de garantía y pruebas
r  Nc                   < Ve   VR8X  d   R# S	! V4      pS	! V4      pV'       d+   VP                  4       '       d   RT RT ;'       g    R R2pMT ;'       g    RpRT RT;'       g    R RT;'       g    R RV RV R2# r  r  r  s
   &&&&&&   r{   r  Eget_optionsimput.<locals>.generate_quote_table_WT.<locals>.render_row  r  rG  r4  r6  r5  r7  r9  r;  r<  r>  r=  r@  rA  rC  rB  r  r  r  )r2  r  r  warrantytestingr  s   &    r{   rB  1get_optionsimput.<locals>.generate_quote_table_WT  s$   
	2 255j"E Y//J34Y'_-_-/0 D 144YC w{{:..J12J'O,,-/0/0 D 	  	 rG  c                    ^ RI pRpRpVP                  W0VP                  4      pV F9  pRP                  R V 4       4      p V'       d   \	        V4      pW',          pK9  K;  	  V#   \
         d     KM  i ; i)z
Suma todos los importes totales de una tabla HTML.

Args:
    html_table (str): HTML de la tabla generada
    
Returns:
    float: La suma total de todos los importes
Ng        zY<tr>.*?<td>.*?</td>.*?<td>.*?</td>.*?<td>.*?</td>.*?<td>.*?</td>.*?<td>(.*?)</td>.*?</tr>r  c              3   b   "   T F%  qP                  4       '       g
   VR 8X  g   K!  Vx  K'  	  R# 5i).N)isdigit).0cs   & r{   	<genexpr>=get_optionsimput.<locals>.sum_total_prices.<locals>.<genexpr>8  s!     !X_		qTWx!!_s   /
/)refindallDOTALLjoinrF  
ValueError)
html_tablerc  	total_sumpatternmatchesformatted_priceclean_priceprice_values   &       r{   rE  *get_optionsimput.<locals>.sum_total_prices   s     		 o **W"))<&O ''!X_!XXK"'"4K,I   ' 	  s   A&&A54A5c                t    V f   R#  RP                  \        V 4      4      #   \        \        3 d     R# i ; i)z
Formatea un precio a formato de moneda (USD)

Args:
    price (float): Precio a formatear
    
Returns:
    str: Precio formateado
z$0.00z${:,.2f})formatrF  	TypeErrorrg  )prices   &r{   r  &get_optionsimput.<locals>.format_priceE  s=     =	$$U5\22:& 		s   " 77c                H    \        V \        4      '       d   \        V 4      # V # )u:   Convierte objetos Decimal a float para serialización JSON)rE  r   rF  )objs   &r{   r  )get_optionsimput.<locals>.convert_decimalW  s    c7##:
rG  z(/Ventas/VentasEUA/generar_pdf/<quote_id>c           %        <  V '       g   \        R RRR/4      R3# V \        R&   \        \        P                  ! 4       4      p\
        P                  P                  R4      pV RV  2p\        P                  p\        P                  P                  VRR	R
R4      p\        P                  ! VRR7       \        P                  P                  VRV R24      p\        P                  P                  VRR
RR4      p\        P                  ! RVVVV.RR7      pVP!                  4       p	SE! V 4      p
V
R,          R,          pV
R,          R,          pTp\#        VR4      ;_uu_ 4       p\%        VRV R2RR7      pRpRpRV RV  2p\'        VVVV4      pVR,          '       Ed   VR,          p\)        VV 4       TpSH! V4      pTpW.p\        P*                  P-                  R R!4      '       * p\.        R!8X  Ed    R"p\1        V 4      pSC! V 4      pSL! V4      pSR! V4      pS@! V 4      pSO! V4      pSR! V4      p SA! V 4      p!SJ! V!4      p"SR! V"4      p#SB! V 4      p$SK! V$4      p%SR! V%4      p&S?! V 4      p'SI! V'4      p(SR! V(4      p)SD! V 4      p*SM! V*4      p+SR! V+4      p,VV ,           V#,           V&,           V),           V,,           p-SF! V V-4      p.SN! V.4      p/SR! V/4      p0V-V0,           p1SP! V V14      p2\2        P4                  ! 4       P7                  R#4      p3RV R$R%V3/R&R'VR(,          R)VR*,          /RR+VR+,          R,VR,,          R-VR-,          RVR,          R.VR.,          /RR/VR/,          RVR,          R0VR0,          /R1R2VR3V R4V#R5V&R6V)R7V,R8V0R9V1R:V2R;VR<,          R=\2        P4                  ! 4       P7                  R>4      RV //p4VP9                  RX4      '       dn    \:        P,                  ! V4      p
V
P=                  4        \?        R!RR?7      ;_uu_ 4       p5V5PA                  V
PB                  4       V5PD                  p6R@R@R@4       ME\        P                  PK                  V4      '       g   \I        RBV RC24       \M        RDV RC24      hTp6\O        REV4RF7      p8\Q        VSGP*                  RG,          VRH7      p9V8V9n)        \        P                  PU                  V4      ;'       g    RIp: \#        X6R4      ;_uu_ 4       p;V;PW                  4       p<V9PY                  V:RJV<RK7       R@R@R@4        SQP[                  T94       TP9                  RX4      '       d<   \        P                  PK                  T64      '       d   \        P`                  ! T64       M!M \        RVRQ,          /4      R3uuR@R@R@4       # R@R@R@4       \        R RRRSVRRT/4      #   + '       g   i     ELN; i  \F         d   p7\I        RA\        T74       24       h R@p7?7ii ; i  + '       g   i     L; i  \F         d   p7\I        RL\        T74       24       h R@p7?7ii ; i  \F         d>   p7\I        RM\        T74       24       ^ R@I.p=\I        RNT=P_                  4        24       h R@p7?7ii ; i  \F         d   p7RO\c        4       9   dS   \        P                  PK                  X64      '       d.   TP9                  RX4      '       d   \        P`                  ! T64       \I        RP\        T74       24        R@p7?7ELjR@p7?7ii ; i  + '       g   i     EL{; i  \F         dJ   p7^ R@I.p=T=P_                  4       p>\I        RUT> 24       \        R RRRV\        T74       2/4      RW3u R@p7?7# R@p7?7ii ; i)Ystatusrt   r  u   ID de cotización no válidoi  r  /z,/Ventas/VentasEUA/VEUcotizadorbase?quote_id=staticpdfVentas	VentasEUAT)exist_okcotizacion_z.pdfpuppeteer_pdfzVEUcotizador.jsnode)start_new_sessionr}  r  r  r  rbTechnicalSheet)streamfilenamenamezB/domains/sycelephant.com/public_html/file/Ventas/EUA/Cotizaciones/z/Ventas/EUA/Cotizaciones/_exitourl_webDEBUGFu   Cotización del proyectorJ  r   rR  rM  rN  rO  rP  rQ  r~  r  r  r  r  r  r4  r  r  r  r  r  r  r  r  r  countryDiscountCountry_Discountr   r!  )deletesuffixNzERROR: Fallo al descargar PDF: zERROR: El archivo z
 no existezEl archivo z,/Ventas/VentasEUA/Mail/VEUcotizadormail.html)r	  MAIL_USERNAME)sender
recipientszdocumento.pdfzapplication/pdf)r  content_typer	  z"ERROR: Error al adjuntar archivo: u$   ERROR: Excepción al enviar correo: zERROR: Detalles del error: 	temp_pathzC-------------Error al enviar el correo:----------------------------mensaje
processingtokenu#   La generación del PDF ha iniciado.zError detallado: zError: ru   )zhttp://zhttps://)2r   r   rw   uuiduuid4r   host_urlrstripr   	root_pathospathrf  makedirs
subprocessPopenwaitopenr   r   rc   configr   r   r^   r   r'  r(  
startswithrequestsraise_for_statusr   writecontentr  rv   r   existsFileNotFoundErrorr	   r   r  basenamereadattachsend	traceback
format_excunlinklocals)Sr  r  base_url	quote_urlbase_dir
output_diroutput_pathscript_pathprocessreturn_code	respuestacorreo_customercorreo_Sellerruta_archivo_localftechnicalSheetruta_pdfcarpetar  	resultador  
directoriourl_pdfcorreos_destinois_productionasunto_correor  r+  r  r  r,  r  r  r-  r  r  r.  r  r  r/  r  r  r0  r  r  r1  r2  r  r  r  r3  rR  r	  	temp_filer  rz   cuerpo_htmlmsgnombre_archivofile	file_datar  traceback_strr5  r6  r7  r8  r9  r:  r;  r<  appeliminar_pdfs_en_directorior=  r>  r?  r@  rA  rB  rC  rD  mailrE  sS   &                                                              r{   generar_pdf_cotizador/get_optionsimput.<locals>.generar_pdf_cotizador]  s   e	g=    
 #+GJ

%E ''..s3H#*$PQYPZ[I",,H h%;WJKK
T2'',,z[t3LMK '',,/8[BSK !&&( "&'G ",,.K/9I'
3ODO%h/>M!, ($//1!,*5'6)" `5$UG1XJ7;NDRZ\cd	W%%(3H#HX6!+J ;J GI&G'6&FO(3(:(:(>(>w(N$NM!U*Jr,FM)B8)LJ4Mh4W15PQf5g25EF\5]26QRZ6[37TUl7m47GH`7a45OPX5Y26RSi6j36FG^6_37ST\7]48VWo8p58HIb8c58UV^8_59XYr9s69IJd9e62I(2S/3LM`3a03CDX3Y0+AD\+\_v+v  zS  ,S  Vp  ,p  sG  ,GL=]^fht=u:4KLj4k14DEZ4[1(47L(LI 3FhPY2Z/ $,<<>#:#::#FD&" &% +$-z)/D$;Z=V-" '$5zBS7T$5zBS7T$5zBS7T$3Z5P$1:m3L)" %$0*\2J$1:m3L$1:m3L'"
 &$<>T$>@X$=?V(CE^$@B\$:<P$;=R$/$13F$5zBT7U$0(,,.2I2I*2U$.)+#$DJ  '112IJJ	!*08W0EI$-$>$>$@);5QW)X)X\e(1	8I8I(J4=NN	 *Y)X (*ww~~g'>'>$),>wiz*R$S*;k'R\<]*^$^,3	 +::hos*tK") -'*zz/'B+:#C (3CH-/WW-=-=g-F-Y-Y/N
&%))T%:%:d04		I$'JJ1?5F-6 %/ %& &;& $		#  '112IJJrww~~^gOhOh "		) 4K +\ #GYy-A#BCSHK 0//R ,@  y *Y)X)X (1 !*$),KCPQF8*T$U$)!*. &;%: $- & %(J3q6(&S T %& $- & %(LSQRVH&U V 0 %(CIDXDXDZC[&\ ] %&  ) r*fh6277>>);T;TY`YkYk  mD  ZE  ZE "		) 4!$ghklmhngo"pqq	r} 0//\  	%002M%m_56'WSVH-   		s:  \( \( E
\( &B\9GZ;W(V;	0W8%ZA8ZZX/%W:	XX8.;Z*Z \
\( "\( ;WW
ZWW7W22W77Z:X
X	Z
XX5X00X55Z8Z 8Y;;Z  Z\3\A\\\\\%		\( (]<3>]71]<7]<z,/Ventas/VentasEUA/check_pdf_status/<quoteId>c                    \        V 4      p\        V4      p\        P                  P	                  R R4      '       * p\
        R8X  d   VR,          pM$\        P                  P                  R4      pV R2p\        RRRVR	V/4      # )
r  FTRoutePDFrz  z /Ventas/Ventas_EUA/Cotizador_EUAry  	completedpdf_pathruta)
rd   rw   r   r  r   r   r   r  r  r   )quoteIdRutapdfRuta_pdfr  r  r  s   &     r{   check_pdf_status*get_optionsimput.<locals>.check_pdf_statusG  s     w'w<'..227EBB:&D''..s3HZ?@D+H  	rG  c                 D   \         P                  P                  V R 4      p\        P                  ! V4      p^ p^ pV F#  p \         P                  ! V4       V^,          pK%  	  RVRV/#   \
         d    T^,          p KD  \         d   pT^,          p Rp?K]  Rp?ii ; i)z*.pdfN
eliminadosfallidos)r  r  rf  globremovePermissionErrorrv   )r  patron_busquedaarchivos_pdfr  r  archivorz   s   &      r{   r  5get_optionsimput.<locals>.eliminar_pdfs_en_directorioZ  s    '',,z7;yy1 
 $G		'"a
 $ j*h?? # A As$   A**BB
B	BBN)route)9r  r  r|   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r5  r6  r7  r8  r9  r:  r;  r<  r  r  r  r=  r>  r?  r@  rA  rB  rC  rD  r
  rE  s9   ff                                  @@@@@@@@@@@@@@@@@@@@@r{   get_optionsimputr  9   sk   YY<ugYN3 O3 	YYEPUwYW3 X3 	YYAE7YS3 T3 	YYBUGYT3 U3 	YYITYSZY[3 \3 	YYWbgahYi3 j3 	YYmx}w~Y3 @3 	YYz{3 |3 	YY  N  O3 O3 	YYAB3 C3 	YYQR3 S3 	YY  a  b3 b3 	YYST3 U3 	YYDE3 F3 	YYBC3 D3 	YYlm3 n3 	YY  B  C3 C3 	YYEPUwYW3 X3 	YYEPUwYW3 X3 	YYITYSZY[3 \3 	YYHSXRYYZ3 [3 	YYBUGYT3 U3 	YYCeWYU3 V3 	YYKL3 M3 	YYWX3 Y3 	YYCeWYU3 V3 	YY:UGYL3 M3 	YYBUGYT3 U3 	YYMN3 O3 	YYBUGYT3 U3, 	YY<vhYO P0tl 	YY3eV_YMfT fT fT NfTPi#V'%P9vo'`	IV
Q&dfPd)Jwrl(ZQfv#nQf/.b0dGR#J$ 	YY9F8YLf f f MfR 	YY=wYO P$@rG  )|flaskr   r   r   r   r   r   r	   r
   r   r  r  r  r  decimalr   r   App.Security_Module.UserPasswordr   
flask_mailr   tempfiler   r  r   r   r   r   werkzeug.datastructuresr   App.Subir_Archivor   +Consultas_SQL.Ventas.VentasEUA.CotizadorSQLr   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   App.api.controllerrk   App.api.servicesrl   rm   r   rG  r{   <module>r     s   
  c c c  	       B  ' + + # / =                     6 5 Rt<@rG  